width of the cards is the same now
This commit is contained in:
@@ -66,7 +66,10 @@
|
||||
</div>
|
||||
<div x-data="{ view: localStorage.getItem('shopView') === 'grid' ? 'grid' : 'list' }"
|
||||
x-init="$watch('view', v => localStorage.setItem('shopView', v))"
|
||||
:class="view === 'list' ? 'flex flex-col gap-4' : 'grid grid-cols-2 gap-4 sm:grid-cols-3'">
|
||||
{# Fixed-width cards (14rem), identical to the shop. Cards never stretch;
|
||||
the column just fits as many as it can (home fewer, shop more), so a
|
||||
card is the exact same width on both pages regardless of column count. #}
|
||||
: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