2022-01-31 19:56:21 +03:00
|
|
|
{{ define "post" }}
|
|
|
|
<div class="post-container mb-4">
|
2022-02-07 13:27:16 +03:00
|
|
|
<div class="p-2">
|
|
|
|
<div class="post-info-container">
|
|
|
|
<span>{{ .CreatedAt.Format "Jan 02, 2006 15:04:05" }}</span>
|
|
|
|
<span>#{{ .ID }}</span>
|
2022-01-31 19:56:21 +03:00
|
|
|
</div>
|
|
|
|
|
2022-02-07 13:27:16 +03:00
|
|
|
<div class="post-body-container">
|
|
|
|
{{ $filesLength := len .Files }}
|
|
|
|
{{ if gt $filesLength 0 }}
|
|
|
|
<div class="files-container">
|
|
|
|
{{ range $File := .Files }}
|
|
|
|
<div class="file-container">
|
2022-02-28 13:10:37 +03:00
|
|
|
<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">
|
2022-02-07 13:27:16 +03:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<p class="card-text line-break text-break">{{.Text}}</p>
|
|
|
|
</div>
|
2022-01-31 19:56:21 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|