simplify tag colors with golden angle

This commit is contained in:
Joshua Seigler 2025-07-04 22:54:32 -04:00
parent f1b1cbe343
commit 47d646fb66
3 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
<div style="--totalTags:{{ collections.categories | dictsort | length }}">
<div>
{%- for tag, data in collections.categories -%}
<a class="button tag" style="--tagIndex:{{ collections.categories[tag].id }}" href="/tags/{{ tag | slugify }}/">{{ tag }}
<span class="tagCount">{{ data.count }}</span>

View file

@ -1,5 +1,5 @@
{% macro tagList(tags) %}
<span class="tags" style="--totalTags:{{ collections.categories | dictsort | length }}">
<span class="tags">
{%- for tag in tags -%}
{%- if tag in collections.categories -%}
<a

View file

@ -730,7 +730,7 @@ button, a.button {
&::before {
content: "#";
}
--tagLCH: var(--tag-luminance) 0.25 calc(25 + 360 * var(--tagIndex, 0) / var(--totalTags, 1));
--tagLCH: var(--tag-luminance) 0.25 calc(300 + 137.508 * var(--tagIndex, 0));
--glowColor: oklch(var(--tagLCH) / 0.3);
--c-text-background: color-mix(in oklch, oklch(var(--tagLCH) / 0.4), #000A 50%);
--c-accent: color-mix(in oklch, oklch(var(--tagLCH) / 0.8), #000A 50%);