From 5afed44d6ee3c3f53f26177915fbb1a7627e95be Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Wed, 3 Jul 2024 18:53:04 +0800 Subject: [PATCH] Use stylised tooltips for pride buttons on home page --- src/assets/css/components.css | 6 ++++++ src/index.njk | 26 +++++++++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/assets/css/components.css b/src/assets/css/components.css index 7f772e81..22591b7a 100644 --- a/src/assets/css/components.css +++ b/src/assets/css/components.css @@ -132,6 +132,12 @@ p + .adoptables { margin-top: 1em; } .tooltip { display: none; } .tipcontainer { position: relative; } +.tipactivator { + display: block; + padding: 0; + border: none; +} + .tipactivator:hover + .tooltip, .tipactivator:focus + .tooltip { display: inline-block; diff --git a/src/index.njk b/src/index.njk index f614b7d4..f87e3409 100644 --- a/src/index.njk +++ b/src/index.njk @@ -73,15 +73,23 @@ eleventyComputed:

Always Proud

-
- Website button of the 2018 Progress Flag - Website button of the 9 stripe rainbow flag - Website button of the lesbian pride flag - Website button of the non-binary pride flag - Website button of the demigirl pride flag - Website button of the agender pride flag - Website button of the bigender pride flag -
+ {%- macro prideButton(file, alt, tooltip=alt, width=88, height=31) -%} +
  • + +

    {{ tooltip }}

    +
  • + {%- endmacro -%} +

    Credit to Dime for these pride buttons!