micrach/templates/pages/thread.html

48 lines
1.2 KiB
HTML
Raw Normal View History

{{ $FirstPost:= index .Thread 0 }}
2021-09-05 00:36:55 +03:00
2021-10-16 14:36:52 +03:00
<!DOCTYPE html>
2021-09-05 00:36:55 +03:00
<html lang="en">
2021-09-05 00:36:55 +03:00
<head>
2021-09-05 15:38:08 +03:00
{{ template "static" }}
{{ template "meta-tags-dynamic" $FirstPost }}
<link href="/static/styles/thread.css" rel="stylesheet">
<link href="/static/styles/post.css" rel="stylesheet">
2021-09-05 00:36:55 +03:00
</head>
<body>
2022-01-28 02:44:35 +03:00
{{ template "header" $FirstPost.Title }}
2021-09-05 00:36:55 +03:00
<div class="container">
{{ template "post-form" .FormData }}
2022-01-30 15:23:50 +03:00
2021-09-12 00:30:48 +03:00
<div id="postsСontainer">
{{ range $Post := .Thread }}
<div class="post-container mb-4">
2021-09-12 00:30:48 +03:00
{{ $filesLength := len $Post.Files }}
{{ if gt $filesLength 0 }}
<div class="files-container">
{{ range $File := $Post.Files }}
<div class="file-container">
<a href="/uploads/{{$FirstPost.ID}}/o/{{$File.ID}}.{{$File.Ext}}" target="blank">
<img src="/uploads/{{$FirstPost.ID}}/t/{{$File.ID}}.{{$File.Ext}}" class="file" alt="Uploaded picture">
</a>
2021-09-05 00:36:55 +03:00
</div>
{{ end }}
</div>
{{ end }}
2021-09-12 00:30:48 +03:00
<div class="p-2">
<p class="card-text line-break text-break">{{$Post.Text}}</p>
2021-09-05 00:36:55 +03:00
</div>
</div>
2022-01-30 15:23:50 +03:00
{{ end }}
2021-09-05 00:36:55 +03:00
</div>
</div>
2021-10-14 11:43:32 +03:00
{{ template "footer" }}
2021-09-05 00:36:55 +03:00
</body>
</html>