aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2023-10-13 03:00:27 +0200
committerOscar Najera <hi@oscarnajera.com>2023-10-13 03:00:27 +0200
commit4bbc7b9a7de0002173f38918cfd69a6e64d86e00 (patch)
treef1581b83ecdc3a26adbc8e605afdcb802a299178
parentb6850fe0584fe7176a1908befd280f6f0ee6fcf0 (diff)
downloadhugo-minimalist-theme-4bbc7b9a7de0002173f38918cfd69a6e64d86e00.tar.gz
hugo-minimalist-theme-4bbc7b9a7de0002173f38918cfd69a6e64d86e00.tar.bz2
hugo-minimalist-theme-4bbc7b9a7de0002173f38918cfd69a6e64d86e00.zip
Post & metadata visibility
-rw-r--r--layouts/partials/metadata.html40
-rw-r--r--layouts/partials/post.html34
2 files changed, 41 insertions, 33 deletions
diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html
index f4e48e8..baab03a 100644
--- a/layouts/partials/metadata.html
+++ b/layouts/partials/metadata.html
@@ -1,24 +1,32 @@
{{ $dateTime := .PublishDate.Format "2006-01-02" }}
{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
-<p class="f6 lh-copy mv0 ph4 pv2">By {{ range .Params.author }} {{ . }} {{ end }}
-<br/>
-<i class="far fa-calendar"></i>
-<time class="f6 lh-copy mv0" datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
-|
-{{ .ReadingTime }} mins read
-{{ with .Params.tags }}
-| <i class="fas fa-tags"></i>
+
+<p class="f6 lh-copy mv0 ph4 pv2">
+ By
+ {{ with .Params.author }}
+ <span class="author"> &mdash; {{ delimit . ", " }} </span>
+ {{ end }}
+
+
+ <br />
+ <i class="far fa-calendar"></i>
+ <time datetime="{{ $dateTime }}">
+ {{ .PublishDate.Format $dateFormat }}
+ </time>
+ | {{ .ReadingTime }} mins read
+ {{ with .Params.tags }}
+ | <i class="fas fa-tags"></i>
{{ range . }}
- {{ $href := print (absURL "tags/") (urlize .) }}
- <a class="link underline light-gray" href="{{ $href }}">{{ . }}</a>
+ {{ $href := print (absURL "tags/") (urlize .) }}
+ <a class="link underline near-black" href="{{ $href }}">{{ . }}</a>
{{ end }}
-{{ end }}
-{{ with .Params.categories }}
-| <i class="fas fa-bookmark"></i>
+ {{ end }}
+ {{ with .Params.categories }}
+ | <i class="fas fa-bookmark"></i>
{{ range . }}
- {{ $href := print (absURL "tags/") (urlize .) }}
- <a class="link underline light-gray" href="{{ $href }}">{{ . }}</a>
+ {{ $href := print (absURL "tags/") (urlize .) }}
+ <a class="link underline near-black" href="{{ $href }}">{{ . }}</a>
{{ end }}
-{{ end }}
+ {{ end }}
</p>
diff --git a/layouts/partials/post.html b/layouts/partials/post.html
index c1e66d5..a950810 100644
--- a/layouts/partials/post.html
+++ b/layouts/partials/post.html
@@ -1,20 +1,20 @@
<article class="pv4 bt bb b--black-10">
-<a class="db no-underline dim" href= "{{ .RelPermalink }}">
- <h3 class="f3 baskerville mt0 lh-title near-black">{{.Title }}</h3>
- <div class="cf">
- {{ with resources.Get (index .Params.images 0) }}
- {{ $image := .Resize (default "320x" .Params.thumbnail_size) }}
- <div class="fl-ns mb4 mb0-ns pr3-ns">
- <img src="{{ $image.RelPermalink }}" class="db center">
+ <a class="db no-underline dim near-black" href="{{ .RelPermalink }}">
+ <h3 class="f3 baskerville mt0 lh-title">{{ .Title }}</h3>
+ <div class="cf">
+ {{ with resources.Get (index .Params.images 0) }}
+ {{ $image := .Resize (default "320x" .Params.thumbnail_size) }}
+ <div class="fl-ns mb4 mb0-ns pr3-ns">
+ <img src="{{ $image.RelPermalink }}" class="db center" />
+ </div>
+ {{ end }}
+ <div class="f5 lh-copy">
+ <!-- {{ .Summary }} -->
+ {{ .Summary | replaceRE `<sup.*?><a href.*?#fn:.*?footnote-ref.*?/a></sup>` "" | safeHTML }}
+ </div>
</div>
- {{ end }}
- <div class="f5 lh-copy near-black">
- <!-- {{ .Summary }} -->
- {{ .Summary | replaceRE `<sup.*?><a href.*?#fn:.*?footnote-ref.*?/a></sup>` "" | safeHTML }}
- </div>
- </div>
-</a>
-{{ if isset .Params "metadata" }}
-{{ partial "metadata.html" . }}
-{{ end }}
+ </a>
+ {{ if isset .Params "metadata" }}
+ {{ partial "metadata.html" . }}
+ {{ end }}
</article>