From 39c57a6b653a269668f459414d295e812f3628a8 Mon Sep 17 00:00:00 2001 From: r Date: Sat, 21 Dec 2019 08:36:44 +0000 Subject: Use a single form for new posts and replies --- templates/postform.tmpl | 16 ++++++++++++++++ templates/thread.tmpl | 18 ++++-------------- templates/timeline.tmpl | 12 ++---------- 3 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 templates/postform.tmpl (limited to 'templates') diff --git a/templates/postform.tmpl b/templates/postform.tmpl new file mode 100644 index 0000000..3f6eeaa --- /dev/null +++ b/templates/postform.tmpl @@ -0,0 +1,16 @@ +
+ {{if .}} + + + {{else}} + + {{end}} +
+ +
+
+ Attachments +
+ +
+ diff --git a/templates/thread.tmpl b/templates/thread.tmpl index d4c88de..9d8f650 100644 --- a/templates/thread.tmpl +++ b/templates/thread.tmpl @@ -3,21 +3,11 @@
Thread
{{range .Statuses}} -{{template "status.tmpl" .}} -{{if eq .ID $.ReplyToID}} -
- - -
- -
-
- Attachments -
- -
-{{end}} +{{template "status.tmpl" .}} +{{if $.ReplyContext}}{{if eq .ID $.ReplyContext.InReplyToID}} +{{template "postform.tmpl" $.ReplyContext}} +{{end}}{{end}} {{end}} diff --git a/templates/timeline.tmpl b/templates/timeline.tmpl index fe426de..09717c1 100644 --- a/templates/timeline.tmpl +++ b/templates/timeline.tmpl @@ -2,16 +2,8 @@ {{template "navigation.tmpl" .NavbarData}}
Timeline
-
- -
- -
-
- Attachments -
- -
+ +{{template "postform.tmpl" }} {{range .Statuses}} {{template "status.tmpl" .}} -- cgit v1.2.3