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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="theme-color" content="#c9b8ff">
<title>dreamchat</title>
<style>
:root {
--grad-start: #c9b8ff;
--grad-end: #f9b8e8;
--accent: #8b6cef;
--surface: #ffffff;
--text-main: #2d2040;
--text-muted: #8c7faa;
--radius-card: 24px;
--shadow: 0 8px 32px rgba(139, 108, 239, 0.18);
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
min-height: 100dvh;
background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
display: flex;
align-items: center;
justify-content: center;
font-family: var(--font);
padding: 24px;
}
.card {
background: var(--surface);
border-radius: var(--radius-card);
box-shadow: var(--shadow);
padding: 40px 32px;
width: 100%;
max-width: 400px;
text-align: center;
}
.logo {
font-size: 3rem;
margin-bottom: 12px;
line-height: 1;
}
.title {
font-size: 2rem;
font-weight: 700;
background: linear-gradient(135deg, var(--accent), #e06aba);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 8px;
}
.subtitle {
color: var(--text-muted);
margin-bottom: 28px;
font-size: 0.95rem;
}
.input-row {
display: flex;
gap: 10px;
}
.input-row input {
flex: 1;
min-width: 0;
border: 2px solid #e8e0ff;
border-radius: 50px;
padding: 12px 18px;
font-size: 1rem;
font-family: var(--font);
color: var(--text-main);
outline: none;
transition: border-color 0.2s;
}
.input-row input:focus {
border-color: var(--accent);
}
.input-row input::placeholder {
color: var(--text-muted);
}
.input-row button {
background: linear-gradient(135deg, var(--accent), #b06add);
color: #fff;
border: none;
border-radius: 50px;
padding: 12px 22px;
font-size: 1rem;
font-weight: 600;
font-family: var(--font);
cursor: pointer;
white-space: nowrap;
transition: opacity 0.15s, transform 0.1s;
}
.input-row button:hover { opacity: 0.9; }
.input-row button:active { transform: scale(0.96); }
</style>
</head>
<body>
<div class="card">
<div class="logo">💬</div>
<h1 class="title">dreamchat</h1>
<p class="subtitle">Where do you want to go?</p>
<div class="input-row">
<input id="room-name-input" type="text" placeholder="Room name"
aria-label="Room name"
autocomplete="off" autocapitalize="off" spellcheck="false">
<button id="room-name-submit">Enter</button>
</div>
</div>
<script>
document.querySelector('#room-name-input').focus();
document.querySelector('#room-name-input').onkeyup = function(event) {
if (event.key === 'Enter') {
document.querySelector('#room-name-submit').click();
}
};
document.querySelector('#room-name-submit').onclick = function() {
const roomName = document.querySelector('#room-name-input').value;
window.location.pathname = '/' + roomName + '/';
};
</script>
</body>
</html>
|