From 79acfcf1599496e67b20c39c00a100b07c383ab1 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 16 Mar 2019 17:43:05 +0100 Subject: theme: Add terrassa theme --- themes/terrassa/layouts/_default/baseof.html | 11 ++++++++++ themes/terrassa/layouts/_default/card.html | 28 +++++++++++++++++++++++++ themes/terrassa/layouts/_default/list.html | 11 ++++++++++ themes/terrassa/layouts/_default/single.html | 31 ++++++++++++++++++++++++++++ themes/terrassa/layouts/_default/tags.html | 12 +++++++++++ 5 files changed, 93 insertions(+) create mode 100644 themes/terrassa/layouts/_default/baseof.html create mode 100644 themes/terrassa/layouts/_default/card.html create mode 100644 themes/terrassa/layouts/_default/list.html create mode 100644 themes/terrassa/layouts/_default/single.html create mode 100644 themes/terrassa/layouts/_default/tags.html (limited to 'themes/terrassa/layouts/_default') diff --git a/themes/terrassa/layouts/_default/baseof.html b/themes/terrassa/layouts/_default/baseof.html new file mode 100644 index 0000000..6e1a936 --- /dev/null +++ b/themes/terrassa/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + +{{- partial "head.html" . -}} + + + {{- partial "header.html" . -}} + {{- block "main" . }}{{- end }} + {{- partial "footer.html" . -}} + + + \ No newline at end of file diff --git a/themes/terrassa/layouts/_default/card.html b/themes/terrassa/layouts/_default/card.html new file mode 100644 index 0000000..6a184f1 --- /dev/null +++ b/themes/terrassa/layouts/_default/card.html @@ -0,0 +1,28 @@ +
+
+

+ + {{ .Title }} + +

+ {{ if ne .Type "page" }} + {{ if and $.Site.Params.posts.showDate $.Site.Params.posts.showAuthor }} +

+ {{ dateFormat $.Site.Params.posts.dateFormat .Date }} By {{ $.Params.author }}. +

+ {{ else if $.Site.Params.posts.showDate }} +

{{ dateFormat $.Site.Params.posts.dateFormat .Date }}

+ {{ else if $.Site.Params.posts.showAuthor }} +

By {{ $.Params.author }}.

+ {{ end }} + {{ end }} +
+ +
+ {{ .Content | truncate 480 }} +
+ +
+ {{ .Render "tags" }} +
+
\ No newline at end of file diff --git a/themes/terrassa/layouts/_default/list.html b/themes/terrassa/layouts/_default/list.html new file mode 100644 index 0000000..c01a3b6 --- /dev/null +++ b/themes/terrassa/layouts/_default/list.html @@ -0,0 +1,11 @@ +{{ define "main" }} +
+ {{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "posts") }} + + {{ range $paginator.Pages }} + {{ .Render "card" }} + {{ end }} + + {{ template "_internal/pagination.html" . }} +
+{{ end }} \ No newline at end of file diff --git a/themes/terrassa/layouts/_default/single.html b/themes/terrassa/layouts/_default/single.html new file mode 100644 index 0000000..f6b15ae --- /dev/null +++ b/themes/terrassa/layouts/_default/single.html @@ -0,0 +1,31 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+ {{ if .Description }} +

{{ .Description }}

+ {{ end }} + {{ if ne .Type "page" }} + {{ if and $.Site.Params.posts.showDate $.Site.Params.posts.showAuthor }} + + {{ else if $.Site.Params.posts.showDate }} + + {{ else if $.Site.Params.posts.showAuthor }} + + {{ end }} + {{ end }} +
+ +
+ {{ .Content }} +
+ + {{ if ne .Type "page" }} +
+ {{ .Render "tags" }} +
+ {{ end }} +
+{{ end }} \ No newline at end of file diff --git a/themes/terrassa/layouts/_default/tags.html b/themes/terrassa/layouts/_default/tags.html new file mode 100644 index 0000000..4618ae3 --- /dev/null +++ b/themes/terrassa/layouts/_default/tags.html @@ -0,0 +1,12 @@ +{{ if and $.Site.Params.posts.showTags .Params.Tags }} + +{{ end }} -- cgit v1.2.3