Skip to content

Commit 4a0a47d

Browse files
committed
toggle with moon/sun works
1 parent 6d7903b commit 4a0a47d

8 files changed

Lines changed: 70 additions & 11 deletions

File tree

static/css/core.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/* Font sizes */
2525
--text-xs: 0.7rem; /* 12px */
2626
--text-sm: 0.8rem; /* 14px */
27-
--text-base: 0.925rem; /* 16px */
27+
--text-base: 0.95rem; /* 16px */
2828
--text-md: 1.125rem; /* 18px */
2929
--text-lg: 1.25rem; /* 20px */
3030
--text-xl: 1.5rem; /* 24px */

static/css/homepage.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
text-align: center;
1010
font-family: var(--font-anta);
1111
font-size: var(--text-xl);
12+
margin-top: 0;
1213
}
1314

1415
.hborder {
@@ -105,6 +106,7 @@
105106
font-weight: 800;
106107
background: transparent;
107108
transition: all 0.15s ease;
109+
padding: 0.5em 1em;
108110
}
109111

110112
.cta-button:hover {

static/css/layout.css

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ nav {
4040
display: flex;
4141
align-items: center;
4242
justify-content: space-between;
43-
margin: 0 1rem;
43+
margin: 0 1em;
44+
padding: 0.25em 1em;
4445
border-bottom: 1px solid var(--border);
4546
top: 0;
4647
background-color: var(--bg);
@@ -89,6 +90,46 @@ nav {
8990
cursor: pointer;
9091
}
9192

93+
/* Theme toggle */
94+
.theme-toggle {
95+
background: none;
96+
border: none;
97+
cursor: pointer;
98+
padding: 0.5rem;
99+
display: flex;
100+
align-items: center;
101+
justify-content: center;
102+
color: var(--fg);
103+
transition: opacity 0.2s;
104+
transform: translateY(-2px);
105+
}
106+
107+
.theme-toggle:hover {
108+
opacity: 0.7;
109+
}
110+
111+
.theme-icon {
112+
width: 1.25rem;
113+
height: 1.25rem;
114+
}
115+
116+
/* Show sun in dark mode, moon in light mode */
117+
:root[data-theme="light"] .sun-icon {
118+
display: none;
119+
}
120+
121+
:root[data-theme="light"] .moon-icon {
122+
display: block;
123+
}
124+
125+
:root[data-theme="dark"] .sun-icon {
126+
display: block;
127+
}
128+
129+
:root[data-theme="dark"] .moon-icon {
130+
display: none;
131+
}
132+
92133
/* Leaderboard Table */
93134
.bordered {
94135
background: transparent;

static/images/misc/moon.svg

Lines changed: 3 additions & 0 deletions
Loading

static/images/misc/sun.svg

Lines changed: 11 additions & 0 deletions
Loading

templates/_topnav.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
id="theme-toggle"
1616
class="theme-toggle"
1717
aria-label="Toggle theme"
18-
>THEME</button>
18+
>
19+
<img src="/static/images/misc/sun.svg" class="theme-icon sun-icon" alt="Light mode" />
20+
<img src="/static/images/misc/moon.svg" class="theme-icon moon-icon" alt="Dark mode" />
21+
</button>
1922
</div>
2023
</nav>

templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
function updateLabel() {
5959
var theme = effectiveTheme();
6060
if (!btn) return;
61-
btn.textContent = theme === 'dark' ? 'LIGHT' : 'DARK';
61+
// Don't set textContent - we're using SVG icons now
6262
btn.title = 'Switch to ' + (theme === 'dark' ? 'light' : 'dark') + ' mode';
63-
btn.setAttribute('aria-pressed', theme === 'dark' ? 'true' : 'false');
63+
btn.setAttribute('aria-label', 'Switch to ' + (theme === 'dark' ? 'light' : 'dark') + ' mode');
6464
}
6565
function toggle() {
6666
var next = effectiveTheme() === 'dark' ? 'light' : 'dark';

templates/index.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends 'base.html' %}
22

3-
{% block title %}CodeClash - Evaluating LMs as Goal-Driven Developers{% endblock %}
3+
{% block title %}CodeClash{% endblock %}
44

55
{% block content %}
66
<section style="text-align:center;margin-top: 3em;">
@@ -147,12 +147,11 @@
147147
<hr class="hborder" />
148148

149149
<section class="hsection" style="text-align: center;margin-bottom: 2em;">
150-
<p>CodeClash is fully open-source.</p>
151-
150+
<p>CodeClash is fully open-source</p>
152151
<div class="cta-buttons">
153-
<a href="#" class="cta-button primary">Read the Paper</a>
154-
<a href="#" class="cta-button">View on GitHub</a>
155-
<a href="#" class="cta-button">Explore Arenas</a>
152+
<a href="https://arxiv.org/abs/2511.00839" class="cta-button primary">Read the Paper</a>
153+
<a href="https://github.com/CodeClash-ai/CodeClash" class="cta-button">View on GitHub</a>
154+
<a href="/arenas/" class="cta-button">Explore Arenas</a>
156155
<a href="#" class="cta-button">Explore Trajectories</a>
157156
</div>
158157
</section>

0 commit comments

Comments
 (0)