oficina / calendar Public

Clone
git clone https://amadan.net/oficina/calendar

Plain git — no account needed to clone.

Download

Download this file

1{{define "layout"}}<!doctype html>
2<html lang="{{block "lang" .}}en-GB{{end}}" dir="{{block "dir" .}}ltr{{end}}"{{if .ThemeAttr}} data-theme="{{.ThemeAttr}}"{{end}}>
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<title>{{with .WholeTitle}}{{.}}{{else}}{{if ne .Title "Calendar"}}{{.Title}} · {{end}}Calendar{{end}}</title>
7<link rel="icon" type="image/png" sizes="32x32" href="{{asset "static/brand/icon-32.png"}}">
8<link rel="icon" type="image/svg+xml" href="{{asset "static/brand/icon.svg"}}">
9<link rel="apple-touch-icon" sizes="180x180" href="{{asset "static/brand/apple-touch-icon.png"}}">
10{{/* The spec's order: tokens, theme, brand, estilo base, menu, chrome,
11 and the app's own CSS last. busy.css is the 650ms busy rule; sky.css
12 is the sign-in door's sky. No webfont: the chrome is the system UI
13 face, so it never flashes (estilo AGENTS.md row 9). */}}
14<link rel="stylesheet" href="{{asset "static/tokens.css"}}">
15<link rel="stylesheet" href="{{asset "static/busy.css"}}">
16<link rel="stylesheet" href="{{asset "static/theme.css"}}">
17<link rel="stylesheet" href="{{asset "static/brand/brand.css"}}">
18<link rel="stylesheet" href="{{asset "static/base.css"}}">
19<link rel="stylesheet" href="{{asset "static/menu.css"}}">
20<link rel="stylesheet" href="{{asset "static/chrome.css"}}">
21<link rel="stylesheet" href="{{asset "static/sky.css"}}">
22<link rel="stylesheet" href="{{asset "static/calendar.css"}}">
23<script defer src="{{asset "static/rastrillo.js"}}"></script>
24<script defer src="{{asset "static/busy.js"}}"></script>
25<script defer src="{{asset "static/chrome.js"}}"></script>
26{{iconAssets}}
27<script defer src="{{asset "static/select.js"}}"></script>
28<script defer src="{{asset "static/datetime.js"}}"></script>
29<script defer src="{{asset "static/quickadd.js"}}"></script>
30<script defer src="{{asset "static/booking.js"}}"></script>
31<script defer src="{{asset "static/calendar.js"}}"></script>
32{{block "head" .}}{{end}}
33</head>
34<body>
35<div estilo-shell>
36 <a rst-skip href="#main">{{.Chrome.Labels.Skip}}</a>
37 {{template "estilo-bar" .Chrome}}
38 {{/* Every page but the four calendar views (which supply their own
39 <main>) is Fiesta's stack: rst-stack spaces the page's blocks,
40 its header, headings, prose, forms and buttons, by one table. */}}
41 {{block "main" .}}<main rst-page rst-stack id="main">{{template "content" .}}</main>{{end}}
42 <footer rst-shell-foot>{{block "foot" .}}{{end}}</footer>
43</div>
44</body>
45</html>{{end}}
46
47{{/* calendar-toolbar is the one row under every view's header: step back,
48 Today, step forward, and the view switcher. It is the same partial in
49 Day, Week, Month and Agenda, and its visible labels are the same in all
50 four ("Previous", "Today", "Next"; the period is in the heading and in
51 each link's accessible name), so switching views or stepping through
52 them moves nothing. A view's own lead line (the day's sentence, the
53 agenda's scope) sits BELOW this row, never above it. */}}
54{{/* Team mode's partial notice (Paul, 2026-10-28): the roster could not
55 be read within its lease, so the view below holds only what the
56 person reaches without team standing — nothing, in Calendar. Never
57 drawn outside team mode, and never for somebody off the team. */}}
58{{define "team-partial"}}<div data-partial>{{template "callout" dict "Tone" "warning" "Title" .PartialTitle "Body" .PartialBody "Alert" true}}</div>{{end}}
59{{define "calendar-toolbar"}}<div cal-bar>
60 <div cal-bar-steps>
61 <a rst-btn href="{{.Prev}}">Previous<span class="rst-sr-only"> {{.Noun}}</span></a>
62 <a rst-btn href="{{.Today}}">Today</a>
63 <a rst-btn href="{{.Next}}">Next<span class="rst-sr-only"> {{.Noun}}</span></a>
64 </div>
65 <nav rst-seg-tabs aria-label="Calendar view">
66 <a cal-tab="Day" href="{{.Day}}"{{if eq .View "day"}} aria-current="page"{{end}}>Day</a>
67 <a cal-tab="Week" href="{{.Week}}"{{if eq .View "week"}} aria-current="page"{{end}}>Week</a>
68 <a cal-tab="Month" href="{{.Month}}"{{if eq .View "month"}} aria-current="page"{{end}}>Month</a>
69 <a cal-tab="Agenda" href="{{.Agenda}}"{{if eq .View "agenda"}} aria-current="page"{{end}}>Agenda</a>
70 </nav>
71</div>{{end}}
72