-
Notifications
You must be signed in to change notification settings - Fork 0
/
blog.html
411 lines (369 loc) · 12.8 KB
/
blog.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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<!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 Blog</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;
}
.project-item {
margin-bottom: 20px;
}
h2 {
color: #FF90A5;
}
img {
vertical-align: middle;
}
#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;
}
/* Initially hide the more-content div */
.project-item .more-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease;
}
/* Style for expanded state */
.project-item.expanded .more-content {
max-height: 500px;
}
.more-content li {
margin-bottom: 10px; /* Adjust the value to your desired spacing */
}
.project-image {
float: right;
margin-left: 15px;
margin-bottom: 10px;
}
.project-image img {
border: 2px solid #FF90A5; /* Optional border for styling */
border-radius: 5px; /* Rounded corners */
max-width: 100%;
height: auto;
}
/* CSS Rules for the figure tags inside .image-container */
.image-container figure {
text-align: center;
flex: 1;
max-width: 300px;
max-height: 300px;
margin: 0 10px;
overflow: hidden;
}
.image-container img {
width: 100%;
height: auto;
border-radius: 5px;
object-fit: contain;
}
.image-container figcaption {
margin-top: 5px;
color:#8f8f8f;
}
/* 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 Blog</h1>
</div>
<marquee>Updates on my life? ᓚᘏᗢ </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%">
<a href="#" id="expand-all">Expand all</a> | <a href="#" id="close-all">Close all</a>
<!-- Blog List -->
<div class="project-item" style="padding: 20px; border: 1px solid #ddd; border-radius: 5px; margin: 20px;">
<div>
<h2 style="margin: 0; font-size: 1.5em; ">NGN @ IISER TVM</h2>
<h4 style="margin: 0; color: #8f8f8f;">Blogged on : 19th Dec 2024</h4>
</div>
<p style="margin-top: 10px; line-height: 1.6;">
First blog! A bunch of us from lab went to the NGN (No Garland Neuroscience) conference, at IISER Trivandrum - from 3rd Dec to 8th Dec, 2024.
</p>
<!-- Images -->
<div class="image-container" style="display: flex; flex-wrap: wrap; gap: 0px; justify-content: center; margin-top: 15px;">
<figure>
<img src="assets/blog/ngn_iisertvm.png"
alt="IISER TVM campus" title="Credits : me getting up at 6am for a bird-watching walk">
<figcaption>
IISER TVM's campus was so pretty.
</figcaption>
</figure>
<figure>
<img src="assets/blog/ngn_beach.png"
alt="shanghamugham beach" title="Credits : the homestay being right next to the beach">
<figcaption>
Our first day at TVM was spent right next to Shanghamugham beach.
</figcaption>
</figure>
</div>
<p>
Went with Jhilik, Surbhi, Sanika, Prithu, Deb. Jhilik and Deb had talks at the conference, while Surbhi, Sanika, Prithu and I presented posters.
We had sooo much fun. My <strike>labmates</strike> friends are so cool.
</p>
<!-- <a href="#" class="more-link">More?</a>
<div class="more-content">
</div> -->
</div><hr>
</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>
</div>
<div id="themeToggle" class="light"></div>
</div>
<!-- Scripts -->
<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 to toggle 'More?' section in each project
and the 'Expand all' and 'Close all' buttons -->
<script>
document.addEventListener("DOMContentLoaded", function() {
const moreLinks = document.querySelectorAll(".more-link");
const expandAllBtn = document.getElementById("expand-all");
const closeAllBtn = document.getElementById("close-all");
const projectItems = document.querySelectorAll(".project-item");
// Toggle individual sections
moreLinks.forEach(link => {
link.addEventListener("click", function(event) {
event.preventDefault();
const parentItem = link.closest(".project-item");
parentItem.classList.toggle("expanded");
// Update link text
link.textContent = parentItem.classList.contains("expanded") ? "Less?" : "More?";
});
});
// Expand all sections
expandAllBtn.addEventListener("click", function(event) {
event.preventDefault();
projectItems.forEach(item => {
item.classList.add("expanded");
// Update link text
const link = item.querySelector(".more-link");
if (link) link.textContent = "Less?";
});
});
// Close all sections
closeAllBtn.addEventListener("click", function(event) {
event.preventDefault();
projectItems.forEach(item => {
item.classList.remove("expanded");
// Update link text
const link = item.querySelector(".more-link");
if (link) link.textContent = "More?";
});
});
});
</script>
<!-- Theme toggle script (same as index page) -->
<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>
</body>
</html>