Skip to content

Commit d0901aa

Browse files
committed
Fix blueprint
1 parent 40999d5 commit d0901aa

5 files changed

Lines changed: 111 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "writeadoc"
3-
version = "0.11.0"
3+
version = "0.12.0"
44
description = "Focus on your content and let WriteADoc take care of the rest"
55
authors = [
66
{name = "Juan Pablo Scaletti", email = "juanpablo@jpscaletti.com"},

src/writeadoc/blueprint/assets/css/layout.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@
117117
max-height: 2rem;
118118
}
119119
.header__brand span {
120-
font-size: 2.4rem;
120+
font-size: 1.2rem;
121121
font-weight: 900;
122-
letter-spacing: -0.01em;
122+
letter-spacing: -0.02em;
123123
color: var(--color-black);
124124
user-select: none;
125125
}

src/writeadoc/blueprint/views/autodoc.jinja

Whitespace-only changes.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{# import "autodoc.md.jinja" as Autodoc #}
2+
{# def ds, level=2 #}
3+
4+
{%- if ds.symbol or ds.name %}
5+
{{ "#" * level }} `{{ ds.symbol }}`{ .autodoc-symbol .autodoc-symbol-{{ ds.symbol }} } `{{ ds.name }}`{ .autodoc-name .autodoc-name-{{ ds.symbol }} }
6+
{%- if ds.label %} `{{ ds.label }}`{ .autodoc-label .autodoc-label-{{ ds.label }} }{% endif %}
7+
{% endif -%}
8+
9+
{%- if ds.short_description %}
10+
:::: div autodoc-short-description
11+
{{ ds.short_description | safe }}
12+
::::
13+
{% endif -%}
14+
15+
{%- if ds.signature %}
16+
````python
17+
{{ ds.signature | safe }}
18+
````
19+
{% endif -%}
20+
21+
{%- if ds.bases -%}
22+
:::: div autodoc-bases
23+
Bases: {% for base in ds.bases %} `{{ base }}`{% if not loop.last %}, {% endif %}
24+
{%- endfor %}
25+
::::
26+
{% endif -%}
27+
28+
{%- if ds.params %}
29+
:::: div autodoc-table autodoc-arguments
30+
31+
Argument | Description
32+
-------- | --------
33+
{%- for param in ds.params %}
34+
`{{ param.name }}` | {{ param.description | replace('\n', '<br/>') | safe }}
35+
{%- endfor %}
36+
37+
::::
38+
{% endif -%}
39+
40+
{%- if ds.long_description %}
41+
:::: div autodoc-long-description
42+
{{ ds.long_description | safe }}
43+
::::
44+
{% endif %}
45+
{%- if ds.examples %}
46+
:::: div autodoc-examples
47+
**Example:**
48+
49+
{% for ex in ds.examples -%}
50+
::: div
51+
{%- if ex.description %}{{ ex.description | safe }}
52+
{% endif -%}
53+
{%- if ex.snippet %}
54+
````python
55+
{{ ex.snippet | safe }}
56+
````
57+
{% endif %}
58+
:::
59+
{% endfor %}
60+
::::
61+
{% endif -%}
62+
63+
{%- if ds.returns or ds.many_returns %}
64+
:::: div autodoc-returns
65+
**Returns:**
66+
{%- if ds.returns %}
67+
{{ ds.returns.description | safe }}
68+
{%- elif ds.many_returns -%}
69+
{%- for return in ds.many_returns %}
70+
- **{{ return.return_name }}**: {{ return.description | safe }}
71+
{%- endfor %}
72+
{% endif %}
73+
::::
74+
{% endif -%}
75+
76+
{%- if ds.raises %}
77+
:::: div autodoc-raises
78+
**Raises:**
79+
{% for raises in ds.raises -%}
80+
- {{ raises.description | safe }}
81+
{% endfor %}
82+
::::
83+
{% endif -%}
84+
85+
{%- if ds.attrs %}
86+
::::: div autodoc-attrs
87+
{% for attr in ds.attrs %}
88+
<Autodoc ds={{ attr }} level={{ level + 1 }} />
89+
{% endfor %}
90+
:::::
91+
{% endif -%}
92+
93+
{%- if ds.properties %}
94+
::::: div autodoc-properties
95+
{% for attr in ds.properties %}
96+
<Autodoc ds={{ attr }} level={{ level + 1 }} />
97+
{%- endfor %}
98+
:::::
99+
{% endif -%}
100+
101+
{%- if ds.methods %}
102+
::::: div autodoc-methods
103+
{% for method in ds.methods %}
104+
<Autodoc ds={{ method }} level={{ level + 1 }} />
105+
{%- endfor %}
106+
:::::
107+
{% endif -%}

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)