Replace ~268 hardcoded text-stone-* classes with theme-aware token utilities (text-text, text-text-secondary, text-text-muted) across all templates and JS components. Adjust dark mode token values to meet WCAG AA contrast ratios on dark surfaces.
29 lines
1.1 KiB
HTML
29 lines
1.1 KiB
HTML
{% import "partials/icons.html" as icons %}
|
|
{% macro card(bag, is_authenticated) %}
|
|
<div id="bag-card-{{ bag.id }}" class="rounded-lg border bg-surface p-4">
|
|
<div class="min-w-0">
|
|
<span class="block truncate font-semibold text-text">{{ bag.roast_name }}</span>
|
|
<p class="truncate text-sm text-text-muted">{{ bag.roaster_name }}</p>
|
|
</div>
|
|
<p class="mt-2 truncate text-sm text-text-secondary">
|
|
<span class="font-medium">{{ bag.remaining }}g</span>
|
|
<span class="text-text-muted">of {{ bag.amount }}g remaining</span>
|
|
</p>
|
|
{% if is_authenticated %}
|
|
<div class="mt-3 pt-3 border-t flex gap-3">
|
|
<a href="/data?type=brews" class="inline-flex items-center gap-1 text-sm font-medium text-accent hover:text-accent-hover">
|
|
{% call icons::plus_circle("h-4 w-4") %}
|
|
Brew
|
|
</a>
|
|
<button
|
|
type="button"
|
|
class="inline-flex items-center gap-1 text-sm font-medium text-text-muted hover:text-text"
|
|
onclick="closeBag('{{ bag.id }}', document.getElementById('bag-card-{{ bag.id }}'))"
|
|
>
|
|
{% call icons::x_circle("h-4 w-4") %}
|
|
Close
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endmacro %}
|