Skip to content

Commit 242c50d

Browse files
ui: final header refinement for v0.5.0a2 (#27)
* feat(ui+dx): v0.5.0a2 — Native UI, unified just workflow, bumpversion hardened UI — Native Material (no custom header): - Remove header.html override: Home·Docs nav via navigation.tabs + tabs.sticky - Add source.html: version fact inline with stars/forks using md-source__fact - Add extra.alternate for native language switcher (EN/IT) - Replace extra.version !ENV with static string managed by bumpversion - Remove all zz-home-nav* and zz-source/zz-version CSS rules DX — Unified just workflow: - justfile: build (fast) / build-prod (strict) / verify (preflight+build-prod) serve with configurable port; live as alias; remove deploy - CONTRIBUTING.md + docs/developers/index.md: task tables aligned Toolchain: - bumpversion: PEP 440 pre-release parser (pre_n), add mkdocs.yml entry for extra.version, remove stale hardcoded-date patterns * chore(deps): upgrade dependencies and resolve security alerts - Update uv.lock (115 packages resolved) - Resolve Dependabot security vulnerability via requests v2.33.1 - Upgrade mkdocs-material to v9.7.6 for UI stability - Refresh development tooling (ruff, mypy, bump-my-version, coverage)
1 parent 6f9a0b1 commit 242c50d

9 files changed

Lines changed: 482 additions & 697 deletions

File tree

CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,18 @@ the exact same environment as CI.
4141
| **Self-lint** | **`just check`** || **Run Zenzic on its own documentation (strict)** |
4242
| Test suite | `just test` | `nox -s tests` | pytest + branch coverage |
4343
| Full pipeline | `just preflight` | `nox -s preflight` | lint, typecheck, tests, reuse, security |
44-
| Docs build | `just build` | `nox -s docs` | mkdocs build --strict |
45-
| Docs serve | `just serve` | `nox -s docs_serve` | live-reload documentation server |
46-
| Release check | `just deploy` || preflight + production build |
44+
| **Pre-push gate** | **`just verify`** || **preflight + production build — run before every push** |
45+
| Docs build (fast) | `just build` || mkdocs build, no strict enforcement |
46+
| Docs build (prod) | `just build-prod` | `nox -s docs` | mkdocs build --strict, mirrors CI |
47+
| Docs serve | `just serve [port]` | `nox -s docs_serve` | live-reload server (default port 8000) |
4748
| Pre-commit setup || `nox -s dev` | install hooks + download Lucide icons (once after clone) |
4849
| Version bump || `nox -s bump -- patch` | bump version + commit + tag |
4950
| Screenshot || `nox -s screenshot` | regenerate `docs/assets/screenshot.svg` |
5051

51-
Run the full pre-PR check with:
52+
Run the full pre-push gate with:
5253

5354
```bash
54-
just preflight
55+
just verify
5556
```
5657

5758
> **Tip:** Before committing documentation updates, run `uvx zenzic clean assets` (or `uv run zenzic clean assets`) to automatically delete any old screenshots or images you are no longer using. This keeps the repository lean.

docs/assets/stylesheets/extra.css

Lines changed: 1 addition & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -59,68 +59,6 @@
5959
--zz-transition-fast: 0.15s ease;
6060
}
6161

62-
/* ── Global header marketing nav (all pages) ─────────────────────────────── */
63-
64-
/* Hidden on narrow screens — the hamburger drawer handles mobile nav */
65-
@media screen and (max-width: 59.9375em) {
66-
.zz-home-nav {
67-
display: none;
68-
}
69-
}
70-
71-
/* On medium desktop widths, prioritise native header controls (language, search, source). */
72-
@media screen and (max-width: 76.234375em) {
73-
.zz-home-nav {
74-
display: none;
75-
}
76-
}
77-
78-
.zz-home-nav {
79-
display: flex;
80-
align-items: center;
81-
gap: 0.25rem;
82-
margin-left: 1rem;
83-
margin-right: auto;
84-
min-width: 0;
85-
}
86-
87-
.zz-home-nav__link {
88-
padding: 0.35rem 0.75rem;
89-
border-radius: 0.25rem;
90-
font-size: 0.75rem;
91-
font-weight: 500;
92-
letter-spacing: 0.02em;
93-
color: var(--md-primary-bg-color);
94-
text-decoration: none;
95-
opacity: 0.7;
96-
transition: opacity var(--zz-transition-fast), background-color var(--zz-transition-fast);
97-
}
98-
99-
.zz-home-nav__link:hover {
100-
opacity: 1;
101-
background-color: rgba(255, 255, 255, 0.08);
102-
}
103-
104-
.zz-home-nav__link--active {
105-
opacity: 1;
106-
color: #38bdf8;
107-
font-weight: 600;
108-
}
109-
110-
[data-md-color-scheme="default"] .zz-home-nav__link {
111-
color: #0f172a;
112-
opacity: 0.65;
113-
}
114-
115-
[data-md-color-scheme="default"] .zz-home-nav__link:hover {
116-
opacity: 1;
117-
background-color: rgba(0, 0, 0, 0.05);
118-
}
119-
120-
[data-md-color-scheme="default"] .zz-home-nav__link--active {
121-
opacity: 1;
122-
color: #4f46e5;
123-
}
12462

12563
/* ── Breadcrumb (navigation.path) ────────────────────────────────────────── */
12664

@@ -194,25 +132,13 @@
194132
color: #4f46e5;
195133
}
196134

197-
/* ── Navigation: marketing nav active link ────────────────────────────────── */
198-
199-
/* Active section link in global header nav */
200-
.zz-home-nav__link--active {
201-
font-weight: 600;
202-
}
203-
204-
/* ── Navigation: hide site title and Home from sidebar ────────────────────── */
135+
/* ── Navigation: hide site title from sidebar ─────────────────────────────── */
205136

206137
/* "Zenzic" heading injected by Material at the top of the sidebar drawer */
207138
.md-nav--primary > .md-nav__title {
208139
display: none;
209140
}
210141

211-
/* "Home" entry — accessible via the header nav, redundant in sidebar */
212-
.md-nav--primary > .md-nav__list > .md-nav__item:first-child {
213-
display: none;
214-
}
215-
216142
/* ── Navigation: sidebar spacing and icon rendering ───────────────────────── */
217143

218144
/* Extra vertical breathing room between sidebar items */
@@ -647,35 +573,6 @@
647573
border-bottom-color: var(--zz-muted-color);
648574
}
649575

650-
/* ── Version fact in header source widget ─────────────────────────────────── */
651-
652-
/* Layout: repo name on row 1, stars+version on row 2 side by side */
653-
.md-source__repository {
654-
display: flex;
655-
flex-wrap: wrap;
656-
align-items: center;
657-
row-gap: 0;
658-
}
659-
660-
.zz-repo-name {
661-
width: 100%; /* forces repo name onto its own line */
662-
order: 0;
663-
}
664-
665-
/* JS-injected stars/forks <ul>: row 2, left */
666-
.md-source__repository > .md-source__facts:not(.zz-version-facts) {
667-
order: 1;
668-
margin-top: 0.1rem;
669-
flex-shrink: 0;
670-
}
671-
672-
/* Static version <ul>: row 2, right — separator via gap */
673-
.zz-version-facts {
674-
order: 2;
675-
margin-top: 0.1rem;
676-
margin-left: 0.4rem;
677-
flex-shrink: 0;
678-
}
679576

680577
/* ── Footer copyright ─────────────────────────────────────────────────────── */
681578

docs/developers/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ Zenzic uses [`just`](https://github.com/casey/just) as its interactive command r
3737
| `just check` | **Self-lint — run Zenzic on its own documentation (strict)** |
3838
| `just test` | Run the test suite (delegates to `nox -s tests`) |
3939
| `just preflight` | Full CI-equivalent pipeline: lint, typecheck, tests, reuse, security |
40-
| `just build` | Build the documentation site (`mkdocs build --strict`) |
41-
| `just serve` | Start the live-reload documentation server |
42-
| `just deploy` | `preflight` + production build — local release check |
40+
| `just verify` | **Pre-push gate: `preflight` + `build-prod`** |
41+
| `just build` | Build the documentation site (fast, no strict enforcement) |
42+
| `just build-prod` | Build the documentation site (`mkdocs build --strict`, mirrors CI) |
43+
| `just serve [port]` | Start the live-reload documentation server (default port 8000) |
4344
| `just clean` | Remove generated artefacts (`site/`, `dist/`, caches, score file) |
4445

4546
The Sentinel's self-linting duty — `just check` — is the first command to run after
46-
any documentation change. If Zenzic validates external projects, it must first pass
47-
its own checks.
47+
any documentation change. Run `just verify` before every push to `main`.
4848

4949
---
5050

justfile

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,23 @@
99
# to noxfile.py and are invoked here only via `nox -s <session>`.
1010
#
1111
# Quick reference:
12-
# just sync — install / update all dependency groups
13-
# just check — self-lint: run Zenzic on its own documentation
14-
# just build — MkDocs documentation build (fast, strict)
15-
# just serve — start MkDocs documentation server (live-reload)
16-
# just live — alias for serve
17-
# just test — run test suite (delegates to nox)
18-
# just preflight — full CI-equivalent pipeline (delegates to nox)
19-
# just build-release — production build with BUILD_DATE
20-
# just deploy — preflight + production build (local release check)
21-
# just clean — remove generated artefacts
22-
23-
runner := "uv run --active"
12+
# just sync — install / update all dependency groups
13+
# just check — self-lint: run Zenzic on its own documentation
14+
# just build — MkDocs documentation build (fast)
15+
# just build-prod — MkDocs documentation build (strict — mirrors CI)
16+
# just serve — start MkDocs documentation server (default: port 8000)
17+
# just live — alias for serve
18+
# just test — run test suite (delegates to nox)
19+
# just preflight — full CI-equivalent pipeline (delegates to nox)
20+
# just verify — preflight + build-prod (pre-push gate)
21+
# just clean — remove generated artefacts
22+
23+
runner := "uv run --active"
2424
nox_runner := "uv run nox -s"
2525
export BUILD_DATE := `date +'%Y/%m/%d'`
2626

27+
# ─── Workflow ─────────────────────────────────────────────────────────────────
28+
2729
# Install or update all dependency groups
2830
sync:
2931
uv sync --all-groups
@@ -32,31 +34,35 @@ sync:
3234
check:
3335
{{ runner }} zenzic check all --strict
3436

35-
# Build the documentation via MkDocs (fast — no PDF, no social cards)
36-
build *args:
37-
{{ runner }} mkdocs build --strict {{ args }}
38-
39-
# Serve the documentation using MkDocs (live-reload)
40-
serve *args:
41-
{{ runner }} mkdocs serve {{ args }}
42-
43-
# Alias: start the MkDocs development server with hot-reload
44-
live: serve
45-
4637
# Run the test suite (delegates to nox for reproducible isolation)
4738
test *args:
4839
{{ nox_runner }} tests {{ args }}
4940

50-
# Run the full CI-equivalent pipeline (delegates to nox)
41+
# Run the full quality pipeline (lint, typecheck, tests, reuse, security)
5142
preflight:
5243
{{ nox_runner }} preflight
5344

54-
# Production build: injects the current date
55-
build-release:
45+
# Full local verification: quality pipeline + production build (pre-push gate)
46+
verify: preflight build-prod
47+
48+
# ─── Documentation (MkDocs) ───────────────────────────────────────────────────
49+
50+
# Build the documentation (fast — no strict enforcement)
51+
build:
52+
{{ runner }} mkdocs build
53+
54+
# Build the documentation for production (strict — every warning is an error)
55+
build-prod:
5656
{{ runner }} mkdocs build --strict
5757

58-
# Local release check: full preflight followed by the production build
59-
deploy: preflight build-release
58+
# Start the development server (override port: just serve 8001)
59+
serve port="8000":
60+
{{ runner }} mkdocs serve -a localhost:{{ port }}
61+
62+
# Alias: start the development server
63+
live: serve
64+
65+
# ─── Cleanup ──────────────────────────────────────────────────────────────────
6066

6167
# Remove generated artefacts (.nox is kept — reuse avoids reinstalling deps)
6268
clean:

mkdocs.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ theme:
3636
features:
3737
- content.tabs.link
3838
- content.code.copy
39+
- navigation.tabs
40+
- navigation.tabs.sticky
41+
- navigation.header.version
3942
- navigation.indexes
4043
- navigation.path
4144
- navigation.top
42-
- navigation.header.version
4345
- navigation.footer
4446
- search.highlight
4547
- search.suggest
@@ -142,7 +144,14 @@ extra_css:
142144
extra:
143145
build_date: !ENV [BUILD_DATE, "dev"]
144146
generator: false
145-
version: !ENV [DOCS_VERSION, "dev"]
147+
version: "0.5.0a2"
148+
alternate:
149+
- name: English
150+
link: /
151+
lang: en
152+
- name: Italiano
153+
link: /it/
154+
lang: it
146155
social:
147156
- icon: fontawesome/brands/github
148157
link: https://github.com/PythonWoods/zenzic

0 commit comments

Comments
 (0)