brewlog/templates/partials/scan_input.html
Jon Seager 81308fdef2
style(ui): restyle cards, buttons, and icons for consistency
- 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
2026-02-07 21:42:38 +00:00

25 lines
1.1 KiB
HTML

{% import "partials/icons.html" as icons %}
{% macro scan_input(form_id, image_input_id, extracting_signal, error_signal, placeholder, spinner_text) %}
<input type="hidden" name="image" id="{{ image_input_id }}" />
<div data-show="!{{ extracting_signal }}" class="flex items-center gap-2">
<brew-photo-capture target-input="{{ image_input_id }}" target-form="{{ form_id }}"
class="shrink-0 inline-flex items-center justify-center rounded-md border p-2.5 text-accent transition hover:bg-surface-alt cursor-pointer"
aria-label="Take Photo"
>
{{ icons::camera("h-5 w-5") }}
</brew-photo-capture>
<span class="text-xs text-text-muted">or</span>
<input
type="text"
name="prompt"
class="input-field w-full"
placeholder="{{ placeholder }}"
/>
</div>
<div data-show="{{ extracting_signal }}" style="display:none" class="flex items-center gap-3 text-sm text-accent">
{{ icons::spinner("h-5 w-5") }}
{{ spinner_text }}
</div>
<p data-show="{{ error_signal }}" data-text="{{ error_signal }}" style="display:none" class="mt-2 text-sm text-red-600"></p>
{% endmacro %}