Skip to content

Commit dc69813

Browse files
jeremymanningclaude
andcommitted
style(demos): Update demos 11-15 and index to match Eliza styling
Apply consistent styling patterns from demo-01-eliza across demos 11-15: - Hero-header structure with gradient background - Theme toggle JavaScript with localStorage and unicode icons - CSS variables instead of hardcoded colors Also updates demos/index.html for consistent styling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 3f80e13 commit dc69813

File tree

9 files changed

+481
-319
lines changed

9 files changed

+481
-319
lines changed

demos/11-analogies/index.html

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@
1111
</head>
1212
<body>
1313
<nav class="demo-nav">
14-
<a href="../" class="back-link">← Back to Demos</a>
15-
<button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">☀️</button>
14+
<a href="../" class="back-link">← Home</a>
15+
<button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
16+
<span id="theme-icon">&#127769;</span>
17+
</button>
1618
</nav>
19+
<div class="hero-header">
20+
<div class="container">
21+
<h1 class="hero-title">Word Analogy Explorer</h1>
22+
<p class="hero-subtitle">Interactive word embeddings with vector arithmetic and similarity search</p>
23+
</div>
24+
</div>
1725
<div class="container">
18-
<header>
19-
<h1>Word Analogy Explorer</h1>
20-
<p class="subtitle">Interactive word embeddings with vector arithmetic and similarity search</p>
21-
</header>
2226

2327
<div class="main-layout">
2428
<!-- Left Sidebar: Controls -->
@@ -554,15 +558,21 @@ <h4>Similar to "${queryWord}":</h4>
554558
</script>
555559

556560
<script>
557-
// Theme toggle functionality
561+
// Theme toggle functionality (synced with main index via localStorage)
558562
const themeToggle = document.getElementById('theme-toggle');
563+
const themeIcon = document.getElementById('theme-icon');
559564
const html = document.documentElement;
560565

561-
// Load saved theme
566+
// Load saved theme from localStorage
562567
const savedTheme = localStorage.getItem('theme') || 'dark';
563568
html.setAttribute('data-theme', savedTheme);
564-
if (themeToggle) {
565-
themeToggle.textContent = savedTheme === 'dark' ? '☀️' : '🌙';
569+
updateThemeIcon(savedTheme);
570+
571+
function updateThemeIcon(theme) {
572+
// Using the same icons as main index.html (moon/sun HTML entities)
573+
if (themeIcon) {
574+
themeIcon.textContent = theme === 'dark' ? '\u{1F319}' : '\u2600\uFE0F';
575+
}
566576
}
567577

568578
if (themeToggle) {
@@ -571,7 +581,7 @@ <h4>Similar to "${queryWord}":</h4>
571581
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
572582
html.setAttribute('data-theme', newTheme);
573583
localStorage.setItem('theme', newTheme);
574-
themeToggle.textContent = newTheme === 'dark' ? '☀️' : '🌙';
584+
updateThemeIcon(newTheme);
575585
});
576586
}
577587
</script>

0 commit comments

Comments
 (0)