Maintain default list style for posts
This commit is contained in:
parent
f57ac2b8cc
commit
4e2b01779a
1 changed files with 59 additions and 0 deletions
59
layouts/posts/list.html
Normal file
59
layouts/posts/list.html
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
{{ with .Content }}
|
||||||
|
<div class="index-content">
|
||||||
|
{{ . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
<div class="posts">
|
||||||
|
{{ range .Site.Taxonomies.topics }}
|
||||||
|
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }} ·
|
||||||
|
{{ end }}
|
||||||
|
{{ range .Paginator.Pages }}
|
||||||
|
<article class="post on-list">
|
||||||
|
<h2 class="post-title">
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
|
</h2>
|
||||||
|
<div class="post-meta">
|
||||||
|
{{- if .Date -}}
|
||||||
|
<time class="post-date">
|
||||||
|
{{- partial "post-date" . -}}
|
||||||
|
</time>
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Params.Author -}}
|
||||||
|
<span class="post-author">{{- . -}}</span>
|
||||||
|
{{- end -}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
<span class="post-tags">
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
|
||||||
|
{{- . -}}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ partial "cover.html" . }}
|
||||||
|
|
||||||
|
<div class="post-content">
|
||||||
|
{{ if .Params.showFullContent }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ else if .Description }}
|
||||||
|
<p>{{ .Description | markdownify }}</p>
|
||||||
|
{{ else }}
|
||||||
|
{{ .Summary }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if not .Params.showFullContent }}
|
||||||
|
<div>
|
||||||
|
<a class="read-more button inline" href="{{ .RelPermalink }}">[{{ $.Site.Params.ReadMore }}]</a>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue