| Name | Message | Date |
|---|---|---|
| 📁 join | 1 month ago | |
| 📁 master | 1 month ago | |
| 📄 +layout.svelte | 1 month ago | |
| 📄 +page.svelte | 1 month ago |
📄
+page.svelte
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<script lang="ts">
import { goto } from "$app/navigation";
function createRoom() {
goto("/master");
}
function joinRoom() {
goto("/join");
}
</script>
<div class="home-container">
<div class="content">
<h1>Stop It!</h1>
<p class="subtitle">Multi-Device Reaction Game</p>
<div class="button-container">
<button class="primary-button" onclick={createRoom}>
<div class="button-icon">🎮</div>
<div class="button-text">
<div class="button-title">Create Game</div>
<div class="button-description">Start as master device</div>
</div>
</button>
<button class="secondary-button" onclick={joinRoom}>
<div class="button-icon">📱</div>
<div class="button-text">
<div class="button-title">Join Game</div>
<div class="button-description">Connect as display device</div>
</div>
</button>
</div>
<div class="info">
<h3>How to Play:</h3>
<ol>
<li>One device creates a game as the master</li>
<li>Other devices join using the room code</li>
<li>Configure players and duration on the master</li>
<li>When a color appears on your screen, tap it quickly!</li>
<li>The player with the most points wins</li>
</ol>
</div>
</div>
</div>
<style>
:global(body) {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
.home-container {
min-height: 100vh;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
justify-content: center;
align-items: center;
padding: 2rem;
}
.content {
max-width: 600px;
width: 100%;
text-align: center;
}
h1 {
font-size: 4rem;
color: white;
margin-bottom: 0.5rem;
text-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
.subtitle {
font-size: 1.5rem;
color: rgba(255, 255, 255, 0.9);
margin-bottom: 3rem;
}
.button-container {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin-bottom: 3rem;
}
.primary-button,
.secondary-button {
display: flex;
align-items: center;
gap: 1.5rem;
padding: 1.5rem 2rem;
border: none;
border-radius: 12px;
cursor: pointer;
transition: all 0.3s;
text-align: left;
}
.primary-button {
background: white;
color: #333;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.primary-button:hover {
transform: translateY(-4px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.secondary-button {
background: rgba(255, 255, 255, 0.2);
color: white;
border: 2px solid white;
backdrop-filter: blur(10px);
}
.secondary-button:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-4px);
}
.button-icon {
font-size: 3rem;
}
.button-text {
flex: 1;
}
.button-title {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 0.25rem;
}
.button-description {
font-size: 1rem;
opacity: 0.8;
}
.info {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(10px);
border-radius: 12px;
padding: 2rem;
color: white;
border: 1px solid rgba(255, 255, 255, 0.3);
}
.info h3 {
margin-top: 0;
margin-bottom: 1rem;
font-size: 1.3rem;
}
.info ol {
text-align: left;
margin: 0;
padding-left: 1.5rem;
}
.info li {
margin-bottom: 0.75rem;
font-size: 1rem;
line-height: 1.5;
}
@media (max-width: 600px) {
h1 {
font-size: 3rem;
}
.subtitle {
font-size: 1.2rem;
}
.button-title {
font-size: 1.25rem;
}
.button-icon {
font-size: 2.5rem;
}
}
</style>