lots of changes

This commit is contained in:
nfel committed 2026-07-28 14:43:54 +03:30
1 parent b129d871c3
commit d94ba86953
13 files changed
+406 -36

No files matched your search

+66 -10
View File
@@ -1,18 +1,73 @@
{{define "day.html"}}
{{template "shell-start" .}}
<header class="page-head day-page-head">
<div><p class="eyebrow">TEAM DAY</p><h1>Who’s working?</h1><p>See the team’s presence, remote work, and absences for one day.</p></div>
<form method="get" action="/day" class="day-date-form">
<label>Persian date
<span class="jalali-field">
<input name="date" value="{{.Day.Jalali}}" data-jalali-picker required autocomplete="off" inputmode="numeric" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
<button type="button" class="jalali-trigger" aria-label="Choose team date" title="Open Persian calendar">▦</button>
</span>
</label>
<button class="button primary" type="submit">View day</button>
</form>
<div>
<p class="eyebrow">{{if .Week.Enabled}}TEAM WEEK{{else}}TEAM DAY{{end}}</p>
<h1>{{if .Week.Enabled}}Team schedule{{else}}Who’s working?{{end}}</h1>
<p>{{if .Week.Enabled}}See everyone’s weekly office, remote, and absence plan.{{else}}See the team’s presence, remote work, and absences for one day.{{end}}</p>
</div>
<div class="day-view-controls">
<nav class="view-switch" aria-label="Schedule view">
<a href="/day?date={{.Day.Jalali}}" class="{{if not .Week.Enabled}}active{{end}}">Day</a>
<a href="/day?date={{.Day.Jalali}}&view=week" class="{{if .Week.Enabled}}active{{end}}">Week</a>
</nav>
<form method="get" action="/day" class="day-date-form">
{{if .Week.Enabled}}<input type="hidden" name="view" value="week">{{end}}
<label>Persian date
<span class="jalali-field">
<input name="date" value="{{.Day.Jalali}}" data-jalali-picker required autocomplete="off" inputmode="numeric" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
<button type="button" class="jalali-trigger" aria-label="Choose team date" title="Open Persian calendar">▦</button>
</span>
</label>
<button class="button primary" type="submit">View</button>
</form>
</div>
</header>
{{template "notice" .}}
{{if .Week.Enabled}}
<div class="week-layout">
<section class="card week-calendar">
<header class="week-toolbar">
<div class="week-navigation">
<a href="/day?date={{.Week.Prev}}&view=week" aria-label="Previous week">‹</a>
<div><p class="eyebrow">SATURDAY — FRIDAY</p><h2>{{.Week.StartJalali}} — {{.Week.EndJalali}}</h2></div>
<a href="/day?date={{.Week.Next}}&view=week" aria-label="Next week">›</a>
</div>
<div class="week-totals">
<span><i class="presence-mark present"></i><strong>{{.Week.Present}}</strong> Present</span>
<span><i class="presence-mark remote"></i><strong>{{.Week.Remote}}</strong> Remote</span>
<span><i class="presence-mark absent"></i><strong>{{.Week.Absent}}</strong> Absent</span>
</div>
</header>
<div class="week-grid">
{{range .Week.Days}}
<section class="week-day-column {{if .IsToday}}today{{end}} {{if eq .Weekday "Friday"}}friday{{end}}">
<a class="week-day-head" href="/day?date={{.Jalali}}">
<span>{{.Weekday}}</span>
<strong>{{.Jalali}}</strong>
<small>{{.Gregorian}}{{if .DayNote}} · {{.DayNote}}{{end}}</small>
</a>
<div class="week-day-counts">
<span class="present">{{.Present}}</span><span class="remote">{{.Remote}}</span><span class="absent">{{.Absent}}</span>
</div>
<div class="week-records">
{{range .Members}}
<article class="week-record {{.Status}}">
<div class="week-record-person">
{{if .User.AvatarURL}}<img class="avatar" src="{{.User.AvatarURL}}" alt="">{{else}}<span class="avatar">{{initial .User.DisplayName}}</span>{{end}}
<span><strong>{{.User.DisplayName}}</strong><small>{{.Detail}}</small></span>
</div>
<span class="week-record-status"><i class="presence-mark {{.Status}}"></i>{{.Label}}</span>
</article>
{{end}}
</div>
</section>
{{end}}
</div>
</section>
</div>
{{else}}
<div class="day-layout">
<section class="card day-summary-card">
<div class="day-date-nav">
@@ -52,5 +107,6 @@
{{end}}
</section>
</div>
{{end}}
{{template "shell-end" .}}
{{end}}