aboutsummaryrefslogtreecommitdiff
path: root/themes/terrassa/layouts
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2019-06-19 20:30:25 +0200
committerDimitri Staessens <dimitri@ouroboros.rocks>2019-06-19 20:30:25 +0200
commit2a2311ea3fb1b89a266668bfd16aa96475fc183e (patch)
tree29af79791f578612ef759b9d2421a3fc7c5690ee /themes/terrassa/layouts
parentd3198abf51c1785994bbbbebd195aad44978e5ff (diff)
downloadwebsite-2a2311ea3fb1b89a266668bfd16aa96475fc183e.tar.gz
website-2a2311ea3fb1b89a266668bfd16aa96475fc183e.zip
theme: Update terrassa theme to newest version
This updates the terrassa theme to the latest version.
Diffstat (limited to 'themes/terrassa/layouts')
-rw-r--r--themes/terrassa/layouts/_default/list.html12
-rw-r--r--themes/terrassa/layouts/_default/single.html6
-rw-r--r--themes/terrassa/layouts/partials/cta-btn.html4
-rw-r--r--themes/terrassa/layouts/partials/fontawesome.html15
-rw-r--r--themes/terrassa/layouts/partials/head.html32
-rw-r--r--themes/terrassa/layouts/partials/header.html3
-rw-r--r--themes/terrassa/layouts/partials/hero.html6
-rw-r--r--themes/terrassa/layouts/partials/scripts.html4
-rw-r--r--themes/terrassa/layouts/partials/sections.html6
-rw-r--r--themes/terrassa/layouts/partials/styles.html6
10 files changed, 60 insertions, 34 deletions
diff --git a/themes/terrassa/layouts/_default/list.html b/themes/terrassa/layouts/_default/list.html
index c01a3b6..06390f4 100644
--- a/themes/terrassa/layouts/_default/list.html
+++ b/themes/terrassa/layouts/_default/list.html
@@ -1,11 +1,11 @@
{{ define "main" }}
<main class="content">
- {{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "posts") }}
+ {{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "posts") }}
- {{ range $paginator.Pages }}
- {{ .Render "card" }}
- {{ end }}
+ {{ range $paginator.Pages }}
+ {{ .Render "card" }}
+ {{ end }}
- {{ template "_internal/pagination.html" . }}
+ {{ template "_internal/pagination.html" . }}
</main>
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/themes/terrassa/layouts/_default/single.html b/themes/terrassa/layouts/_default/single.html
index f6b15ae..9f108f7 100644
--- a/themes/terrassa/layouts/_default/single.html
+++ b/themes/terrassa/layouts/_default/single.html
@@ -18,9 +18,15 @@
{{ end }}
</header>
+ {{ if ne .Type "page" }}
<main class="post__body">
{{ .Content }}
</main>
+ {{ else }}
+ <main class="post__body" style="margin-bottom: 3rem;">
+ {{ .Content }}
+ </main>
+ {{ end }}
{{ if ne .Type "page" }}
<footer class="post__footer">
diff --git a/themes/terrassa/layouts/partials/cta-btn.html b/themes/terrassa/layouts/partials/cta-btn.html
index 1d7b73f..81f63a0 100644
--- a/themes/terrassa/layouts/partials/cta-btn.html
+++ b/themes/terrassa/layouts/partials/cta-btn.html
@@ -1,4 +1,4 @@
<a href="{{ $.Site.BaseURL }}{{ $.Site.Params.cta.link }}" class="ripple-btn cta__btn" alt="{{ $.Site.Params.cta.cta }}"
- aria-label="{{ $.Site.Params.cta.cta }}}">
- {{ .Site.Params.cta.cta }}
+ aria-label="{{ $.Site.Params.cta.cta }}">
+ {{ $.Site.Params.cta.cta }}
</a> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/fontawesome.html b/themes/terrassa/layouts/partials/fontawesome.html
new file mode 100644
index 0000000..6cc5fd5
--- /dev/null
+++ b/themes/terrassa/layouts/partials/fontawesome.html
@@ -0,0 +1,15 @@
+{{ $version := "5.7.2" }}
+{{ $integrity := "sha384-0pzryjIRos8mFBWMzSSZApWtPl/5++eIfzYmTgBBmXYdhvxPc+XcFEk+zJwDgWbP" }}
+{{ if and $.Site.Params.fa.version $.Site.Params.fa.integrity }}
+{{ $version = $.Site.Params.fa.version }}
+{{ $integrity = $.Site.Params.fa.integrity }}
+{{ end }}
+
+{{ $src := printf "%s%s%s" "https://use.fontawesome.com/releases/v" $version "/js/all.js" }}
+
+<script
+ defer
+ src="{{ $src }}"
+ integrity="{{ $integrity }}"
+ crossorigin="anonymous"
+></script>
diff --git a/themes/terrassa/layouts/partials/head.html b/themes/terrassa/layouts/partials/head.html
index a2885d2..8d0b97f 100644
--- a/themes/terrassa/layouts/partials/head.html
+++ b/themes/terrassa/layouts/partials/head.html
@@ -1,21 +1,21 @@
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="robots" content="index, follow">
- <meta name="googlebot" content="index, follow, noarchive">
- <title>{{ .Site.Title }} - {{ .Title }}</title>
- <link rel="icon" href="{{ $.Site.BaseURL }}{{ $.Site.Params.favicon }}">
- <meta name="description" content="{{ $.Site.Params.description }}">
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="robots" content="index, follow" />
+ <meta name="googlebot" content="index, follow, noarchive" />
+ <title>{{ $.Site.Title }} - {{ .Title }}</title>
+ <link rel="icon" href="{{ $.Site.BaseURL }}{{ $.Site.Params.favicon }}" />
+ <meta name="description" content="{{ $.Site.Params.description }}" />
- {{ .Hugo.Generator }}
+ {{ hugo.Generator }}
- {{ if .Site.GoogleAnalytics }}
- {{ template "_internal/google_analytics.html" . }}
- {{ end }}
+ {{ if .Site.GoogleAnalytics }}
+ {{ template "_internal/google_analytics.html" . }}
+ {{ end }}
- {{ template "_internal/twitter_cards.html" . }}
- {{ template "_internal/opengraph.html" . }}
+ {{ template "_internal/twitter_cards.html" . }}
+ {{ template "_internal/opengraph.html" . }}
- <!-- CSS -->
- {{ partial "styles.html" . }}
-</head> \ No newline at end of file
+ <!-- CSS -->
+ {{ partial "styles.html" . }}
+</head>
diff --git a/themes/terrassa/layouts/partials/header.html b/themes/terrassa/layouts/partials/header.html
index 8016264..212f470 100644
--- a/themes/terrassa/layouts/partials/header.html
+++ b/themes/terrassa/layouts/partials/header.html
@@ -11,5 +11,4 @@
{{ partial "menu.html" . }}
{{ partial "hamburger-menu.html" . }}
- {{ partial "matomo/analytics.html" . }}
-</header>
+</header> \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/hero.html b/themes/terrassa/layouts/partials/hero.html
index 138d674..d3c2a30 100644
--- a/themes/terrassa/layouts/partials/hero.html
+++ b/themes/terrassa/layouts/partials/hero.html
@@ -1,9 +1,9 @@
-<main class="hero" {{ if $.Params.images }} style="background-image: url('{{ $.Site.BaseURL }}images/{{ print (index $.Params.images 0) }}');"
- {{ end }}>
+<main class="hero" {{ if $.Params.images }}
+ style="background-image: url('{{ $.Site.BaseURL }}images/{{ print (index $.Params.images 0) }}');" {{ end }}>
<div class="hero__caption" {{ if $.Site.Params.hero.textColor }} style="color: {{ $.Site.Params.hero.textColor }};"
{{ end }}>
{{ .Content }}
- {{ if .Site.Params.cta.show }}
+ {{ if $.Site.Params.cta.show }}
{{ partial "cta-btn.html" . }}
{{ end }}
</div>
diff --git a/themes/terrassa/layouts/partials/scripts.html b/themes/terrassa/layouts/partials/scripts.html
index 46beb79..63e20b1 100644
--- a/themes/terrassa/layouts/partials/scripts.html
+++ b/themes/terrassa/layouts/partials/scripts.html
@@ -4,5 +4,5 @@
{{ $js := $bundle | resources.Minify | resources.Fingerprint "sha512" }}
<script src="{{ $js.Permalink }}"></script>
-<script defer src="https://use.fontawesome.com/releases/v5.6.1/js/all.js" integrity="sha384-R5JkiUweZpJjELPWqttAYmYM1P3SNEJRM6ecTQF05pFFtxmCO+Y1CiUhvuDzgSVZ"
- crossorigin="anonymous"></script> \ No newline at end of file
+
+{{ partial "fontawesome.html" . }}
diff --git a/themes/terrassa/layouts/partials/sections.html b/themes/terrassa/layouts/partials/sections.html
index 6d4cfc3..eda7fd2 100644
--- a/themes/terrassa/layouts/partials/sections.html
+++ b/themes/terrassa/layouts/partials/sections.html
@@ -2,9 +2,13 @@
{{ $len := (len $items) }}
{{ range $i, $e := $items }}
-{{ partial "section.html" .}}
+{{ partial "section.html" . }}
{{ if ne (add $i 1) $len }}
+
+{{ if $.Site.Params.separator.show }}
{{ partial "separator.html" . }}
+{{ end }}
+
{{ end }}
{{ end}} \ No newline at end of file
diff --git a/themes/terrassa/layouts/partials/styles.html b/themes/terrassa/layouts/partials/styles.html
index 4dd5827..cf06c3a 100644
--- a/themes/terrassa/layouts/partials/styles.html
+++ b/themes/terrassa/layouts/partials/styles.html
@@ -3,7 +3,9 @@
{{ $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" }}
+{{ $custom := resources.Get "css/custom.css" }}
+{{ $bundle := slice $reset $base $style $media $animations $custom | resources.Concat "css/bundle.css" }}
+
+{{ $css := $bundle | resources.Minify }}
<link rel="stylesheet" href="{{ $css.Permalink }}"> \ No newline at end of file