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:
authorChen Xianmin <xianmin12@gmail.com>2022-10-17 02:36:15 +0300
committerChen Xianmin <xianmin12@gmail.com>2022-10-17 02:36:15 +0300
commit4f1a558171048f0032cee47bd5da711177a3cdb5 (patch)
treeb81bedb1a5bdf07aab833b25f18d779355ad1e31
parentb26e8e24d3ed120d828a44709431e5ec567b1011 (diff)
use default single.html
-rw-r--r--layouts/_default/single.html88
-rw-r--r--layouts/post/single.html74
2 files changed, 65 insertions, 97 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 }}
diff --git a/layouts/post/single.html b/layouts/post/single.html
deleted file mode 100644
index 5622fb4..0000000
--- a/layouts/post/single.html
+++ /dev/null
@@ -1,74 +0,0 @@
-{{ define "content" -}}
- <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" . }}
-
-
- <!-- 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 . }}
- {{- $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 }}
-
-
- <!-- 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>
-
- <!-- 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" . }}
-{{- end }}