micrach/templates/components/post.html
Yanislav Igonin fbe39f45a3
Feature - Components refactor (#10)
* feat: header component

* feat: captcha component

* feat: rename all html files

* feat: update github link

* feat: all templates in subfolders

* feat: separate thread card

* feat: separate pagination

* feat: update pagination

* feat: separate post

* lint
2022-01-31 19:56:21 +03:00

20 lines
611 B
HTML

{{ define "post" }}
<div class="post-container mb-4">
{{ $filesLength := len .Files }}
{{ if gt $filesLength 0 }}
<div class="files-container">
{{ range $File := .Files }}
<div class="file-container">
<a href="/uploads/{{.getThreadID}}/o/{{$File.ID}}.{{$File.Ext}}" target="blank">
<img src="/uploads/{{.getThreadID}}/t/{{$File.ID}}.{{$File.Ext}}" class="file" alt="Uploaded picture">
</a>
</div>
{{ end }}
</div>
{{ end }}
<div class="p-2">
<p class="card-text line-break text-break">{{.Text}}</p>
</div>
</div>
{{ end }}