Files
openmlsys-zh/theme/version-selector.css
Yeqi Huang d953030747 feat: add v1/v2 versioning with language selector (#494)
* feat: add v1/v2 versioning and language selector for mdbook

- Copy current content to v1/ directory (1st Edition)
- Create v2/ directory with new TOC structure (2nd Edition) and placeholder chapters
- Add version selector (V1/V2) and language toggle (EN/ZH) in top-right nav bar
- Add build scripts: build_mdbook_v1.sh, build_mdbook_v2.sh
- Update assemble_docs_publish_tree.py to support v1/v2 deployment layout
- Fix mdbook preprocessor to use 'sections' key (v0.4.43 compatibility)
- Update .gitignore for new build artifact directories
- Deployment layout: / = v2 EN, /cn/ = v2 ZH, /v1/ = v1 EN, /v1/cn/ = v1 ZH

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* build: update CI to build and verify all four books (v1/v2 x EN/ZH)

- Clarify step names: "Build v2 (EN + ZH)" and "Build v1 (EN + ZH)"
- Add verification step to check all four index.html outputs exist
- Deploy workflow assembles: / = v2 EN, /cn/ = v2 ZH, /v1/ = v1 EN, /v1/cn/ = v1 ZH

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: gracefully skip missing TOC entries instead of crashing

resolve_toc_target() now returns None for missing files instead of
raising FileNotFoundError. This fixes v1 EN build where chapter index
files reference TOC entry names that don't match actual filenames.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:37:42 +00:00

49 lines
1.1 KiB
CSS

/* Version and Language selectors — inline in .right-buttons */
.openmlsys-nav-selectors {
display: inline-flex;
align-items: center;
gap: 4px;
margin-right: 4px;
vertical-align: middle;
}
/* Shared style for all selector links/buttons */
.openmlsys-selector-link {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 32px;
height: 28px;
padding: 0 8px;
border-radius: 4px;
border: 1px solid transparent;
color: var(--icons, #747474);
font-size: 12px;
font-weight: 600;
text-decoration: none;
cursor: pointer;
line-height: 1;
transition: color 0.1s, background 0.1s;
}
.openmlsys-selector-link:hover {
color: var(--icons-hover, #333);
background: var(--theme-hover, rgba(0, 0, 0, 0.05));
}
/* Active/current indicator */
.openmlsys-selector-link.active {
color: var(--links, #4183c4);
border-color: var(--links, #4183c4);
font-weight: 700;
}
/* Separator between version and language groups */
.openmlsys-selector-sep {
width: 1px;
height: 18px;
background: var(--icons, #747474);
opacity: 0.3;
margin: 0 2px;
}