From 09356ecc04771190b385ec1806e841e06987ccd7 Mon Sep 17 00:00:00 2001 From: Alessio Date: Sun, 27 Aug 2023 15:49:26 -0300 Subject: [PATCH] Add template file for previous commit --- .../tweet_page_includes/text_with_entities.tpl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 internal/webserver/tpl/tweet_page_includes/text_with_entities.tpl diff --git a/internal/webserver/tpl/tweet_page_includes/text_with_entities.tpl b/internal/webserver/tpl/tweet_page_includes/text_with_entities.tpl new file mode 100644 index 0000000..ea2d59f --- /dev/null +++ b/internal/webserver/tpl/tweet_page_includes/text_with_entities.tpl @@ -0,0 +1,18 @@ +{{define "text-with-entities"}} + {{range (splitList "\n" .)}} +

+ {{range (get_entities .)}} + {{if (eq .EntityType 1)}} + + @{{.Contents}} + {{else if (eq .EntityType 2)}} + + #{{.Contents}} + {{else}} + + {{.Contents}} + {{end}} + {{end}} +

+ {{end}} +{{end}}