Skip to content

Commit

Permalink
use default single.html
Browse files Browse the repository at this point in the history
  • Loading branch information
xianmin committed Oct 16, 2022
1 parent b26e8e2 commit 4f1a558
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 97 deletions.
88 changes: 65 additions & 23 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -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 }}
74 changes: 0 additions & 74 deletions layouts/post/single.html

This file was deleted.

0 comments on commit 4f1a558

Please sign in to comment.