95 lines
3.0 KiB
HTML
95 lines
3.0 KiB
HTML
<!DOCTYPE html>
|
|
{% load static i18n %}
|
|
|
|
<html lang="pl" dir="ltr" data-theme="light">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<meta name="author" content="Nikola Kubiczek" />
|
|
|
|
<title>eParafia</title>
|
|
<base href="/" />
|
|
|
|
{% block head %}
|
|
|
|
{% endblock %}
|
|
|
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
<meta name="x5-page-mode" content="app" />
|
|
<meta name="browsermode" content="application" />
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css" />
|
|
{% comment %} <link rel="stylesheet" href="/background.css" /> {% endcomment %}
|
|
<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')
|
|
})
|
|
})
|
|
|
|
// main.js
|
|
|
|
let installPrompt = null
|
|
const installButton = document.querySelector('#install')
|
|
|
|
window.addEventListener('beforeinstallprompt', (event) => {
|
|
event.preventDefault()
|
|
installPrompt = event
|
|
installButton.classList.remove('is-hidden')
|
|
})
|
|
|
|
installButton.addEventListener('click', async () => {
|
|
if (!installPrompt) {
|
|
return
|
|
}
|
|
const result = await installPrompt.prompt()
|
|
console.log(`Install prompt was: ${result.outcome}`)
|
|
disableInAppInstallPrompt()
|
|
})
|
|
|
|
function disableInAppInstallPrompt() {
|
|
installPrompt = null
|
|
installButton.classList.add('is-hidden')
|
|
}
|
|
|
|
window.addEventListener('appinstalled', disableInAppInstallPrompt)
|
|
})
|
|
</script>
|
|
<style>
|
|
.navbar-link.is-active,
|
|
a.navbar-item.is-active {
|
|
color: #0a0a0a;
|
|
}
|
|
.navbar-link.is-active:not(:focus):not(:hover),
|
|
a.navbar-item.is-active:not(:focus):not(:hover) {
|
|
background-color: initial;
|
|
}
|
|
.navbar-item.has-dropdown.is-active .navbar-link,
|
|
.navbar-item.has-dropdown:focus .navbar-link,
|
|
.navbar-item.has-dropdown:hover .navbar-link {
|
|
background-color: #fafafa;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="container section">
|
|
{% block layout %}
|
|
<main class="section container">
|
|
{% block content %}
|
|
{% endblock %}
|
|
</main>
|
|
{% endblock %}
|
|
</body>
|
|
</html>
|