From bab955aaffa3655e2ef273dc2ec2af7b025c7608 Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Tue, 2 Jul 2024 13:20:05 +0300 Subject: [PATCH] Blog posts are useable --- src/templates/src/blog_post.html | 241 +++++++++--------- .../src/include/newsletter_signup.html | 6 +- 2 files changed, 125 insertions(+), 122 deletions(-) diff --git a/src/templates/src/blog_post.html b/src/templates/src/blog_post.html index f70514e0..f1c19688 100644 --- a/src/templates/src/blog_post.html +++ b/src/templates/src/blog_post.html @@ -1,128 +1,131 @@ -{{ template "base.html" . }} +{{ template "base-2024.html" . }} {{ define "content" }} -
-

{{ .Thread.Title }}

- {{ with .MainPost }} -
-
-
-
-
- {{ .Author.Name }} -
- {{ if .Author.IsStaff }} -
- {{ end }} -
-
-
{{ timehtml (absoluteshortdate .PostDate) .PostDate }}
-
-
-
- {{ if and $.User $.Project.HasBlog }} -
- {{ if or (eq .Author.ID $.User.ID) $.User.IsStaff }} -   -   - {{ end }} - {{ if or (not $.Thread.Locked) $.User.IsStaff }} - {{ if $.Thread.Locked }} - WARNING: locked thread - use power responsibly! - {{ end }} -   - {{ end }} -
- {{ end }} -
-
- {{ end }} +
+
+
+

{{ .Thread.Title }}

+ {{ with .MainPost }} +
+
+
+
+ +
{{ timehtml (absoluteshortdate .PostDate) .PostDate }}
+
+
+
+ {{ if .Author.IsStaff }} +
+ {{ end }} +
+
+
+ {{ if and $.User $.Project.HasBlog }} +
+ {{ if or (eq .Author.ID $.User.ID) $.User.IsStaff }} +   +   + {{ end }} + {{ if or (not $.Thread.Locked) $.User.IsStaff }} + {{ if $.Thread.Locked }} + WARNING: locked thread - use power responsibly! + {{ end }} +   + {{ end }} +
+ {{ end }} +
+
+ {{ end }} - -
-
- {{ .MainPost.Content }} -
-
+ +
+
+ {{ .MainPost.Content }} +
+
+
- {{ if not .IsProjectPage }} - {{ template "newsletter_signup.html" . }} - {{ end }} + {{ if not .IsProjectPage }} + {{ template "newsletter_signup.html" . }} + {{ end }} -
+
- {{ range .Comments }} -
-
-
-
-
-
-
-
- {{ .Author.Username }} -
- {{ if .Author.IsStaff }} -
- {{ end }} -
-
-
- {{ if and .Author.Name (ne .Author.Name .Author.Username) }} - {{ .Author.Name }}, - {{ end }} - {{ timehtml (relativedate .PostDate) .PostDate }} - {{ if .Editor }} - - Edited by - {{ coalesce .Editor.Name .Editor.Username }} - on {{ timehtml (absolutedate .EditDate) .EditDate }} - {{ with .EditReason }} - Reason: {{ . }} - {{ end }} - - {{ end }} -
-
-
- {{ if and $.User $.Project.HasBlog }} -
- {{ if or (eq .Author.ID $.User.ID) $.User.IsStaff }} -   -   - {{ end }} - {{ if or (not $.Thread.Locked) $.User.IsStaff }} - {{ if $.Thread.Locked }} - WARNING: locked thread - use power responsibly! - {{ end }} -   - {{ end }} - - #{{ .ID }} - -
- {{ end }} -
-
-
-
- {{ .Content }} -
-
-
-
- {{ end }} + {{ range .Comments }} +
+
+
+
+
+
+
+ +
+ {{ timehtml (relativedate .PostDate) .PostDate }} + {{ if .Editor }} + + Edited by + {{ coalesce .Editor.Name .Editor.Username }} + on {{ timehtml (absolutedate .EditDate) .EditDate }} + {{ with .EditReason }} + Reason: {{ . }} + {{ end }} + + {{ end }} +
+
+
+ {{ if .Author.IsStaff }} +
+ {{ end }} +
+
+
+ {{ if and $.User $.Project.HasBlog }} +
+ {{ if or (eq .Author.ID $.User.ID) $.User.IsStaff }} +   +   + {{ end }} + {{ if or (not $.Thread.Locked) $.User.IsStaff }} + {{ if $.Thread.Locked }} + WARNING: locked thread - use power responsibly! + {{ end }} +   + {{ end }} + + #{{ .ID }} + +
+ {{ end }} +
+
+
+
+ {{ .Content }} +
+
+
+
+ {{ end }} -
-
- {{ if .Project.HasBlog }} - {{ if $.User }} - + Add Comment - {{ else }} - Log in to comment - {{ end }} - {{ end }} -
-
+
+ +
+ {{ if .Project.HasBlog }} + {{ if $.User }} + + Add Comment + {{ else }} + Log in to comment + {{ end }} + {{ end }} +
+
{{ end }} diff --git a/src/templates/src/include/newsletter_signup.html b/src/templates/src/include/newsletter_signup.html index 92eaeb49..7346025d 100644 --- a/src/templates/src/include/newsletter_signup.html +++ b/src/templates/src/include/newsletter_signup.html @@ -1,9 +1,9 @@ -
+
Sign up for our email newsletter:
- +
  @@ -43,4 +43,4 @@ button.disabled = false; }); } - \ No newline at end of file +