sandvich.xyz/layouts/partials/post.html

24 lines
650 B
HTML
Raw Permalink Normal View History

2023-07-04 01:35:55 -07:00
{{ $class := cond .Truncated "post-item more" "post-item" }}
<div class="{{ $class }}">
2022-10-30 19:47:39 -07:00
<h1>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h1>
{{ if (eq .Section "posts") }}
{{ partial "post-info-small.html" . }}
{{ end }}
2023-07-04 01:35:55 -07:00
{{ if (gt (len .Summary) 0) }}
2022-10-30 19:47:39 -07:00
<p>
{{ .Summary }}
</p>
2023-07-04 01:35:55 -07:00
{{ if .Truncated }}
<div class="read-more-button">
<a href="{{ .RelPermalink }}" class="button">
<button>
Read more
</button>
</a>
</div>
{{ end }}
2022-10-30 19:47:39 -07:00
{{ end }}
</div>