diff options
author | mms <michal@sapka.me> | 2024-05-19 15:33:26 +0200 |
---|---|---|
committer | mms <michal@sapka.me> | 2024-05-19 15:33:26 +0200 |
commit | f4bb92435d069f84ce41d4ecae51641872de2270 (patch) | |
tree | e830735f772bd789473884dafbeabc8cad63dc8f /themes/trek/layouts/_default | |
parent | e25abc08a5d3e7b94b638d837d26acbc0b79f14b (diff) |
feat: themes
Diffstat (limited to 'themes/trek/layouts/_default')
-rw-r--r-- | themes/trek/layouts/_default/baseof.html | 17 | ||||
-rw-r--r-- | themes/trek/layouts/_default/home.html | 7 | ||||
-rw-r--r-- | themes/trek/layouts/_default/list.html | 8 | ||||
-rw-r--r-- | themes/trek/layouts/_default/single.html | 10 |
4 files changed, 42 insertions, 0 deletions
diff --git a/themes/trek/layouts/_default/baseof.html b/themes/trek/layouts/_default/baseof.html new file mode 100644 index 0000000..ce9613a --- /dev/null +++ b/themes/trek/layouts/_default/baseof.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html lang="{{ or site.Language.LanguageCode site.Language.Lang }}" dir="{{ or site.Language.LanguageDirection `ltr` }}"> +<head> + {{ partial "head.html" . }} +</head> +<body> + <header> + {{ partial "header.html" . }} + </header> + <main> + {{ block "main" . }}{{ end }} + </main> + <footer> + {{ partial "footer.html" . }} + </footer> +</body> +</html> diff --git a/themes/trek/layouts/_default/home.html b/themes/trek/layouts/_default/home.html new file mode 100644 index 0000000..0df6597 --- /dev/null +++ b/themes/trek/layouts/_default/home.html @@ -0,0 +1,7 @@ +{{ define "main" }} + {{ .Content }} + {{ range site.RegularPages }} + <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ .Summary }} + {{ end }} +{{ end }} diff --git a/themes/trek/layouts/_default/list.html b/themes/trek/layouts/_default/list.html new file mode 100644 index 0000000..50fc92d --- /dev/null +++ b/themes/trek/layouts/_default/list.html @@ -0,0 +1,8 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + {{ .Content }} + {{ range .Pages }} + <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ .Summary }} + {{ end }} +{{ end }} diff --git a/themes/trek/layouts/_default/single.html b/themes/trek/layouts/_default/single.html new file mode 100644 index 0000000..7e286c8 --- /dev/null +++ b/themes/trek/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ define "main" }} + <h1>{{ .Title }}</h1> + + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> + + {{ .Content }} + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +{{ end }} |