micrach/templates/thread.html

57 lines
1.4 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>
<a href="/" class="thread-title-link">
<h1 class="display-1 text-center thread-title">
2021-10-07 11:11:36 +03:00
{{ if ne $FirstPost.Title "" }}
{{$FirstPost.Title}}
2021-10-07 11:11:36 +03:00
{{ else }}
Welcome to Micrach
2021-10-07 11:11:36 +03:00
{{ end }}
</h1>
</a>
2021-09-05 00:36:55 +03:00
<div class="container">
{{ template "post-form" .FormData }}
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>
2021-09-05 00:36:55 +03:00
{{end}}
</div>
</div>
2021-10-14 11:43:32 +03:00
{{ template "footer" }}
2021-09-05 00:36:55 +03:00
</body>
</html>