[Jinja2] init
This commit is contained in:
65
template/base.html
Normal file
65
template/base.html
Normal file
@@ -0,0 +1,65 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ lang }}">
|
||||
<head>
|
||||
<script>
|
||||
(function () {
|
||||
const theme = localStorage.getItem("theme");
|
||||
const prefersDark = window.matchMedia(
|
||||
"(prefers-color-scheme: dark)",
|
||||
).matches;
|
||||
if (theme === "dark" || (!theme && prefersDark))
|
||||
document.documentElement.classList.add("dark");
|
||||
})();
|
||||
</script>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<link rel="stylesheet" href="/styles/reset.css" />
|
||||
<link rel="stylesheet" href="/styles/style.css" />
|
||||
{% block extra_styles %}{% endblock %}
|
||||
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon" />
|
||||
<script src="/scripts/main.js"></script>
|
||||
<title>{{ title }} Decentrala</title>
|
||||
<link rel="alternate" hreflang="sr" href="{{ sr_link }}" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a id="logo" href="/{{ '/en/' if lang == 'en' else '' }}index">
|
||||
<img src="/img/logo-{{ 'dark' if is_dark else 'light' }}.svg" alt="Logo" /> Decentrala
|
||||
</a>
|
||||
<button id="theme-switcher"></button>
|
||||
<a class="lang" hreflang="sr" href="{{ sr_link }}">SR</a>
|
||||
</header>
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<footer>
|
||||
<button class="hamburger closed">
|
||||
<img src="/img/strelica-closed-{{ 'dark' if is_dark else 'light' }}.svg" alt="Menu" />
|
||||
</button>
|
||||
<nav class="menu">
|
||||
{% set base_path = '/en/' if lang == 'en' else '/' %}
|
||||
<a href="{{ base_path }}events">{{ 'Događaji' if lang == 'sr' else 'Events' }}</a>
|
||||
<a href="{{ base_path }}services">{{ 'Servisi' if lang == 'sr' else 'Services' }}</a>
|
||||
<a href="{{ base_path }}statute">{{ 'Statut' if lang == 'sr' else 'Statute' }}</a>
|
||||
<a href="{{ base_path }}about">{{ 'O nama' if lang == 'sr' else 'About us' }}</a>
|
||||
<a href="{{ base_path }}account">{{ 'Nalog' if lang == 'sr' else 'Account' }}</a>
|
||||
<a href="{{ base_path }}support">{{ 'Podrška' if lang == 'sr' else 'Support' }}</a>
|
||||
</nav>
|
||||
<span class="links">
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
|
||||
<img src="/img/cc-{{ 'dark' if is_dark else 'light' }}.svg" alt="CreativeCommons" />
|
||||
</a>
|
||||
<a href="{{ base_path }}webring">
|
||||
<img src="/img/w-{{ 'dark' if is_dark else 'light' }}.svg" alt="Webring" />
|
||||
</a>
|
||||
<a href="https://gitea.dmz.rs/Decentrala/website">
|
||||
<img src="/img/git-{{ 'dark' if is_dark else 'light' }}.svg" alt="SourceCode" />
|
||||
</a>
|
||||
<a href="https://balkan.fedive.rs/@decentrala">
|
||||
<img src="/img/mastodon-{{ 'dark' if is_dark else 'light' }}.svg" alt="Mastodon" />
|
||||
</a>
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user