|
22 | 22 | text-shadow: 0 0 8px var(--red3), 0 0 16px var(--red2); |
23 | 23 | opacity: 1; |
24 | 24 | } |
| 25 | + .alt-access { |
| 26 | + margin-top: 8px; |
| 27 | + display: inline-grid; |
| 28 | + justify-items: center; |
| 29 | + gap: 12px; |
| 30 | + } |
| 31 | + .alt-access-toggle { |
| 32 | + min-width: 46px; |
| 33 | + height: 32px; |
| 34 | + padding: 0 14px 2px; |
| 35 | + border-radius: 999px; |
| 36 | + border: 1px solid rgba(255,255,255,0.12); |
| 37 | + background: rgba(255,255,255,0.04); |
| 38 | + color: rgba(255,255,255,0.72); |
| 39 | + font-size: 0.92rem; |
| 40 | + letter-spacing: 0.22em; |
| 41 | + box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset; |
| 42 | + cursor: pointer; |
| 43 | + transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease; |
| 44 | + } |
| 45 | + .alt-access-toggle:hover { |
| 46 | + transform: translateY(-1px); |
| 47 | + background: rgba(220,20,60,0.10); |
| 48 | + border-color: rgba(220,20,60,0.32); |
| 49 | + color: #fff; |
| 50 | + box-shadow: 0 0 18px rgba(220,20,60,0.16); |
| 51 | + } |
| 52 | + .alt-access-menu { |
| 53 | + display: grid; |
| 54 | + gap: 10px; |
| 55 | + width: min(420px, 100%); |
| 56 | + padding: 14px; |
| 57 | + border-radius: 22px; |
| 58 | + background: |
| 59 | + radial-gradient(120% 140% at 50% 0%, rgba(220,20,60,0.10), transparent 55%), |
| 60 | + rgba(18, 14, 24, 0.82); |
| 61 | + border: 1px solid rgba(220,20,60,0.22); |
| 62 | + box-shadow: |
| 63 | + 0 18px 38px rgba(0,0,0,0.22), |
| 64 | + 0 0 24px rgba(220,20,60,0.10); |
| 65 | + backdrop-filter: blur(8px); |
| 66 | + } |
| 67 | + .alt-access-menu[hidden] { |
| 68 | + display: none !important; |
| 69 | + } |
| 70 | + .alt-access-link { |
| 71 | + display: block; |
| 72 | + width: 100%; |
| 73 | + padding: 14px 18px; |
| 74 | + border-radius: 999px; |
| 75 | + border: 1px solid rgba(255,255,255,0.12); |
| 76 | + background: linear-gradient(180deg, rgba(30, 22, 34, 0.92), rgba(22, 17, 27, 0.92)); |
| 77 | + color: #fff; |
| 78 | + text-decoration: none; |
| 79 | + font-size: 0.92rem; |
| 80 | + font-weight: 700; |
| 81 | + letter-spacing: 0.03em; |
| 82 | + text-transform: uppercase; |
| 83 | + box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset; |
| 84 | + transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease; |
| 85 | + } |
| 86 | + .alt-access-link:hover { |
| 87 | + transform: translateY(-1px); |
| 88 | + background: linear-gradient(180deg, rgba(90, 10, 18, 0.94), rgba(116, 14, 28, 0.94)); |
| 89 | + border-color: rgba(220,20,60,0.42); |
| 90 | + box-shadow: 0 0 18px rgba(220,20,60,0.14); |
| 91 | + } |
25 | 92 | :root { |
26 | 93 | --bg: #0c0f14; |
27 | 94 | --red1: #8b0000; |
|
353 | 420 |
|
354 | 421 |
|
355 | 422 | <button class="btn" id="unlockBtn" type="submit">Enter with your key</button> |
356 | | - <div style="text-align:center;margin-top:8px;"> |
| 423 | + <div style="text-align:center;margin-top:8px;display:grid;justify-items:center;gap:12px;"> |
357 | 424 | <a class="about-link" href="https://github.com/PivotMenace/Noctive" target="_blank" rel="noopener noreferrer">You're not Venus</a> |
| 425 | + <div class="alt-access"> |
| 426 | + <button |
| 427 | + class="alt-access-toggle" |
| 428 | + id="altAccessToggle" |
| 429 | + type="button" |
| 430 | + aria-label="More login options" |
| 431 | + aria-expanded="false" |
| 432 | + aria-controls="altAccessMenu" |
| 433 | + >...</button> |
| 434 | + <div class="alt-access-menu" id="altAccessMenu" hidden> |
| 435 | + <a class="alt-access-link" href="./pages/login-google.html" id="loginGoogleBtn">LOGIN WITH GOOGLE</a> |
| 436 | + <a class="alt-access-link" href="./pages/login-email.html" id="loginEmailBtn">LOGIN WITH EMAIL</a> |
| 437 | + <a class="alt-access-link" href="./pages/signup.html" id="signUpBtn">Not a user? Sign up</a> |
| 438 | + </div> |
| 439 | + </div> |
358 | 440 | </div> |
359 | 441 |
|
360 | 442 | <div class="status" id="status"></div> |
|
370 | 452 | const status = document.getElementById("status"); |
371 | 453 | const unlockForm = document.getElementById("unlockForm"); |
372 | 454 | const codeInputs = document.querySelectorAll("#codeInputs input.code-char"); |
| 455 | + const altAccessToggle = document.getElementById("altAccessToggle"); |
| 456 | + const altAccessMenu = document.getElementById("altAccessMenu"); |
| 457 | + const loginGoogleBtn = document.getElementById("loginGoogleBtn"); |
| 458 | + const loginEmailBtn = document.getElementById("loginEmailBtn"); |
| 459 | + const signUpBtn = document.getElementById("signUpBtn"); |
373 | 460 |
|
374 | 461 | function normalize(v) { |
375 | 462 | return (v || "").trim().toUpperCase().replace(/\s+/g, ""); |
|
385 | 472 | } |
386 | 473 | } |
387 | 474 |
|
| 475 | + function closeAltAccessMenu() { |
| 476 | + altAccessMenu?.setAttribute("hidden", "hidden"); |
| 477 | + altAccessToggle?.setAttribute("aria-expanded", "false"); |
| 478 | + } |
| 479 | + |
388 | 480 | function shake() { |
389 | 481 | pill.classList.remove("shake"); |
390 | 482 | void pill.offsetWidth; |
|
402 | 494 | } |
403 | 495 |
|
404 | 496 | if (sessionStorage.getItem(ACCESS_SESSION_KEY) === "granted") { |
405 | | - window.location.replace("https://www.noctive.us/pages/home.html"); |
| 497 | + window.location.replace("./pages/home.html"); |
406 | 498 | } |
407 | 499 |
|
408 | 500 | function tryUnlock() { |
|
420 | 512 | setStatus("Access granted.", "good"); |
421 | 513 | sessionStorage.setItem(ACCESS_SESSION_KEY, "granted"); |
422 | 514 | setTimeout(() => { |
423 | | - window.location.replace("https://www.noctive.us/pages/home.html"); |
| 515 | + window.location.replace("./pages/home.html"); |
424 | 516 | }, 900); |
425 | 517 | } else { |
426 | 518 | setStatus("Invalid key.", "bad"); |
|
435 | 527 | tryUnlock(); |
436 | 528 | }); |
437 | 529 |
|
| 530 | + altAccessToggle?.addEventListener("click", () => { |
| 531 | + const isHidden = altAccessMenu?.hasAttribute("hidden"); |
| 532 | + if (isHidden) { |
| 533 | + altAccessMenu?.removeAttribute("hidden"); |
| 534 | + altAccessToggle.setAttribute("aria-expanded", "true"); |
| 535 | + } else { |
| 536 | + closeAltAccessMenu(); |
| 537 | + } |
| 538 | + }); |
| 539 | + |
| 540 | + loginGoogleBtn?.addEventListener("click", () => { |
| 541 | + closeAltAccessMenu(); |
| 542 | + }); |
| 543 | + |
| 544 | + loginEmailBtn?.addEventListener("click", () => { |
| 545 | + closeAltAccessMenu(); |
| 546 | + }); |
| 547 | + |
| 548 | + signUpBtn?.addEventListener("click", () => { |
| 549 | + closeAltAccessMenu(); |
| 550 | + }); |
| 551 | + |
438 | 552 | codeInputs.forEach((input, idx) => { |
439 | 553 | input.addEventListener("input", (e) => { |
440 | 554 | let val = input.value.toUpperCase().replace(/[^A-Z0-9]/g, ""); |
|
0 commit comments