width of the cards is the same now
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
wrapper in _search.html (it persists across htmx swaps and is shared with the
|
||||
sort + view-toggle row); `_card.html` reads the same `view` to switch its own
|
||||
layout between a vertical card and a horizontal row. #}
|
||||
<div :class="view === 'list' ? 'flex flex-col gap-5' : 'grid grid-cols-2 gap-5 sm:grid-cols-3 xl:grid-cols-4'">
|
||||
{# Fixed-width cards (14rem) — same as the home page. Cards never stretch; the row
|
||||
just fits as many as the width allows. This keeps a card the exact same width on
|
||||
the shop and the home page regardless of how many columns fit. #}
|
||||
<div :class="view === 'list' ? 'flex flex-col gap-5' : 'grid grid-cols-2 gap-5 sm:grid-cols-[repeat(auto-fill,14rem)] sm:justify-center'">
|
||||
{% for product in products %}
|
||||
{% include "shop/_card.html" %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user