micrach/templates/components/thread-card.html
Yanislav Igonin 920018950b Revert "fix: seo + uploads"
This reverts commit 424a5ff4df.
2022-02-28 12:33:20 +02:00

18 lines
574 B
HTML

{{ define "thread-card" }}
<div class="col col-sm-6 col-md-4 col-lg-3">
<div class="card">
{{ $length := len .Files }}
{{ if gt $length 0 }}
{{ $FirstFile := index .Files 0 }}
<img src="/uploads/{{.ID}}/t/{{$FirstFile.ID}}.{{$FirstFile.Ext}}" class="card-img-top" alt="Uploaded picture">
{{ end }}
<div class="card-body">
{{ template "thread-card-title" .Title }}
{{ template "thread-card-text" .Text }}
<a href="/{{.ID}}" class="btn btn-outline-primary">Open</a>
</div>
</div>
</div>
{{ end }}