fix greeting to finally respect the time
This commit is contained in:
		@@ -1,6 +1,19 @@
 | 
			
		||||
<%~ E.includeFile("partials/head.eta.html", {"title": "Dashboard"}) %> <%~ E.includeFile("partials/controls.eta.html", {"active": "Dashboard"}) %>
 | 
			
		||||
 | 
			
		||||
<h1 onclick="doTheConfetti()" class="user-select-none">Good evening, ${user}</h1>
 | 
			
		||||
<h1 onclick="doTheConfetti()" class="user-select-none" id="greeting">Good evening, ${user}</h1>
 | 
			
		||||
<script>
 | 
			
		||||
	// Handle greeting
 | 
			
		||||
	var today = new Date();
 | 
			
		||||
	var curHr = today.getHours();
 | 
			
		||||
 | 
			
		||||
	if (curHr < 12) {
 | 
			
		||||
		document.getElementById("greeting").innerHTML = "Good morning";
 | 
			
		||||
	} else if (curHr < 18) {
 | 
			
		||||
		document.getElementById("greeting").innerHTML = "Good afternoon";
 | 
			
		||||
	} else {
 | 
			
		||||
		document.getElementById("greeting").innerHTML = "Good evening";
 | 
			
		||||
	}
 | 
			
		||||
</script>
 | 
			
		||||
<div class="container text-center">
 | 
			
		||||
	<div class="row">
 | 
			
		||||
		<div class="card col m-2">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user