-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
307 lines (281 loc) · 13.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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="style.css">
<!-- htmx script -->
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<!-- TailwindCss -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
prefix: "tw-",
corePlugins: {
preflight: false,
}
}
</script>
<title>Totaro - The Lab</title>
</head>
<body>
<div class="top"></div>
<div><header id="header">
<div class="navbar">
<div class="logo"><a href="https://totaro.github.io/">Totaro</a></div>
<ul class="links">
<li><a href="https://totaro.github.io/">Home</a></li>
<li><a href="https://totaro.github.io/lab/">The Lab</a></li>
<li><a href="https://totaro.github.io/motions/">Motions</a></li>
<li><a href="https://totaro.github.io/weather/">Weather</a></li>
<li><a href="https://totaro.github.io/dictionary/">Dictionary</a></li>
<li><a href="https://totaro.github.io/randomphotogallery/">Photo Gallery</a></li>
<li><a href="https://totaro.github.io/digitalclock/">Digital Clock</a></li>
<li><a href="https://totaro.github.io/reactbase/">Todo List</a></li>
</ul>
<div class="toggle_btn">
<i class="fa-solid fa-bars"></i>
</div>
</div>
<div class="dropdown_menu">
<li><a href="https://totaro.github.io/">Home</a></li>
<li><a href="https://totaro.github.io/lab/">The Lab</a></li>
<li><a href="https://totaro.github.io/motions/">Motions</a></li>
<li><a href="https://totaro.github.io/weather/">Weather</a></li>
<li><a href="https://totaro.github.io/dictionary/">Dictionary</a></li>
<li><a href="https://totaro.github.io/randomphotogallery/">Photo Gallery</a></li>
<li><a href="https://totaro.github.io/digitalclock/">Digital Clock</a></li>
<li><a href="https://totaro.github.io/reactbase/">Todo List</a></li>
</div>
</header>
</div>
<div>
</div>
</div>
<main class="main"><section id="hero"><div class="labheader"><h1 style="font-size: 3rem;">The Lab</h1><div>The Lab is the place where I play with new miscellaneous things with Html/Css/JavaScript/Htmx/Angular /Tailwind CSS/ Svelte/ChatGPT/OpenAI. Now includes Drag & Drop, Dom Nodes, Local Storage, Htmx Get Request, Angular e-commerse site, Tailwind CSS, Svelte demo App and Javascript ChatGPT Clone.</div></div>
</section></main>
<div class="wrapper">
<div class="container">
<h1 class="heading">
<div class="dom-row" style="margin-bottom: 1rem;">
<div>Javascript ChatGPT Clone</div>
<div><h6></h6></div>
</div></h1>
<div id="htmxdoms">
<div class="htmx-container">
<div class="htmx-item">ChatGPT clone using JavaScript, HTML, CSS and OpenAI API with sidebar that contains previous chat message history and new chat function.
</div>
<div class="angular-item">
<a href="https://github.com/totaro/javascript-chatgpt-clone" target="_blank"><img src="img/chatgpt2.png" class="responsive-img" alt="Javascript ChatGPT Clone"></a>
</div>
<div class="angular-item">
<button
class="htmxbutton">
<a href="https://github.com/totaro/javascript-chatgpt-clone" target="_blank">Go to App <i class="fa-solid fa-arrow-up-right-from-square"></i></a></button>
</div>
</div>
</div>
</div>
<div class="container">
<h1 class="heading">
<div class="drop-row" style="margin-bottom: 1rem;">
<div>Drag & Drop</div>
<div><h6>(Mouse Events)</h6></div>
</div></h1>
<div id="drag-and-drop">
<div class="draggable items">
<div class="draggable item move" draggable="true"><i class="fa-solid fa-grip-vertical"></i> Move Me!</div>
<div class="draggable item copy" draggable="true"><i class="fa-solid fa-grip-vertical"></i> Copy Me!</div>
</div>
<div class="droppable">
<div class="drop-row"><div><h3>Drop Here</h3></div> <div><button class="clear">Clear</button></div></div>
</div>
</div>
</div>
<div class="container">
<h1 class="heading">
<div class="dom-row" style="margin-bottom: 1rem;">
<div>Dom Nodes</div>
<div><h6></h6></div>
</div></h1>
<div id="dom-node">
<div class="buttons">
<div >
<button id="btn-createnode" class="nodebutton">Create node</button>
<button id="btn-insertnode" class="nodebutton">Insert node before</button>
<button id="btn-insertafternode" class="nodebutton">Insert node after</button>
<button id="btn-replacenode" class="nodebutton">Replace node</button>
<input type="text" placeholder="Insert link" class="linkinput">
<input type="text" placeholder="Insert linktext" class="textinput">
<p class="templink hide"></p><p class="temptext hide"></p>
<button id="btn-newlink" class="nodebutton">New link node</button>
<button id="btn-fragment" class="nodebutton">New node fragment</button>
</div>
</div>
<div class="nodes">
<div class="domcontent post">
<p>Node 1</p>
<p class="target inserted">Node 2: Target </p>
<p>Node 3</p>
</div>
</div>
</div>
</div>
<div class="container">
<h1 class="heading">
<div class="dom-row" style="margin-bottom: 1rem;">
<div>Local Storage</div>
<div><h6></h6></div>
</div></h1>
<div id="dom-node">
<div class="storagesave">
<div>
<div class="store"><input type="text" placeholder="Insert data" class="storageinput"></div>
<div class="store"><p class="storagetext hide"></p></div>
<div class="store"><button class="savestorage">Save To Storage</button></div>
<div class="store storagesaved hide"></div>
</div>
</div>
<div class="storageget">
<div>
<div class="resultfound hide"><div class="datafound"></div></div>
<div class="result"><div>Data:</div><div class="storageddata"></div></div>
<div class="result"><div>Time:</div><div class="storagedtimestamp"></div></div>
<div class="result"><div><button class="getstorage">Get Storage Data</button></div></div>
<div class="result"><div><button class="removestorage">Remove Storage Data</button></div></div>
</div>
</div>
</div>
</div>
<div class="container">
<h1 class="heading">
<div class="dom-row" style="margin-bottom: 1rem;">
<div>Htmx get request</div>
<div><h6></h6></div>
</div></h1>
<div id="htmxdoms">
<div class="htmx-container">
<div class="htmx-item">
<button
class="htmxbutton"
hx-get="https://v2.jokeapi.dev/joke/Any?format=txt&safe-mode&type=single"
hx-indicator=".loader"
hx-swap="innerHTML transition:true"
hx-target="next p">Get Jokes</button>
</div>
<div class="htmx-item">
<input
class="htmx-input"
type="text"
placeholder="Enter a keyword..."
hx-get="https://v2.jokeapi.dev/joke/Any?format=txt&safe-mode"
hx-target="#htmx-target-container"
hx-trigger="keyup delay:500ms"
hx-indicator=".loader"
hx-swap="innerHTML transition:true"
name="contains"/>
</div>
<div class="htmx-item">
<span class="loader htmx-indicator"></span>
</div>
<div class="htmx-item">
<p id="htmx-target-container" class="bounce-it htmxtarget">Click the button or enter keyword to load a joke...</p>
</div>
</div>
</div>
</div>
<div class="container">
<h1 class="heading">
<div class="dom-row" style="margin-bottom: 1rem;">
<div>Angular e-commerse site</div>
<div><h6></h6></div>
</div></h1>
<div id="htmxdoms">
<div class="htmx-container">
<div class="htmx-item">
Angular e-commerce demo site with a catalog, shopping cart, and check-out form.
</div>
<div class="angular-item">
<a href="https://totaro.github.io/angular-ecom/" target="_blank"><img src="img/angular.png" class="responsive-img" alt="Angular e-commerse site"></a>
</div>
<div class="angular-item">
<button
class="htmxbutton">
<a href="https://totaro.github.io/angular-ecom/" target="_blank">Go to App <i class="fa-solid fa-arrow-up-right-from-square"></i></a></button>
</div>
</div>
</div>
</div>
<div class="container">
<h1 class="heading">
<div class="dom-row" style="margin-bottom: 1rem;">
<div>Tailwind CSS</div>
<div><h6></h6></div>
</div></h1>
<div id="htmxdoms">
<div class="htmx-container">
<div class="htmx-item" >
Tailwind CSS is an open source CSS framework. Here I play with Tailwind CSS (cdn), for example: responsive grid/images and image/text/button effects.
</div>
<div class="tw-mt-6 tw-grid tw-grid-cols-1 sm:tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-2 tw-gap-4 tw-p-2">
<div class="tw-relative">
<img class="tw-h-auto tw-max-w-full tw-h-64 tw-w-full tw-rounded-md tw-transition-all tw-duration-300 tw-ease-in-out tw-rounded-lg tw-cursor-pointer tw-filter tw-grayscale hover:tw-grayscale-0 tw-shadow-md hover:tw-shadow-mg hover:tw-shadow-rose-400/40" src="https://images.unsplash.com/photo-1542902093-d55926049754?q=80&w=350&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="NeonCity I">
<div class="tw-absolute tw-bottom-2 tw-left-2">
<button
class="tw-inset-0 tw-border tw-border-indigo-500 tw-bg-indigo-500 tw-text-white tw-rounded-md tw-px-2 tw-py-2 tw-m-1 tw-transition tw-duration-500 tw-ease tw-select-none hover:tw-bg-indigo-600 focus:tw-outline-none focus:tw-shadow-outline tw-text-sm hover:tw-text-rose-400 tw-cursor-pointer">
NeonCity I
</button>
</div>
</div>
<div class="tw-relative">
<img class="tw-h-auto tw-max-w-full tw-h-64 tw-w-full tw-rounded-md tw-transition-all tw-duration-300 tw-ease-in-out tw-rounded-lg tw-cursor-pointer tw-filter tw-grayscale hover:tw-grayscale-0 tw-shadow-md hover:tw-shadow-mg hover:tw-shadow-rose-400/40" src="https://images.unsplash.com/photo-1586165877141-3dbcfc059283?w=350&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8bmlnaHQlMjBjaXR5fGVufDB8fDB8fHww" alt="NeonCity II">
<div class="tw-absolute tw-bottom-2 tw-left-2">
<button
class="tw-inset-0 tw-border tw-border-indigo-500 tw-bg-indigo-500 tw-text-white tw-rounded-md tw-px-2 tw-py-2 tw-m-1 tw-transition tw-duration-500 tw-ease tw-select-none hover:tw-bg-indigo-600 focus:tw-outline-none focus:tw-shadow-outline tw-text-sm hover:tw-text-rose-400 tw-cursor-pointer">
NeonCity II
</button>
</div>
</div>
<div class="tw-relative">
<img class="tw-h-auto tw-max-w-full tw-h-64 tw-w-full tw-rounded-md tw-transition-all tw-duration-300 tw-ease-in-out tw-rounded-lg tw-cursor-pointer tw-filter tw-grayscale hover:tw-grayscale-0 tw-shadow-md hover:tw-shadow-mg hover:tw-shadow-rose-400/40" src="https://images.unsplash.com/photo-1548850174-70a1cf2c5f09?w=350&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8N3x8bmlnaHQlMjBjaXR5fGVufDB8fDB8fHww" alt="NeonCity III">
<div class="tw-absolute tw-bottom-2 tw-left-2">
<button
class="tw-inset-0 tw-border tw-border-indigo-500 tw-bg-indigo-500 tw-text-white tw-rounded-md tw-px-2 tw-py-2 tw-m-1 tw-transition tw-duration-500 tw-ease tw-select-none hover:tw-bg-indigo-600 focus:tw-outline-none focus:tw-shadow-outline tw-text-sm hover:tw-text-rose-400 tw-cursor-pointer">
NeonCity III
</button>
</div>
</div>
</div>
<!-- </div> -->
</div>
</div>
<!-- wrapper -->
</div>
<div class="container">
<h1 class="heading">
<div class="dom-row" style="margin-bottom: 1rem;">
<div>Svelte</div>
<div><h6></h6></div>
</div></h1>
<div id="htmxdoms">
<div class="htmx-container">
<div class="htmx-item">Svelte is a free and open-source component-based front-end software framework.
This is the App where I test basics of Svelte framework.
</div>
<div class="angular-item">
<a href="https://totaro.github.io/svelte/" target="_blank"><img src="img/svelte.png" class="responsive-img" alt="Svelte App"></a>
</div>
<div class="angular-item">
<button
class="htmxbutton">
<a href="https://totaro.github.io/svelte/" target="_blank">Go to App <i class="fa-solid fa-arrow-up-right-from-square"></i></a></button>
</div>
</div>
</div>
</div>
<script src="js/index.js"></script>
<script src="js/dom.js"></script>
<script src="js/localstorage.js"></script>
</body>
</html>