+
- {{- $taxoterms := .GetTerms "languages" }}
- {{- $taxoterms = $taxoterms | append (.GetTerms "levels") }}
- {{- $taxoterms = $taxoterms | append (.GetTerms "subjects") }}
- {{- range $taxoterms }}
- {{- .Page.LinkTitle }}
+ {{- $langs := .GetTerms "languages" }}
+ {{ partial "languages" $langs }}
+ {{- $tags := .GetTerms "tags" }}
+ {{- range $tags }}
+ {{ template "termchip" .Page.LinkTitle }}
{{- end }}
{{- with .Params.time }}
-
- {{ partialCached "icon" "schedule" "schedule" }}
- {{ . }}
-
+
+ {{ partialCached "icon" "schedule" "schedule" }}
+ {{ . }}
+
{{- end }}
{{- end }}
+
+{{- define "termchip" }}
+
+
+ {{ partialCached "icon" "tag" "tag" }}
+
+ {{ . }}
+
+{{- end }}
diff --git a/layouts/partials/content-default.html b/layouts/partials/content-default.html
index 1355c77201..e5bb568595 100644
--- a/layouts/partials/content-default.html
+++ b/layouts/partials/content-default.html
@@ -2,6 +2,13 @@
{{ partial "breadcrumbs.html" . }}
+ {{- if ne .Type "guides" }}
+ {{ with .GetTerms "tags" }}
+
+ {{- partial "tags.html" . }}
+
+ {{- end }}
+ {{- end }}
{{ partialCached "pagemeta.html" . . }}
diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html
index 1c78d99ef1..b09d1634e7 100644
--- a/layouts/partials/icon.html
+++ b/layouts/partials/icon.html
@@ -1,8 +1,8 @@
{{- $svg := resources.Get (fmt.Printf "icons/%s-fill.svg" .) }}
{{- if not $svg }}
- {{- errorf "Failed to get icon: %s" . }}
+ {{- errorf "Failed to get icon: %v\n\n" . }}
{{ end }}
{{- if not $svg.Content }}
- {{- errorf "Failed to get icon: %s" . }}
+ {{- errorf "Failed to get icon: %v\n\n" . }}
{{- end }}
{{- safe.HTML $svg.Content -}}
diff --git a/layouts/partials/languages.html b/layouts/partials/languages.html
new file mode 100644
index 0000000000..8f3f5bef30
--- /dev/null
+++ b/layouts/partials/languages.html
@@ -0,0 +1,21 @@
+{{- /*
+ List of languages (taxonomy) chips with images
+ Context: page.Pages
+ */
+-}}
+{{- range . -}}
+ {{- if eq .File nil }}
+ {{- errorf "[languages] Undefined language: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
+ {{- end }}
+ {{- if not .Page.Params.icon }}
+ {{- errorf "[languages] language is missing an icon: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
+ {{- end }}
+
+
+ {{ .Page.LinkTitle }}
+
+{{- end -}}
+
diff --git a/layouts/partials/pagemeta.html b/layouts/partials/pagemeta.html
index 9e2e56546b..f799522409 100644
--- a/layouts/partials/pagemeta.html
+++ b/layouts/partials/pagemeta.html
@@ -2,24 +2,13 @@
{{- with .Fragments }}
{{- $toc = and (ne page.Params.notoc true) .Headings }}
{{- end }}
-{{- $tags := .GetTerms "tags" }}
-{{- if or $toc $tags }}
+{{- with $toc }}
- {{- with $tags }}
-
-
Tags
-
- {{- partial "tags.html" . -}}
-
-
- {{- end }}
- {{- with $toc }}
-
{{ T "tableOfContents" }}
-
- {{- end }}
+
{{ T "tableOfContents" }}
+
{{- end }}
diff --git a/layouts/partials/sidebar/guides.html b/layouts/partials/sidebar/guides.html
index 1fa3f19e5e..18a40510f1 100644
--- a/layouts/partials/sidebar/guides.html
+++ b/layouts/partials/sidebar/guides.html
@@ -9,18 +9,15 @@
{{ $root.Title }}
{{ $root.Summary }}
-
- {{- with ($root.GetTerms "levels") }}
-
- {{ partialCached "icon" "school" "school" }}
-
- {{- range $i, $e := . -}}
- {{- if $i -}},{{ end -}}
- {{- .Page.Title -}}
- {{- end -}}
-
-
- {{- end -}}
+
+
+ {{- with ($root.GetTerms "languages") }}
+ {{ partial "languages.html" . }}
+ {{- end }}
+ {{- with ($root.GetTerms "tags") }}
+ {{ partial "tags.html" . }}
+ {{- end }}
+
{{- with ($root.Params.time) }}
-
- {{- $curr := page }}
+
+ {{- $curr := .FirstSection }}
+ {{- if eq $curr site.Home }}
+ {{- $curr = . }}
+ {{- end }}
{{- range site.Menus.main }}
- {{- if .Page.IsAncestor page }}
+ {{- if or (.Page.IsAncestor page) (eq .Page page) }}
{{- $curr = .Page }}
{{- end }}
{{- end }}
diff --git a/layouts/partials/sidebar/tags.html b/layouts/partials/sidebar/tags.html
index cb2eec7422..e4a8ae9c1c 100644
--- a/layouts/partials/sidebar/tags.html
+++ b/layouts/partials/sidebar/tags.html
@@ -1,11 +1,10 @@
-
+
{{- range site.Taxonomies.tags }}
-
- {{- partialCached "icon.html" .Page.Params.icon .Page.Params.icon -}}
{{ .Page.LinkTitle }}
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
index 9846805e05..63eece3939 100644
--- a/layouts/partials/tags.html
+++ b/layouts/partials/tags.html
@@ -1,13 +1,20 @@
{{- /*
List of tag "chips" as links
Context: page.Pages
- */ -}}
+ */
+-}}
{{- range . -}}
-{{- if eq .File nil }}
- {{- errorf "[tags] Undefined tag: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
-{{- end }}
-
- {{ partialCached "icon" .Params.icon .Params.icon }}
- {{ .LinkTitle }}
+ {{- if eq .File nil }}
+ {{- errorf "[tags] Undefined tag: '%s' in %s" (urlize (strings.ToLower .Title)) page.File.Filename }}
+ {{- end }}
+
+
+ {{ partialCached "icon" "tag" "tag" }}
+
+ {{ .LinkTitle }}
{{- end -}}
diff --git a/layouts/partials/utils/filter-terms.html b/layouts/partials/utils/filter-terms.html
deleted file mode 100644
index 9e7b7f98ee..0000000000
--- a/layouts/partials/utils/filter-terms.html
+++ /dev/null
@@ -1,11 +0,0 @@
-{{- $currentPage := .page }}
-{{- $taxonomies := .taxonomies }}
-{{- $scratch := collections.NewScratch }}
-{{- range $taxo := $taxonomies }}
- {{- $terms := slice }}
- {{- range ($currentPage.GetTerms $taxo) }}
- {{- $terms = $terms | append .Page.Data.Term }}
- {{- end }}
- {{ $scratch.SetInMap "filters" $taxo $terms }}
-{{- end }}
-{{- return ($scratch.Get "filters") }}
diff --git a/layouts/tag/taxonomy.html b/layouts/tag/taxonomy.html
index f0eafa8014..aa642acf7a 100644
--- a/layouts/tag/taxonomy.html
+++ b/layouts/tag/taxonomy.html
@@ -6,19 +6,18 @@
{{ define "main" }}
{{ partial "breadcrumbs.html" . }}
-
+
{{ .Content }}
-
+
{{ range site.Taxonomies.tags }}
- {{ partial "components/card.html"
- (dict
- "link" .Page.Permalink
- "title" .Page.Title
- "description" .Page.Description
- "icon" .Page.Params.icon
- )
- }}
+ -
+ {{ .Page.Title }}
+ ({{ (len .Pages) }} {{ cond (gt (len .Pages) 1) "pages" "page" }})
+
{{ end }}
-
+
{{ end }}
diff --git a/layouts/tag/term.html b/layouts/tag/term.html
index 001e2d7ed0..0f46121ace 100644
--- a/layouts/tag/term.html
+++ b/layouts/tag/term.html
@@ -1,44 +1,25 @@
{{ define "left" }}
+ {{ partial "sidebar/mainnav.html" . }}
{{ partial "sidebar/tags.html" . }}
{{ end }}
{{ define "main" }}
{{ partial "breadcrumbs.html" . }}
-
-
-
- Title |
- Section |
-
-
-
- {{ range .Paginator.Pages }}
-
-
-
- {{ .Title }}
-
- |
-
-
- {{- range .Ancestors.Reverse }}
- {{ .Title }} /
- {{- end }}
-
- |
-
- {{ end }}
-
-
+ {{- range .Pages.GroupBy "Type" }}
+ {{ (site.GetPage .Key).LinkTitle }}
+
+ {{- end }}
{{ end }}