diff --git a/Cargo.lock b/Cargo.lock
index 284478f..d26636f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -103,46 +103,54 @@ checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea"
[[package]]
name = "askama"
-version = "0.12.1"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28"
+checksum = "08e1676b346cadfec169374f949d7490fd80a24193d37d2afce0c047cf695e57"
dependencies = [
- "askama_derive",
- "askama_escape",
- "humansize",
- "num-traits",
+ "askama_macros",
+ "itoa",
"percent-encoding",
+ "serde",
+ "serde_json",
]
[[package]]
name = "askama_derive"
-version = "0.12.5"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83"
+checksum = "7661ff56517787343f376f75db037426facd7c8d3049cef8911f1e75016f3a37"
dependencies = [
"askama_parser",
"basic-toml",
- "mime",
- "mime_guess",
+ "memchr",
"proc-macro2",
"quote",
+ "rustc-hash",
"serde",
+ "serde_derive",
"syn 2.0.114",
]
[[package]]
-name = "askama_escape"
-version = "0.10.3"
+name = "askama_macros"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341"
+checksum = "713ee4dbfd1eb719c2dab859465b01fa1d21cb566684614a713a6b7a99a4e47b"
+dependencies = [
+ "askama_derive",
+]
[[package]]
name = "askama_parser"
-version = "0.2.1"
+version = "0.15.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0"
+checksum = "1d62d674238a526418b30c0def480d5beadb9d8964e7f38d635b03bf639c704c"
dependencies = [
- "nom",
+ "rustc-hash",
+ "serde",
+ "serde_derive",
+ "unicode-ident",
+ "winnow",
]
[[package]]
@@ -1149,15 +1157,6 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
-[[package]]
-name = "humansize"
-version = "2.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7"
-dependencies = [
- "libm",
-]
-
[[package]]
name = "hyper"
version = "1.8.1"
@@ -1543,16 +1542,6 @@ version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
-[[package]]
-name = "mime_guess"
-version = "2.0.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
-dependencies = [
- "mime",
- "unicase",
-]
-
[[package]]
name = "minimal-lexical"
version = "0.2.1"
@@ -3096,12 +3085,6 @@ version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
-[[package]]
-name = "unicase"
-version = "2.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
-
[[package]]
name = "unicode-bidi"
version = "0.3.18"
@@ -3724,6 +3707,15 @@ version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
+[[package]]
+name = "winnow"
+version = "0.7.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "wiremock"
version = "0.6.5"
diff --git a/Cargo.toml b/Cargo.toml
index fc52743..4945f20 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2024"
anyhow = "1.0"
async-trait = "0.1"
axum = { version = "0.7", features = ["macros"] }
-askama = "0.12"
+askama = "0.15"
base64 = "0.22"
chrono = { version = "0.4", features = ["serde", "clock"] }
clap = { version = "4.5", features = ["derive", "env"] }
diff --git a/templates/pages/account.html b/templates/pages/account.html
index 08a2aee..f8d4b7c 100644
--- a/templates/pages/account.html
+++ b/templates/pages/account.html
@@ -21,7 +21,7 @@
{% for passkey in passkeys %}
- {% call icons::key("h-4 w-4 text-accent shrink-0") %}
+ {{ icons::key("h-4 w-4 text-accent shrink-0") }}
{{ passkey.name }}
@@ -37,7 +37,7 @@
onclick="deletePasskey({{ passkey.id }}, '{{ passkey.name }}')"
aria-label="Delete passkey"
>
- {% call icons::delete("h-4 w-4") %}
+ {{ icons::delete("h-4 w-4") }}
{% endif %}
@@ -80,7 +80,7 @@
- {% call icons::spinner("h-5 w-5") %}
+ {{ icons::spinner("h-5 w-5") }}
Follow the prompts from your browser or device...
@@ -132,7 +132,7 @@
onclick="revokeToken({{ token.id }}, '{{ token.name }}')"
aria-label="Revoke token"
>
- {% call icons::delete("h-4 w-4") %}
+ {{ icons::delete("h-4 w-4") }}
{% endfor %}
diff --git a/templates/pages/add.html b/templates/pages/add.html
index dd091a5..d045015 100644
--- a/templates/pages/add.html
+++ b/templates/pages/add.html
@@ -2,7 +2,7 @@
{% block head %}
{% endblock %}
@@ -35,7 +35,7 @@
data-on:submit="$_extracting = true; $_extractError = ''; @post('/api/v1/extract-bag-scan', {contentType: 'form'})"
data-on:datastar-fetch="if (!$_extracting) return; if (evt.detail.type === 'finished') { $_extracting = false; $_scanExtracted = true; document.getElementById('scan-extract-form').reset() } else if (evt.detail.type === 'error') { $_extracting = false; $_extractError = 'Extraction failed. Please try again.' }"
>
- {% call scan::scan_input("scan-extract-form", "scan-image", "$_extracting", "$_extractError", "Describe the coffee bag…", "Waiting for response…") %}
+ {{ scan::scan_input("scan-extract-form", "scan-image", "$_extracting", "$_extractError", "Describe the coffee bag…", "Waiting for response…") }}
@@ -427,14 +427,14 @@
- {% call location::location_search("$_cafeError") %}
+ {{ location::location_search("$_cafeError") }}
- {% call icons::location("h-4 w-4 text-accent shrink-0") %}
+ {{ icons::location("h-4 w-4 text-accent shrink-0") }}
diff --git a/templates/pages/checkin.html b/templates/pages/checkin.html
index 225345c..ee5371f 100644
--- a/templates/pages/checkin.html
+++ b/templates/pages/checkin.html
@@ -2,7 +2,7 @@
{% block head %}
{% endblock %}
@@ -88,7 +88,7 @@
style="display: none"
>
- {% call icons::location("h-4 w-4 text-accent shrink-0") %}
+ {{ icons::location("h-4 w-4 text-accent shrink-0") }}
@@ -106,7 +106,7 @@
style="display: none"
>
- {% call icons::bag("h-4 w-4 text-accent shrink-0") %}
+ {{ icons::bag("h-4 w-4 text-accent shrink-0") }}
@@ -129,7 +129,7 @@
- {% call location::location_search("$_error") %}
+ {{ location::location_search("$_error") }}
@@ -208,7 +208,7 @@
data-on:submit="$_extracting = true; $_extractError = ''; @post('/api/v1/scan', {contentType: 'form'})"
data-on:datastar-fetch="if (!$_extracting) return; if (evt.detail.type === 'finished') { $_extracting = false; $_roastName = $_scanSuccess; $_step = 3 } else if (evt.detail.type === 'error') { $_extracting = false; $_extractError = 'Scan failed. Please try again.' }"
>
- {% call scan::scan_input("checkin-scan-form", "checkin-image", "$_extracting", "$_extractError", "Describe the coffee…", "Scanning…") %}
+ {{ scan::scan_input("checkin-scan-form", "checkin-image", "$_extracting", "$_extractError", "Describe the coffee…", "Scanning…") }}
diff --git a/templates/pages/cli_callback.html b/templates/pages/cli_callback.html
index ff51c09..d6461ed 100644
--- a/templates/pages/cli_callback.html
+++ b/templates/pages/cli_callback.html
@@ -5,7 +5,7 @@
{% if token.is_some() %}
- {% call icons::check_circle("h-10 w-10 text-emerald-600 dark:text-emerald-400") %}
+ {{ icons::check_circle("h-10 w-10 text-emerald-600 dark:text-emerald-400") }}
CLI Authenticated
Your CLI has been authenticated successfully. You can close this window and return to the terminal.
@@ -13,7 +13,7 @@
{% else if error.is_some() %}
- {% call icons::x_circle("h-10 w-10 text-red-600 dark:text-red-400") %}
+ {{ icons::x_circle("h-10 w-10 text-red-600 dark:text-red-400") }}
Authentication Failed
{{ error.as_ref().unwrap() }}
@@ -21,7 +21,7 @@
{% else %}
- {% call icons::spinner("h-10 w-10") %}
+ {{ icons::spinner("h-10 w-10") }}
CLI Authentication
Processing authentication…
diff --git a/templates/pages/data.html b/templates/pages/data.html
index f2058ac..f01790a 100644
--- a/templates/pages/data.html
+++ b/templates/pages/data.html
@@ -10,7 +10,7 @@
href="/add?type={{ active_type }}"
class="inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2.5 text-sm font-semibold text-accent-text transition hover:bg-accent-hover"
>
- {% call icons::plus_circle("h-4 w-4") %}
+ {{ icons::plus_circle("h-4 w-4") }}
Add
{% endif %}
diff --git a/templates/pages/home.html b/templates/pages/home.html
index fc1b077..a6b915d 100644
--- a/templates/pages/home.html
+++ b/templates/pages/home.html
@@ -57,7 +57,7 @@
data-on:submit="$_extracting = true; $_extractError = ''; @post('/api/v1/extract-bag-scan', {contentType: 'form'})"
data-on:datastar-fetch="if (!$_extracting) return; if (evt.detail.type === 'finished') { $_extracting = false; $_scanExtracted = true; document.getElementById('scan-extract-form').reset() } else if (evt.detail.type === 'error') { $_extracting = false; $_extractError = 'Extraction failed. Please try again.' }"
>
- {% call scan::scan_input("scan-extract-form", "scan-image", "$_extracting", "$_extractError", "Describe the coffee bag…", "Waiting for response…") %}
+ {{ scan::scan_input("scan-extract-form", "scan-image", "$_extracting", "$_extractError", "Describe the coffee bag…", "Waiting for response…") }}
@@ -128,7 +128,7 @@
class="inline-flex h-8 w-8 items-center justify-center rounded-md text-accent transition hover:text-accent-hover hover:bg-surface-alt"
title="Brew Again"
>
- {% call icons::refresh("h-4 w-4") %}
+ {{ icons::refresh("h-4 w-4") }}
{% endif %}
@@ -148,7 +148,7 @@
{% for bag in open_bags %}
- {% call bag_card::card(bag, is_authenticated) %}
+ {{ bag_card::card(bag, is_authenticated) }}
{% endfor %}
@@ -182,37 +182,37 @@
- {% call icons::beaker("h-6 w-6 text-accent") %}
+ {{ icons::beaker("h-6 w-6 text-accent") }}
{{ stats.brews }}
Brews
- {% call icons::fire("h-6 w-6 text-accent") %}
+ {{ icons::fire("h-6 w-6 text-accent") }}
{{ stats.roasts }}
Roasts
- {% call icons::building("h-6 w-6 text-accent") %}
+ {{ icons::building("h-6 w-6 text-accent") }}
{{ stats.roasters }}
Roasters
- {% call icons::bag("h-6 w-6 text-accent") %}
+ {{ icons::bag("h-6 w-6 text-accent") }}
{{ stats.bags }}
Bags
- {% call icons::cup("h-6 w-6 text-accent") %}
+ {{ icons::cup("h-6 w-6 text-accent") }}
{{ stats.cups }}
Cups
- {% call icons::location("h-6 w-6 text-accent") %}
+ {{ icons::location("h-6 w-6 text-accent") }}
{{ stats.cafes }}
Cafes
- {% call icons::wrench("h-6 w-6 text-accent") %}
+ {{ icons::wrench("h-6 w-6 text-accent") }}
{{ stats.gear }}
Gear
diff --git a/templates/partials/bag_card.html b/templates/partials/bag_card.html
index 813100d..beacb23 100644
--- a/templates/partials/bag_card.html
+++ b/templates/partials/bag_card.html
@@ -12,7 +12,7 @@
{% if is_authenticated %}
diff --git a/templates/partials/forms/scan_result_form.html b/templates/partials/forms/scan_result_form.html
index 3bfb0d9..4318a29 100644
--- a/templates/partials/forms/scan_result_form.html
+++ b/templates/partials/forms/scan_result_form.html
@@ -16,7 +16,7 @@
Roaster
- {% call icons::fire("h-4 w-4 text-accent shrink-0") %}
+ {{ icons::fire("h-4 w-4 text-accent shrink-0") }}
@@ -53,7 +53,7 @@
Roast
- {% call icons::bag("h-4 w-4 text-accent shrink-0") %}
+ {{ icons::bag("h-4 w-4 text-accent shrink-0") }}
@@ -107,7 +107,7 @@
- {% call icons::spinner("h-5 w-5") %}
+ {{ icons::spinner("h-5 w-5") }}
Saving…
diff --git a/templates/partials/lists/bag_list.html b/templates/partials/lists/bag_list.html
index 084d63c..1ef5fd2 100644
--- a/templates/partials/lists/bag_list.html
+++ b/templates/partials/lists/bag_list.html
@@ -18,16 +18,16 @@
- {% call table::search_header(navigator, "#bag-list") %}
+ {{ table::search_header(navigator, "#bag-list") }}
- {% call table::sortable_header("Added", "created-at", navigator, "#bag-list") %}
- {% call table::sortable_header("Roaster", "roaster", navigator, "#bag-list") %}
- {% call table::sortable_header("Roast", "roast", navigator, "#bag-list") %}
- {% call table::sortable_header("Status", "status", navigator, "#bag-list") %}
- {% call table::sortable_header("Finished", "finished-at", navigator, "#bag-list") %}
+ {{ table::sortable_header("Added", "created-at", navigator, "#bag-list") }}
+ {{ table::sortable_header("Roaster", "roaster", navigator, "#bag-list") }}
+ {{ table::sortable_header("Roast", "roast", navigator, "#bag-list") }}
+ {{ table::sortable_header("Status", "status", navigator, "#bag-list") }}
+ {{ table::sortable_header("Finished", "finished-at", navigator, "#bag-list") }}
{% if is_authenticated %}
| Actions |
{% endif %}
@@ -83,13 +83,13 @@
{% endif %}
@@ -103,8 +103,8 @@
@@ -118,13 +118,13 @@
{% endif %}
@@ -137,7 +137,7 @@
{% if bags.items.is_empty() %}
No bags match your search.
{% endif %}
- {% call table::pagination_header(bags, navigator, "#bag-list") %}
+ {{ table::pagination_header(bags, navigator, "#bag-list") }}
{% if bags.has_next() %}
{% endif %}
diff --git a/templates/partials/lists/brew_list.html b/templates/partials/lists/brew_list.html
index 0c81977..5ee1c4c 100644
--- a/templates/partials/lists/brew_list.html
+++ b/templates/partials/lists/brew_list.html
@@ -17,13 +17,13 @@
{% endmacro %}
@@ -45,13 +45,13 @@
- {% call table::search_header(navigator, "#brew-list") %}
+ {{ table::search_header(navigator, "#brew-list") }}
- {% call table::sortable_header("Added", "created-at", navigator, "#brew-list") %}
+ {{ table::sortable_header("Added", "created-at", navigator, "#brew-list") }}
| Coffee |
Grind |
Recipe |
@@ -109,14 +109,14 @@
{% if is_authenticated %}
- {% call brew_actions(brew, navigator) %}
+ {{ brew_actions(brew, navigator) }}
|
|
{% endif %}
@@ -124,7 +124,7 @@
{% if is_authenticated %}
|
- {% call brew_actions(brew, navigator) %}
+ {{ brew_actions(brew, navigator) }}
|
{% endif %}
@@ -139,7 +139,7 @@
{% endif %}
- {% call table::pagination_header(brews, navigator, "#brew-list") %}
+ {{ table::pagination_header(brews, navigator, "#brew-list") }}
{% if brews.has_next() %}
diff --git a/templates/partials/lists/cafe_list.html b/templates/partials/lists/cafe_list.html
index bc864a3..fb5d9b6 100644
--- a/templates/partials/lists/cafe_list.html
+++ b/templates/partials/lists/cafe_list.html
@@ -18,15 +18,15 @@
- {% call table::search_header(navigator, "#cafe-list") %}
+ {{ table::search_header(navigator, "#cafe-list") }}
- {% call table::sortable_header("Added", "created-at", navigator, "#cafe-list") %}
- {% call table::sortable_header("Name", "name", navigator, "#cafe-list") %}
- {% call table::sortable_header("City", "city", navigator, "#cafe-list") %}
- {% call table::sortable_header("Country", "country", navigator, "#cafe-list") %}
+ {{ table::sortable_header("Added", "created-at", navigator, "#cafe-list") }}
+ {{ table::sortable_header("Name", "name", navigator, "#cafe-list") }}
+ {{ table::sortable_header("City", "city", navigator, "#cafe-list") }}
+ {{ table::sortable_header("Country", "country", navigator, "#cafe-list") }}
| Actions |
@@ -56,19 +56,19 @@
@@ -77,8 +77,8 @@
@@ -87,19 +87,19 @@
@@ -112,7 +112,7 @@
{% if cafes.items.is_empty() %}
No cafes match your search.
{% endif %}
- {% call table::pagination_header(cafes, navigator, "#cafe-list") %}
+ {{ table::pagination_header(cafes, navigator, "#cafe-list") }}
{% if cafes.has_next() %}
{% endif %}
diff --git a/templates/partials/lists/cup_list.html b/templates/partials/lists/cup_list.html
index b3c3bae..6d14eed 100644
--- a/templates/partials/lists/cup_list.html
+++ b/templates/partials/lists/cup_list.html
@@ -18,16 +18,16 @@
- {% call table::search_header(navigator, "#cup-list") %}
+ {{ table::search_header(navigator, "#cup-list") }}
- {% call table::sortable_header("Added", "created-at", navigator, "#cup-list") %}
- {% call table::sortable_header("Roast", "roast", navigator, "#cup-list") %}
- {% call table::sortable_header("Roaster", "roaster", navigator, "#cup-list") %}
- {% call table::sortable_header("Cafe", "cafe", navigator, "#cup-list") %}
- {% call table::sortable_header("City", "city", navigator, "#cup-list") %}
+ {{ table::sortable_header("Added", "created-at", navigator, "#cup-list") }}
+ {{ table::sortable_header("Roast", "roast", navigator, "#cup-list") }}
+ {{ table::sortable_header("Roaster", "roaster", navigator, "#cup-list") }}
+ {{ table::sortable_header("Cafe", "cafe", navigator, "#cup-list") }}
+ {{ table::sortable_header("City", "city", navigator, "#cup-list") }}
{% if is_authenticated %}
| Actions |
{% endif %}
@@ -61,7 +61,7 @@
@@ -69,8 +69,8 @@
{% endif %}
@@ -82,7 +82,7 @@
@@ -95,7 +95,7 @@
{% if cups.items.is_empty() %}
No cups match your search.
{% endif %}
- {% call table::pagination_header(cups, navigator, "#cup-list") %}
+ {{ table::pagination_header(cups, navigator, "#cup-list") }}
{% if cups.has_next() %}
{% endif %}
diff --git a/templates/partials/lists/gear_list.html b/templates/partials/lists/gear_list.html
index 68ae83c..b95f9dd 100644
--- a/templates/partials/lists/gear_list.html
+++ b/templates/partials/lists/gear_list.html
@@ -18,16 +18,16 @@
- {% call table::search_header(navigator, "#gear-list") %}
+ {{ table::search_header(navigator, "#gear-list") }}
- {% call table::sortable_header("Added", "created-at", navigator, "#gear-list") %}
- {% call table::sortable_header("Category", "category", navigator, "#gear-list") %}
- {% call table::sortable_header("Make", "make", navigator, "#gear-list") %}
- {% call table::sortable_header("Model", "model", navigator, "#gear-list") %}
+ {{ table::sortable_header("Added", "created-at", navigator, "#gear-list") }}
+ {{ table::sortable_header("Category", "category", navigator, "#gear-list") }}
+ {{ table::sortable_header("Make", "make", navigator, "#gear-list") }}
+ {{ table::sortable_header("Model", "model", navigator, "#gear-list") }}
{% if is_authenticated %}
| Actions |
{% endif %}
@@ -58,7 +58,7 @@
@@ -66,8 +66,8 @@
{% endif %}
@@ -79,7 +79,7 @@
@@ -92,7 +92,7 @@
{% if gear.items.is_empty() %}
No gear matches your search.
{% endif %}
- {% call table::pagination_header(gear, navigator, "#gear-list") %}
+ {{ table::pagination_header(gear, navigator, "#gear-list") }}
{% if gear.has_next() %}
{% endif %}
diff --git a/templates/partials/lists/roast_list.html b/templates/partials/lists/roast_list.html
index 901bce5..b1cd263 100644
--- a/templates/partials/lists/roast_list.html
+++ b/templates/partials/lists/roast_list.html
@@ -18,14 +18,14 @@
- {% call table::search_header(navigator, "#roast-list") %}
+ {{ table::search_header(navigator, "#roast-list") }}
- {% call table::sortable_header("Added", "created-at", navigator, "#roast-list") %}
- {% call table::sortable_header("Roast", "name", navigator, "#roast-list") %}
- {% call table::sortable_header("Origin", "origin", navigator, "#roast-list") %}
+ {{ table::sortable_header("Added", "created-at", navigator, "#roast-list") }}
+ {{ table::sortable_header("Roast", "name", navigator, "#roast-list") }}
+ {{ table::sortable_header("Origin", "origin", navigator, "#roast-list") }}
| Tasting Notes |
{% if is_authenticated %}
Actions |
@@ -79,7 +79,7 @@
@@ -87,8 +87,8 @@
{% endif %}
@@ -100,7 +100,7 @@
@@ -113,7 +113,7 @@
{% if roasts.items.is_empty() %}
No roasts match your search.
{% endif %}
- {% call table::pagination_header(roasts, navigator, "#roast-list") %}
+ {{ table::pagination_header(roasts, navigator, "#roast-list") }}
{% if roasts.has_next() %}
{% endif %}
diff --git a/templates/partials/lists/roaster_list.html b/templates/partials/lists/roaster_list.html
index 0df500b..992eeb4 100644
--- a/templates/partials/lists/roaster_list.html
+++ b/templates/partials/lists/roaster_list.html
@@ -18,15 +18,15 @@
- {% call table::search_header(navigator, "#roaster-list") %}
+ {{ table::search_header(navigator, "#roaster-list") }}
- {% call table::sortable_header("Added", "created-at", navigator, "#roaster-list") %}
- {% call table::sortable_header("Name", "name", navigator, "#roaster-list") %}
- {% call table::sortable_header("Country", "country", navigator, "#roaster-list") %}
- {% call table::sortable_header("City", "city", navigator, "#roaster-list") %}
+ {{ table::sortable_header("Added", "created-at", navigator, "#roaster-list") }}
+ {{ table::sortable_header("Name", "name", navigator, "#roaster-list") }}
+ {{ table::sortable_header("Country", "country", navigator, "#roaster-list") }}
+ {{ table::sortable_header("City", "city", navigator, "#roaster-list") }}
| Actions |
@@ -60,14 +60,14 @@
{% if roaster.has_homepage %}
- {% call icons::external_link("h-4 w-4") %} Homepage
+ {{ icons::external_link("h-4 w-4") }} Homepage
{% endif %}
{% if is_authenticated %}
{% endif %}
@@ -78,8 +78,8 @@
{% endif %}
@@ -91,14 +91,14 @@
{% if roaster.has_homepage %}
- {% call icons::external_link("h-4 w-4") %} Homepage
+ {{ icons::external_link("h-4 w-4") }} Homepage
{% endif %}
{% if is_authenticated %}
{% endif %}
@@ -112,7 +112,7 @@
{% if roasters.items.is_empty() %}
No roasters match your search.
{% endif %}
- {% call table::pagination_header(roasters, navigator, "#roaster-list") %}
+ {{ table::pagination_header(roasters, navigator, "#roaster-list") }}
{% if roasters.has_next() %}
{% endif %}
diff --git a/templates/partials/location_search.html b/templates/partials/location_search.html
index 348f2d4..6f8991d 100644
--- a/templates/partials/location_search.html
+++ b/templates/partials/location_search.html
@@ -43,8 +43,8 @@ const locateUser = (triggerEl) => {
data-attr:disabled="$_locating || $_locationFound"
aria-label="Use my location"
>
- {% call icons::location("h-5 w-5") %}
- {% call icons::spinner("h-5 w-5") %}
+ {{ icons::location("h-5 w-5") }}
+ {{ icons::spinner("h-5 w-5") }}
B{rew}log
- {% call icons::spinner("h-5 w-5") %}
+ {{ icons::spinner("h-5 w-5") }}
{{ spinner_text }}
diff --git a/templates/partials/tab_bar.html b/templates/partials/tab_bar.html
index d681a52..3605477 100644
--- a/templates/partials/tab_bar.html
+++ b/templates/partials/tab_bar.html
@@ -26,8 +26,8 @@
{{ tab.label }}
{% endfor %}
- {% call icons::chevron_down("h-5 w-5") %}
- {% call icons::chevron_up("h-5 w-5") %}
+ {{ icons::chevron_down("h-5 w-5") }}
+ {{ icons::chevron_up("h-5 w-5") }}
{% for tab in tabs %}
diff --git a/templates/partials/timeline_month.html b/templates/partials/timeline_month.html
index 25dd3c1..0f0ea96 100644
--- a/templates/partials/timeline_month.html
+++ b/templates/partials/timeline_month.html
@@ -2,7 +2,7 @@
{{ month.heading }}
{% for event in month.events %}
@@ -33,7 +33,7 @@
rel="noreferrer noopener"
aria-label="Open external link"
>
- {% call icons::external_link("h-4 w-4") %}
+ {{ icons::external_link("h-4 w-4") }}
Open external link
{% endif %}
@@ -59,7 +59,7 @@
title="Brew again"
>
Brew again
- {% call icons::refresh("h-4 w-4") %}
+ {{ icons::refresh("h-4 w-4") }}
{% endif %}
@@ -74,7 +74,7 @@
{{ detail.value }}
- {% call icons::map("h-4 w-4") %}
+ {{ icons::map("h-4 w-4") }}
{% else if let Some(url) = detail.link %}
diff --git a/tests/server/timeline.rs b/tests/server/timeline.rs
index 039c5ab..0da3b02 100644
--- a/tests/server/timeline.rs
+++ b/tests/server/timeline.rs
@@ -258,7 +258,7 @@ async fn timeline_page_signals_more_results_when_over_page_size() {
assert!(
body.contains(
- "data-next-url=\"/timeline?page=2&page_size=5&sort=occurred-at&dir=desc\""
+ "data-next-url=\"/timeline?page=2&page_size=5&sort=occurred-at&dir=desc\""
),
"Expected loader next-page URL missing from timeline HTML:\n{}",
body