Skip to content

Commit 2f1e00d

Browse files
committed
Polish zensical docs migration
1 parent 4ecf058 commit 2f1e00d

9 files changed

Lines changed: 166 additions & 194 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
1111
lockfile as the primary state backend with a portable format and documentation. When
1212
no lockfile exists, pytask reads the legacy SQLite state and writes `pytask.lock`;
1313
`pytask build` continues updating the legacy database for downgrade compatibility.
14+
- [#789](https://github.com/pytask-dev/pytask/pull/789) switches the documentation
15+
site to [Zensical](https://zensical.org/).
1416
- [#787](https://github.com/pytask-dev/pytask/pull/787) makes the `attributes` field mandatory on `PNode` and
1517
`PProvisionalNode`, and preserves existing node attributes when loading entries from
1618
the data catalog.

docs/source/_static/css/custom.css

Lines changed: 20 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@
5151
color: inherit !important;
5252
}
5353

54+
body[data-md-color-scheme="default"] .md-typeset a.home-tile,
55+
body[data-md-color-scheme="default"] .md-typeset a.home-tile:hover,
56+
body[data-md-color-scheme="default"] .md-typeset a.home-tile:focus,
57+
body[data-md-color-scheme="default"] .md-typeset a.home-tile:focus-visible,
58+
body[data-md-color-scheme="default"] .md-typeset a.home-tile:active,
59+
body[data-md-color-scheme="default"] .md-typeset a.home-tile:visited {
60+
background: #ffffff !important;
61+
background-color: #ffffff !important;
62+
}
63+
5464
.md-typeset a.home-tile *,
5565
.md-typeset a.home-tile:hover *,
5666
.md-typeset a.home-tile:focus *,
@@ -69,7 +79,7 @@
6979

7080
.home-tile p {
7181
margin: 0;
72-
color: #4b5563;
82+
color: inherit;
7383
line-height: 1.45;
7484
}
7585

@@ -90,94 +100,19 @@ li pre {
90100
padding-left: 0;
91101
}
92102

93-
.page-hint-nav {
94-
display: flex;
95-
justify-content: space-between;
96-
gap: 1rem;
97-
margin-top: 2rem;
98-
padding-top: 1rem;
99-
border-top: 1px solid rgba(15, 23, 42, 0.13);
100-
}
101-
102-
.page-hint {
103-
display: flex;
104-
flex-direction: column;
105-
position: relative;
106-
gap: 0.02rem;
107-
text-decoration: none !important;
108-
box-shadow: none !important;
109-
border-bottom: 0 !important;
110-
}
111-
112-
.page-hint,
113-
.page-hint:hover,
114-
.page-hint:focus,
115-
.page-hint:focus-visible,
116-
.page-hint * {
117-
text-decoration: none !important;
118-
box-shadow: none !important;
119-
border-bottom: 0 !important;
120-
}
121-
122-
.page-hint--next {
123-
text-align: right;
124-
margin-left: auto;
125-
padding-right: 1rem;
126-
}
127-
128-
.page-hint--prev {
129-
padding-left: 1rem;
130-
}
131-
132-
.page-hint__label {
133-
color: #8c96a6;
134-
font-size: 0.62rem;
135-
font-weight: 500;
136-
letter-spacing: 0.01em;
137-
line-height: 1.2;
138-
}
139-
140-
.page-hint__title {
141-
color: #1d4ed8;
142-
font-size: 0.68rem;
143-
font-weight: 500;
144-
line-height: 1.2;
103+
body[data-md-color-scheme="slate"] .home-tile {
104+
border-color: rgba(203, 213, 225, 0.24);
105+
background: rgba(15, 23, 42, 0.38);
106+
box-shadow: 0 4px 12px rgba(2, 6, 23, 0.38);
145107
}
146108

147-
.page-hint__caret {
148-
position: absolute;
149-
top: 50%;
150-
transform: translateY(-50%);
151-
color: #9ca3af;
152-
font-size: 1.35rem;
153-
line-height: 1;
154-
pointer-events: none;
109+
body[data-md-color-scheme="slate"] .home-tile:hover {
110+
border-color: rgba(147, 197, 253, 0.55);
111+
box-shadow: 0 12px 26px rgba(2, 6, 23, 0.46);
155112
}
156113

157-
.page-hint--next .page-hint__caret {
158-
right: 0;
159-
}
160-
161-
.page-hint--prev .page-hint__caret {
162-
left: 0;
163-
}
164-
165-
@media (max-width: 760px) {
166-
.page-hint-nav {
167-
flex-direction: column;
168-
}
169-
170-
.page-hint--next {
171-
margin-left: 0;
172-
text-align: left;
173-
padding-right: 0;
174-
padding-left: 1rem;
175-
}
176-
177-
.page-hint--next .page-hint__caret {
178-
right: auto;
179-
left: 0;
180-
}
114+
body[data-md-color-scheme="slate"] .home-tile p {
115+
color: inherit;
181116
}
182117

183118
@media (prefers-color-scheme: dark) {
@@ -191,28 +126,4 @@ li pre {
191126
border-color: rgba(147, 197, 253, 0.55);
192127
box-shadow: 0 12px 26px rgba(2, 6, 23, 0.46);
193128
}
194-
195-
.home-tile p {
196-
color: #cbd5e1;
197-
}
198-
199-
.home-tile img {
200-
filter: brightness(1.2) invert(0.9);
201-
}
202-
203-
.page-hint-nav {
204-
border-top-color: rgba(203, 213, 225, 0.24);
205-
}
206-
207-
.page-hint__label {
208-
color: #94a3b8;
209-
}
210-
211-
.page-hint__title {
212-
color: #93c5fd;
213-
}
214-
215-
.page-hint__caret {
216-
color: #94a3b8;
217-
}
218129
}

docs/source/_static/images/book.svg

Lines changed: 25 additions & 0 deletions
Loading
Lines changed: 27 additions & 1 deletion
Loading

docs/source/_static/images/coding.svg

Lines changed: 25 additions & 0 deletions
Loading

docs/source/_static/images/light-bulb.svg

Lines changed: 25 additions & 0 deletions
Loading

docs/source/_static/js/custom.js

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -172,69 +172,3 @@ document.addEventListener("keydown", event => {
172172
window.location.href = link.href;
173173
}
174174
});
175-
176-
function getTitleForUrl(url) {
177-
const targetPath = new URL(url, window.location.href).pathname;
178-
const navLinks = document.querySelectorAll(".md-nav a[href], .md-tabs a[href]");
179-
180-
for (const link of navLinks) {
181-
const linkPath = new URL(link.href, window.location.href).pathname;
182-
if (linkPath === targetPath) {
183-
return link.textContent.trim().replace(/\s+/g, " ");
184-
}
185-
}
186-
187-
const fileName = targetPath.split("/").pop() || "";
188-
return fileName.replace(".html", "").replace(/[-_]/g, " ");
189-
}
190-
191-
function createPageHintNav() {
192-
const prev = document.querySelector('link[rel="prev"]');
193-
const next = document.querySelector('link[rel="next"]');
194-
195-
if (!prev && !next) {
196-
return;
197-
}
198-
199-
const article = document.querySelector("article.md-content__inner");
200-
if (!article) {
201-
return;
202-
}
203-
204-
const nav = document.createElement("nav");
205-
nav.className = "page-hint-nav";
206-
nav.setAttribute("aria-label", "Page navigation");
207-
208-
function buildLink(rel, href) {
209-
const direction = rel === "next" ? "next" : "prev";
210-
const anchor = document.createElement("a");
211-
anchor.className = `page-hint page-hint--${direction}`;
212-
anchor.href = href;
213-
214-
const label = document.createElement("span");
215-
label.className = "page-hint__label";
216-
label.textContent = direction === "next" ? "Next" : "Previous";
217-
218-
const title = document.createElement("span");
219-
title.className = "page-hint__title";
220-
title.textContent = getTitleForUrl(href);
221-
222-
const caret = document.createElement("span");
223-
caret.className = "page-hint__caret";
224-
caret.textContent = direction === "next" ? "›" : "‹";
225-
226-
anchor.append(label, title, caret);
227-
return anchor;
228-
}
229-
230-
if (prev?.href) {
231-
nav.appendChild(buildLink("prev", prev.href));
232-
}
233-
if (next?.href) {
234-
nav.appendChild(buildLink("next", next.href));
235-
}
236-
237-
article.appendChild(nav);
238-
}
239-
240-
createPageHintNav();

docs/source/reference_guides/lockfile.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# The Lock File
1+
# The Lockfile
22

33
`pytask.lock` is the default state backend. It stores task state in a portable,
44
git-friendly format so runs can be resumed or shared across machines.
55

6-
```{note}
7-
SQLite is the legacy format. When no lockfile exists, pytask reads the legacy database
8-
state and writes `pytask.lock`. The lockfile remains the primary backend for skip
9-
decisions, and `pytask build` also keeps the legacy database updated for downgrade
10-
compatibility.
11-
```
6+
!!! note
7+
8+
SQLite is the legacy format. When no lockfile exists, pytask reads the legacy database
9+
state and writes `pytask.lock`. The lockfile remains the primary backend for skip
10+
decisions, and `pytask build` also keeps the legacy database updated for downgrade
11+
compatibility.
1212

1313
## Example
1414

0 commit comments

Comments
 (0)