app.kluk.fr/app/views/moods/public.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.2 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% 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>