Browse Source

Move badges into separate template partial

Given I want to make this theme as reusable as possible, it makes no
sense for me to store the badge images in my site folder, but the links
to them in the theme footer.

Moved the layout of the badges into its own partial, and then created a
copy of that partial in my site folder with the badges I use.
Bee Hudson 1 year ago
parent
commit
0557fd4de5
2 changed files with 11 additions and 24 deletions
  1. 9 0
      layouts/partials/badges.html
  2. 2 24
      layouts/partials/footer.html

+ 9 - 0
layouts/partials/badges.html

@@ -0,0 +1,9 @@
+<span id="badges--personal" class="badges">
+    <!-- Personal badges go here -->
+</span>
+<span id="badges--links" class="badges">
+    <!-- Badge links to other sites you like go here -->
+</span>
+<span id="badges--flavor" class="badges">
+    <!-- Any other badges, such as for flavor, go here -->
+</span>

+ 2 - 24
layouts/partials/footer.html

@@ -1,29 +1,7 @@
 
 <footer class="panel text-center">
-	<div>
-		<span id="badges--personal" class="badges">
-			<a href="/index.xml" target="_blank"><img src="/imgs/badges/cyber.dabamos.de/88x31/rss-button.gif" alt="Follow my RSS feed!" title="Follow my RSS feed!"/></a>
-			<a href="https://ioc.exchange/@ApisNecros" target="_blank"><img src="/imgs/badges/cyber.dabamos.de/88x31/mastodon_button_3.gif" alt="Follow me on Mastodon!" title="Follow me on Mastodon!"/></a>
-			<img src="/imgs/badges/cyber.dabamos.de/88x31/they-them.gif" alt="This user uses They/Them pronouns" title="This user uses They/Them pronouns" />
-		</span>
-		<span id="badges-links" class="badges">
-			<a href="https://cashmerecrypt.art" target="_blank"><img src="https://cashmerecrypt.art/img/buttons/cashmere-crypt-badge.gif" title="Cashmere Crypt"/></a>
-			<a href="https://maia.crimew.gay" target="_blank" rel="noreferrer"><img src="https://maia.crimew.gay/badges/maia.crimew.gay.png" alt="maia crimew" title="Maia Crimew"></a>
-			<a href="https://mani.neocities.org/" target="_blank"><img src="/imgs/badges/mani.neocities.org/badge.gif" title="Mani"></a>
-		</span>
-		<span id="badges-flavor" class="badges">
-			<a href="https://cyber.dabamos.de/88x31/" target="_blank"><img src="/imgs/badges/cyber.dabamos.de/88x31/88x31.gif" alt="Novelty badges from The 88x31 GIF Collection" title="Novelty badges from The 88x31 GIF Collection" /></a>
-			<a href="https://www.debian.org/" target="_blank"><img src="/imgs/badges/cyber.dabamos.de/88x31/powered-by-debian.gif" alt="Powered by Debian" title="Powered by Debian" /></a>
-			<a href="https://www.torproject.org/" target="_blank"><img src="/imgs/badges/cyber.dabamos.de/88x31/tor.gif" alt="Tor" title="Tor" /></a>
-			<a href="https://vivaldi.com/" target="_blank"><img src="/imgs/badges/cyber.dabamos.de/88x31/vivaldi.gif" alt="I use Vivaldi!" title="I use Vivaldi!" /></a>
-			<a href="https://indieweb.org" target="_blank"><img src="/imgs/badges/indieweb.org/indieweb88x31-retro-gif.gif" alt="IWC Now! IndieWeb.org" title="IWC Now! IndieWeb.org" /></a>
-			<a href="https://microformats.org/" target="_blank"><img src="/imgs/badges/indieweb.org/microformats88x31-flat.png" alt="Microformats" title="Microformats" /></a>
-			<a href="https://webmentions.neocities.org/" target="_blank"><img src="/imgs/badges/webmentions.neocities.org/webmentions_anim.gif" alt="Webmentions Supported" title="Webmentions Supported" /></a>
-			<img src="/imgs/badges/cyber.dabamos.de/88x31/nofuckingthanks.gif" alt="NFT - No Fucking Thanks" title="NFT - No Fucking Thanks!" />
-			<img src="/imgs/badges/cyber.dabamos.de/88x31/seedyourtorrents.gif" alt="Sharing is caring. Seed your torrents." title="Sharing is caring. Seed your torrents." />
-			<img src="/imgs/badges/cyber.dabamos.de/88x31/chrmevil.gif" alt="Google Chrome is evil!" title="Google Chrome is evil!" />
-			<img src="/imgs/badges/cyber.dabamos.de/88x31/ralseismokingadart.gif" alt="Ralsei Deltarune smoking a fat dart" title="I don't smoke weed, Kris!" />
-		</span>
+	<div id="badges">
+		{{ partial "badges.html" .}}
 	</div>
 	<p>
 		<q id="footer-quote" class="italic"><noscript>A cool quote from a song or something would be here if JavaScript were enabled</noscript></q>