summaryrefslogtreecommitdiff
path: root/layouts/_default/single.html
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-09-07 15:19:46 +0800
committerReorx <novoreorx@gmail.com>2022-09-07 15:19:46 +0800
commitca373fd00303c93ed62eafa55696ab03d23667b2 (patch)
tree96bc1c036117352311fa52da233bb5836ec99814 /layouts/_default/single.html
parenta016d836633b6e223d1ac3ee0ddb262eca0d626d (diff)
add type- and kind- classes to body, styling newsletter single and section
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r--layouts/_default/single.html22
1 files changed, 19 insertions, 3 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index c71f66d..7109cdb 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,15 +1,31 @@
{{- define "main" }}
+{{- $isNewsletter := eq .Type "newsletter" }}
<article class="post-single">
<header class="post-header">
{{ partial "breadcrumbs.html" . }}
+
+ {{- if $isNewsletter -}}
+ <a class="newsletter-brand" href="{{ .Parent.Permalink }}">
+ <div class="icon">@</div>
+ <div class="name">{{ .Param "newsletterName" }}</div>
+ <div class="issueno">#{{ .Param "issueno" }}</div>
+ <div class="arrow">
+ <svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
+ </div>
+ </a>
+ {{- end -}}
<h1 class="post-title">
- {{ .Title }}
- {{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
+ {{- if $isNewsletter -}}
+ {{- replace .Title (.Param "titlePrefix") (.Param "titlePrefixReplace") -}}
+ {{- else -}}
+ {{- .Title -}}
+ {{- end -}}
+ {{- if .Draft -}}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end -}}
</h1>
{{- if .Description }}
<div class="post-description">
- {{ .Description }}
+ {{- .Description -}}
</div>
{{- end }}
{{- if not (.Param "hideMeta") }}