From 0baaa2eaa759662363533b812ef5dd7cc25885e3 Mon Sep 17 00:00:00 2001 From: Alexander Kavon Date: Mon, 22 Jan 2024 21:59:17 -0500 Subject: ui post/get and ui comments templates --- ui/pages/post/get.tmpl.html | 22 ++++++++++++++++++++++ ui/templates/comments.tmpl.html | 16 ++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 ui/pages/post/get.tmpl.html create mode 100644 ui/templates/comments.tmpl.html diff --git a/ui/pages/post/get.tmpl.html b/ui/pages/post/get.tmpl.html new file mode 100644 index 0000000..1489f36 --- /dev/null +++ b/ui/pages/post/get.tmpl.html @@ -0,0 +1,22 @@ +{{define "title"}}{{.Title}}{{end}} + +{{define "main"}} + {{.Title}} + {{.Tags}} + {{.UrlDomainName}} + by {{.Username}} + {{.CreatedAt | relative}} + + Flag + Hide + + {{ if .Description && !.Url }} +

{{.Description}}

+ {{endif}} +
+ + + +
+ {{template "comments" .}} +{{end}} diff --git a/ui/templates/comments.tmpl.html b/ui/templates/comments.tmpl.html new file mode 100644 index 0000000..560e918 --- /dev/null +++ b/ui/templates/comments.tmpl.html @@ -0,0 +1,16 @@ +{{define "comments"}} +
+ {{range $comment := .comments }} + by {{$comment.username}} + {{$comment.created_at | relative_time}} + + Flag + Hide + Reply + + + {{ end }} +
+{{end}} -- cgit v1.2.3