Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matcornic/hugo-theme-learn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Taylor <matthew@m-taylor.co.uk>2019-03-26 00:01:40 +0300
committerMatthew Taylor <matthew@m-taylor.co.uk>2019-03-26 00:01:40 +0300
commite7a190392abee26fe07e598da3a6ad86b93e2267 (patch)
treebb929f15b5bcd62317b6bbcfbc78877fd7eb72ac /layouts
parent26748c29e91589159d66e7eaf4f71c7bce8c7ce2 (diff)
parent6207c44b5ce7b7148b6f8ba148b776c311d8c1ae (diff)
Merge branch 'master' of https://github.com/pdelaby/hugo-theme-learn into pdelaby-master
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html12
-rw-r--r--layouts/partials/header.html12
-rw-r--r--layouts/partials/tags.html7
3 files changed, 28 insertions, 3 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index d9598ac..e0c466d 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,6 +1,16 @@
{{ partial "header.html" . }}
-{{ .Content }}
+{{ if eq .Kind "section" }}
+ {{ .Content }}
+{{end}}
+
+{{ if or (eq .Kind "taxonomy") (eq .Kind "taxonomyTerm") }}
+<ul>
+ {{ range .Pages }}
+ <li><a href="{{.URL}}">{{.Title}}</a></li>
+ {{ end }}
+</ul>
+{{end}}
<footer class=" footline" >
{{with .Params.LastModifierDisplayName}}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index ef92973..c950a3f 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -80,13 +80,20 @@
</div>
</div>
{{ end }}
-
+ <div id="head-tags">
+ {{ partial "tags.html" . }}
+ </div>
{{ if .Params.chapter }}
<div id="chapter">
{{ end }}
<div id="body-inner">
{{if and (not .IsHome) (not .Params.chapter) }}
- <h1>{{.Title}}</h1>
+ <h1>
+ {{ if eq .Kind "taxonomy" }}
+ {{.Kind}} ::
+ {{ end }}
+ {{.Title}}
+ </h1>
{{end}}
{{define "breadcrumb"}}
@@ -98,3 +105,4 @@
{{.value|safeHTML}}
{{end}}
{{end}}
+
diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html
new file mode 100644
index 0000000..48790d8
--- /dev/null
+++ b/layouts/partials/tags.html
@@ -0,0 +1,7 @@
+{{ if .Params.tags }}
+<div class="tags">
+{{range .Params.tags}}
+ <a class="tag-link" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
+{{end}}
+</div>
+{{end}} \ No newline at end of file