131 lines
8.2 KiB
HTML
131 lines
8.2 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"
|
|
max="1000000"
|
|
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>
|
|
|
|
<label class="grid gap-2">
|
|
<span class="text-sm font-semibold text-slate-700">Timezone</span>
|
|
<select
|
|
name="timezone"
|
|
required
|
|
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"
|
|
>
|
|
<option value="UTC" {% if page.timezone_value == "UTC" %}selected{% endif %}>UTC</option>
|
|
<option value="-12:00" {% if page.timezone_value == "-12:00" %}selected{% endif %}>(UTC-12:00) Baker Island</option>
|
|
<option value="-11:00" {% if page.timezone_value == "-11:00" %}selected{% endif %}>(UTC-11:00) American Samoa</option>
|
|
<option value="-10:00" {% if page.timezone_value == "-10:00" %}selected{% endif %}>(UTC-10:00) Hawaii</option>
|
|
<option value="-09:00" {% if page.timezone_value == "-09:00" %}selected{% endif %}>(UTC-09:00) Alaska</option>
|
|
<option value="-08:00" {% if page.timezone_value == "-08:00" %}selected{% endif %}>(UTC-08:00) Pacific Time</option>
|
|
<option value="-07:00" {% if page.timezone_value == "-07:00" %}selected{% endif %}>(UTC-07:00) Mountain Time</option>
|
|
<option value="-06:00" {% if page.timezone_value == "-06:00" %}selected{% endif %}>(UTC-06:00) Central Time</option>
|
|
<option value="-05:00" {% if page.timezone_value == "-05:00" %}selected{% endif %}>(UTC-05:00) Eastern Time</option>
|
|
<option value="-04:00" {% if page.timezone_value == "-04:00" %}selected{% endif %}>(UTC-04:00) Atlantic Time</option>
|
|
<option value="-03:30" {% if page.timezone_value == "-03:30" %}selected{% endif %}>(UTC-03:30) Newfoundland</option>
|
|
<option value="-03:00" {% if page.timezone_value == "-03:00" %}selected{% endif %}>(UTC-03:00) Buenos Aires</option>
|
|
<option value="-02:00" {% if page.timezone_value == "-02:00" %}selected{% endif %}>(UTC-02:00) South Georgia</option>
|
|
<option value="-01:00" {% if page.timezone_value == "-01:00" %}selected{% endif %}>(UTC-01:00) Azores</option>
|
|
<option value="+00:00" {% if page.timezone_value == "+00:00" %}selected{% endif %}>(UTC+00:00) London / Dublin</option>
|
|
<option value="+01:00" {% if page.timezone_value == "+01:00" %}selected{% endif %}>(UTC+01:00) Central Europe</option>
|
|
<option value="+02:00" {% if page.timezone_value == "+02:00" %}selected{% endif %}>(UTC+02:00) Eastern Europe</option>
|
|
<option value="+03:00" {% if page.timezone_value == "+03:00" %}selected{% endif %}>(UTC+03:00) Moscow</option>
|
|
<option value="+03:30" {% if page.timezone_value == "+03:30" %}selected{% endif %}>(UTC+03:30) Tehran</option>
|
|
<option value="+04:00" {% if page.timezone_value == "+04:00" %}selected{% endif %}>(UTC+04:00) Dubai</option>
|
|
<option value="+04:30" {% if page.timezone_value == "+04:30" %}selected{% endif %}>(UTC+04:30) Kabul</option>
|
|
<option value="+05:00" {% if page.timezone_value == "+05:00" %}selected{% endif %}>(UTC+05:00) Karachi</option>
|
|
<option value="+05:30" {% if page.timezone_value == "+05:30" %}selected{% endif %}>(UTC+05:30) India</option>
|
|
<option value="+05:45" {% if page.timezone_value == "+05:45" %}selected{% endif %}>(UTC+05:45) Nepal</option>
|
|
<option value="+06:00" {% if page.timezone_value == "+06:00" %}selected{% endif %}>(UTC+06:00) Dhaka</option>
|
|
<option value="+06:30" {% if page.timezone_value == "+06:30" %}selected{% endif %}>(UTC+06:30) Myanmar</option>
|
|
<option value="+07:00" {% if page.timezone_value == "+07:00" %}selected{% endif %}>(UTC+07:00) Bangkok</option>
|
|
<option value="+08:00" {% if page.timezone_value == "+08:00" %}selected{% endif %}>(UTC+08:00) Singapore / Beijing</option>
|
|
<option value="+09:00" {% if page.timezone_value == "+09:00" %}selected{% endif %}>(UTC+09:00) Tokyo / Seoul</option>
|
|
<option value="+09:30" {% if page.timezone_value == "+09:30" %}selected{% endif %}>(UTC+09:30) Adelaide</option>
|
|
<option value="+10:00" {% if page.timezone_value == "+10:00" %}selected{% endif %}>(UTC+10:00) Sydney</option>
|
|
<option value="+11:00" {% if page.timezone_value == "+11:00" %}selected{% endif %}>(UTC+11:00) Solomon Islands</option>
|
|
<option value="+12:00" {% if page.timezone_value == "+12:00" %}selected{% endif %}>(UTC+12:00) Auckland</option>
|
|
<option value="+12:45" {% if page.timezone_value == "+12:45" %}selected{% endif %}>(UTC+12:45) Chatham Islands</option>
|
|
<option value="+13:00" {% if page.timezone_value == "+13:00" %}selected{% endif %}>(UTC+13:00) Samoa</option>
|
|
<option value="+14:00" {% if page.timezone_value == "+14:00" %}selected{% endif %}>(UTC+14:00) Line Islands</option>
|
|
</select>
|
|
<span class="text-xs text-slate-500">Used to determine when "today" starts for your account.</span>
|
|
</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 %}
|