189 lines
6.4 KiB
HTML
189 lines
6.4 KiB
HTML
{% load static %}
|
|
{% load has_plan %}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en-GB">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Pathogen - {{ request.path_info }}</title>
|
|
<link rel="shortcut icon" href="{% static 'favicon.ico' %}">
|
|
<link rel="manifest" href="{% static 'manifest.webmanifest' %}">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@creativebulma/bulma-tooltip@1.2.0/dist/bulma-tooltip.min.css">
|
|
<link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.1.1/css/all.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma-slider@2.0.5/dist/css/bulma-slider.min.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/bulma-slider@2.0.5/dist/js/bulma-slider.min.js"></script>
|
|
<script src="https://unpkg.com/htmx.org@1.8.0" integrity="sha384-cZuAZ+ZbwkNRnrKi05G/fjBX+azI9DNOkNYysZ0I/X5ZFgsmMiBXgDZof30F5ofc" crossorigin="anonymous"></script>
|
|
<script src="https://unpkg.com/htmx.org@1.8.0/dist/ext/remove-me.js"></script>
|
|
<script src="https://unpkg.com/hyperscript.org@0.9.7"></script>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
// 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>
|
|
<style>
|
|
.icon { border-bottom: 0px !important;}
|
|
.wrap {
|
|
white-space: pre-wrap; /* CSS3 */
|
|
white-space: -moz-pre-wrap; /* Firefox */
|
|
white-space: -pre-wrap; /* Opera <7 */
|
|
white-space: -o-pre-wrap; /* Opera 7 */
|
|
word-wrap: break-word; /* IE */
|
|
}
|
|
.nowrap-parent {
|
|
white-space: nowrap;
|
|
}
|
|
.nowrap-child {
|
|
display: inline-block;
|
|
}
|
|
.slider-output {
|
|
width: 4rem !important;
|
|
}
|
|
.htmx-indicator{
|
|
opacity:0;
|
|
transition: opacity 500ms ease-in;
|
|
}
|
|
.htmx-request .htmx-indicator{
|
|
opacity:1
|
|
}
|
|
.htmx-request.htmx-indicator{
|
|
opacity:1
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<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' %}">
|
|
Search
|
|
</a>
|
|
<a class="navbar-item" href="{% url 'about' %}">
|
|
About
|
|
</a>
|
|
{% if user.is_authenticated %}
|
|
<a class="navbar-item" href="{% url 'billing' %}">
|
|
Billing
|
|
</a>
|
|
{% endif %}
|
|
{% if user.is_superuser %}
|
|
<div class="navbar-item has-dropdown is-hoverable">
|
|
<a class="navbar-link">
|
|
Threshold
|
|
</a>
|
|
|
|
<div class="navbar-dropdown">
|
|
<a class="navbar-item" href="{% url 'threshold_irc_overview' %}">
|
|
IRC
|
|
</a>
|
|
<a class="navbar-item" href="#">
|
|
Discord
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if user.is_authenticated %}
|
|
{% if user|has_plan:'drilldown' %}
|
|
<a class="navbar-item" href="{% url 'insights' %}">
|
|
Insights
|
|
</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
<a class="navbar-item add-button">
|
|
Install
|
|
</a>
|
|
</div>
|
|
|
|
<div class="navbar-end">
|
|
<div class="navbar-item">
|
|
<div class="buttons">
|
|
{% if not user.is_authenticated %}
|
|
<a class="button is-info" href="{% url 'signup' %}">
|
|
<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 %}
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<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>
|
|
<section class="section">
|
|
<div class="container">
|
|
{% block content %}
|
|
{% endblock %}
|
|
</div>
|
|
</section>
|
|
</body>
|
|
</html>
|