-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
387 lines (349 loc) · 14.3 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
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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png">
<link rel="manifest" href="favicons/site.webmanifest">
<title>Jason's Webpage</title>
<style>
/* Author (of background texture):
Temani Afif
November 12, 2022
*/
html {
--s: 50px;
--c: #191b22; /* main bg color */
--_s: calc(2*var(--s)) calc(2*var(--s));
--_g: 35.36% 35.36% at;
--_c: #0000 66%,#20222a /* lines color */ 68% 70%,#0000 72%;
background:
radial-gradient(var(--_g) 100% 25%,var(--_c)) var(--s) var(--s)/var(--_s),
radial-gradient(var(--_g) 0 75%,var(--_c)) var(--s) var(--s)/var(--_s),
radial-gradient(var(--_g) 100% 25%,var(--_c)) 0 0/var(--_s),
radial-gradient(var(--_g) 0 75%,var(--_c)) 0 0/var(--_s),
repeating-conic-gradient(var(--c) 0 25%,#0000 0 50%) 0 0/var(--_s),
radial-gradient(var(--_c)) 0 calc(var(--s)/2)/var(--s) var(--s) var(--c);
background-attachment: fixed;
transition: background 0.2s linear;
}
/* Dark mode styles when 'dark-mode' class is added to html */
html.light-mode {
--c: #f2f2f2; /* main bg color */
--_c: #0000 66%, #e3e3e3 /* lines color */ 68% 70%, #0000 72%;
}
@font-face {
font-family: 'Comic Sans MS';
src: url("assets/ComicSansMS3.ttf");
}
body {
/* background-color: #f0f0f0; */
font-family: "Comic Sans MS", sans-serif;
color: #ffffff;
}
body.light-mode {
color: #000000;
}
#themeToggle {
position: fixed;
top: 30px;
right: 35px;
cursor: pointer;
width: 20px;
height: 20px;
background-size: cover;
}
/* Light and dark mode SVGs for the button */
#themeToggle.light {
background-image: url('assets/sun-icon.svg'); /* Path to your light mode SVG */
}
#themeToggle.dark {
background-image: url('assets/moon-icon.svg'); /* Path to your dark mode SVG */
}
.main-container {
width: 80%;
margin: 0 auto;
}
a {
color: #FF90A5;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.nav {
background-color: #FF90A5;
padding: 10px;
text-align: left;
}
.nav a {
display: block;
margin: 10px 0;
color: #000000;
}
marquee {
color: #FF90A5;
margin-bottom: 20px;
}
table {
width: 100%;
}
td {
border: 5px outset #000000;
vertical-align: top;
}
#nyancatToggle {
padding: 8px 8px;
font-size: 12px;
background-color: #32cd32;
color: white;
border: none;
cursor: pointer;
z-index: 1000;
}
#nyancatToggle.on {
background-color: #ff69b4;
}
#nyancatToggle.off {
background-color: #32cd32;
}
@keyframes gradientMove {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
#welcomeText {
font-size: 40px;
font-weight: bold;
background: linear-gradient(270deg, #ff00ff, #009dff, #ff6600);
background-size: 400% 400%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
animation: gradientMove 7s ease infinite;
}
.nav-link.active::after {
content: "";
display: inline-block;
width: 22px;
height: 22px;
margin-left: 10px;
background-image: url('assets/pointing-left.svg');
background-size: cover;
vertical-align: -5px;
}
/* Smaller Screens */
@media (max-width: 768px)
{
.main-container {
width: 95%;
}
.nav {
text-align: center;
}
#themeToggle {
position: fixed;
top: 15px;
right: 20px;
cursor: pointer;
width: 15px;
height: 15px;
background-size: cover;
}
}
</style>
</head>
<body>
<div class="main-container">
<div style="text-align: center; margin-top: 5px;">
<h1 id="welcomeText">Jason's Corner of The Web</h1>
</div>
<marquee>Welcome to my website! Enjoy your stay! ᓚᘏᗢ </marquee>
<table cellpadding="10" cellspacing="0">
<tr>
<!-- Navigation Menu -->
<td class="nav" width="20%" style="position: relative;">
<h3> </h3>
<a href="index.html" class="nav-link">Home</a><br>
<a href="resume.html" class="nav-link">Resume</a><br>
<a href="about.html" class="nav-link">About</a><br>
<a href="blog.html" class="nav-link">Weblog</a><br>
<img src="assets/cats/linea_anluorbarkat.gif" alt="cats" title="cats" style="position: absolute; bottom: 0; left: 0; max-width: 100%; height: auto;" width="1000">
</td>
<!-- Main Content -->
<td width="80%">
<h2><img src="assets/cats/Home_cat.gif" alt="cats" title="cats" style="max-width: 100%; height: auto;" width="100"></h2>
<hr>
<p>Hello there! My name is Jason, and this is my personal webpage. <br> <br>
This is how I imagined my personal website to look like, when I was younger and had just started browsing the internet. So, this website is designed to look like something you'd find in the early 2000s.
</p>
<div style="display: inline-block">
<img src="assets/me2.jpg" alt="Picture of me" title="Picture of me" width="100"> jason
</div>
<div style="display: inline-block">
<img src="assets/lili.jpg" alt="Lily (sweet baby)" title="Lily (sweet baby)" width="100"> lily (cat)
</div>
<div style="display: inline-block">
<img src="assets/biccu.jpg" alt="Biscuit (foolish baby)" title="Biscuit (foolish baby)" width="100"> biccu (cat)
</div>
<p>I'd love to hear if you've visited, please leave me a message here! <a href="http://users.smartgb.com/g/g.php?a=s&i=g19-01653-a4"><img alt="Guestbook" border="0" src="http://extras.smartgb.com/b/gb_80x40.gif" width="50" height="25" style="vertical-align: middle;"></a> </p>
<p>Check out my <a href="resume.html">work</a> so far, check out more <a href="about.html">about me</a>, or check out my occasional <a href="blog.html">blog</a>.</p>
<!-- <img src="assets/cats/cat-relaxing.gif" alt="Kitten relaxing on hammock" title="Kitten relaxing on hammock" width="100"> -->
<img src="assets/cats/cat (1).gif" alt="cat running" title="cat running" style="max-width: 100%; height: auto;" width="1000">
</td>
</tr>
</table>
<div style="text-align: center; margin-top: 5px;">
<img src="assets/cat_banner.jpg" alt="Cat Banner: No time spent with a cat is wasted" width="100"><br>
<!-- Toggle Nyancat mode -->
<button id="nyancatToggle">nyancat mode</button><br><br>
</div>
<div id="themeToggle" class="light"></div>
<hr><h6 style="text-align: center;">so much depends<br>
upon
<br><br>
a red wheel<br>
barrow
<br><br>
glazed with rain<br>
water
<br><br>
beside the white<br>
chickens.</h6><hr>
<p><h6><a href="index-new.html">Click here</a> to switch to my "modern" site (old, not updated).</h6></p>
<script>
window.onload = function() {
// Get the current page's URL
const currentPage = window.location.pathname.split("/").pop();
// Get all navigation links
const navLinks = document.querySelectorAll(".nav-link");
// Loop through links and check if the href matches the current page
navLinks.forEach(link => {
const linkHref = link.getAttribute("href");
if (linkHref === currentPage || (currentPage === "" && linkHref === "index.html")) {
link.classList.add("active"); // Add 'active' class to the matching link
}
});
};
</script>
<script>
// Get references to HTML and the toggle button
const htmlElement = document.documentElement;
const bodyElement = document.body;
const toggleButton = document.getElementById('themeToggle');
// Function to apply the theme
function applyTheme(theme) {
if (theme === 'light') {
htmlElement.classList.add('light-mode');
bodyElement.classList.add('light-mode');
toggleButton.classList.remove('light');
toggleButton.classList.add('dark');
} else {
htmlElement.classList.remove('light-mode');
bodyElement.classList.remove('light-mode');
toggleButton.classList.remove('dark');
toggleButton.classList.add('light');
}
}
// Read the saved theme from localStorage on page load
const savedTheme = localStorage.getItem('theme');
if (savedTheme) {
applyTheme(savedTheme);
}
// Event listener for toggle button
toggleButton.addEventListener('click', () => {
const currentTheme = htmlElement.classList.contains('light-mode') ? 'light' : 'dark';
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
// Apply the new theme and save it to localStorage
applyTheme(newTheme);
localStorage.setItem('theme', newTheme);
});
</script>
<script>
/******************************************
* Cursor trailer script adapted from Brian Caputo's code:
* Cross browser cursor trailer script- By Brian Caputo ([email protected])
* Distributed with permission from Brian Caputo by lissaexplains.com
* Modified Dec 31st, 02' by DD. This notice must stay intact for use
******************************************/
const images = [
{ src: "assets/abstar1.gif", width: 40, height: 40 },
{ src: "assets/abstar2.gif", width: 40, height: 40 },
{ src: "assets/abstar3.gif", width: 40, height: 40 },
{ src: "assets/abstar4.gif", width: 40, height: 40 },
{ src: "assets/abstar5.gif", width: 40, height: 40 },
{ src: "assets/th_nyan-cat-anim.gif", width: 40, height: 28 }
];
const nos = images.length;
const rate = 50; // Update frequency in ms
const offsetX = 15; // X offset of trail from mouse pointer
const offsetY = 15; // Y offset of trail from mouse pointer
let trailElements = [];
let mouseX = 0, mouseY = 0;
let nyancatMode = false;
let intervalId;
// Create trail elements
function createTrail() {
images.forEach((image, index) => {
const div = document.createElement('div');
div.style.position = 'absolute';
div.style.pointerEvents = 'none'; // Avoid blocking interactions
div.style.width = `${image.width}px`;
div.style.height = `${image.height}px`;
div.style.zIndex = index + 1;
div.innerHTML = `<img src="${image.src}" width="${image.width}" height="${image.height}" alt="">`;
document.body.appendChild(div);
trailElements.push(div);
});
}
// Update the position of each element in the trail
function updateTrail() {
if (!nyancatMode) return; // If nyancat mode is off, do nothing
for (let i = 0; i < trailElements.length - 1; i++) {
const nextElement = trailElements[i + 1];
trailElements[i].style.left = nextElement.style.left;
trailElements[i].style.top = nextElement.style.top;
}
trailElements[trailElements.length - 1].style.left = `${mouseX + offsetX}px`;
trailElements[trailElements.length - 1].style.top = `${mouseY + offsetY}px`;
}
// Mouse movement event listener
document.addEventListener('mousemove', (e) => {
mouseX = e.pageX;
mouseY = e.pageY;
});
// Toggle nyancat mode
function toggleNyancatMode() {
nyancatMode = !nyancatMode;
if (nyancatMode) {
// If turning on nyancat mode, create trail and start interval
if (trailElements.length === 0) {
createTrail();
}
intervalId = setInterval(updateTrail, rate);
document.getElementById('nyancatToggle').classList.remove('off');
document.getElementById('nyancatToggle').classList.add('on');
} else {
// If turning off nyancat mode, clear interval and hide trail
clearInterval(intervalId);
trailElements.forEach(div => {
div.style.left = '-9999px'; // Move trail elements off-screen
div.style.top = '-9999px';
});
document.getElementById('nyancatToggle').classList.remove('on');
document.getElementById('nyancatToggle').classList.add('off');
}
}
// Initialize everything on button click
document.getElementById('nyancatToggle').addEventListener('click', toggleNyancatMode);
</script>
</body>
</html>