- 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>
30 lines
1.2 KiB
Text
30 lines
1.2 KiB
Text
<% content_for :title, "Comment ça Kluk chez #{@user.username} ?" %>
|
||
<% mode = @user.moods.last&.mode %>
|
||
<% since = @user.current_mode_since %>
|
||
|
||
<article class="public">
|
||
<figure class="carte-humeur carte-humeur-grande" style="<%= "--humeur: #{mode.color}" if mode %>">
|
||
<%= image_tag (mode || Mode.new).image_url, alt: "" %>
|
||
</figure>
|
||
|
||
<div class="public-texte">
|
||
<p class="public-qui">Aujourd’hui chez <%= @user.username %></p>
|
||
<h1 class="public-mode"><%= mode&.label || "Pas encore de tasse posée" %></h1>
|
||
<% if since %>
|
||
<p class="public-depuis">
|
||
<% if since == Date.current %>
|
||
Depuis ce matin.
|
||
<% else %>
|
||
Depuis le <%= l(since, format: since.year == Date.current.year ? "%A %-d %B" : "%-d %B %Y") %>.
|
||
<% end %>
|
||
</p>
|
||
<% end %>
|
||
|
||
<section class="public-historique" aria-labelledby="public-historique-titre">
|
||
<h2 id="public-historique-titre">Les derniers mois</h2>
|
||
<%= render "moods/legende", user: @user %>
|
||
<%= render "moods/calendrier", user: @user, par_annee: false,
|
||
history: MoodCalendarService.generate_calendar(@user, start_date: 5.months.ago.beginning_of_month, end_date: Date.current) %>
|
||
</section>
|
||
</div>
|
||
</article>
|