micrach/templates/thread.html
Yanislav Igonin 242abb8645
Feature - Migrator (#3)
* feat: rename init migration

* feat: add migration for is_archived field

* fix: thread title wrap

* fix: captcha checks after post validation now

* fix

* wip on migrate method

* feat: decided to write own migrator

* feat: add get files on folder func

* wip

* feat: add migrations table

* feat: add migration method

* doc

* feat: query -> exec
2021-11-17 11:44:12 +03:00

60 lines
1.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ $FirstPost:= index .Thread 0 }}
<!DOCTYPE html>
<html lang="en">
<head>
{{ template "static" }}
{{ template "meta-tags-dynamic" $FirstPost }}
<link href="/static/styles/thread.css" rel="stylesheet" >
<link href="/static/styles/post.css" rel="stylesheet" >
</head>
<body>
<a href="/" class="thread-title-link">
<h1 class="display-1 text-center thread-title">
{{ if ne $FirstPost.Title "" }}
{{$FirstPost.Title}}
{{ else }}
Welcome to Micrach
{{ end }}
</h1>
</a>
<div class="container">
{{ template "post-form" .FormData }}
<div id="postsСontainer">
{{ range $Post := .Thread }}
<div class="post-container mb-4">
{{ $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>
</div>
{{ end }}
</div>
{{ end }}
<div class="data-container p-2">
<p class="card-text">{{$Post.Text}}</p>
</div>
</div>
{{end}}
</div>
</div>
{{ template "footer" }}
</body>
</html>