mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 06:44:22 +01:00
fix emoji
This commit is contained in:
committed by
fiatjaf_
parent
d7dc4b2976
commit
efc47e8cc9
@@ -25,7 +25,7 @@ templ headCommonTemplate(params HeadParams) {
|
||||
}
|
||||
<style>
|
||||
.note { line-height: 0px; }
|
||||
.note img { width: 1em; height: 1em; display: inline; margin: 0px; }
|
||||
.note img.emoji { width: 1em; height: 1em; display: inline; margin: 0px; }
|
||||
@media print { @page { margin: 2cm 3cm; } }
|
||||
</style>
|
||||
<meta name="theme-color" content="#e42a6d"/>
|
||||
|
||||
@@ -350,7 +350,7 @@ func renderEvent(w http.ResponseWriter, r *http.Request) {
|
||||
content := data.content
|
||||
for _, tag := range data.event.Tags.GetAll([]string{"emoji"}) {
|
||||
if len(tag) >= 3 {
|
||||
content = strings.ReplaceAll(content, ":"+tag[1]+":", `<img src="`+tag[2]+`"/>`)
|
||||
content = strings.ReplaceAll(content, ":"+tag[1]+":", `<img class="emoji" src="`+tag[2]+`"/>`)
|
||||
}
|
||||
}
|
||||
component = noteTemplate(NotePageParams{
|
||||
|
||||
Reference in New Issue
Block a user