Spaces:
Running
Running
Update index.html
Browse files- index.html +241 -239
index.html
CHANGED
|
@@ -6,7 +6,6 @@
|
|
| 6 |
<meta name="theme-color" content="#F3EFE9" />
|
| 7 |
<title>Trova la tua Cala</title>
|
| 8 |
|
| 9 |
-
<!-- Montserrat è il font pulito del moodboard. Amsterdam One viene usato se disponibile nel device/sito. -->
|
| 10 |
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 11 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 12 |
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
|
|
@@ -14,27 +13,27 @@
|
|
| 14 |
<style>
|
| 15 |
:root {
|
| 16 |
--blue: #254B6B;
|
| 17 |
-
--blue-
|
| 18 |
--olive: #939675;
|
| 19 |
--sage: #C2C5B2;
|
| 20 |
--coral: #D08A7A;
|
| 21 |
--rose: #EDD3CD;
|
| 22 |
--cream: #F3EFE9;
|
| 23 |
-
--paper:
|
| 24 |
-
--
|
| 25 |
-
--
|
| 26 |
-
--
|
| 27 |
-
--font
|
| 28 |
}
|
| 29 |
|
| 30 |
* { box-sizing: border-box; }
|
| 31 |
|
| 32 |
html,
|
| 33 |
body {
|
| 34 |
-
width: 100%;
|
| 35 |
-
min-height: 100%;
|
| 36 |
margin: 0;
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
color: var(--blue);
|
| 39 |
background: var(--cream);
|
| 40 |
overflow-x: hidden;
|
|
@@ -43,44 +42,47 @@
|
|
| 43 |
body {
|
| 44 |
min-height: 100svh;
|
| 45 |
background:
|
| 46 |
-
radial-gradient(circle at
|
| 47 |
-
radial-gradient(circle at
|
| 48 |
-
|
| 49 |
-
linear-gradient(180deg, #fffaf4 0%, #f3efe9 64%, #eee7de 100%);
|
| 50 |
}
|
| 51 |
|
| 52 |
body::before {
|
| 53 |
content: "";
|
| 54 |
position: fixed;
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
| 58 |
pointer-events: none;
|
| 59 |
-
opacity: .
|
| 60 |
-
background:
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
transform: rotate(-10deg);
|
| 63 |
-
filter: blur(.5px);
|
| 64 |
z-index: 0;
|
| 65 |
}
|
| 66 |
|
| 67 |
body::after {
|
| 68 |
content: "";
|
| 69 |
position: fixed;
|
| 70 |
-
inset: auto -
|
| 71 |
-
height:
|
| 72 |
pointer-events: none;
|
| 73 |
-
opacity: .
|
| 74 |
background:
|
| 75 |
-
radial-gradient(80% 90% at 50% 0%, rgba(143,163,179,.
|
| 76 |
-
radial-gradient(80% 90% at 16% 7%, rgba(143,163,179,.
|
| 77 |
-
radial-gradient(80% 90% at 84% 6%, rgba(143,163,179,.
|
| 78 |
-
animation:
|
| 79 |
z-index: 0;
|
| 80 |
}
|
| 81 |
|
| 82 |
-
@keyframes
|
| 83 |
-
from { transform: translateX(-3vw) rotate(-
|
| 84 |
to { transform: translateX(3vw) translateY(-1vh) rotate(1deg); }
|
| 85 |
}
|
| 86 |
|
|
@@ -90,34 +92,32 @@
|
|
| 90 |
min-height: 100svh;
|
| 91 |
display: grid;
|
| 92 |
place-items: center;
|
| 93 |
-
padding: max(18px, env(safe-area-inset-top)) 18px max(
|
| 94 |
}
|
| 95 |
|
| 96 |
.card {
|
| 97 |
position: relative;
|
| 98 |
-
width: min(100%,
|
| 99 |
min-height: min(92svh, 760px);
|
| 100 |
display: flex;
|
| 101 |
flex-direction: column;
|
| 102 |
justify-content: center;
|
| 103 |
-
border-radius: 36px;
|
| 104 |
overflow: hidden;
|
| 105 |
-
border:
|
| 106 |
-
background:
|
| 107 |
-
|
| 108 |
-
radial-gradient(circle at 50% 22%, rgba(237,211,205,.55), transparent 28%);
|
| 109 |
box-shadow: var(--shadow);
|
| 110 |
-
backdrop-filter: blur(
|
| 111 |
-
-webkit-backdrop-filter: blur(
|
| 112 |
-
animation: enter .
|
| 113 |
}
|
| 114 |
|
| 115 |
.card::before {
|
| 116 |
content: "";
|
| 117 |
position: absolute;
|
| 118 |
-
inset:
|
| 119 |
-
border
|
| 120 |
-
border:
|
| 121 |
pointer-events: none;
|
| 122 |
}
|
| 123 |
|
|
@@ -125,169 +125,175 @@
|
|
| 125 |
content: "";
|
| 126 |
position: absolute;
|
| 127 |
left: 50%;
|
| 128 |
-
top:
|
| 129 |
-
width:
|
| 130 |
-
height:
|
| 131 |
transform: translate(-50%, -50%);
|
| 132 |
border-radius: 50%;
|
| 133 |
-
background:
|
| 134 |
-
|
| 135 |
-
radial-gradient(circle, rgba(208,138,122,.18) 0 44%, transparent 45%);
|
| 136 |
pointer-events: none;
|
| 137 |
z-index: -1;
|
| 138 |
-
animation: halo 5s ease-in-out infinite alternate;
|
| 139 |
}
|
| 140 |
|
| 141 |
@keyframes enter {
|
| 142 |
-
from { opacity: 0; transform: translateY(
|
| 143 |
to { opacity: 1; transform: translateY(0) scale(1); }
|
| 144 |
}
|
| 145 |
|
| 146 |
-
@keyframes halo {
|
| 147 |
-
from { opacity: .64; transform: translate(-50%, -50%) scale(.96); }
|
| 148 |
-
to { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
|
| 149 |
-
}
|
| 150 |
-
|
| 151 |
.hero {
|
| 152 |
position: relative;
|
| 153 |
-
padding: 42px
|
| 154 |
text-align: center;
|
| 155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
}
|
| 157 |
|
| 158 |
h1 {
|
| 159 |
margin: 0 auto;
|
| 160 |
max-width: 8ch;
|
| 161 |
color: var(--blue);
|
| 162 |
-
font-size: clamp(
|
| 163 |
-
line-height: .
|
| 164 |
-
letter-spacing: -.
|
| 165 |
-
font-weight:
|
| 166 |
text-wrap: balance;
|
| 167 |
}
|
| 168 |
|
| 169 |
-
.
|
| 170 |
-
|
| 171 |
-
margin:
|
| 172 |
-
color: var(--
|
| 173 |
-
|
| 174 |
-
font-size: clamp(32px, 9vw, 54px);
|
| 175 |
-
line-height: .95;
|
| 176 |
-
font-weight: 400;
|
| 177 |
-
letter-spacing: .01em;
|
| 178 |
-
opacity: .95;
|
| 179 |
-
}
|
| 180 |
-
|
| 181 |
-
.islands {
|
| 182 |
-
display: flex;
|
| 183 |
-
justify-content: center;
|
| 184 |
-
align-items: end;
|
| 185 |
-
gap: 8px;
|
| 186 |
-
height: 42px;
|
| 187 |
-
margin-top: 28px;
|
| 188 |
}
|
| 189 |
|
| 190 |
-
.
|
|
|
|
|
|
|
| 191 |
display: block;
|
| 192 |
-
|
| 193 |
-
background: linear-gradient(180deg, #edd3cd 0%, #d08a7a 62%, #c47c70 100%);
|
| 194 |
-
box-shadow: inset 0 -7px 0 rgba(37,75,107,.07);
|
| 195 |
-
animation: bob 3.2s ease-in-out infinite;
|
| 196 |
}
|
| 197 |
|
| 198 |
-
.
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
|
|
|
|
|
|
| 205 |
}
|
| 206 |
|
|
|
|
|
|
|
| 207 |
.form {
|
| 208 |
-
|
|
|
|
| 209 |
}
|
| 210 |
|
| 211 |
label {
|
| 212 |
display: block;
|
| 213 |
margin: 0 0 12px;
|
| 214 |
-
color: rgba(37, 75, 107, .
|
| 215 |
-
font-size:
|
| 216 |
font-weight: 800;
|
| 217 |
-
letter-spacing: .
|
| 218 |
text-transform: uppercase;
|
| 219 |
}
|
| 220 |
|
| 221 |
input {
|
| 222 |
width: 100%;
|
| 223 |
-
min-height:
|
| 224 |
border: 0;
|
| 225 |
outline: none;
|
| 226 |
-
border-radius:
|
| 227 |
padding: 0 18px;
|
| 228 |
color: var(--blue);
|
| 229 |
-
background: rgba(255,255,255,.88);
|
|
|
|
| 230 |
font-size: 17px;
|
| 231 |
-
font-weight:
|
| 232 |
box-shadow:
|
| 233 |
-
inset 0 0 0 1px rgba(37,75,107,.
|
| 234 |
-
0
|
| 235 |
transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
|
| 236 |
}
|
| 237 |
|
| 238 |
input::placeholder {
|
| 239 |
-
color: rgba(37,75,107,.
|
| 240 |
-
font-weight:
|
| 241 |
}
|
| 242 |
|
| 243 |
input:focus {
|
| 244 |
transform: translateY(-1px);
|
| 245 |
background: #fff;
|
| 246 |
box-shadow:
|
| 247 |
-
inset 0 0 0 2px rgba(208,138,122,.42),
|
| 248 |
-
0
|
| 249 |
}
|
| 250 |
|
| 251 |
.discover {
|
| 252 |
position: relative;
|
| 253 |
width: 100%;
|
| 254 |
-
min-height:
|
| 255 |
margin-top: 14px;
|
| 256 |
border: 0;
|
| 257 |
-
border-radius:
|
| 258 |
overflow: hidden;
|
| 259 |
cursor: pointer;
|
| 260 |
-
color:
|
| 261 |
-
background:
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
font-size: 17px;
|
| 266 |
font-weight: 800;
|
| 267 |
-
letter-spacing:
|
| 268 |
-
transition: transform .16s ease,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
}
|
| 270 |
|
| 271 |
.discover::after {
|
| 272 |
content: "";
|
| 273 |
position: absolute;
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
width:
|
| 277 |
-
height:
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
|
|
|
| 281 |
}
|
| 282 |
|
| 283 |
@keyframes shine {
|
| 284 |
-
0%,
|
| 285 |
-
100% {
|
| 286 |
}
|
| 287 |
|
| 288 |
.discover:active {
|
| 289 |
transform: translateY(2px) scale(.99);
|
| 290 |
-
|
|
|
|
| 291 |
}
|
| 292 |
|
| 293 |
.message {
|
|
@@ -304,15 +310,15 @@
|
|
| 304 |
}
|
| 305 |
|
| 306 |
.message-card {
|
| 307 |
-
border-radius:
|
| 308 |
-
padding: 16px;
|
| 309 |
text-align: center;
|
| 310 |
-
color: rgba(37, 75, 107, .
|
| 311 |
-
background: rgba(255,255,255,.
|
| 312 |
-
border: 1px solid rgba(37,75,107,.
|
| 313 |
-
box-shadow: 0 12px
|
| 314 |
-
font-size:
|
| 315 |
-
font-weight:
|
| 316 |
line-height: 1.35;
|
| 317 |
}
|
| 318 |
|
|
@@ -325,13 +331,12 @@
|
|
| 325 |
padding: max(18px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
|
| 326 |
color: var(--blue);
|
| 327 |
background:
|
| 328 |
-
radial-gradient(circle at
|
| 329 |
-
radial-gradient(circle at
|
| 330 |
-
|
| 331 |
-
linear-gradient(180deg, #fffaf4 0%, #f3efe9 74%, #eee7de 100%);
|
| 332 |
opacity: 0;
|
| 333 |
pointer-events: none;
|
| 334 |
-
transform: scale(1.
|
| 335 |
transition: opacity .42s ease, transform .42s ease;
|
| 336 |
overflow: hidden;
|
| 337 |
}
|
|
@@ -345,95 +350,84 @@
|
|
| 345 |
.reveal::before {
|
| 346 |
content: "";
|
| 347 |
position: absolute;
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
transform: rotate(-10deg);
|
| 355 |
z-index: 0;
|
| 356 |
}
|
| 357 |
|
| 358 |
-
.reveal::after {
|
| 359 |
-
content: "";
|
| 360 |
-
position: absolute;
|
| 361 |
-
left: -16vw;
|
| 362 |
-
right: -16vw;
|
| 363 |
-
bottom: -15vh;
|
| 364 |
-
height: 34vh;
|
| 365 |
-
opacity: .22;
|
| 366 |
-
background:
|
| 367 |
-
radial-gradient(80% 90% at 50% 0%, rgba(143,163,179,.55) 0 11%, transparent 12%),
|
| 368 |
-
radial-gradient(80% 90% at 16% 7%, rgba(143,163,179,.36) 0 11%, transparent 12%),
|
| 369 |
-
radial-gradient(80% 90% at 84% 6%, rgba(143,163,179,.30) 0 11%, transparent 12%);
|
| 370 |
-
animation: softWave 8s ease-in-out infinite alternate;
|
| 371 |
-
z-index: 0;
|
| 372 |
-
}
|
| 373 |
-
|
| 374 |
.reveal-content {
|
| 375 |
position: relative;
|
| 376 |
z-index: 2;
|
| 377 |
-
width: min(100%,
|
| 378 |
-
min-height: min(
|
| 379 |
display: flex;
|
| 380 |
flex-direction: column;
|
| 381 |
align-items: center;
|
| 382 |
justify-content: center;
|
| 383 |
text-align: center;
|
| 384 |
-
border-radius:
|
| 385 |
padding: 34px 22px;
|
| 386 |
-
background: rgba(255,
|
| 387 |
-
border: 1px solid rgba(
|
| 388 |
-
box-shadow: 0
|
| 389 |
-
backdrop-filter: blur(
|
| 390 |
-
-webkit-backdrop-filter: blur(
|
| 391 |
-
animation: revealPop .
|
| 392 |
overflow: hidden;
|
| 393 |
}
|
| 394 |
|
| 395 |
.reveal-content::before {
|
| 396 |
content: "";
|
| 397 |
position: absolute;
|
| 398 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 399 |
left: 50%;
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
|
|
|
| 403 |
border-radius: 50%;
|
| 404 |
-
background:
|
| 405 |
-
radial-gradient(circle, rgba(237,211,205,.58) 0 27%, transparent 28%),
|
| 406 |
-
radial-gradient(circle, rgba(208,138,122,.16) 0 45%, transparent 46%);
|
| 407 |
z-index: -1;
|
| 408 |
}
|
| 409 |
|
| 410 |
@keyframes revealPop {
|
| 411 |
-
from { opacity: 0; transform: translateY(
|
| 412 |
-
60% { opacity: 1; transform: translateY(-
|
| 413 |
-
to { opacity: 1; transform: translateY(0) scale(1)
|
| 414 |
}
|
| 415 |
|
| 416 |
.hello {
|
| 417 |
-
margin: 0 0
|
| 418 |
-
color: rgba(37, 75, 107, .
|
| 419 |
-
font-size: clamp(
|
| 420 |
-
font-weight:
|
| 421 |
letter-spacing: .02em;
|
| 422 |
}
|
| 423 |
|
| 424 |
.small-title {
|
| 425 |
-
display: inline-flex;
|
| 426 |
-
align-items: center;
|
| 427 |
-
justify-content: center;
|
| 428 |
margin-bottom: 18px;
|
| 429 |
-
|
| 430 |
-
border-radius: 999px;
|
| 431 |
-
color: var(--cream);
|
| 432 |
-
background: var(--olive);
|
| 433 |
-
box-shadow: 0 13px 28px rgba(147,150,117,.20);
|
| 434 |
font-size: 12px;
|
| 435 |
font-weight: 800;
|
| 436 |
-
letter-spacing: .
|
| 437 |
text-transform: uppercase;
|
| 438 |
}
|
| 439 |
|
|
@@ -441,44 +435,41 @@
|
|
| 441 |
margin: 0;
|
| 442 |
max-width: 11ch;
|
| 443 |
color: var(--blue);
|
| 444 |
-
font-family: var(--font
|
| 445 |
-
font-size: clamp(48px, 14vw,
|
| 446 |
-
line-height: .
|
| 447 |
letter-spacing: -.055em;
|
| 448 |
-
font-weight:
|
| 449 |
text-wrap: balance;
|
| 450 |
-
text-shadow: 0 16px 36px rgba(37,75,107,.12);
|
| 451 |
}
|
| 452 |
|
| 453 |
-
.
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
line-height: .82;
|
| 460 |
-
font-weight: 400;
|
| 461 |
-
letter-spacing: .01em;
|
| 462 |
}
|
| 463 |
|
| 464 |
.reveal-note {
|
| 465 |
-
margin:
|
| 466 |
-
max-width:
|
| 467 |
-
color: rgba(37, 75, 107, .
|
| 468 |
font-size: 15px;
|
| 469 |
-
line-height: 1.
|
| 470 |
-
font-weight:
|
| 471 |
}
|
| 472 |
|
| 473 |
.again {
|
| 474 |
min-height: 52px;
|
| 475 |
-
margin-top:
|
| 476 |
border: 0;
|
| 477 |
border-radius: 999px;
|
| 478 |
-
padding: 0
|
| 479 |
-
color:
|
| 480 |
background: var(--blue);
|
| 481 |
-
box-shadow: 0 16px
|
|
|
|
| 482 |
font-size: 14px;
|
| 483 |
font-weight: 800;
|
| 484 |
cursor: pointer;
|
|
@@ -504,12 +495,12 @@
|
|
| 504 |
|
| 505 |
@media (max-width: 380px) {
|
| 506 |
.app { padding-left: 12px; padding-right: 12px; }
|
| 507 |
-
.card { min-height: 90svh; border-radius:
|
| 508 |
-
.hero { padding:
|
| 509 |
-
h1 { font-size: clamp(
|
| 510 |
.form { padding-left: 22px; padding-right: 22px; }
|
| 511 |
-
input, .discover { min-height: 60px;
|
| 512 |
-
.reveal-content { border-radius:
|
| 513 |
}
|
| 514 |
|
| 515 |
@media (prefers-reduced-motion: reduce) {
|
|
@@ -528,19 +519,19 @@
|
|
| 528 |
<main class="app">
|
| 529 |
<section class="card" aria-label="Scopri il tavolo">
|
| 530 |
<div class="hero">
|
|
|
|
| 531 |
<h1>Trova la tua Cala</h1>
|
| 532 |
-
<
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
<
|
| 536 |
-
<span class="island"></span>
|
| 537 |
</div>
|
| 538 |
</div>
|
| 539 |
|
| 540 |
<div class="form">
|
| 541 |
<label for="guestName">Nome e cognome</label>
|
| 542 |
<input id="guestName" autocomplete="name" inputmode="text" placeholder="Es. Gaia Pollastrini" />
|
| 543 |
-
<button class="discover" id="discover" type="button">Scopri il Tavolo
|
| 544 |
<div id="message" class="message" aria-live="polite"></div>
|
| 545 |
<div id="status" class="status" aria-live="polite"></div>
|
| 546 |
</div>
|
|
@@ -552,16 +543,27 @@
|
|
| 552 |
<p class="hello" id="hello"></p>
|
| 553 |
<div class="small-title">Il tuo tavolo è</div>
|
| 554 |
<h2 class="table-name" id="tableName"></h2>
|
| 555 |
-
<
|
| 556 |
<p class="reveal-note">Segui la tua cala e goditi la serata.</p>
|
| 557 |
<button class="again" id="again" type="button">Cerca un altro nome</button>
|
| 558 |
</div>
|
| 559 |
</section>
|
| 560 |
|
| 561 |
<script>
|
| 562 |
-
const DATA_URL = "
|
| 563 |
|
| 564 |
const SAMPLE_CSV = `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 565 |
`;
|
| 566 |
|
| 567 |
const els = {
|
|
@@ -683,7 +685,7 @@
|
|
| 683 |
}
|
| 684 |
|
| 685 |
function showReveal(guest) {
|
| 686 |
-
els.hello.textContent = `Ciao ${firstName(guest.fullName)}
|
| 687 |
els.tableName.textContent = guest.tableName;
|
| 688 |
els.reveal.classList.add("show");
|
| 689 |
els.reveal.setAttribute("aria-hidden", "false");
|
|
@@ -749,20 +751,20 @@
|
|
| 749 |
const centerX = window.innerWidth / 2;
|
| 750 |
const centerY = window.innerHeight * .42;
|
| 751 |
|
| 752 |
-
confetti = Array.from({ length:
|
| 753 |
const angle = Math.random() * Math.PI * 2;
|
| 754 |
-
const speed =
|
| 755 |
return {
|
| 756 |
x: centerX,
|
| 757 |
y: centerY,
|
| 758 |
-
size:
|
| 759 |
vx: Math.cos(angle) * speed,
|
| 760 |
-
vy: Math.sin(angle) * speed - 5,
|
| 761 |
-
gravity: .
|
| 762 |
rotation: Math.random() * Math.PI,
|
| 763 |
-
spin: (Math.random() - .5) * .
|
| 764 |
color: colors[Math.floor(Math.random() * colors.length)],
|
| 765 |
-
life:
|
| 766 |
};
|
| 767 |
});
|
| 768 |
|
|
@@ -784,7 +786,7 @@
|
|
| 784 |
ctx.save();
|
| 785 |
ctx.translate(piece.x, piece.y);
|
| 786 |
ctx.rotate(piece.rotation);
|
| 787 |
-
ctx.globalAlpha = Math.max(piece.life /
|
| 788 |
ctx.fillStyle = piece.color;
|
| 789 |
ctx.fillRect(-piece.size / 2, -piece.size / 2, piece.size, piece.size * .62);
|
| 790 |
ctx.restore();
|
|
|
|
| 6 |
<meta name="theme-color" content="#F3EFE9" />
|
| 7 |
<title>Trova la tua Cala</title>
|
| 8 |
|
|
|
|
| 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=Montserrat:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
|
|
|
|
| 13 |
<style>
|
| 14 |
:root {
|
| 15 |
--blue: #254B6B;
|
| 16 |
+
--blue-muted: #8FA3B3;
|
| 17 |
--olive: #939675;
|
| 18 |
--sage: #C2C5B2;
|
| 19 |
--coral: #D08A7A;
|
| 20 |
--rose: #EDD3CD;
|
| 21 |
--cream: #F3EFE9;
|
| 22 |
+
--paper: #FFFDF8;
|
| 23 |
+
--ink-soft: rgba(37, 75, 107, .68);
|
| 24 |
+
--line: rgba(147, 150, 117, .34);
|
| 25 |
+
--shadow: 0 28px 70px rgba(37, 75, 107, .13);
|
| 26 |
+
--font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
| 27 |
}
|
| 28 |
|
| 29 |
* { box-sizing: border-box; }
|
| 30 |
|
| 31 |
html,
|
| 32 |
body {
|
|
|
|
|
|
|
| 33 |
margin: 0;
|
| 34 |
+
min-height: 100%;
|
| 35 |
+
width: 100%;
|
| 36 |
+
font-family: var(--font);
|
| 37 |
color: var(--blue);
|
| 38 |
background: var(--cream);
|
| 39 |
overflow-x: hidden;
|
|
|
|
| 42 |
body {
|
| 43 |
min-height: 100svh;
|
| 44 |
background:
|
| 45 |
+
radial-gradient(circle at 82% 12%, rgba(237, 211, 205, .42), transparent 28%),
|
| 46 |
+
radial-gradient(circle at 10% 90%, rgba(194, 197, 178, .42), transparent 30%),
|
| 47 |
+
linear-gradient(180deg, #fffdf8 0%, #f3efe9 100%);
|
|
|
|
| 48 |
}
|
| 49 |
|
| 50 |
body::before {
|
| 51 |
content: "";
|
| 52 |
position: fixed;
|
| 53 |
+
right: -26vw;
|
| 54 |
+
top: -4vh;
|
| 55 |
+
width: 105vw;
|
| 56 |
+
height: 96vh;
|
| 57 |
pointer-events: none;
|
| 58 |
+
opacity: .13;
|
| 59 |
+
background: repeating-conic-gradient(
|
| 60 |
+
from 205deg at 72% 52%,
|
| 61 |
+
transparent 0deg 6deg,
|
| 62 |
+
rgba(147, 150, 117, .70) 6deg 8deg,
|
| 63 |
+
transparent 8deg 14deg
|
| 64 |
+
);
|
| 65 |
transform: rotate(-10deg);
|
|
|
|
| 66 |
z-index: 0;
|
| 67 |
}
|
| 68 |
|
| 69 |
body::after {
|
| 70 |
content: "";
|
| 71 |
position: fixed;
|
| 72 |
+
inset: auto -14vw -16vh -14vw;
|
| 73 |
+
height: 33vh;
|
| 74 |
pointer-events: none;
|
| 75 |
+
opacity: .18;
|
| 76 |
background:
|
| 77 |
+
radial-gradient(80% 90% at 50% 0%, rgba(143, 163, 179, .65) 0 11%, transparent 12%),
|
| 78 |
+
radial-gradient(80% 90% at 16% 7%, rgba(143, 163, 179, .48) 0 11%, transparent 12%),
|
| 79 |
+
radial-gradient(80% 90% at 84% 6%, rgba(143, 163, 179, .42) 0 11%, transparent 12%);
|
| 80 |
+
animation: wave 9s ease-in-out infinite alternate;
|
| 81 |
z-index: 0;
|
| 82 |
}
|
| 83 |
|
| 84 |
+
@keyframes wave {
|
| 85 |
+
from { transform: translateX(-3vw) rotate(-1deg); }
|
| 86 |
to { transform: translateX(3vw) translateY(-1vh) rotate(1deg); }
|
| 87 |
}
|
| 88 |
|
|
|
|
| 92 |
min-height: 100svh;
|
| 93 |
display: grid;
|
| 94 |
place-items: center;
|
| 95 |
+
padding: max(18px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
|
| 96 |
}
|
| 97 |
|
| 98 |
.card {
|
| 99 |
position: relative;
|
| 100 |
+
width: min(100%, 440px);
|
| 101 |
min-height: min(92svh, 760px);
|
| 102 |
display: flex;
|
| 103 |
flex-direction: column;
|
| 104 |
justify-content: center;
|
|
|
|
| 105 |
overflow: hidden;
|
| 106 |
+
border-radius: 34px;
|
| 107 |
+
background: rgba(255, 253, 248, .80);
|
| 108 |
+
border: 1px solid rgba(37, 75, 107, .10);
|
|
|
|
| 109 |
box-shadow: var(--shadow);
|
| 110 |
+
backdrop-filter: blur(16px);
|
| 111 |
+
-webkit-backdrop-filter: blur(16px);
|
| 112 |
+
animation: enter .7s cubic-bezier(.2,.86,.2,1.08) both;
|
| 113 |
}
|
| 114 |
|
| 115 |
.card::before {
|
| 116 |
content: "";
|
| 117 |
position: absolute;
|
| 118 |
+
inset: 22px;
|
| 119 |
+
border: 1px solid rgba(147, 150, 117, .28);
|
| 120 |
+
border-radius: 26px;
|
| 121 |
pointer-events: none;
|
| 122 |
}
|
| 123 |
|
|
|
|
| 125 |
content: "";
|
| 126 |
position: absolute;
|
| 127 |
left: 50%;
|
| 128 |
+
top: 23%;
|
| 129 |
+
width: 220px;
|
| 130 |
+
height: 220px;
|
| 131 |
transform: translate(-50%, -50%);
|
| 132 |
border-radius: 50%;
|
| 133 |
+
background: rgba(237, 211, 205, .34);
|
| 134 |
+
filter: blur(.2px);
|
|
|
|
| 135 |
pointer-events: none;
|
| 136 |
z-index: -1;
|
|
|
|
| 137 |
}
|
| 138 |
|
| 139 |
@keyframes enter {
|
| 140 |
+
from { opacity: 0; transform: translateY(22px) scale(.98); }
|
| 141 |
to { opacity: 1; transform: translateY(0) scale(1); }
|
| 142 |
}
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
.hero {
|
| 145 |
position: relative;
|
| 146 |
+
padding: 42px 30px 24px;
|
| 147 |
text-align: center;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
.mini-mark {
|
| 151 |
+
width: 54px;
|
| 152 |
+
height: 54px;
|
| 153 |
+
margin: 0 auto 24px;
|
| 154 |
+
display: grid;
|
| 155 |
+
place-items: center;
|
| 156 |
+
border-radius: 50%;
|
| 157 |
+
border: 1px dashed rgba(208, 138, 122, .70);
|
| 158 |
+
color: var(--coral);
|
| 159 |
+
font-size: 24px;
|
| 160 |
+
background: rgba(255, 253, 248, .62);
|
| 161 |
}
|
| 162 |
|
| 163 |
h1 {
|
| 164 |
margin: 0 auto;
|
| 165 |
max-width: 8ch;
|
| 166 |
color: var(--blue);
|
| 167 |
+
font-size: clamp(50px, 14vw, 76px);
|
| 168 |
+
line-height: .90;
|
| 169 |
+
letter-spacing: -.065em;
|
| 170 |
+
font-weight: 800;
|
| 171 |
text-wrap: balance;
|
| 172 |
}
|
| 173 |
|
| 174 |
+
.map-line {
|
| 175 |
+
width: min(72%, 250px);
|
| 176 |
+
margin: 32px auto 0;
|
| 177 |
+
color: var(--olive);
|
| 178 |
+
opacity: .82;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
}
|
| 180 |
|
| 181 |
+
.map-line svg {
|
| 182 |
+
width: 100%;
|
| 183 |
+
height: auto;
|
| 184 |
display: block;
|
| 185 |
+
overflow: visible;
|
|
|
|
|
|
|
|
|
|
| 186 |
}
|
| 187 |
|
| 188 |
+
.map-line path {
|
| 189 |
+
fill: none;
|
| 190 |
+
stroke: currentColor;
|
| 191 |
+
stroke-width: 2.8;
|
| 192 |
+
stroke-linecap: round;
|
| 193 |
+
stroke-linejoin: round;
|
| 194 |
+
stroke-dasharray: 520;
|
| 195 |
+
stroke-dashoffset: 520;
|
| 196 |
+
animation: draw 1.4s ease .35s forwards;
|
| 197 |
}
|
| 198 |
|
| 199 |
+
@keyframes draw { to { stroke-dashoffset: 0; } }
|
| 200 |
+
|
| 201 |
.form {
|
| 202 |
+
position: relative;
|
| 203 |
+
padding: 4px 30px 44px;
|
| 204 |
}
|
| 205 |
|
| 206 |
label {
|
| 207 |
display: block;
|
| 208 |
margin: 0 0 12px;
|
| 209 |
+
color: rgba(37, 75, 107, .70);
|
| 210 |
+
font-size: 11px;
|
| 211 |
font-weight: 800;
|
| 212 |
+
letter-spacing: .16em;
|
| 213 |
text-transform: uppercase;
|
| 214 |
}
|
| 215 |
|
| 216 |
input {
|
| 217 |
width: 100%;
|
| 218 |
+
min-height: 64px;
|
| 219 |
border: 0;
|
| 220 |
outline: none;
|
| 221 |
+
border-radius: 18px;
|
| 222 |
padding: 0 18px;
|
| 223 |
color: var(--blue);
|
| 224 |
+
background: rgba(255, 255, 255, .88);
|
| 225 |
+
font-family: var(--font);
|
| 226 |
font-size: 17px;
|
| 227 |
+
font-weight: 600;
|
| 228 |
box-shadow:
|
| 229 |
+
inset 0 0 0 1px rgba(37, 75, 107, .12),
|
| 230 |
+
0 12px 26px rgba(37, 75, 107, .08);
|
| 231 |
transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
|
| 232 |
}
|
| 233 |
|
| 234 |
input::placeholder {
|
| 235 |
+
color: rgba(37, 75, 107, .34);
|
| 236 |
+
font-weight: 600;
|
| 237 |
}
|
| 238 |
|
| 239 |
input:focus {
|
| 240 |
transform: translateY(-1px);
|
| 241 |
background: #fff;
|
| 242 |
box-shadow:
|
| 243 |
+
inset 0 0 0 2px rgba(208, 138, 122, .42),
|
| 244 |
+
0 16px 32px rgba(37, 75, 107, .12);
|
| 245 |
}
|
| 246 |
|
| 247 |
.discover {
|
| 248 |
position: relative;
|
| 249 |
width: 100%;
|
| 250 |
+
min-height: 64px;
|
| 251 |
margin-top: 14px;
|
| 252 |
border: 0;
|
| 253 |
+
border-radius: 18px;
|
| 254 |
overflow: hidden;
|
| 255 |
cursor: pointer;
|
| 256 |
+
color: var(--paper);
|
| 257 |
+
background: var(--blue);
|
| 258 |
+
box-shadow: 0 16px 32px rgba(37, 75, 107, .20);
|
| 259 |
+
font-family: var(--font);
|
| 260 |
+
font-size: 16px;
|
|
|
|
| 261 |
font-weight: 800;
|
| 262 |
+
letter-spacing: .01em;
|
| 263 |
+
transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
.discover::before {
|
| 267 |
+
content: "";
|
| 268 |
+
position: absolute;
|
| 269 |
+
inset: 0;
|
| 270 |
+
background: linear-gradient(110deg, transparent 0 35%, rgba(255,255,255,.20) 47%, transparent 60% 100%);
|
| 271 |
+
transform: translateX(-120%);
|
| 272 |
+
animation: shine 3.5s ease-in-out infinite;
|
| 273 |
}
|
| 274 |
|
| 275 |
.discover::after {
|
| 276 |
content: "";
|
| 277 |
position: absolute;
|
| 278 |
+
left: 50%;
|
| 279 |
+
bottom: 10px;
|
| 280 |
+
width: 58px;
|
| 281 |
+
height: 2px;
|
| 282 |
+
border-radius: 999px;
|
| 283 |
+
background: var(--coral);
|
| 284 |
+
transform: translateX(-50%);
|
| 285 |
+
opacity: .92;
|
| 286 |
}
|
| 287 |
|
| 288 |
@keyframes shine {
|
| 289 |
+
0%, 55% { transform: translateX(-120%); }
|
| 290 |
+
100% { transform: translateX(120%); }
|
| 291 |
}
|
| 292 |
|
| 293 |
.discover:active {
|
| 294 |
transform: translateY(2px) scale(.99);
|
| 295 |
+
background: #1f405c;
|
| 296 |
+
box-shadow: 0 10px 24px rgba(37, 75, 107, .18);
|
| 297 |
}
|
| 298 |
|
| 299 |
.message {
|
|
|
|
| 310 |
}
|
| 311 |
|
| 312 |
.message-card {
|
| 313 |
+
border-radius: 18px;
|
| 314 |
+
padding: 15px 16px;
|
| 315 |
text-align: center;
|
| 316 |
+
color: rgba(37, 75, 107, .78);
|
| 317 |
+
background: rgba(255, 255, 255, .72);
|
| 318 |
+
border: 1px solid rgba(37, 75, 107, .09);
|
| 319 |
+
box-shadow: 0 12px 24px rgba(37, 75, 107, .08);
|
| 320 |
+
font-size: 13px;
|
| 321 |
+
font-weight: 600;
|
| 322 |
line-height: 1.35;
|
| 323 |
}
|
| 324 |
|
|
|
|
| 331 |
padding: max(18px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
|
| 332 |
color: var(--blue);
|
| 333 |
background:
|
| 334 |
+
radial-gradient(circle at 84% 12%, rgba(237, 211, 205, .50), transparent 30%),
|
| 335 |
+
radial-gradient(circle at 12% 88%, rgba(194, 197, 178, .46), transparent 33%),
|
| 336 |
+
linear-gradient(180deg, #fffdf8 0%, #f3efe9 100%);
|
|
|
|
| 337 |
opacity: 0;
|
| 338 |
pointer-events: none;
|
| 339 |
+
transform: scale(1.02);
|
| 340 |
transition: opacity .42s ease, transform .42s ease;
|
| 341 |
overflow: hidden;
|
| 342 |
}
|
|
|
|
| 350 |
.reveal::before {
|
| 351 |
content: "";
|
| 352 |
position: absolute;
|
| 353 |
+
right: -26vw;
|
| 354 |
+
top: -4vh;
|
| 355 |
+
width: 105vw;
|
| 356 |
+
height: 96vh;
|
| 357 |
+
opacity: .13;
|
| 358 |
+
background: repeating-conic-gradient(
|
| 359 |
+
from 205deg at 72% 52%,
|
| 360 |
+
transparent 0deg 6deg,
|
| 361 |
+
rgba(147, 150, 117, .70) 6deg 8deg,
|
| 362 |
+
transparent 8deg 14deg
|
| 363 |
+
);
|
| 364 |
transform: rotate(-10deg);
|
| 365 |
z-index: 0;
|
| 366 |
}
|
| 367 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
.reveal-content {
|
| 369 |
position: relative;
|
| 370 |
z-index: 2;
|
| 371 |
+
width: min(100%, 560px);
|
| 372 |
+
min-height: min(82svh, 760px);
|
| 373 |
display: flex;
|
| 374 |
flex-direction: column;
|
| 375 |
align-items: center;
|
| 376 |
justify-content: center;
|
| 377 |
text-align: center;
|
| 378 |
+
border-radius: 34px;
|
| 379 |
padding: 34px 22px;
|
| 380 |
+
background: rgba(255, 253, 248, .82);
|
| 381 |
+
border: 1px solid rgba(37, 75, 107, .10);
|
| 382 |
+
box-shadow: 0 30px 90px rgba(37, 75, 107, .15);
|
| 383 |
+
backdrop-filter: blur(16px);
|
| 384 |
+
-webkit-backdrop-filter: blur(16px);
|
| 385 |
+
animation: revealPop .72s cubic-bezier(.2,.9,.16,1.18) both;
|
| 386 |
overflow: hidden;
|
| 387 |
}
|
| 388 |
|
| 389 |
.reveal-content::before {
|
| 390 |
content: "";
|
| 391 |
position: absolute;
|
| 392 |
+
inset: 22px;
|
| 393 |
+
border: 1px solid rgba(147, 150, 117, .28);
|
| 394 |
+
border-radius: 26px;
|
| 395 |
+
pointer-events: none;
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
.reveal-content::after {
|
| 399 |
+
content: "";
|
| 400 |
+
position: absolute;
|
| 401 |
left: 50%;
|
| 402 |
+
top: 27%;
|
| 403 |
+
width: 250px;
|
| 404 |
+
height: 250px;
|
| 405 |
+
transform: translate(-50%, -50%);
|
| 406 |
border-radius: 50%;
|
| 407 |
+
background: rgba(237, 211, 205, .34);
|
|
|
|
|
|
|
| 408 |
z-index: -1;
|
| 409 |
}
|
| 410 |
|
| 411 |
@keyframes revealPop {
|
| 412 |
+
from { opacity: 0; transform: translateY(28px) scale(.92); filter: blur(7px); }
|
| 413 |
+
60% { opacity: 1; transform: translateY(-3px) scale(1.02); filter: blur(0); }
|
| 414 |
+
to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
|
| 415 |
}
|
| 416 |
|
| 417 |
.hello {
|
| 418 |
+
margin: 0 0 28px;
|
| 419 |
+
color: rgba(37, 75, 107, .68);
|
| 420 |
+
font-size: clamp(14px, 4.2vw, 19px);
|
| 421 |
+
font-weight: 600;
|
| 422 |
letter-spacing: .02em;
|
| 423 |
}
|
| 424 |
|
| 425 |
.small-title {
|
|
|
|
|
|
|
|
|
|
| 426 |
margin-bottom: 18px;
|
| 427 |
+
color: var(--coral);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 428 |
font-size: 12px;
|
| 429 |
font-weight: 800;
|
| 430 |
+
letter-spacing: .18em;
|
| 431 |
text-transform: uppercase;
|
| 432 |
}
|
| 433 |
|
|
|
|
| 435 |
margin: 0;
|
| 436 |
max-width: 11ch;
|
| 437 |
color: var(--blue);
|
| 438 |
+
font-family: var(--font);
|
| 439 |
+
font-size: clamp(48px, 14vw, 92px);
|
| 440 |
+
line-height: .92;
|
| 441 |
letter-spacing: -.055em;
|
| 442 |
+
font-weight: 800;
|
| 443 |
text-wrap: balance;
|
|
|
|
| 444 |
}
|
| 445 |
|
| 446 |
+
.divider {
|
| 447 |
+
width: 92px;
|
| 448 |
+
height: 2px;
|
| 449 |
+
margin: 28px auto 22px;
|
| 450 |
+
border-radius: 999px;
|
| 451 |
+
background: var(--coral);
|
|
|
|
|
|
|
|
|
|
| 452 |
}
|
| 453 |
|
| 454 |
.reveal-note {
|
| 455 |
+
margin: 0 auto;
|
| 456 |
+
max-width: 28ch;
|
| 457 |
+
color: rgba(37, 75, 107, .68);
|
| 458 |
font-size: 15px;
|
| 459 |
+
line-height: 1.38;
|
| 460 |
+
font-weight: 500;
|
| 461 |
}
|
| 462 |
|
| 463 |
.again {
|
| 464 |
min-height: 52px;
|
| 465 |
+
margin-top: 30px;
|
| 466 |
border: 0;
|
| 467 |
border-radius: 999px;
|
| 468 |
+
padding: 0 24px;
|
| 469 |
+
color: var(--paper);
|
| 470 |
background: var(--blue);
|
| 471 |
+
box-shadow: 0 16px 36px rgba(37,75,107,.20);
|
| 472 |
+
font-family: var(--font);
|
| 473 |
font-size: 14px;
|
| 474 |
font-weight: 800;
|
| 475 |
cursor: pointer;
|
|
|
|
| 495 |
|
| 496 |
@media (max-width: 380px) {
|
| 497 |
.app { padding-left: 12px; padding-right: 12px; }
|
| 498 |
+
.card { min-height: 90svh; border-radius: 30px; }
|
| 499 |
+
.hero { padding: 36px 22px 22px; }
|
| 500 |
+
h1 { font-size: clamp(48px, 15vw, 70px); }
|
| 501 |
.form { padding-left: 22px; padding-right: 22px; }
|
| 502 |
+
input, .discover { min-height: 60px; }
|
| 503 |
+
.reveal-content { border-radius: 30px; padding-left: 16px; padding-right: 16px; }
|
| 504 |
}
|
| 505 |
|
| 506 |
@media (prefers-reduced-motion: reduce) {
|
|
|
|
| 519 |
<main class="app">
|
| 520 |
<section class="card" aria-label="Scopri il tavolo">
|
| 521 |
<div class="hero">
|
| 522 |
+
<div class="mini-mark" aria-hidden="true">🌊</div>
|
| 523 |
<h1>Trova la tua Cala</h1>
|
| 524 |
+
<div class="map-line" aria-hidden="true">
|
| 525 |
+
<svg viewBox="0 0 260 118" role="img">
|
| 526 |
+
<path d="M76 72 C64 61 68 48 84 45 C94 43 101 38 99 29 C96 17 112 11 125 19 C137 26 148 25 157 17 C170 6 190 17 184 34 C181 45 193 50 206 50 C224 50 233 66 220 78 C211 87 218 101 203 106 C189 111 181 98 169 103 C153 109 148 120 131 112 C118 106 110 106 97 111 C78 119 62 105 69 89 C72 82 81 79 76 72 Z" />
|
| 527 |
+
</svg>
|
|
|
|
| 528 |
</div>
|
| 529 |
</div>
|
| 530 |
|
| 531 |
<div class="form">
|
| 532 |
<label for="guestName">Nome e cognome</label>
|
| 533 |
<input id="guestName" autocomplete="name" inputmode="text" placeholder="Es. Gaia Pollastrini" />
|
| 534 |
+
<button class="discover" id="discover" type="button">Scopri il Tavolo</button>
|
| 535 |
<div id="message" class="message" aria-live="polite"></div>
|
| 536 |
<div id="status" class="status" aria-live="polite"></div>
|
| 537 |
</div>
|
|
|
|
| 543 |
<p class="hello" id="hello"></p>
|
| 544 |
<div class="small-title">Il tuo tavolo è</div>
|
| 545 |
<h2 class="table-name" id="tableName"></h2>
|
| 546 |
+
<div class="divider" aria-hidden="true"></div>
|
| 547 |
<p class="reveal-note">Segui la tua cala e goditi la serata.</p>
|
| 548 |
<button class="again" id="again" type="button">Cerca un altro nome</button>
|
| 549 |
</div>
|
| 550 |
</section>
|
| 551 |
|
| 552 |
<script>
|
| 553 |
+
const DATA_URL = "";
|
| 554 |
|
| 555 |
const SAMPLE_CSV = `
|
| 556 |
+
Nome Cognome,Nome del tavolo
|
| 557 |
+
Gaia Pollastrini,Cala Matano
|
| 558 |
+
Matteo Bergamelli,Cala delle Arene
|
| 559 |
+
Luca Bianchi,Cala Tramontana
|
| 560 |
+
Sara Conti,Cala Spido
|
| 561 |
+
Marco De Santis,Cala Zio Cesare
|
| 562 |
+
Elena Ferri,Cala degli Inglesi
|
| 563 |
+
Davide Greco,Cala Tonda
|
| 564 |
+
Chiara Romano,Cala dei Benedettini
|
| 565 |
+
Alessandro Rinaldi,Cala Pietre di Fucile
|
| 566 |
+
Martina Esposito,Cala Sorrentino
|
| 567 |
`;
|
| 568 |
|
| 569 |
const els = {
|
|
|
|
| 685 |
}
|
| 686 |
|
| 687 |
function showReveal(guest) {
|
| 688 |
+
els.hello.textContent = `Ciao ${firstName(guest.fullName)}`;
|
| 689 |
els.tableName.textContent = guest.tableName;
|
| 690 |
els.reveal.classList.add("show");
|
| 691 |
els.reveal.setAttribute("aria-hidden", "false");
|
|
|
|
| 751 |
const centerX = window.innerWidth / 2;
|
| 752 |
const centerY = window.innerHeight * .42;
|
| 753 |
|
| 754 |
+
confetti = Array.from({ length: 140 }, () => {
|
| 755 |
const angle = Math.random() * Math.PI * 2;
|
| 756 |
+
const speed = 3.5 + Math.random() * 7;
|
| 757 |
return {
|
| 758 |
x: centerX,
|
| 759 |
y: centerY,
|
| 760 |
+
size: 4 + Math.random() * 8,
|
| 761 |
vx: Math.cos(angle) * speed,
|
| 762 |
+
vy: Math.sin(angle) * speed - 4.5,
|
| 763 |
+
gravity: .16 + Math.random() * .12,
|
| 764 |
rotation: Math.random() * Math.PI,
|
| 765 |
+
spin: (Math.random() - .5) * .28,
|
| 766 |
color: colors[Math.floor(Math.random() * colors.length)],
|
| 767 |
+
life: 95 + Math.random() * 45
|
| 768 |
};
|
| 769 |
});
|
| 770 |
|
|
|
|
| 786 |
ctx.save();
|
| 787 |
ctx.translate(piece.x, piece.y);
|
| 788 |
ctx.rotate(piece.rotation);
|
| 789 |
+
ctx.globalAlpha = Math.max(piece.life / 110, 0);
|
| 790 |
ctx.fillStyle = piece.color;
|
| 791 |
ctx.fillRect(-piece.size / 2, -piece.size / 2, piece.size, piece.size * .62);
|
| 792 |
ctx.restore();
|