From d7077c187dae6d7ba246ebea2ec34e4f7983e7d1 Mon Sep 17 00:00:00 2001 From: yequari Date: Thu, 19 Sep 2024 18:27:07 -0700 Subject: [PATCH] update notes page --- layouts/notes/list.html | 37 +++++++++++++++++-------------------- static/css/custom.css | 38 +++++--------------------------------- 2 files changed, 22 insertions(+), 53 deletions(-) diff --git a/layouts/notes/list.html b/layouts/notes/list.html index 02448ed..fa3e53b 100644 --- a/layouts/notes/list.html +++ b/layouts/notes/list.html @@ -1,26 +1,23 @@ {{ define "main" }}

{{ .Title }}

{{ .Content }} -
- {{ $taxonomy := "tags" }} - {{ $section := "notes" }} - {{ range $term, $weightedPages := index site.Taxonomies $taxonomy }} - {{ $termPage := site.GetPage (printf "%s/%s" $taxonomy $term) }} - - {{ $termPages := where $weightedPages "Page.Section" $section }} - {{ $amount := $termPages.Len }} - {{ if gt $amount 0 }} -
-

{{ $termPage.LinkTitle }}

-
    - {{ range sort $termPages "Page.Title" }} -
  • - {{ .LinkTitle }} -
  • - {{ end }} -
-
+
+
    +
  • Title

    Tags

  • + {{ range (where .Site.RegularPages.ByTitle "Section" "notes") }} +
  • + {{ .LinkTitle }} + {{ $taxonomy := "tags" }} + {{ with .GetTerms $taxonomy }} + + {{ range $k, $_ := . -}} + {{ if $k }}, {{ end }} + {{ .LinkTitle }} + {{- end }} + {{ end }} + +
  • {{ end }} - {{ end }} +
{{ end }} diff --git a/static/css/custom.css b/static/css/custom.css index e2cec13..6fe7ffd 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,30 +1,3 @@ -.notes-list { - display: flex; - flex-flow: row wrap; -} - -.notes-tag { - flex: 1 3 250px; - margin: 10px; - padding: 0 10px; -} -/**/ -/* .notes-tag h2 { */ -/* background: white; */ -/* margin: 0; */ -/* padding: 0.3rem 0.5rem; */ -/* } */ -/**/ -.notes-tag ul { - padding-bottom: 2em; - list-style-type: disc; - margin: 0; -} -/**/ -/* .notes-tag ul li { */ -/* padding-top: 0.3em; */ -/* } */ - :root { --avatar-width: 50px; --avatar-padding: calc(var(--avatar-width) / 10); @@ -82,17 +55,16 @@ font-size: 1.1rem; } +li.note-item { + display: flex; + justify-content: space-between; +} + .index-content { grid-row: 1 / 2; grid-column: 1 / span 6; } -/* .index-status { */ -/* margin-top: -15vh; */ -/* grid-row: 1 / 2; */ -/* grid-column: 1 / 2; */ -/* } */ - .index-social { grid-row: 2 / 3; grid-column: 9 / span 2;