Files
soundcloak/templates/misc.templ
2025-02-05 22:23:49 +01:00

27 lines
562 B
Plaintext

package templates
import (
"git.maid.zone/stuff/soundcloak/lib/cfg"
"git.maid.zone/stuff/soundcloak/lib/textparsing"
)
templ Description(prefs cfg.Preferences, text string, injected templ.Component) {
if text != "" || injected != nil {
<details>
<summary class="btn">Toggle description</summary>
<p style="white-space: pre-wrap;">
if text != "" {
if *prefs.ParseDescriptions {
@templ.Raw(textparsing.Format(text))
} else {
{ text }
}
}
if injected != nil {
@injected
}
</p>
</details>
}
}