chore: assorted cleanup

This commit is contained in:
zaaarf 2024-01-02 02:31:44 +01:00
parent cd1a78e897
commit dc78abbf45
No known key found for this signature in database
GPG key ID: 102E445F4C3F829B
15 changed files with 77 additions and 86 deletions

View file

@ -13,7 +13,7 @@ default_language = "en"
minify_html = false
taxonomies = [
{name = "tags", feed = true},
{name = "tags", feed = true},
]
[languages.fr]
@ -29,13 +29,11 @@ highlight_code = true
# If you use CSS mode, make sure to add two themes - one for light mode,
# one for dark mode. In particular, hl-dark.css and hl-light.css are the
# default names. If you wish to use different names, set the properties
# highlighting_css_dark and highlighting_css_light under extra.
# TODO: move them under extra.colors.
# default names. If you wish to use different names, see [extra.colors].
highlight_theme = "css"
highlight_themes_css = [
{ theme = "agola-dark", filename = "hl-dark.css" },
{ theme = "idle", filename = "hl-light.css" }
{ theme = "agola-dark", filename = "hl-dark.css" },
{ theme = "idle", filename = "hl-light.css" }
]
[slugify]
@ -48,29 +46,31 @@ internal_level = "warn"
[extra]
# Stuff inherited from anemone
# TODO: ensure they still work properly, or remove.
favicon = "favicon.ico"
list_pages = false
twitter_card = true
# Default theme when people join the site. "dark" and "light" are the
# only valid values. By default, it's dark.
default_theme = "dark"
# Cursor logo, imported from hello-friend-ng
logo = { text = "> $ cd ~/zaaarf/" }
header_nav = [
{ url = "/", name_en = "/home/", name_fr = "/accueil/" },
{ url = "/about", name_en = "/about/", name_fr = "/concernant/" },
{ url = "/journal", name_en = "/journal/", name_fr = "/journal/" },
{ url = "/blog", name_en = "/blog/", name_fr = "/blog/" }
{ url = "/", name_en = "/home/", name_fr = "/accueil/" },
{ url = "/about", name_en = "/about/", name_fr = "/concernant/" },
{ url = "/journal", name_en = "/journal/", name_fr = "/journal/" },
{ url = "/blog", name_en = "/blog/", name_fr = "/blog/" }
]
# Stuff inspired by hello-friend-ng, allows you to present a simple yet complete homepage
# TODO: move this stuff under a separate tag
home_title = "zaaarf"
home_subtitle = "developer, software engineer"
home_subtitle_suffixes = [
# Homepage configuration stuff
[extra.home]
title = "you"
subtitle = "your subtitle"
subtitle_suffixes = [
", this",
", text",
", is",
", random!"
]
# Social icons, list here: https://github.com/rhazdon/hugo-theme-hello-friend-ng/blob/master/layouts/partials/svg.html
@ -81,8 +81,6 @@ social_icons = [
{ name = "email", url = "mailto:me@zaaarf.foo" }
]
logo = { text = "> $ cd ~/zaaarf/" }
# Valid keys are "post" and "list", one referring to individual blogposts,
# the other referring to lists of posts in sections.
# You may set "list" to whitespace(s) to disable displaying dates in sections.
@ -90,8 +88,16 @@ logo = { text = "> $ cd ~/zaaarf/" }
# for formatting instructions.
[extra.date_format]
# Theme customisation settings. Valid keys:
# - hightlighting: sets a custom CSS file for syntax highlighting.
# - bgColor: used for the background.
# - fgColor: used for text.
# - metaColor: the "theme" color of the website, used for several things.
# - linkColor: used for links.
# - dateLinkColor: used for the date in the pagination, if enabled.
# - codeLineColor: used for the background of <code> blocks.
[extra.colors.dark]
meta_color = "#FF4D17"
[extra.colors.light]
meta_color = "#e08f67"
meta_color = "#e08f67"

View file

@ -3,4 +3,4 @@ title = "About"
+++
This is an about page, nothing more nothing less `forget about it`.
{{ youtube(id="pS6zJ7IsJkM" class="textCenter") }}
{{ youtube(id="pS6zJ7IsJkM" class="text-center") }}

View file

@ -11,7 +11,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean dapibus dignissi
## 2023-06-28 😊
Etiam vulputate nibh in magna feugiat viverra. Donec ultricies sagittis justo vel facilisis. Nulla sollicitudin felis eu tortor consectetur, ac sodales odio faucibus. Vivamus id ultrices orci, ut luctus dolor. Sed sem nibh, semper in posuere eget, dictum eget dui. Praesent nunc dolor, lacinia at tortor eget, sollicitudin sagittis turpis.
{{ img(id="https://uploads-ssl.webflow.com/5ff0b3326e5782a256714165/638b6f3a3d8d2e6bad1cb03b_Random22.1.jpg", alt="xfx6800xt", class="textCenter") }}
{{ img(id="https://uploads-ssl.webflow.com/5ff0b3326e5782a256714165/638b6f3a3d8d2e6bad1cb03b_Random22.1.jpg", alt="xfx6800xt", class="text-center") }}
## 2022-11-30 💀
Pellentesque iaculis diam leo, vel euismod libero finibus sed. Praesent ultrices libero nec lectus posuere euismod. Fusce lobortis elit dui. In non pulvinar ligula. Integer augue mauris, condimentum vitae ante sit amet, consectetur scelerisque lectus. Sed dignissim vitae magna et volutpat. Integer vel risus sagittis

View file

@ -1,9 +1,9 @@
.navBar {
.navbar {
padding: 1rem 0 0 0;
gap: .4rem;
flex-wrap: wrap;
.navBarRight {
&-right {
float: right;
a {
@ -11,7 +11,7 @@
}
}
div.themeButton {
div.theme-button {
float: right;
padding: 0 0 0 1em;
@ -23,27 +23,27 @@
}
}
.dark .themeButton.dark,
.themeButton.light {
.dark .theme-button.dark,
.theme-button.light {
display: none
}
.dark .themeButton.light {
.dark .theme-button.light {
display: block
}
@media (max-width: 650px) {
.navBar {
.navbar {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
.navBarRight {
&-right {
float: center;
}
.themeButton {
.theme-button {
float: center;
}
}

View file

@ -1,4 +1,4 @@
div.homeContainer {
div.home-container {
width: 100%;
height: 100%;
display: flex;
@ -26,7 +26,7 @@ div.homeContainer {
}
}
a.socialIcon {
a.social-icon {
padding: .2em .3em 0 .3em;
font-size: 32px;
}

View file

@ -130,7 +130,7 @@ footer {
text-align: center;
}
.metaData, .themeButton {
.metadata, .theme-button {
color: var(--metaColor);
}
@ -168,11 +168,11 @@ footer {
align-content: flex-end
}
.titleList li {
.title-list li {
margin-bottom: .75rem;
text-align: left;
span.contentDate {
span.content-date {
color: var(--dateLinkColor);
}
}
@ -190,32 +190,17 @@ footer {
}
}
.footContainer {
.foot-container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
}
.noStyle {
padding: 0;
margin: 0;
border: none;
border-radius: 0
}
.textCenter {
.text-center {
text-align: center;
}
.floatRight {
float: right
}
.floatLeft {
float: left
}
.webring {
margin: 0.5rem;
}
@ -234,7 +219,7 @@ div.toc {
text-align: center;
}
a span.contentDate {
a span.content-date {
display: none;
}
@ -242,7 +227,7 @@ div.toc {
margin: 1rem;
}
.footContainer {
.foot-container {
justify-content: center;
}
}

View file

@ -1,15 +1,15 @@
{% extends "base.html" %}
{% block content %}
<div><a href="..">..</a>/<span class="metaData">{{ page.slug }}</span></div>
<div><a href="..">..</a>/<span class="metadata">{{ page.slug }}</span></div>
{% if config.extra.date_format.post %}
{% set datefmt = config.extra.date_format.post %}
{% else %}
{% set datefmt = "%Y-%m-%dT%H:%M:%S%Z" %}
{% endif %}
<time datetime="{{ page.date }}">Published on: <span class="metaData">{{ page.date | date(format=datefmt) }}</span></time>
<time datetime="{{ page.date }}">Published on: <span class="metadata">{{ page.date | date(format=datefmt) }}</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>

View file

@ -1,12 +1,12 @@
<hr>
<div class=footContainer>
<div class="footLeft">
<div class=foot-container>
<div class="foot-left">
<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> using the <a target="_blank" rel="noopener noreferrer" href="https://git.fantabos.co/friendenstein">friendenstein</a> theme.<br>
</p>
</div>
{% if config.generate_feed %}
<div class="footRight">
<div class="foot-right">
<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 %}

View file

@ -128,9 +128,9 @@ const setTheme = (theme) => {
var shouldLoadSyntax = {% if config.markdown.highlight_code and config.markdown.highlight_theme == "css" %}true{% else %}false{% endif %};
if (theme === 'light') {
link.setAttribute('href', {% if config.extra.hightlighting_css_light %}'{{ get_url(path=config.extra.highlighting_css_light) | safe }}'{% else %}'{{ get_url(path="hl-light.css") | safe }}'{% endif %});
link.setAttribute('href', {% if config.extra.colors.light.hightlighting %}'{{ get_url(path=config.extra.colors.light.hightlighting) | safe }}'{% else %}'{{ get_url(path="hl-light.css") | safe }}'{% endif %});
} else if (theme === 'dark') {
link.setAttribute('href', {% if config.extra.hightlighting_css_dark %}'{{ get_url(path=config.extra.highlighting_css_dark) | safe }}'{% else %}'{{ get_url(path="hl-dark.css") | safe }}'{% endif %});
link.setAttribute('href', {% if config.extra.colors.dark.hightlighting %}'{{ get_url(path=config.extra.colors.dark.hightlighting) | safe }}'{% else %}'{{ get_url(path="hl-dark.css") | safe }}'{% endif %});
}
}

View file

@ -5,21 +5,21 @@
{% set current_lang = section.lang %}
{% endif %}
{% if config.extra.header_nav %}
<nav class="navBar">
<nav class="navbar">
{% include "logo.html" %}
<div class="themeButton">
<div class="theme-button">
{% 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>
<button class="theme-button 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="theme-button 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>
<button class="theme-button 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="theme-button 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>
<button class="theme-button 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="theme-button 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">
<div class="navbar-right">
{% 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 %}

View file

@ -1,24 +1,24 @@
{% extends "base.html" %}
{% block content %}
<div class="homeContainer"><div class="home">
{% if config.extra.home_title %}
<h1>{{ config.extra.home_title }}</h1>
<div class="home-container"><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>
{% 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 %}
{% if config.extra.home.subtitle_suffixes %}
<script>
const suffixes = [
{% for s in config.extra.home_subtitle_suffixes %}
{% for s in config.extra.home.subtitle_suffixes %}
"{{ s }}",
{% endfor %}
]

View file

@ -11,18 +11,18 @@
{% set pages = section.pages %}
{% endif %}
<ul class="titleList">
<ul class="title-list">
{% if config.extra.date_format.list %}
{% set datefmt = config.extra.date_format.list %}
{% else %}
{% set datefmt = " @ %Y-%m-%dT%H:%M:%S%Z" %}
{% endif %}
{% for page in pages %}
<li><a href="{{ page.permalink | safe }}">{{ page.title }}<span class="contentDate">{{ page.date | date(format=datefmt) }}</span></a></li>
<li><a href="{{ page.permalink | safe }}">{{ page.title }}<span class="content-date">{{ page.date | date(format=datefmt) }}</span></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 +0,0 @@
<span class="metaData">{{content}}</span>

View file

@ -0,0 +1 @@
<span class="metadata">{{content}}</span>

View file

@ -1,7 +1,7 @@
<!-- Adapted from https://github.com/rhazdon/hugo-theme-hello-friend-ng/blob/master/layouts/partials/svg.html -->
{% if config.extra.social_icons %}
{% for icon in config.extra.social_icons %}
{% if config.extra.home.social_icons %}
{% for icon in config.extra.home.social_icons %}
<a class="socialIcon" href="{{ icon.url }}" target="_blank" rel="noopener me" title="{{ icon.name }}">
{% if icon.name == "amazon" %}
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 01-10.951-.577 17.88 17.88 0 01-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.375.15-.63.045a6.062 6.062 0 01-.526-.496l-.31-.347a9.391 9.391 0 01-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.02zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 011.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.046-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.047-.02-.077 0-.017.006-.03.02-.063v-.06z"/></svg></a>