From e8a6eb204850e0cd0ca92fad85474ba493705c6f Mon Sep 17 00:00:00 2001 From: jk Date: Mon, 4 Jan 2021 22:02:13 +0000 Subject: [PATCH] added tag cloud, fixed a typo and fixed categories page --- content/note/5ff0e1e2/index.md | 2 +- themes/nipponalba/layouts/_default/list.html | 21 +++++++++------- themes/nipponalba/layouts/partials/aside.html | 23 ++++++++++++++++++ themes/nipponalba/static/css/style.css | 24 +++++++++++++++++-- 4 files changed, 59 insertions(+), 11 deletions(-) diff --git a/content/note/5ff0e1e2/index.md b/content/note/5ff0e1e2/index.md index ac9e023..4f730ff 100644 --- a/content/note/5ff0e1e2/index.md +++ b/content/note/5ff0e1e2/index.md @@ -2,7 +2,7 @@ category: - environment - sustainability - - consumarism + - consumerism - materialism - 'electronic waste' - 1 diff --git a/themes/nipponalba/layouts/_default/list.html b/themes/nipponalba/layouts/_default/list.html index fa99e5e..d60f127 100644 --- a/themes/nipponalba/layouts/_default/list.html +++ b/themes/nipponalba/layouts/_default/list.html @@ -1,11 +1,11 @@ {{ define "main" }}
- {{ humanize .Name }} -
    + {{if eq .Name "Category"}}Categories{{ else }}{{ humanize .Name }}{{ end }} {{ range .Pages }} -
  • - {{ if eq .Type "note"}} + {{ if eq .Type "note"}} +
      +
    • {{ range .Params.category }} @@ -20,10 +20,15 @@
      {{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}
      -
      {{end}} -
    • - {{ end }}
    - + +
  • +
+ {{ end }}{{ end }} + {{if eq .Page.Permalink "https://sakino.kelbie.scot/category/"}} +
    + {{ range .Site.Taxonomies.category }} + {{if not (in (slice "1" "2" "3" "4" "5") .Page.Title )}}
  • {{ humanize .Page.Title }}
  • {{ end }}{{ end }} +
{{ end }}
{{ end }} diff --git a/themes/nipponalba/layouts/partials/aside.html b/themes/nipponalba/layouts/partials/aside.html index ddaf726..a3c189e 100644 --- a/themes/nipponalba/layouts/partials/aside.html +++ b/themes/nipponalba/layouts/partials/aside.html @@ -29,6 +29,29 @@ +
+
+
+ Categories +
- full list -
+
+{{ if not (eq (len $.Site.Taxonomies.category) 0) }} + {{ $fontUnit := "rem" }} + {{ $largestFontSize := 1.6 }} + {{ $smallestFontSize := 1.0 }} + {{ $max := len (index $.Site.Taxonomies.category.ByCount 0).Pages }} + {{ $min := len (index $.Site.Taxonomies.category.ByCount.Reverse 0).Pages }} +
+ {{ range $name, $taxonomy := $.Site.Taxonomies.category }} + {{ $count := len $taxonomy.Pages }} + {{ $weigth := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }} + {{ $currentFontSize := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) ) }} + + {{if not (in (slice "1" "2" "3" "4" "5") $name)}}{{ $name }}{{ end }} + {{ end }} +
+{{ end }} +

© {{ now.Format "2006"}} | CC-BY 4.0 |
Made with ❤ and Hugo
by Jon Kelbie
diff --git a/themes/nipponalba/static/css/style.css b/themes/nipponalba/static/css/style.css index c4b4191..587e539 100644 --- a/themes/nipponalba/static/css/style.css +++ b/themes/nipponalba/static/css/style.css @@ -328,7 +328,7 @@ main { box-shadow: 0 2px 3px var(--shadow-colour); border: 1px solid var(--border-colour); border-radius:15px; - height: 770px; + height: 1030px; grid-column: 2; max-width:250px; width:rgb(255, 0, 0);px; @@ -575,7 +575,10 @@ main { .list-with-title .listing .listing-post a:hover { color: var(--link-colour); } - +.list-without-title{ + list-style: none; + padding: 5px 0; +} .readmore { font-size: 14px; text-align:left; @@ -668,6 +671,23 @@ ul li { list-style:circle; } +.panel{ + width:230px; + border-radius: 15px; + padding: 0; + border: 1px solid var(--border-colour); + margin: 0; +} +.panel-heading{ + border-bottom: 1px solid var(--border-colour); + text-align:left; + padding: 5px 10px; +} +#category-cloud{ + width:97%; + margin: 0 auto; + padding: 10px 0; +} @media screen and (max-width: 960px) { #page-top { width: 95%;