From 67de08a5b870a4728f01dbf2d0c34f38fc1808c5 Mon Sep 17 00:00:00 2001 From: Bun Date: Wed, 2 Jul 2025 21:44:35 -0400 Subject: [PATCH] Add some better logic to the resizing, add a better contacts page. sidebar hiding still in the works --- config.toml | 1 + content/art/_index.md | 6 ++++++ content/blog/about_me.md | 4 ++-- content/blog/contact.md | 22 ++++++++++++++++++--- content/blog/defense.md | 2 +- content/nixfox/julywebsite.md | 2 +- sass/sidebar.scss | 3 ++- sass/style.scss | 28 ++++++++++++++++++++++++--- static/darkmode.js | 12 ++++++------ templates/authors/list.html | 21 ++++++++++++++++++++ templates/authors/single.html | 18 ++++++++++++++++++ templates/base.html | 33 ++------------------------------ templates/blog-entry.html | 15 +++++++++++++++ templates/blog-page.html | 20 +++++++++---------- templates/blog.html | 36 +++++++++++++---------------------- templates/generic.html | 11 +++++------ templates/sidebar.html | 31 ++++++++++++++++++++++++++++++ templates/tags/list.html | 2 +- templates/tags/single.html | 12 +----------- 19 files changed, 180 insertions(+), 99 deletions(-) create mode 100644 content/art/_index.md create mode 100644 templates/authors/list.html create mode 100644 templates/authors/single.html create mode 100644 templates/blog-entry.html create mode 100644 templates/sidebar.html diff --git a/config.toml b/config.toml index 978a384..d4ec22a 100644 --- a/config.toml +++ b/config.toml @@ -3,6 +3,7 @@ compile_sass = true build_search_index = true taxonomies = [ + {name = "authors", feed = true, rss = true }, {name = "tags", feed = true, rss = true }, ] diff --git a/content/art/_index.md b/content/art/_index.md new file mode 100644 index 0000000..d91c8e2 --- /dev/null +++ b/content/art/_index.md @@ -0,0 +1,6 @@ ++++ +title = "art and doodles" +sort_by = "date" +template = "blog.html" +page_template = "blog-page.html" ++++ diff --git a/content/blog/about_me.md b/content/blog/about_me.md index 1a35f9c..db24c87 100644 --- a/content/blog/about_me.md +++ b/content/blog/about_me.md @@ -1,10 +1,10 @@ +++ -authors = [ "aubun" ] -title = "about me" +title = "about me, the aubun creature" date = 2025-07-02 description = "a page all about me!" [taxonomies] +authors = [ "aubun" ] tags = [ "info", "personal" ] +++ diff --git a/content/blog/contact.md b/content/blog/contact.md index 5f16db5..f5e9323 100644 --- a/content/blog/contact.md +++ b/content/blog/contact.md @@ -1,10 +1,26 @@ +++ -authors = [ "aubun" ] -title = "contact info" +title = "contact info and socials" date = 2025-07-02 -description = "a page with all my contact details" +description = "all my contact details" [taxonomies] +authors = [ "aubun" ] tags = [ "info", "personal" ] +++ + +i'm not on too many platforms, +but the best way to reach me today is email and matrix! + +#### main platforms +- **✉️ email:** [bun@nixfox.ca](mailto:bun@nixfox.ca) +- **💬 matrix:** [@bun:nixfox.ca](https://matrix.to/#/@bun:nixfox.ca) + +here are my other socials, +which i'm active on from time to time. + +#### social platforms +- **💬 discord:** [viceebun](https://discordapp.com/users/1324248157307146290) +- **🖼️ instagram:** [viceebun](https://www.instagram.com/viceebun) +- **🐦 twitter:** [viceebun](https://x.com/viceebun) +- **🎵 spotify:** [bun](https://open.spotify.com/user/31vdhyhqi3kw7f6n6hgddu44mm5a) diff --git a/content/blog/defense.md b/content/blog/defense.md index 2bdc91d..6b966db 100644 --- a/content/blog/defense.md +++ b/content/blog/defense.md @@ -1,11 +1,11 @@ +++ -authors = [ "aubun" ] title = "defense / priorities" date = 2025-06-26 description = "a little rant about my own defense mechanisms" [taxonomies] +authors = [ "aubun" ] tags = [ "rants", "personal" ] +++ diff --git a/content/nixfox/julywebsite.md b/content/nixfox/julywebsite.md index 3bbe943..1e9e0c5 100644 --- a/content/nixfox/julywebsite.md +++ b/content/nixfox/julywebsite.md @@ -1,11 +1,11 @@ +++ -authors = [ "aubun" ] title = "new website!" date = 2025-07-02 description = "rebuilding the nixfox site" [taxonomies] +authors = [ "aubun" ] tags = [ "software", "nixfox" ] +++ diff --git a/sass/sidebar.scss b/sass/sidebar.scss index 47f6856..92a8d55 100644 --- a/sass/sidebar.scss +++ b/sass/sidebar.scss @@ -22,6 +22,8 @@ padding: 0; font-size: 1.6em; + transition: 0.3s; + background-color: var(--sb-color); } @@ -75,7 +77,6 @@ display: inline-block; } - .personal { color:#fc3f5b; } .nixfox { color:#2abafc; } diff --git a/sass/style.scss b/sass/style.scss index f8e7d4e..cc7d380 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -61,21 +61,43 @@ h1 { font-size: 16px; } +.sidebar-toggle-button { + position: fixed; + bottom: 1rem; + right: .8rem; + z-index: 9; + width: 25px; + height: 25px; + + cursor: crosshair; + z-index: 2; + + font-size: 18px; +} + @media (max-width: 980px) { html, body { margin: 0; - height: 100%; + padding: 1.5em; } #main { width: 70%; min-height: 100%; - padding-left: 7em; + padding: 0; top: 0; } .container { - max-width: 30em; + max-width: 35em; + } + + [data-theme="light"] { + --bg-color: #EFF1F5; + } + + [data-theme="dark"] { + --bg-color: #1F2223; } } diff --git a/static/darkmode.js b/static/darkmode.js index 716e5c5..4406496 100644 --- a/static/darkmode.js +++ b/static/darkmode.js @@ -11,7 +11,7 @@ function calculateSettingAsThemeString({ localStorageTheme, systemSettingDark }) return "light"; } -function updateButton({ buttonEl, isDark }) { +function updateThemeButton({ buttonEl, isDark }) { const newCta = isDark ? "toggle light" : "toggle dark"; buttonEl.setAttribute("aria-label", newCta); buttonEl.innerText = newCta; @@ -22,21 +22,21 @@ function updateThemeOnHtmlEl({ theme }) { } -const button = document.querySelector("[data-theme-toggle]"); +const themeToggleButton = document.querySelector("[data-theme-toggle]"); const localStorageTheme = localStorage.getItem("theme"); const systemSettingDark = window.matchMedia("(prefers-color-scheme: dark)"); let currentThemeSetting = calculateSettingAsThemeString({ localStorageTheme, systemSettingDark }); -updateButton({ buttonEl: button, isDark: currentThemeSetting === "dark" }); +updateThemeButton({ buttonEl: themeToggleButton, isDark: currentThemeSetting === "dark" }); updateThemeOnHtmlEl({ theme: currentThemeSetting }); -button.addEventListener("click", (event) => { +themeToggleButton.addEventListener("click", () => { const newTheme = currentThemeSetting === "dark" ? "light" : "dark"; localStorage.setItem("theme", newTheme); - updateButton({ buttonEl: button, isDark: newTheme === "dark" }); + updateThemeButton({ buttonEl: themeToggleButton, isDark: newTheme === "dark" }); updateThemeOnHtmlEl({ theme: newTheme }); currentThemeSetting = newTheme; -}); +}); diff --git a/templates/authors/list.html b/templates/authors/list.html new file mode 100644 index 0000000..d21e608 --- /dev/null +++ b/templates/authors/list.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{%- block title -%} +{{ title_macros::title(page_title="Tags", main_title=config.title) }} +{%- endblock -%} + +{% block content %} +
+

all tags

+ + +
+{% endblock content %} diff --git a/templates/authors/single.html b/templates/authors/single.html new file mode 100644 index 0000000..dfdd02b --- /dev/null +++ b/templates/authors/single.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block content %} +

+ author: {{ term.name }} + ({{ term.pages | length }} post{{ term.pages | length | pluralize }}) +

+ +
+

view all authors.

+
+ + +{% endblock content %} diff --git a/templates/base.html b/templates/base.html index 727e8bb..0ec2fb5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,5 +1,5 @@ - + @@ -12,36 +12,7 @@ - + {% include "sidebar.html" %}
diff --git a/templates/blog-entry.html b/templates/blog-entry.html new file mode 100644 index 0000000..f8e4daa --- /dev/null +++ b/templates/blog-entry.html @@ -0,0 +1,15 @@ +
  • + {{ page.title }} +
    + {{ page.description }} +
    + authors: {%- for tag in page.taxonomies.authors | sort | unique(case_sensitive=false) %} + + {% endfor -%} +
    + written: {{ page.date }} +
    + tags: {%- for tag in page.taxonomies.tags | sort | unique(case_sensitive=false) %} + + {% endfor -%} +
  • diff --git a/templates/blog-page.html b/templates/blog-page.html index 9121479..145eaef 100644 --- a/templates/blog-page.html +++ b/templates/blog-page.html @@ -1,14 +1,14 @@ {% extends "base.html" %} {% block content %} -

    - {{ page.title }} -

    -

    - {{ page.date }}, - tags: {%- for tag in page.taxonomies.tags | sort | unique(case_sensitive=false) %} - - {% endfor -%} -

    -{{ page.content | safe }} +

    + {{ page.title }} +

    +

    + {{ page.date }}, + tags: {%- for tag in page.taxonomies.tags | sort | unique(case_sensitive=false) %} + + {% endfor -%} +

    + {{ page.content | safe }} {% endblock content %} diff --git a/templates/blog.html b/templates/blog.html index 1a1af3d..2206d56 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -1,27 +1,17 @@ {% extends "base.html" %} {% block content %} -

    - {{ section.title }} -

    - -

    sort by tags.

    - -
      - - {% for page in section.pages %} -
    • - {{ page.title }} - by {{ page.authors }} -
      - {{ page.description }} -
      - written: {{ page.date }} -
      - tags: {%- for tag in page.taxonomies.tags | sort | unique(case_sensitive=false) %} - - {% endfor -%} -
    • - {% endfor %} -
    +

    + {{ section.title }} +

    + +

    sort by tags.

    + +
      + + {% for page in section.pages %} + {% include "blog-entry.html" %} + {% endfor %} +
    {% endblock content %} diff --git a/templates/generic.html b/templates/generic.html index 0397089..d8c38d9 100644 --- a/templates/generic.html +++ b/templates/generic.html @@ -1,8 +1,7 @@ {% extends "base.html" %} - -{% block content %} -

    - {{ section.title }} -

    -{{ section.content | safe }} + {% block content %} +

    + {{ section.title }} +

    + {{ section.content | safe }} {% endblock content %} diff --git a/templates/sidebar.html b/templates/sidebar.html new file mode 100644 index 0000000..c95aade --- /dev/null +++ b/templates/sidebar.html @@ -0,0 +1,31 @@ + diff --git a/templates/tags/list.html b/templates/tags/list.html index d21e608..b6fa5c0 100644 --- a/templates/tags/list.html +++ b/templates/tags/list.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {%- block title -%} -{{ title_macros::title(page_title="Tags", main_title=config.title) }} + {{ title_macros::title(page_title="Tags", main_title=config.title) }} {%- endblock -%} {% block content %} diff --git a/templates/tags/single.html b/templates/tags/single.html index 391ffe9..c0e182f 100644 --- a/templates/tags/single.html +++ b/templates/tags/single.html @@ -12,17 +12,7 @@
      {% for page in term.pages | sort(attribute="date") | reverse %} -
    • - {{ page.title }} - by {{ page.authors }} -
      - {{ page.description }} -
      - written: {{ page.date }} -
      - tags: {%- for tag in page.taxonomies.tags | sort | unique(case_sensitive=false) %} - - {% endfor -%} -
    • + {% include "blog-entry.html" %} {% endfor %}
    {% endblock content %}