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/404.html | 5 ++ 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 ++++ themes/terrassa/layouts/contact/list.html | 46 +++++++++++++++ themes/terrassa/layouts/index.html | 4 ++ themes/terrassa/layouts/partials/cta-btn.html | 4 ++ themes/terrassa/layouts/partials/footer.html | 66 ++++++++++++++++++++++ .../terrassa/layouts/partials/hamburger-menu.html | 18 ++++++ themes/terrassa/layouts/partials/head.html | 21 +++++++ themes/terrassa/layouts/partials/header.html | 14 +++++ themes/terrassa/layouts/partials/hero.html | 10 ++++ themes/terrassa/layouts/partials/menu.html | 13 +++++ themes/terrassa/layouts/partials/scripts.html | 8 +++ themes/terrassa/layouts/partials/section.html | 6 ++ themes/terrassa/layouts/partials/sections.html | 10 ++++ themes/terrassa/layouts/partials/separator.html | 3 + themes/terrassa/layouts/partials/styles.html | 9 +++ 20 files changed, 330 insertions(+) create mode 100644 themes/terrassa/layouts/404.html 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 create mode 100644 themes/terrassa/layouts/contact/list.html create mode 100644 themes/terrassa/layouts/index.html create mode 100644 themes/terrassa/layouts/partials/cta-btn.html create mode 100644 themes/terrassa/layouts/partials/footer.html create mode 100644 themes/terrassa/layouts/partials/hamburger-menu.html create mode 100644 themes/terrassa/layouts/partials/head.html create mode 100644 themes/terrassa/layouts/partials/header.html create mode 100644 themes/terrassa/layouts/partials/hero.html create mode 100644 themes/terrassa/layouts/partials/menu.html create mode 100644 themes/terrassa/layouts/partials/scripts.html create mode 100644 themes/terrassa/layouts/partials/section.html create mode 100644 themes/terrassa/layouts/partials/sections.html create mode 100644 themes/terrassa/layouts/partials/separator.html create mode 100644 themes/terrassa/layouts/partials/styles.html (limited to 'themes/terrassa/layouts') diff --git a/themes/terrassa/layouts/404.html b/themes/terrassa/layouts/404.html new file mode 100644 index 0000000..2384d5a --- /dev/null +++ b/themes/terrassa/layouts/404.html @@ -0,0 +1,5 @@ +{{ define "main" }} +
+

404

+
+{{ end }} \ No newline at end of file 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 }} diff --git a/themes/terrassa/layouts/contact/list.html b/themes/terrassa/layouts/contact/list.html new file mode 100644 index 0000000..83b7402 --- /dev/null +++ b/themes/terrassa/layouts/contact/list.html @@ -0,0 +1,46 @@ +{{ define "main" }} +
+

{{ .Title }}

+

{{ .Description }}

+ + {{ if $.Site.Params.form.netlify }} +
+ {{ else }} + + {{ end }} + + +
+ + +
+ + + + + +
+ + +
+ + +
+ +
+ +
+
+{{ end }} \ No newline at end of file diff --git a/themes/terrassa/layouts/index.html b/themes/terrassa/layouts/index.html new file mode 100644 index 0000000..8575e89 --- /dev/null +++ b/themes/terrassa/layouts/index.html @@ -0,0 +1,4 @@ +{{ define "main" }} +{{ partial "hero.html" . }} +{{ partial "sections.html" . }} +{{ end }} \ No newline at end of file diff --git a/themes/terrassa/layouts/partials/cta-btn.html b/themes/terrassa/layouts/partials/cta-btn.html new file mode 100644 index 0000000..1d7b73f --- /dev/null +++ b/themes/terrassa/layouts/partials/cta-btn.html @@ -0,0 +1,4 @@ + + {{ .Site.Params.cta.cta }} + \ No newline at end of file diff --git a/themes/terrassa/layouts/partials/footer.html b/themes/terrassa/layouts/partials/footer.html new file mode 100644 index 0000000..b2b27bc --- /dev/null +++ b/themes/terrassa/layouts/partials/footer.html @@ -0,0 +1,66 @@ + \ No newline at end of file diff --git a/themes/terrassa/layouts/partials/hamburger-menu.html b/themes/terrassa/layouts/partials/hamburger-menu.html new file mode 100644 index 0000000..40a9ad8 --- /dev/null +++ b/themes/terrassa/layouts/partials/hamburger-menu.html @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/themes/terrassa/layouts/partials/head.html b/themes/terrassa/layouts/partials/head.html new file mode 100644 index 0000000..a2885d2 --- /dev/null +++ b/themes/terrassa/layouts/partials/head.html @@ -0,0 +1,21 @@ + + + + + + {{ .Site.Title }} - {{ .Title }} + + + + {{ .Hugo.Generator }} + + {{ if .Site.GoogleAnalytics }} + {{ template "_internal/google_analytics.html" . }} + {{ end }} + + {{ template "_internal/twitter_cards.html" . }} + {{ template "_internal/opengraph.html" . }} + + + {{ partial "styles.html" . }} + \ No newline at end of file diff --git a/themes/terrassa/layouts/partials/header.html b/themes/terrassa/layouts/partials/header.html new file mode 100644 index 0000000..73142ae --- /dev/null +++ b/themes/terrassa/layouts/partials/header.html @@ -0,0 +1,14 @@ +
+ + + {{ partial "menu.html" . }} + {{ partial "hamburger-menu.html" . }} +
diff --git a/themes/terrassa/layouts/partials/hero.html b/themes/terrassa/layouts/partials/hero.html new file mode 100644 index 0000000..138d674 --- /dev/null +++ b/themes/terrassa/layouts/partials/hero.html @@ -0,0 +1,10 @@ +
+
+ {{ .Content }} + {{ if .Site.Params.cta.show }} + {{ partial "cta-btn.html" . }} + {{ end }} +
+
\ No newline at end of file diff --git a/themes/terrassa/layouts/partials/menu.html b/themes/terrassa/layouts/partials/menu.html new file mode 100644 index 0000000..abfb92b --- /dev/null +++ b/themes/terrassa/layouts/partials/menu.html @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/themes/terrassa/layouts/partials/scripts.html b/themes/terrassa/layouts/partials/scripts.html new file mode 100644 index 0000000..46beb79 --- /dev/null +++ b/themes/terrassa/layouts/partials/scripts.html @@ -0,0 +1,8 @@ +{{ $header := resources.Get "js/header.js" }} +{{ $form := resources.Get "js/form.js" }} +{{ $bundle := slice $header $form | resources.Concat "js/bundle.js" }} +{{ $js := $bundle | resources.Minify | resources.Fingerprint "sha512" }} + + + \ No newline at end of file diff --git a/themes/terrassa/layouts/partials/section.html b/themes/terrassa/layouts/partials/section.html new file mode 100644 index 0000000..ef05877 --- /dev/null +++ b/themes/terrassa/layouts/partials/section.html @@ -0,0 +1,6 @@ +
+

{{ .Title }}

+
+ {{ .Content }} +
+
\ No newline at end of file diff --git a/themes/terrassa/layouts/partials/sections.html b/themes/terrassa/layouts/partials/sections.html new file mode 100644 index 0000000..6d4cfc3 --- /dev/null +++ b/themes/terrassa/layouts/partials/sections.html @@ -0,0 +1,10 @@ +{{ $items := (where $.Site.RegularPages "Type" "sections") }} +{{ $len := (len $items) }} + +{{ range $i, $e := $items }} +{{ partial "section.html" .}} + +{{ if ne (add $i 1) $len }} +{{ partial "separator.html" . }} +{{ end }} +{{ end}} \ No newline at end of file diff --git a/themes/terrassa/layouts/partials/separator.html b/themes/terrassa/layouts/partials/separator.html new file mode 100644 index 0000000..e890b22 --- /dev/null +++ b/themes/terrassa/layouts/partials/separator.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/themes/terrassa/layouts/partials/styles.html b/themes/terrassa/layouts/partials/styles.html new file mode 100644 index 0000000..4dd5827 --- /dev/null +++ b/themes/terrassa/layouts/partials/styles.html @@ -0,0 +1,9 @@ +{{ $reset := resources.Get "css/reset.css" }} +{{ $base := resources.Get "css/base.css" }} +{{ $style := resources.Get "css/style.css" }} +{{ $media := resources.Get "css/media-queries.css" }} +{{ $animations := resources.Get "css/animations.css" }} +{{ $bundle := slice $reset $base $style $media $animations | resources.Concat "css/bundle.css" }} +{{ $css := $bundle | resources.Minify | resources.Fingerprint "sha512" }} + + \ No newline at end of file -- cgit v1.2.3