aboutsummaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/author.html26
-rw-r--r--layouts/partials/hero.html18
-rw-r--r--layouts/partials/metadata.html16
3 files changed, 45 insertions, 15 deletions
diff --git a/layouts/_default/author.html b/layouts/_default/author.html
new file mode 100644
index 0000000..1179500
--- /dev/null
+++ b/layouts/_default/author.html
@@ -0,0 +1,26 @@
+{{ define "hero" }}
+ {{ partial "hero.html" . }}
+{{ end }}
+{{ define "main" }}
+ {{- $sectionDelimiter := "<!-- section break -->" -}}
+ {{- $rawContentSections := split .RawContent $sectionDelimiter -}}
+ {{ range $rawContentSections }}
+ <div class="stripe-dark">
+ <div class="mw7 center pv2 lh-copy f4-ns ph1">
+ {{ . | markdownify }}
+ </div>
+ </div>
+ {{ end }}
+
+
+ <div class="stripe-dark">
+ <div class="mw7 center pv2 lh-copy f4-ns ph1">
+ {{ range .Pages.GroupBy "Section" "asc" }}
+ <h2>{{ .Key }} {{ . }}</h2>
+ {{ range .Pages }}
+ {{ partial "post.html" . }}
+ {{ end }}
+ {{ end }}
+ </div>
+ </div>
+{{ end }}
diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html
index 3008ef2..1654b5d 100644
--- a/layouts/partials/hero.html
+++ b/layouts/partials/hero.html
@@ -6,7 +6,7 @@
{{ end }};"
>
<div class="mw7 center ph2 near-white lh-copy">
- {{ if eq .Type "about" }}
+ {{ if eq .Type "authors" }}
{{ $avatar := index .Params.images 1 }}
{{ if hasPrefix $avatar "http" }}
{{ $avatar = resources.GetRemote $avatar }}
@@ -17,14 +17,12 @@
<img src="{{ .RelPermalink }}" class="br-100 w5 db center" alt="" />
{{ end }}
<h1 class="f1 tc mv1">
- {{ .Title }}
+ {{ .Params.Name }}
</h1>
- {{ if .Params.personal }}
- <h2 class="f3 tc fw3 mv1">
- {{ .Site.Params.Author.role | markdownify }}
- </h2>
- {{ end }}
+ <h2 class="f3 tc fw3 mv1">
+ {{ .Params.role | markdownify }}
+ </h2>
{{ with .Params.Subtitle }}
<h2 class="f3 tc fw3 mv1">
@@ -34,11 +32,7 @@
<div class="f2 mt3 tc">
- {{ if .Params.personal }}
- {{ partial "social_links" .Site.Params.Author }}
- {{ else }}
- {{ partial "social_links" .Site.Params }}
- {{ end }}
+ {{ partial "social_links" .Params }}
</div>
{{ else }}
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
index b2136bc..28dc5b4 100644
--- a/layouts/partials/metadata.html
+++ b/layouts/partials/metadata.html
@@ -1,9 +1,19 @@
{{ $dateTime := .PublishDate.Format "2006-01-02" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
<div class="f6 lh-copy mv0 ph4 pv2">
- By
- {{ with .Params.author }}
- <span class="author"> &mdash; {{ delimit . ", " }} </span>
+ By &mdash;
+ {{ range .Params.authors }}
+ {{ $name := . }}
+ {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }}
+ {{ with $.GetPage $path }}
+ {{ if isset .Params "name" }}
+ <a class="link underline color-inherit" href="{{ .RelPermalink }}">
+ {{- default $name .Params.name -}}
+ </a>
+ {{ else }}
+ {{ $name }}
+ {{ end }}
+ {{ end }}
{{ end }}