-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
354 lines (334 loc) · 13.1 KB
/
index.html
File metadata and controls
354 lines (334 loc) · 13.1 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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My Profile</title>
<link rel="stylesheet" type="text/css" href="style.css">
<style>
h2 {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
margin-top: 10px;
text-transform: uppercase;
padding: 25px;
margin-bottom: 10px;
color: white;
background-color: #09c1c1;
font-size: 100%;
word-spacing: 4px;
letter-spacing: 1px;
cursor: default;
/* border: 5px solid #09c1c1; */
transition: 0.7s;
}
h2:hover {
margin-bottom: 10px;
color: #09c1c1;
background-color: rgb(65, 65, 65);
transition: 0.7s;
box-shadow: 0 4px 8px 0 rgba(255, 255, 255, 0.2), 0 6px 20px 0 rgba(255, 255, 255, 0.19) inset;
}
h2:active {
margin-bottom: 10px;
color: white;
background-color: rgb(100, 100, 100);
transition: 0.7s;
}
li {
cursor: default;
list-style-type: none;
margin-top: 5px;
margin-right: 5%;
margin-left: 3%;
margin-bottom: 5px;
padding: 10px;
border: 2px solid #3d3e40;
color: #eeeeee;
/* border-radius: 25px; */
background-color: #3d3e40;
transition: 0.7s;
}
li:hover {
border: 2px solid rgb(65, 65, 65);
transition: 0.7s;
border: 2px solid #09c1c1;
color: #eeeeee;
/* border-radius: 25px; */
background-color: #09c1c1;
}
li:active {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19) inset;
border: 2px solid rgb(65, 65, 65);
transition: 0.7s;
color: #eeeeee;
/* border-radius: 25px; */
background-color: #08a2c1;
}
</style>
</head>
<body>
<script>
document.body.style.background = '#28282b';
if (localStorage.getItem("NUM_NEWS") == null)
localStorage.setItem("NUM_NEWS", 0);
// else
// alert(localStorage.getItem("NUM_NEWS"))
</script>
<a class="top-button" style="position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
outline: none; " href="#">Top</a>
<div id="first-section" class="bg">
<div class="nestedsection">
<div class="inner-content">
<br>
<img id="profile-img" src="src/abc.jpg" width="175px" height="175px" style="border-radius:50%">
<br>
<h1 class="abc">
<name>Chirag Jain</name><br>
</h1>
<br>
<a class="top-button" href="#about-me">About Me</a>
<a class="top-button" href="#my-profile">My Profile</a>
<a class="top-button" href="#news-section">News</a>
</div>
</div>
</div>
<br>
<div id="about-me">
<br>
<center>
<h1 class="abc" style="color: #aaa89d;font-size: 40px;">ABOUT ME</h1>
</center>
<hr>
<p id="ins">Lorem ipsum dolor sit, amet consectetur adipisicing elit. Animi et, vel officia ipsam quibusdam,
fugit ullam veritatis necessitatibus, totam delectus sint odio laborum voluptatem dolor quae quos cupiditate
minima nesciunt eum eveniet labore dolore suscipit magni. Molestias, qui quis. Magnam eligendi cumque aut
maxime quaerat atque neque perspiciatis, dolor labore eos placeat nisi est voluptas. Ratione, quis
perferendis. Impedit nihil eaque nemo consequuntur consectetur nulla ipsam aliquid sint id odit, ea harum
libero officiis at? Possimus similique ratione est. Fugit, non repellat. Enim mollitia fugiat facilis
accusamus saepe, rerum consectetur earum nostrum commodi, illum, dolore inventore architecto iusto beatae.
Iure quo laudantium dicta nemo dolorem numquam pariatur officiis culpa corrupti eos id repellendus expedita
eligendi, enim commodi velit vitae atque itaque perferendis nihil officia nam accusamus. Esse cum, beatae
culpa optio impedit aliquam necessitatibus, consequatur pariatur laboriosam odit asperiores ea soluta veniam
molestias modi? Ea dolores ipsam in voluptatem accusamus sapiente veniam facilis unde, ullam ducimus atque
reprehenderit repellat, ad nam corrupti minima repellendus vel, molestias quasi? Voluptate quibusdam
possimus maiores nulla quaerat sapiente id totam perspiciatis? Eius ipsum id modi aliquam officia voluptatem
exercitationem eaque fugiat maiores distinctio omnis voluptatum nam pariatur ut culpa porro sint quos,
delectus rem. Ad eligendi dolore a accusamus. Dolorem ad pariatur fugit assumenda, dicta labore eveniet vero
culpa veritatis nesciunt quos! At voluptatibus, maxime dolor nemo odit obcaecati. Sint laborum recusandae
voluptatem dolor officia pariatur excepturi dignissimos corrupti dolorum quas rem possimus suscipit amet
impedit, tenetur sunt adipisci quis reiciendis expedita! Dicta, consequatur.</p>
</div>
<br>
<br>
<br>
<div id="first-section" style="height:40%" class="bg">
<div class="nestedsection">
</div>
</div>
<div id="my-profile">
<br>
<center>
<h1 class="abc" style="color: #aaa89d;font-size: 40px;">My Profile</h1>
</center>
<hr>
<br>
<div style="float: left; width: 33.3%;">
<center>
<h2>Educational Background</h2>
</center>
<ul>
<li>ipsum dolor sit</li>
<li>dolor. Lorem, ipsum</li>
<li>tenetur exercitationem</li>
<li>Lorem, ipsum</li>
<li>Lorem ipsum dolor sit</li>
<li>amet consectetur </li>
<li>adipisicing elit. </li>
<li>Harum, aspernatur.</li>
</ul>
</div>
<div style="float: left; width: 33.3%;">
<center>
<h2>Achievements</h2>
</center>
<ul>
<li>ipsum dolor</li>
<li>ipsum dolor sit</li>
<li>dolor. Lorem, ipsum</li>
<li>tenetur exercitationem</li>
<li>Lorem, ipsum</li>
<li>exercitationem</li>
</ul>
</div>
<div style="float: left; width: 33.3%;">
<center>
<h2>Skills</h2>
</center>
<ul>
<li>Temporibus tenetur</li>
<li>adipisicing</li>
<li>ipsum dolor sit</li>
<li>dolor. Lorem, ipsum</li>
<li>tenetur exercitationem</li>
<li>Lorem, ipsum</li>
<li>exercitationem</li>
</ul>
</div>
<div style="float: left; width: 100%;">
<center>
<h2 id="news-section">News</h2>
</center>
<ul>
<script>
let num = parseInt(localStorage.getItem("NUM_NEWS"))
for (i = 1; i <= num; i++) {
let key_val = "NEWS_ID_" + i;
let data = localStorage.getItem(key_val).split('@#@');
document.writeln("<li>");
document.writeln("<p style='font-size:80%; margin-bottom:5px;margin-top:0px; color:#09c1c1'>");
document.writeln(data[0]);
document.writeln("</p>")
document.writeln(data[1]);
document.writeln("</li>");
}
</script>
</ul>
</div>
</div>
<br>
<br>
<br>
<br>
<center>
<h1 style="color:rgba(0,0,0,0); user-select: none;">CHANGE COLOR</h1>
<h1 style="color:#aaa89d;">NEWS UPDATE</h1>
<hr>
<br>
<textarea id="news-update" class="top-button" style="text-align: left;" rows="4" cols="50"
placeholder="Type anything..."></textarea>
<br><button class="top-button" onclick="addNews()">Add</button>
<br>
<br>
<br>
<h1 style="color:#aaa89d;">CHANGE COLOR</h1>
<hr>
<br>
<button class="colorButton">Blue</button>
<button class="colorButton">Red</button>
<button class="colorButton">Green</button>
<button class="colorButton">Orange</button>
<button class="colorButton">Yellow</button>
<button class="colorButton">Pink</button>
<button class="colorButton">Purple</button>
<button class="colorButton">Brown</button>
<button class="colorButton">Gray</button>
<button class="colorButton">White</button>
<button class="top-button" onclick="document.body.style.background = '#28282b';">Default</button>
<br>
<br>
<button class="top-button" id="enjoy" onclick="trigger()">Enjoy!</button>
<br>
<br>
<br>
<h1 style="color:#aaa89d;">LINKS</h1>
<hr>
<br>
<a class="top-button" href="https://www.google.com" target="_blank">Google</a>
<a class="top-button" href="src/images.webp" target="_blank">Image</a>
<br>
<br>
<br>
<h1 style="color:#aaa89d;">FONT</h1>
<hr>
<br>
<h1 id="fontText" style="color:#aaa89d;font-size: 20px;">TEST FONT SIZE</h1>
<br>
<button class="top-button" onclick="changeFont('12px')">12px</button>
<button class="top-button" onclick="changeFont('24px')">24px</button>
<button class="top-button" onclick="changeFont('36px')">36px</button>
</center>
<br>
<br>
<audio id="myAudio">
<source src="src/audio.mp3" type="audio/mpeg">
</audio>
<script>
function changeFont(size) {
document.getElementById("fontText").style.fontSize = size;
}
const colorButtons = [...document.querySelectorAll('.colorButton')];
document.addEventListener('click', e => {
if (!colorButtons.includes(e.target)) return;
document.body.style.background = e.target.textContent;
});
document.addEventListener('mouseover', e => {
if (!colorButtons.includes(e.target)) return;
e.target.style.background = e.target.textContent;
e.target.style.color = 'white';
});
document.addEventListener('mouseup', e => {
if (!colorButtons.includes(e.target)) return;
e.target.style.background = e.target.textContent;
e.target.style.color = 'white';
});
document.addEventListener('mouseout', e => {
if (!colorButtons.includes(e.target)) return;
e.target.style.background = "rgba(9, 193, 193, 0.3)";
e.target.style.color = '#09c1c1';
});
document.addEventListener('mousedown', e => {
if (!colorButtons.includes(e.target)) return;
e.target.style.background = "#09c1c1";
});
let flag = true;
let timerF = undefined;
let i = 0, j = 0;
let arr = ['blue', 'red', 'green', 'orange', 'purple', 'grey', 'pink', 'brown', 'yellow'];
let arr2 = ['12px', '24px', '36px', '24px']
var h1Elements = document.getElementsByTagName("h1");
function myTimer() {
document.body.style.background = arr[i % arr.length];
for (var k = 0; k < h1Elements.length; k++) {
h1Elements[k].style.fontSize = arr2[j % arr2.length];
}
j += 1;
i += 1;
}
var x = document.getElementById("myAudio");
function trigger() {
if (flag == false) {
flag = true;
document.body.style.background = '#28282b';
for (var k = 0; k < h1Elements.length; k++) {
h1Elements[k].style.fontSize = '36px';
}
clearInterval(timerF);
x.pause();
}
else if (flag == true) {
flag = false;
timerF = setInterval(myTimer, 100);
x.play();
}
}
function addNews() {
let text = document.getElementById("news-update").value;
if (text == "") {
alert("Type Something...")
}
else {
const d = new Date();
let data = (d) + "@#@" + text;
let ind = parseInt(localStorage.getItem("NUM_NEWS")) + 1;
let key_val = "NEWS_ID_" + ind;
localStorage.setItem("NUM_NEWS", ind);
localStorage.setItem(key_val, data);
alert("News Added Successfully at " + d)
window.open((window.location.href).split('#')[0] + "#news-section", "_self")
}
}
</script>
</body>
</html>