summaryrefslogtreecommitdiff
path: root/app/views/clock/_clock.html.erb
blob: a47ebb176eedae67b74286cb546d26d94b35f10e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<% time_of_day_classes = case World.time_of_day
                         when :firstlight
                           "text-transparent bg-clip-text bg-gradient-to-b from-blue-500 to-yellow-500"
                         when :day
                           "text-yellow-500"
                         when :twilight
                           "text-transparent bg-clip-text bg-gradient-to-b from-purple-500 to-yellow-500"
                         when :night
                           "text-purple-500"
                         else # Should never happen
                           "text-gray-500"
                         end

%>

<%= Time.current.strftime("%H:%M") %>
<span class="font-bold <%= time_of_day_classes %>"><%= World.time_of_day.to_s.capitalize %></span>