- List of the user's own calendars (web/calendar) - Month view per calendar with a Monday-first 6-week grid, showing all-day and timed events, colored dot matching the calendar's color - Navigation between months (prev/next/today) via query params - Create/edit/delete events: title, description, location, all-day toggle, start/end date+time - Clicking a day cell prefills a new all-day event on that date; the "New event" button defaults to a one-hour slot starting next full hour - Deleting an event or invalid time ranges (end before/equal start) are validated with inline error messages - Verified round-trip with the real CalDAV protocol handler (events created via the web UI are correctly visible to a REPORT query) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
38 lines
1.3 KiB
Templ
38 lines
1.3 KiB
Templ
package templates
|
|
|
|
templ Layout(title string, username string) {
|
|
<!DOCTYPE html>
|
|
<html lang="en" class="h-full bg-gray-50">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<title>{ title } · nidus</title>
|
|
<link rel="stylesheet" href="/web/static/app.css"/>
|
|
<script src="/web/static/htmx.min.js" defer></script>
|
|
</head>
|
|
<body class="h-full text-gray-900">
|
|
<nav class="bg-white border-b border-gray-200">
|
|
<div class="max-w-4xl mx-auto px-4 py-3 flex items-center justify-between">
|
|
<div class="flex items-center gap-6">
|
|
<a href="/web/" class="font-semibold text-lg tracking-tight">nidus</a>
|
|
if username != "" {
|
|
<a href="/web/files/" class="text-sm text-gray-600 hover:text-indigo-600">Files</a>
|
|
<a href="/web/contacts" class="text-sm text-gray-600 hover:text-indigo-600">Contacts</a>
|
|
<a href="/web/calendar" class="text-sm text-gray-600 hover:text-indigo-600">Calendar</a>
|
|
}
|
|
</div>
|
|
if username != "" {
|
|
<div class="flex items-center gap-4 text-sm text-gray-600">
|
|
<span>{ username }</span>
|
|
<a href="/web/logout" class="text-red-600 hover:underline">Logout</a>
|
|
</div>
|
|
}
|
|
</div>
|
|
</nav>
|
|
<main class="max-w-4xl mx-auto px-4 py-8">
|
|
{ children... }
|
|
</main>
|
|
</body>
|
|
</html>
|
|
}
|