-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmail.html
194 lines (174 loc) · 4.13 KB
/
mail.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TOP SECRET</title>
<link href="https://fonts.googleapis.com/css?family=VT323" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="header"> <h1>HACKERMAN@CHICODE.NET</h1> </div>
<div class="sidebar" id="sidebar">
<h2>INBOX</h2>
</div>
<div id="email" class="email">
</div>
</div>
<style>
#verifyinput {
position: fixed;
margin 0 auto;
left: 45%;
top: 45%;
color: green;
padding: 25px;
font-size: 22pt;
border: 2px solid green;
}
#verifyinput > input {
background-color: black;
color: green;
border: 2px solid green;
}
#verifyinput > button {
background-color: green;
color: black;
font-size: 18pt;
border: none;
}
.container {
overflow: hidden;
background-color: black;
color: green;
display: grid;
grid-template-areas: "header header"
"sidebar email";
grid-template-rows: 4rem 1fr;
grid-template-columns: 25rem 1fr;
width: 100vw;
height: 100vh;
}
body, html {
margin: 0;
padding: 0;
}
.sidebar {
padding: 10px;
grid-area: sidebar;
width: 95%;
height: 100%;
overflow-y: scroll;
border: 2px solid green;
}
.mailpreview:hover {
background-color: #222222;
}
.mailpreview > h4 {
line-height: 0;
font-size: 18pt;
}
.mailpreview > h3 {
font-size: 22pt;
}
.mailpreview > p {
font-size: 16pt;
}
.sidebar > .mailpreview {
border-top: 2px solid green;
}
.hoverhighlight {
font-size: 16pt;
}
.hoverhighlight:hover {
background-color: #222222
}
.email {
padding: 40px;
grid-area: email;
width: 98%;
height: 100%;
border: 2px solid green;
}
.email > h1 {
font-size: 38pt;
}
.email > p {
font-size: 22pt;
}
.header {
text-align: center;
grid-area: header;
width: 100%;
height: 100%;
border: 2px solid green;
}
:root {
--green: green;
}
* {
font-family: VT323;
}
#warning {
color: var(--green);
font-size: 15rem;
margin-top: 10rem;
margin-bottom: 4rem;
}
</style>
<script>
let emailsJson;
fetch('./emails.json')
.then((response) => {
return response.json()
})
.then((emails) => {
emailsJson = emails
console.log(emails)
emails.emails.map((email, index) => {
console.log(email)
let emailhtml = `
<div class="mailpreview" onclick="setEmail(${index})">
<h3>${email.subject}</h3>
<h4>${email.sender}</h4>
<p>${(email.email).substring(0,60)+" (...)"}</p>
</div>
`
console.log(emailhtml)
document.getElementById("sidebar").innerHTML = document.getElementById("sidebar").innerHTML + emailhtml
})
})
function setEmail(email) {
let emailhtml = `
<h1>${emailsJson.emails[email].subject}</h1>
<p>${emailsJson.emails[email].email}</p>
`
document.getElementById("email").innerHTML = emailhtml;
}
function verifyPassword() {
let verifyinput = `
<div id="verifyinput">
Input Text
<br>
<input id="inputpwd"/>
<br>
<button onclick="submitVerify()">Submit</button> <button onclick="cancelVerify()">Cancel</button>
</div>
`
document.querySelector('body').innerHTML = document.querySelector('body').innerHTML + verifyinput
}
function submitVerify() {
if((document.getElementById('inputpwd').value === "4913289") || (document.getElementById('inputpwd').value === "$4913289" ))
{
window.location.href = './location.html';
document.getElementById("verifyinput").remove()
}
else {
document.getElementById('verifyinput').style.backgroundColor = "red";
}
}
function cancelVerify() {
document.getElementById("verifyinput").remove();
}
</script>
</body>
</html>