summaryrefslogtreecommitdiff
path: root/layouts/_default/single.html
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-09-08 21:56:46 +0800
committerReorx <novoreorx@gmail.com>2022-09-08 21:56:46 +0800
commitae58c91ac49e822fd2cf8c5aa1b36cea0f8470ee (patch)
tree48a9819bced94c6c29b0c171e80bc61bcd6b9ae5 /layouts/_default/single.html
parentcd0381f6d3b86adb02702f1848283d9f19b017b5 (diff)
parentbb02a60990dd79f9828798a044776984d51ff5da (diff)
Merge branch 'newsletter'
* newsletter: (28 commits) newsletter section: only show list when there are pages lower nav height in mobile use content-gap instead of gap for header consistant header gaps subtle adjustments clear debug code finish newsletter archives add newsletter sub box in single enhance inline links fix rss pages query newsletter regular page responsive enlarge post footer bottom border size from 1 to 3px fix all pages query issues in: list, archives, newsletter section, post_nav_links fixup! finish newsletter section styling newsletter section page responsive finish newsletter section styling adjust first-entry ul/ol margin styling newsletter section list rename .list to .list-page styling newsletter sub form ...
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r--layouts/_default/single.html24
1 files changed, 21 insertions, 3 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index c71f66d..fa4c86d 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,15 +1,24 @@
{{- define "main" }}
+{{- $isNewsletter := eq .Type "newsletter" }}
<article class="post-single">
<header class="post-header">
{{ partial "breadcrumbs.html" . }}
+
+ {{- if $isNewsletter -}}
+ {{- partial "newsletter_brand.html" . }}
+ {{- 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") }}
@@ -43,6 +52,15 @@
{{- if (.Param "ShowPostNavLinks") }}
{{- partial "post_nav_links.html" . }}
{{- end }}
+
+ {{- if $isNewsletter }}
+ <div class="newsletter-sub">
+ <div class="notice">
+ 感谢你能读到这里,如果觉得有趣的话,欢迎在下方输入邮箱进行订阅。
+ </div>
+ {{- partial "newsletter_sub_form.html"}}
+ </div>
+ {{- end }}
</footer>
{{- if not (.Param "noComments") }}