2022-01-31 19:56:21 +03:00
|
|
|
{{ 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 }}
|
2022-02-28 13:10:37 +03:00
|
|
|
<img src="uploads/{{.ID}}/t/{{$FirstFile.ID}}.{{$FirstFile.Ext}}" class="card-img-top" alt="Uploaded picture">
|
2022-01-31 19:56:21 +03:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<div class="card-body">
|
2022-02-02 16:03:40 +03:00
|
|
|
{{ template "thread-card-title" .Title }}
|
|
|
|
{{ template "thread-card-text" .Text }}
|
2022-01-31 19:56:21 +03:00
|
|
|
<a href="/{{.ID}}" class="btn btn-outline-primary">Open</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|