neptune/core/templates/base.html

258 lines
11 KiB
HTML
Raw Normal View History

2022-07-21 12:46:05 +00:00
{% load static %}
2022-07-21 12:48:39 +00:00
{% load has_plan %}
2022-07-21 12:45:28 +00:00
<!DOCTYPE html>
2022-07-21 12:46:05 +00:00
<html lang="en-GB">
<head>
2022-07-21 12:45:28 +00:00
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
2022-07-21 12:45:57 +00:00
<title>Pathogen - {{ request.path_info }}</title>
2022-07-21 12:50:20 +00:00
<link rel="shortcut icon" href="{% static 'favicon.ico' %}">
2022-08-05 07:40:35 +00:00
<link rel="manifest" href="{% static 'manifest.webmanifest' %}">
2022-08-05 22:10:07 +00:00
<link rel="stylesheet" href="{% static 'css/bulma.min.css' %}">
<link rel="stylesheet" href="{% static 'css/bulma-tooltip.min.css' %}">
<link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.1.1/css/all.css">
2022-08-05 22:10:07 +00:00
<link rel="stylesheet" href="{% static 'css/bulma-slider.min.css' %}">
<link rel="stylesheet" href="{% static 'css/bulma-calendar.min.css' %}">
<link rel="stylesheet" href="{% static 'css/bulma-tagsinput.min.css' %}">
<link rel="stylesheet" href="{% static 'css/bulma-switch.min.css' %}">
2022-08-28 10:48:32 +00:00
<link rel="stylesheet" href="{% static 'css/gridstack.min.css' %}">
2022-08-05 22:15:50 +00:00
<script src="{% static 'js/bulma-calendar.min.js' %}" integrity="sha384-DThNif0xGXbopX7+PE+UabkuClfI/zELNhaVqoGLutaWB76dyMw0vIQBGmUxSfVQ" crossorigin="anonymous"></script>
<script src="{% static 'js/bulma-slider.min.js' %}" integrity="sha384-wbyps8iLG8QzJE02viYc/27BtT5HSa11+b5V7QPR1/huVuA8f4LRTNGc82qAIeIZ" crossorigin="anonymous"></script>
2022-08-05 22:14:05 +00:00
<script defer src="{% static 'js/htmx.min.js' %}" integrity="sha384-cZuAZ+ZbwkNRnrKi05G/fjBX+azI9DNOkNYysZ0I/X5ZFgsmMiBXgDZof30F5ofc" crossorigin="anonymous"></script>
<script defer src="{% static 'js/remove-me.js' %}" integrity="sha384-6fHcFNoQ8QEI3ZDgw9Z/A6Brk64gF7AnFbLgdrumo8/kBbsKQ/wo7wPegj5WkzuG" crossorigin="anonymous"></script>
<script defer src="{% static 'js/hyperscript.min.js' %}" integrity="sha384-6GYN8BDHOJkkru6zcpGOUa//1mn+5iZ/MyT6mq34WFIpuOeLF52kSi721q0SsYF9" crossorigin="anonymous"></script>
2022-08-05 22:15:50 +00:00
<script src="{% static 'js/bulma-tagsinput.min.js' %}" integrity="sha384-GmnKCsPJIPPZbNVXpkGRmKdxOa0PQLnOM/hQLIHvMRERySuyvFqKGc76iHTGUY+d" crossorigin="anonymous"></script>
2022-08-09 06:20:30 +00:00
<script src="{% static 'js/jquery.min.js' %}"></script>
2022-08-28 10:48:32 +00:00
<script src="{% static 'js/gridstack-all.js' %}"></script>
2022-08-09 06:20:30 +00:00
<script>
document.addEventListener("restore-scroll", function(event) {
var scrollpos = localStorage.getItem('scrollpos');
if (scrollpos) {
window.scrollTo(0, scrollpos)
};
});
document.addEventListener("htmx:beforeSwap", function(event) {
localStorage.setItem('scrollpos', window.scrollY);
});
</script>
2022-07-21 12:49:01 +00:00
<script>
document.addEventListener('DOMContentLoaded', () => {
2022-07-21 12:47:31 +00:00
2022-07-21 12:49:01 +00:00
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Add a click event on each of them
$navbarBurgers.forEach( el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
});
</script>
2022-07-21 12:51:59 +00:00
<style>
.icon { border-bottom: 0px !important;}
2022-08-02 21:22:22 +00:00
.wrap {
2022-08-12 08:08:44 +00:00
/* white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
2022-08-12 08:08:44 +00:00
white-space: -o-pre-wrap; */
word-wrap: break-word;
2022-08-02 21:22:22 +00:00
}
.nowrap-parent {
white-space: nowrap;
}
.nowrap-child {
display: inline-block;
}
.slider-output {
width: 4rem !important;
}
2022-08-03 06:20:30 +00:00
.htmx-indicator{
opacity:0;
transition: opacity 500ms ease-in;
}
.htmx-request .htmx-indicator{
opacity:1
2022-08-03 06:20:30 +00:00
}
.htmx-request.htmx-indicator{
opacity:1
2022-08-03 06:20:30 +00:00
}
2022-08-09 06:20:30 +00:00
.dropdown-content {
height: 20em;
overflow: auto;
}
table.relays-table tr:nth-of-type(2n) td {
border-bottom: 3px solid grey;
}
2022-08-26 17:53:49 +00:00
.tooltiptext {
visibility: hidden;
background-color: black;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;
position: absolute;
z-index: 1;
}
.rounded-tooltip:hover .tooltiptext {
visibility: visible;
}
2022-08-28 10:48:32 +00:00
.ui-move {
background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMT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uOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K");
background-position-x: 50%;
background-position-y: 50%;
background-repeat: no-repeat;
bottom: 10px;
box-sizing: border-box;
color: rgb(74, 74, 74);
cursor: se-resize;
display: none;
filter: none;
font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 0.1px;
font-weight: 400;
height: 20px;
line-height: 0.15px;
position: absolute;
left: 10px;
text-rendering: optimizelegibility;
touch-action: none;
transform: matrix(0.707107, -0.707107, 0.707107, 0.707107, 0, 0);
user-select: none;
width: 20px;
z-index: 100
}
.grid-stack-item-content:hover .ui-move {
display: block;
color: red;
}
2022-07-21 12:51:59 +00:00
</style>
2022-07-21 12:46:05 +00:00
</head>
<body>
2022-07-21 12:49:01 +00:00
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="{% url 'home' %}">
<img src="{% static 'logo.svg' %}" width="112" height="28" alt="logo">
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="bar">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="bar" class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" href="{% url 'home' %}">
2022-08-02 21:22:22 +00:00
Search
</a>
2022-07-21 12:49:01 +00:00
{% if user.is_authenticated %}
<a class="navbar-item" href="{% url 'billing' %}">
Billing
</a>
{% endif %}
2022-07-21 21:22:20 +00:00
{% if user.is_superuser %}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
2022-07-29 21:42:04 +00:00
Threshold
2022-07-21 21:22:20 +00:00
</a>
<div class="navbar-dropdown">
2022-07-29 21:42:04 +00:00
<a class="navbar-item" href="{% url 'threshold_irc_overview' %}">
IRC
2022-07-21 21:22:20 +00:00
</a>
<a class="navbar-item" href="#">
2022-07-29 21:42:04 +00:00
Discord
2022-07-21 21:22:20 +00:00
</a>
</div>
</div>
{% endif %}
2022-07-21 12:49:01 +00:00
2022-08-26 20:03:21 +00:00
{% if perms.core.use_insights %}
<a class="navbar-item" href="{% url 'insights' %}">
Insights
</a>
2022-07-21 12:49:01 +00:00
{% endif %}
2022-08-05 07:40:35 +00:00
<a class="navbar-item add-button">
Install
</a>
2022-07-21 12:49:01 +00:00
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
{% if not user.is_authenticated %}
2022-08-03 06:20:30 +00:00
<a class="button is-info" href="{% url 'signup' %}">
2022-07-21 12:49:01 +00:00
<strong>Sign up</strong>
</a>
<a class="button is-light" href="{% url 'login' %}">
Log in
</a>
{% endif %}
{% if user.is_authenticated %}
<a class="button is-dark" href="{% url 'logout' %}">Logout</a>
{% endif %}
2022-07-21 12:47:31 +00:00
</div>
2022-07-21 12:46:05 +00:00
</div>
2022-07-21 12:45:28 +00:00
</div>
2022-07-21 12:46:05 +00:00
</div>
2022-07-21 12:49:01 +00:00
</nav>
2022-08-05 07:40:35 +00:00
<script>
let deferredPrompt;
const addBtn = document.querySelector('.add-button');
addBtn.style.display = 'none';
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent Chrome 67 and earlier from automatically showing the prompt
e.preventDefault();
// Stash the event so it can be triggered later.
deferredPrompt = e;
// Update UI to notify the user they can add to home screen
addBtn.style.display = 'block';
addBtn.addEventListener('click', (e) => {
// hide our user interface that shows our A2HS button
addBtn.style.display = 'none';
// Show the prompt
deferredPrompt.prompt();
// Wait for the user to respond to the prompt
deferredPrompt.userChoice.then((choiceResult) => {
if (choiceResult.outcome === 'accepted') {
console.log('User accepted the A2HS prompt');
} else {
console.log('User dismissed the A2HS prompt');
}
deferredPrompt = null;
});
});
});
</script>
2022-08-28 10:48:32 +00:00
{% block outer_content %}
{% endblock %}
2022-07-21 12:49:01 +00:00
<section class="section">
<div class="container">
{% block content %}
{% endblock %}
</div>
2022-07-21 12:45:28 +00:00
</section>
2022-07-21 12:46:05 +00:00
</body>
2022-07-21 12:45:28 +00:00
</html>