{{ .Title }}
{{ .Content }} -Featured
-{{ .Title }}
- -{{ .Summary }}
-- {{- $taxonomies := slice "products" "subjects" "levels" "languages" }} -
All guides
- {{- range .Pages }} - {{- $opts := dict "page" . "taxonomies" $taxonomies }} - {{- $filters := partial "utils/filter-terms.html" $opts }} - -Featured guides
+{{ .Title }}
+ +{{ .Summary }}
++
All guides
+Filtered results: showing out of guides.
+{{ .Title }}
+ {{- if ne .Type "guides" }} + {{ with .GetTerms "tags" }} +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 }}
-
+
- - {{- 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 }} - -
- + {{ .Page.Title }} + ({{ (len .Pages) }} {{ cond (gt (len .Pages) 1) "pages" "page" }}) + {{ end }} -
- + {{ .Title }} + + {{- end }} +
-
{{- range site.Taxonomies.tags }}
{{ .Title }}
++ {{ partialCached "icon" "tag" "tag" }} + {{ .Title }} +
{{ .Content }} --
{{ range site.Taxonomies.tags }}
- {{ partial "components/card.html"
- (dict
- "link" .Page.Permalink
- "title" .Page.Title
- "description" .Page.Description
- "icon" .Page.Params.icon
- )
- }}
+
- {{ partialCached "icon" .Params.icon .Params.icon }}
+
+ {{ partialCached "icon" "tag" "tag" }}
{{ .Title }}
{{ .Content }}
-
- Pages with this tag:
- {{ partial "pagination.html" . }}
-
-
Title | -Section | -
---|---|
- - {{ .Title }} - - | -- - {{- range .Ancestors.Reverse }} - {{ .Title }} / - {{- end }} - - | -
{{ (site.GetPage .Key).LinkTitle }}
+-
+ {{ range .Pages }}
+