mirror of
https://github.com/panr/hugo-theme-terminal.git
synced 2024-11-22 17:45:43 +03:00
32df60e801
this hides it if there's no post author to show
56 lines
1.5 KiB
HTML
56 lines
1.5 KiB
HTML
{{ define "main" }}
|
|
{{ with .Content }}
|
|
<div class="index-content">
|
|
{{ . }}
|
|
</div>
|
|
{{ end }}
|
|
<div class="posts">
|
|
{{ range .Paginator.Pages }}
|
|
<article class="post on-list">
|
|
<h1 class="post-title">
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
</h1>
|
|
<div class="post-meta">
|
|
{{ if .Date }}
|
|
<time class="post-date">
|
|
{{ .Date.Format "2006-01-02" }}
|
|
</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 }}
|
|
{{ .Description | markdownify }}
|
|
{{ else }}
|
|
{{ .Summary }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ if not .Params.showFullContent }}
|
|
<div>
|
|
<a class="read-more button" href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
|
|
</div>
|
|
{{ end }}
|
|
</article>
|
|
{{ end }}
|
|
|
|
{{ partial "pagination.html" . }}
|
|
</div>
|
|
{{ end }}
|