From 94b9134f8e71b76b25e4f370f00365e674f98087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 22 Feb 2026 07:59:17 +0100 Subject: [PATCH] refactor: externalize all SVG icons to partials/icons --- author.hbs | 8 ++++---- partials/footer.hbs | 12 ++++-------- partials/header.hbs | 16 +++++++--------- partials/icons/arrow-up.hbs | 3 +++ partials/icons/close.hbs | 3 +++ partials/icons/facebook.hbs | 3 +++ partials/icons/link.hbs | 3 +++ partials/icons/location.hbs | 3 +++ partials/icons/logo.hbs | 4 +--- partials/icons/menu.hbs | 3 +++ partials/icons/moon.hbs | 3 +++ partials/icons/sun.hbs | 3 +++ partials/icons/twitter.hbs | 3 +++ partials/mobile-menu.hbs | 16 +++++++--------- partials/scroll-top.hbs | 4 +--- 15 files changed, 51 insertions(+), 36 deletions(-) create mode 100644 partials/icons/arrow-up.hbs create mode 100644 partials/icons/close.hbs create mode 100644 partials/icons/facebook.hbs create mode 100644 partials/icons/link.hbs create mode 100644 partials/icons/location.hbs create mode 100644 partials/icons/menu.hbs create mode 100644 partials/icons/moon.hbs create mode 100644 partials/icons/sun.hbs create mode 100644 partials/icons/twitter.hbs diff --git a/author.hbs b/author.hbs index 9e33a08..f7093eb 100644 --- a/author.hbs +++ b/author.hbs @@ -21,25 +21,25 @@
{{#if location}} - + {{> "icons/location" class="w-4 h-4 mr-1 text-[var(--brand-primary)]"}} {{location}} {{/if}} {{#if website}} - + {{> "icons/link" class="w-4 h-4 mr-1"}} Website {{/if}} {{#if twitter}} - + {{> "icons/twitter" class="w-4 h-4 mr-1"}} Twitter {{/if}} {{#if facebook}} - + {{> "icons/facebook" class="w-4 h-4 mr-1"}} Facebook {{/if}} diff --git a/partials/footer.hbs b/partials/footer.hbs index bd867ce..80ccf6b 100644 --- a/partials/footer.hbs +++ b/partials/footer.hbs @@ -20,17 +20,13 @@ {{#if @site.facebook}} - - - - + + {{> "icons/facebook" class="w-5 h-5"}} {{/if}} {{#if @site.twitter}} - - - - + + {{> "icons/twitter" class="w-5 h-5"}} {{/if}} diff --git a/partials/header.hbs b/partials/header.hbs index 3ededc2..0155ee1 100644 --- a/partials/header.hbs +++ b/partials/header.hbs @@ -17,18 +17,16 @@ {{!-- Theme Toggle - Visible on both mobile and desktop --}}
diff --git a/partials/icons/arrow-up.hbs b/partials/icons/arrow-up.hbs new file mode 100644 index 0000000..835fcfa --- /dev/null +++ b/partials/icons/arrow-up.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/icons/close.hbs b/partials/icons/close.hbs new file mode 100644 index 0000000..1caacdd --- /dev/null +++ b/partials/icons/close.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/icons/facebook.hbs b/partials/icons/facebook.hbs new file mode 100644 index 0000000..1c253bc --- /dev/null +++ b/partials/icons/facebook.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/icons/link.hbs b/partials/icons/link.hbs new file mode 100644 index 0000000..890a10d --- /dev/null +++ b/partials/icons/link.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/icons/location.hbs b/partials/icons/location.hbs new file mode 100644 index 0000000..5dafd8c --- /dev/null +++ b/partials/icons/location.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/icons/logo.hbs b/partials/icons/logo.hbs index 5b2081d..3c2e7fd 100644 --- a/partials/icons/logo.hbs +++ b/partials/icons/logo.hbs @@ -1,6 +1,4 @@ - - - + diff --git a/partials/icons/menu.hbs b/partials/icons/menu.hbs new file mode 100644 index 0000000..b275c5c --- /dev/null +++ b/partials/icons/menu.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/icons/moon.hbs b/partials/icons/moon.hbs new file mode 100644 index 0000000..d495f99 --- /dev/null +++ b/partials/icons/moon.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/icons/sun.hbs b/partials/icons/sun.hbs new file mode 100644 index 0000000..2a9112e --- /dev/null +++ b/partials/icons/sun.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/icons/twitter.hbs b/partials/icons/twitter.hbs new file mode 100644 index 0000000..882b13b --- /dev/null +++ b/partials/icons/twitter.hbs @@ -0,0 +1,3 @@ + + + diff --git a/partials/mobile-menu.hbs b/partials/mobile-menu.hbs index 9a4ebd4..11c8ddc 100644 --- a/partials/mobile-menu.hbs +++ b/partials/mobile-menu.hbs @@ -23,18 +23,16 @@
{{!-- Theme Toggle in Mobile Menu --}}
diff --git a/partials/scroll-top.hbs b/partials/scroll-top.hbs index f57774e..5bca239 100644 --- a/partials/scroll-top.hbs +++ b/partials/scroll-top.hbs @@ -10,7 +10,5 @@ class="fixed bottom-8 right-8 z-40 p-3 rounded-lg shadow-xl bg-[var(--brand-primary)] text-[var(--bg-primary)] hover:bg-[var(--brand-secondary)] hover:scale-110 active:scale-95 transition-all duration-300 group" aria-label="Scroll to top" x-cloak> - - - + {{> "icons/arrow-up" class="w-6 h-6 transform group-hover:-translate-y-1 transition-transform duration-300"}}