-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.go.html
More file actions
246 lines (221 loc) · 7.5 KB
/
index.go.html
File metadata and controls
246 lines (221 loc) · 7.5 KB
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>Prosperity Secret Santa</title>
<meta name="theme-color" content="#378B29"/>
<meta name="default-theme" content="auto"/>
<meta name="author" content="Prosperity"/>
<meta name="description" content="Prosperity Secret Santa"/>
<meta name="keywords" content="prosperity,secret santa"/>
<meta name="referrer" content="no-referrer"/>
<meta property="og:title" content="Prosperity Secret Santa"/>
<meta property="og:url" content="https://prosperity-secret-santa.mrmelon54.com"/>
<meta property="og:type" content="object"/>
<meta property="og:image" content="https://prosperity-secret-santa.mrmelon54.com/christmas-logo.png"/>
<meta property="og:site_name" content="Prosperity Secret Santa"/>
<link rel="icon" type="image/svg+xml" href="/christmas-logo.svg"/>
<link rel="icon" type="image/png" href="/christmas-logo.png"/>
<style>
:root {
color-scheme: light dark;
font-size: 16px;
line-height: 24px;
}
html, body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
font-size: 16px;
}
@font-face {
font-family: 'Ubuntu', serif;
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('/Ubuntu.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
#app {
display: flex;
flex-direction: column;
}
#header {
position: sticky;
top: 0;
z-index: 50;
border-bottom-width: 1px;
transition-duration: 150ms;
user-select: none;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.625rem 2rem;
width: min(calc(100% - 4rem), 1536px);
align-self: center;
}
#header-start {
display: flex;
gap: 2rem;
align-items: center;
}
#header-end {
display: flex;
flex-grow: 1;
gap: 2rem;
justify-content: flex-end;
}
#header-home {
display: inline-flex;
flex-shrink: 0;
align-items: center;
font-weight: 700;
}
#header-home img {
display: inline-block;
border-radius: 0.25rem;
width: 1.75rem;
height: 1.75rem;
color: transparent;
}
#header-home header {
display: none;
margin-left: 1rem;
}
@media (min-width: 1024px) {
#header-home header {
display: block;
}
}
#header-start a {
font-weight: 500;
color: #ffffff;
}
#header-end a {
padding: 0.25rem 1.5rem;
justify-items: end;
border-radius: 0.25rem;
background-color: #f59f0a;
transition-duration: 150ms;
}
#header-end a:hover {
background-color: #fbbd23;
}
#header-end img.avatar {
width: 1.75rem;
height: 1.75rem;
}
button {
background-color: #fecd49;
transition-duration: .15s;
color: #111213;
padding: .25rem 1.5rem;
border-radius: .25rem;
border: 0;
font-size: 16px;
cursor: pointer;
}
#content {
margin-left: auto;
margin-right: auto;
max-width: 1536px;
padding-left: 2rem;
padding-right: 2rem;
padding-top: 4rem;
flex-grow: 1;
}
#content main {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin: auto;
}
#content main section {
text-align: center;
gap: 3rem;
flex-direction: column;
display: flex;
margin-top: auto;
margin-bottom: auto;
line-height: 1.625;
}
#content main section header {
line-height: 1;
font-weight: 700;
color: #e4e6e7;
}
.santa {
font-size: 72px;
}
#content main section p {
line-height: 1.625;
color: #91969c;
font-weight: 500;
max-width: 42rem;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
<div id="app">
<nav id="header">
<span id="header-start">
<a id="header-home" href="/">
<img alt="" loading="lazy" width="256" height="256" decoding="async" data-nimg="1" src="/christmas-logo.png">
<header>Prosperity Secret Santa</header>
</a>
<a referrerpolicy="no-referrer" target="_blank" href="https://prosperitymc.net">Prosperity MC</a>
</span>
<span id="header-end">
{{if .LoggedIn}}
<img class="avatar" src="{{.ProfilePicture}}" alt="Profile Picture"/>
<span class="name">{{.ProfileName}}</span>
<form method="POST" action="/logout">
<button type="submit">Logout</button>
</form>
{{else}}
<form method="POST" action="/login">
<button type="submit">Login</button>
</form>
{{end}}
</span>
</nav>
<div id="content">
<main>
<section>
<header class="santa">🎅</header>
<p>Secret Santa's will be picked on {{.EndDate}}. Please register before that date to be picked to receive a present.</p>
{{if .HasEnded}}
<p>Registration has ended.</p>
{{if .LoggedIn}}
{{if gt (len .SecretPlayer.DiscordUser) 0}}
<p>You are Secret Santa for <code>{{.SecretPlayer.DiscordUser}}</code> - Minecraft IGN: <code>{{.SecretPlayer.McUser}}</code></p>
{{end}}
{{end}}
{{else}}
{{if .LoggedIn}}
{{if .HasRegistered}}
<p>You are registered for Secret Santa, please return later to receive your player.</p>
{{else}}
<form method="POST" action="/register">
<div>
<label>Minecraft Username: <input type="text" name="mc_user"></label>
</div>
<div>
<button type="submit">Register for Secret Santa</button>
</div>
</form>
{{end}}
{{else}}
<p>Login with the button above to be able to register.</p>
{{end}}
{{end}}
</section>
</main>
</div>
</div>
</body>
</html>