first commit

This commit is contained in:
OniriCorpe 2024-06-20 04:55:27 +02:00
commit 8298c15349
93 changed files with 2886 additions and 0 deletions

35
templates/404.html Normal file
View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include "head.html" %}
</head>
<body>
<header>
{% if config.extra.header_nav %}
<nav id="nav-bar">
{% for nav_item in config.extra.header_nav %}
<a href="{{ nav_item.url }}" class="">
{{ nav_item["name_en"] }}
</a>
{% endfor %}
<div>
<input type="checkbox" id="theme-toggle" style="display: none;">
<label for="theme-toggle" id="theme-toggle-label"><svg id="theme-icon" class="icons"><use href="{{ get_url(path='/icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></label>
<audio id="theme-sound">
<source src="{{ get_url(path='click.ogg', trailing_slash=false) | safe }}" type="audio/ogg">
</audio>
</div>
</nav>
{% endif %}
</header>
<main>
{% block content %}
<h1>{{ trans(key="404-title", lang=lang) }}</h1>
<p>{{ trans(key="404-text", lang=lang) }}</p>
{% endblock content %}
</main>
<footer>
{% include "footer.html" %}
</footer>
</body>
</html>

20
templates/LICENSE Normal file
View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2023 Speyll Lyes
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

18
templates/base.html Normal file
View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="{% if page %}{{ page.extra.lang | default (value=page.lang) }}{% else %}{{ config.default_language }}{% endif %}">
<head>
{% include "head.html" %}
</head>
<body>
<header>
{% include "header.html" %}
</header>
<main>
{% block content %}
{% endblock content %}
</main>
<footer>
{% include "footer.html" %}
</footer>
</body>
</html>

69
templates/blog-page.html Normal file
View file

@ -0,0 +1,69 @@
{% extends "base.html" %}
{% block content %}
<div><a href="..">..</a>/<span class="accent-data">{{ page.slug }}</span></div>
{% set lang = page.extra.lang | default (value=page.lang) %}
{% if lang == "fr" %}
{% set date_locale = "fr_FR" %}
{% else %}
{% set date_locale = "en_GB" %}
{% endif %}
<time datetime="{{ page.date }}">{{ trans(key="published-on", lang=lang) }} <span class="accent-data">{{ page.date | date(format="%d %B %Y", locale=date_locale) }}</span></time>
{% if page.authors %}
<address rel="author">{{ trans(key="published-by", lang=lang) }} <span class="accent-data">
{% if page.authors | length > 0 %}
{% for author in page.authors %}
{% if loop.last %}
{{ author }}
{% else %}
{{ author ~ ", " }}
{% endif %}
{% endfor %}
{% endif %}
</span></address>
{% elif config.extra.author and config.extra.display_author == true %}
<address rel="author">{{ trans(key="published-by", lang=lang) }} <span class="accent-data">{{config.extra.author}}</span></address>
{% endif %}
{% if page.extra.license %}
<div>{{ trans(key="license", lang=lang) }} {{page.extra.license | safe}}</div>
{% endif %}
<h1>{{ page.title }}</h1>
{% if page.toc and page.extra.toc %}
<h2>{{ trans(key="table-of-contents", lang=lang) }}</h2>
<ul>
{% for h1 in page.toc %}
<li>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %}
<ul>
{% for h2 in h1.children %}
<li>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
<ul>
{% for h3 in h2.children %}
<li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{{ page.content | safe }}
<p class="tags-data">
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
<a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a>
{% endfor %}
{% endif %}
</p>
{% endblock content %}

21
templates/footer.html Normal file
View file

@ -0,0 +1,21 @@
<hr>
<div id="footer-container">
{% if config.extra.footer_content_license %}
<div><p>
{% set default_license_text = "Except otherwise noted, contents are my own and licensed under" %}
{{ trans(key="license-text", lang=lang) | default (value=default_license_text) }}
<a target="_blank" rel="noopener noreferrer" href="{{config.extra.footer_content_license_link}}">{{config.extra.footer_content_license}}</a>
</p></div>
{% endif %}
<div>
<p>
{% set default_credit_text = "Theme and color theme licensed under <a target='_blank' rel='noopener noreferrer' href='https://en.wikipedia.org/wiki/Licence_MIT'>MIT</a>.<br> Built using <a target='_blank' rel='noopener noreferrer' href='https://www.getzola.org'>Zola</a>, <a target='_blank' rel='noopener noreferrer' href='https://github.com/Speyll/anemone'>anemone</a> theme, <a target='_blank' rel='noopener noreferrer' href='https://speyll.github.io/suCSS/'>suCSS</a> framework &amp; <a target='_blank' rel='noopener noreferrer' href='https://github.com/Speyll/veqev'>veqev</a>.<br> The theme has been customized to my needs and preferences. <a target='_blank' rel='noopener noreferrer' href='https://codeberg.org/OniriCorpe/log'>Sources here.</a><br>" %}
{{ trans(key="credit-text", lang=lang) | default (value=default_credit_text) | safe }}
</p>
</div>
{% if config.generate_feed %}
<div>
<a class="no-style" target="_blank" rel="noopener noreferrer" href="{{ get_url(path="atom.xml", trailing_slash=false) }}" title="RSS"><svg class="icons"><use href="{{ get_url(path='icons.svg#rss', trailing_slash=false) | safe }}"></use></svg></a>
</div>
{% endif %}
</div>

98
templates/head.html Normal file
View file

@ -0,0 +1,98 @@
<meta charset="UTF-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="robots" content="index, follow">
{% if page.title %}
{% set title = page.title %}
{% elif section.title %}
{% set title = section.title %}
{% elif config.title %}
{% set title = config.title %}
{% endif %}
{% if page.extra.author %}
{% set author = page.extra.author %}
{% elif section.extra.author %}
{% set author = section.extra.author %}
{% elif config.extra.author %}
{% set author = config.extra.author %}
{% endif %}
{% if page.description %}
{% set description = page.description | truncate(length=150) %}
{% elif section.description %}
{% set description = section.description | truncate(length=150) %}
{% elif config.description %}
{% set description = config.description | truncate(length=150) %}
{% endif %}
{% if page.extra.image %}
{% set image = get_url(path=page.extra.image, trailing_slash=false) %}
{% elif section.extra.image %}
{% set image = get_url(path=section.extra.image, trailing_slash=false) %}
{% elif config.extra.favicon %}
{% set image = get_url(path=config.extra.favicon, trailing_slash=false) %}
{% endif %}
{% if page.permalink %}
{% set url = page.permalink %}
{% elif section.permalink %}
{% set url = section.permalink %}
{% elif config.base_url %}
{% set url = config.base_url %}
{% endif %}
{% if title %}
<title>{{ title }}</title>
{% endif %}
{% block metatags %}
{% if title %}
<meta name="title" content="{{ title }}">
{% endif %}
{% if author %}
<meta name="author" content="{{ author }}">
{% endif %}
{% if description %}
<meta name="description" content="{{ description }}">
{% endif %}
<meta property="og:type" content="website">
<meta property="og:url" content="{{ url | safe }}">
{% if title %}
<meta property="og:site_name" content="{{ config.title }}">
{% endif %}
{% if title %}
<meta property="og:title" content="{{ title }}">
{% endif %}
{% if description %}
<meta property="og:description" content="{{ description }}">
{% endif %}
{% if image %}
<meta property="og:image" content="{{ image }}">
{% endif %}
{% set twitter_card = config.extra.twitter_card | default(value=true) %}
{% if twitter_card != false %}
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="{{ url | safe }}">
{% if title %}
<meta property="twitter:title" content="{{ title }}">
{% endif %}
{% if description %}
<meta property="twitter:description" content="{{ description }}">
{% endif %}
{% if image %}
<meta property="twitter:image" content="{{ image }}">
{% endif %}
{% endif %}
<link rel="canonical" href="{{ url | safe }}">
{% if image %}
<link rel="shortcut icon" type="image/x-icon" href="{{ get_url(path=config.extra.favicon, trailing_slash=false) }}">
{% endif %}
{% endblock metatags %}
{% if config.generate_feed %}
{% block feed %}
<link rel="alternate" type="application/atom+xml" title="RSS" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
{% endblock feed %}
{% endif %}
{% block css %}
<link rel="stylesheet" type="text/css" href="https://speyll.github.io/suCSS/reset-min.css"/>
<link rel="stylesheet" type="text/css" href="https://speyll.github.io/suCSS/suCSS-min.css"/>
<link rel="stylesheet" type="text/css" href="{{ get_url(path='css/style.css', trailing_slash=false) | safe }}"/>
<link rel="stylesheet" type="text/css" href="{{ get_url(path='css/custom-style.css', trailing_slash=false) | safe }}"/>
{% endblock css %}
<script src="{{ get_url(path='js/script.js', trailing_slash=false) | safe }}" defer></script>

23
templates/header.html Normal file
View file

@ -0,0 +1,23 @@
{% set current_lang = config.default_language %}
{% if page %}
{% set current_lang = page.extra.lang | default (value=page.lang) %}
{% elif section %}
{% set current_lang = section.lang %}
{% endif %}
{% if config.extra.header_nav %}
<nav id="nav-bar">
{% for nav_item in config.extra.header_nav %}
<a href="{{ nav_item.url }}" class="{% if nav_item.url == current_url %}active{% endif %}">
{% set language_key = 'name_' ~ current_lang %}
{{ nav_item[language_key] }}
</a>
{% endfor %}
<div>
<input type="checkbox" id="theme-toggle" style="display: none;">
<label for="theme-toggle" id="theme-toggle-label"><svg id="theme-icon" class="icons"><use href="{{ get_url(path='/icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></label>
<audio id="theme-sound">
<source src="{{ get_url(path='click.ogg', trailing_slash=false) | safe }}" type="audio/ogg">
</audio>
</div>
</nav>
{% endif %}

View file

@ -0,0 +1,27 @@
{% extends "base.html" %}
{%- block content -%}
<h1>{{ section.title }}</h1>
{{ section.content | safe }}
{% for sect in section.extra.sections %}
{%- set section = get_section(path=sect ~ "/_index.md") %}
{%- if section.pages | length > 0 -%}
<ul class="title-list">
<h2>{{ section.title }}</h2>
{%- for page in section.pages %}
{%- if loop.index <= 5 %}
<li>
<a href="{{ page.permalink | safe }}">{{ page.date ~ "// " ~ page.title }}</a>
</li>
{%- else -%}
<a href="{{ section.permalink | safe }}">{{ trans(key="read-more", lang=lang) | default (value="📄 See the complete list...") }}</a>
{% break %}
{%- endif %}
{%- endfor %}
</ul>
{% endif -%}
{% endfor -%}
{% endblock content %}

3
templates/robots.txt Normal file
View file

@ -0,0 +1,3 @@
User-agent: *
Disallow: /
Sitemap: {{ get_url(path="sitemap.xml") }}

25
templates/section.html Normal file
View file

@ -0,0 +1,25 @@
{% extends "base.html" %}
{% block content %}
<h1>{{ section.title }}</h1>
{{ section.content | safe }}
{% if paginator %}
{% set pages = paginator.pages %}
{% else %}
{% set pages = section.pages %}
{% endif %}
<ul class="title-list">
{% for page in pages %}
<li>
<a href="{{ page.permalink | safe }}">{{ page.date ~ "// " ~ page.title }}</a>
</li>
{% endfor %}
</ul>
{% if paginator %}
<div class="accent-data">{% if paginator.previous %}<a href="{{ paginator.first }}"></a> &nbsp <a href="{{ paginator.previous }}"><</a>{% endif %} &nbsp {{ paginator.current_index }} / {{ paginator.number_pagers }} &nbsp {% if paginator.next %}<a href="{{ paginator.next }}">></a> &nbsp <a href="{{ paginator.last }}"></a>{% endif %}</div>
{% endif %}
{% endblock content %}