forked from jplip/self-care-front
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
284 lines (226 loc) · 7.45 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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family=Times+New+Roman&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
font-family: 'Times New Roman', serif;
display: flex;
align-items: center; /* Center vertically */
justify-content: center; /* Center horizontally */
min-height: 100vh;
position: relative;
background-image: url('e285661a023fb83c8d7f975980422c22.gif');
background-size: cover;
}
.top-buttons {
text-align: center; /* Align buttons in the center */
}
.button {
padding: 8px 16px;
background-color: #fff; /* White color */
color: #4CAF50; /* Green color */
text-decoration: none;
border: 2px solid #4CAF50; /* Green border */
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
}
.button:hover {
background-color: #4CAF50; /* Green color */
color: #fff; /* White color */
}
.sidebar {
position: fixed;
left: 0;
top: 0;
width: 80px;
height: 100%;
background-color: #303030;
overflow: hidden;
transition: width 0.3s;
z-index: 1;
}
.sidebar.active {
width: 200px;
}
.menu-icon {
display: block;
text-align: center;
padding: 20px 0;
color: #fff;
cursor: pointer;
}
.menu-list {
list-style-type: none;
padding: 0;
margin: 0;
display: none; /* Initially hide menu items */
}
.sidebar.active .menu-list {
display: block; /* Display menu items when sidebar is active */
}
.menu-item {
padding: 15px 0;
color: #fff;
text-align: center;
transition: background-color 0.3s;
}
.menu-item:hover {
background-color: #444;
}
.main-content {
text-align: center;
flex: 1;
padding: 20px;
color: #fff; /* White color */
}
.image-container {
margin-top: 50px; /* Adjusted margin-top */
text-align: center;
}
.image-container table {
margin: 0 auto;
}
.image-container img {
width: 300px;
height: 300px;
margin: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
background-color: #fff; /* White background */
}
.image-container img:hover {
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}
.welcome-text {
text-align: center;
margin-bottom: 30px;
}
.welcome-text h1 {
font-size: 36px;
font-weight: bold;
margin-bottom: 10px;
color: #4CAF50; /* Green color */
}
.welcome-text p {
font-size: 18px;
color: #4CAF50; /* Green color */
}
.dropdown {
position: absolute;
top: 20px;
right: 20px;
}
.dropbtn {
background-color: #303030;
color: white;
padding: 10px;
font-family: 'Times New Roman', serif;
border: none;
cursor: pointer;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #303030;
min-width: 120px;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
background-color: #444;
}
</style>
{% include sidebar.html %}
<div class="dropdown">
<div class="dropbtn">Settings</div>
<div class="dropdown-content">
<a href="profiley">Profile</a>
<a onclick="logout()">Log Out</a>
</div>
</div>
<!--
<div class="sidebar" id="sidebar">
<div class="menu-icon" onclick="toggleSidebar()">
<div>☰</div>
</div>
<ul class="menu-list">
<li class="menu-item"><a href="depression" style="color: #fff; text-decoration: none;">Depression</a></li>
<li class="menu-item"><a href="stroke" style="color: #fff; text-decoration: none;">Stroke</a></li>
<li class="menu-item"><a href="heartattack" style="color: #fff; text-decoration: none;">Heart Attack</a></li>
<li class="menu-item"><a href="titanic" style="color: #fff; text-decoration: none;">Titanic</a></li>
<li class="menu-item"><a href="diary" style="color: #fff; text-decoration: none;">Diary</a></li>
<li class="menu-item"><a href="quoterepo" style="color: #fff; text-decoration: none;">Quote Repository</a></li>
<li class="menu-item"><a href="therapy" style="color: #fff; text-decoration: none;">Find Your Therapy</a></li>
<li class="menu-item"><a href="tracking" style="color: #fff; text-decoration: none;">Exercise and Sleep</a></li>
<li class="menu-item"><a href="kpop" style="color: #fff; text-decoration: none;">Music</a></li>
</ul>
</div> -->
<div class="main-content">
<button class="button">
<h1><span style="color: #000000;">welcome to the wellness tracker 🌱</span></h1>
<p>Stay motivated and keep track of your wellness journey.</p>
</button>
<div class="top-buttons" style="margin-top: 20px;">
<a href="login" class="button">Login</a>
<a href="registration" class="button">Register</a>
<a href="self-care" class="button">Self Care Info</a>
<a href="logout()" class="button">Logout</a>
</div>
<div class="image-container">
<table>
<tr>
<td><a href="tracking"><img src="dumbell.gif" alt="Image 1 Description"></a></td>
<td><a href="self-care"><img src="giphy.gif" alt="Image 2 Description"></a></td>
<td><a href="depression"><img src="giphy3.gif" alt="Image 3 Description"></a></td>
</tr>
<tr>
<td><a href="diary"><img src="giphy4.gif" alt="Image 4 Description"></a></td>
<td><a href="titanic"><img src="boat.gif" alt="Image 5 Description"></a></td>
<td><a href="heartattack"><img src="heart.gif" alt="Image 6 Description"></a></td>
</tr>
</table>
</div>
<!-- Add other sections and content for your homepage here -->
</div>
<script type="module">
function toggleSidebar() {
var sidebar = document.getElementById("sidebar");
sidebar.classList.toggle("active");
}
import { uri, options } from '{{site.baseurl}}/assets/js/api/config.js'
function logout() {
// Clear local storage
localStorage.removeItem('loggedInUserName');
localStorage.removeItem('loggedInUserId');
// Make a fetch request to clear cookies
fetch('https://well.stu.nighthawkcodingsociety.com/api/users/logout', {
...options,
method: 'POST',
credentials: 'include'
})
.then(response => {
if (response.ok) {
// Redirect to the login page after successful logout
window.location.href = "login"; // Redirect to the login page
} else {
throw new Error('Failed to logout');
}
})
.catch(error => {
console.error('Logout error:', error);
});
}
</script>