misp-modules/website/app/templates/base.html

111 lines
6.0 KiB
HTML
Raw Normal View History

2024-02-07 14:39:19 +01:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Misp Modules</title>
<link rel="icon" href="{{ url_for('static',filename='image/misp.png') }}">
<script src="{{ url_for('static',filename='js/popper.min.js') }}"></script>
<script src="{{ url_for('static',filename='bootstrap-5.3.0/js/bootstrap.min.js') }}"></script>
<script src="{{ url_for('static',filename='js/jquery.min.js') }}"></script>
<script src="{{ url_for('static',filename='js/jquery-ui.js') }}"></script>
<script src="{{ url_for('static',filename='js/select2.min.js') }}"></script>
<script src="{{ url_for('static',filename='js/vue.global.js') }}"></script>
<script src="{{ url_for('static',filename='js/zxcvbn.js') }}"></script>
<script src="{{ url_for('static',filename='js/markdown-it.js') }}"></script>
<script src="{{ url_for('static',filename='js/editor.js') }}"></script>
<script src="{{ url_for('static',filename='js/mermaid-markdown.js') }}"></script>
<script src="{{ url_for('static',filename='js/utils.js') }}"></script>
<script src="{{ url_for('static',filename='js/jsonParser.js') }}"></script>
<script src="{{ url_for('static',filename='js/mispParser.js') }}"></script>
2024-02-07 14:39:19 +01:00
<script src="{{ url_for('static',filename='js/dayjs/dayjs.min.js') }}"></script>
<script src="{{ url_for('static',filename='js/dayjs/dayjs-utc.js') }}"></script>
<script src="{{ url_for('static',filename='js/dayjs/dayjs-relativeTime.js') }}"></script>
<script>dayjs.extend(window.dayjs_plugin_utc)</script>
<script>dayjs.extend(window.dayjs_plugin_relativeTime)</script>
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='css/select2.min.css') }}">
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='bootstrap-5.3.0/css/bootstrap.min.css') }}">
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='fontawesome-6.3.0/css/fontawesome.css') }}">
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='fontawesome-6.3.0/css/solid.css') }}">
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='fontawesome-6.3.0/css/brands.css') }}">
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='css/jquery-ui.css') }}">
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='css/core.css') }}">
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='css/select2-bootstrap-5-theme.min.css') }}">
</head>
<body>
2024-02-19 14:01:06 +01:00
<div class="container-fluid">
<div class="row flex-nowrap">
{% include 'sidebar.html' %}
2024-02-07 14:39:19 +01:00
2024-02-19 14:01:06 +01:00
<!--Main layout-->
<main class="col ps-md-4 pt-2">
{% include 'macros/_flashes.html' %}
<div aria-live="polite" aria-atomic="true" class="">
<div class="toast-container start-50 translate-middle-x top-0 p-3" style="position: fixed;">
<template v-if="message_list">
<template v-for="message in message_list" v-key="message.id">
<div :id="`liveToast-${message.id}`" :class="`toast bg-${message.toast_class}`" role="alert" aria-live="assertive" data-bs-delay="5000" aria-atomic="true" style="--bs-toast-spacing: 0.5rem;">
<div class="d-flex">
<div class="toast-body">
<template v-if="message.message">
[[message.message]]
</template>
</div>
<button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
2024-02-07 14:39:19 +01:00
</div>
</div>
2024-02-19 14:01:06 +01:00
</template>
2024-02-07 14:39:19 +01:00
</template>
2024-02-19 14:01:06 +01:00
</div>
2024-02-07 14:39:19 +01:00
</div>
2024-02-19 14:01:06 +01:00
<a href="#" data-bs-target="#sidebar" data-bs-toggle="collapse" class="border rounded-3 p-1 text-decoration-none"><i class="fa-solid fa-bars-staggered"></i> Menu</a>
{# When extended, the content block contains all the html of the webpage #}
{% block content %}
{% endblock %}
</main>
<!--Main layout-->
{# Implement CSRF protection for site #}
{% if csrf_token()|safe %}
<div style="visibility: hidden; display: none">
<input type="hidden" id="csrf_token" name="csrf_token" value="{{ csrf_token()|safe }}">
</div>
{% endif %}
2024-02-07 14:39:19 +01:00
</div>
2024-02-19 14:01:06 +01:00
</div>
2024-02-07 14:39:19 +01:00
{% block script %}
<script type="module">
// Empty vue used for toast to declar vue is used in the rest of the project
const {createApp} = Vue
createApp({
delimiters: ['[[', ']]'],
setup() {}
2024-02-19 14:01:06 +01:00
}).mount('.container-fluid')
2024-02-07 14:39:19 +01:00
</script>
{% endblock %}
<script>
$( document ).ready(function() {
$('.message').each((i, el) => {
const $el = $(el);
const $xx = $el.find('.close');
const sec = $el.data('autohide');
const triggerRemove = () => clearTimeout($el.trigger('remove').T);
$el.one('remove', () => $el.remove());
$xx.one('click', triggerRemove);
if (sec) $el.T = setTimeout(triggerRemove, sec * 1000);
});
})
</script>
</body>
</html>