eirtube/pug/includes/toasts.pug
2024-12-19 18:49:09 -06:00

12 lines
414 B
Plaintext
Executable File

mixin toast_js()
script(type="text/javascript" src=getStaticURL("html", "/static/js/toasts.js"))
mixin toast(color, icon, message, noFade)
.toast-container
input(type = "checkbox" id = (() => { if (totalToasts == undefined) { totalToasts = 0; } return totalToasts++ })())
.toast(class={[color]: true, nofade: noFade })
if icon
.icon(class=icon)
=message
label(for=totalToasts - 1).close-overlay