create-volt 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Confirm login — Guestbook</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
8
+ <style>
9
+ body { background: #0f1115; color: #e7e9ee; }
10
+ .card-x { background: #161a22; border: 1px solid #232a36; border-radius: 14px; }
11
+ .accent { color: #ffd24a; }
12
+ a { color: #ffd24a; }
13
+ </style>
14
+ </head>
15
+ <body>
16
+ <main class="container py-5" style="max-width: 480px;">
17
+ <div class="card-x p-4 text-center">
18
+ <h1 class="h4 mb-3"><span class="accent">📖 Guestbook</span></h1>
19
+ <p class="text-muted">Click below to finish signing in. The link must be opened in the same browser you requested it from.</p>
20
+ <button id="confirm" class="btn btn-primary w-100">Confirm login</button>
21
+ <p id="status" class="mt-3 mb-0 small text-muted"></p>
22
+ </div>
23
+ </main>
24
+
25
+ <script>
26
+ const token = "{{TOKEN}}";
27
+ const btn = document.getElementById("confirm");
28
+ const status = document.getElementById("status");
29
+ btn.addEventListener("click", async () => {
30
+ btn.disabled = true;
31
+ status.textContent = "Confirming…";
32
+ try {
33
+ const res = await fetch("/api/confirm", {
34
+ method: "POST",
35
+ headers: { "Content-Type": "application/json" },
36
+ body: JSON.stringify({ token }),
37
+ });
38
+ const data = await res.json();
39
+ if (data.ok) {
40
+ status.textContent = "Signed in! Redirecting…";
41
+ location.href = "/";
42
+ } else {
43
+ status.textContent = data.error || "Could not sign in.";
44
+ btn.disabled = false;
45
+ }
46
+ } catch {
47
+ status.textContent = "Network error — try again.";
48
+ btn.disabled = false;
49
+ }
50
+ });
51
+ </script>
52
+ </body>
53
+ </html>
@@ -0,0 +1,38 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Guestbook — built with Volt</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
8
+ <style>
9
+ body { background: #0f1115; color: #e7e9ee; }
10
+ .brand { font-weight: 800; letter-spacing: -.02em; }
11
+ .accent { color: #ffd24a; }
12
+ .card-x { background: #161a22; border: 1px solid #232a36; border-radius: 14px; }
13
+ .form-control, .input-group-text { background: #0f1115; color: #e7e9ee; border-color: #232a36; }
14
+ .form-control:focus { background: #0f1115; color: #e7e9ee; border-color: #ffd24a; box-shadow: none; }
15
+ .msg { border-bottom: 1px solid #232a36; }
16
+ .msg:last-child { border-bottom: 0; }
17
+ .who { color: #ffd24a; font-weight: 600; }
18
+ a { color: #ffd24a; }
19
+ </style>
20
+ </head>
21
+ <body>
22
+ <main class="container py-5" style="max-width: 680px;">
23
+ <!--#include header-->
24
+
25
+ <div id="app"></div>
26
+
27
+ <footer class="text-center text-muted mt-5">
28
+ <small>Real-time via Socket.io · magic-link auth · pluggable storage.</small>
29
+ <div class="mt-2">
30
+ <small><a href="https://github.com/MIR-2025/volt#readme" target="_blank" rel="noopener">📖 How to build a Volt app →</a></small>
31
+ </div>
32
+ </footer>
33
+ </main>
34
+
35
+ <script src="/socket.io/socket.io.js"></script>
36
+ <script type="module" src="/app.js"></script>
37
+ </body>
38
+ </html>
@@ -0,0 +1,4 @@
1
+ <header class="text-center mb-4">
2
+ <h1 class="brand display-6"><span class="accent">📖 Guestbook</span></h1>
3
+ <p class="text-muted mb-0">Sign in with a magic link and leave a message — new posts appear live for everyone.</p>
4
+ </header>
File without changes
File without changes
File without changes
File without changes
File without changes