mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 04:52:24 -05:00
[feature] Emojify spoiler and content in web templates (#785)
* Emojify spoiler and content in web templates * Use more performance emojify code (thanks NyaaaWhatsUpDoc!)
This commit is contained in:
parent
39d98881b0
commit
1e1cdee06a
3 changed files with 62 additions and 2 deletions
|
|
@ -323,3 +323,11 @@ footer {
|
|||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.emoji {
|
||||
width: 2.5ex;
|
||||
height: 2.5ex;
|
||||
margin: -0.5ex 0 0;
|
||||
object-fit: contain;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
|
@ -6,12 +6,12 @@
|
|||
{{if .SpoilerText}}
|
||||
<input class="spoiler" id="hideSpoiler-{{.ID}}" type="checkbox" style="display: none" aria-hidden="true" checked="true" />
|
||||
<div class="spoiler">
|
||||
<span class="spoiler-text">{{.SpoilerText}}</span>
|
||||
<span class="spoiler-text">{{emojify .Emojis (escape .SpoilerText)}}</span>
|
||||
<label class="button spoiler-label" for="hideSpoiler-{{.ID}}" tabindex="0">Toggle visibility</label>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="content">
|
||||
{{.Content |noescape}}
|
||||
{{emojify .Emojis (noescape .Content)}}
|
||||
</div>
|
||||
</div>
|
||||
{{with .MediaAttachments}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue