diff --git a/frontend/templates/index.go.tmpl b/frontend/templates/index.go.tmpl index 3698343..f0bfb9d 100644 --- a/frontend/templates/index.go.tmpl +++ b/frontend/templates/index.go.tmpl @@ -13,6 +13,15 @@ {{ template "menu.go.tmpl" . }} + +
+{{ range .Pinned }} +
+{{ template "post.go.tmpl" . }} +
+{{ end }} +
+ diff --git a/frontend/templates/post.go.tmpl b/frontend/templates/post.go.tmpl new file mode 100644 index 0000000..135cbd1 --- /dev/null +++ b/frontend/templates/post.go.tmpl @@ -0,0 +1,24 @@ +
+ + +
+

{{ .Title }}

+
+ +{{ if .FImage }} +
+ +
+{{ end }} + + +
+{{ .HTML }} +
+ + +
+

… … …

+
+ +
\ No newline at end of file diff --git a/frontend/templates/templates.go b/frontend/templates/templates.go index d56a223..9713638 100644 --- a/frontend/templates/templates.go +++ b/frontend/templates/templates.go @@ -17,6 +17,7 @@ import ( //go:embed head.go.tmpl //go:embed index.go.tmpl //go:embed menu.go.tmpl +//go:embed post.go.tmpl var content embed.FS // List of compiled go-templates