* build(deps): bump askama from 0.12.1 to 0.15.4 Bumps [askama](https://github.com/askama-rs/askama) from 0.12.1 to 0.15.4. - [Release notes](https://github.com/askama-rs/askama/releases) - [Commits](https://github.com/askama-rs/askama/compare/0.12.1...v0.15.4) --- updated-dependencies: - dependency-name: askama dependency-version: 0.15.4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix(deps): adapt templates and tests for askama 0.15 - Migrate macro calls from {% call %} to {{ }} expression syntax (134 occurrences) - Update test assertion for askama 0.15's numeric HTML entity encoding (& vs &) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jon Seager <jon@sgrs.uk>
103 lines
4.4 KiB
HTML
103 lines
4.4 KiB
HTML
{% import "partials/icons.html" as icons %}
|
|
<h2 id="{{ month.anchor }}" class="timeline-heading scroll-mt-24 mb-6 text-2xl font-semibold text-text" data-timeline-month>
|
|
{{ month.heading }}
|
|
<button type="button" class="timeline-top-btn" onclick="window.scrollTo({top: 0, behavior: 'smooth'})" aria-label="Back to top">
|
|
{{ icons::arrow_up("h-5 w-5") }}
|
|
</button>
|
|
</h2>
|
|
{% for event in month.events %}
|
|
<div class="timeline-item relative mb-8" data-timeline-event>
|
|
{# Timeline node/bullet #}
|
|
<span
|
|
class="timeline-node absolute h-5 w-5 rounded-full border-[3px] border-accent bg-page"
|
|
aria-hidden="true"
|
|
></span>
|
|
<div class="rounded-lg border bg-surface p-5 text-left">
|
|
<div class="flex flex-wrap items-center justify-between gap-2">
|
|
<span class="pill pill-muted">{{ event.kind_label }}</span>
|
|
<time
|
|
datetime="{{ event.iso_timestamp }}"
|
|
class="text-xs uppercase tracking-wide text-text-muted"
|
|
>
|
|
{{ event.date_label }}{% if let Some(label) = event.time_label %} · {{ label }}{% endif
|
|
%}
|
|
</time>
|
|
</div>
|
|
<h3 class="mt-3 flex items-center gap-2 text-lg font-semibold text-text">
|
|
<a href="{{ event.link }}" class="hover:text-accent">{{ event.title }}</a>
|
|
{% if let Some(url) = event.external_link %}
|
|
<a
|
|
href="{{ url }}"
|
|
class="ml-auto text-accent transition hover:text-accent-hover"
|
|
target="_blank"
|
|
rel="noreferrer noopener"
|
|
aria-label="Open external link"
|
|
>
|
|
{{ icons::external_link("h-4 w-4") }}
|
|
<span class="sr-only">Open external link</span>
|
|
</a>
|
|
{% endif %}
|
|
{% if is_authenticated %}
|
|
{% if let Some(brew) = event.brew_data %}
|
|
<form
|
|
class="inline ml-auto"
|
|
data-on:submit="@post('/api/v1/brews', {contentType: 'form'})"
|
|
>
|
|
<input type="hidden" name="bag_id" value="{{ brew.bag_id }}" />
|
|
<input type="hidden" name="coffee_weight" value="{{ brew.coffee_weight }}" />
|
|
<input type="hidden" name="grinder_id" value="{{ brew.grinder_id }}" />
|
|
<input type="hidden" name="grind_setting" value="{{ brew.grind_setting }}" />
|
|
<input type="hidden" name="brewer_id" value="{{ brew.brewer_id }}" />
|
|
{% if let Some(fp_id) = brew.filter_paper_id %}
|
|
<input type="hidden" name="filter_paper_id" value="{{ fp_id }}" />
|
|
{% endif %}
|
|
<input type="hidden" name="water_volume" value="{{ brew.water_volume }}" />
|
|
<input type="hidden" name="water_temp" value="{{ brew.water_temp }}" />
|
|
<button
|
|
type="submit"
|
|
class="text-accent transition hover:text-accent-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent"
|
|
title="Brew again"
|
|
>
|
|
<span class="sr-only">Brew again</span>
|
|
{{ icons::refresh("h-4 w-4") }}
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
{% endif %}
|
|
</h3>
|
|
{% if event.details.len() > 0 %}
|
|
<dl class="mt-4 flex flex-col gap-2 text-sm text-text-secondary">
|
|
{% for detail in event.details %}
|
|
<div class="flex justify-between gap-2">
|
|
<dt class="font-medium text-text-muted">{{ detail.label }}</dt>
|
|
{% if detail.label.eq_ignore_ascii_case("position") && detail.link.is_some() %}
|
|
<dd class="text-right flex items-center justify-end gap-1.5">
|
|
{{ detail.value }}
|
|
<a href="{{ detail.link.as_ref().unwrap() }}" target="_blank" rel="noreferrer noopener" class="text-accent hover:text-accent-hover" aria-label="View on map">
|
|
{{ icons::map("h-4 w-4") }}
|
|
</a>
|
|
</dd>
|
|
{% else if let Some(url) = detail.link %}
|
|
<dd class="text-right"><a href="{{ url }}" target="_blank" rel="noreferrer noopener" class="text-accent hover:text-accent-hover">{{ detail.value }}</a></dd>
|
|
{% else %}
|
|
<dd class="text-right">{{ detail.value }}</dd>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
{% if let Some(notes) = event.tasting_notes %}
|
|
{% if !notes.is_empty() %}
|
|
<div class="flex justify-between gap-2">
|
|
<dt class="shrink-0 font-medium text-text-muted">Tasting Notes</dt>
|
|
<dd class="flex flex-wrap gap-1 justify-end">
|
|
{% for note in notes %}
|
|
<span class="{{ note.pill_class }}">{{ note.label }}</span>
|
|
{% endfor %}
|
|
</dd>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</dl>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|