summaryrefslogtreecommitdiff
path: root/web/template/status.tmpl
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-11-17 11:35:28 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-17 11:35:28 +0100
commitfc02d3c6f7db5a7794448f31fd9d6d81d3d224eb (patch)
treef792f799abadf784e493933af597d8f2292ab776 /web/template/status.tmpl
parent[bugfix] process account delete side effects in serial, not in parallel (#2360) (diff)
downloadgotosocial-fc02d3c6f7db5a7794448f31fd9d6d81d3d224eb.tar.xz
[feature] Set/show instance language(s); show post language on frontend (#2362)
* update go text, include text/display * [feature] Set instance langs, show post lang on frontend * go fmt * WebGet * set language for whole article, don't use FA icon * mention instance languages + other optional config vars * little tweak * put languages in config properly * warn log language parse * change some naming around * tidy up validate a bit * lint * rename LanguageTmpl in template
Diffstat (limited to 'web/template/status.tmpl')
-rw-r--r--web/template/status.tmpl37
1 files changed, 18 insertions, 19 deletions
diff --git a/web/template/status.tmpl b/web/template/status.tmpl
index 5e264a339..bf24f6e7c 100644
--- a/web/template/status.tmpl
+++ b/web/template/status.tmpl
@@ -36,15 +36,15 @@
{{if .SpoilerText}}
<details class="text-spoiler">
<summary>
- <span class="spoiler-text">{{emojify .Emojis (escape .SpoilerText)}}</span>
+ <span class="spoiler-text" lang="{{ .LanguageTag.TagStr }}">{{emojify .Emojis (escape .SpoilerText)}}</span>
<span class="button" role="button" tabindex="0">Toggle visibility</span>
</summary>
- <div class="content">
+ <div class="content" lang="{{ .LanguageTag.TagStr }}">
{{emojify .Emojis (noescape .Content)}}
</div>
</details>
{{else}}
- <div class="content">
+ <div class="content" lang="{{ .LanguageTag.TagStr }}">
{{emojify .Emojis (noescape .Content)}}
</div>
{{end}}
@@ -113,30 +113,29 @@
<aside class="info">
<time datetime="{{.CreatedAt}}">{{.CreatedAt | timestampPrecise}}</time>
<div class="stats" role="group">
- <div>
- <span aria-hidden="true">
- <i class="fa fa-reply-all"></i> {{.RepliesCount}}
- </span>
+ <div class="stats-item">
+ <span aria-hidden="true"><i class="fa fa-reply-all"></i> {{.RepliesCount}}</span>
<span class="sr-only">{{.RepliesCount}} {{if .RepliesCount | eq 1}}reply{{else}}replies{{end}}</span>
</div>
- <div>
- <span aria-hidden="true">
- <i class="fa fa-star"></i> {{.FavouritesCount}}
- </span>
+ <div class="stats-item">
+ <span aria-hidden="true"><i class="fa fa-star"></i> {{.FavouritesCount}}</span>
<span class="sr-only">{{.FavouritesCount}} favourite{{if .FavouritesCount | eq 1 | not}}s{{end}}</span>
</div>
- <div>
- <span aria-hidden="true">
- <i class="fa fa-retweet"></i> {{.ReblogsCount}}
- </span>
+ <div class="stats-item">
+ <span aria-hidden="true"><i class="fa fa-retweet"></i> {{.ReblogsCount}}</span>
<span class="sr-only">{{.ReblogsCount}} boost{{if .ReblogsCount | eq 1 | not}}s{{end}}</span>
</div>
{{if .Pinned}}
- <div>
- <i class="fa fa-thumb-tack" aria-hidden="true"></i>
- <span class="sr-only">pinned</span>
- </div>
+ <div class="stats-item">
+ <i class="fa fa-thumb-tack" aria-hidden="true"></i>
+ <span class="sr-only">pinned</span>
+ </div>
{{end}}
+ {{ if .LanguageTag.DisplayStr }}
+ <div class="stats-item language" title="Language: {{ .LanguageTag.DisplayStr }}">
+ {{ .LanguageTag.TagStr }}
+ </div>
+ {{ end }}
</div>
</aside>
<a data-nosnippet href="{{.URL}}" class="toot-link">Open