-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
238 lines (195 loc) · 7.95 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style>
.post-grid {
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.post-card {
flex: 1 1 calc(33.333% - 20px);
box-sizing: border-box;
}
.hidden {
display: none;
}
@media (max-width: 992px) {
.post-card {
flex: 1 1 calc(50% - 20px);
}
}
@media (max-width: 600px) {
.post-card {
flex: 1 1 100%;
}
}
.font-weight-700 {
font-weight: 700;
}
.font-weight-800 {
font-weight: 800;
}
.font-weight-900 {
font-weight: 900;
}
</style>
<title>BlogPost(PFB)</title>
</head>
<body class="grey lighten-3">
<!-- NAVBAR-->
<nav class="z-depth-1 lighten-3">
<div class="nav-wrapper container">
<a href="#" class="brand-logo">
<img src="/img/logo (1).png" style="width: 40px; margin-top: 10px;">
</a>
<a href="#" data-target="mobile-demo" class="sidenav-trigger"><i class="material-icons">menu</i></a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li class="logged-in" style="display: none">
<a href="#" class="white-text modal-trigger" data-target="modal-account">Account</a>
</li>
<li class="logged-in" style="display: none">
<a href="#" class="white-text" id="logout">Logout</a>
</li>
<li class="admin" style="display: none">
<a href="#" class="white-text modal-trigger" data-target="modal-create">Create Post</a>
</li>
<li class="logged-out" style="display: none">
<a href="#" class="white-text modal-trigger" data-target="modal-login">Login</a>
</li>
<li class="logged-out" style="display: none">
<a href="#" class="white-text modal-trigger" data-target="modal-signup">Sign Up</a>
</li>
</ul>
</div>
</nav>
<!-- Mobile Nav -->
<ul class="sidenav" id="mobile-demo">
<li class="logged-in" style="display: none">
<a href="#" class="grey-text modal-trigger" data-target="modal-account">Account</a>
</li>
<li class="logged-in" style="display: none">
<a href="#" class="grey-text" id="logout">Logout</a>
</li>
<li class="admin" style="display: none">
<a href="#" class="grey-text modal-trigger" data-target="modal-create">Create Post</a>
</li>
<li class="logged-out" style="display: none">
<a href="#" class="grey-text modal-trigger" data-target="modal-login">Login</a>
</li>
<li class="logged-out" style="display: none">
<a href="#" class="grey-text modal-trigger" data-target="modal-signup">Sign Up</a>
</li>
</ul>
<!-- Notification Modal Structure -->
<div id="modal-login-notification" class="modal">
<div class="modal-content">
<h4>Notice</h4>
<p>You have reached your free post viewing limit. Please log in or sign up to continue.</p>
</div>
<div class="modal-footer">
<button id="notify-login-btn" data-target="modal-login"
class="modal-close waves-effect waves-green btn-flat">Log In</button>
<button id="notify-signup-btn" data-target="modal-signup"
class="modal-close waves-effect waves-green btn-flat">Sign Up</button>
</div>
</div>
<!-- ADMIN ACTIONS -->
<form class="center-align admin-actions admin" style="margin: 40px auto; max-width: 300px; display: none;">
<input type="email" placeholder="User email" id="admin-email" required>
<button class="btn-small yellow darken-2 z-depth-1">Make Admin</button>
</form>
<!-- SIGNUP -->
<div id="modal-signup" class="modal">
<div class="modal-content">
<h4>Sign Up</h4><br>
<form id="signup-form">
<div class="input-field">
<input type="email" id="signup-email" required>
<label for="signup-email">Email address</label>
</div>
<div class="input-field">
<input type="password" id="signup-password" required>
<label for="signup-password">Choose password</label>
</div>
<div class="input-field">
<input type="text" id="signup-bio" required>
<label for="signup-bio">One line bio</label>
</div>
<button class="btn yellow darken-2 z-depth-1">Sign Up</button>
<p class="error pink-text text-align">
</p>
</form>
</div>
</div>
<!-- LOGIN -->
<div id="modal-login" class="modal">
<div class="modal-content">
<h4>Login</h4><br>
<form id="login-form">
<div class="input-field">
<input type="email" id="login-email" required>
<label for="login-email">Email address</label>
</div>
<div class="input-field">
<input type="password" id="login-password" required>
<label for="login-password">Enter Your Password</label>
</div>
<button class="btn yellow darken-2 z-depth-1">Login</button>
<p class="error pink-text text-align">
</p>
</form>
</div>
</div>
<!-- Modal Account -->
<div id="modal-account" class="modal">
<div class="modal-content center-align">
<h4>Account Details</h4><br>
<div class="account-details"></div>
</div>
</div>
<!-- CREATE A POST -->
<div id="modal-create" class="modal">
<div class="modal-content">
<h4>Create a New Post</h4>
<form id="create-form">
<div class="input-field">
<input id="title" type="text" class="validate" required>
<label for="post_title">Title</label>
</div>
<div class="input-field">
<textarea id="content" class="materialize-textarea" required></textarea>
<label for="post_content">Content</label>
</div>
<div class="file-field input-field">
<div class="btn">
<span>Image</span>
<input type="file" id="post_image" accept="image/*" required>
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" placeholder="Upload an image">
</div>
</div>
<div class="modal-footer">
<button type="submit" class="modal-close waves-effect waves-green btn">Submit</button>
<p class="error pink-text text-align">
</p>
</div>
</form>
</div>
</div>
<!-- POST GRID -->
<div class="container" style="margin-top: 40px;">
<div class="post-grid" id="post-grid">
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script type="module" src="/scripts/auth.js">
</script>
<script type="module" src="/scripts/index.js"></script>
</body>
</html>