diff options
author | GNUxeava <bluenerd@protonmail.com> | 2022-03-11 10:32:10 +0530 |
---|---|---|
committer | GNUxeava <bluenerd@protonmail.com> | 2022-03-11 10:32:10 +0530 |
commit | fecc9b268410c8fefcd1ca32bc4228bba9002178 (patch) | |
tree | aa621093976dbbe8961f723ddb3569737e96932a /layouts/post | |
parent | 2dfa39111cd76b102dbb3f58c1754b6c93b0265a (diff) |
use theme
Diffstat (limited to 'layouts/post')
-rw-r--r-- | layouts/post/single.html | 72 | ||||
-rw-r--r-- | layouts/post/summary.html | 28 |
2 files changed, 100 insertions, 0 deletions
diff --git a/layouts/post/single.html b/layouts/post/single.html new file mode 100644 index 0000000..d138eef --- /dev/null +++ b/layouts/post/single.html @@ -0,0 +1,72 @@ +{{ define "content" -}} + <article class="post"> + <!-- post-header --> + <header class="post-header"> + <h1 class="post-title">{{ .Title }}</h1> + + <div class="post-meta"> + <span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span> + {{ with .Params.categories -}} + <div class="post-category"> + {{ range . -}} + <a href="{{ "categories" | relLangURL }}/{{ . | urlize }}/"> {{ . }} </a> + {{ end -}} + </div> + {{- end }} + {{- if .Site.Params.moreMeta }} + <span class="more-meta"> {{ T "wordCount" .WordCount }} </span> + <span class="more-meta"> {{ T "readingTime" .ReadingTime }} </span> + {{- end }} + {{ if and .Site.Params.busuanzi.enable .Site.Params.busuanzi.pagePV -}} + {{ $valueSpan := printf `<span id="busuanzi_value_page_pv"><img src="%s" alt="spinner.svg"/></span>` ("img/spinner.svg" | relURL) -}} + <span id="busuanzi_container_page_pv" class="more-meta"> {{ printf (T "pagePV") $valueSpan | safeHTML }} </span> + {{- end }} + </div> + </header> + + <!-- TOC --> + {{- partial "post/toc.html" . -}} + + <!-- Outdated Info Warning --> + {{- partial "post/outdated-info-warning.html" . -}} + + <!-- Content --> + <div class="post-content"> + {{ .Content }} + </div> + + <!-- Copyright --> + {{- partial "post/copyright.html" . -}} + + <!-- Reward --> + {{- partial "post/reward.html" . -}} + + <footer class="post-footer"> + {{ with .Params.tags -}} + <div class="post-tags"> + {{ range . -}} + <a href="{{ "tags" | relLangURL }}/{{ . | urlize }}{{ if $.Site.Params.uglyURLs }}.html{{ else }}/{{ end }}">{{ . }}</a> + {{ end -}} + </div> + {{- end -}} + + <!-- Post Pagination --> + <nav class="post-nav"> + {{ with .NextInSection -}} + <a class="prev" href="{{ .RelPermalink }}"> + <i class="iconfont icon-left"></i> + <span class="prev-text nav-default">{{ .Title }}</span> + <span class="prev-text nav-mobile">{{ T "prevPost" }}</span> + </a> + {{- end }} + {{ with .PrevInSection -}} + <a class="next" href="{{ .RelPermalink }}"> + <span class="next-text nav-default">{{ .Title }}</span> + <span class="next-text nav-mobile">{{ T "nextPost" }}</span> + <i class="iconfont icon-right"></i> + </a> + {{- end }} + </nav> + </footer> + </article> +{{- end }} diff --git a/layouts/post/summary.html b/layouts/post/summary.html new file mode 100644 index 0000000..38c45f4 --- /dev/null +++ b/layouts/post/summary.html @@ -0,0 +1,28 @@ +<article class="post"> + <header class="post-header"> + <h1 class="post-title"><a class="post-link" href="{{ .RelPermalink }}">{{ .Title }}</a></h1> + <div class="post-meta"> + <span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span> + {{ with .Params.categories -}} + <div class="post-category"> + {{ range . -}} + <a href="{{ "categories" | relLangURL }}/{{ . | urlize }}/"> {{ . }} </a> + {{ end -}} + </div> + {{- end }} + {{- if .Site.Params.moreMeta }} + <span class="more-meta"> {{ T "wordCount" .WordCount }} </span> + <span class="more-meta"> {{ T "readingTime" .ReadingTime }} </span> + {{- end }} + </div> + </header> + <!-- Content --> + <div class="post-content"> + <div class="post-summary"> + {{ .Summary }} + </div> + <div class="read-more"> + <a href="{{ .RelPermalink }}" class="read-more-link">{{ T "readMore" }}</a> + </div> + </div> +</article> |