-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
215 lines (198 loc) · 11.5 KB
/
index.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pluto</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css">
<!-- <script src="App.js"></script> -->
<!-- <link rel="stylesheet" href="style.css"> -->
</head>
<body>
<!-- buying -->
<body class="bg-gray-100">
<nav class="bg-red-600 p-4">
<div class="container mx-auto flex justify-between items-center">
<!-- Logo --> <img src="/img/Pluto-removebg-preview.png" />
<div class="text-white text-lg font-bold">
Pluto
</div>
<div class="center-elements">
<!-- Links -->
<div class="hidden md:flex space-x-4">
<a href="#" class="text-white hover:text-gray-200">ซื้อสมาร์ทโฟน</a>
<a href="#" class="text-white hover:text-gray-200">ขายสมาร์ทโฟน</a>
<a href="#" class="text-white hover:text-gray-200">คำถามที่พบบ่อย</a>
<a href="#" class="text-white hover:text-gray-200">เกี่ยวกับ Pluto</a>
</div>
<!-- Mobile Menu Button -->
<div class="md:hidden flex items-center">
<button id="mobile-menu-button" class="text-white focus:outline-none">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M4 6h16M4 12h16M4 18h16"></path>
</svg>
</button>
</div>
</div>
<!-- Mobile Menu -->
<div id="mobile-menu" class="hidden md:hidden">
<a href="#" class="block text-white px-4 py-2">ซื้อสมาร์ทโฟน</a>
<a href="#" class="block text-white px-4 py-2">ขายสมาร์ทโฟน</a>
<a href="#" class="block text-white px-4 py-2">คำถามที่พบบ่อย</a>
<a href="#" class="block text-white px-4 py-2">เกี่ยวกับ Pluto</a>
</div>
</nav>
<script>
// JavaScript to handle mobile menu toggle
document.getElementById('mobile-menu-button').addEventListener('click', function () {
var mobileMenu = document.getElementById('mobile-menu');
if (mobileMenu.classList.contains('hidden')) {
mobileMenu.classList.remove('hidden');
} else {
mobileMenu.classList.add('hidden');
}
});
</script>
</body>
<body class="bg-gray-100">
<div class="container mx-auto p-4">
<h1 class="text-2xl font-bold mb-4">Second-Hand Smartphone Store</h1>
<div id="smartphone-list" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-4">
<!-- Smartphone items will be appended here -->
</div>
<div class="bg-white p-4 rounded shadow-md">
<h2 class="text-xl font-bold mb-4">Add a New Smartphone</h2>
<form id="add-smartphone-form">
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2">Model:</label>
<input type="text" id="model"
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
required>
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2">Price:</label>
<input type="number" id="price"
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
required>
</div>
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2">Description:</label>
<textarea id="description"
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
required></textarea>
</div>
<button type="submit"
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">Add
Smartphone</button>
</form>
</div>
</div>
<!-- Buy Modal -->
<div id="buyModal" class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 hidden">
<div class="bg-white p-4 rounded shadow-md w-full max-w-md">
<h2 class="text-xl font-bold mb-4">Confirm Purchase</h2>
<p id="buyModalText" class="mb-4"></p>
<div class="flex justify-end">
<button id="cancelBuyButton"
class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded mr-2">Cancel</button>
<button id="confirmBuyButton"
class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded">Buy</button>
</div>
</div>
</div>
<!-- selling -->
<body class="bg-gray-100">
<div class="container mx-auto p-4">
<h1 class="text-2xl font-bold mb-4">Second-Hand Smartphone Store</h1>
<div id="smartphone-list" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-4">
<!-- Smartphone items will be appended here -->
</div>
<div class="flex font-serif">
<div class="flex-none w-52 relative">
<img src="/dogtooth-style-jacket.jpg" alt=""
class="absolute inset-0 w-full h-full object-cover rounded-lg" loading="lazy" />
</div>
<form class="flex-auto p-6">
<div class="flex flex-wrap items-baseline">
<h1 class="w-full flex-none mb-3 text-2xl leading-none text-slate-900">
DogTooth Style Jacket
</h1>
<div class="flex-auto text-lg font-medium text-slate-500">
$350.00
</div>
<div class="text-xs leading-6 font-medium uppercase text-slate-500">
In stock
</div>
</div>
<div class="flex items-baseline mt-4 mb-6 pb-6 border-b border-slate-200">
<div class="space-x-1 flex text-sm font-medium">
<label>
<input class="sr-only peer" name="size" type="radio" value="xs" checked />
<div
class="w-7 h-7 rounded-full flex items-center justify-center text-slate-500 peer-checked:bg-slate-100 peer-checked:text-slate-900">
XS
</div>
</label>
<label>
<input class="sr-only peer" name="size" type="radio" value="s" />
<div
class="w-7 h-7 rounded-full flex items-center justify-center text-slate-500 peer-checked:bg-slate-100 peer-checked:text-slate-900">
S
</div>
</label>
<label>
<input class="sr-only peer" name="size" type="radio" value="m" />
<div
class="w-7 h-7 rounded-full flex items-center justify-center text-slate-500 peer-checked:bg-slate-100 peer-checked:text-slate-900">
M
</div>
</label>
<label>
<input class="sr-only peer" name="size" type="radio" value="l" />
<div
class="w-7 h-7 rounded-full flex items-center justify-center text-slate-500 peer-checked:bg-slate-100 peer-checked:text-slate-900">
L
</div>
</label>
<label>
<input class="sr-only peer" name="size" type="radio" value="xl" />
<div
class="w-7 h-7 rounded-full flex items-center justify-center text-slate-500 peer-checked:bg-slate-100 peer-checked:text-slate-900">
XL
</div>
</label>
</div>
</div>
<div class="flex space-x-4 mb-5 text-sm font-medium">
<div class="flex-auto flex space-x-4 pr-4">
<button
class="flex-none w-1/2 h-12 uppercase font-medium tracking-wider bg-slate-900 text-white"
type="submit">
Buy now
</button>
<button
class="flex-none w-1/2 h-12 uppercase font-medium tracking-wider border border-slate-200 text-slate-900"
type="button">
Add to bag
</button>
</div>
<button
class="flex-none flex items-center justify-center w-12 h-12 text-slate-300 border border-slate-200"
type="button" aria-label="Like">
<svg width="20" height="20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z" />
</svg>
</button>
</div>
<p class="text-sm text-slate-500">
Free shipping on all continental US orders.
</p>
</form>
</div>
</div>
<script src="App.js"></script>
</body>
</html>