{% extends "base.html" %} {% from "_when.html" import when_field with context %} {% import "_chart.html" as ch %} {% block title %}{{ h.word|cap }} training · {{ app_name }}{% endblock %} {% block body %} {#- A refused log comes back filled in (web/kept.py), as on Kit. -#} {%- macro kv(action, name, default='') -%}{{ kept.value(action, name, default) }}{%- endmacro -%} {%- macro kept_err(action) -%}{% if kept.on(action) %}

{{ kept.err }}

{% endif %}{%- endmacro -%} {% set w = h.word %} {% set m = h.metrics %}

🍑 {{ w|cap }} training {% if h.label %}{{ h.label }}{% endif %} ⚙

{% if h.level is none %}

You haven't said how much {{ w }} training means to you yet.

Choose a level →

{% elif h.level == 0 %}

{{ w|cap }} training is off.{% if h.habit %} Its history is kept.{% endif %}

Turn it on →

{% else %}

Today

{% if h.done_today %}

✅ A {{ w }} training day.

{% else %}
{% endif %} {% if m %}

{%- if m.streak %}🔥 {{ m.streak.current }}{{ m.streak.unit }} now · best {{ m.streak.best }}{{ m.streak.unit }}{% endif -%} {%- if m.week %} · {{ m.week.n }}/{{ m.week.target }} this week{% endif -%} {%- if m.count %} · {{ m.count }} logged in all{% endif -%}

{% endif %} {% if h.plugged %} {% for b in h.plugged %}
🍑 {{ b.things|map(attribute='name')|join(' · ') }} in since {{ b.started_at|local('%H:%M') }} · {{ (now - b.started_at)|dur }}
{% endfor %} {% elif h.wearables %}
{% else %}

No plug in your kit yet — add one and Plug in / Plug out appear here.

{% endif %} {% set lb = h.last_bout %}

➕ Details — log a bout

{% endif %} {% if h.level and pics %} {% set P = pics %}{% set wk = lad.week %}

📊 Progress

{% if wk.wear.want_h or wk.ladder.want %}
{% if wk.wear.want_h %}{% set pc = [100, (100 * wk.wear.done_h / wk.wear.want_h)|round|int]|min %}
Plugged this week {{ wk.wear.done_h }} / {{ wk.wear.want_h }} h
{% endif %} {% if wk.ladder.want %}{% set pc = [100, (100 * wk.ladder.done / wk.ladder.want)|round|int]|min %}
Ladder sessions {{ wk.ladder.done }} / {{ wk.ladder.want }}
{% endif %}

{{ wk.days_left }} day{{ 's' if wk.days_left != 1 }} left this week, today included.

{% endif %}

Hours plugged, day by day

{% set H = P.heat %}
{% for m in H.months %}{{ m.label }}{% endfor %}
{% for col in H.cols %}
{% for d in col %}{% endfor %}
{% endfor %}

less more (under {{ P.steps[0] }} h · under {{ P.steps[1] }} h · under {{ P.steps[2] }} h · {{ P.steps[2] }} h and up) · a training day with no time measured

Last {{ H.weeks }} weeks: {{ H.days }} day{{ 's' if H.days != 1 }} plugged, {{ H.total|dur if H.total else '0m' }} in all {%- if H.best %} · most in a day {{ H.best.secs|dur }} ({{ H.best.date.strftime('%a %d %b') }}){% endif %}.

{% if P.week_chart %}

Hours plugged a week

{{ ch.bar(P.week_chart, compact=true) }} {% endif %} {% if P.toys %}

Time with each toy

A bout with two toys counts its whole length for each, so these don't add up to the totals.

{% endif %} {% if P.sizes %}

Sizes, in the order you first took them

    {% for z in P.sizes %}
  1. {{ z.mm|int }} mm {{ z.name }} first on {{ z.first|local('%d %b %Y') }}
  2. {% endfor %}
{% endif %}
{% endif %} {% if h.level %} {% if h.recovery %}

🛌 Recovery until {{ h.recovery.until.strftime('%A %d %B') }}

Rest. No size steps, no {{ w }} orders, nothing owed — the daily habit is excused, so your streak waits. {% if h.recovery.persistent %}It has been extended: the symptom came back.{% endif %}

{% endif %} {% if h.clinician %}

{{ clinician_line }}

{% endif %} {% endif %} {% if h.level %} {% set L = lad.ladder %}{% set t = lad.today %} {% if t and t.status in ('proposed', 'ordered') %}

📋 Today: {{ 'ladder session' if t.kind == 'ladder' else 'plug in' }}{% if t.by == 'ai' %} · your Handler's pick{% endif %}

{{ t.words }}

{% if t.status == 'proposed' %}
{% else %}

An order — today's {{ w }} training meets it.

{% endif %}
{% endif %} {% if lad.unrated %}

⭐ How did it go?

{% for b in lad.unrated[:3] %} {{ b.insertables|map(attribute='name')|join(' · ') }} {{ b.ended_at|local('%a %d %b, %H:%M') }}{% if b.duration_seconds %} · {{ b.duration_seconds|dur }}{% endif %}
One tap — how easy? 1 hard · 5 easy {% for e in range(1, 6) %}{% endfor %}
or say more

How easy · 1 hard, 5 easy

{% for e in range(1, 6) %}{% endfor %}
{% if b.insertables|length > 1 %} {% endif %}

{% endfor %} {% if lad.unrated|length > 3 %}

{{ lad.unrated|length - 3 }} more after these.

{% endif %}
{% endif %}

🪜 The ladder

{% if not L.rungs %}

No sizes yet. Write the Max diameter on your plugs and toys in Kit and the ladder builds itself.

{% else %}
    {% for r in L.rungs %}
  1. {{ r.toys|map(attribute='name')|join(' · ') }} {{ (r.mm / 25.4)|round(2) }}″ · {{ r.mm|int }} mm {% if L.current == loop.index0 %} ← you {% else %}
    {% endif %}
  2. {% endfor %}
{% if L.current is none %}

Tap I'm here on the size you're training now — or rate a bout and the ladder finds you.

{% elif L.top %}
You're on the biggest size you own. {% if lad.next_mm %}
{% endif %}
{% else %}{% set nx = L.rungs[L.current + 1] %}

{% for i in range(L.need) %}{% endfor %} {{ L.count }} of {{ L.need }} easy sessions at this size, then you step up to {{ nx.toys|map(attribute='name')|join(' or ') }} ({{ nx.mm|int }} mm).

A session counts when it's at this size or bigger and you rate it 4 or 5. A hard one (1 or 2) or any pain steps you down. Time alone never moves it.

{% endif %} {% if L.placed %}

You set where you stand on {{ L.placed.ts|local('%d %b') }}; sessions since then move it.

{% endif %} {% if L.unsized %}

Not on it (no size written): {{ L.unsized|join(', ') }}.

{% endif %} {% endif %} {% set wk = lad.week %} {% if wk.ladder.want or wk.wear.want_h %}

This week: {% if wk.ladder.want %}{{ wk.ladder.done }}/{{ wk.ladder.want }} ladder sessions{% endif %}{% if wk.ladder.want and wk.wear.want_h %} · {% endif %}{% if wk.wear.want_h %}{{ wk.wear.done_h }}/{{ wk.wear.want_h }} h plugged{% endif %} {%- if lad.picker != 'me' %} · your Handler {{ 'proposes' if lad.picker == 'suggest' else 'orders' }} the day{% endif %}.

{% endif %}
{% if lad.tip %}

💡 {{ lad.tip.text }}

{% endif %} {% endif %} {% if h.level %} {% set s = stats %}

Stats

{#- Unmeasured is left out, never shown as 0 (no plug in the kit, no size written on a toy). -#}
{% if s.days_7 is not none %}
{{ s.days_7 }}training days, last 7
{% endif %} {% if s.days_30 is not none %}
{{ s.days_30 }}training days, last 30
{% endif %} {% if s.plugged_7 is not none %}
{{ s.plugged_7|dur }}plugged, last 7 days
{% endif %} {% if s.plugged_all is not none %}
{{ s.plugged_all|dur }}plugged, all time
{% endif %} {% if s.longest %}
{{ s.longest|dur }}longest in one go
{% endif %} {% if s.biggest %}
{{ s.biggest.shown }}biggest size · {{ s.biggest.name }}
{% endif %} {% if s.toy %}
{{ s.toy|dur }}toy time
{% endif %} {% if s.workouts is not none %}
{{ s.workouts }}plugged workouts{% if s.workout_km %} · {{ s.workout_km }} km{% endif %}
{% endif %}
{% if s.ease_30 is not none or s.fibre_30 or s.since_recovery is not none %}

🔒 Only here: {%- if s.ease_30 is not none %} clean-out ease {{ s.ease_30 }}/5 (30 d){% endif -%} {%- if s.fibre_30 %}{{ ' ·' if s.ease_30 is not none }} fibre target {{ s.fibre_30.met }} of {{ s.fibre_30.measured }} measured days{% endif -%} {%- if s.since_recovery is not none %} · {{ s.since_recovery }} day{{ 's' if s.since_recovery != 1 }} since a recovery{% endif %}

{% endif %}

On a share card only if you pick them: the 🍑 group in the card's stats.

📸 Album

{% if album.pics %}{{ album.pics|length }} pic{{ 's' if album.pics|length != 1 }}{% if album.ghost %}, the last on {{ album.ghost.taken_at|local('%a %d %b') }}{% endif %}.{% else %}No pics yet.{% endif %} 🔒 Private: never on a card, the blog, a pack or the AI.

📸 New pic Album → {% if album.can_warp %}⏳ Time-warp{% endif %}

Badges

{% if badges.got %} {% endif %} {% if badges.todo %} Still to earn {% endif %}

🔒 Yours alone: a pack, your kennel card and the chat room never see these.

{% endif %} {% if h.level %}

🚽 Log

🔒 Stays on this box. Skip anything — a blank is a blank, nothing is filled in for you. A tracker you already use can send these instead (see the guide); this is the by-hand way.

🚽 Bathroom

Bristol type

{% for n, what in bristol.items() %} {% endfor %}

How easy

{% for n in range(1, 6) %}{% endfor %} 1 strained · 5 easy

Urgency

{% for u in ['none', 'some', 'urgent'] %}{% endfor %}
{{ when_field() }}

🚿 Clean-out
{% for m in methods %}{% endfor %}

How clean

{% for n in range(1, 6) %}{% endfor %} 1 not at all · 5 spotless
{{ when_field() }}

{% set a = '/hole/log/symptom' %} 🩹 Symptoms
{{ kept_err(a) }}

Blood

{% for b in ['none', 'spotting', 'more'] %}{% endfor %}

Pain (0 none · 10 worst)

{% for n in range(0, 11) %}{% endfor %}

Blood beyond spotting, a haemorrhoid flare, a tear or pain at {{ h.pain_threshold }}+ starts a {{ h.recovery_days }}-day recovery. That can't be switched off.

{{ when_field(value=kv(a, 'when')) }}

{% if body %}

Body log

{% endif %} {% endif %} {% if recent %}

Training days

All habits → Calendar →

{% endif %} {% endblock %}