first commit

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-16 20:52:15 +03:00
parent 3419d90e61
commit 323e0a2926
67 changed files with 1723 additions and 3077 deletions
+43
View File
@@ -0,0 +1,43 @@
<%- include('partials/layout-start') %>
<h1>Оформление заказа</h1>
<% if (error) { %><p class="alert alert--error"><%= error %></p><% } %>
<div class="checkout-layout">
<form action="/checkout" method="post" class="form card">
<h2>Данные доставки</h2>
<label class="label">
Имя
<input type="text" name="name" class="input" required value="<%= user ? user.name : '' %>">
</label>
<label class="label">
Email
<input type="email" name="email" class="input" required value="<%= user ? user.email : '' %>">
</label>
<label class="label">
Телефон
<input type="tel" name="phone" class="input" placeholder="+7 …">
</label>
<label class="label">
Адрес доставки
<textarea name="address" class="input" rows="3" required placeholder="Город, улица, дом, квартира"></textarea>
</label>
<button type="submit" class="btn btn--primary btn--lg btn--block">Подтвердить заказ</button>
</form>
<aside class="checkout-summary card">
<h2>Ваш заказ</h2>
<ul class="checkout-list">
<% items.forEach(item => { %>
<li>
<span><%= item.name %> × <%= item.quantity %></span>
<span><%= formatPrice(item.line_total) %></span>
</li>
<% }) %>
</ul>
<p class="checkout-total">Итого: <strong><%= formatPrice(total) %></strong></p>
</aside>
</div>
<%- include('partials/layout-end') %>