From dc78abbf45dd0aa43596c4542d288c1683708433 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Tue, 2 Jan 2024 02:31:44 +0100 Subject: [PATCH] chore: assorted cleanup --- config.toml | 48 +++++++++++++++++------------- content/about.md | 2 +- content/journal.md | 2 +- sass/_header.scss | 18 +++++------ sass/_home.scss | 4 +-- sass/_main.scss | 29 +++++------------- templates/blog-page.html | 6 ++-- templates/footer.html | 6 ++-- templates/head.html | 4 +-- templates/header.html | 18 +++++------ templates/index.html | 14 ++++----- templates/section.html | 6 ++-- templates/shortcodes/metaData.html | 1 - templates/shortcodes/metadata.html | 1 + templates/svg.html | 4 +-- 15 files changed, 77 insertions(+), 86 deletions(-) delete mode 100644 templates/shortcodes/metaData.html create mode 100644 templates/shortcodes/metadata.html diff --git a/config.toml b/config.toml index 2cf593d..10d1b8a 100644 --- a/config.toml +++ b/config.toml @@ -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 blocks. [extra.colors.dark] meta_color = "#FF4D17" [extra.colors.light] -meta_color = "#e08f67" \ No newline at end of file +meta_color = "#e08f67" diff --git a/content/about.md b/content/about.md index c019ded..780ae22 100644 --- a/content/about.md +++ b/content/about.md @@ -3,4 +3,4 @@ title = "About" +++ This is an about page, nothing more nothing less `forget about it`. -{{ youtube(id="pS6zJ7IsJkM" class="textCenter") }} \ No newline at end of file +{{ youtube(id="pS6zJ7IsJkM" class="text-center") }} \ No newline at end of file diff --git a/content/journal.md b/content/journal.md index cdede58..30ae64f 100644 --- a/content/journal.md +++ b/content/journal.md @@ -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 diff --git a/sass/_header.scss b/sass/_header.scss index 0ff8d63..3311704 100644 --- a/sass/_header.scss +++ b/sass/_header.scss @@ -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; } } diff --git a/sass/_home.scss b/sass/_home.scss index 1a9649e..a0437da 100644 --- a/sass/_home.scss +++ b/sass/_home.scss @@ -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; } diff --git a/sass/_main.scss b/sass/_main.scss index cd630fe..d87d11a 100644 --- a/sass/_main.scss +++ b/sass/_main.scss @@ -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; } } diff --git a/templates/blog-page.html b/templates/blog-page.html index de16a17..2c06d54 100644 --- a/templates/blog-page.html +++ b/templates/blog-page.html @@ -1,15 +1,15 @@ {% extends "base.html" %} {% block content %} -
../
+
../
{% if config.extra.date_format.post %} {% set datefmt = config.extra.date_format.post %} {% else %} {% set datefmt = "%Y-%m-%dT%H:%M:%S%Z" %} {% endif %} - + {% if config.extra.author and config.extra.display_author == true %} - + {% endif %}
{% include "base-page.html" %}
diff --git a/templates/footer.html b/templates/footer.html index f6af5c9..684c0ed 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -1,12 +1,12 @@
-
-
+
+

Licensed under the MIT License.
Built with Zola using the friendenstein theme.

{% if config.generate_feed %} -
+
{% endif %} diff --git a/templates/head.html b/templates/head.html index a1fc5ff..a0b02ac 100644 --- a/templates/head.html +++ b/templates/head.html @@ -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 %}); } } diff --git a/templates/header.html b/templates/header.html index 169aa18..03ae13d 100644 --- a/templates/header.html +++ b/templates/header.html @@ -5,21 +5,21 @@ {% set current_lang = section.lang %} {% endif %} {% if config.extra.header_nav %} -