Skip to content

Commit 6730aa7

Browse files
Update docs
1 parent 6588951 commit 6730aa7

File tree

5 files changed

+16
-51
lines changed

5 files changed

+16
-51
lines changed

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
members:
88
- children
99
- attributes
10-
- render
1110
- "_get_tag_name"
1211
- "_get_default_attributes"
1312
- "_get_tag_pre_content"
13+
- "_render"
1414
- "_escape_children"

docs/learn/.pages

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
nav:
2+
- index.md
3+
- Cheatsheet: cheatsheet.md
4+
- Advanced PyHTML: advanced.md

docs/learn/advanced.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -147,30 +147,5 @@ class fancy(p.Tag):
147147
pass
148148
```
149149

150-
### Class properties
151-
152-
If you need to access
153-
154-
* `children`: child elements
155-
* `attributes`: element attributes
156-
157-
### Rendering control functions
158-
159-
You can also override various functions to control the existing rendering.
160-
161-
* `_get_tag_name`: return the name to use for the tag. For example returning
162-
`"foo"` would produce `<foo>`.
163-
164-
* `_get_default_attributes`: return the default values for attributes.
165-
166-
* `_get_tag_pre_content`: return the pre-content for the tag. For example, the
167-
`<html>` tag uses this to add the `<!DOCTYPE html>` before the opening tag.
168-
169-
* `_escape_children`: return whether the string child elements should be
170-
escaped to prevent HTML injection.
171-
172-
* `_render`: render the element and its children, returning the list of lines
173-
to use for the output. Overriding this should be a last resort, as it is easy
174-
to subtly break the rendering process if you aren't careful.
175-
176-
Refer to the documentation of the `Tag` class for more information.
150+
For documentation on the attributes and methods of `Tag`, see the
151+
[API documentation](../api.md).

docs/stylesheets/extra.css

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,13 @@
11
:root>* {
2-
/* Fix up the primary colours */
3-
--md-primary-fg-color: #ffcd29 !important;
4-
--md-accent-fg-color: #ffcd29 !important;
5-
--md-primary-fg-color--light: #ffe08a !important;
6-
--md-primary-fg-color--dark: #ad7a0b !important;
7-
--md-accent-fg-color--light: #ffc38a !important;
8-
--md-accent-fg-color--dark: #ad740b !important;
9-
--md-typeset-a-color: #ffc853 !important;
2+
/* Link hover color */
3+
--md-accent-fg-color: #d6a400 !important;
4+
/* Title bar color */
5+
--md-primary-fg-color: #ffdf77 !important;
106
}
117

128
.md-header {
139
/* Text colour on header */
14-
color: #ffffff !important;
15-
}
16-
17-
/* Search box background */
18-
@media screen and (min-width: 60em) {
19-
.md-search__form {
20-
background-color: #ffffff42 !important;
21-
}
22-
}
23-
24-
/* Search icon color */
25-
.md-search__icon {
26-
color: #ececec !important;
10+
color: #000000 !important;
2711
}
2812

2913
div.md-header__topic:first-child {

mkdocs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ theme:
1212
palette:
1313
- media: "(prefers-color-scheme: dark)"
1414
scheme: slate
15-
primary: orange
15+
primary: yellow
16+
accent: orange
1617
toggle:
1718
icon: material/lightbulb-outline
1819
name: Switch to light mode
1920
- media: "(prefers-color-scheme: light)"
2021
scheme: default
21-
primary: orange
22+
primary: yellow
23+
accent: orange
2224
toggle:
2325
icon: material/lightbulb
2426
name: Switch to dark mode

0 commit comments

Comments
 (0)