add month to tracker

This commit is contained in:
Christophe Robillard 2026-01-08 17:46:51 +01:00
parent a5c57322c3
commit ad1b1e1c6b
2 changed files with 9 additions and 2 deletions

View file

@ -70,8 +70,8 @@ main {
.day { .day {
border: 1px; border: 1px;
margin: 4px; margin: 4px;
min-width: 15px; width: 15px;
min-height: 15px; height: 15px;
} }
.creatif { .creatif {

View file

@ -41,7 +41,14 @@
<div class="is-flex is-flex-wrap-wrap"> <div class="is-flex is-flex-wrap-wrap">
<% @mood_log.each do |week| %> <% @mood_log.each do |week| %>
<div class="is-flex is-flex-direction-column is-flex-wrap-wrap mb-3"> <div class="is-flex is-flex-direction-column is-flex-wrap-wrap mb-3">
<div class="is-size-7 day">
<% day = Date.parse(week.first[0]) %>
<% if day.day < 8 && day.monday? %>
<%= l(day, format: "%b") %>
<% end %>
</div>
<% week.each do |d| %> <% week.each do |d| %>
<% day = Date.parse(d[0]) %>
<% if d[1] %> <% if d[1] %>
<div data-image="<%= asset_path(d[1] + ".jpg") %>" data-mode="<%= d[1] %>" data-day="<%= d[0] %>" data-action="click->mood#updateDayInfo mouseover->mood#updateDayInfo mouseleave->mood#updateDayInfo" title="<%= d[0] %> : <%= d[1] %>" class="day <%= d[1] %>"></div> <div data-image="<%= asset_path(d[1] + ".jpg") %>" data-mode="<%= d[1] %>" data-day="<%= d[0] %>" data-action="click->mood#updateDayInfo mouseover->mood#updateDayInfo mouseleave->mood#updateDayInfo" title="<%= d[0] %> : <%= d[1] %>" class="day <%= d[1] %>"></div>
<% else %> <% else %>