First fully working model with data from 2025 and 2026
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="theme-color" content="#f6f4ef">
|
||||
<title>{% block title %}Fatimas Calendar{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
|
||||
</head>
|
||||
<body class="{% block body_class %}{% endblock %}">
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,60 @@
|
||||
{% extends "base.html" %}
|
||||
{% block body_class %}calendar-page{% endblock %}
|
||||
{% block content %}
|
||||
<main class="app-shell" data-today="{{ today }}" data-save-url="{{ url_for('save_choice') }}" data-status-url="{{ url_for('save_status') }}" data-delete-url="{{ url_for('delete_date_data') }}">
|
||||
<section class="calendar-panel" aria-label="Calendar">
|
||||
<header class="calendar-header">
|
||||
<div>
|
||||
<p class="eyebrow">Fatimas calendar</p>
|
||||
<h1 id="visible-month">Calendar</h1>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<button class="today-button" data-today-button type="button">Today</button>
|
||||
<form action="{{ url_for('logout') }}" method="post">
|
||||
<button class="logout-button" type="submit" aria-label="Sign out">Sign out</button>
|
||||
</form>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="weekday-row" aria-hidden="true">
|
||||
<span>Sun</span><span>Mon</span><span>Tue</span><span>Wed</span>
|
||||
<span>Thu</span><span>Fri</span><span>Sat</span>
|
||||
</div>
|
||||
<div id="weeks" class="weeks" role="grid" aria-label="Choose a date"></div>
|
||||
</section>
|
||||
|
||||
<section class="detail-panel" aria-live="polite">
|
||||
<p id="selected-date" class="selected-date">Tap a day</p>
|
||||
<div class="report-row">
|
||||
<a class="report-button" href="{{ url_for('report') }}">Report</a>
|
||||
</div>
|
||||
<div id="amount-controls" class="amount-controls" hidden>
|
||||
<div class="status-options" aria-label="Choose day status">
|
||||
<button type="button" data-status="worked">Worked</button>
|
||||
<button type="button" data-status="vacation">Vacation</button>
|
||||
<button type="button" data-status="sick">Sick</button>
|
||||
</div>
|
||||
<div class="amount-row" aria-label="Choose an amount">
|
||||
{% for amount in preset_amounts %}
|
||||
<button type="button" data-amount="{{ amount }}">€{{ amount }}</button>
|
||||
{% endfor %}
|
||||
<button type="button" data-amount="0">€0</button>
|
||||
<form id="custom-amount-form" class="custom-amount-form">
|
||||
<div class="amount-input">
|
||||
<span>€</span>
|
||||
<input id="custom-amount" aria-label="Alternative amount" type="number" inputmode="decimal" min="0" step="0.01" placeholder="Other" required>
|
||||
</div>
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="delete-row">
|
||||
<button id="delete-date-button" type="button">Delete all data for this date</button>
|
||||
</div>
|
||||
<p id="save-status" class="save-status" role="status"></p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<script id="saved-choices" type="application/json">{{ choices | tojson }}</script>
|
||||
<script id="saved-statuses" type="application/json">{{ statuses | tojson }}</script>
|
||||
<script src="{{ url_for('static', filename='calendar.js') }}" defer></script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,23 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Sign in · Fatimas Calendar{% endblock %}
|
||||
{% block body_class %}login-page{% endblock %}
|
||||
{% block content %}
|
||||
<main class="login-shell">
|
||||
<form class="login-card" method="post">
|
||||
<div class="brand-mark" aria-hidden="true">31</div>
|
||||
<p class="eyebrow">Fatimas calendar</p>
|
||||
<h1>Welcome back</h1>
|
||||
<p class="login-copy">Sign in to open your calendar.</p>
|
||||
|
||||
{% if error %}<p class="form-error" role="alert">{{ error }}</p>{% endif %}
|
||||
|
||||
<label for="username">Username</label>
|
||||
<input id="username" name="username" autocomplete="username" autocapitalize="none" required autofocus>
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input id="password" name="password" type="password" autocomplete="current-password" required>
|
||||
|
||||
<button type="submit">Sign in</button>
|
||||
</form>
|
||||
</main>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,44 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ year }} report · Perpetual Calendar{% endblock %}
|
||||
{% block body_class %}report-page{% endblock %}
|
||||
{% block content %}
|
||||
<main class="report-shell">
|
||||
<header class="report-header">
|
||||
<a class="back-button" href="{{ url_for('calendar') }}" aria-label="Back to calendar">← Calendar</a>
|
||||
<form action="{{ url_for('logout') }}" method="post">
|
||||
<button class="logout-button" type="submit">Sign out</button>
|
||||
</form>
|
||||
</header>
|
||||
|
||||
<section class="report-intro">
|
||||
<p class="eyebrow">Yearly overview</p>
|
||||
<div class="year-navigation">
|
||||
<a href="{{ url_for('report', year=year - 1) }}" aria-label="Previous year">←</a>
|
||||
<h1>{{ year }} report</h1>
|
||||
<a href="{{ url_for('report', year=year + 1) }}" aria-label="Next year">→</a>
|
||||
</div>
|
||||
<p>Money and recorded days grouped by day category.</p>
|
||||
</section>
|
||||
|
||||
<section class="report-categories" aria-label="Yearly totals by category">
|
||||
{% for category in categories %}
|
||||
<article class="report-card report-card--{{ category.key }}">
|
||||
<div class="category-title">
|
||||
<span class="category-swatch" aria-hidden="true"></span>
|
||||
<h2>{{ category.label }}</h2>
|
||||
</div>
|
||||
<p class="category-amount">€{{ "%.2f" | format(category.amount_cents / 100) }}</p>
|
||||
<p class="category-days">{{ category.days }} {{ "day" if category.days == 1 else "days" }}</p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
<section class="report-total">
|
||||
<div>
|
||||
<p class="eyebrow">Annual total</p>
|
||||
<p class="total-amount">€{{ "%.2f" | format(total_cents / 100) }}</p>
|
||||
</div>
|
||||
<p class="total-days">{{ total_days }} recorded {{ "day" if total_days == 1 else "days" }}</p>
|
||||
</section>
|
||||
</main>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user