mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-10 02:22:26 +00:00
port to gitlab.
This commit is contained in:
78
themes/custom/layouts/post/single.html
Normal file
78
themes/custom/layouts/post/single.html
Normal file
@@ -0,0 +1,78 @@
|
||||
{{ define "content" -}}
|
||||
<article class="post">
|
||||
<!-- post-header -->
|
||||
<header class="post-header single-post-header">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
<span class="post-time"> <i class="fa fa-calendar" aria-hidden="true"></i> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span>
|
||||
{{ with .Params.categories -}}
|
||||
<div class="post-category">
|
||||
| <i class="fa fa-folder" aria-hidden="true"></i>
|
||||
{{ range . }}
|
||||
<a href="{{ "categories" | relLangURL }}/{{ . | urlize }}/"> {{ . }} </a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
{{ if .Site.Params.moreMeta -}}
|
||||
<span class="more-meta"> | <i class="fa fa-book" aria-hidden="true"></i> {{ T "wordCount" .WordCount }} </span>
|
||||
<span class="more-meta"> | <i class="fa fa-clock-o" aria-hidden="true"></i> {{ T "readingTime" .ReadingTime }} </span>
|
||||
<span class="more-meta">
|
||||
| <i class="fa fa-comment-o" aria-hidden="true"></i>
|
||||
<a href="#gitalk-container" itemprop="discussionUrl">
|
||||
<span class="post-comments-count gitalk-comment-count" itemprop="commentCount"></span>
|
||||
</a>
|
||||
{{ .Site.Params.gitalk.countSign }}
|
||||
</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) -}}
|
||||
| <i class="fa fa-eye"></i>
|
||||
<span id="busuanzi_container_page_pv" class="more-meta"> {{ printf (T "pagePV") $valueSpan | safeHTML }} </span>
|
||||
{{- end }}
|
||||
</div>
|
||||
</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 . }}
|
||||
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
<!-- Post Pagination -->
|
||||
<nav class="post-nav">
|
||||
{{ with .NextInSection }}
|
||||
<a class="prev" href="{{ .URL }}">
|
||||
<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="{{ .URL }}">
|
||||
<span class="next-text nav-default">{{ .Title }}</span>
|
||||
<span class="prev-text nav-mobile">{{ T "nextPost" }}</span>
|
||||
<i class="iconfont icon-right"></i>
|
||||
</a>
|
||||
{{- end }}
|
||||
</nav>
|
||||
</footer>
|
||||
</article>
|
||||
{{- end }}
|
Reference in New Issue
Block a user