Files
personotes/templates/daily-calendar.html

73 lines
3.1 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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.

<div class="daily-calendar" id="daily-calendar">
<div class="daily-calendar-header">
<button class="calendar-nav-btn"
hx-get="/api/daily/calendar/{{.PrevMonth}}"
hx-target="#daily-calendar"
hx-swap="outerHTML"
data-i18n-title="calendar.prevMonth"
title="Mois précédent">
</button>
<span class="calendar-month-year">{{.MonthName}} {{.Year}}</span>
<button class="calendar-nav-btn"
hx-get="/api/daily/calendar/{{.NextMonth}}"
hx-target="#daily-calendar"
hx-swap="outerHTML"
data-i18n-title="calendar.nextMonth"
title="Mois suivant">
</button>
</div>
<div class="calendar-grid">
<!-- En-tête des jours -->
<div class="calendar-weekday-header">L</div>
<div class="calendar-weekday-header">M</div>
<div class="calendar-weekday-header">M</div>
<div class="calendar-weekday-header">J</div>
<div class="calendar-weekday-header">V</div>
<div class="calendar-weekday-header">S</div>
<div class="calendar-weekday-header">D</div>
<!-- Jours du calendrier -->
{{range .Weeks}}
{{range .}}
<div class="calendar-day {{if not .InMonth}}calendar-day-other-month{{end}} {{if .IsToday}}calendar-day-today{{end}} {{if .HasNote}}calendar-day-has-note calendar-day-clickable{{else}}{{if .InMonth}}calendar-day-no-note{{end}}{{end}}"
{{if and .InMonth .HasNote}}
data-date="{{.Date.Format "2006-01-02"}}"
hx-get="/api/daily/{{.Date.Format "2006-01-02"}}"
hx-target="#editor-container"
hx-swap="innerHTML"
hx-push-url="true"
{{end}}
title="{{if .HasNote}}Note du {{.Date.Format "02/01/2006"}}{{else}}{{.Date.Format "02/01/2006"}} - Pas de note{{end}}">
<span class="calendar-day-number">{{.Day}}</span>
{{if .HasNote}}<span class="calendar-day-indicator"></span>{{end}}
</div>
{{end}}
{{end}}
</div>
<div style="display: flex; gap: 0.5rem; margin-top: 0.75rem;">
<button class="daily-today-btn"
hx-get="/api/daily/today"
hx-target="#editor-container"
hx-swap="innerHTML"
hx-push-url="true"
data-i18n="calendar.today"
title="Ouvrir la note du jour (Ctrl/Cmd+D)"
style="flex: 1; padding: 0.5rem; font-size: 0.85rem;">
📅 Aujourd'hui
</button>
<button class="daily-today-btn"
hx-get="/api/daily/calendar/{{.CurrentMonth}}"
hx-target="#daily-calendar"
hx-swap="outerHTML"
data-i18n="calendar.thisMonth"
title="Revenir au mois actuel"
style="flex: 1; padding: 0.5rem; font-size: 0.85rem;">
🗓️ Ce mois
</button>
</div>
</div>