Visible category in title on shortcode emoji

This commit is contained in:
localhost_frssoft 2022-10-30 18:08:59 +03:00
parent 9472518169
commit b28171ed7b
2 changed files with 5 additions and 3 deletions

View file

@ -322,6 +322,7 @@ type Emoji struct {
ShortCode string `json:"shortcode"`
StaticURL string `json:"static_url"`
URL string `json:"url"`
Category *string `json:"category"`
VisibleInPicker bool `json:"visible_in_picker"`
}

View file

@ -9,7 +9,8 @@
<div class="emoji-item-container">
<div class="emoji-item">
<img class="emoji" src="{{.URL}}" alt="{{.ShortCode}}" height="32" loading="lazy" />
<span title=":{{.ShortCode}}:" class="emoji-shortcode">:{{.ShortCode}}:</span>
<span title=":{{.ShortCode}}:{{if .Category}} Category:{{.Category}}{{end}}" class="emoji-shortcode">:{{.ShortCode}}:</span>
</div>
</div>
{{end}}