mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
59 lines
1.4 KiB
HTML
59 lines
1.4 KiB
HTML
{{ define "main" }}
|
|
{{ if .Data.Singular }}
|
|
<h3>Filtering for "{{ .Title }}"</h3>
|
|
<small>
|
|
<a href="{{ . | relURL }}">Remove filter</a>
|
|
</small>
|
|
{{ else }}
|
|
<h1>{{ .Title | markdownify }}</h1>
|
|
{{ end }}
|
|
|
|
{{ $showDate := .Params.showdate }}
|
|
{{ range .Pages }}
|
|
<div class="post">
|
|
<h2 class="post-title">
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
</h2>
|
|
|
|
<div class="post-metadata">
|
|
{{ if .Date }}
|
|
<time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate>
|
|
{{ .Date.Format "January 2, 2006" }}
|
|
</time>
|
|
{{ if ne .Lastmod .Date }}
|
|
( Modified
|
|
<time datetime="{{ .Lastmod.Format "January 2, 2006" }}" pubdate>
|
|
{{ .Lastmod.Format "January 2, 2006" }}
|
|
</time>
|
|
) <!-- I don't know how to get rid of the whitespace in between here,
|
|
so I'll just live with it for now. -->
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
<span class="tags">
|
|
{{ range (.GetTerms "tags") }}
|
|
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
|
|
{{ end }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="post-description">
|
|
{{ if .Description }}
|
|
{{ .Description | markdownify }}
|
|
{{ else }}
|
|
{{ .Summary | markdownify }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
<div class="readmore">
|
|
<a href="{{ .Permalink }}">Read more →</a>
|
|
</div>
|
|
</div>
|
|
{{ else }}
|
|
<div>
|
|
No posts here!
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ end }}
|