sandvich.xyz/layouts/partials/post.html

24 lines
650 B
HTML

{{ $class := cond .Truncated "post-item more" "post-item" }}
<div class="{{ $class }}">
<h1>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h1>
{{ if (eq .Section "posts") }}
{{ partial "post-info-small.html" . }}
{{ end }}
{{ if (gt (len .Summary) 0) }}
<p>
{{ .Summary }}
</p>
{{ if .Truncated }}
<div class="read-more-button">
<a href="{{ .RelPermalink }}" class="button">
<button>
Read more
</button>
</a>
</div>
{{ end }}
{{ end }}
</div>