From b610f20797794d2e12e13c5e26e0b6da57dfe544 Mon Sep 17 00:00:00 2001 From: Vigilio Desto Date: Sun, 12 Apr 2026 19:30:54 +0200 Subject: [PATCH] Weighted tag cloud: size reflects piece count (garden#9) Custom taxonomy template: tags sorted by count, font-size scaled 80-200% based on weight. Heavy tags (essay: 29) are large and violet. Light tags are small and faint. Mono font, flex-wrapped, breathable spacing. Replaces the flat card grid on /tags/. Co-Authored-By: Claude Opus 4.6 (1M context) --- layouts/taxonomy/tag.terms.html | 27 + public/css/garden.css | 24 + public/tags/index.html | 908 ++++++++++++++++---------------- static/css/garden.css | 24 + 4 files changed, 534 insertions(+), 449 deletions(-) create mode 100644 layouts/taxonomy/tag.terms.html diff --git a/layouts/taxonomy/tag.terms.html b/layouts/taxonomy/tag.terms.html new file mode 100644 index 0000000..8ce53d5 --- /dev/null +++ b/layouts/taxonomy/tag.terms.html @@ -0,0 +1,27 @@ +{{ define "main" }} +
+
+

Themes

+

{{ len .Data.Terms }} threads running through the garden

+
+ +
+ {{- $max := 0 -}} + {{- range .Data.Terms.Alphabetical -}} + {{- if gt .Count $max }}{{ $max = .Count }}{{ end -}} + {{- end -}} + + {{- range .Data.Terms.ByCount -}} + {{- $weight := div (mul .Count 100) $max -}} + {{- $size := add 80 (div (mul $weight 120) 100) -}} + + {{ .Page.Title }} + {{ .Count }} + + {{- end }} +
+
+{{ end }} diff --git a/public/css/garden.css b/public/css/garden.css index b4ff560..2f70c4f 100644 --- a/public/css/garden.css +++ b/public/css/garden.css @@ -278,6 +278,30 @@ pre { line-height: 1.6; } +/* ── Tag cloud — weighted, not flat ───────────────────────── */ +.tag-cloud { + display: flex; + flex-wrap: wrap; + align-items: baseline; + gap: var(--size-2) var(--size-3); + padding: var(--size-4) 0; + line-height: 1.8; +} +.tag-weight { + text-decoration: none; + font-family: var(--font-mono); + transition: color 0.2s; + white-space: nowrap; +} +.tag-weight:hover { + color: var(--garden-dialogue) !important; +} +.tag-weight small { + font-size: 0.6em; + opacity: 0.4; + margin-left: 0.15em; +} + /* ── Footer ───────────────────────────────────────────────── */ footer { color: var(--garden-text-faint); diff --git a/public/tags/index.html b/public/tags/index.html index 0bc43b9..1ac6114 100644 --- a/public/tags/index.html +++ b/public/tags/index.html @@ -24,457 +24,467 @@
-

Tags

+

Themes

+

76 threads running through the garden

-
-
-

A-Team

-
- -
-
-
-

Garden

-
- -
-
- - - - -
-

Essay

-
- -
-
- - - - - - - - -
-

Design

-
- -
-
- - - -
-

Css

-
- -
-
- - - - -
-

Meta

-
- -
-
- -
-

Poem

-
- -
-
- -
-

Sonic

-
- -
-
- -
-

Time

-
- -
-
-
-

Trust

-
- -
-
- - - - - - - - - - - - - - - -
-

Grid

-
- -
-
- -
-

Memory

-
- -
-
- - - - - - - - - -
-

Svg

-
- -
-
- -
-

Visual

-
- -
-
- - -
-

AI

-
- -
-
- - -
-

Draft

-
- -
-
- - -
-

Agents

-
- -
-
-
-

Issues

-
- -
-
-
-

Tasks

-
- -
-
- - - +
diff --git a/static/css/garden.css b/static/css/garden.css index b4ff560..2f70c4f 100644 --- a/static/css/garden.css +++ b/static/css/garden.css @@ -278,6 +278,30 @@ pre { line-height: 1.6; } +/* ── Tag cloud — weighted, not flat ───────────────────────── */ +.tag-cloud { + display: flex; + flex-wrap: wrap; + align-items: baseline; + gap: var(--size-2) var(--size-3); + padding: var(--size-4) 0; + line-height: 1.8; +} +.tag-weight { + text-decoration: none; + font-family: var(--font-mono); + transition: color 0.2s; + white-space: nowrap; +} +.tag-weight:hover { + color: var(--garden-dialogue) !important; +} +.tag-weight small { + font-size: 0.6em; + opacity: 0.4; + margin-left: 0.15em; +} + /* ── Footer ───────────────────────────────────────────────── */ footer { color: var(--garden-text-faint);