app.kluk.fr/app/views/moods/_calendrier.html.erb
Christophe Robillard 7a7fa4c095
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
redesign app on top of the kluk.fr charte
- drop Bulma and Font Awesome, plain CSS built on charte.css
- dashboard: GitHub-like calendar grouped by year, selected day panel
  (sticky side column on desktop, bottom bar on mobile), keyboard navigation
- public page: today's mood and last months fit in one screen, journal hidden
- day log page: mode picker as pills, illustration follows the chosen mode
- login, password and invitation screens in French, global flash messages
- add User#current_mode_since

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 07:35:53 +02:00

30 lines
1.5 KiB
Text

<%# Calendrier des humeurs « à la GitHub » : une colonne par semaine, une ligne par jour,
regroupé par mois. Par défaut, un bloc par année, la plus récente d'abord ;
avec par_annee: false, tous les mois à la suite (l'année est ajoutée aux mois d'une autre année). %>
<%# locals: (history:, user:, interactive: false, selected_date: nil, par_annee: true) -%>
<% blocs = par_annee ? history_by_year(history) : [ [ nil, history ] ] %>
<div class="calendrier-humeurs">
<% blocs.each do |year, months| %>
<%= tag.section class: "annee", "aria-labelledby": ("annee-#{year}" if year) do %>
<% if year %>
<h2 class="annee-titre" id="annee-<%= year %>"><%= year %></h2>
<% end %>
<div class="annee-mois">
<div class="semaine-jours" aria-hidden="true">
<span>lun.</span><span></span><span>mer.</span><span></span><span>ven.</span><span></span><span></span>
</div>
<% months.each do |month| %>
<div class="mois">
<h3 class="mois-nom"><%= l(month[:month], format: year || month[:month].year == Date.current.year ? "%B" : "%B %Y") %></h3>
<div class="mois-jours">
<% month[:weeks].flatten.each do |mood| %>
<%= case_jour(mood, user, interactive: interactive,
selected: mood[:recorded_at].to_date == selected_date) %>
<% end %>
</div>
</div>
<% end %>
</div>
<% end %>
<% end %>
</div>