-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
96 lines (94 loc) · 9.63 KB
/
admin.html
File metadata and controls
96 lines (94 loc) · 9.63 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Admin Dashboard</title>
@js 'https://unpkg.com/htmx.org@1.9.3'
<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">
<nav class="flex sticky top-0 justify-between items-center w-full bg-white border-b border-gray-200 h-min">
<a href="/" class="">
<div class="p-2 m-2 bg-orange-400 rounded h-min">
<svg class="w-20 h-10" xmlns="http://www.w3.org/2000/svg" width="1307.52" height="646.53" preserveAspectRatio="xMidYMid" version="1.0" viewBox="0 0 980.64 484.9"><path d="M797.1 1.16c-106.23 6.97-185.54 77.43-206.84 183.8-10.45 51.85-6.03 111.87 11.92 159.83 16.35 43.94 46.62 82.52 83.06 105.83 17.96 11.52 42.6 22.1 63.37 27.33 36.17 9.24 88.82 9.24 127 .13 36.84-8.7 72.48-29.2 98.07-56.4 3.75-4.15 6.96-8.03 6.96-8.7 0-.67-6.43-8.04-14.47-16.35-13.8-14.47-14.6-15-19.96-15-4.28 0-6.83 1.07-11.38 4.69-26.26 20.9-40.06 29.07-59.35 34.83-20.63 6.16-25.46 6.7-56.94 6.7-37.38-.14-46.35-1.88-76.63-15.14-18.22-8.04-44.2-30.82-56.93-49.84-22.38-33.5-32.16-66.45-33.5-112.53-1.47-49.57 8.58-89.5 31.35-124.86 7.77-12.06 30.41-35.23 41.26-42.06 27.2-17.29 51.58-24.39 87.08-25.6 42.74-1.33 71.94 6.97 107.31 30.69 12.86 8.57 15.27 9.78 20.9 9.78 7.77 0 9.24-1.34 23.85-21.7l11.25-15.55-7.23-6.56C941.12 31.17 899.99 11.2 864.09 4.5c-9.24-1.74-48.36-5.1-50.9-4.42-.4 0-7.64.53-16.08 1.07zM0 242.17v237.25h57.74L57.34 292c-.27-103.15-.27-187.42-.27-187.28.13.13 36.84 65.9 81.59 146.29 44.74 80.25 82.92 148.17 84.93 150.71 6.43 8.04 11.12 10.05 24.92 9.92 12.86 0 17.55-1.48 23.04-7.5 1.61-1.61 39.39-69.67 84.13-151.12a59429.07 59429.07 0 0 1 81.46-148.17c.13-.13.13 84-.14 187.15l-.27 187.42H493V5.18l-23.71.13c-30.95.14-36.98.94-41.8 6.03-2.14 2.14-39.92 69.53-84.13 149.91-88.96 161.57-84.94 154.06-90.83 168.4l-4.15 10.45-6.7-15.28c-6.97-15.67-9.78-20.76-112.13-203.09-53.59-95.25-62.7-110.8-66.72-113.2-4.15-2.41-7.5-2.68-33.63-3.22L0 4.91z" /></svg>
</div>
</a>
<div id="rightNav" class="flex relative justify-end items-center">
<details class="sm:hidden group peer-open:invisible">
<summary class="list-none">
<div class="-mt-1 h-10">
<svg class="top-2 m-2 mt-1 w-10 h-10 opacity-100 transition duration-500 transform group-open:rotate-90 group-open:opacity-0" 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="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
<svg class="absolute right-0 top-2 m-2 -mt-1 w-10 h-10 opacity-0 transition duration-500 group-open:rotate-90 group-open:opacity-100" fill="none" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</div>
</summary>
<div class="absolute right-0 z-50 py-8 px-4 mt-3 w-screen h-0 text-black bg-white shadow-xl transition duration-200 ease-in-out transform origin-top scale-50 group-open:h-max group-open:scale-100">
<ul class="flex flex-col gap-2 px-4">
<li>
<a href="/shop" class="flex items-center text-orange-400"
>Order Now<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ml-1.5 w-5 h-5">
<path d="M5 12h14"></path>
<path d="m12 5 7 7-7 7"></path></svg
></a>
</li>
<li class="my-3 w-full h-px bg-stone-200"></li>
<li><a href="#">Blog</a></li>
<li class="my-3 w-full h-px bg-stone-200"></li>
<li><a href="#">About Us</a></li>
</ul>
</div>
</details>
<div class="hidden p-2 sm:block">
<ul class="flex gap-10 items-center">
<li><a href="#">Blog</a></li>
<li><a href="#">About Us</a></li>
<a href="/shop" class="flex items-center py-2 px-4 text-white bg-orange-400 rounded-full"
>Order Now<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="ml-1.5 w-5 h-5">
<path d="M5 12h14"></path>
<path d="m12 5 7 7-7 7"></path></svg
></a>
</ul>
</div>
</div>
</nav>
<div class="flex flex-col gap-4 items-center mt-4 w-screen mb-4">
<h1 class="text-4xl font-bold sm:text-5xl">Admin Dashboard</h1>
<div id="table_wrapper" class="gap-6 flex overflow-scroll flex-col items-start w-11/12 lg:w-2/3">
@if products.len > 0
@include 'table.html'
@include 'analytics.html'
<div id="banner" class="flex flex-col gap-2 w-11/12 md:w-max bg-white rounded-xl shadow-xl mb-10 self-center">
<form hx-post="/banner" hx-swap="outerHTML" hx-target="#result" class="rounded-xl shadow-xl border-gray-300 border flex flex-col gap-4 justify-between p-4 h-full">
<h2 class="whitespace-nowrap text-2xl font-semibold">Update Banner</h2>
<label for="date" class="block text-sm"><span class="font-semibold text-gray-500">Date</span>
<input type="text" name="date" class="block w-full shadow border border-gray-200 px-2 py-1 rounded invalid:border-red-400">
</label>
<label for="banner" class="block text-sm"><span class="font-semibold text-gray-500">New banner message</span>
<input type="text" name="banner" class="block w-full shadow border border-gray-200 px-2 py-1 rounded invalid:border-red-400">
</label>
<button id="result" type="submit" class="flex items-center justify-center gap-2 bg-indigo-500 rounded py-1 px-2 text-white text-center">
Update banner</button>
</form>
@else
<div id="stripe_form" class="flex overflow-hidden flex-col gap-2 w-11/12 md:w-max bg-white rounded-xl shadow self-center">
<form hx-post="/stripe_key" hx-target="#key_error" hx-swap="innerHTML" class="flex flex-col gap-4 justify-between p-4 h-full">
<h2 class="whitespace-nowrap text-2xl font-semibold">Powered by<svg class="inline h-10 fill-indigo-500 pt-4 pl-1 stroke-0"><path d="M32.956 7.925c0-2.313-1.12-4.138-3.261-4.138-2.15 0-3.451 1.825-3.451 4.12 0 2.719 1.535 4.092 3.74 4.092 1.075 0 1.888-.244 2.502-.587V9.605c-.614.307-1.319.497-2.213.497-.876 0-1.653-.307-1.753-1.373h4.418c0-.118.018-.588.018-.804zm-4.463-.859c0-1.02.624-1.445 1.193-1.445.55 0 1.138.424 1.138 1.445h-2.33zM22.756 3.787c-.885 0-1.454.415-1.77.704l-.118-.56H18.88v10.535l2.259-.48.009-2.556c.325.235.804.57 1.6.57 1.616 0 3.089-1.302 3.089-4.166-.01-2.62-1.5-4.047-3.08-4.047zm-.542 6.225c-.533 0-.85-.19-1.066-.425l-.009-3.352c.235-.262.56-.443 1.075-.443.822 0 1.391.922 1.391 2.105 0 1.211-.56 2.115-1.39 2.115zM18.04 2.766V.932l-2.268.479v1.843zM15.772 3.94h2.268v7.905h-2.268zM13.342 4.609l-.144-.669h-1.952v7.906h2.259V6.488c.533-.696 1.436-.57 1.716-.47V3.94c-.289-.108-1.346-.307-1.879.669zM8.825 1.98l-2.205.47-.009 7.236c0 1.337 1.003 2.322 2.34 2.322.741 0 1.283-.135 1.581-.298V9.876c-.289.117-1.716.533-1.716-.804V5.865h1.716V3.94H8.816l.009-1.96zM2.718 6.235c0-.352.289-.488.767-.488.687 0 1.554.208 2.241.578V4.202a5.958 5.958 0 0 0-2.24-.415c-1.835 0-3.054.957-3.054 2.557 0 2.493 3.433 2.096 3.433 3.17 0 .416-.361.552-.867.552-.75 0-1.708-.307-2.467-.723v2.15c.84.362 1.69.515 2.467.515 1.879 0 3.17-.93 3.17-2.548-.008-2.692-3.45-2.213-3.45-3.225z"></path></svg></h2>
<label for="stripe_key" class="block text-sm"><span class="font-semibold text-gray-500">Stripe Secret Key</span>
<input type="text" name="stripe_key" class="block w-full shadow border border-gray-200 px-2 py-1 rounded invalid:border-red-400" value="sk_live_" placeholder="sk_live_... " required minlength="107" pattern="^(sk_live_.*|)$">
<span id="key_error" class="text-red-400 pt-1"></span>
</label>
<button class="flex items-center justify-center gap-2 bg-indigo-500 rounded py-1 px-2 text-white text-center">
@include 'stripe_logo.html'
| Populate Product Information</button>
</form>
</div>
@end
</div>
</div>
</body>
</html>