chore: retab

This commit is contained in:
zaaarf 2023-12-26 01:11:47 +01:00
parent e7a6b86ee5
commit fcdb60212d
No known key found for this signature in database
GPG key ID: 102E445F4C3F829B
10 changed files with 118 additions and 122 deletions

View file

@ -1,15 +1,15 @@
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
{% if page.toc and page.extra.toc %} {% if page.toc and page.extra.toc %}
{% include "toc.html" %} {% include "toc.html" %}
{% endif %} {% endif %}
{{ page.content | safe }} {{ page.content | safe }}
<p class="tagsData"> <p class="tagsData">
{% if page.taxonomies.tags %} {% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %} {% for tag in page.taxonomies.tags %}
<a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a> <a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</p> </p>

View file

@ -4,11 +4,9 @@
<div><a href="..">..</a>/<span class="metaData">{{ page.slug }}</span></div> <div><a href="..">..</a>/<span class="metaData">{{ page.slug }}</span></div>
<time datetime="{{ page.date }}">Published on: <span class="metaData">{{ page.date }}</span></time> <time datetime="{{ page.date }}">Published on: <span class="metaData">{{ page.date }}</span></time>
{% if config.extra.author and config.extra.display_author == true %} {% if config.extra.author and config.extra.display_author == true %}
<address rel="author">By <span class="metaData">{{config.extra.author}}</span></address> <address rel="author">By <span class="metaData">{{config.extra.author}}</span></address>
{% endif %} {% endif %}
<article> <article>{% include "base-page.html" %}</article>
{% include "base-page.html" %}
</article>
{% endblock content %} {% endblock content %}

View file

@ -1,13 +1,13 @@
<hr> <hr>
<div class=footContainer> <div class=footContainer>
<div class="footLeft"> <div class="footLeft">
<p>Licensed under the <a target="_blank" rel="noopener noreferrer" href="https://en.wikipedia.org/wiki/MIT_License">MIT License</a>.<br> <p>Licensed under the <a target="_blank" rel="noopener noreferrer" href="https://en.wikipedia.org/wiki/MIT_License">MIT License</a>.<br>
Built with <a target="_blank" rel="noopener noreferrer" href="https://www.getzola.org">Zola</a> combining the <a target="_blank" rel="noopener noreferrer" href="https://github.com/Speyll/anemone">anemone</a> and <a href="https://github.com/rhazdon/hugo-theme-hello-friend-ng/">hello-friend-ng</a> themes.<br> Built with <a target="_blank" rel="noopener noreferrer" href="https://www.getzola.org">Zola</a> combining the <a target="_blank" rel="noopener noreferrer" href="https://github.com/Speyll/anemone">anemone</a> and <a href="https://github.com/rhazdon/hugo-theme-hello-friend-ng/">hello-friend-ng</a> themes.<br>
</p> </p>
</div> </div>
{% if config.generate_feed %} {% if config.generate_feed %}
<div class="footRight"> <div class="footRight">
<a class="icons__background" target="_blank" rel="noopener noreferrer" href="{{ get_url(path="atom.xml", trailing_slash=false) }}" title="Subscribe via RSS for updates."><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#rss', trailing_slash=false) | safe }}"></use></svg></a> <a class="icons__background" target="_blank" rel="noopener noreferrer" href="{{ get_url(path="atom.xml", trailing_slash=false) }}" title="Subscribe via RSS for updates."><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#rss', trailing_slash=false) | safe }}"></use></svg></a>
</div> </div>
{% endif %} {% endif %}
</div> </div>

View file

@ -119,23 +119,23 @@
{% endblock css %} {% endblock css %}
<script> <script>
const setTheme = (theme) => { const setTheme = (theme) => {
document.documentElement.className = theme; document.documentElement.className = theme;
localStorage.setItem('theme', theme); localStorage.setItem('theme', theme);
} }
const hasCodeRun = localStorage.getItem('hasCodeRun'); const hasCodeRun = localStorage.getItem('hasCodeRun');
if (!hasCodeRun) { if (!hasCodeRun) {
const defaultTheme = "{{ config.extra.default_theme }}"; const defaultTheme = "{{ config.extra.default_theme }}";
setTheme(defaultTheme); setTheme(defaultTheme);
localStorage.setItem('hasCodeRun', 'true'); localStorage.setItem('hasCodeRun', 'true');
} }
const getTheme = () => { const getTheme = () => {
const theme = localStorage.getItem('theme'); const theme = localStorage.getItem('theme');
if (theme) { if (theme) {
setTheme(theme); setTheme(theme);
} }
} }
getTheme(); getTheme();

View file

@ -1,28 +1,28 @@
{% set current_lang = config.default_language %} {% set current_lang = config.default_language %}
{% if page %} {% if page %}
{% set current_lang = page.lang %} {% set current_lang = page.lang %}
{% elif section %} {% elif section %}
{% set current_lang = section.lang %} {% set current_lang = section.lang %}
{% endif %} {% endif %}
{% if config.extra.header_nav %} {% if config.extra.header_nav %}
<nav class="navBar"> <nav class="navBar">
{% include "logo.html" %} {% include "logo.html" %}
<div class="themeButton"> <div class="themeButton">
{% if not config.extra.default_theme %} {% if not config.extra.default_theme %}
<button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button>
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button>
{% elif config.extra.default_theme and config.extra.default_theme == "light" %} {% elif config.extra.default_theme and config.extra.default_theme == "light" %}
<button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"> <use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"> <use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button>
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button>
{% elif config.extra.default_theme and config.extra.default_theme == "dark" %} {% elif config.extra.default_theme and config.extra.default_theme == "dark" %}
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button>
<button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button>
{% endif %} {% endif %}
</div> </div>
<div class="navBarRight"> <div class="navBarRight">
{% for nav_item in config.extra.header_nav %} {% for nav_item in config.extra.header_nav %}
<a href="{{ nav_item.url }}" class="{% if current_url and nav_item.url == current_url %}active{% endif %}">{% set language_key = 'name_' ~ current_lang %}{{ nav_item[language_key] }}</a> <a href="{{ nav_item.url }}" class="{% if current_url and nav_item.url == current_url %}active{% endif %}">{% set language_key = 'name_' ~ current_lang %}{{ nav_item[language_key] }}</a>
{% endfor %} {% endfor %}
</div> </div>
</nav> </nav>
{% endif %} {% endif %}

View file

@ -2,25 +2,25 @@
{% block content %} {% block content %}
<div class="homeContainer"><div class="home"> <div class="homeContainer"><div class="home">
{% if config.extra.home_title %} {% if config.extra.home_title %}
<h1>{{ config.extra.home_title }}</h1> <h1>{{ config.extra.home_title }}</h1>
{% else %} {% else %}
<h1>{{ config.title }}</h1> <h1>{{ config.title }}</h1>
{% endif %} {% endif %}
{% if config.extra.home_subtitle %} {% if config.extra.home_subtitle %}
<p>{{ config.extra.home_subtitle }}<span id="subtitleRand"></span></p> <p>{{ config.extra.home_subtitle }}<span id="subtitleRand"></span></p>
{% elif config.description %} {% elif config.description %}
<p>{{ config.description }}<span id="subtitleRand"></span></p> <p>{{ config.description }}<span id="subtitleRand"></span></p>
{% endif %} {% endif %}
{% include "svg.html" %} {% include "svg.html" %}
</div></div> </div></div>
{% if config.extra.home_subtitle_suffixes %} {% if config.extra.home_subtitle_suffixes %}
<script> <script>
const suffixes = [ const suffixes = [
{% for s in config.extra.home_subtitle_suffixes %} {% for s in config.extra.home_subtitle_suffixes %}
"{{ s }}", "{{ s }}",
{% endfor %} {% endfor %}
] ]
var current = suffixes[Math.floor(Math.random() * suffixes.length)]; var current = suffixes[Math.floor(Math.random() * suffixes.length)];
var span = document.getElementById("subtitleRand"); var span = document.getElementById("subtitleRand");

View file

@ -1,29 +1,29 @@
<a href="{% if config.extra.logo.url %}{{ config.extra.logo.url }}{% else %}{{ config.base_url }}{% endif %}" style="text-decoration: none; float: left;"> <a href="{% if config.extra.logo.url %}{{ config.extra.logo.url }}{% else %}{{ config.base_url }}{% endif %}" style="text-decoration: none; float: left;">
<div class="logo"> <div class="logo">
{% if config.extra.logo.path %} {% if config.extra.logo.path %}
<img src="{{ config.extra.logo.path }}" <img src="{{ config.extra.logo.path }}"
{% if config.extra.logo.alt %} {% if config.extra.logo.alt %}
alt="{{ config.extra.logo.alt }}" alt="{{ config.extra.logo.alt }}"
{% endif %} {% endif %}
/> />
{% else %} {% else %}
<span class="logo__text"> <span class="logo__text">
{% if config.extra.logo.text %}{{ config.extra.logo.text }}{% else %}home{% endif %} {% if config.extra.logo.text %}{{ config.extra.logo.text }}{% else %}home{% endif %}
</span> </span>
<span class="logo__cursor" style=" <span class="logo__cursor" style="
{% if config.extra.logo.cursor.enabled %} {% if config.extra.logo.cursor.enabled %}
{% if config.extra.logo.cursor.enabled != true %} {% if config.extra.logo.cursor.enabled != true %}
visibility: hidden; visibility: hidden;
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if config.extra.logo.cursor.color %} {% if config.extra.logo.cursor.color %}
background-color: {{ config.extra.logo.cursor.color }}; background-color: {{ config.extra.logo.cursor.color }};
{% endif %} {% endif %}
{% if config.extra.logo.cursor.animate %} {% if config.extra.logo.cursor.animate %}
animation-duration: {{ config.extra.logo.cursor.animate }}; animation-duration: {{ config.extra.logo.cursor.animate }};
{% endif %} {% endif %}
"> ">
</span> </span>
{% endif %} {% endif %}
</div> </div>
</a> </a>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
{% include "base-page.html" %} {% include "base-page.html" %}
{% endblock content %} {% endblock content %}

View file

@ -6,20 +6,18 @@
{{ section.content | safe }} {{ section.content | safe }}
{% if paginator %} {% if paginator %}
{% set pages = paginator.pages %} {% set pages = paginator.pages %}
{% else %} {% else %}
{% set pages = section.pages %} {% set pages = section.pages %}
{% endif %} {% endif %}
<ul class="titleList"> <ul class="titleList">
{% for page in pages %} {% for page in pages %}
<li> <li><a href="{{ page.permalink | safe }}">{{ page.title }}{% if config.extra.show_date_paginator and config.extra.show_date_paginator == true %}<span class="contentDate"> @ {{ page.date }}</span>{% endif %}</a></li>
<a href="{{ page.permalink | safe }}">{{ page.title }}{% if config.extra.show_date_paginator and config.extra.show_date_paginator == true %}<span class="contentDate"> @ {{ page.date }}</span>{% endif %}</a> {% endfor %}
</li>
{% endfor %}
</ul> </ul>
{% if paginator %} {% if paginator %}
<div class="metaData">{% 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> <div class="metaData">{% 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 %} {% endif %}
{% endblock content %} {% endblock content %}

View file

@ -1,26 +1,26 @@
<div class="toc"> <div class="toc">
<h2>Table of contents</h2> <h2>Table of contents</h2>
<ul> <ul>
{% for h1 in page.toc %} {% for h1 in page.toc %}
<li> <li>
<a href="{{ h1.permalink | safe }}">{{ h1.title }}</a> <a href="{{ h1.permalink | safe }}">{{ h1.title }}</a>
{% if h1.children %} {% if h1.children %}
<ul> <ul>
{% for h2 in h1.children %} {% for h2 in h1.children %}
<li> <li>
<a href="{{ h2.permalink | safe }}">{{ h2.title }}</a> <a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
<ul> <ul>
{% for h3 in h2.children %} {% for h3 in h2.children %}
<li> <li>
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a> <a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>