Initial commit with webpage

This commit is contained in:
bkelldog committed 2026-11-06 11:42:34 -05:00
commit 26875de1dd
55 files changed
+5726

No files matched your search

+72
View File
@@ -0,0 +1,72 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>{% block title %}{{ profile.baby_name if logged_in else "Mamadachi" }}{% endblock %} · Mamadachi</title>
<meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#f9f9f7" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#0d0d0d" media="(prefers-color-scheme: dark)">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Mamadachi">
<link rel="icon" href="/static/icon.svg" type="image/svg+xml">
<link rel="manifest" href="/manifest.webmanifest">
<link rel="stylesheet" href="/static/style.css?v={{ app_version }}">
<script src="/static/app.js?v={{ app_version }}" defer></script>
</head>
<body data-tz="{{ profile.timezone }}">
<header class="top">
<div class="wrap top-row">
<a class="brand" href="/">
<svg class="logo" viewBox="0 0 32 32" aria-hidden="true"><path d="M16 2.5c6.8 0 11.5 6.6 11.5 14.2 0 7.3-5 12.8-11.5 12.8S4.5 24 4.5 16.7C4.5 9.1 9.2 2.5 16 2.5Z" fill="currentColor"/><rect x="10" y="10.5" width="12" height="9" rx="2.2" fill="var(--surface)"/><circle cx="11.5" cy="24" r="1.5" fill="var(--surface)"/><circle cx="16" cy="24.8" r="1.5" fill="var(--surface)"/><circle cx="20.5" cy="24" r="1.5" fill="var(--surface)"/></svg>
<span>Mamadachi</span>
</a>
{% if logged_in %}
<div class="baby">
<strong>{{ profile.baby_name }}</strong>{% if age %}<span class="muted"> · {{ age }}</span>{% endif %}
</div>
{% endif %}
</div>
{% if logged_in %}
<nav class="wrap tabs" aria-label="Main">
{% for href, label in nav %}
<a href="{{ href }}" {% if path == href or (href != '/' and path.startswith(href)) or (href == '/log' and path.startswith('/events')) %}aria-current="page"{% endif %}>{{ label }}</a>
{% endfor %}
</nav>
{% endif %}
</header>
<main class="wrap">
{% for m in flashes %}
<div class="flash flash-{{ m.level }}" role="status">
<span>{{ m.text }}</span>
{% if m.undo %}
<form method="post" action="{{ m.undo }}"><button class="link-btn">Undo</button></form>
{% endif %}
</div>
{% endfor %}
{% if logged_in %}
<div id="tz-hint" class="flash flash-info" hidden>
<span>Your phone is set to <strong data-browser-tz></strong>, but times here use {{ profile.timezone }}.</span>
<form method="post" action="/settings/timezone">
<input type="hidden" name="timezone" value="">
<input type="hidden" name="next" value="{{ path }}">
<button class="link-btn">Use my timezone</button>
</form>
</div>
{% endif %}
{% block content %}{% endblock %}
</main>
<footer class="wrap foot muted">
<span>Mamadachi {{ app_version }}</span>
{% if logged_in %}
<a href="/docs">API</a>
{% if login_required %}
<form method="post" action="/logout"><button class="link-btn">Log out</button></form>
{% endif %}
{% endif %}
</footer>
<div id="tip" class="tip" role="tooltip" hidden></div>
</body>
</html>