diff --git a/layouts/_default/list.html b/layouts/_default/list.html deleted file mode 100644 index 3b8774f..0000000 --- a/layouts/_default/list.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ define "main"}} -

{{ .Title }}

- {{ partial "header.html" . }} - -
- {{ .Content }} -
- {{ partial "footer.html" . }} -{{ end }} diff --git a/layouts/tags/baseof.html b/layouts/tags/baseof.html new file mode 100644 index 0000000..0ab5755 --- /dev/null +++ b/layouts/tags/baseof.html @@ -0,0 +1,7 @@ + + + {{ partial "head.html" . }} + + {{ block "main" . }}{{ end }} + + diff --git a/layouts/tags/list.html b/layouts/tags/list.html new file mode 100644 index 0000000..178307d --- /dev/null +++ b/layouts/tags/list.html @@ -0,0 +1,39 @@ +{{ define "main"}} +

{{ .Title }}

+ {{ partial "header.html" . }} + + + +
+ +
+ +
+ +
+ {{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}} + {{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }} + {{ if (ne $index 0) }} +
+ {{ end }} +

{{ .Key }}

+ {{ range .Pages }} +

{{ .Title }}

+ {{ end }} + {{ end }} +
+ {{ partial "footer.html" . }} + {{ $jquery := resources.Get "js/jquery-3.3.1.min.js" }} + {{ $mark := resources.Get "js/jquery.mark.es6.min.js" }} + {{ $lunr := resources.Get "js/lunr.js" }} + {{ $search := resources.Get "js/search.js" }} + {{ $js := slice $jquery $mark $lunr $search | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint }} + +{{ end }} diff --git a/layouts/tags/list.json b/layouts/tags/list.json new file mode 100644 index 0000000..dc748c1 --- /dev/null +++ b/layouts/tags/list.json @@ -0,0 +1,10 @@ +[{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }} + { + "ref": "{{ $page.Permalink }}", + "title": {{ $page.Title | jsonify }}, + "section": "{{ $page.Section }}", + "tags": {{ $page.Params.tags | jsonify }}, + "date" : {{ $page.Date.Format "2006.01.02" | jsonify }}, + "body": {{ $page.Plain | jsonify }} + } +{{ end }}] diff --git a/layouts/tags/rss.xml b/layouts/tags/rss.xml new file mode 100644 index 0000000..3e17f48 --- /dev/null +++ b/layouts/tags/rss.xml @@ -0,0 +1,34 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := $pctx.RegularPages -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | html }} + + {{ end }} + + \ No newline at end of file diff --git a/layouts/tags/single.html b/layouts/tags/single.html new file mode 100644 index 0000000..7a5a0c5 --- /dev/null +++ b/layouts/tags/single.html @@ -0,0 +1,23 @@ +{{ define "main"}} +

{{ .Title }}

+ {{ partial "header.html" . }} + + {{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}} +

{{ .Date.Format $singlePageDateFormat }}

+ +
+ +
+ +
+ {{ .Content }} +
+ {{ partial "footer.html" . }} +{{ end }} diff --git a/layouts/tags/terms.html b/layouts/tags/terms.html new file mode 100644 index 0000000..e729689 --- /dev/null +++ b/layouts/tags/terms.html @@ -0,0 +1,13 @@ +{{ define "main"}} +

{{ .Title }}

+ {{ partial "header.html" . }} + +
+ +
+ {{ partial "footer.html" . }} +{{ end }}