From d4ac24c869e53ba2fb5f801c8b1c8b0768a25c44 Mon Sep 17 00:00:00 2001 From: Landon Taylor Date: Fri, 6 Jun 2025 18:45:54 -0600 Subject: [PATCH] refactor taxonomy layout and improve table styling --- assets/sass/_taxonomy.sass | 15 +++++--- layouts/404.html | 9 +++++ layouts/_partials/tool-table.html | 0 layouts/taxonomies.html | 2 +- layouts/term.html | 35 ++++++++++++++++-- layouts/tools/section.html | 60 +++++++++++++++++++++++++++++++ 6 files changed, 113 insertions(+), 8 deletions(-) create mode 100644 layouts/404.html create mode 100644 layouts/_partials/tool-table.html create mode 100644 layouts/tools/section.html diff --git a/assets/sass/_taxonomy.sass b/assets/sass/_taxonomy.sass index 3fb0b90..a17cde2 100644 --- a/assets/sass/_taxonomy.sass +++ b/assets/sass/_taxonomy.sass @@ -21,11 +21,11 @@ table#taxonomy-table thead text-align: left border: none - background: $darkest border-radius: $border-radius $border-radius 0 0 th color: $text + background: $darkest !important padding: 0.6rem 0.6rem text-align: left font-weight: 600 @@ -62,6 +62,12 @@ table#taxonomy-table &:hover, &:focus color: $accent-light + a + color: $text + text-decoration: none + &:hover, &:focus + color: $accent + #taxonomy-page a.term-link padding: 0.3rem 1.2rem margin: 0.2rem @@ -69,9 +75,10 @@ table#taxonomy-table border-radius: $border-radius text-decoration: none font-weight: 500 - color: $text - transition: color 0.4s ease-in-out font-size: 1.2rem + color: $text + transition: color 0.4s ease-in-out, background 0.4s ease-in-out &:hover, &:focus - color: $darkest + color: $darkest !important + background: $text-subtle !important diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..5269355 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,9 @@ +{{ define "main" }} +

404 Not Found

+

The page you requested cannot be found.

+

+ + Return to the home page + +

+{{ end }} \ No newline at end of file diff --git a/layouts/_partials/tool-table.html b/layouts/_partials/tool-table.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/taxonomies.html b/layouts/taxonomies.html index f25b372..586853b 100644 --- a/layouts/taxonomies.html +++ b/layouts/taxonomies.html @@ -23,7 +23,7 @@ {{ range $key, $value := $taxonomy }} - {{ partial "term-link.html" (dict "name" $key "taxonomy" $taxonomyname) }} + {{ partial "term-link.html" (dict "name" $value.Page.Title "taxonomy" $taxonomyname) }} {{ end }} diff --git a/layouts/term.html b/layouts/term.html index c2e7875..d42a1c5 100644 --- a/layouts/term.html +++ b/layouts/term.html @@ -1,7 +1,36 @@ {{ define "main" }}

{{ .Title }}

{{ .Content }} - {{ range .Pages }} -

{{ .LinkTitle }}

- {{ end }} +
+

Tools

+ + + + + + + + + + + {{ range .Pages }} + + + + + {{ end }} + +
ToolDevelopersLicensePurposes
{{ .LinkTitle }} + {{ $sep := "" }} + {{ range $key, $vals := .Params }} + {{ if (in (slice "tags" "categories" "series") $key) }} + {{ $sep }} + {{ $key | title }}: + {{ range $i, $val := $vals }} + {{ if $i }}, {{ end }}{{ $val }} + {{ end }} + {{ $sep = "; " }} + {{ end }} + {{ end }} +
{{ end }} diff --git a/layouts/tools/section.html b/layouts/tools/section.html new file mode 100644 index 0000000..42758bd --- /dev/null +++ b/layouts/tools/section.html @@ -0,0 +1,60 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} +
+

Tools

+ + + + + + + + + + + {{ range .Pages }} + + + + + + + {{ end }} + +
ToolDevelopersLicensePurposes
{{ .LinkTitle }} + {{ $sep := "" }} + {{ range $key, $vals := .Params }} + {{ if (in (slice "developers") $key) }} + {{ $sep }} + {{ range $i, $val := $vals }} + {{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }} + {{ end }} + {{ $sep = "; " }} + {{ end }} + {{ end }} + + {{ $sep := "" }} + {{ range $key, $vals := .Params }} + {{ if (in (slice "licenses") $key) }} + {{ $sep }} + {{ range $i, $val := $vals }} + {{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }} + {{ end }} + {{ $sep = "; " }} + {{ end }} + {{ end }} + + {{ $sep := "" }} + {{ range $key, $vals := .Params }} + {{ if (in (slice "purposes") $key) }} + {{ $sep }} + {{ range $i, $val := $vals }} + {{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }} + {{ end }} + {{ $sep = "; " }} + {{ end }} + {{ end }} +
+{{ end }} +