mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-22 22:32:33 +03:00
45 lines
1023 B
HTML
45 lines
1023 B
HTML
<html lang="en">
|
|
<head>
|
|
{{ template "static" }}
|
|
<link
|
|
href="/static/index.css"
|
|
rel="stylesheet"
|
|
>
|
|
|
|
{{ template "static-meta" }}
|
|
</head>
|
|
|
|
<body>
|
|
<h1 class="display-1 text-center">Welcome to Micrach</h1>
|
|
|
|
<div class="container">
|
|
{{ template "post-form" }}
|
|
|
|
<div class="row row-cols-auto gy-4">
|
|
{{range $Post := .}}
|
|
<div class="col col-sm-6 col-md-4 col-lg-3">
|
|
<div class="card">
|
|
|
|
{{ $length := len $Post.Files }} {{ if gt $length 0 }}
|
|
{{$FirstFile := index $Post.Files 0}}
|
|
<img
|
|
src="{{$FirstFile.Name}}"
|
|
class="card-img-top"
|
|
alt="Uploaded picture"
|
|
>
|
|
{{end}}
|
|
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{$Post.Title}}</h5>
|
|
<p class="card-text">{{$Post.Text}}</p>
|
|
<a href="/{{$Post.ID}}" class="btn btn-outline-primary">Open</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
|
|
</html> |