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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="th">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Sawasdee App | สวัสดี</title>
|
| 7 |
+
|
| 8 |
+
<!-- Google Fonts: Khand for headings, Prompt for body -->
|
| 9 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=Khand:wght@300;500;700&family=Prompt:wght@300;400;600&display=swap" rel="stylesheet">
|
| 12 |
+
|
| 13 |
+
<!-- FontAwesome for Icons -->
|
| 14 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 15 |
+
|
| 16 |
+
<style>
|
| 17 |
+
:root {
|
| 18 |
+
--primary-color: #2c3e50;
|
| 19 |
+
--accent-color: #e67e22; /* Thai Orange/Gold vibe */
|
| 20 |
+
--success-color: #27ae60;
|
| 21 |
+
--bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
|
| 22 |
+
--card-shadow: 0 10px 20px rgba(0,0,0,0.1);
|
| 23 |
+
--text-main: #333;
|
| 24 |
+
--text-light: #666;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
* {
|
| 28 |
+
box-sizing: border-box;
|
| 29 |
+
margin: 0;
|
| 30 |
+
padding: 0;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
body {
|
| 34 |
+
font-family: 'Prompt', sans-serif;
|
| 35 |
+
background: var(--bg-gradient);
|
| 36 |
+
color: var(--text-main);
|
| 37 |
+
min-height: 100vh;
|
| 38 |
+
display: flex;
|
| 39 |
+
flex-direction: column;
|
| 40 |
+
align-items: center;
|
| 41 |
+
padding: 20px;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
/* Header & Footer */
|
| 45 |
+
header {
|
| 46 |
+
width: 100%;
|
| 47 |
+
max-width: 1000px;
|
| 48 |
+
display: flex;
|
| 49 |
+
justify-content: space-between;
|
| 50 |
+
align-items: center;
|
| 51 |
+
margin-bottom: 30px;
|
| 52 |
+
padding: 15px;
|
| 53 |
+
background: white;
|
| 54 |
+
border-radius: 15px;
|
| 55 |
+
box-shadow: var(--card-shadow);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.logo {
|
| 59 |
+
display: flex;
|
| 60 |
+
align-items: center;
|
| 61 |
+
gap: 10px;
|
| 62 |
+
color: var(--primary-color);
|
| 63 |
+
font-weight: 700;
|
| 64 |
+
font-size: 1.5rem;
|
| 65 |
+
font-family: 'Khand', sans-serif;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.logo i {
|
| 69 |
+
color: var(--accent-color);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.time-display {
|
| 73 |
+
font-family: 'Khand', sans-serif;
|
| 74 |
+
font-size: 1.2rem;
|
| 75 |
+
color: var(--primary-color);
|
| 76 |
+
font-weight: 500;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
main {
|
| 80 |
+
width: 100%;
|
| 81 |
+
max-width: 1000px;
|
| 82 |
+
display: grid;
|
| 83 |
+
grid-template-columns: 300px 1fr;
|
| 84 |
+
gap: 25px;
|
| 85 |
+
flex-grow: 1;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
/* Sidebar / Profile Section */
|
| 89 |
+
.sidebar {
|
| 90 |
+
display: flex;
|
| 91 |
+
flex-direction: column;
|
| 92 |
+
gap: 25px;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.profile-card {
|
| 96 |
+
background: white;
|
| 97 |
+
padding: 30px;
|
| 98 |
+
border-radius: 20px;
|
| 99 |
+
text-align: center;
|
| 100 |
+
box-shadow: var(--card-shadow);
|
| 101 |
+
transition: transform 0.3s ease;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.profile-card:hover {
|
| 105 |
+
transform: translateY(-5px);
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
.avatar {
|
| 109 |
+
width: 100px;
|
| 110 |
+
height: 100px;
|
| 111 |
+
background: #eee;
|
| 112 |
+
border-radius: 50%;
|
| 113 |
+
margin: 0 auto 15px;
|
| 114 |
+
display: flex;
|
| 115 |
+
align-items: center;
|
| 116 |
+
justify-content: center;
|
| 117 |
+
font-size: 3rem;
|
| 118 |
+
color: var(--accent-color);
|
| 119 |
+
border: 4px solid var(--accent-color);
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.user-info h2 {
|
| 123 |
+
font-family: 'Khand', sans-serif;
|
| 124 |
+
font-size: 1.5rem;
|
| 125 |
+
margin-bottom: 5px;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.user-role {
|
| 129 |
+
color: var(--text-light);
|
| 130 |
+
font-size: 0.9rem;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.quote-box {
|
| 134 |
+
background: #f8f9fa;
|
| 135 |
+
padding: 20px;
|
| 136 |
+
border-radius: 15px;
|
| 137 |
+
border-left: 5px solid var(--accent-color);
|
| 138 |
+
font-style: italic;
|
| 139 |
+
text-align: center;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
.quote-text {
|
| 143 |
+
font-size: 1.1rem;
|
| 144 |
+
line-height: 1.6;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.quote-author {
|
| 148 |
+
margin-top: 10px;
|
| 149 |
+
font-weight: 600;
|
| 150 |
+
color: var(--accent-color);
|
| 151 |
+
font-size: 0.9rem;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
/* Main Content Area */
|
| 155 |
+
.dashboard {
|
| 156 |
+
display: flex;
|
| 157 |
+
flex-direction: column;
|
| 158 |
+
gap: 25px;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.welcome-section {
|
| 162 |
+
background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
|
| 163 |
+
padding: 40px;
|
| 164 |
+
border-radius: 20px;
|
| 165 |
+
color: white;
|
| 166 |
+
text-align: center;
|
| 167 |
+
box-shadow: var(--card-shadow);
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.welcome-section h1 {
|
| 171 |
+
font-family: 'Khand', sans-serif;
|
| 172 |
+
font-size: 3rem;
|
| 173 |
+
margin-bottom: 10px;
|
| 174 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
.welcome-section p {
|
| 178 |
+
font-size: 1.2rem;
|
| 179 |
+
opacity: 0.9;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
/* Grid for Tools/Cards */
|
| 183 |
+
.tools-grid {
|
| 184 |
+
display: grid;
|
| 185 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 186 |
+
gap: 20px;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.card {
|
| 190 |
+
background: white;
|
| 191 |
+
padding: 25px;
|
| 192 |
+
border-radius: 15px;
|
| 193 |
+
box-shadow: var(--card-shadow);
|
| 194 |
+
transition: all 0.3s ease;
|
| 195 |
+
cursor: pointer;
|
| 196 |
+
position: relative;
|
| 197 |
+
overflow: hidden;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
.card:hover {
|
| 201 |
+
transform: translateY(-5px);
|
| 202 |
+
box-shadow: 0 15px 30px rgba(0,0,0,0.15);
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
.card-icon {
|
| 206 |
+
font-size: 2.5rem;
|
| 207 |
+
margin-bottom: 15px;
|
| 208 |
+
color: var(--primary-color);
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
.card h3 {
|
| 212 |
+
font-family: 'Khand', sans-serif;
|
| 213 |
+
margin-bottom: 10px;
|
| 214 |
+
color: var(--primary-color);
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
.card p {
|
| 218 |
+
font-size: 0.95rem;
|
| 219 |
+
color: var(--text-light);
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
/* Specific Card Styles */
|
| 223 |
+
.card.todo-card {
|
| 224 |
+
display: flex;
|
| 225 |
+
flex-direction: column;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
.todo-list {
|
| 229 |
+
list-style: none;
|
| 230 |
+
margin-top: 15px;
|
| 231 |
+
max-height: 150px;
|
| 232 |
+
overflow-y: auto;
|
| 233 |
+
padding-right: 5px;
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
.todo-item {
|
| 237 |
+
display: flex;
|
| 238 |
+
align-items: center;
|
| 239 |
+
padding: 8px 0;
|
| 240 |
+
border-bottom: 1px solid #eee;
|
| 241 |
+
transition: 0.2s;
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
.todo-item:hover {
|
| 245 |
+
background-color: #f9f9f9;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
.todo-item.completed span {
|
| 249 |
+
text-decoration: line-through;
|
| 250 |
+
color: #aaa;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
.todo-item input[type="checkbox"] {
|
| 254 |
+
margin-right: 10px;
|
| 255 |
+
accent-color: var(--success-color);
|
| 256 |
+
width: 18px;
|
| 257 |
+
height: 18px;
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
.todo-item span {
|
| 261 |
+
flex-grow: 1;
|
| 262 |
+
font-size: 0.95rem;
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
.add-todo-group {
|
| 266 |
+
display: flex;
|
| 267 |
+
gap: 10px;
|
| 268 |
+
margin-top: auto;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
input[type="text"] {
|
| 272 |
+
flex-grow: 1;
|
| 273 |
+
padding: 10px;
|
| 274 |
+
border: 1px solid #ddd;
|
| 275 |
+
border-radius: 8px;
|
| 276 |
+
font-family: 'Prompt', sans-serif;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
button.add-btn {
|
| 280 |
+
background-color: var(--success-color);
|
| 281 |
+
color: white;
|
| 282 |
+
border: none;
|
| 283 |
+
padding: 10px 15px;
|
| 284 |
+
border-radius: 8px;
|
| 285 |
+
cursor: pointer;
|
| 286 |
+
transition: 0.2s;
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
button.add-btn:hover {
|
| 290 |
+
background-color: #219150;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
/* Greeting Generator Section */
|
| 294 |
+
.greeting-section {
|
| 295 |
+
background: white;
|
| 296 |
+
padding: 30px;
|
| 297 |
+
border-radius: 20px;
|
| 298 |
+
box-shadow: var(--card-shadow);
|
| 299 |
+
text-align: center;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.greeting-display {
|
| 303 |
+
min-height: 100px;
|
| 304 |
+
display: flex;
|
| 305 |
+
flex-direction: column;
|
| 306 |
+
justify-content: center;
|
| 307 |
+
align-items: center;
|
| 308 |
+
margin-bottom: 20px;
|
| 309 |
+
padding: 20px;
|
| 310 |
+
background: #f8f9fa;
|
| 311 |
+
border-radius: 10px;
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
.greeting-text {
|
| 315 |
+
font-family: 'Khand', sans-serif;
|
| 316 |
+
font-size: 2.5rem;
|
| 317 |
+
color: var(--primary-color);
|
| 318 |
+
margin-bottom: 10px;
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
.greeting-sub {
|
| 322 |
+
color: var(--text-light);
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
.greeting-btn {
|
| 326 |
+
background-color: var(--accent-color);
|
| 327 |
+
color: white;
|
| 328 |
+
border: none;
|
| 329 |
+
padding: 12px 30px;
|
| 330 |
+
font-size: 1.1rem;
|
| 331 |
+
border-radius: 50px;
|
| 332 |
+
cursor: pointer;
|
| 333 |
+
transition: 0.3s;
|
| 334 |
+
box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
.greeting-btn:hover {
|
| 338 |
+
background-color: #d35400;
|
| 339 |
+
transform: scale(1.05);
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
/* Footer */
|
| 343 |
+
footer {
|
| 344 |
+
margin-top: 40px;
|
| 345 |
+
text-align: center;
|
| 346 |
+
width: 100%;
|
| 347 |
+
max-width: 1000px;
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
.footer-content {
|
| 351 |
+
background: white;
|
| 352 |
+
padding: 20px;
|
| 353 |
+
border-radius: 15px;
|
| 354 |
+
box-shadow: var(--card-shadow);
|
| 355 |
+
font-size: 0.9rem;
|
| 356 |
+
color: var(--text-light);
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
.anycoder-link {
|
| 360 |
+
color: var(--primary-color);
|
| 361 |
+
text-decoration: none;
|
| 362 |
+
font-weight: 700;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
.anycoder-link:hover {
|
| 366 |
+
text-decoration: underline;
|
| 367 |
+
}
|
| 368 |
+
|
| 369 |
+
/* Responsive Design */
|
| 370 |
+
@media (max-width: 768px) {
|
| 371 |
+
main {
|
| 372 |
+
grid-template-columns: 1fr;
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
.welcome-section h1 {
|
| 376 |
+
font-size: 2rem;
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
.greeting-text {
|
| 380 |
+
font-size: 1.8rem;
|
| 381 |
+
}
|
| 382 |
+
}
|
| 383 |
+
</style>
|
| 384 |
+
</head>
|
| 385 |
+
<body>
|
| 386 |
+
|
| 387 |
+
<header>
|
| 388 |
+
<div class="logo">
|
| 389 |
+
<i class="fa-solid fa-hand-holding-heart"></i>
|
| 390 |
+
<span>Sawasdee App</span>
|
| 391 |
+
</div>
|
| 392 |
+
<div class="time-display">
|
| 393 |
+
<i class="fa-regular fa-clock"></i> <span id="clock">Loading...</span>
|
| 394 |
+
</div>
|
| 395 |
+
</header>
|
| 396 |
+
|
| 397 |
+
<main>
|
| 398 |
+
<!-- Left Sidebar -->
|
| 399 |
+
<aside class="sidebar">
|
| 400 |
+
<div class="profile-card">
|
| 401 |
+
<div class="avatar">
|
| 402 |
+
<i class="fa-solid fa-user"></i>
|
| 403 |
+
</div>
|
| 404 |
+
<div class="user-info">
|
| 405 |
+
<h2>Korbsak</h2>
|
| 406 |
+
<div class="user-role">App User / สวัสดีครับ</div>
|
| 407 |
+
</div>
|
| 408 |
+
<p style="margin-top: 15px; color: var(--text-light); font-size: 0.9rem;">
|
| 409 |
+
Welcome to your daily dashboard.
|
| 410 |
+
</p>
|
| 411 |
+
</div>
|
| 412 |
+
|
| 413 |
+
<div class="quote-box">
|
| 414 |
+
<div class="quote-text">
|
| 415 |
+
"ความสุขไม่ใช่จุดหมายปลายทาง แต่คือวิธีการเดินทาง"
|
| 416 |
+
</div>
|
| 417 |
+
<div class="quote-author">- ไม่ทราบผู้แต่ง</div>
|
| 418 |
+
</div>
|
| 419 |
+
|
| 420 |
+
<div class="card">
|
| 421 |
+
<i class="fa-solid fa-calendar-days card-icon" style="color: var(--accent-color);"></i>
|
| 422 |
+
<h3>Today's Date</h3>
|
| 423 |
+
<p id="current-date">Loading date...</p>
|
| 424 |
+
</div>
|
| 425 |
+
</aside>
|
| 426 |
+
|
| 427 |
+
<!-- Right Dashboard -->
|
| 428 |
+
<section class="dashboard">
|
| 429 |
+
<div class="welcome-section">
|
| 430 |
+
<h1>สวัสดีครับ! (Sawasdee Krub)</h1>
|
| 431 |
+
<p>A beautiful interface designed for a better digital experience.</p>
|
| 432 |
+
</div>
|
| 433 |
+
|
| 434 |
+
<div class="tools-grid">
|
| 435 |
+
<div class="card">
|
| 436 |
+
<i class="fa-solid fa-bolt card-icon" style="color: #f1c40f;"></i>
|
| 437 |
+
<h3>Quick Tasks</h3>
|
| 438 |
+
<p>Manage your daily activities efficiently.</p>
|
| 439 |
+
</div>
|
| 440 |
+
<div class="card">
|
| 441 |
+
<i class="fa-solid fa-chart-pie card-icon" style="color: #9b59b6;"></i>
|
| 442 |
+
<h3>Analytics</h3>
|
| 443 |
+
<p>Track your productivity and habits.</p>
|
| 444 |
+
</div>
|
| 445 |
+
<div class="card">
|
| 446 |
+
<i class="fa-solid fa-gear card-icon" style="color: #3498db;"></i>
|
| 447 |
+
<h3>Settings</h3>
|
| 448 |
+
<p>Customize your app preferences.</p>
|
| 449 |
+
</div>
|
| 450 |
+
</div>
|
| 451 |
+
|
| 452 |
+
<!-- To-Do List Widget -->
|
| 453 |
+
<div class="card todo-card">
|
| 454 |
+
<div style="display: flex; justify-content: space-between; align-items: center;">
|
| 455 |
+
<h3 style="margin:0; font-family: 'Khand';">My To-Do List</h3>
|
| 456 |
+
<i class="fa-solid fa-list-check" style="color: var(--primary-color);"></i>
|
| 457 |
+
</div>
|
| 458 |
+
<ul class="todo-list" id="todo-list">
|
| 459 |
+
<!-- Items will be added via JS -->
|
| 460 |
+
</ul>
|
| 461 |
+
<div class="add-todo-group">
|
| 462 |
+
<input type="text" id="todo-input" placeholder="Add a new task...">
|
| 463 |
+
<button class="add-btn" onclick="addTodo()"><i class="fa-solid fa-plus"></i></button>
|
| 464 |
+
</div>
|
| 465 |
+
</div>
|
| 466 |
+
|
| 467 |
+
<!-- Greeting Generator Widget -->
|
| 468 |
+
<div class="greeting-section">
|
| 469 |
+
<h3 style="margin-bottom: 15px; font-family: 'Khand';">Thai Greeting Generator</h3>
|
| 470 |
+
<div class="greeting-display">
|
| 471 |
+
<div class="greeting-text" id="greeting-output">สวัสดีครับ (Sawasdee Krub)</div>
|
| 472 |
+
<div class="greeting-sub">Click the button below to greet differently</div>
|
| 473 |
+
</div>
|
| 474 |
+
<button class="greeting-btn" onclick="generateRandomGreeting()">
|
| 475 |
+
<i class="fa-solid fa-rotate-right"></i> New Greeting
|
| 476 |
+
</button>
|
| 477 |
+
</div>
|
| 478 |
+
</section>
|
| 479 |
+
</main>
|
| 480 |
+
|
| 481 |
+
<footer>
|
| 482 |
+
<div class="footer-content">
|
| 483 |
+
© <span id="year"></span> Sawasdee App. All rights reserved. <br>
|
| 484 |
+
Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">anycoder</a>
|
| 485 |
+
</div>
|
| 486 |
+
</footer>
|
| 487 |
+
|
| 488 |
+
<script>
|
| 489 |
+
// 1. Clock & Date Logic
|
| 490 |
+
function updateClock() {
|
| 491 |
+
const now = new Date();
|
| 492 |
+
|
| 493 |
+
// Time
|
| 494 |
+
let hours = now.getHours();
|
| 495 |
+
let minutes = now.getMinutes();
|
| 496 |
+
const ampm = hours >= 12 ? 'PM' : 'AM';
|
| 497 |
+
hours = hours % 12;
|
| 498 |
+
hours = hours ? hours : 12; // the hour '0' should be '12'
|
| 499 |
+
minutes = minutes < 10 ? '0' + minutes : minutes;
|
| 500 |
+
|
| 501 |
+
const timeString = `${hours}:${minutes} ${ampm}`;
|
| 502 |
+
document.getElementById('clock').innerText = timeString;
|
| 503 |
+
|
| 504 |
+
// Date
|
| 505 |
+
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
|
| 506 |
+
const dateString = now.toLocaleDateString('th-TH', options);
|
| 507 |
+
// Convert to Thai numerals for better look (Optional but nice)
|
| 508 |
+
const thaiNumerals = ['0','1','2','3','4','5','6','7','8','9'];
|
| 509 |
+
const convertedDate = dateString.replace(/[0-9]/g, x => thaiNumerals[x]);
|
| 510 |
+
|
| 511 |
+
document.getElementById('current-date').innerText = convertedDate;
|
| 512 |
+
|
| 513 |
+
document.getElementById('year').innerText = now.getFullYear();
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
setInterval(updateClock, 1000);
|
| 517 |
+
updateClock();
|
| 518 |
+
|
| 519 |
+
// 2. To-Do List Logic
|
| 520 |
+
const todoInput = document.getElementById('todo-input');
|
| 521 |
+
const todoList = document.getElementById('todo-list');
|
| 522 |
+
|
| 523 |
+
// Initial Data
|
| 524 |
+
let todos = [
|
| 525 |
+
{ text: 'ทักทายผู้คน (Say Hello)', completed: false },
|
| 526 |
+
{ text: 'ดื่มน้ำให้พอ (Drink Water)', completed: true },
|
| 527 |
+
{ text: 'ทำงานที่สำคัญ (Focus Work)', completed: false }
|
| 528 |
+
];
|
| 529 |
+
|
| 530 |
+
function renderTodos() {
|
| 531 |
+
todoList.innerHTML = '';
|
| 532 |
+
todos.forEach((todo, index) => {
|
| 533 |
+
const li = document.createElement('li');
|
| 534 |
+
li.className = `todo-item ${todo.completed ? 'completed' : ''}`;
|
| 535 |
+
li.innerHTML = `
|
| 536 |
+
<input type="checkbox" ${todo.completed ? 'checked' : ''} onclick="toggleTodo(${index})">
|
| 537 |
+
<span>${todo.text}</span>
|
| 538 |
+
<i class="fa-solid fa-trash" style="color: #e74c3c; cursor: pointer;" onclick="deleteTodo(${index})"></i>
|
| 539 |
+
`;
|
| 540 |
+
todoList.appendChild(li);
|
| 541 |
+
});
|
| 542 |
+
}
|
| 543 |
+
|
| 544 |
+
function addTodo() {
|
| 545 |
+
const text = todoInput.value.trim();
|
| 546 |
+
if (text) {
|
| 547 |
+
todos.unshift({ text: text, completed: false });
|
| 548 |
+
todoInput.value = '';
|
| 549 |
+
renderTodos();
|
| 550 |
+
}
|
| 551 |
+
}
|
| 552 |
+
|
| 553 |
+
function toggleTodo(index) {
|
| 554 |
+
todos[index].completed = !todos[index].completed;
|
| 555 |
+
renderTodos();
|
| 556 |
+
}
|
| 557 |
+
|
| 558 |
+
function deleteTodo(index) {
|
| 559 |
+
todos.splice(index, 1);
|
| 560 |
+
renderTodos();
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
// Enter key support for todo
|
| 564 |
+
todoInput.addEventListener('keypress', function (e) {
|
| 565 |
+
if (e.key === 'Enter') {
|
| 566 |
+
addTodo();
|
| 567 |
+
}
|
| 568 |
+
});
|
| 569 |
+
|
| 570 |
+
renderTodos();
|
| 571 |
+
|
| 572 |
+
// 3. Greeting Generator Logic
|
| 573 |
+
const greetings = [
|
| 574 |
+
{ thai: "สวัสดีครับ", eng: "Hello (Krub)" },
|
| 575 |
+
{ thai: "สวัสดีค่ะ", eng: "Hello (Ka)" },
|
| 576 |
+
{ thai: "หวัดดีครับ", eng: "Hi there! (Krub)" },
|
| 577 |
+
{ thai: "ดีจังเลยครับ", eng: "That's great! (Krub)" },
|
| 578 |
+
{ thai: "ขอบคุณครับ", eng: "Thank you (Krub)" },
|
| 579 |
+
{ thai: "ลาก่อนครับ", eng: "Goodbye (Krub)" },
|
| 580 |
+
{ thai: "อรุณสวัสดิ์", eng: "Good Morning" },
|
| 581 |
+
{ thai: "สวัสดีตอนเย็น", eng: "Good Evening" }
|
| 582 |
+
];
|
| 583 |
+
|
| 584 |
+
function generateRandomGreeting() {
|
| 585 |
+
const randomIndex = Math.floor(Math.random() * greetings.length);
|
| 586 |
+
const greeting = greetings[randomIndex];
|
| 587 |
+
|
| 588 |
+
const outputDiv = document.getElementById('greeting-output');
|
| 589 |
+
|
| 590 |
+
// Simple animation effect
|
| 591 |
+
outputDiv.style.opacity = 0;
|
| 592 |
+
outputDiv.style.transform = "scale(0.9)";
|
| 593 |
+
|
| 594 |
+
setTimeout(() => {
|
| 595 |
+
outputDiv.innerHTML = `${greeting.thai} <span style="font-size: 1.2rem; display:block; font-family:Prompt; color:#7f8c8d;">${greeting.eng}</span>`;
|
| 596 |
+
outputDiv.style.opacity = 1;
|
| 597 |
+
outputDiv.style.transform = "scale(1)";
|
| 598 |
+
}, 200);
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
// Initialize with a random greeting on load
|
| 602 |
+
generateRandomGreeting();
|
| 603 |
+
|
| 604 |
+
</script>
|
| 605 |
+
</body>
|
| 606 |
+
</html>
|