diff options
| author | Reorx <novoreorx@gmail.com> | 2022-09-07 15:37:31 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-09-07 15:37:31 +0800 |
| commit | ea271b565162f9a4144b97c23dbce3135403e094 (patch) | |
| tree | e9770b207f0ac76453b262b296c17bdf62f80e04 /layouts | |
| parent | 2f47e7cff86f06f6c392bcf7e3e260c9fb57297e (diff) | |
split partial newsletter_brand
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_default/single.html | 13 | ||||
| -rw-r--r-- | layouts/partials/newsletter_brand.html | 8 |
2 files changed, 13 insertions, 8 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7109cdb..9c68c5a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,14 +6,7 @@ {{ 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> + {{- partial "newsletter_brand.html" . }} {{- end -}} <h1 class="post-title"> {{- if $isNewsletter -}} @@ -59,6 +52,10 @@ {{- if (.Param "ShowPostNavLinks") }} {{- partial "post_nav_links.html" . }} {{- end }} + + {{- if $isNewsletter }} + {{- partial "newsletter_sub_form.html"}} + {{- end }} </footer> {{- if not (.Param "noComments") }} diff --git a/layouts/partials/newsletter_brand.html b/layouts/partials/newsletter_brand.html new file mode 100644 index 0000000..03c10ee --- /dev/null +++ b/layouts/partials/newsletter_brand.html @@ -0,0 +1,8 @@ +<a class="newsletter-brand" href="{{ .Parent.Permalink }}"> + <div class="icon">@</div> + <div class="name">{{ .Param "newsletterName" }}</div> + {{ with .Param "issueno" }}<div class="remark">#{{ . }}</div>{{ end }} + <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> |
