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
