Change pride button macro to function

This commit is contained in:
Leilukin 2025-05-04 20:40:53 +08:00
parent dc51da01f7
commit 67ccdc5a57

View File

@ -65,11 +65,11 @@ eleventyComputed:
<section class="content__section"> <section class="content__section">
<h2>Always Proud</h2> <h2>Always Proud</h2>
<div class="flag-el flag-progress-intersex-lesbian" role="img" aria-label="Custom pride flag which combines the lesbian pride flag and the progress pride flag triangle" style="margin-bottom: 1em;"></div> <div class="flag-el flag-progress-intersex-lesbian" role="img" aria-label="Custom pride flag which combines the lesbian pride flag and the progress pride flag triangle" style="margin-bottom: 1em;"></div>
{{- macro prideButton(file, alt, width=88, height=31) -}} {{ function prideButton(file, alt, width=88, height=31) -}}
<li data-tooltip> <li data-tooltip>
<img src="/assets/buttons/pride/{{ file }}.png" alt="{{ alt }}" data-tooltip-trigger title="{{ alt }}" width="{{ width }}" height="{{ height }}" loading="lazy" tabindex="0"> <img src="/assets/buttons/pride/{{ file }}.png" alt="{{ alt }}" data-tooltip-trigger title="{{ alt }}" width="{{ width }}" height="{{ height }}" loading="lazy" tabindex="0">
</li> </li>
{{- endmacro -}} {{ /function }}
<ul class="web-graphics"> <ul class="web-graphics">
{{ prideButton("progress", "Progress Flag by Daniel Quasar (2018)") }} {{ prideButton("progress", "Progress Flag by Daniel Quasar (2018)") }}
{{ prideButton("9_stripe", "Nine-Stripe Rainbow Flag by Gilbert Baker (2017)") }} {{ prideButton("9_stripe", "Nine-Stripe Rainbow Flag by Gilbert Baker (2017)") }}