-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout.html
73 lines (73 loc) · 5.73 KB
/
checkout.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title>Checkout</title>
@js '/htmx.min.js'
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="output.css" type="text/css" media="screen" />
</head>
<body class="grainy">
<div class="flex flex-col items-center mb-20 w-full h-full">
@include 'nav.html'
<form class="flex flex-col gap-4 justify-center py-4 w-11/12 lg:w-1/3" action="/begin_checkout" method="post">
<div id="cart_list" class="flex flex-col gap-4 bg-white rounded-lg shadow-lg p-4">
<span class="text-center text-stone-400 p-4 hidden last:block">Your shopping cart is empty</span>
@include 'cart_item.html'
</div>
<span class="flex justify-between gap-1">
<a hx-boost="true" href="/shop" class="rounded-lg bg-red-400 px-4 py-2 w-max self-start flex items-center gap-1 cursor-pointer hover:bg-red-300 hover:shadow-xl">
<svg class="h-6 w-6 inline" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" stroke-linecap="round" stroke-linejoin="round"></path> </svg>
<span class="inline w-max">Back to shopping</span>
</a>
<button type="submit" class="rounded-lg bg-orange-400 px-4 py-2 w-max self-end flex items-center gap-1 hover:bg-orange-300 hover:shadow-xl cursor-pointer">
<span class="inline">Checkout</span>
<svg class="h-6 w-6 inline" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3" stroke-linecap="round" stroke-linejoin="round"></path> </svg>
</button>
</span>
<div class="flex flex-col">
<label for="zip" id="zip" class="text-xs sm:text-sm text-gray-600 flex w-full items-center gap-2 justify-between">
Enter your 5 digit zip code to see if you qualify for local delivery
@include 'spinner.html'
<div id="symbol">
</div>
</label>
<input type="tel" name="zip" value="" class="rounded py-1 px-2 shadow border border-gray-200"
hx-post="/zip"
hx-trigger="keyup changed delay:500ms, zip"
hx-target="#delivery_method"
hx-indicator=".htmx-indicator">
</div>
<fieldset id="delivery_method" class="flex h-max flex-col gap-4 rounded-lg border border-solid border-gray-300 bg-white text-sm shadow-xl">
<label class="flex cursor-pointer items-center px-4 gap-4 pt-4" for="ship">
<input required type="radio" class="peer mt-1 h-5 w-5 rounded-full border border-solid bg-white" id="ship" name="delivery_method" value="shipping"/>
<div class="peer-checked:stroke-orange-400 stroke-gray-700 flex justify-between w-full items-center">
<div>
<p class="font-semibold text-gray-800">Shipping</p>
<p class="text-xs text-gray-700">UPSP/UPS</p>
</div>
<svg class="inline h-6 w-6 stroke-inherit stroke-2" aria-hidden="true" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M8.25 18.75a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 01-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 00-3.213-9.193 2.056 2.056 0 00-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 00-10.026 0 1.106 1.106 0 00-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
</div>
</label>
<hr>
<label class="flex cursor-pointer items-center px-4 gap-4 pb-4" for="local">
<input required type="radio" class="peer mt-1 h-5 w-5 rounded-full border border-solid bg-white" id="local" name="delivery_method" value="local"/>
<div class="peer-checked:stroke-orange-400 stroke-gray-700 flex justify-between w-full items-center">
<div>
<p class="font-semibold text-gray-800">Local Delivery/Pickup</p>
<p class="text-xs text-gray-700">To your doorstep or schedule to meet</p>
</div>
<svg class="inline h-6 w-6 stroke-inherit stroke-2" aria-hidden="true" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
</div>
</label>
</fieldset>
</form>
</div>
</body>
</html>