Skip to content

Commit 928a6eb

Browse files
committed
fixed citations title
1 parent cbefa24 commit 928a6eb

File tree

3 files changed

+36
-16
lines changed

3 files changed

+36
-16
lines changed

gruvbox.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,25 @@ th {
263263

264264
.theme-switch:hover i {
265265
color: var(--yellow);
266+
}
267+
268+
/* Citation section dark theme styles */
269+
.citation-box {
270+
background-color: var(--bg0_s);
271+
border: 1px solid var(--bg3);
272+
}
273+
274+
#citation code {
275+
color: var(--fg2);
276+
}
277+
278+
#citation .copy {
279+
color: var(--fg4);
280+
background-color: var(--bg2);
281+
border: 1px solid var(--bg3);
282+
}
283+
284+
#citation .copy:hover {
285+
background-color: var(--bg3);
286+
color: var(--yellow);
266287
}

index.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,23 @@
3434
localStorage.setItem('theme', isLight ? 'dark' : 'light');
3535
}
3636

37-
// Set initial theme based on saved preference
37+
// Set initial theme based on saved preference, defaulting to light
3838
document.addEventListener('DOMContentLoaded', () => {
3939
const savedTheme = localStorage.getItem('theme');
40+
const themeStyle = document.getElementById('theme-style');
41+
const icon = document.querySelector('.theme-switch i');
42+
43+
// Default to light mode
4044
if (savedTheme === 'dark') {
41-
toggleTheme();
45+
themeStyle.disabled = false;
46+
icon.className = 'fas fa-moon';
47+
} else {
48+
themeStyle.disabled = true;
49+
icon.className = 'fas fa-sun';
50+
// Explicitly set to light if no preference is saved
51+
if (!savedTheme) {
52+
localStorage.setItem('theme', 'light');
53+
}
4254
}
4355
});
4456
</script>
@@ -99,7 +111,7 @@ <h2 id="video">Video</h2>
99111

100112
<section class="section" id="citation">
101113
<div class="container is-max-desktop content">
102-
<h2 class="title">Citation</h2>
114+
<h2 id="citation-header">Citation</h2>
103115
<div class="citation-box">
104116
<button class="copy" onclick="copyText()"><i class="fa fa-clipboard"></i></button>
105117
<pre><code id="citation-content">@article{Anonymous2024,

style.css

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -498,15 +498,6 @@ nav > ul > li {
498498
margin-top: 0;
499499
}
500500

501-
.title {
502-
color: #363636;
503-
font-size: 2rem;
504-
font-weight: 600;
505-
line-height: 1.125;
506-
margin-bottom: 1.5rem;
507-
text-align: center;
508-
}
509-
510501
.citation-box {
511502
position: relative;
512503
background-color: #f5f5f5;
@@ -558,10 +549,6 @@ nav > ul > li {
558549
padding: 1.5rem 1rem;
559550
}
560551

561-
.title {
562-
font-size: 1.5rem;
563-
}
564-
565552
.citation-box {
566553
padding: 1rem;
567554
}

0 commit comments

Comments
 (0)