From 515d408140a1db322012c5d9cda647d567b1adaf Mon Sep 17 00:00:00 2001 From: Ben Pate Date: Thu, 29 Aug 2024 15:25:50 -0600 Subject: [PATCH] Improve following on default template --- _embed/templates/base-social/like-button.html | 14 +++++------ .../stream-outbox-message/template.hjson | 2 +- .../templates/stream-outbox-message/view.html | 25 +++++++++++++------ _embed/templates/user-outbox/sidebar.html | 2 +- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/_embed/templates/base-social/like-button.html b/_embed/templates/base-social/like-button.html index 2c412c33..de4140f0 100644 --- a/_embed/templates/base-social/like-button.html +++ b/_embed/templates/base-social/like-button.html @@ -4,18 +4,18 @@ {{- if $responses.Like -}} - + {{- else if $responses.Dislike -}} - + {{- else -}} - - + + {{- end -}} {{- if $responses.Announce -}} - + {{- else -}} - + {{- end -}} - \ No newline at end of file + diff --git a/_embed/templates/stream-outbox-message/template.hjson b/_embed/templates/stream-outbox-message/template.hjson index 91f3d5b1..af887ff5 100644 --- a/_embed/templates/stream-outbox-message/template.hjson +++ b/_embed/templates/stream-outbox-message/template.hjson @@ -2,7 +2,7 @@ templateId:"outbox-message" templateRole:"outbox-message" socialRole:"Note" - extends:["base-social"] + extends:["base-social", "base-intent"] model:"stream" icon:"message" label:"Post" diff --git a/_embed/templates/stream-outbox-message/view.html b/_embed/templates/stream-outbox-message/view.html index 40e2b46b..5618ded0 100644 --- a/_embed/templates/stream-outbox-message/view.html +++ b/_embed/templates/stream-outbox-message/view.html @@ -42,6 +42,20 @@ + +
+
+
+ {{- if .UserCan "like-button" -}} + {{.View "like-button"}} + {{- else -}} + + + + + {{- end -}} +
+
{{- if .UserCan "edit" -}} @@ -52,9 +66,6 @@ -
- {{.ContentHTML}} -
{{- if ne .IconURL "" -}}
@@ -62,11 +73,9 @@
{{- end -}} - {{- if .UserCan "like-button" -}} -
- {{.View "like-button"}} -
- {{- end -}} +
+ {{.ContentHTML}} +
{{- .View "responses-replies" -}} diff --git a/_embed/templates/user-outbox/sidebar.html b/_embed/templates/user-outbox/sidebar.html index 9e49c4a7..9c443331 100644 --- a/_embed/templates/user-outbox/sidebar.html +++ b/_embed/templates/user-outbox/sidebar.html @@ -26,7 +26,7 @@

{{.DisplayName}}

@{{.Username}}@{{.Hostname}}
{{- if not .Myself -}}
- +
{{- end -}}