83 lines
3.4 KiB
HTML
83 lines
3.4 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Planning{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="rounded-3xl border border-slate-200/80 bg-white/80 p-6 shadow-sm backdrop-blur">
|
|
<h1 class="text-3xl font-bold tracking-tight">Planning</h1>
|
|
<p class="mt-3 text-sm text-slate-600">Set target weight (lbs), target daily calories, and BMR. Leave blank to unset.</p>
|
|
|
|
<form method="post" action="/planning" class="mt-6 grid max-w-xl gap-4">
|
|
<label class="grid gap-2">
|
|
<span class="text-sm font-semibold text-slate-700">Target Weight (lbs)</span>
|
|
<input
|
|
type="number"
|
|
step="0.1"
|
|
min="1"
|
|
name="target_weight"
|
|
value="{{ page.target_weight_value }}"
|
|
placeholder="e.g. 175.0"
|
|
class="rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm text-slate-900 focus:border-teal-500 focus:outline-none"
|
|
/>
|
|
</label>
|
|
|
|
<label class="grid gap-2">
|
|
<span class="text-sm font-semibold text-slate-700">Target Daily Calories</span>
|
|
<input
|
|
type="number"
|
|
min="0"
|
|
name="target_calories"
|
|
value="{{ page.target_calories_value }}"
|
|
placeholder="e.g. 2200"
|
|
class="rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm text-slate-900 focus:border-teal-500 focus:outline-none"
|
|
/>
|
|
</label>
|
|
|
|
<label class="grid gap-2">
|
|
<span class="text-sm font-semibold text-slate-700">BMR (cal/day)</span>
|
|
<input
|
|
type="number"
|
|
min="1"
|
|
step="1"
|
|
name="bmr"
|
|
value="{{ page.bmr_value }}"
|
|
placeholder="e.g. 1900"
|
|
class="rounded-lg border border-slate-300 bg-white px-3 py-2 text-sm text-slate-900 focus:border-teal-500 focus:outline-none"
|
|
/>
|
|
</label>
|
|
|
|
<fieldset class="grid gap-2 rounded-lg border border-slate-200 bg-slate-50 p-3">
|
|
<legend class="px-1 text-sm font-semibold text-slate-700">Public profile visibility</legend>
|
|
<label class="flex items-center gap-2 text-sm text-slate-700">
|
|
<input type="checkbox" name="public_entries" {% if page.public_entries %}checked{% endif %} />
|
|
<span>Show calorie entries</span>
|
|
</label>
|
|
<label class="flex items-center gap-2 text-sm text-slate-700">
|
|
<input type="checkbox" name="public_weights" {% if page.public_weights %}checked{% endif %} />
|
|
<span>Show weight entries (lbs)</span>
|
|
</label>
|
|
<label class="flex items-center gap-2 text-sm text-slate-700">
|
|
<input type="checkbox" name="public_reports" {% if page.public_reports %}checked{% endif %} />
|
|
<span>Show reports</span>
|
|
</label>
|
|
<label class="flex items-center gap-2 text-sm text-slate-700">
|
|
<input type="checkbox" name="public_planning" {% if page.public_planning %}checked{% endif %} />
|
|
<span>Show planning targets</span>
|
|
</label>
|
|
</fieldset>
|
|
|
|
<div>
|
|
<button type="submit" class="rounded-lg bg-slate-900 px-4 py-2 text-sm font-semibold text-white hover:bg-slate-700">Save Planning</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="mt-4 rounded-3xl border border-slate-200/80 bg-white/80 p-6 shadow-sm backdrop-blur">
|
|
<h2 class="text-xl font-bold tracking-tight">Security</h2>
|
|
<p class="mt-2 text-sm text-slate-600">Update your account password.</p>
|
|
<a href="/planning/password" class="mt-4 inline-flex rounded-lg border border-slate-300 bg-white px-4 py-2 text-sm font-semibold text-slate-800 hover:bg-slate-100">
|
|
Change Password
|
|
</a>
|
|
</section>
|
|
{% endblock %}
|