Skip to content

Commit b403dc8

Browse files
alexnodelandclaude
andauthored
Editorial-math docs theme for evo.fugue.run (#16)
* Editorial-math docs theme: serif display type, ink-navy chrome, new mark Applies the shared fugue.run redesign to evo.fugue.run: self-hosted Fraunces/Inter/JetBrains Mono, fugue-theme.css restyling the full mdBook chrome for ink-dark and paper-light families, an e-mark favicon + CSS-rendered hero mark in the fv-green accent, a rebuilt landing page (hero with a live WASM convergence widget, card grid, ecosystem card), and fugue-brand.js injecting the Fugue ↗ sibling-site link into the menu bar. Book retitled "Fugue Evo Docs". Shared with fugue byte-for-byte: fugue-theme.css, fugue-brand.js, theme/head.hbs, theme/fonts/*. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB * Custom widget controls: sliders, selects, checkboxes off native styling Syncs the shared fugue-viz.css control restyle from fugue: custom slider track/thumb, chevroned selects, check-marked checkboxes, button hover fills. Byte-identical with the fugue repo copy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018yo1jdkckG7yQ9eBqLbaDB --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 8a66963 commit b403dc8

18 files changed

Lines changed: 805 additions & 28 deletions

docs/book.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[book]
2-
title = "Fugue-Evo Documentation"
2+
title = "Fugue Evo Docs"
33
authors = ["Fugue-Evo Contributors"]
44
language = "en"
55
src = "src"
@@ -14,8 +14,9 @@ preferred-dark-theme = "navy"
1414
git-repository-url = "https://github.com/alexnodeland/fugue-evo"
1515
edit-url-template = "https://github.com/alexnodeland/fugue-evo/edit/main/docs/{path}"
1616
site-url = "https://evo.fugue.run/"
17-
additional-css = ["fugue-viz.css"]
17+
additional-css = ["fugue-theme.css", "fugue-viz.css"]
1818
additional-js = [
19+
"fugue-brand.js",
1920
"fugue-viz.js",
2021
"fugue-evo-wasm-loader.js",
2122
"viz/landscape.js",

docs/fugue-brand.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* fugue-brand.js — shared between fugue and fugue-evo (keep byte-identical).
2+
*
3+
* Injects a sibling-site link into the menu bar so fugue.run and
4+
* evo.fugue.run point at each other. Which site we're on is detected by
5+
* hostname; local previews can force it with
6+
* <html data-fugue-site="fugue"|"evo">. */
7+
(function () {
8+
'use strict';
9+
10+
function siblingFor(site) {
11+
return site === 'evo'
12+
? { label: 'Fugue', href: 'https://fugue.run', title: 'Fugue — probabilistic programming for Rust' }
13+
: { label: 'Evo', href: 'https://evo.fugue.run', title: 'Fugue Evo — evolutionary computation for Rust' };
14+
}
15+
16+
function detectSite() {
17+
var forced = document.documentElement.getAttribute('data-fugue-site');
18+
if (forced === 'fugue' || forced === 'evo') return forced;
19+
if (window.location.hostname.indexOf('evo.') === 0) return 'evo';
20+
// Local preview fallback: the evo book titles itself "Fugue-Evo …".
21+
if (/evo/i.test(document.title)) return 'evo';
22+
return 'fugue';
23+
}
24+
25+
function inject() {
26+
var buttons = document.querySelector('#menu-bar .right-buttons');
27+
if (!buttons || buttons.querySelector('.fugue-brand-link')) return;
28+
var sib = siblingFor(detectSite());
29+
var a = document.createElement('a');
30+
a.className = 'fugue-brand-link';
31+
a.href = sib.href;
32+
a.title = sib.title;
33+
a.setAttribute('aria-label', sib.title);
34+
var label = document.createElement('span');
35+
label.textContent = sib.label;
36+
var arrow = document.createElement('span');
37+
arrow.className = 'fugue-brand-arrow';
38+
arrow.textContent = '↗';
39+
a.appendChild(label);
40+
a.appendChild(arrow);
41+
buttons.insertBefore(a, buttons.firstChild);
42+
}
43+
44+
if (document.readyState === 'loading') {
45+
document.addEventListener('DOMContentLoaded', inject);
46+
} else {
47+
inject();
48+
}
49+
})();

0 commit comments

Comments
 (0)