-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathportal.html
148 lines (130 loc) · 4.48 KB
/
portal.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Portal R-S Eye and Medical Clinic</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap">
<style>
body {
margin: 0;
padding: 0;
background-color: #eeeeee;
}
header {
border-bottom: 1px solid black;
padding-left: 35px;
padding-right: 35px;
display: flex;
align-items: center;
position: relative;
}
header img {
width: 150px;
height: auto;
margin-right: 10px;
}
nav {
margin-left: auto;
}
nav a {
color: black;
text-decoration: none;
margin-left: 35px;
font-size: 25px;
font-family: 'Inter', sans-serif;
font-style: italic;
font-weight: 800;
word-wrap: break-word;
}
header::after {
content: '';
position: absolute;
bottom: 0;
left: 20px;
right: 20px;
height: 1px;
background-color: black;
}
.bottom-div {
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
margin-top: 50px;
margin-bottom: 10px;
}
.bottom-div img {
width: 150px;
height: 150px;
border-radius: 50%;
margin-right: 20px;
}
.text-container {
margin-left: 20px;
text-align: left;
margin: 0;
font-size: 50px;
font-family: 'Inter', sans-serif;
font-style: italic;
font-weight: 800;
color: #00ACA2;
word-wrap: break-word;
}
p {
margin: 0;
font-size: 50px;
font-family: 'Inter', sans-serif;
font-style: italic;
font-weight: 800;
color: #00ACA2;
word-wrap: break-word;
}
</style>
</head>
<body>
<header>
<img src="./img/top.png" alt="Page Icon">
<nav>
<a href="index.html">Home</a>
<a href="portal.html" id="portalLink">Patients Portal</a>
<a href="aboutus.html">About Us</a>
<a href="privacypolicy.html">Privacy</a>
<a href="#" id="logoutLink" style="display:none;">Log Out</a>
<a href="signin.html" id="signInLink">Sign In</a>
</nav>
</header>
<div class="bottom-div">
<img src="./img/profile.jpg" alt="Bottom Image">
<div class="text-container">
<div id="welcomeMessage" style="margin-left: 10px;"></div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const token = localStorage.getItem('token');
const username = localStorage.getItem('username');
if (token) {
document.getElementById('signInLink').style.display = 'none';
document.getElementById('logoutLink').style.display = 'inline-block';
document.getElementById('portalLink').href = 'portal.html';
if (username) {
document.getElementById('welcomeMessage').innerText = `${username}`;
}
} else {
document.getElementById('signInLink').style.display = 'inline-block';
document.getElementById('logoutLink').style.display = 'none';
document.getElementById('portalLink').href = 'signin.html';
}
document.getElementById('logoutLink').addEventListener('click', function () {
localStorage.removeItem('token');
localStorage.removeItem('username');
document.getElementById('signInLink').style.display = 'inline-block';
document.getElementById('logoutLink').style.display = 'none';
document.getElementById('portalLink').href = 'signin.html';
window.location.href = 'index.html';
});
});
</script>
</body>
</html>