afg-website/templates/page.html

100 lines
3.4 KiB
HTML
Raw Permalink Normal View History

2024-05-11 13:51:37 +02:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="{{ get_url(path='css/normalize.css') }}">
<link rel="stylesheet" type="text/css" href="{{ get_url(path='css/redhat-text/redhat-text.css') }}">
2024-05-11 13:51:37 +02:00
<link rel="stylesheet" type="text/css" href="{{ get_url(path='js/photoswipe/photoswipe.css') }}">
2024-05-11 13:51:37 +02:00
{% block additional_css %}{% endblock %}
<link rel="stylesheet" type="text/css" href="{{ get_url(path='css/style.css') }}">
2024-05-11 13:51:37 +02:00
<link rel="alternate" type="application/rss+xml" title="RSS Feed for {{ config.title }}" href="{{ get_url(path='/rss.xml') }}" />
2024-05-11 13:51:37 +02:00
<script src="{{ get_url(path='/js/mathjax/tex-chtml-full.js') }}" id="MathJax-script" async></script>
2024-05-11 13:51:37 +02:00
<title>{% block title %}{{ config.title }} :: {{ page.title }}{% endblock title %}</title>
</head>
<body>
<header>
<img class="logo" src="{{ get_url(path='/images/logo.png') }}" />
2024-05-11 13:51:37 +02:00
<div class="text">
<div class="heading">{{ config.title }}</div>
<div class="subtext">{{ config.description }}</div>
</div>
</header>
{% block navigation %}
{% set top_section = get_section(path="_index.md", metadata_only=true) %}
<nav>
{% for subsec_path in top_section.subsections %}
{% set subsec = get_section(path=subsec_path) %}
{% if subsec.extra["menu_dropdown"] %}
<div class="dropdown">
<button class="dropbtn">{{subsec.title}} &#x2304;</button>
<div class="dropdown-content">
{% for subsec_page in subsec.pages %}
<a href="{{ get_url(path=subsec_page.path) }}">{{subsec_page.title}}</a>
2024-05-11 13:51:37 +02:00
{% endfor %}
</div>
</div>
{% else %}
{%if subsec.pages | length == 1 %}
<a href="{{ get_url(path=subsec.pages[0].path) }}">{{subsec.title}}</a>
{% else %}
<a href="{{ get_url(path=subsec.path) }}">{{subsec.title}}</a>
{% endif %}
2024-05-11 13:51:37 +02:00
{% endif %}
{% endfor %}
<a href="javascript:void(0);" style="font-size:15px;" class="icon" onclick="expandHamburger()">&#9776;</a>
</nav>
{% endblock navigation %}
{% block content %}
<main>
<h1>{{page.title}}</h1>
{{page.content | safe}}
{%- if page.extra.masto_instance -%}
{% include "masto-comments.html" %}
{%- endif -%}
<hr></hr>
<small>
Published: {{page.date | date(format="%d.%m.%Y %H:%M")}}
{% if page.updated %}
Updated: {{page.updated | date(format="%d.%m.%Y %H:%M")}}
{% endif %}
</small>
<br/>
<br/>
</main>
{% endblock content %}
<script>
function expandHamburger() {
var x = document.getElementsByTagName("nav")[0];
if (x.className === "") {
x.className += "responsive";
} else {
x.className = "";
}
}
</script>
<script type="module">
import PhotoSwipeLightbox from '{{ get_url(path="/js/photoswipe/photoswipe-lightbox.esm.min.js") }}';
2024-05-11 13:51:37 +02:00
const options = {
gallery: 'main .lightbox',
pswpModule: () => import('{{ get_url(path="/js/photoswipe/photoswipe.esm.min.js") }}')
2024-05-11 13:51:37 +02:00
};
const lightbox = new PhotoSwipeLightbox(options);
lightbox.init();
</script>
</body>
</html>