From 831dc536c42bb10ba7f535d43a126991dbc74cd5 Mon Sep 17 00:00:00 2001 From: Nick Lamicela Date: Mon, 30 Sep 2024 21:48:11 -0700 Subject: [PATCH] keep buttons pixelated --- content/index.css | 4 ++++ content/index.md | 13 ++++++------- eleventy.config.js | 6 ++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/content/index.css b/content/index.css index fa284a6..ff38b58 100644 --- a/content/index.css +++ b/content/index.css @@ -205,3 +205,7 @@ img { max-width: 100%; max-height: 80vh; } + +.web-button { + image-rendering: pixelated; +} diff --git a/content/index.md b/content/index.md index a4c6be8..33de8f1 100644 --- a/content/index.md +++ b/content/index.md @@ -23,8 +23,8 @@ Sticker by [djuan](https://linktr.ee/mkiiisystem)! - github: - fediverse: (18+) -![nycki](/a/button-nycki.png) -[![i was on cohost!](/a/button-cohost-mykocalico.png)](https://cohost.org/nycki) +{% webButton '/a/button-nycki.png', 'nycki' %} +{% webButton '/a/button-cohost-mykocalico.png', 'i was on cohost!', 'https://cohost.org/nycki' %} ## blog @@ -32,11 +32,10 @@ Sticker by [djuan](https://linktr.ee/mkiiisystem)! ## cool people buttons go here -[![sofia-drawsmore](/a/button-sofia.png)](https://sofiadrawsmore.neocities.org/) -[![pebble](/a/button-pebble.gif)](https://pebble.pet/) -[![quwyou](/a/button-quwyou.gif)](https://quwyou.com/) -[![alterae](/a/button-alterae.webp)](https://alterae.online/) -[![88 by 31](/a/button-88by31.gif)](https://cyber.dabamos.de/88x31/) +{% webButton '/a/button-sofia.png', 'sofia-drawsmore', 'https://sofiadrawsmore.neocities.org/' %} +{% webButton '/a/button-pebble.gif', 'pebble', 'https://pebble.pet/' %} +{% webButton '/a/button-quwyou.gif', 'quwyou', 'https://quwyou.com/' %} +{% webButton '/a/button-88by31.gif', '88 by 31', 'https://cyber.dabamos.de/88x31/' %} ## creations diff --git a/eleventy.config.js b/eleventy.config.js index 772f17b..452f889 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -108,6 +108,12 @@ module.exports = function(eleventyConfig) { return (new Date()).toISOString(); }) + eleventyConfig.addNunjucksShortcode("webButton", function (src, alt, href) { + const img = `${alt}`; + const a = href ? `${img}` : img; + return a; + }); + // Features to make your build faster (when you need them) // If your passthrough copy gets heavy and cumbersome, add this line