aboutsummaryrefslogtreecommitdiff
path: root/views/includes/notification.html
blob: d8323b7a6f2431b56ab674a876e0074d278f6784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{{ define "notification" }}
<style scoped>
#notification {
	transition: opacity .5s;
	opacity: 1.0;
	padding: 8px;
}

#notification div {
	padding: 8px;
	border-radius: 4px;
}
</style>
<div class="row" id="notification">
	<div class="col s12 center-align white-text {{ if eq .Type "error" }}red darken-2 {{ else }}green lighten-2{{ end }}">
		{{ .Message }}
	</div>
</div>
<script>'use strict';
	const el = document.getElementById('notification');
	setTimeout(() => el.style.opacity = 0.0, 3000);
</script>
{{ end }}