Skip to content

Commit 78cee51

Browse files
PhaedrusFlowclaude
andcommitted
feat: unified Nix flake, cross-platform build scripts, and Zine documentation
- Replace root flake.nix with unified OnTrack flake supporting both Python and Rust projects across x86_64-linux, aarch64-linux, x86_64-darwin, and aarch64-darwin. Includes crane-based Rust builds, dev shells (combined, python-only, rust-only), flake checks (clippy, cargo test/audit/deny, pytest, bandit), and nix run apps for CLI and GUI. - Replace ontrack/flake.nix with thin wrapper delegating to root flake. - Add scripts/build-all.sh (master build), scripts/cross-compile-rs.sh (Rust cross-compilation via cross-rs), scripts/build-python.sh (wheel, PyInstaller, buildozer), and scripts/nix-build-all.sh (Nix pipeline). - Add Zine documentation site at docs/ with build.zig, SuperHTML layouts, and 20 SuperMarkdown content pages covering both implementations, architecture, build system, cross-compilation, and FAQ. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e8d24e3 commit 78cee51

32 files changed

+3419
-447
lines changed

docs/assets/style.css

Lines changed: 375 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,375 @@
1+
/* OnTrack Documentation — Zine Stylesheet */
2+
3+
:root {
4+
--color-bg: #ffffff;
5+
--color-text: #1a1a2e;
6+
--color-heading: #16213e;
7+
--color-link: #0f3460;
8+
--color-link-hover: #e94560;
9+
--color-border: #e0e0e0;
10+
--color-code-bg: #f5f5f5;
11+
--color-sidebar-bg: #fafafa;
12+
--color-hero-bg: #16213e;
13+
--color-hero-text: #ffffff;
14+
--color-footer-bg: #1a1a2e;
15+
--color-footer-text: #b0b0b0;
16+
--color-accent: #e94560;
17+
--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
18+
--font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
19+
--max-width: 1200px;
20+
--sidebar-width: 260px;
21+
}
22+
23+
/* ── Reset ────────────────────────────────────────────────────────────── */
24+
*, *::before, *::after {
25+
box-sizing: border-box;
26+
margin: 0;
27+
padding: 0;
28+
}
29+
30+
html {
31+
font-size: 16px;
32+
scroll-behavior: smooth;
33+
}
34+
35+
body {
36+
font-family: var(--font-body);
37+
color: var(--color-text);
38+
background: var(--color-bg);
39+
line-height: 1.7;
40+
min-height: 100vh;
41+
display: flex;
42+
flex-direction: column;
43+
}
44+
45+
/* ── Container ────────────────────────────────────────────────────────── */
46+
.container {
47+
max-width: var(--max-width);
48+
margin: 0 auto;
49+
padding: 0 2rem;
50+
}
51+
52+
/* ── Header ───────────────────────────────────────────────────────────── */
53+
.site-header {
54+
background: var(--color-hero-bg);
55+
padding: 1rem 0;
56+
position: sticky;
57+
top: 0;
58+
z-index: 100;
59+
}
60+
61+
.site-header .container {
62+
display: flex;
63+
align-items: center;
64+
gap: 2rem;
65+
}
66+
67+
.site-header .logo {
68+
color: var(--color-hero-text);
69+
text-decoration: none;
70+
font-size: 1.5rem;
71+
font-weight: 700;
72+
letter-spacing: -0.02em;
73+
}
74+
75+
.site-header nav {
76+
display: flex;
77+
gap: 1.5rem;
78+
}
79+
80+
.site-header nav a {
81+
color: rgba(255, 255, 255, 0.8);
82+
text-decoration: none;
83+
font-size: 0.9rem;
84+
transition: color 0.2s;
85+
}
86+
87+
.site-header nav a:hover {
88+
color: var(--color-hero-text);
89+
}
90+
91+
/* ── Hero (index page) ────────────────────────────────────────────────── */
92+
.hero {
93+
padding: 4rem 0;
94+
flex: 1;
95+
}
96+
97+
.hero h1 {
98+
font-size: 2.5rem;
99+
color: var(--color-heading);
100+
margin-bottom: 1rem;
101+
}
102+
103+
.hero h2 {
104+
font-size: 1.5rem;
105+
color: var(--color-heading);
106+
margin-top: 2rem;
107+
margin-bottom: 0.75rem;
108+
}
109+
110+
.hero h3 {
111+
font-size: 1.1rem;
112+
color: var(--color-heading);
113+
margin-top: 1.5rem;
114+
margin-bottom: 0.5rem;
115+
}
116+
117+
/* ── Page content ─────────────────────────────────────────────────────── */
118+
.page-content {
119+
padding: 3rem 0;
120+
flex: 1;
121+
}
122+
123+
.page-content article {
124+
max-width: 800px;
125+
}
126+
127+
/* ── Documentation layout (sidebar + content) ─────────────────────────── */
128+
.docs-layout {
129+
display: flex;
130+
min-height: calc(100vh - 160px);
131+
}
132+
133+
.sidebar {
134+
width: var(--sidebar-width);
135+
min-width: var(--sidebar-width);
136+
background: var(--color-sidebar-bg);
137+
border-right: 1px solid var(--color-border);
138+
padding: 2rem 1.5rem;
139+
position: sticky;
140+
top: 56px;
141+
height: calc(100vh - 56px);
142+
overflow-y: auto;
143+
}
144+
145+
.sidebar h3 {
146+
font-size: 0.8rem;
147+
text-transform: uppercase;
148+
letter-spacing: 0.08em;
149+
color: #666;
150+
margin-top: 1.5rem;
151+
margin-bottom: 0.5rem;
152+
}
153+
154+
.sidebar h3:first-child {
155+
margin-top: 0;
156+
}
157+
158+
.sidebar ul {
159+
list-style: none;
160+
}
161+
162+
.sidebar ul li {
163+
margin-bottom: 0.25rem;
164+
}
165+
166+
.sidebar ul li a {
167+
color: var(--color-text);
168+
text-decoration: none;
169+
font-size: 0.9rem;
170+
display: block;
171+
padding: 0.25rem 0.5rem;
172+
border-radius: 4px;
173+
transition: background 0.2s, color 0.2s;
174+
}
175+
176+
.sidebar ul li a:hover {
177+
background: var(--color-border);
178+
color: var(--color-link);
179+
}
180+
181+
.docs-content {
182+
flex: 1;
183+
padding: 2rem 3rem;
184+
max-width: calc(var(--max-width) - var(--sidebar-width));
185+
}
186+
187+
.docs-content article {
188+
max-width: 800px;
189+
}
190+
191+
/* ── Typography ───────────────────────────────────────────────────────── */
192+
h1 {
193+
font-size: 2rem;
194+
color: var(--color-heading);
195+
margin-bottom: 1.5rem;
196+
line-height: 1.2;
197+
}
198+
199+
h2 {
200+
font-size: 1.4rem;
201+
color: var(--color-heading);
202+
margin-top: 2.5rem;
203+
margin-bottom: 0.75rem;
204+
padding-bottom: 0.3rem;
205+
border-bottom: 1px solid var(--color-border);
206+
}
207+
208+
h3 {
209+
font-size: 1.15rem;
210+
color: var(--color-heading);
211+
margin-top: 2rem;
212+
margin-bottom: 0.5rem;
213+
}
214+
215+
h4 {
216+
font-size: 1rem;
217+
color: var(--color-heading);
218+
margin-top: 1.5rem;
219+
margin-bottom: 0.5rem;
220+
}
221+
222+
p {
223+
margin-bottom: 1rem;
224+
}
225+
226+
a {
227+
color: var(--color-link);
228+
text-decoration: underline;
229+
text-decoration-thickness: 1px;
230+
text-underline-offset: 2px;
231+
transition: color 0.2s;
232+
}
233+
234+
a:hover {
235+
color: var(--color-link-hover);
236+
}
237+
238+
strong {
239+
font-weight: 600;
240+
}
241+
242+
ul, ol {
243+
margin-bottom: 1rem;
244+
padding-left: 1.5rem;
245+
}
246+
247+
li {
248+
margin-bottom: 0.3rem;
249+
}
250+
251+
/* ── Code ─────────────────────────────────────────────────────────────── */
252+
code {
253+
font-family: var(--font-mono);
254+
font-size: 0.875em;
255+
background: var(--color-code-bg);
256+
padding: 0.15em 0.4em;
257+
border-radius: 3px;
258+
}
259+
260+
pre {
261+
background: var(--color-code-bg);
262+
border: 1px solid var(--color-border);
263+
border-radius: 6px;
264+
padding: 1rem 1.25rem;
265+
overflow-x: auto;
266+
margin-bottom: 1.5rem;
267+
line-height: 1.5;
268+
}
269+
270+
pre code {
271+
background: none;
272+
padding: 0;
273+
font-size: 0.85rem;
274+
}
275+
276+
/* ── Tables ───────────────────────────────────────────────────────────── */
277+
table {
278+
width: 100%;
279+
border-collapse: collapse;
280+
margin-bottom: 1.5rem;
281+
font-size: 0.9rem;
282+
}
283+
284+
th, td {
285+
text-align: left;
286+
padding: 0.6rem 1rem;
287+
border-bottom: 1px solid var(--color-border);
288+
}
289+
290+
th {
291+
font-weight: 600;
292+
background: var(--color-sidebar-bg);
293+
border-bottom: 2px solid var(--color-border);
294+
}
295+
296+
tr:hover td {
297+
background: rgba(0, 0, 0, 0.02);
298+
}
299+
300+
/* ── Blockquotes ──────────────────────────────────────────────────────── */
301+
blockquote {
302+
border-left: 3px solid var(--color-accent);
303+
padding: 0.5rem 1rem;
304+
margin: 1rem 0;
305+
background: rgba(233, 69, 96, 0.05);
306+
border-radius: 0 4px 4px 0;
307+
}
308+
309+
/* ── Footer ───────────────────────────────────────────────────────────── */
310+
.site-footer {
311+
background: var(--color-footer-bg);
312+
color: var(--color-footer-text);
313+
padding: 2rem 0;
314+
text-align: center;
315+
font-size: 0.85rem;
316+
}
317+
318+
.site-footer p {
319+
margin-bottom: 0.3rem;
320+
}
321+
322+
/* ── Responsive ───────────────────────────────────────────────────────── */
323+
@media (max-width: 768px) {
324+
.site-header .container {
325+
flex-direction: column;
326+
gap: 0.75rem;
327+
}
328+
329+
.site-header nav {
330+
flex-wrap: wrap;
331+
gap: 0.75rem;
332+
}
333+
334+
.docs-layout {
335+
flex-direction: column;
336+
}
337+
338+
.sidebar {
339+
width: 100%;
340+
min-width: 100%;
341+
position: static;
342+
height: auto;
343+
border-right: none;
344+
border-bottom: 1px solid var(--color-border);
345+
padding: 1rem;
346+
}
347+
348+
.sidebar h3 {
349+
display: inline;
350+
margin-right: 1rem;
351+
}
352+
353+
.sidebar ul {
354+
display: flex;
355+
flex-wrap: wrap;
356+
gap: 0.5rem;
357+
padding-left: 0;
358+
}
359+
360+
.sidebar ul li {
361+
margin-bottom: 0;
362+
}
363+
364+
.docs-content {
365+
padding: 1.5rem;
366+
}
367+
368+
h1 { font-size: 1.5rem; }
369+
h2 { font-size: 1.2rem; }
370+
371+
pre {
372+
font-size: 0.8rem;
373+
padding: 0.75rem;
374+
}
375+
}

docs/build.zig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const std = @import("std");
2+
const zine = @import("zine");
3+
4+
pub fn build(b: *std.Build) !void {
5+
try zine.website(b, .{
6+
.title = "OnTrack Documentation",
7+
.host_url = "https://qompassai.github.io/Python",
8+
.layouts_dir_path = "layouts",
9+
.content_dir_path = "content",
10+
.assets_dir_path = "assets",
11+
});
12+
}

0 commit comments

Comments
 (0)