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>
{% if page.toc and page.extra.toc %}
{% include "toc.html" %}
{% include "toc.html" %}
{% endif %}
{{ page.content | safe }}
<p class="tagsData">
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
<a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a>
{% endfor %}
{% endif %}
{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
<a href="/tags/{{ tag | slugify }}">&#47;{{ tag }}&#47;</a>
{% endfor %}
{% endif %}
</p>

View file

@ -4,11 +4,9 @@
<div><a href="..">..</a>/<span class="metaData">{{ page.slug }}</span></div>
<time datetime="{{ page.date }}">Published on: <span class="metaData">{{ page.date }}</span></time>
{% 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 %}
<article>
{% include "base-page.html" %}
</article>
<article>{% include "base-page.html" %}</article>
{% endblock content %}

View file

@ -1,13 +1,13 @@
<hr>
<div class=footContainer>
<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>
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>
</div>
{% if config.generate_feed %}
<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>
</div>
{% endif %}
<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>
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>
</div>
{% if config.generate_feed %}
<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>
</div>
{% endif %}
</div>

View file

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

View file

@ -1,28 +1,28 @@
{% set current_lang = config.default_language %}
{% if page %}
{% set current_lang = page.lang %}
{% set current_lang = page.lang %}
{% elif section %}
{% set current_lang = section.lang %}
{% set current_lang = section.lang %}
{% endif %}
{% if config.extra.header_nav %}
<nav class="navBar">
{% include "logo.html" %}
<div class="themeButton">
{% 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 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" %}
<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>
{% 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 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 %}
</div>
<div class="navBarRight">
{% 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>
{% endfor %}
</div>
{% include "logo.html" %}
<div class="themeButton">
{% 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 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" %}
<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>
{% 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 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 %}
</div>
<div class="navBarRight">
{% 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>
{% endfor %}
</div>
</nav>
{% endif %}

View file

@ -2,25 +2,25 @@
{% block content %}
<div class="homeContainer"><div class="home">
{% if config.extra.home_title %}
<h1>{{ config.extra.home_title }}</h1>
{% else %}
<h1>{{ config.title }}</h1>
{% endif %}
{% if config.extra.home_subtitle %}
<p>{{ config.extra.home_subtitle }}<span id="subtitleRand"></span></p>
{% elif config.description %}
<p>{{ config.description }}<span id="subtitleRand"></span></p>
{% endif %}
{% include "svg.html" %}
{% if config.extra.home_title %}
<h1>{{ config.extra.home_title }}</h1>
{% else %}
<h1>{{ config.title }}</h1>
{% endif %}
{% if config.extra.home_subtitle %}
<p>{{ config.extra.home_subtitle }}<span id="subtitleRand"></span></p>
{% elif config.description %}
<p>{{ config.description }}<span id="subtitleRand"></span></p>
{% endif %}
{% include "svg.html" %}
</div></div>
{% if config.extra.home_subtitle_suffixes %}
<script>
const suffixes = [
{% for s in config.extra.home_subtitle_suffixes %}
"{{ s }}",
{% endfor %}
{% for s in config.extra.home_subtitle_suffixes %}
"{{ s }}",
{% endfor %}
]
var current = suffixes[Math.floor(Math.random() * suffixes.length)];
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;">
<div class="logo">
{% if config.extra.logo.path %}
<img src="{{ config.extra.logo.path }}"
{% if config.extra.logo.alt %}
alt="{{ config.extra.logo.alt }}"
{% endif %}
/>
{% else %}
<span class="logo__text">
{% if config.extra.logo.text %}{{ config.extra.logo.text }}{% else %}home{% endif %}
</span>
<span class="logo__cursor" style="
{% if config.extra.logo.cursor.enabled %}
{% if config.extra.logo.cursor.enabled != true %}
visibility: hidden;
{% endif %}
{% endif %}
{% if config.extra.logo.cursor.color %}
background-color: {{ config.extra.logo.cursor.color }};
{% endif %}
{% if config.extra.logo.cursor.animate %}
animation-duration: {{ config.extra.logo.cursor.animate }};
{% endif %}
">
</span>
{% endif %}
</div>
<div class="logo">
{% if config.extra.logo.path %}
<img src="{{ config.extra.logo.path }}"
{% if config.extra.logo.alt %}
alt="{{ config.extra.logo.alt }}"
{% endif %}
/>
{% else %}
<span class="logo__text">
{% if config.extra.logo.text %}{{ config.extra.logo.text }}{% else %}home{% endif %}
</span>
<span class="logo__cursor" style="
{% if config.extra.logo.cursor.enabled %}
{% if config.extra.logo.cursor.enabled != true %}
visibility: hidden;
{% endif %}
{% endif %}
{% if config.extra.logo.cursor.color %}
background-color: {{ config.extra.logo.cursor.color }};
{% endif %}
{% if config.extra.logo.cursor.animate %}
animation-duration: {{ config.extra.logo.cursor.animate }};
{% endif %}
">
</span>
{% endif %}
</div>
</a>

View file

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

View file

@ -6,20 +6,18 @@
{{ section.content | safe }}
{% if paginator %}
{% set pages = paginator.pages %}
{% set pages = paginator.pages %}
{% else %}
{% set pages = section.pages %}
{% set pages = section.pages %}
{% endif %}
<ul class="titleList">
{% for page in pages %}
<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>
{% endfor %}
{% for page in pages %}
<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>
{% endfor %}
</ul>
{% 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 %}
{% endblock content %}

View file

@ -1,26 +1,26 @@
<div class="toc">
<h2>Table of contents</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 %}
{% 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>
</div>
</div>