mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-22 14:22:33 +03:00
57 lines
1.3 KiB
HTML
57 lines
1.3 KiB
HTML
{{ $FirstPost:= index . 0 }}
|
||
|
||
<html lang="en">
|
||
<head>
|
||
{{ template "static" }}
|
||
{{ template "meta" $FirstPost }}
|
||
<link
|
||
href="/static/post.css"
|
||
rel="stylesheet"
|
||
>
|
||
</head>
|
||
|
||
<body>
|
||
<h1 class="display-1 text-center">
|
||
{{ if ne $FirstPost.Title "" }}
|
||
{{$FirstPost.Title}}
|
||
{{ else }}
|
||
Welcome to Micrach
|
||
{{ end }}
|
||
</h1>
|
||
|
||
<div class="container">
|
||
{{ template "post-form" $FirstPost.ID }}
|
||
|
||
<div id="postsСontainer">
|
||
{{range $Post := .}}
|
||
<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}}/o/{{$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>
|
||
</body>
|
||
|
||
</html> |