Initial commit

This commit is contained in:
Pascal Engélibert 2022-09-19 18:41:09 +02:00
commit 05cd190c53
Signed by: tuxmain
GPG key ID: 3504BC6D362F7DCA
155 changed files with 49378 additions and 0 deletions

View file

@ -0,0 +1 @@
<a class="anchor" href="#{{ id }}" aria-label="Anchor link" title="Anchor link">§</a>

16
templates/base.html Normal file
View file

@ -0,0 +1,16 @@
{% import "macros.html" as macros %}
<!doctype html>
<html lang="{{lang}}">
<head>
<meta charset="utf-8"/>
<title>{% block title %}{% endblock title %}</title>
<link rel="stylesheet" href="/css/style.css"/>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>
<link rel="alternate" type="application/atom+xml" title="Atom" href="/{{macros::langurl()}}atom.xml"/>
<meta name="viewport" content="width=device-width"/>
<meta name="author" content="Pascal Engélibert"/>
<link type="text/plain" rel="author" href="/humans.txt"/>
{% block head %}{% endblock head %}
</head>
<body>{% block body %}{% endblock body %}</body>
</html>

41
templates/blog.html Normal file
View file

@ -0,0 +1,41 @@
{% extends "base.html" %}
{% block title %}{{page.title}} &#8211; {{ config.extra.sitename|safe }}{% endblock title %}
{% block head %}
{% if page.extra.katex %}{{macros::katex()}}{% endif %}
{% endblock head %}
{% block body %}
<span id="breadcrumb">
{% for a in page.ancestors %}
{% set s = get_section(path=a) %}
<a href="{{s.permalink|safe}}">{{s.title}}</a>
{% if not loop.last %}&gt;{% endif %}
{% endfor %}
</span>
<br/>
<span id="langs">
{{lang}} &#8211;
{% for t in page.translations %}
{% if t.lang|default(value=config.default_language) != lang %}
<a href="{{t.permalink|safe}}">{{t.lang|default(value=config.default_language)}}</a>
{% endif %}
{% endfor %}
</span>
<h1>{{page.title | safe}}</h1>
<small>{{page.date}}</small><br/>
<small>{% for tag in page.taxonomies.tags %}<a href="/{{macros::langurl()}}tags/{{tag}}">{{tag}}</a>{% if not loop.last %}, {% endif %}{% endfor %}</small>
<main>
{{page.content | safe}}
</main>
<footer>
<hr/>
<a rel="author" href="https://toot.aquilenet.fr/@tuxmain" title="Mastodon" target="_blank" class="mastodon-logo"><img alt="Mastodon" src="/img/mastodon-purple.svg"/></a><br/>
<a rel="license" href="//creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>
</footer>
{% endblock body %}

25
templates/index.html Normal file
View file

@ -0,0 +1,25 @@
{% extends "base.html" %}
{% block title %}{{ config.extra.sitename|safe }}{% endblock title %}
{% block head %}
{% if section.extra.katex %}{{macros::katex()}}{% endif %}
{% endblock head %}
{% block body %}
<span id="langs">
{{lang}} &#8211;
{% for t in section.translations %}
{% if t.lang|default(value=config.default_language) != lang %}
<a href="{{t.permalink|safe}}">{{t.lang|default(value=config.default_language)}}</a>
{% endif %}
{% endfor %}
</span>
<h1>tuxmain</h1>
<main>
{{section.content | safe}}
</main>
{% endblock body %}

7
templates/macros.html Normal file
View file

@ -0,0 +1,7 @@
{%macro katex() %}
<link rel="stylesheet" href="/katex/katex.min.css"/>
<script defer src="/katex/katex.min.js"></script>
<script defer src="/katex/contrib/auto-render.min.js" onload="renderMathInElement(document.body);"></script>
{%endmacro katex %}
{%macro langurl() %}{% if lang != "en" %}{{lang}}/{% endif %}{%endmacro langurl %}

33
templates/page.html Normal file
View file

@ -0,0 +1,33 @@
{% extends "base.html" %}
{% block title %}{{page.title}} &#8211; {{ config.extra.sitename|safe }}{% endblock title %}
{% block head %}
{% if page.extra.katex %}{{macros::katex()}}{% endif %}
{% endblock head %}
{% block body %}
<span id="breadcrumb">
{% for a in page.ancestors %}
{% set s = get_section(path=a) %}
<a href="{{s.permalink|safe}}">{{s.title}}</a>
{% if not loop.last %}&gt;{% endif %}
{% endfor %}
</span>
<br/>
<span id="langs">
{{lang}} &#8211;
{% for t in page.translations %}
{% if t.lang|default(value=config.default_language) != lang %}
<a href="{{t.permalink|safe}}">{{t.lang|default(value=config.default_language)}}</a>
{% endif %}
{% endfor %}
</span>
<h1>{{page.title | safe}}</h1>
<main>
{{page.content | safe}}
</main>
{% endblock body %}

43
templates/section.html Normal file
View file

@ -0,0 +1,43 @@
{% extends "base.html" %}
{% block title %}{{section.title}} &#8211; {{ config.extra.sitename|safe }}{% endblock title %}
{% block head %}
{% if section.extra.katex %}{{macros::katex()}}{% endif %}
{% endblock head %}
{% block body %}
<span id="breadcrumb">
{% for a in section.ancestors %}
{% set s = get_section(path=a) %}
<a href="{{s.permalink|safe}}">{{s.title}}</a>
{% if not loop.last %}&gt;{% endif %}
{% endfor %}
</span>
<br/>
<span id="langs">
{{lang}} &#8211;
{% for t in section.translations %}
{% if t.lang|default(value=config.default_language) != lang %}
<a href="{{t.permalink|safe}}">{{t.lang|default(value=config.default_language)}}</a>
{% endif %}
{% endfor %}
</span>
<h1>{{section.title | safe}}</h1>
<main>
{{section.content | safe}}
</main>
<section class="article-list">
{% for page in section.pages %}
<article>
<h2 class="article-list_title"><a href="{{page.permalink|safe}}">{{page.title}}</a></h2>
<small>{{page.date}}</small>
<p>{{page.description|safe}}</p>
</article>
{% endfor %}
</section>
{% endblock body %}

View file

@ -0,0 +1 @@
<img class="float_img" alt="{{alt}}" src="{{src}}"{% if style %} style="{{style}}"{% endif %}/>

View file

@ -0,0 +1,7 @@
{% for page in section.pages %}
<article>
<h2 class="article-list_title"><a href="{{page.permalink|safe}}">{{page.title}}</a></h2>
<small>{{page.date}}</small>
<p>{{page.description|safe}}</p>
</article>
{% endfor %}

View file

@ -0,0 +1,6 @@
<div class="service_box">
<a class="service_box-link" href="{{href|safe}}">
{% if img %}<div class="service_box-img_wrap"><img class="service_box-img" src="{{img|safe}}" alt="{{img_alt}}"/></div>{% endif %}
<span class="service_box-title">{{title|safe}}</span>
</a>
</div>

20
templates/tags/list.html Normal file
View file

@ -0,0 +1,20 @@
{% extends "base.html" %}
{% block title %}{{taxonomy.name}} &#8211; {{ config.extra.sitename|safe }}{% endblock title %}
{% block head %}
{% if section.extra.katex %}{{macros::katex()}}{% endif %}
{% endblock head %}
{% block body %}
<a href="/{{macros::langurl()}}">{{lang}}</a>
<h1>{{taxonomy.name | safe}}</h1>
<section class="tag-list">
{% for tag in terms %}
<a href="{{ tag.path|safe }}">{{ tag.name }}</a> ({{ tag.pages | length }})<br/>
{% endfor %}
</section>
{% endblock body %}

View file

@ -0,0 +1,25 @@
{% extends "base.html" %}
{% block title %}{{term.name}} &#8211; {{ config.extra.sitename|safe }}{% endblock title %}
{% block head %}
{% if section.extra.katex %}{{macros::katex()}}{% endif %}
{% endblock head %}
{% block body %}
<span id="breadcrumb">
<a href="/{{macros::langurl()|safe}}">{{lang}}</a> &gt; <a href="/{{macros::langurl()|safe}}{{taxonomy.name}}">{{taxonomy.name}}</a>
</span>
<h1>{{term.name | safe}}</h1>
<section class="article-list">
{% for page in term.pages %}
<article>
<h2 class="article-list_title"><a href="{{page.permalink|safe}}">{{page.title}}</a></h2>
<small>{{page.date}}</small>
<p>{{page.description|safe}}</p>
</article>
{% endfor %}
</section>
{% endblock body %}