ui: иконки и наглядное отображение цен со скидкой

SVG-иконки в шапке и кнопках, зачёркнутая старая цена и акцент на цене со скидкой в каталоге, корзине и на карточке товара.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-17 14:14:38 +03:00
parent 9b688b2af4
commit 0c2cee410f
7 changed files with 315 additions and 51 deletions
+10 -8
View File
@@ -29,20 +29,22 @@
<% } %>
<a href="/product/<%= item.slug %>"><%= item.name %></a>
</td>
<td>
<% if (item.on_sale) { %>
<span class="price-block__old"><%= formatPrice(item.price_cents) %></span>
<%= formatPrice(item.effective_price_cents) %>
<% } else { %>
<%= formatPrice(item.effective_price_cents) %>
<% } %>
<td class="cart-table__price">
<%- include('partials/product-price', {
product: item,
forceOnSale: item.on_sale,
forceEffective: item.effective_price_cents,
priceSize: 'sm'
}) %>
</td>
<td>
<input type="number" name="items[<%= item.id %>]" value="<%= item.quantity %>" min="0" max="<%= item.stock %>" class="input input--qty">
</td>
<td><%= formatPrice(item.line_total) %></td>
<td>
<button type="submit" formaction="/cart/remove/<%= item.id %>" formmethod="post" class="btn btn--ghost btn--sm" title="Удалить">×</button>
<button type="submit" formaction="/cart/remove/<%= item.id %>" formmethod="post" class="btn btn--ghost btn--sm btn--icon" title="Удалить" aria-label="Удалить">
<%- include('partials/icon', { name: 'trash', iconSize: 16 }) %>
</button>
</td>
</tr>
<% }) %>