Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
99 lines (83 sloc) 3.53 KB
{{ define "head" }}
{{ if .NextInSection -}}<link rel="prefetch" href="{{ .NextInSection.Permalink }}">{{- end }}
{{ if .PrevInSection -}}<link rel="prefetch" href="{{ .PrevInSection.Permalink }}">{{- end }}
{{ end }}
{{ define "main" }}
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
<div class="post {{.File.Path | replaceRE ".*posts/(.*)/.*" "$1"}}">
{{ partial "breadcrumb.html" . }}
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
<div class="post-meta">
{{ if .Date | default nil }}
<span class="post-date">
{{ .Date.Format ($.Site.Params.DateFormatSingle | default "2006-01-02") }}
</span>
{{ if eq .Type $contentTypeName }}
{{ if $.Site.Params.LastModDisplay }}
{{ partial "lastmod.html" . }}
{{ end }}
{{ end }}
{{ end }}
{{- if .Site.Params.valine.enable -}}
<span> / <span class="valine-comment-count" data-xid="{{ .URL | relURL }}">0</span> 评论 / <span id="{{ .URL | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}"><span class="leancloud-visitors-count">0</span> 阅读</span></span>
{{ end }}
</div>
{{ if .Params.feature }}
{{ if .Params.UseRelativeCover }}
<img loading='lazy' src="{{ (printf "%s%s" .Permalink .Params.feature ) }}" class="post-cover" />
{{ else }}
<img loading='lazy' src="{{ .Params.feature | absURL }}" class="post-cover" />
{{ end }}
{{ end }}
<div class="post-content">
{{ .Content }}
</div>
{{ if .Params.toc }}
<div class="tocify">目录:{{- partial "toc.html" . -}}</div>
{{ end }}
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s" . )) | absURL }}/">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
<div class="clear"></div>
{{ if eq .Type $.Site.Params.contentTypeName }}
{{ if or .NextInSection .PrevInSection }}
<div class="pagination">
<div class="pagination__title">
{{ if and .File .Site.Params.EditPath}}
<a class="pagination__title-h" href="https://github.com/lmm214/immmmm/edit/master/content/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener">阅读更多</a>
{{ else}}
<span class="pagination__title-h">阅读更多</span>
{{ end }}
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon"></span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{ end }}
{{ if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon"></span>
</a>
</span>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
{{ if not (eq .Params.Comments "false") }}
{{ partial "comments.html" . }}
{{ end }}
</div>
{{ end }}
You can’t perform that action at this time.