- Redesign brew cards: replace pill badges with text notes, add full-width Brew Again button with cup icon, adjust card height - Redesign bag cards: move Brew/Close buttons below progress bar, add Close button label, reduce card height - Restyle account page buttons (Sign Out, Restore, Reset, Cancel) to use consistent bordered-accent pattern - Replace thin logout icon with Font Awesome person-running SVG - Update homepage stats labels and quick action buttons to text-sm - Add empty state placeholders for brews, bags, and activity sections - Enlarge logo click target, swap theme toggle icons, add font-medium to mobile tab selector - Remove small-caps from scan input "or" labels
35 lines
1.6 KiB
HTML
35 lines
1.6 KiB
HTML
{% import "partials/icons.html" as icons %}
|
|
{% macro card(bag, is_authenticated) %}
|
|
<div id="bag-card-{{ bag.id }}" class="relative w-[45vw] md:w-[200px] h-[200px] shrink-0 snap-start rounded-lg border bg-surface p-4 flex flex-col">
|
|
<div class="flex-1">
|
|
<span class="block font-semibold text-text truncate">{{ bag.roast_name }}</span>
|
|
<p class="mt-1 text-sm text-text-muted truncate">{{ bag.roaster_name }}</p>
|
|
</div>
|
|
<div class="flex flex-col items-center">
|
|
<div class="w-full">
|
|
<div class="h-2 rounded-full bg-surface-alt overflow-hidden">
|
|
<div class="h-full rounded-full bg-accent" style="width: {{ bag.used_percent }}%"></div>
|
|
</div>
|
|
<p class="mt-1 text-text-muted" style="font-size: 0.7rem">{{ bag.remaining }} / {{ bag.amount }}g</p>
|
|
</div>
|
|
</div>
|
|
{% if is_authenticated %}
|
|
<div class="mt-3 flex items-center gap-2">
|
|
<a href="/add?type=brew&bag_id={{ bag.id }}"
|
|
class="flex-1 inline-flex h-8 items-center justify-center gap-1.5 rounded-md border px-2 text-sm font-medium text-accent transition hover:text-accent-hover hover:bg-surface-alt">
|
|
{{ icons::cup("h-4 w-4") }}
|
|
Brew
|
|
</a>
|
|
<button
|
|
type="button"
|
|
class="flex-1 inline-flex h-8 items-center justify-center gap-1.5 rounded-md border px-2 text-sm font-medium text-text-muted transition hover:text-text hover:bg-surface-alt"
|
|
title="Close Bag"
|
|
onclick="closeBag('{{ bag.id }}', document.getElementById('bag-card-{{ bag.id }}'))"
|
|
>
|
|
{{ icons::x_mark("h-4 w-4") }}
|
|
Close
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|