generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathindex.html
More file actions
262 lines (248 loc) · 8.23 KB
/
index.html
File metadata and controls
262 lines (248 loc) · 8.23 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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Purple Forest</title>
<link href="/index.css" rel="stylesheet" />
</head>
<body id="app">
<header>
<a href="/"
><h1>
<img
src="/logo.svg"
alt="Purple Forest "
width="50"
height="60"
/>
PurpleForest
</h1></a
>
<div id="logout-container" class="logout__component"></div>
<div id="login-container" class="login__component"></div>
</header>
<main tabindex="0">
<div id="heading-container" class="heading__component"></div>
<div id="signup-container" class="signup__component"></div>
<div id="profile-container" class="profile__component"></div>
<div id="bloom-form-container" class="bloom-form__component"></div>
<div id="timeline-container" class="timeline__component grid"></div>
</main>
<footer>
<h3>This Legacy Code project is coursework from Code Your Future</h3>
</footer>
<div id="error-container" class="error__component"></div>
<!---TEMPLATES FOLLOW, THESE ARE INERT-->
<template id="logout-template">
<button type="button" data-action="logout" data-logout-button>
Logout
</button>
</template>
<!-- Login Component Template -->
<template id="login-template">
<section aria-label="Log in or sign up" class="login">
<form data-form="login" class="login__form" method="post">
<div class="login__field">
<label class="login__label is-invisible" for="username"
>Username</label
>
<input
class="login__input"
type="text"
id="username"
name="username"
autocomplete="username"
required
placeholder="Username"
/>
</div>
<div class="login__field">
<label class="login__label is-invisible" for="password"
>Password</label
>
<input
class="login__input"
type="password"
id="password"
name="password"
autocomplete="current-password"
required
placeholder="password"
/>
</div>
<button type="submit" data-submit class="login__submit">
Log in
</button>
</form>
<p class="login__footer system-message" data-signup>
Don't have an account?
<a href="/signup" data-action="signup" class="login__signup-link"
>Sign up</a
>
</p>
</section>
</template>
<!-- Page Heading Component Template -->
<template id="heading-template">
<header class="page-heading">
<h2 data-heading>Page heading</h2>
</header>
</template>
<!-- Signup Component Template -->
<template id="signup-template">
<section aria-labelledby="signup-heading" class="signup">
<h1 id="signup-heading" class="signup__title">Create your account</h1>
<form data-form="signup" class="signup__form" method="post">
<div class="signup__field">
<label class="signup__label" for="signup-username">Username</label>
<input
class="signup__input"
type="text"
id="signup-username"
name="username"
autocomplete="username"
required
/>
</div>
<div class="signup__field">
<label class="signup__label" for="signup-password">Password</label>
<input
class="signup__input"
type="password"
id="signup-password"
name="password"
autocomplete="new-password"
required
/>
</div>
<div class="signup__field">
<label class="signup__label" for="signup-password-confirmation"
>Confirm Password</label
>
<input
class="signup__input"
type="password"
id="signup-password-confirmation"
name="password_confirmation"
autocomplete="new-password"
required
/>
</div>
<button type="submit" data-submit class="signup__submit">
Sign up
</button>
</form>
<p class="signup__footer system-message">
Already have an account?
<a href="/login" data-action="login" class="signup__login-link"
>Log in</a
>
</p>
</section>
</template>
<!-- Profile Component Template -->
<template id="profile-template">
<section aria-labelledby="profile-username" class="profile">
<header class="profile__header flex">
<div
class="profile__avatar"
data-avatar
role="img"
aria-label="User avatar"
>
🟣
</div>
<a
href=""
data-username
class="profile__username"
aria-label="View user profile"
><h2>Username</h2></a
>
</header>
<dl class="profile__stats">
<div class="profile__stat flex">
<dt>Following</dt>
<dd data-following-count>0</dd>
</div>
<div class="profile__stat flex">
<dt>Followers</dt>
<dd data-follower-count>0</dd>
</div>
<div class="profile__stat flex">
<dt>Blooms</dt>
<dd data-bloom-count>0</dd>
</div>
</dl>
<div class="profile__actions">
<button type="button" data-action="follow">Follow</button>
<button type="button" data-action="unfollow" hidden>Unfollow</button>
</div>
<div class="profile__who-to-follow">
<h4>Who to follow</h4>
<ul data-who-to-follow>
</ul>
</div>
</section>
</template>
<template id="who-to-follow-chip">
<li>
<div><a data-username></a></div>
<div class="profile__actions">
<button type="button" data-action="follow">Follow</button>
</div>
</li>
</template>
<!-- Bloom Form Component Template -->
<template id="bloom-form-template">
<section aria-labelledby="bloom-form-title" class="bloom-form">
<h2 id="bloom-form-title" class="bloom-form__title">Share a Bloom</h2>
<form data-form="bloom" class="bloom-form__form" method="post">
<div class="bloom-form__field">
<label class="bloom-form__label is-invisible" for="bloom-content"
>What's happening?</label
>
<textarea
class="bloom-form__textarea"
id="bloom-content"
name="content"
placeholder="What's happening?"
maxlength="280"
spellcheck="true"
required
></textarea>
<div class="bloom-form__counter" data-counter>0/280</div>
</div>
<button type="submit" data-submit class="bloom-form__submit">
Bloom
</button>
</form>
</section>
</template>
<!-- Timeline -->
<!-- Bloom Template -->
<template id="bloom-template">
<article class="bloom box" data-bloom data-bloom-id="">
<div class="bloom__header flex">
<a href="#" class="bloom__username" data-username>Username</a>
<a href="#" class="bloom__time"><time class="bloom__time" data-time>2m</time></a>
</div>
<div class="bloom__content" data-content></div>
</article>
</template>
<!-- Error Dialog Template -->
<template id="error-template">
<dialog class="error-dialog box" data-error>
<div class="error-dialog__content system-message" data-content></div>
<button data-action="close-error" class="error-dialog__close">
Dismiss
</button>
</dialog>
</template>
<noscript>
<p>Please enable JavaScript in your browser.</p>
</noscript>
<script type="module" src="/index.mjs"></script>
</body>
</html>