mirror of
https://github.com/mainnika/nikita-tokarch-uk.git
synced 2026-05-25 01:03:35 +00:00
Render pinned post on index template
This commit is contained in:
@@ -13,6 +13,15 @@
|
|||||||
{{ template "menu.go.tmpl" . }}
|
{{ template "menu.go.tmpl" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- render pinned -->
|
||||||
|
<div class="pinned-container">
|
||||||
|
{{ range .Pinned }}
|
||||||
|
<div class="pinned-post">
|
||||||
|
{{ template "post.go.tmpl" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<div class="blog-post">
|
||||||
|
|
||||||
|
<!-- render post header -->
|
||||||
|
<div class="blog-post-head">
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if .FImage }}
|
||||||
|
<div class="blog-post-head-image">
|
||||||
|
<img src="{{ .FImage }}"></img>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- render post -->
|
||||||
|
<div class="blog-post-content">
|
||||||
|
{{ .HTML }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- render post tailer -->
|
||||||
|
<div class="blog-post-tailer">
|
||||||
|
<h3>… … …</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
@@ -17,6 +17,7 @@ import (
|
|||||||
//go:embed head.go.tmpl
|
//go:embed head.go.tmpl
|
||||||
//go:embed index.go.tmpl
|
//go:embed index.go.tmpl
|
||||||
//go:embed menu.go.tmpl
|
//go:embed menu.go.tmpl
|
||||||
|
//go:embed post.go.tmpl
|
||||||
var content embed.FS
|
var content embed.FS
|
||||||
|
|
||||||
// List of compiled go-templates
|
// List of compiled go-templates
|
||||||
|
|||||||
Reference in New Issue
Block a user