mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-23 06:42:33 +03:00
920018950b
This reverts commit 424a5ff4df
.
18 lines
574 B
HTML
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 }}
|