aboutsummaryrefslogtreecommitdiff
path: root/themes/terrassa/layouts/_default/card.html
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2019-03-16 17:43:05 +0100
committerDimitri Staessens <[email protected]>2019-03-16 17:43:05 +0100
commit79acfcf1599496e67b20c39c00a100b07c383ab1 (patch)
tree0651646a631545b2ff56074f4c8f492d69dbb170 /themes/terrassa/layouts/_default/card.html
parent4b98568dbdc0dddf8255abbbb08565821b79f839 (diff)
downloadwebsite-79acfcf1599496e67b20c39c00a100b07c383ab1.tar.gz
website-79acfcf1599496e67b20c39c00a100b07c383ab1.zip
theme: Add terrassa theme
Diffstat (limited to 'themes/terrassa/layouts/_default/card.html')
-rw-r--r--themes/terrassa/layouts/_default/card.html28
1 files changed, 28 insertions, 0 deletions
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 @@
+<article class="card">
+ <header class="card__header">
+ <h1 class="card__header__title">
+ <a href="{{ .Permalink }}" class="card__header__link" alt="{{ .Title }}.">
+ {{ .Title }}
+ </a>
+ </h1>
+ {{ if ne .Type "page" }}
+ {{ if and $.Site.Params.posts.showDate $.Site.Params.posts.showAuthor }}
+ <p class="card__header__date date">
+ {{ dateFormat $.Site.Params.posts.dateFormat .Date }} By {{ $.Params.author }}.
+ </p>
+ {{ else if $.Site.Params.posts.showDate }}
+ <p class="card__header__date date">{{ dateFormat $.Site.Params.posts.dateFormat .Date }}</p>
+ {{ else if $.Site.Params.posts.showAuthor }}
+ <p class="card__header__author author">By {{ $.Params.author }}.</p>
+ {{ end }}
+ {{ end }}
+ </header>
+
+ <main class="card__body">
+ {{ .Content | truncate 480 }}
+ </main>
+
+ <footer class="card__footer">
+ {{ .Render "tags" }}
+ </footer>
+</article> \ No newline at end of file