2022-08-23 13:00:54 -07:00
|
|
|
<%
|
|
|
|
|
first_days = (1..12).map do |index|
|
|
|
|
|
Date.new(@year, index, 1).beginning_of_month
|
|
|
|
|
end
|
|
|
|
|
%>
|
|
|
|
|
|
2022-08-23 14:51:20 -07:00
|
|
|
<div class="w-1/3 mx-auto flex justify-between pb-4">
|
|
|
|
|
<%= link_to (@year-1), root_path(year: @year-1) %>
|
|
|
|
|
<%= @year %>
|
|
|
|
|
<%= link_to (@year+1), root_path(year: @year+1) %>
|
|
|
|
|
</div>
|
2022-08-23 13:00:54 -07:00
|
|
|
<div class="container mx-auto flex justify-between">
|
|
|
|
|
<% first_days.each do |first_day| %>
|
|
|
|
|
<div class="border-l w-full">
|
|
|
|
|
<%= render 'month', first_day: first_day, events: @events %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
</div>
|