diff options
Diffstat (limited to 'src/ui/templates')
| -rw-r--r-- | src/ui/templates/base.tmpl.html | 14 | ||||
| -rw-r--r-- | src/ui/templates/comments.tmpl.html | 16 | ||||
| -rw-r--r-- | src/ui/templates/messages.tmpl.html | 9 |
3 files changed, 39 insertions, 0 deletions
diff --git a/src/ui/templates/base.tmpl.html b/src/ui/templates/base.tmpl.html new file mode 100644 index 0000000..a080925 --- /dev/null +++ b/src/ui/templates/base.tmpl.html @@ -0,0 +1,14 @@ +{{define "base"}} +<!DOCTYPE html> +<html lang="en"> +<head> + <title>{{template "title" .}} | newsstand.nyc</title> + <link rel="stylesheet" href="https://unpkg.com/@blaze/css@x.x.x/dist/blaze/blaze.css"> + <script src="https://unpkg.com/htmx.org@1.9.9" integrity="sha384-QFjmbokDn2DjBjq+fM+8LUIVrAgqcNW2s0PjAxHETgRn9l4fvX31ZxDxvwQnyMOX" crossorigin="anonymous"></script> +</head> +<body> + {{template "messages" .}} + {{template "main" .}} +</body> +</html> +{{end}} diff --git a/src/ui/templates/comments.tmpl.html b/src/ui/templates/comments.tmpl.html new file mode 100644 index 0000000..b069bbd --- /dev/null +++ b/src/ui/templates/comments.tmpl.html @@ -0,0 +1,16 @@ +{{define "comments"}} +<div id="post-comments"> + {{range $comment := .comments }} + <span class="comment-author">by <a href="/u/{{$comment.username}}">{{$comment.username}}</a></span> + <span class="comment-created-at">{{$comment.created_at}}</span> + <span class="actions"> + <span class="action-flag">Flag</span> + <span class="action-hide">Hide</span> + <span class="action-reply">Reply</span> + </span> + <div class="c-alert c-alert--info" role="alert"> + {{ $comment.body }} + </div> + {{ end }} +</div> +{{end}} diff --git a/src/ui/templates/messages.tmpl.html b/src/ui/templates/messages.tmpl.html new file mode 100644 index 0000000..dd5bfb1 --- /dev/null +++ b/src/ui/templates/messages.tmpl.html @@ -0,0 +1,9 @@ +{{define "messages"}} +<div id="messages"> + {{ if .message }} + <div class="c-alert c-alert--info" role="alert"> + {{ .message }} + </div> + {{ end }} +</div> +{{end}} |
