Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ lint:
uv run ruff check .
uv run ty check

# .PHONY: coverage
# coverage:
# uv run pytest --cov-config=pyproject.toml --cov-report html --cov writeadoc src/writeadoc tests
.PHONY: coverage
coverage:
uv run pytest --cov-config=pyproject.toml --cov-report html --cov writeadoc src/writeadoc tests

.PHONY: docs
docs:
Expand Down
163 changes: 67 additions & 96 deletions docs/assets/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ ol, ul {
:is(ol,ul) :is(ol,ul) ul {
list-style: square;
}
li [type="checkbox"] {
margin-right: 0.5em;
}

ul {
list-style: disc
Expand Down Expand Up @@ -1027,8 +1030,7 @@ html.cs-dark img.invert {

/******* Page - Admonitions *******/

.page__content .admonition,
.page__content details {
.page__content .admonition {
--admonition-rgb: 43, 127, 255;
--admonition-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m3.1 5.07c.14 0 .28.05.4.16l1.27 1.27c.23.22.23.57 0 .78l-1 1-2.05-2.05 1-1c.1-.11.24-.16.38-.16m-1.97 1.74 2.06 2.06-6.06 6.06H7.07v-2.06z"/></svg>');

Expand All @@ -1043,50 +1045,24 @@ html.cs-dark img.invert {
page-break-inside: avoid;
}

@media screen and (min-width: 60em) {
.page__content .admonition.left:only-child,
.page__content details.left:only-child,
.page__content .admonition.right:only-child,
.page__content details.right:only-child {
margin-top: 0;
}
.page__content .admonition.left,
.page__content details.left {
float: left;
margin: 1em 1em 1em 0;
width: 40%;
}
.page__content .admonition.right,
.page__content details.right {
float: right;
margin: 1em 0 1em 1em;
width: 40%;
}
}

@media print {
.page__content .admonition,
.page__content details {
.page__content .admonition {
box-shadow: none;
}
}

.page__content .admonition>*,
.page__content details>* {
.page__content .admonition > * {
margin-top: 1em;
margin-bottom: 1em;
}

.page__content .admonition .admonition,
.page__content .admonition details,
.page__content details .admonition,
.page__content details details {
.page__content .admonition .admonition {
margin-bottom: 1em;
margin-top: 1em;
}

.page__content .admonition .admonition-title,
.page__content details summary {
.page__content .admonition-title {
border: none;
font-weight: 600;
font-size: 0.9em;
Expand All @@ -1097,8 +1073,7 @@ html.cs-dark img.invert {
background-color: rgba(var(--admonition-rgb), 0.1);
}

.page__content .admonition-title:before,
.page__content summary:before {
.page__content .admonition-title:before {
content: "";
background-color: rgb(var(--admonition-rgb));
mask-image: var(--admonition-icon);
Expand All @@ -1115,12 +1090,14 @@ html.cs-dark img.invert {
justify-content: center;
}

.page__content summary {
display: block;
/* Hides the marker */
.page__content .admonition ::marker {
display: none;
}
.page__content .admonition summary {
list-style: none
}

.page__content details>summary:after {
.page__content .admonition > summary:after {
content: "";
background-color: rgb(var(--admonition-rgb));
mask-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58 13.17 12 8.59 7.41 10 6l6 6-6 6z"/></svg>');
Expand All @@ -1139,52 +1116,30 @@ html.cs-dark img.invert {
transition: transform var(--transition);
}

.page__content details[open]>summary:after {
.page__content .admonition[open] > summary:after {
transform: rotate(90deg);
}

.page__content .admonition.tip,
.page__content details.tip {
--admonition-rgb: 0, 191, 165;
.page__content .admonition.tip {
--admonition-rgb: 0, 191, 150;
--admonition-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.66 11.2c-.23-.3-.51-.56-.77-.82-.67-.6-1.43-1.03-2.07-1.66C13.33 7.26 13 4.85 13.95 3c-.95.23-1.78.75-2.49 1.32-2.59 2.08-3.61 5.75-2.39 8.9.04.1.08.2.08.33 0 .22-.15.42-.35.5-.23.1-.47.04-.66-.12a.6.6 0 0 1-.14-.17c-1.13-1.43-1.31-3.48-.55-5.12C5.78 10 4.87 12.3 5 14.47c.06.5.12 1 .29 1.5.14.6.41 1.2.71 1.73 1.08 1.73 2.95 2.97 4.96 3.22 2.14.27 4.43-.12 6.07-1.6 1.83-1.66 2.47-4.32 1.53-6.6l-.13-.26c-.21-.46-.77-1.26-.77-1.26m-3.16 6.3c-.28.24-.74.5-1.1.6-1.12.4-2.24-.16-2.9-.82 1.19-.28 1.9-1.16 2.11-2.05.17-.8-.15-1.46-.28-2.23-.12-.74-.1-1.37.17-2.06.19.38.39.76.63 1.06.77 1 1.98 1.44 2.24 2.8.04.14.06.28.06.43.03.82-.33 1.72-.93 2.27"/></svg>');
}

.page__content .admonition.warning,
.page__content details.warning {
.page__content .admonition.warning {
--admonition-rgb: 255, 145, 0;
--admonition-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14h-2V9h2m0 9h-2v-2h2M1 21h22L12 2z"/></svg>');
}

.page__content .admonition.error,
.page__content details.error {
.page__content .admonition.error {
--admonition-rgb: 255, 23, 68;
--admonition-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m11.5 20 4.86-9.73H13V4l-5 9.73h3.5zM12 2c2.75 0 5.1 1 7.05 2.95S22 9.25 22 12s-1 5.1-2.95 7.05S14.75 22 12 22s-5.1-1-7.05-2.95S2 14.75 2 12s1-5.1 2.95-7.05S9.25 2 12 2"/></svg>');
}

.page__content .admonition.new,
.page__content details.new {
.page__content .admonition.new {
--admonition-rgb: 233, 194, 0;
--admonition-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m23 12-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68zm-10 5h-2v-2h2zm0-4h-2V7h2z"/></svg>');
}

.page__content .admonition.example,
.page__content details.example {
--admonition-rgb: 168, 164, 159;
--admonition-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 9H7V7h10m0 6H7v-2h10m-3 6H7v-2h7M12 3a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1m7 0h-4.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"/></svg>');
font-size: 1em;
}

.page__content .admonition.example .admonition-title,
.page__content details.example summary {
font-size: 0.75em;
}

.page__content .admonition.question,
.page__content details.question {
--admonition-rgb: 68, 64, 59;
--admonition-icon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m15.07 11.25-.9.92C13.45 12.89 13 13.5 13 15h-2v-.5c0-1.11.45-2.11 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41a2 2 0 0 0-2-2 2 2 0 0 0-2 2H8a4 4 0 0 1 4-4 4 4 0 0 1 4 4 3.2 3.2 0 0 1-.93 2.25M13 19h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10c0-5.53-4.5-10-10-10"/></svg>');
}

/******* Search *******/

.search {
Expand Down Expand Up @@ -1397,33 +1352,33 @@ html.cs-dark img.invert {
color: inherit;
}

.tabbed-content {
.tabbed-panels {
width: 100%;
}
.tabbed-block {
.tabbed-panel {
display: none;
padding-top: 0.75rem;
}
.tabbed-set > input:first-child:checked ~ .tabbed-content > :first-child,
.tabbed-set > input:nth-child(2):checked ~ .tabbed-content > :nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-content > :nth-child(3),
.tabbed-set > input:nth-child(4):checked ~ .tabbed-content > :nth-child(4),
.tabbed-set > input:nth-child(5):checked ~ .tabbed-content > :nth-child(5),
.tabbed-set > input:nth-child(6):checked ~ .tabbed-content > :nth-child(6),
.tabbed-set > input:nth-child(7):checked ~ .tabbed-content > :nth-child(7),
.tabbed-set > input:nth-child(8):checked ~ .tabbed-content > :nth-child(8),
.tabbed-set > input:nth-child(9):checked ~ .tabbed-content > :nth-child(9),
.tabbed-set > input:nth-child(10):checked ~ .tabbed-content > :nth-child(10),
.tabbed-set > input:nth-child(11):checked ~ .tabbed-content > :nth-child(11),
.tabbed-set > input:nth-child(12):checked ~ .tabbed-content > :nth-child(12),
.tabbed-set > input:nth-child(13):checked ~ .tabbed-content > :nth-child(13),
.tabbed-set > input:nth-child(14):checked ~ .tabbed-content > :nth-child(14),
.tabbed-set > input:nth-child(15):checked ~ .tabbed-content > :nth-child(15),
.tabbed-set > input:nth-child(16):checked ~ .tabbed-content > :nth-child(16),
.tabbed-set > input:nth-child(17):checked ~ .tabbed-content > :nth-child(17),
.tabbed-set > input:nth-child(18):checked ~ .tabbed-content > :nth-child(18),
.tabbed-set > input:nth-child(19):checked ~ .tabbed-content > :nth-child(19),
.tabbed-set > input:nth-child(20):checked ~ .tabbed-content > :nth-child(20) {
.tabbed-set > input:first-child:checked ~ .tabbed-panels > :first-child,
.tabbed-set > input:nth-child(2):checked ~ .tabbed-panels > :nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-panels > :nth-child(3),
.tabbed-set > input:nth-child(4):checked ~ .tabbed-panels > :nth-child(4),
.tabbed-set > input:nth-child(5):checked ~ .tabbed-panels > :nth-child(5),
.tabbed-set > input:nth-child(6):checked ~ .tabbed-panels > :nth-child(6),
.tabbed-set > input:nth-child(7):checked ~ .tabbed-panels > :nth-child(7),
.tabbed-set > input:nth-child(8):checked ~ .tabbed-panels > :nth-child(8),
.tabbed-set > input:nth-child(9):checked ~ .tabbed-panels > :nth-child(9),
.tabbed-set > input:nth-child(10):checked ~ .tabbed-panels > :nth-child(10),
.tabbed-set > input:nth-child(11):checked ~ .tabbed-panels > :nth-child(11),
.tabbed-set > input:nth-child(12):checked ~ .tabbed-panels > :nth-child(12),
.tabbed-set > input:nth-child(13):checked ~ .tabbed-panels > :nth-child(13),
.tabbed-set > input:nth-child(14):checked ~ .tabbed-panels > :nth-child(14),
.tabbed-set > input:nth-child(15):checked ~ .tabbed-panels > :nth-child(15),
.tabbed-set > input:nth-child(16):checked ~ .tabbed-panels > :nth-child(16),
.tabbed-set > input:nth-child(17):checked ~ .tabbed-panels > :nth-child(17),
.tabbed-set > input:nth-child(18):checked ~ .tabbed-panels > :nth-child(18),
.tabbed-set > input:nth-child(19):checked ~ .tabbed-panels > :nth-child(19),
.tabbed-set > input:nth-child(20):checked ~ .tabbed-panels > :nth-child(20) {
display: block;
}

Expand All @@ -1447,26 +1402,42 @@ html.cs-dark img.invert {

/******* Stack *******/

.stacked {
.stacked > p {
display: flex;
flex-direction: column;
}
@media (min-width: 48rem) {
.stacked {
.stacked > p {
flex-direction: row;
}
.stacked > * {
.stacked > p > * {
transform: scale(0.95);
transition: all var(--transition-slow);
width: 100%;
height: fit-content;
}
.stacked :nth-child(2) { margin: 10% 0 0 -40%; }
.stacked :nth-child(3) { margin: 20% 0 0 -40%; }
.stacked :nth-child(4) { margin: 30% 0 0 -40%; }
.stacked :nth-child(5) { margin: 40% 0 0 -40%; }
.stacked > *:hover {
.stacked > p :nth-child(2) { margin: 10% 0 0 -40%; }
.stacked > p :nth-child(3) { margin: 20% 0 0 -40%; }
.stacked > p :nth-child(4) { margin: 30% 0 0 -40%; }
.stacked > p :nth-child(5) { margin: 40% 0 0 -40%; }
.stacked > p > *:hover {
z-index: 20;
transform: scale(1);
}
}

/******* Example *******/

.page__content .example {
border-radius: 0 0.3rem 0.3rem 0;
border: 0;
box-shadow: 0 0 0 1px rgba(var(--rgb-gray), 0.1);
display: flow-root;
margin: var(--flow-space, 1.4em) 0;
padding: 0 1em;
page-break-inside: avoid;
}
.page__content .example > * {
margin-top: 1em;
margin-bottom: 1em;
}
3 changes: 2 additions & 1 deletion docs/content/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
title: API
---

::: writeadoc.Docs
::: api writeadoc.Docs
:::
Loading