aboutsummaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html51
-rw-r--r--layouts/_default/_markup/render-heading.html7
-rw-r--r--layouts/_default/_markup/render-link.html11
-rw-r--r--layouts/_default/archive.terms.html21
-rw-r--r--layouts/_default/author.html27
-rw-r--r--layouts/_default/baseof.html22
-rw-r--r--layouts/_default/list.html12
-rw-r--r--layouts/_default/search.html78
-rw-r--r--layouts/_default/search.json13
-rw-r--r--layouts/_default/single.html105
-rw-r--r--layouts/_default/summary.html25
-rw-r--r--layouts/_default/terms.html19
-rw-r--r--layouts/index.html31
-rw-r--r--layouts/index.json7
-rw-r--r--layouts/partials/attribution.html61
-rw-r--r--layouts/partials/author_card.html23
-rw-r--r--layouts/partials/footer.html38
-rw-r--r--layouts/partials/head.html90
-rw-r--r--layouts/partials/header.html102
-rw-r--r--layouts/partials/hero.html44
-rw-r--r--layouts/partials/image-gallery.html30
-rw-r--r--layouts/partials/leading_image.html31
-rw-r--r--layouts/partials/meta.html15
-rw-r--r--layouts/partials/meta_links.html14
-rw-r--r--layouts/partials/metadata.html61
-rw-r--r--layouts/partials/pagination.html35
-rw-r--r--layouts/partials/post.html34
-rw-r--r--layouts/partials/post_pager.html20
-rw-r--r--layouts/partials/social_links.html16
-rw-r--r--layouts/partials/structured-data.html102
-rw-r--r--layouts/partials/tipping.html0
-rw-r--r--layouts/project/single.html50
-rw-r--r--layouts/taxonomy/terms.html53
33 files changed, 910 insertions, 338 deletions
diff --git a/layouts/404.html b/layouts/404.html
index c2f0c31..d249f23 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,17 +1,44 @@
+{{ define "hero" }}
+{{ end }}
+
{{ define "main" }}
-<div id="content" class="bg-near-white pb2 pt5">
- <header class="tc ph5 lh-copy">
- <h1 class="f1 f-headline-l code dib orange">404</h1>
- <h2 class="tc f1-l fw1">Sorry, we can't find the page you are looking for.</h2>
- </header>
+ <div class="max-w-screen-md mx-auto px-1 mv4">
+ <h1 class="text-center baskerville">{{ .Title }}</h1>
- <p class="fw1 i tc mt4 mt5-l f4 f3-l">Are you looking for one of these?</p>
+ <p class="text-xl baskerville">{{ T "maybe_look" }}</p>
- <div class="db tc ma3 f6">
- {{ range .Site.Menus.main }}
- <a class="dib link dim ph3 pv2 ba br1 ttu f5 ma1" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
- {{ .Pre }} {{ .Name }}</a>
+ {{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }}
+ {{ $count := len $query }}
+ {{ if gt $count 0 }}
+ <h3 class="baskerville">{{ T "recent_pages" }}</h3>
+ <ul class="">
+ {{ range first 10 $query }}
+ <li
+ class="transition hover:scale-105 odd:bg-white even:bg-gray-200 p-2"
+ >
+ <a class="hover:opacity-50 block" href="{{ .RelPermalink }}">
+ {{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }}
+ <time
+ datetime="{{ .Date.Format "2006-01-02" }}"
+ class="text-sm float-right ml-2"
+ >
+ <i class="far fa-calendar"></i>
+ {{ time.Format $dateFormat .Date }}
+ </time>
+ {{ .Title }}
+ <sup class="bg-lime-500 text-white uppercase p-1 rounded-full"
+ >{{ .Section }}</sup
+ >
+ </a>
+ </li>
{{ end }}
- </div>
-</div>
+ </ul>
+ {{ end }}
+ <a href="/search" class="hover:opacity-50">
+ <h3 class="baskerville">
+ <i class="fas fa-magnifying-glass"></i>
+ {{ T "try_search" }}
+ </h3>
+ </a>
+ </div>
{{ end }}
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html
new file mode 100644
index 0000000..7d1e0ac
--- /dev/null
+++ b/layouts/_default/_markup/render-heading.html
@@ -0,0 +1,7 @@
+<!-- https://discourse.gohugo.io/t/adding-anchor-next-to-headers/1726/24 -->
+<h{{ .Level }} id="{{ .Anchor | safeURL }}"{{ with .Attributes.class }} class="{{ . }}"{{ end }}>
+ {{ .Text | safeHTML }}
+ <a class="" href="#{{ .Anchor | safeURL }}">
+ <i class="fa fa-chain" aria-hidden="true"></i>
+ </a>
+</h{{ .Level }}>
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
new file mode 100644
index 0000000..7031af3
--- /dev/null
+++ b/layouts/_default/_markup/render-link.html
@@ -0,0 +1,11 @@
+{{- /* A Hugo Markdown render hook to parse links, opening external links in new tabs. */ -}}
+<a
+ href="{{ .Destination | safeURL }}"
+ {{ with .Title }}
+ title="{{ . }}"
+ {{ end }}
+ {{ if strings.HasPrefix .Destination "http" }}
+ target="_blank" rel="noopener"
+ {{ end }}
+ >{{ .Text | safeHTML }}</a
+>
diff --git a/layouts/_default/archive.terms.html b/layouts/_default/archive.terms.html
deleted file mode 100644
index 7b5a540..0000000
--- a/layouts/_default/archive.terms.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{{ define "main" }}
-<div id="content" class="bg-near-white pa2 pt5">
- {{ range (where .Site.RegularPages "Section" "post").GroupByDate "2006" }}
- <section class="f4 bb b--black-40 mw7 center">
- <h4 class="">{{ .Key }}</h4>
-
- {{ range .Pages.GroupByDate "January" }}
- <ul class="list mv1">
- <li class="b">{{ .Key }}</li>
-
- <ul class="pv2">
- {{ range .Pages }}
- <li class="black-50"><a href="{{ .Permalink }}" class="f4 dark-gray underline-hover">{{.Title}}</a> - {{ .Date.Format "Jan 2" }}</li>
- {{ end}}
- </ul>
- </ul>
- {{ end}}
- </section>
- {{ end }}
-</div>
-{{ end }}
diff --git a/layouts/_default/author.html b/layouts/_default/author.html
new file mode 100644
index 0000000..b2277dd
--- /dev/null
+++ b/layouts/_default/author.html
@@ -0,0 +1,27 @@
+{{ define "hero" }}
+ {{ partial "hero.html" . }}
+{{ end }}
+{{ define "main" }}
+ {{- $sectionDelimiter := "<!-- section break -->" -}}
+ {{- $rawContentSections := split .RawContent $sectionDelimiter -}}
+ {{ range $rawContentSections }}
+ <div class="even:bg-gray-200">
+ <div class="max-w-screen-md mx-auto py-2 px-1 main-content">
+ {{ . | markdownify }}
+ </div>
+ </div>
+ {{ end }}
+
+ {{ with where .Pages "Type" "publication" }}
+ {{ if gt (len .) 0 }}
+ <div class="even:bg-gray-200">
+ <div class="max-w-screen-md mx-auto py-2 px-1">
+ <h2 class="baskerville">Publications</h2>
+ {{ range . }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ </div>
+ </div>
+ {{ end }}
+ {{ end }}
+{{ end }}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 7f7c5ae..ffdabc9 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,12 +1,12 @@
-<!DOCTYPE html>
-<html>
- {{- partial "head.html" . -}}
- <body class="bg-near-white sans-serif"
- style="background:url('{{ .Site.Params.coverImage | absURL }}') fixed;">
- {{- partial "header.html" . -}}
- {{- block "main" . }}{{- end }}
- {{- partial "footer.html" . -}}
-
- {{- block "footerfiles" . }}{{- end }}
- </body>
+<!doctype html>
+<html lang="{{ site.Language }}">
+ {{- partial "head.html" . -}}
+ <body class="bg-white">
+ {{- partial "header.html" . -}}
+ {{ block "hero" . }}{{ end }}
+ <div id="content" class="min-h-screen font-sans">
+ {{- block "main" . }}{{- end }}
+ </div>
+ {{- partial "footer.html" . -}}
+ </body>
</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index c9839f8..0eeb8c7 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,8 +1,12 @@
+{{ define "hero" }}
+ {{ partial "hero.html" . }}
+{{ end }}
+
{{ define "main" }}
-<section class="bg-near-white pb2 pt4">
- {{ range .Paginator.Pages }}
- {{ .Render "summary" }}
+ <div class="max-w-screen-md mx-auto p-1">
+ {{ range .Paginator.Pages.ByPublishDate.Reverse }}
+ {{ partial "post.html" . }}
{{ end }}
{{ partial "pagination.html" . }}
-</section>
+ </div>
{{ end }}
diff --git a/layouts/_default/search.html b/layouts/_default/search.html
index 4bf77f2..e61c9a0 100644
--- a/layouts/_default/search.html
+++ b/layouts/_default/search.html
@@ -1,30 +1,58 @@
-{{ define "footerfiles" }}
-<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js"></script>
-<script src="{{ "js/search.js" | absURL }}"></script>
-{{ end }}
-
{{ define "main" }}
-<section class="bg-near-white pt5">
- <div class="mw7 center pv4" >
- <form action="{{ .Permalink }}">
- <input id="search-query" name="s"/>
- </form>
- <div id="search-results">
- <h3>Matching pages</h3>
- </div>
+ <div class="max-w-screen-md mx-auto p-1">
+ <header>
+ <h2 class="baskerville px-1">
+ {{ T "search" | humanize }}
+ </h2>
+ </header>
+
+ <form action="{{ .Permalink }}">
+ <input
+ id="search-query"
+ name="q"
+ placeholder="{{ T "search_placeholder" }}"
+ class="p-2 w-full border"
+ />
+ </form>
+
+ <div id="search-results" class="my-2">
+ <p class="p-4 text-xl font-semibold text-center">
+ {{ T "search_request" }}
+ </p>
</div>
-</section>
-<!-- this template is sucked in by search.js and appended to the search-results div above. So editing here will adjust style -->
-<script id="search-result-template" type="text/x-js-template">
- <div id="summary-${key}" class="bt bb b--black-10 ph4">
- <h4><a href="${link}">${title}</a></h4>
- <p>${snippet}&hellip;</p>
+ </div>
+ <template id="no-match">
+ <p
+ class="bg-red-100 p-4 text-red-600 text-xl font-semibold text-center border rounded border-current"
+ >
+ {{ T "no_match_found" }}
+ </p>
+ </template>
+ <template id="search-result-template">
+ <article class="py-2 border-y border-gray-200 search_summary">
+ <a class="hover:opacity-50 search_link" href="">
+ <time class="float-right text-sm px-8 search_time"></time>
+ <h4 class="baskerville my-2 search_title"></h4>
+ <div class="search_snippet"></div>
+ </a>
+ </article>
+ </template>
+ <script
+ async
+ src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/7.0.0/fuse.min.js"
+ integrity="sha512-GrJ4P9yra6dftp5O0eaKFKS4ch1FYn1xR/VCHQIMJO1LNqcKhjkAkAETHYoE81Ffh3BjCJMWA/AZSYP521jxFA=="
+ crossorigin="anonymous"
+ referrerpolicy="no-referrer"
+ ></script>
- ${ isset tags }<p><i class="fa fa-tags"></i> Tags: ${tags}</p>${ end }
- ${ isset categories }<p><i class="fa fa-bookmark"></i> Categories: ${categories}</p>${ end }
- </div>
-</script>
+ {{ with resources.Get "js/search.js" | resources.Minify | fingerprint }}
+ <script
+ async
+ src="{{ .RelPermalink }}"
+ integrity="{{ .Data.Integrity }}"
+ crossorigin="anonymous"
+ referrerpolicy="no-referrer"
+ ></script>
+ {{ end }}
{{ end }}
diff --git a/layouts/_default/search.json b/layouts/_default/search.json
new file mode 100644
index 0000000..9fae26d
--- /dev/null
+++ b/layouts/_default/search.json
@@ -0,0 +1,13 @@
+
+{{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }}
+{{- $.Scratch.Add "index" slice -}}
+{{- range (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}}
+
+ {{- $.Scratch.Add "index" (dict "title" .Title
+ "tags" .Params.tags
+ "categories" .Params.categories
+ "contents" (.Summary | plainify)
+ "date" (time.Format $dateFormat .Date)
+ "permalink" .Permalink) -}}
+{{- end -}}
+{{- $.Scratch.Get "index" | jsonify -}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index e28413d..7c95390 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,71 +1,40 @@
{{ define "main" }}
-<article>
- <div id="post-header-cover" class="w-100 vh-50 dt bg-center cover bg-black-30 pt4"
- {{ with .Params.coverimage }}
- style="background-image:url({{ . }})"
- {{ end }} >
- <header class="dt pa2 pa5-ns mw7 center post-header white">
- <h1 class="f1 lh-title">
- {{ .Title }}</h1>
-
- {{ if not (eq .Params.showMeta false) }}
- <div class="f4 tracked mb3">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
- {{ partial "meta.html" . }}
- {{ end }}
- </header>
- </div>
-
- <div id="content" class="bg-near-white">
- <div class="mw7 center lh-copy pv4 ph2 black-70">
- {{ .Content }}
- </div>
-
- <footer class="mw7 center ph3 pb2 bt bb cf b--black-50">
- {{ with .Params.tags }}
- <div class="fl-ns w-50-ns mb2">
-
- <h5 class="f5 ttu black-60"><i class="fa fa-lg fa-tags"></i> Tagged in</h5>
- {{ range . }}
- <a class="f5 link br1 ph3 pv2 blue dib hover-bg-light-blue hover-white ba"
- href="{{ $.Site.LanguagePrefix }}/tags/{{ . | urlize }}/">{{ . }}</a>
- {{ end }}
- </div>
- {{ end }}
-
- <div class="fl-ns w-50-ns mb2">
- <h5 class="f5 ttu black-60"><i class="fa fa-lg fa-share-alt"></i> Share in Social Networks</h5>
- {{ range .Site.Params.sharingOptions }}
- <a class="f4 link br1 ph3 pv2 blue dib hover-bg-light-blue hover-white ba" target="new" href="{{ printf .url $.Permalink }}">
- <i class="fa {{ .icon }}"></i>
- </a>
- {{ end }}
- </div>
- </footer>
-
- <!-- Pagination Actions for posts -->
- {{ if not (eq .Params.showActions false) }}
- <div class="mv3 tc">
- {{ with .NextInSection }}
- <a href="{{ .RelPermalink }}" class="dib f4 link br1 ma1 pa2 blue hover-bg-light-blue hover-white ba">
- <i class="fa fa-angle-left"></i> Newer <br/>
- {{ .Title }}
- </a>
- {{ end}}
-
- {{ with .PrevInSection }}
- <a href="{{ .RelPermalink }}" class="dib f4 link br1 ma1 pa2 blue hover-bg-light-blue hover-white ba">
- Older <i class="fa fa-angle-right"></i> <br/>
- {{ .Title }}
- </a>
- {{ end}}
- </div>
- {{ end}}
-
- {{ if not (eq .Params.comments false) }}
- <div class="mw7 center mv4 pa2">
- {{ template "_internal/disqus.html" . }}
- </div>
+ <header class="max-w-screen-md mx-auto">
+ <h1 class="baskerville px-1">
+ {{ .Title }}
+ </h1>
+
+ {{ with .Params.subtitle }}
+ <h3 class="text-2xl baskerville my-4 p-1">{{ . }}</h3>
+ {{ end }}
+
+ {{ partial "meta_links.html" . }}
+ {{ if .Params.metadata }}
+ {{ partial "metadata.html" . }}
+ {{ end }}
+
+ {{ partial "leading_image.html" . }}
+ </header>
+ <div class="main-content max-w-screen-md mx-auto px-1">
+ {{ .Content }}
+ </div>
+ {{ partial "image-gallery" . }}
+
+ {{ if .Site.Params.tipping }}
+ {{ partial "tipping" . }}
+ {{ end }}
+ <div class="py-2">
+ {{ if in (slice "post" "talk") .Section }}
+ {{ range .Params.authors }}
+ {{ $name := . }}
+ {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }}
+ {{ with $.GetPage $path }}
+ {{ if .File }}
+ {{ partial "author_card" (merge .Params (dict "path" $path )) }}
+ {{ end }}
{{ end }}
- </div>
-</article>
+ {{ end }}
+ {{ end }}
+ {{ partial "post_pager" . }}
+ </div>
{{ end }}
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
deleted file mode 100644
index 379694c..0000000
--- a/layouts/_default/summary.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<article class="bt bb b--black-10 mw7 center">
- <a href='{{ .Permalink }}' class="db pv4 ph3 black no-underline dim">
- <header>
- <h1 class="f2 lh-title black-90 ">
- {{ .Title }}
- </h1>
- <div class="gray">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} Words </div>
- </header>
- <p class="f4 lh-copy black-80">
- {{ .Summary }}
- </p>
- <footer>
-
- <nobr class="link">Continue reading →</nobr>
- {{ with .Params.thumbnailImage }}
- <img src="{{ . }}" class="mt2 br2">
- {{ else }}
- {{ if .Params.coverimage }}
- <img src="{{ .Params.coverimage }}" class="mt2 br2" />
- {{ end}}
- {{ end }}
-
- </footer>
- </a>
-</article>
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
deleted file mode 100644
index 42d5541..0000000
--- a/layouts/_default/terms.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{{ define "main" }}
-<div id="content" class="bg-near-white pa2 pt5">
- <section class="mw7 center">
- {{ range .Data.Terms.ByCount }}
- <h4 class="f4">
- <a href="{{ .Name }}" class="dark-gray underline-hover">
- {{ .Name }} ({{ .Pages | len }})
- </a>
- </h4>
-
- <ul class="bb b--black-50 pb2">
- {{ range .Pages.ByDate.Reverse }}
- <li class="black-50"><a href="{{ .Permalink }}" class="f4 dark-gray underline-hover">{{.Title}}</a> - {{ .Date.Format "Jan 2, 2006" }}</li>
- {{ end}}
- </ul>
- {{ end }}
- </section>
-</div>
-{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index eb6d5c6..970a64e 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,11 +1,26 @@
-{{ define "main" }}
-<div id="content" class="bg-near-white pb2 pt4">
+{{ define "hero" }}
+ {{ partial "hero.html" . }}
+{{ end }}
- <!-- Note that .Data.Pages is the equivalent of .Site.Pages on the homepage template. -->
- {{ $paginator := .Paginate (where .Data.Pages "Section" "post") }}
- {{ range $paginator.Pages }}
- {{ .Render "summary" }}
+{{ define "main" }}
+ {{ range (where .Pages "Type" "in" .Site.Params.mainSections).ByWeight }}
+ {{ if gt (len .Pages) 0 }}
+ <div class="odd:bg-white even:bg-gray-200">
+ <div class="max-w-screen-md mx-auto p-1">
+ <h2 id="{{ anchorize .Title | safeURL }}" class="baskerville">
+ {{ .Title }}
+ </h2>
+ {{ range first 3 .Pages.ByPublishDate.Reverse }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ <div class="text-center p-4">
+ <i class="fas fa-angle-right"></i>
+ <a href="{{ .Type }}" class="text-2xl"
+ >{{ T "see_all" | humanize }}</a
+ >
+ </div>
+ </div>
+ </div>
{{ end }}
- {{ partial "pagination.html" . }}
-</div>
+ {{ end }}
{{ end }}
diff --git a/layouts/index.json b/layouts/index.json
deleted file mode 100644
index b8559e7..0000000
--- a/layouts/index.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{{- $.Scratch.Add "index" slice -}}
-{{- range .Site.RegularPages -}}
-{{- if ne .Params.noindex true -}}
- {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}}
-{{- end -}}
-{{- end -}}
-{{- $.Scratch.Get "index" | jsonify -}}
diff --git a/layouts/partials/attribution.html b/layouts/partials/attribution.html
new file mode 100644
index 0000000..e69341b
--- /dev/null
+++ b/layouts/partials/attribution.html
@@ -0,0 +1,61 @@
+<div class="border-t border-gray-500 py-4 my-2">
+ {{ if in (slice "by" "by-nd" "by-sa" "by-nc" "by-nc-nd" "by-nc-sa") .license }}
+ {{ $href := printf "http://creativecommons.org/licenses/%s/4.0/" .license }}
+ <div
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dct="http://purl.org/dc/terms/"
+ >
+ <span property="dct:title">The content in this website</span>
+ by
+ {{ with .Author.homepage }}
+ <a
+ rel="cc:attributionURL dct:creator"
+ property="cc:attributionName"
+ href="{{ . }}"
+ class="hover:opacity-50"
+ >
+ {{ $.Author.name }}
+ </a>
+ {{ else }}
+ {{ $.Author.name }}
+ {{ end }}
+
+ is licensed under a
+ <a
+ target="_blank"
+ rel="license noopener noreferrer"
+ href="{{ $href }}"
+ class="block hover:opacity-50"
+ >
+ Creative Commons
+ {{ with .license }}
+ Attribution{{- if in . "by-nc" -}}
+ -NonCommercial
+ {{- end -}}{{- if in . "-nd" -}}
+ -NoDerivatives
+ {{- else if in . "-sa" -}}
+ -ShareAlike
+ {{- end -}}
+ {{ end }}
+ 4.0 International License
+ <span class="block m-2">
+ <i class="text-4xl fab fa-creative-commons"></i>
+ <i class="text-4xl fab fa-creative-commons-by"></i>
+ {{ with .license }}
+ {{ if in . "by-nc" }}
+ <i class="text-4xl fab fa-creative-commons-nc"></i>
+ {{ end }}{{ if in . "-nd" }}
+ <i class="text-4xl fab fa-creative-commons-nd"></i>
+ {{ else if in . "-sa" }}
+ <i class="text-4xl fab fa-creative-commons-sa"></i>
+ {{ end }}
+ {{ end }}
+ </span>
+ </a>
+ </div>
+ {{ else }}
+ Copyright &copy;
+ {{ now.Format "2006" }}
+ {{ .Author.name }}
+ {{ end }}
+</div>
diff --git a/layouts/partials/author_card.html b/layouts/partials/author_card.html
new file mode 100644
index 0000000..b23c3e7
--- /dev/null
+++ b/layouts/partials/author_card.html
@@ -0,0 +1,23 @@
+<article
+ class="max-w-screen-md mx-auto p-8 md:flex md:flex-row items-start border-t"
+>
+ <img
+ src="{{ .avatar }}"
+ class="rounded-full w-16 mx-auto md:m-4"
+ alt="{{ .name }}"
+ />
+ <div class="">
+ <h5 class="my-0 berkshire-swash">
+ <a href="{{ (default .path .homepage) }}" class="">
+ {{ .name }}
+ </a>
+ </h5>
+ <h6 class="font-light p-0 m-0">{{ .role | markdownify }}</h6>
+ <p class="mt-3">
+ {{ .bio }}
+ </p>
+ <div class="text-xl mt-4">
+ {{ partial "social_links" . }}
+ </div>
+ </div>
+</article>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index d4216d8..4a977f1 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,5 +1,35 @@
-<footer id="footer" class="center pa2 bg-white-40">
- <span class="db tc black-80">
- &copy; {{ now.Format "2006" }} {{ with .Site.Params.footer.copyright }}{{ . | safeHTML }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ else }}{{ with .Site.Title }}{{ . }}{{ end }}{{ end }}{{ end }}. All Rights Reserved
- </span>
+<footer class="bg-black w-full p-4 text-center text-white text-lg">
+ <div class="max-w-screen-md mx-auto">
+ {{ if in .Site.Params.mainSections .Section }}
+ <a href="/{{ .Section }}/index.xml" class="block my-2 hover:opacity-50">
+ {{ T "rss_follow" (dict "section" (T .Section)) }}
+ <i class="fa-solid fa-rss"></i>
+ </a>
+ {{ end }}
+
+ {{ range .Site.Menus.footer }}
+ <a
+ class="inline hover:opacity-50 text-base p-2"
+ href="{{ .URL | relLangURL }}"
+ >{{ T .Name | safeHTML }}
+ </a>
+ {{ end }}
+
+ {{ with .Site.GetPage "footer.md" }}
+ {{ .Content }}
+ {{ end }}
+
+ {{ partial "attribution.html" .Site.Params }}
+
+ <div class="my-2">
+ Made in anger with
+ <a
+ href="https://git.oscarnajera.com/hugo-minimalist-theme/about/"
+ class="silver hover-near-white"
+ >
+ hugo-minimalist
+ </a>
+ theme.
+ </div>
+ </div>
</footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 2cb900d..f3919c4 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,53 +1,37 @@
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta charset="UTF-8">
-<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css"/>
-<!-- FontAwesome -->
-<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
-
-<!-- CustomCSS -->
- {{ range .Site.Params.customCSS }}
- {{ if isset . "href" }}
- <link {{ if not (isset . "rel") }}rel="stylesheet" {{ end }}{{ range $key, $value := . }} {{ if eq $key "href" }}{{ (printf "%s=\"%s\"" $key ($value | absURL)) | safeHTMLAttr }}{{ else }}{{ (printf "%s=\"%s\"" $key (string $value)) | safeHTMLAttr }}{{ end }}{{ end }}>
- {{ else }}
- <link rel="stylesheet" href="{{ . | absURL }}">
- {{ end }}
- {{ end }}
-
-<!-- Highligth.js -->
-<link rel="stylesheet"
- href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/zenburn.min.css">
-<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
-<script>hljs.initHighlightingOnLoad();</script>
-
-<!-- Mathjax -->
-<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML' async></script>
-
-<!-- CSS -->
-<style>
- a {
- text-decoration: none;
- color: #357edd;
- }
-
- #sidebar {
- text-shadow: 1px 1px 1px #111;
- }
-
- .post-header {
- text-shadow: 1px 2px 1px rgba(0,0,0,0.9);
- }
-
- pre {
- background: #3f3f3f;
- color: #dcdcdc;
- padding: 0.5em;}
-
-</style>
-<script>
- function w3_open() {
- document.getElementById("sidebar").style.display = "block";
- }
- function w3_close() {
- document.getElementById("sidebar").style.display = "none";
- }
-</script>
+<head>
+ {{ partial "structured-data.html" . }}
+
+ {{ with resources.Get "css/tailwind.css" | resources.Minify | fingerprint }}
+ <link
+ rel="stylesheet"
+ href="{{ .RelPermalink }}"
+ integrity="{{ .Data.Integrity }}"
+ crossorigin="anonymous"
+ type="text/css"
+ media="screen"
+ />
+ {{ end }}
+
+ {{ with resources.Get .Site.Params.favicon }}
+ <link rel="icon" href="{{ .RelPermalink }}" />
+ {{ end }}
+ {{ range .AlternativeOutputFormats -}}
+ {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+ {{ end -}}
+
+
+ <script
+ async
+ src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
+ ></script>
+
+ {{ with resources.Get "js/loads.js" | resources.Minify | fingerprint }}
+ <script
+ async
+ src="{{ .RelPermalink }}"
+ integrity="{{ .Data.Integrity }}"
+ crossorigin="anonymous"
+ referrerpolicy="no-referrer"
+ ></script>
+ {{ end }}
+</head>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 41bfd71..33f5ad2 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,65 +1,51 @@
-{{ if .Site.Author.gravataremail }}
- {{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 (.Site.Author.gravataremail )))) }}
-{{ else if .Site.Author.picture }}
- {{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }}
-{{ end }}
-
-<nav id="sidebar" class="w5-ns w-100 bg-gray vh-100 fixed z-2 overflow-auto dn" style="background-image:url('{{ .Site.Params.coverImage | absURL }}');">
- <a class="bg-black white link dim db pa3 tc pointer" onclick="w3_close()">
- Close &times;
+<nav class="bg-lime-700">
+ <div
+ class="max-w-screen-md mx-auto text-white flex justify-between items-center"
+ >
+ <a href="{{ site.BaseURL | relLangURL }}" class="">
+ {{ with resources.Get .Site.Params.logo }}
+ <img
+ height="{{ site.Params.logo_height }}"
+ class="v-btm"
+ src="{{ .Permalink }}"
+ alt="{{ site.Title }}"
+ />
+ {{ end }}
+ <span class="pl-2 text-4xl leading-normal berkshire-swash">
+ {{ .Site.Title }}
+ </span>
</a>
-
- <div class="tc pv4">
- <a href="/#about" class="white link">
- {{ with ($.Scratch.Get "authorPicture") }}
- <img class="br-100" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=110{{ end }}"/>
- {{ end }}
- <h3 class="f3">
- {{ .Site.Author.name }}
- </h3>
+ <input class="menu-btn hidden" type="checkbox" id="menu-btn" />
+ <label class="menu-icon p-2 md:hidden" for="menu-btn">
+ <span class="navicon bg-white"></span>
+ </label>
+ <div
+ class="menu bg-lime-700 md:w-fit md:flex-row md:max-h-none md:static top-12"
+ >
+ {{ range .Site.Menus.main }}
+ <a class="hover:bg-lime-500 p-4" href="{{ .PageRef | relLangURL }}">
+ {{ .Pre }}
+ {{- T .Name | title -}}
</a>
+ {{ end }}
</div>
- <ul class="list">
- {{ range .Site.Menus.main }}
- <li class="pv2">
- <a class="link white db grow" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
- {{ .Pre }} {{ .Name }}</a>
- </li>
- {{ end }}
- </ul>
- <ul class="list">
- {{ range .Site.Menus.links }}
- <li class="pv2">
- <a class="link white db grow" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
- {{ .Pre }} {{ .Name }}</a>
- </li>
- {{ end }}
- </ul>
- <ul class="list">
- {{ range .Site.Menus.misc }}
- <li class="pv2">
- <a class="link white db grow" href="{{ .URL | relLangURL }}" title="{{ .Title }}">
- {{ .Pre }} {{ .Name }}</a>
- </li>
+ {{ if .IsTranslated }}
+ <select
+ name="lang"
+ class="mr-2 p-1 text-center border border-black-20 rounded-md bg-white text-black"
+ onchange="self.location=options[selectedIndex].value"
+ >
+ <option value="{{ .Permalink }}">
+ {{ .Language.Lang }}
+ </option>
+ {{ range .Translations }}
+ <option value="{{ .Permalink }}">
+ {{ .Language.Lang }}
+ </option>
{{ end }}
- </ul>
-
-</nav>
-
-<nav class="fixed z-1 dt w-100 border-box pa2 bb b--black-30 bg-near-white">
-
- <a class="dtc dib v-mid dim " onclick="w3_open()">
- <i class="fa fa-lg fa-bars black"></i>
- </a>
-
- <a href="{{ "/" | relLangURL }}" class="dtc v-mid link dim tc">
- <div class="f4 dib black-80 b">{{ .Site.Title }}</div>
- </a>
-
- {{ with ($.Scratch.Get "authorPicture") }}
- <a href="/#about" class="dtc dim tr">
- <img class="dib v-mid dib w2 h2 br-100" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=90{{ end }}"/>
- </a>
+ </select>
{{ end }}
+
+ </div>
</nav>
diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html
new file mode 100644
index 0000000..55551a0
--- /dev/null
+++ b/layouts/partials/hero.html
@@ -0,0 +1,44 @@
+<div
+ id="hero"
+ class="py-16"
+ style="background: linear-gradient( rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15) ){{ with resources.Get (index .Params.images 0) }}
+ {{ with .Resize "1200x webp" }}
+ , url('{{ .RelPermalink }}') center
+ {{ end }}
+ {{ end }};"
+>
+ <div class="max-w-screen-md mx-auto px-2 text-white font-serif">
+ {{ if eq .Type "authors" }}
+ {{ $avatar := index .Params.images 1 }}
+ {{ if hasPrefix $avatar "http" }}
+ {{ $avatar = resources.GetRemote $avatar }}
+ {{ else }}
+ {{ $avatar = resources.Get $avatar }}
+ {{ end }}
+ {{ with $avatar }}
+ <img
+ src="{{ .RelPermalink }}"
+ class="rounded-full w-64 block mx-auto"
+ alt=""
+ />
+ {{ end }}
+ <div class="text-center">
+ <h1 class="">{{ .Params.Name }}</h1>
+ <h3 class="font-normal">{{ .Params.role | markdownify }}</h3>
+
+ {{ with .Params.Subtitle }}
+ <h3 class="">{{ . | markdownify }}</h3>
+ {{ end }}
+
+
+ <div class="text-4xl mt-4">
+ {{ partial "social_links" .Params }}
+ </div>
+ </div>
+ {{ else }}
+
+ <h1 class="berkshire-swash text-center">{{ .Title }}</h1>
+ {{ .Content }}
+ {{ end }}
+ </div>
+</div>
diff --git a/layouts/partials/image-gallery.html b/layouts/partials/image-gallery.html
new file mode 100644
index 0000000..3825f16
--- /dev/null
+++ b/layouts/partials/image-gallery.html
@@ -0,0 +1,30 @@
+{{ with .Params.album }}
+ <section class="gallery flex relative my-3 mx-auto">
+ {{ range $id, $val := readDir (printf "/assets/media/albums/%s" (string .)) }}
+ {{ with resources.Get (printf "media/albums/%s/%s" $.Params.album $val.Name) }}
+ <div class="">
+ <input
+ type="radio"
+ id="img-{{ $id }}"
+ checked
+ name="gallery"
+ class="absolute hidden"
+ />
+ <img
+ class="transition-opacity duration-300 absolute top-0 left-0 opacity-0"
+ src="{{ (.Fill "1152x768").RelPermalink }}"
+ alt=""
+ loading="lazy"
+ />
+ <label for="img-{{ $id }}" class="block m-2 p-2">
+ <img
+ src="{{ (.Fill "150x100").RelPermalink }}"
+ alt=""
+ loading="lazy"
+ />
+ </label>
+ </div>
+ {{ end }}
+ {{ end }}
+ </section>
+{{ end }}
diff --git a/layouts/partials/leading_image.html b/layouts/partials/leading_image.html
new file mode 100644
index 0000000..1b5cf28
--- /dev/null
+++ b/layouts/partials/leading_image.html
@@ -0,0 +1,31 @@
+{{ $image := "" }}
+{{ if (.Resources.ByType "image").GetMatch "*featured*" }}
+ {{ $image = (.Resources.ByType "image").GetMatch "*featured*" }}
+{{ else if resources.Get (index .Params.images 0) }}
+ {{ $image = resources.Get (index .Params.images 0) }}
+{{ end }}
+{{ with $image }}
+ <div class="text-center">
+ <div class="relative inline-block">
+ <img
+ {{ if ne .MediaType.SubType "svg" }}
+ {{ $image := .Fit (default "768x400 webp" $.Params.image_size) }}
+ width="{{ $image.Width }}" height="{{ $image.Height }}"
+ src="{{ $image.RelPermalink }}"
+ {{ else }}
+ src="{{ $image.RelPermalink }}"
+ {{ end }}
+ class="m-0"
+ alt="{{ .Title }}"
+ />
+ {{ with $.Params.caption }}
+ <a
+ href="{{ .url }}"
+ class="text-white block absolute bottom-0 right-0 p-2 bg-black bg-opacity-40 rounded"
+ >
+ {{ .text }}
+ </a>
+ {{ end }}
+ </div>
+ </div>
+{{ end }}
diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html
deleted file mode 100644
index 84e76e5..0000000
--- a/layouts/partials/meta.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{{ with .Params.categories }}
-<i class="fa fa-lg fa-bookmark"></i>
-{{ range . }}
-<a class="link underline-hover white mr3"
- href="{{ $.Site.LanguagePrefix }}/categories/{{ . | urlize }}/">{{ . }}</a>
-{{ end }}
-{{ end }}
-
-{{ with .Params.tags }}
-<i class="fa fa-lg fa-tags"></i>
-{{ range . }}
-<a class="link underline-hover white"
- href="{{ $.Site.LanguagePrefix }}/tags/{{ . | urlize }}/">{{ . }}</a>
-{{ end }}
-{{ end }}
diff --git a/layouts/partials/meta_links.html b/layouts/partials/meta_links.html
new file mode 100644
index 0000000..69e2a94
--- /dev/null
+++ b/layouts/partials/meta_links.html
@@ -0,0 +1,14 @@
+{{ with .Params.meta_links }}
+ <div class="px-8 text-right">
+ {{ range $key, $val := . }}
+ <a
+ class="inline-block text-sm border border-current rounded-lg mx-1 px-2 py-1 text-lime-500 hover:bg-lime-500 uppercase"
+ href="{{ . }}"
+ target="_blank"
+ rel="noopener"
+ >
+ {{ $key }}
+ </a>
+ {{ end }}
+ </div>
+{{ end }}
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
new file mode 100644
index 0000000..8679be6
--- /dev/null
+++ b/layouts/partials/metadata.html
@@ -0,0 +1,61 @@
+{{ $dateTime := .PublishDate.Format "2006-01-02" }}
+{{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }}
+<div class="text-sm my-0 px-8 py-2">
+ {{ T "author_by" }} &mdash;
+ {{ range .Params.authors }}
+ {{ $name := . }}
+ {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }}
+ {{ with $.GetPage $path }}
+ {{ if isset .Params "name" }}
+ <a class="underline" href="{{ .RelPermalink }}">
+ {{- default $name .Params.name -}}
+ </a>
+ {{ else }}
+ {{ $name }}
+ {{ end }}
+ {{ else }}
+ {{ $name }}
+ {{ end }}
+ {{ end }}
+
+
+ <br />
+ <i class="far fa-calendar"></i>
+ <time datetime="{{ $dateTime }}">
+ {{ time.Format $dateFormat .Date }}
+ </time>
+ {{ with .Params.location }}
+ &mdash;
+ {{ . }}
+ {{ end }}
+
+ {{ if eq .Section "post" }}
+ |
+ {{ .ReadingTime }}
+ {{ i18n "minute_read" }}
+ {{ end }}
+
+ {{ with .GetTerms "tags" }}
+ |
+ <a href="/tags" class="text-lime-500 px-1">
+ <i class="fas fa-tags"></i>
+ </a>
+ {{ range . }}
+ <a class="underline" href="{{ .RelPermalink }}">
+ {{- .Title -}}
+ </a>
+ {{ end }}
+ {{ end }}
+
+ {{ with .GetTerms "categories" }}
+ |
+ <a href="/categories" class="text-lime-500 px-1">
+ <i class="fas fa-folder-open"></i>
+ </a>
+ {{ range . }}
+ <a class="underline" href="{{ .RelPermalink }}">
+ {{- .Title -}}
+ </a>
+ {{ end }}
+ {{ end }}
+</div>
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
index 16ad74e..7e5eeb3 100644
--- a/layouts/partials/pagination.html
+++ b/layouts/partials/pagination.html
@@ -1,15 +1,34 @@
{{ $pag := $.Paginator }}
{{ if gt $pag.TotalPages 1 }}
-<div class="center db tc ma4 f6">
+ <nav class="flex items-center justify-center p-8">
{{ if $pag.HasPrev }}
- <a href="{{ $pag.Prev.URL }}" aria-label="Previous" class="dib link dim ph3 pv2 ba br1 ttu">Newer Posts</a>
+ <a
+ href="{{ $pag.Prev.URL }}"
+ rel="prev"
+ class="text-black transition hover:scale-105 hover:bg-gray-100 p-2 border"
+ >« {{ T "prev" }}</a
+ >
{{ end }}
-
{{ range $pag.Pagers }}
- <a href="{{ .URL }}" class="dib link dim ph3 pv2 b ba br1 {{ if eq . $pag }}bg-blue white{{ end }}">{{ .PageNumber }}</a>
+ {{ if eq . $pag }}
+ <span class="text-white bg-gray-400 mx-1 p-2 border">
+ {{ $pag.PageNumber }}</span
+ >
+ {{ else }}
+ <a
+ href="{{ .URL }}"
+ class="block text-black transition hover:scale-105 hover:bg-gray-100 p-2 border"
+ >{{ .PageNumber }}</a
+ >
+ {{ end }}
{{ end }}
-{{ if $pag.HasNext }}
- <a href="{{ $pag.Next.URL }}" aria-label="Next" class="dib link dim ph3 pv2 ba br1 ttu">Older posts</a>
-{{ end }}
-</div>
+ {{ if $pag.HasNext }}
+ <a
+ href="{{ $pag.Next.URL }}"
+ rel="next"
+ class="text-black transition hover:scale-105 hover:bg-gray-100 p-2 border"
+ >{{ T "next" }} »</a
+ >
+ {{ end }}
+ </nav>
{{ end }}
diff --git a/layouts/partials/post.html b/layouts/partials/post.html
new file mode 100644
index 0000000..8ed64f8
--- /dev/null
+++ b/layouts/partials/post.html
@@ -0,0 +1,34 @@
+<article class="py-2 border-y border-slate-300">
+ {{ partial "meta_links.html" . }}
+ <a class="block hover:opacity-50 text-slate-900" href="{{ .RelPermalink }}">
+ {{ $image := "" }}
+ {{ if (.Resources.ByType "image").GetMatch "featured*" }}
+ {{ $image = (.Resources.ByType "image").GetMatch "*featured*" }}
+ {{ else if resources.Get (index .Params.images 0) }}
+ {{ $image = resources.Get (index .Params.images 0) }}
+ {{ end }}
+ {{ with $image }}
+ <div class="md:max-w-64 md:float-left mr-4">
+ <img
+ {{ if ne .MediaType.SubType "svg" }}
+ {{ $image := .Fill (default "150x150" $.Params.thumbnail_size) }}
+ width="{{ $image.Width }}" height="{{ $image.Height }}"
+ src="{{ $image.RelPermalink }}" class="mx-auto"
+ {{ else }}
+ src="{{ $image.RelPermalink }}" class="mx-auto max-w-64"
+ {{ end }}
+ loading="lazy"
+ alt=""
+ />
+ </div>
+ {{ end }}
+ <h3 class="text-2xl baskerville my-1 pb-2 font-bold">{{ .Title }}</h3>
+
+ <p class="md:after:clear-both md:after:block">
+ {{ .Summary | replaceRE `<sup.*?><a href.*?#fn:.*?footnote-ref.*?/a></sup>` "" | plainify }}
+ </p>
+ </a>
+ {{ if .Params.metadata }}
+ {{ partial "metadata.html" . }}
+ {{ end }}
+</article>
diff --git a/layouts/partials/post_pager.html b/layouts/partials/post_pager.html
new file mode 100644
index 0000000..350f347
--- /dev/null
+++ b/layouts/partials/post_pager.html
@@ -0,0 +1,20 @@
+<nav class="flex items-center justify-center pa4 f5">
+ {{ with .NextInSection }}
+ <a
+ href="{{ .RelPermalink }}"
+ rel="prev"
+ class="text-black hover:bg-gray-200 p-2 border m-2"
+ >
+ « {{ .Title }}</a
+ >
+ {{ end }}
+ {{ with .PrevInSection }}
+ <a
+ href="{{ .RelPermalink }}"
+ rel="prev"
+ class="text-black hover:bg-gray-200 p-2 border m-2"
+ >
+ {{ .Title }} »</a
+ >
+ {{ end }}
+</nav>
diff --git a/layouts/partials/social_links.html b/layouts/partials/social_links.html
new file mode 100644
index 0000000..9758891
--- /dev/null
+++ b/layouts/partials/social_links.html
@@ -0,0 +1,16 @@
+{{ range .social }}
+ {{ $link := .link }}
+ {{ $scheme := (urls.Parse $link).Scheme }}
+ {{ $target := "" }}
+ {{ if not $scheme }}
+ {{ $link = .link | relLangURL }}
+ {{ else if in (slice "http" "https") $scheme }}
+ {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
+ {{ end }}
+ <a
+ href="{{ $link | safeURL }}"
+ {{ $target | safeHTMLAttr }}
+ >
+ <i class="{{ .icon_class }}"></i>
+ </a>
+{{ end }}
diff --git a/layouts/partials/structured-data.html b/layouts/partials/structured-data.html
new file mode 100644
index 0000000..c55bcdd
--- /dev/null
+++ b/layouts/partials/structured-data.html
@@ -0,0 +1,102 @@
+<meta charset="utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+{{ $title := print .Site.Title " | " .Title }}
+{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
+<title>{{ $title }}</title>
+{{ $image := "" }}
+{{ if (.Resources.ByType "image").GetMatch "*featured*" }}
+ {{ $image = (.Resources.ByType "image").GetMatch "*featured*" }}
+{{ else if resources.Get (index .Params.images 0) }}
+ {{ $image = resources.Get (index .Params.images 0) }}
+{{ end }}
+
+{{ if and $image (ne $image.MediaType.SubType "svg") }}
+ {{ $image := $image.Fit (default "768x400" $.Params.image_size) }}
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:image" content="{{ $image.Permalink }}" />
+ <meta property="og:image" content="{{ $image.Permalink }}" />
+{{ else }}
+ <meta name="twitter:card" content="summary" />
+{{ end }}
+<meta name="twitter:title" content="{{ .Title }}" />
+<meta
+ name="twitter:description"
+ content="{{ with .Description }}
+ {{ . }}
+ {{ else }}
+ {{ if .IsPage }}
+ {{ .Summary }}
+ {{ else }}
+ {{ with .Site.Params.description }}{{ . }}{{ end }}
+ {{ end }}
+ {{ end -}}"
+/>
+
+<meta property="og:title" content="{{ .Title }}" />
+<meta
+ property="og:description"
+ content="{{ with .Description }}
+ {{ . }}
+ {{ else }}
+ {{ if .IsPage }}
+ {{ .Summary }}
+ {{ else }}
+ {{ with .Site.Params.description }}{{ . }}{{ end }}
+ {{ end }}
+ {{ end }}"
+/>
+<meta
+ property="og:type"
+ content="{{ if .IsPage }}
+ article
+ {{ else }}
+ website
+ {{ end }}"
+/>
+<meta property="og:url" content="{{ .Permalink }}" />
+
+{{- if .IsPage }}
+ {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
+ <meta property="article:section" content="{{ .Section }}" />
+ {{ with .PublishDate }}
+ <meta
+ property="article:published_time"
+ {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}
+ />
+ {{ end }}
+ {{ with .Lastmod }}
+ <meta
+ property="article:modified_time"
+ {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }}
+ />
+ {{ end }}
+{{- end -}}
+
+{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
+{{- with .Params.locale }}
+ <meta property="og:locale" content="{{ . }}" />
+{{ end }}
+{{- with .Site.Params.title }}
+ <meta property="og:site_name" content="{{ . }}" />
+{{ end }}
+{{- with .Params.videos }}
+ {{- range . }}
+ <meta property="og:video" content="{{ . | absURL }}" />
+ {{ end }}
+{{ end }}
+
+{{- /* If it is part of a series, link to related articles */}}
+{{- $permalink := .Permalink }}
+{{- $siteSeries := .Site.Taxonomies.series }}
+{{- if $siteSeries }}
+ {{ with .Params.series }}
+ {{- range $name := . }}
+ {{- $series := index $siteSeries ($name | urlize) }}
+ {{- range $page := first 6 $series.Pages }}
+ {{- if ne $page.Permalink $permalink }}
+ <meta property="og:see_also" content="{{ $page.Permalink }}" />
+ {{ end }}
+ {{- end }}
+ {{ end }}
+ {{ end }}
+{{- end }}
diff --git a/layouts/partials/tipping.html b/layouts/partials/tipping.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/partials/tipping.html
diff --git a/layouts/project/single.html b/layouts/project/single.html
new file mode 100644
index 0000000..a83b79f
--- /dev/null
+++ b/layouts/project/single.html
@@ -0,0 +1,50 @@
+{{- define "main" -}}
+ <header class="max-w-screen-md mx-auto">
+ <h1 class="baskerville px-1">
+ {{ .Title }}
+ </h1>
+
+ {{ with .Params.subtitle }}
+ <h3 class="baskerville p-1">{{ . }}</h3>
+ {{ end }}
+
+ {{ partial "meta_links.html" . }}
+ {{ partial "leading_image.html" . }}
+ </header>
+ <div class="main-content max-w-screen-md mx-auto lh-copy f5 f4-ns px-1">
+ {{ .Content }}
+ </div>
+
+ <div class="max-w-screen-md mx-auto px-1">
+ {{ $page := . }}
+ {{ $project := .File.ContentBaseName }}
+
+ {{ $items := where (where site.RegularPages "Type" "post") ".Params.projects" "intersect" (slice $project) }}
+ {{ $count := len $items }}
+ {{ if ge $count 1 }}
+ <h2 class="">Related Posts</h2>
+ {{ range $index, $item := $items }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ {{ end }}
+
+ {{ $items := where (where site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }}
+ {{ $pubs_len := len $items }}
+ {{ if ge $pubs_len 1 }}
+ <h2 class="">Related Publications</h2>
+ {{ range $index, $item := $items }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ {{ end }}
+
+ {{ $items := where (where site.RegularPages "Type" "event") ".Params.projects" "intersect" (slice $project) }}
+ {{ $talks_len := len $items }}
+ {{ if ge $talks_len 1 }}
+ <h2 class="">Related Talks</h2>
+ {{ range $index, $item := $items }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ {{ end }}
+ {{ partial "post_pager" . }}
+ </div>
+{{- end -}}
diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html
new file mode 100644
index 0000000..4948a6a
--- /dev/null
+++ b/layouts/taxonomy/terms.html
@@ -0,0 +1,53 @@
+{{ define "hero" }}
+ {{ partial "hero.html" . }}
+{{ end }}
+
+{{ define "main" }}
+ <section class="max-w-screen-md mx-auto">
+ <section class="mt-4">
+ {{ range .Data.Terms.ByCount }}
+ <a
+ class="inline-block text-black transition hover:scale-105 p-2 m-1 border border-black rounded"
+ href="#{{ .Name | urlize }}-list"
+ data-tag="{{ .Name | lower }}"
+ >
+ {{ .Name }}
+ </a>
+ {{ end }}
+ </section>
+
+ <!-- EACH tag post -->
+ <section class="">
+ {{ range .Data.Terms.ByCount }}
+ <div
+ id="{{ .Name | urlize }}-list"
+ class="p-1 pa2-ns border-b-2 border-gray-300"
+ data-tag="{{ .Name | lower }}"
+ >
+ <h4 class="mx-auto">
+ <a class="hover:opacity-50" href="{{ .Name | urlize }}">
+ {{ .Name }} ({{ .Pages | len }})
+ </a>
+ </h4>
+ <ul class="list">
+ {{ range .Pages.ByDate }}
+ <li class="transition hover:scale-105 even:bg-gray-200 p-2">
+ <a class="hover:opacity-50 block" href="{{ .RelPermalink }}">
+ {{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }}
+ <time
+ datetime="{{ .Date.Format "2006-01-02" }}"
+ class="text-sm float-right ml-2"
+ >
+ <i class="far fa-calendar"></i>
+ {{ time.Format $dateFormat .Date }}
+ </time>
+ {{ .Title }}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+ </div>
+ {{ end }}
+ </section>
+ </section>
+{{ end }}