2021-10-04 11:40:53 +03:00
|
|
|
|
{{ $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">
|
|
|
|
|
<head>
|
2021-09-05 15:38:08 +03:00
|
|
|
|
{{ template "static" }}
|
2021-10-05 21:46:17 +03:00
|
|
|
|
{{ template "meta-tags-dynamic" $FirstPost }}
|
2021-10-16 13:14:45 +03:00
|
|
|
|
<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>
|
2021-10-07 16:40:47 +03:00
|
|
|
|
<a href="/" class="thread-title-link">
|
2021-11-17 11:44:12 +03:00
|
|
|
|
<h1 class="display-1 text-center thread-title">
|
2021-10-07 16:40:47 +03:00
|
|
|
|
⤶
|
2021-10-07 11:11:36 +03:00
|
|
|
|
{{ if ne $FirstPost.Title "" }}
|
|
|
|
|
{{$FirstPost.Title}}
|
|
|
|
|
{{ else }}
|
|
|
|
|
Welcome to Micrach
|
|
|
|
|
{{ end }}
|
|
|
|
|
</h1>
|
|
|
|
|
</a>
|
2021-09-05 00:36:55 +03:00
|
|
|
|
|
|
|
|
|
<div class="container">
|
2021-10-04 11:40:53 +03:00
|
|
|
|
{{ template "post-form" .FormData }}
|
2021-09-05 00:36:55 +03:00
|
|
|
|
|
2021-09-12 00:30:48 +03:00
|
|
|
|
<div id="postsСontainer">
|
2021-10-04 11:40:53 +03:00
|
|
|
|
{{ range $Post := .Thread }}
|
2021-09-12 00:30:48 +03:00
|
|
|
|
<div class="post-container mb-4">
|
2021-09-05 00:36:55 +03:00
|
|
|
|
|
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">
|
2021-09-12 11:31:43 +03:00
|
|
|
|
<a href="/uploads/{{$FirstPost.ID}}/o/{{$File.ID}}.{{$File.Ext}}" target="blank">
|
2021-09-12 00:30:48 +03:00
|
|
|
|
<img
|
2021-09-12 14:06:52 +03:00
|
|
|
|
src="/uploads/{{$FirstPost.ID}}/t/{{$File.ID}}.{{$File.Ext}}"
|
2021-09-12 00:30:48 +03:00
|
|
|
|
class="file"
|
|
|
|
|
alt="Uploaded picture"
|
|
|
|
|
>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
2021-09-10 19:16:53 +03:00
|
|
|
|
{{ end }}
|
2021-09-12 00:30:48 +03:00
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
2021-11-20 23:57:14 +03:00
|
|
|
|
<div class="p-2">
|
|
|
|
|
<p class="card-text line-break">{{$Post.Text}}</p>
|
2021-09-05 00:36:55 +03:00
|
|
|
|
</div>
|
2021-09-12 00:30:48 +03:00
|
|
|
|
|
2021-09-05 00:36:55 +03:00
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-10-14 11:43:32 +03:00
|
|
|
|
|
|
|
|
|
{{ template "footer" }}
|
2021-09-05 00:36:55 +03:00
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
</html>
|