Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xianmin/hugo-theme-jane.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default/single.html')
-rw-r--r--layouts/_default/single.html88
1 files changed, 65 insertions, 23 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index db98bd8..5622fb4 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,32 +1,74 @@
{{ define "content" -}}
-<article class="post bg-white">
- <!-- post-header -->
- <header class="post-header">
- <h1 class="post-title">{{ .Title }}</h1>
- {{ partial "post/i18nlist.html" . }}
- <div class="post-meta">
- <time datetime="{{ .Date.Format "2006-01-02" }}" class="post-time">
- {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}
- </time>
- </div>
- </header>
+ <article class="post bg-white">
+ <!-- post-header -->
+ <header class="post-header">
+ <h1 class="post-title">{{ .Title }}</h1>
+ {{ partial "post/i18nlist.html" . }}
+ {{ partial "post/meta.html" . }}
+ </header>
+
+ <!-- TOC -->
+ {{ partial "post/toc.html" . }}
- <!-- TOC -->
- {{ partial "post/toc.html" . }}
- <!-- Content -->
- <div class="post-content">
+ <!-- Content -->
+ <div class="post-content">
{{ .Content }}
- </div>
+ </div>
+
+ <!-- Copyright -->
+ {{ partial "post/copyright.html" . }}
+
+
+ <!-- Reward -->
+ {{ partial "post/reward.html" . }}
+
+
+ <footer class="post-footer">
+ {{ with .Params.tags -}}
+ <div class="post-tags">
+ {{ range . }}
+ {{- $name := . -}}
+ {{- with $.Site.GetPage "taxonomy" (printf "tags/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "tags/%s" ($name | urlize))) -}}
+ <a href="{{ .Permalink }}">{{ $name }}</a>
+ {{ end -}}
+ {{ end }}
+ </div>
+ {{- end }}
+
- <!-- Copyright -->
- {{ partial "post/copyright.html" . }}
+ <!-- Post Pagination -->
+ <nav class="post-nav">
+ {{ with .NextInSection }}
+ <a class="prev" href="{{ .RelPermalink }}">
+ {{/* icon left */}}
+ <i class="iconfont">
+ {{ partial "svg/left.svg" }}
+ </i>
+ <span class="prev-text nav-default">{{ .Title }}</span>
+ <span class="prev-text nav-mobile">{{ i18n "prev_post" }}</span>
+ </a>
+ {{- end }}
+ {{ with .PrevInSection }}
+ <a class="next" href="{{ .RelPermalink }}">
+ <span class="next-text nav-default">{{ .Title }}</span>
+ <span class="prev-text nav-mobile">{{ i18n "next_post" }}</span>
+ {{/* icon right */}}
+ <i class="iconfont">
+ {{ partial "svg/right.svg" }}
+ </i>
+ </a>
+ {{- end }}
+ </nav>
+ </footer>
+ </article>
- <!-- Reward -->
- {{ partial "post/reward.html" . }}
-</article>
+ <!-- Author Info -->
+ {{ if and (.Params.author | default .Site.Author.name) (.Params.showAuthorInfo | default .Site.Params.showAuthorInfo) }}
+ {{ partial "author_info.html" (dict "author" (.Params.author | default .Site.Author.name) "context" $) }}
+ {{ end }}
-<!-- Comments -->
-{{ partial "comments.html" . }}
+ <!-- Comments -->
+ {{ partial "comments.html" . }}
{{- end }}