micrach/templates/thread.html

59 lines
1.4 KiB
HTML
Raw Normal View History

{{ $FirstPost:= index .Thread 0 }}
2021-09-05 00:36:55 +03:00
<html lang="en">
<head>
2021-09-05 15:38:08 +03:00
{{ template "static" }}
{{ template "meta-tags-dynamic" $FirstPost }}
<link href="/static/thread.css" rel="stylesheet" >
<link href="/static/post.css" rel="stylesheet" >
2021-09-05 00:36:55 +03:00
</head>
<body>
<a href="/" class="thread-title-link">
2021-10-07 11:11:36 +03:00
<h1 class="display-1 text-center">
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">
{{ template "post-form" .FormData }}
2021-09-05 00:36:55 +03:00
2021-09-12 00:30:48 +03:00
<div id="postsСontainer">
{{ 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">
<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 }}
<div class="data-container p-2">
2021-09-05 00:36:55 +03:00
<p class="card-text">{{$Post.Text}}</p>
</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>