makersquad-sphinx-theme 3.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. makersquad_sphinx_theme/__init__.py +225 -0
  2. makersquad_sphinx_theme/charte.json +68 -0
  3. makersquad_sphinx_theme/theme/makersquad/charte-footer.html +65 -0
  4. makersquad_sphinx_theme/theme/makersquad/charte-search-button.html +12 -0
  5. makersquad_sphinx_theme/theme/makersquad/layout.html +9 -0
  6. makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/OFL.txt +93 -0
  7. makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/lato-latin-400-italic.woff2 +0 -0
  8. makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/lato-latin-400-normal.woff2 +0 -0
  9. makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/lato-latin-700-italic.woff2 +0 -0
  10. makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/lato-latin-700-normal.woff2 +0 -0
  11. makersquad_sphinx_theme/theme/makersquad/static/charte/fonts.css +39 -0
  12. makersquad_sphinx_theme/theme/makersquad/static/charte/logo-white.svg +1 -0
  13. makersquad_sphinx_theme/theme/makersquad/static/charte/tokens.css +62 -0
  14. makersquad_sphinx_theme/theme/makersquad/static/makersquad.css +194 -0
  15. makersquad_sphinx_theme/theme/makersquad/theme.toml +35 -0
  16. makersquad_sphinx_theme-3.4.0.dist-info/METADATA +83 -0
  17. makersquad_sphinx_theme-3.4.0.dist-info/RECORD +21 -0
  18. makersquad_sphinx_theme-3.4.0.dist-info/WHEEL +4 -0
  19. makersquad_sphinx_theme-3.4.0.dist-info/entry_points.txt +2 -0
  20. makersquad_sphinx_theme-3.4.0.dist-info/licenses/LICENSE +26 -0
  21. makersquad_sphinx_theme-3.4.0.dist-info/licenses/src/makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/OFL.txt +93 -0
@@ -0,0 +1,225 @@
1
+ """Sphinx theme of the Makersquad charte, a child of the PyData Sphinx Theme.
2
+
3
+ The charte data (`charte.json`, `theme/makersquad/static/charte/`) is generated from the charte repo by
4
+ `scripts/sphinx-data.ts`: never edit it here. The options are documented in the package README.
5
+ """
6
+
7
+ import json
8
+ import re
9
+ from datetime import date
10
+ from pathlib import Path
11
+ from typing import Any
12
+
13
+ from sphinx.application import Sphinx
14
+ from sphinx.errors import ExtensionError
15
+
16
+ HERE = Path(__file__).parent
17
+ THEME = HERE / "theme" / "makersquad"
18
+ CHARTE = json.loads((HERE / "charte.json").read_text(encoding="utf-8"))
19
+
20
+ STRING_OPTIONS = (
21
+ "charte_site",
22
+ "charte_name",
23
+ "charte_lang",
24
+ "charte_start_year",
25
+ "charte_holder",
26
+ "charte_accent",
27
+ "charte_blurb",
28
+ )
29
+ LIST_OPTIONS = ("charte_columns", "charte_social", "charte_cross_links")
30
+ OPTIONS = STRING_OPTIONS + LIST_OPTIONS
31
+
32
+
33
+ def _invalid(option: str, value: object, expected: str) -> ExtensionError:
34
+ return ExtensionError(f"makersquad theme: {option} {value!r} is not {expected}")
35
+
36
+
37
+ def _text(path: str, value: object) -> str:
38
+ if not isinstance(value, str) or not value.strip():
39
+ raise _invalid(path, value, "a non-empty string")
40
+ return value
41
+
42
+
43
+ # What `safeHref` strips: control characters and JavaScript's `\s`, which counts U+FEFF and Python's does not.
44
+ IGNORED = re.compile(
45
+ r"[\x00-\x20\x7f-\x9f\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]"
46
+ )
47
+ # ASCII letters only, as JavaScript's `/i` without `u`: Unicode folding would read U+017F as `s`, the Kelvin sign as `k`.
48
+ SCHEME = re.compile(r"[a-z][a-z0-9+.-]*:", re.IGNORECASE | re.ASCII)
49
+
50
+
51
+ def _scheme(href: str) -> str | None:
52
+ """The scheme of `href` as `safeHref` of src/lib/safe-href.ts reads it, lowercased, or None for a relative URL."""
53
+ found = SCHEME.match(IGNORED.sub("", href))
54
+ return found.group(0).lower() if found else None
55
+
56
+
57
+ def _is_safe(href: str) -> bool:
58
+ """`safeHref` of src/lib/safe-href.ts: a relative URL, or one of the schemes the charte keeps."""
59
+ scheme = _scheme(href)
60
+ return scheme is None or scheme in CHARTE["safeSchemes"]
61
+
62
+
63
+ def _list(path: str, value: object) -> list:
64
+ if not isinstance(value, list):
65
+ raise _invalid(path, value, "a list")
66
+ return value
67
+
68
+
69
+ def _only(path: str, value: dict, keys: tuple[str, ...]) -> None:
70
+ for key in value:
71
+ if key not in keys:
72
+ raise _invalid(f"{path}.{key}", value[key], "a known key")
73
+
74
+
75
+ def _link(path: str, value: object) -> dict[str, Any]:
76
+ """`{label, href, external?}` as `FooterLink` of Footer.astro, `external` false unless given."""
77
+ if not isinstance(value, dict):
78
+ raise _invalid(path, value, "a {label, href} mapping")
79
+ _only(path, value, ("label", "href", "external"))
80
+ label = _text(f"{path}.label", value.get("label"))
81
+ href = _text(f"{path}.href", value.get("href"))
82
+ if not _is_safe(href):
83
+ *others, last = (scheme.rstrip(":") for scheme in CHARTE["safeSchemes"])
84
+ expected = f"a relative link or one with the scheme {', '.join(others)} or {last}"
85
+ raise _invalid(f"{path}.href", href, expected)
86
+ external = value.get("external", False)
87
+ if type(external) is not bool:
88
+ raise _invalid(f"{path}.external", external, "true or false")
89
+ return {"label": label, "href": href, "external": external}
90
+
91
+
92
+ def _links(path: str, value: object) -> list[dict[str, Any]]:
93
+ return [_link(f"{path}[{i}]", link) for i, link in enumerate(_list(path, value))]
94
+
95
+
96
+ def _column(path: str, value: object) -> dict[str, Any]:
97
+ if not isinstance(value, dict):
98
+ raise _invalid(path, value, "a {title, links} mapping")
99
+ _only(path, value, ("title", "links"))
100
+ return {
101
+ "title": _text(f"{path}.title", value.get("title")),
102
+ "links": _links(f"{path}.links", value.get("links")),
103
+ }
104
+
105
+
106
+ def parse_options(raw: dict[str, Any]) -> dict[str, Any]:
107
+ """The `charte_*` options, each checked: an invalid one raises an error naming it.
108
+
109
+ A missing option or None reads as its default: "" (`charte_lang`: "en"), and None for a list
110
+ option (`charte_cross_links`: None is the registry's links, [] none). "" reads as None there too.
111
+ """
112
+ options: dict[str, Any] = {}
113
+ for name in LIST_OPTIONS:
114
+ value = raw.get(name)
115
+ if value is None or value == "":
116
+ options[name] = None
117
+ elif name == "charte_columns":
118
+ options[name] = [
119
+ _column(f"{name}[{i}]", column) for i, column in enumerate(_list(name, value))
120
+ ]
121
+ else:
122
+ options[name] = _links(name, value)
123
+ for name in STRING_OPTIONS:
124
+ value = raw.get(name)
125
+ if value is None:
126
+ value = ""
127
+ elif name == "charte_start_year" and type(value) is int:
128
+ value = str(value)
129
+ if not isinstance(value, str):
130
+ raise _invalid(name, value, "a string")
131
+ options[name] = value
132
+ site = options["charte_site"]
133
+ if site and site not in CHARTE["crossLinks"]:
134
+ registry = ", ".join(sorted(key for key in CHARTE["crossLinks"] if key))
135
+ raise _invalid("charte_site", site, f"a site of the registry ({registry}) or empty")
136
+ options["charte_lang"] = options["charte_lang"] or "en"
137
+ if options["charte_lang"] not in CHARTE["footerLabels"]:
138
+ raise _invalid("charte_lang", options["charte_lang"], "fr or en")
139
+ start = options["charte_start_year"]
140
+ if start and not re.fullmatch(r"[1-9][0-9]{3}", start):
141
+ raise _invalid("charte_start_year", start, "a four-digit year or empty")
142
+ accent = options["charte_accent"]
143
+ if accent and not re.fullmatch(r"#[0-9a-fA-F]{6}", accent):
144
+ raise _invalid("charte_accent", accent, "a #rrggbb colour or empty")
145
+ return options
146
+
147
+
148
+ def copyright_range(start_year: int, today: date | None = None) -> str:
149
+ """"2023" in the start year itself, "2023–2026" after: `copyrightRange` of src/footer.ts."""
150
+ year = (today or date.today()).year
151
+ return f"{start_year}–{year}" if year > start_year else str(start_year)
152
+
153
+
154
+ def _from_root(links: list[dict[str, Any]], prefix: str) -> list[dict[str, Any]]:
155
+ """A relative href (no scheme, no leading `/`, `#` or `?`) is read from the doc root, as the logo is."""
156
+ return [
157
+ {**link, "href": prefix + link["href"]}
158
+ if _scheme(link["href"]) is None and not link["href"].startswith(("/", "#", "?"))
159
+ else link
160
+ for link in links
161
+ ]
162
+
163
+
164
+ def check_options(app: Sphinx) -> None:
165
+ """Fail at the start of the build rather than on the first page."""
166
+ builder_theme = getattr(app.builder, "theme", None)
167
+ if builder_theme is None or app.config.html_theme != "makersquad":
168
+ return
169
+ parse_options(builder_theme.get_options(app.builder.theme_options))
170
+
171
+
172
+ def charte_context(app, pagename, templatename, context, doctree) -> None:
173
+ if "theme_charte_lang" not in context: # another theme is in use
174
+ return
175
+ options = parse_options({name: context.get(f"theme_{name}") for name in OPTIONS})
176
+ labels = CHARTE["footerLabels"][options["charte_lang"]]
177
+ site = options["charte_site"]
178
+ start = options["charte_start_year"]
179
+ cross_links = options["charte_cross_links"]
180
+ if cross_links is None:
181
+ # `crossSiteLinks(site)` of src/sites.ts, computed by the generator, as Footer.astro opens them.
182
+ cross_links = [
183
+ {"label": link["name"], "href": link["href"], "external": True}
184
+ for link in CHARTE["crossLinks"][site]
185
+ ]
186
+ # The page's way back to the doc root: "../" per directory of its URL, `sub/deep.html` or `sub/deep/`.
187
+ prefix = "../" * app.builder.get_target_uri(pagename).count("/")
188
+ # Light only until the theme wires a dark mode (#607); the header has no theme switcher either.
189
+ context["default_mode"] = "light"
190
+ context["charte"] = {
191
+ "name": options["charte_name"] or context.get("project"),
192
+ "labels": labels,
193
+ "blurb": options["charte_blurb"],
194
+ "columns": [
195
+ {**column, "links": _from_root(column["links"], prefix)}
196
+ for column in options["charte_columns"] or []
197
+ ],
198
+ "social": _from_root(options["charte_social"] or [], prefix),
199
+ "cross_links": _from_root(cross_links, prefix),
200
+ "common_links": [
201
+ {
202
+ "label": labels[link["id"]],
203
+ "href": link["href"],
204
+ "external": link["href"].startswith(("http://", "https://")),
205
+ }
206
+ for link in CHARTE["commonLinks"]
207
+ if "href" in link
208
+ ],
209
+ "signed": site != "makersquad",
210
+ "signature_url": CHARTE["signatureUrl"],
211
+ "copyright": copyright_range(int(start)) if start else None,
212
+ "holder": options["charte_holder"] or "Makersquad",
213
+ "accent": options["charte_accent"],
214
+ }
215
+
216
+
217
+ def setup(app: Sphinx) -> dict:
218
+ app.setup_extension("pydata_sphinx_theme")
219
+ app.add_html_theme("makersquad", str(THEME))
220
+ for css in ("charte/fonts.css", "charte/tokens.css", "makersquad.css"):
221
+ app.add_css_file(css, priority=900)
222
+ app.connect("builder-inited", check_options)
223
+ # Before PyData's own handlers (priority 500), which render the slots to drop empty ones.
224
+ app.connect("html-page-context", charte_context, priority=400)
225
+ return {"parallel_read_safe": True, "parallel_write_safe": True}
@@ -0,0 +1,68 @@
1
+ {
2
+ "generatedFrom": [
3
+ "src/sites.ts",
4
+ "src/footer.ts",
5
+ "src/lib/safe-schemes.ts"
6
+ ],
7
+ "crossLinks": {
8
+ "": [
9
+ {
10
+ "name": "HARP",
11
+ "href": "https://harp-project.net"
12
+ }
13
+ ],
14
+ "makersquad": [
15
+ {
16
+ "name": "HARP",
17
+ "href": "https://harp-project.net"
18
+ }
19
+ ],
20
+ "harp": []
21
+ },
22
+ "footerLabels": {
23
+ "fr": {
24
+ "sites": "Sites",
25
+ "info": "Informations",
26
+ "by": "par",
27
+ "rights": "Tous droits réservés.",
28
+ "contact": "Contact",
29
+ "legal": "Mentions légales",
30
+ "privacy": "Politique de confidentialité",
31
+ "cookies": "Politique relative aux cookies"
32
+ },
33
+ "en": {
34
+ "sites": "Sites",
35
+ "info": "Information",
36
+ "by": "by",
37
+ "rights": "All rights reserved.",
38
+ "contact": "Contact",
39
+ "legal": "Legal notice",
40
+ "privacy": "Privacy policy",
41
+ "cookies": "Cookie policy"
42
+ }
43
+ },
44
+ "commonLinks": [
45
+ {
46
+ "id": "contact",
47
+ "href": "https://www.makersquad.fr/contactus"
48
+ },
49
+ {
50
+ "id": "legal",
51
+ "href": "https://www.makersquad.fr/mentions-legales"
52
+ },
53
+ {
54
+ "id": "privacy",
55
+ "href": "https://www.makersquad.fr/politique-de-confidentialite"
56
+ },
57
+ {
58
+ "id": "cookies"
59
+ }
60
+ ],
61
+ "signatureUrl": "https://www.makersquad.fr",
62
+ "safeSchemes": [
63
+ "http:",
64
+ "https:",
65
+ "mailto:",
66
+ "tel:"
67
+ ]
68
+ }
@@ -0,0 +1,65 @@
1
+ {# The charte footer (src/components/Footer.astro): name, blurb and social links, the doc's columns,
2
+ common links, cross-links from src/sites.ts, copyright, and the "by Makersquad" signature.
3
+ Filled into PyData's `footer_start` slot. A link opens in a new tab when it says `external`. #}
4
+ {%- macro link(item) -%}
5
+ <a href="{{ item.href|e }}"{% if item.external %} target="_blank" rel="noopener"{% endif %}>{{ item.label|e }}</a>
6
+ {%- endmacro -%}
7
+ <div class="charte-footer">
8
+ <div class="charte-footer__brand">
9
+ <p class="charte-footer__name">{{ charte.name|e }}</p>
10
+ {%- if charte.blurb %}
11
+ <p class="charte-footer__blurb">{{ charte.blurb|e }}</p>
12
+ {%- endif %}
13
+ {%- if charte.social %}
14
+ <ul class="charte-footer__social">
15
+ {%- for item in charte.social %}
16
+ <li>{{ link(item) }}</li>
17
+ {%- endfor %}
18
+ </ul>
19
+ {%- endif %}
20
+ </div>
21
+ {%- if charte.columns %}
22
+ <div class="charte-footer__columns">
23
+ {%- for column in charte.columns %}
24
+ <nav aria-label="{{ column.title|e }} – {{ charte.name|e }}">
25
+ <p class="charte-footer__title">{{ column.title|e }}</p>
26
+ <ul>
27
+ {%- for item in column.links %}
28
+ <li>{{ link(item) }}</li>
29
+ {%- endfor %}
30
+ </ul>
31
+ </nav>
32
+ {%- endfor %}
33
+ </div>
34
+ {%- endif %}
35
+ <div class="charte-footer__bar">
36
+ <nav aria-label="{{ charte.labels.info }} – {{ charte.name|e }}">
37
+ <ul>
38
+ {%- for item in charte.common_links %}
39
+ <li>{{ link(item) }}</li>
40
+ {%- endfor %}
41
+ </ul>
42
+ </nav>
43
+ {%- if charte.cross_links %}
44
+ <nav class="charte-footer__sites" aria-label="{{ charte.labels.sites }} – {{ charte.name|e }}">
45
+ <ul>
46
+ {%- for item in charte.cross_links %}
47
+ <li>{{ link(item) }}</li>
48
+ {%- endfor %}
49
+ </ul>
50
+ </nav>
51
+ {%- endif %}
52
+ </div>
53
+ <div class="charte-footer__bottom">
54
+ <p class="charte-footer__rights">
55
+ {%- if charte.copyright %}© {{ charte.copyright }} {{ charte.holder|e }}. {% endif %}{{ charte.labels.rights }}
56
+ </p>
57
+ {#- The only external link without the marker nor the new-tab text (ruling, 2026-11-17). #}
58
+ {%- if charte.signed %}
59
+ <a class="charte-footer__signature" href="{{ charte.signature_url }}" target="_blank" rel="noopener">
60
+ <span>{{ charte.labels.by }}</span>
61
+ <img src="{{ pathto('_static/charte/logo-white.svg', 1) }}" alt="Makersquad" width="112" height="36">
62
+ </a>
63
+ {%- endif %}
64
+ </div>
65
+ </div>
@@ -0,0 +1,12 @@
1
+ {# PyData's search-button-field, named by its own text: "Search" and the shortcut, Ctrl+K or ⌘+K once
2
+ PyData's script swaps the modifier on a Mac, so the name holds the visible text on every platform
3
+ (WCAG 2.5.3, label-content-name-mismatch); PyData's aria-label="Search" is shorter. Referenced
4
+ by aria-labelledby, the text names the button on mobile too, where it is hidden. The page holds two
5
+ copies (header and mobile sidebar), hence the unique ids. #}
6
+ {%- set label_id = unique_html_id("charte-search-label") -%}
7
+ {%- set shortcut_id = unique_html_id("charte-search-shortcut") -%}
8
+ <button type="button" class="btn search-button-field search-button__button pst-js-only" title="{{ _('Search') }}" aria-labelledby="{{ label_id }} {{ shortcut_id }}" data-bs-placement="bottom" data-bs-toggle="tooltip">
9
+ <i class="fa-solid fa-magnifying-glass"></i>
10
+ <span class="search-button__default-text" id="{{ label_id }}">{{ _('Search') }}</span>
11
+ <span class="search-button__kbd-shortcut" id="{{ shortcut_id }}"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
12
+ </button>
@@ -0,0 +1,9 @@
1
+ {% extends "pydata_sphinx_theme/layout.html" %}
2
+ {# The product accent, checked as #rrggbb in Python. A custom property on :root, not a data-theme
3
+ attribute: PyData holds html[data-theme] for light and dark. #}
4
+ {%- block extrahead %}
5
+ {{ super() }}
6
+ {%- if charte.accent %}
7
+ <style>:root { --charte-accent: {{ charte.accent }}; }</style>
8
+ {%- endif %}
9
+ {%- endblock extrahead %}
@@ -0,0 +1,93 @@
1
+ Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-HairlineItalic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Light.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-LightItalic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Regular.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Italic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Bold.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-BoldItalic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Black.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-BlackItalic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1.
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,39 @@
1
+ /* Generated by scripts/sphinx-data.ts from @fontsource/lato and src/styles/tokens.css. Do not edit. */
2
+ @font-face {
3
+ font-family: "Lato";
4
+ font-style: normal;
5
+ font-weight: 400;
6
+ font-display: swap;
7
+ src: url("fonts/lato-latin-400-normal.woff2") format("woff2");
8
+ }
9
+ @font-face {
10
+ font-family: "Lato";
11
+ font-style: italic;
12
+ font-weight: 400;
13
+ font-display: swap;
14
+ src: url("fonts/lato-latin-400-italic.woff2") format("woff2");
15
+ }
16
+ @font-face {
17
+ font-family: "Lato";
18
+ font-style: normal;
19
+ font-weight: 700;
20
+ font-display: swap;
21
+ src: url("fonts/lato-latin-700-normal.woff2") format("woff2");
22
+ }
23
+ @font-face {
24
+ font-family: "Lato";
25
+ font-style: italic;
26
+ font-weight: 700;
27
+ font-display: swap;
28
+ src: url("fonts/lato-latin-700-italic.woff2") format("woff2");
29
+ }
30
+ @font-face {
31
+ font-family: "Lato fallback";
32
+ src: local("Arial"), local("Liberation Sans");
33
+ unicode-range:
34
+ U+0000, U+000D, U+0020-007E, U+00A0-00FF, U+0104-0107, U+0118-0119, U+0131, U+0141-0144, U+0152-0153, U+015A-015B, U+0160-0161, U+0178-017E, U+0192, U+02C6-02C7, U+02C9, U+02DA, U+02DC-02DD, U+2013-2014, U+2018-201A, U+201C-201E, U+2020, U+2022, U+2026, U+2039-203A, U+2044, U+20AC, U+2122, U+2212;
35
+ size-adjust: 97.69%;
36
+ ascent-override: 101.03%;
37
+ descent-override: 21.8%;
38
+ line-gap-override: 0%;
39
+ }
@@ -0,0 +1 @@
1
+ <svg viewBox="117.4 214.9 578.7 184.6" xmlns="http://www.w3.org/2000/svg"><g fill="#fff"><g enable-background="new"><path d="m302.7 326.5h-4.6v-25.3c0-6.1-2.7-9.1-8-9.1-2.6 0-4.9 1.2-7 3.6-2 2.4-3.1 5.6-3.1 9.7v21.2h-4.6v-25.3c0-6.1-2.7-9.1-8-9.1-2.6 0-4.9 1.2-7 3.6-2 2.4-3.1 5.6-3.1 9.7v21.2h-4.6v-38.3h4.6v6.3c2.2-4.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8.8-17-.4-9.1-4.4-15.8-12.2-20zm3.9 29.9c-.1.1-.2.3-.3.3l-.1.1c-1.7 1.7-3.7 2.9-5.8 3.6-3.3 1-6.5 1-9.6.1-.4-.1-.8-.3-1.2-.3-1.4-.8-1.9-2.4-1.2-3.8.6-1.2 1.9-1.8 3.2-1.6.3.1.4.2.7.3 3.5 1.1 7 1.2 10.6.2.6-.2 1.1-.4 1.6-.6.1-.1.3-.1.3-.2.3-.1.7-.1 1 .1.8.2 1.2 1.1.8 1.8z"/></g></svg>
@@ -0,0 +1,62 @@
1
+ /* Generated by scripts/sphinx-data.ts from src/styles/tokens.css. Do not edit. */
2
+ :root {
3
+ --charte-font-sans: "Lato", "Lato fallback", ui-sans-serif, system-ui, sans-serif;
4
+ --charte-color-msqd: #06609f;
5
+ --charte-color-msqd-deep: #021654;
6
+ --charte-color-msqd-hover: #054d7f;
7
+ --charte-color-msqd-orange: #ff7f00;
8
+ --charte-color-msqd-grey: #808aaa;
9
+ --charte-color-msqd-pink: #e83c63;
10
+ --charte-color-ink: #000000;
11
+ --charte-color-ink-soft: #4b5563;
12
+ --charte-color-ink-faint: #808794;
13
+ --charte-color-line: #e5e7eb;
14
+ --charte-color-surface: #f3f4f6;
15
+ --charte-color-paper: #ffffff;
16
+ --charte-color-dark: var(--charte-color-msqd-deep);
17
+ --charte-color-footer: #1f2328;
18
+ --charte-color-link-on-dark: #2ca4f7;
19
+ --charte-color-dark-bg: var(--charte-color-footer);
20
+ --charte-color-dark-surface: #2a3037;
21
+ --charte-color-dark-text: #e8eaed;
22
+ --charte-color-dark-muted: #a3abb5;
23
+ --charte-color-dark-line: #747d89;
24
+ --charte-color-dark-code: #fd607c;
25
+ --charte-color-error: #b91c1c;
26
+ --charte-color-success: #15803d;
27
+ --charte-color-warning: #b45309;
28
+ --charte-container-page: 72rem;
29
+ --charte-container-narrow: 48rem;
30
+ --charte-container-text: 40rem;
31
+ --charte-container-prose-image: 32rem;
32
+ --charte-spacing-gutter-sm: 1rem;
33
+ --charte-spacing-gutter-md: 1.5rem;
34
+ --charte-spacing-gutter-lg: 2.5rem;
35
+ --charte-radius-button: 0.5rem;
36
+ --charte-radius-card: 0.75rem;
37
+ --charte-radius-image: 0.5rem;
38
+ --charte-radius-code: 0.25rem;
39
+ --charte-shadow-card-hover: 0 8px 24px -8px rgb(2 22 84 / 0.25);
40
+ --charte-shadow-cta: 0 4px 14px -2px color-mix(in srgb, var(--charte-accent, var(--charte-color-msqd)) 45%, transparent);
41
+ --charte-leading-body: 1.5;
42
+ --charte-leading-heading: 1.2;
43
+ --charte-font-weight-heading: 700;
44
+ --charte-text-display: 3rem;
45
+ --charte-text-h1: 2.25rem;
46
+ --charte-text-h2: 1.875rem;
47
+ --charte-text-h3: 1.25rem;
48
+ --charte-text-h4: 1.125rem;
49
+ --charte-text-lead: 1.125rem;
50
+ --charte-text-small: 0.875rem;
51
+ --charte-type-display-desktop: 3.75rem;
52
+ --charte-type-h1-desktop: 3rem;
53
+ --charte-type-lead-desktop: 1.25rem;
54
+ }
55
+
56
+ @media (min-width: 40rem) {
57
+ :root {
58
+ --charte-text-display: var(--charte-type-display-desktop);
59
+ --charte-text-h1: var(--charte-type-h1-desktop);
60
+ --charte-text-lead: var(--charte-type-lead-desktop);
61
+ }
62
+ }
@@ -0,0 +1,194 @@
1
+ /* Charte tokens (charte/tokens.css, generated) mapped onto PyData's documented CSS variables.
2
+ PyData sets its colours on html[data-theme]: the same selector wins here, loaded after. Light only
3
+ until the theme wires a dark mode (#607). */
4
+
5
+ html[data-theme] {
6
+ --charte-primary: var(--charte-accent, var(--charte-color-msqd));
7
+ --pst-font-family-base: var(--charte-font-sans);
8
+ --pst-font-family-heading: var(--charte-font-sans);
9
+ --pst-font-weight-heading: var(--charte-font-weight-heading);
10
+ --pst-font-size-h1: var(--charte-text-h1);
11
+ --pst-font-size-h2: var(--charte-text-h2);
12
+ --pst-font-size-h3: var(--charte-text-h3);
13
+ --pst-font-size-h4: var(--charte-text-h4);
14
+ --pst-font-size-h5: 1rem;
15
+ --pst-font-size-h6: var(--charte-text-small);
16
+ }
17
+
18
+ html[data-theme="light"] {
19
+ --pst-color-primary: var(--charte-primary);
20
+ --pst-color-primary-bg: color-mix(in srgb, var(--charte-primary) 12%, var(--charte-color-paper));
21
+ /* Hover: the accent at 80% towards black, as --color-msqd-hover is for the Makersquad blue. */
22
+ --pst-color-secondary: color-mix(in srgb, var(--charte-primary) 80%, black);
23
+ --pst-color-secondary-bg: var(--charte-color-surface);
24
+ --pst-color-link-higher-contrast: var(--pst-color-secondary);
25
+ --pst-color-accent: var(--charte-color-msqd-orange);
26
+ --pst-color-text-base: var(--charte-color-ink);
27
+ --pst-color-text-muted: var(--charte-color-ink-soft);
28
+ --pst-color-border: var(--charte-color-line);
29
+ --pst-color-background: var(--charte-color-paper);
30
+ --pst-color-on-background: var(--charte-color-paper);
31
+ --pst-color-surface: var(--charte-color-surface);
32
+ --pst-color-inline-code: var(--charte-color-msqd-deep);
33
+ --pst-color-danger: var(--charte-color-error);
34
+ --pst-color-success: var(--charte-color-success);
35
+ --pst-color-warning: var(--charte-color-warning);
36
+ }
37
+
38
+ body {
39
+ line-height: var(--charte-leading-body);
40
+ }
41
+
42
+ h1,
43
+ h2,
44
+ h3,
45
+ h4 {
46
+ line-height: var(--charte-leading-heading);
47
+ }
48
+
49
+ /* Header: the charte's white bar with a hairline, no shadow. */
50
+ .bd-header {
51
+ background: var(--pst-color-on-background);
52
+ border-bottom: 1px solid var(--pst-color-border);
53
+ box-shadow: none;
54
+ }
55
+
56
+ /* Footer: the charte footer, navy, the accent as top rule. */
57
+ .bd-footer {
58
+ background: var(--charte-color-footer);
59
+ border-top: 4px solid var(--charte-primary);
60
+ color: var(--charte-color-paper);
61
+ font-size: var(--charte-text-small);
62
+ }
63
+
64
+ .bd-footer .bd-footer__inner {
65
+ padding: var(--charte-spacing-gutter-lg) var(--charte-spacing-gutter-md);
66
+ }
67
+
68
+ .bd-footer .footer-items__start {
69
+ flex: 1;
70
+ }
71
+
72
+ .charte-footer p {
73
+ margin: 0;
74
+ }
75
+
76
+ .charte-footer a {
77
+ color: var(--charte-color-link-on-dark);
78
+ text-decoration: none;
79
+ text-underline-offset: 4px;
80
+ }
81
+
82
+ .charte-footer a:hover {
83
+ text-decoration: underline;
84
+ }
85
+
86
+ .charte-footer ul {
87
+ display: flex;
88
+ flex-wrap: wrap;
89
+ gap: 0.5rem var(--charte-spacing-gutter-md);
90
+ list-style: none;
91
+ margin: 0;
92
+ padding: 0;
93
+ }
94
+
95
+ .charte-footer__name {
96
+ font-size: var(--charte-text-h3);
97
+ font-weight: 700;
98
+ }
99
+
100
+ .charte-footer .charte-footer__blurb {
101
+ color: rgb(255 255 255 / 0.8);
102
+ margin-top: 0.75rem;
103
+ }
104
+
105
+ .charte-footer .charte-footer__social {
106
+ margin-top: 1rem;
107
+ }
108
+
109
+ /* The doc's columns under the brand block, as many as fit a row of 8.5 rem. */
110
+ .charte-footer__columns {
111
+ display: grid;
112
+ gap: var(--charte-spacing-gutter-lg);
113
+ grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
114
+ margin-top: var(--charte-spacing-gutter-lg);
115
+ }
116
+
117
+ .charte-footer__title {
118
+ color: rgb(255 255 255 / 0.9);
119
+ font-weight: 700;
120
+ letter-spacing: 0.025em;
121
+ text-transform: uppercase;
122
+ }
123
+
124
+ .charte-footer__columns ul {
125
+ display: block;
126
+ margin-top: 1rem;
127
+ }
128
+
129
+ .charte-footer__columns li + li {
130
+ margin-top: 0.5rem;
131
+ }
132
+
133
+ .charte-footer__bar {
134
+ border-top: 1px solid rgb(255 255 255 / 0.15);
135
+ display: flex;
136
+ flex-direction: column;
137
+ gap: 0.75rem;
138
+ margin-top: var(--charte-spacing-gutter-lg);
139
+ padding-top: var(--charte-spacing-gutter-md);
140
+ }
141
+
142
+ .charte-footer__sites {
143
+ border-top: 1px solid rgb(255 255 255 / 0.15);
144
+ padding-top: 0.75rem;
145
+ }
146
+
147
+ @media (min-width: 48rem) {
148
+ .charte-footer__bar {
149
+ align-items: center;
150
+ flex-direction: row;
151
+ gap: var(--charte-spacing-gutter-lg);
152
+ }
153
+
154
+ .charte-footer__sites {
155
+ border-left: 1px solid rgb(255 255 255 / 0.15);
156
+ border-top: 0;
157
+ padding-left: var(--charte-spacing-gutter-lg);
158
+ padding-top: 0;
159
+ }
160
+ }
161
+
162
+ .charte-footer__bottom {
163
+ align-items: center;
164
+ display: flex;
165
+ flex-wrap: wrap;
166
+ gap: var(--charte-spacing-gutter-sm);
167
+ justify-content: space-between;
168
+ margin-top: var(--charte-spacing-gutter-sm);
169
+ }
170
+
171
+ .charte-footer__rights {
172
+ color: rgb(255 255 255 / 0.7);
173
+ }
174
+
175
+ /* "by" sits on the logo's wordmark baseline, as in Footer.astro. */
176
+ .charte-footer .charte-footer__signature {
177
+ align-items: baseline;
178
+ color: rgb(255 255 255 / 0.8);
179
+ display: flex;
180
+ padding: 0 0 14.13px 0.4rem;
181
+ }
182
+
183
+ .charte-footer__signature span {
184
+ margin-right: -3.3px;
185
+ position: relative;
186
+ z-index: 1;
187
+ }
188
+
189
+ .charte-footer__signature img {
190
+ height: auto;
191
+ position: relative;
192
+ top: 14.13px;
193
+ width: 7rem;
194
+ }
@@ -0,0 +1,35 @@
1
+ # Child of the PyData Sphinx Theme: every pydata option keeps working, the charte sets new defaults.
2
+ [theme]
3
+ inherit = "pydata_sphinx_theme"
4
+
5
+ [options]
6
+ # Charte options, checked at the start of the build (sphinx/README.md). `charte_site`: the registry id
7
+ # (src/sites.ts) left out of the cross-links; empty keeps every live site, which a product's doc wants.
8
+ charte_site = ""
9
+ charte_name = ""
10
+ charte_lang = "en"
11
+ charte_start_year = ""
12
+ charte_holder = ""
13
+ # Product accent, #rrggbb: only the format is checked (the colour rules are #647); empty keeps the Makersquad blue.
14
+ charte_accent = ""
15
+ # Footer content (src/components/Footer.astro props). A list option is set in conf.py as a list; empty is
16
+ # its default: no blurb, columns or social links, and for the cross-links the registry's live sites.
17
+ charte_blurb = ""
18
+ charte_columns = ""
19
+ charte_social = ""
20
+ charte_cross_links = ""
21
+
22
+ # PyData slots the charte fills.
23
+ navbar_start = "navbar-logo"
24
+ navbar_center = "navbar-nav"
25
+ # Light only (#607): no theme switcher.
26
+ navbar_end = "navbar-icon-links"
27
+ navbar_persistent = "charte-search-button"
28
+ # One header row at 1280 px, as the charte Header: fewer links before "More".
29
+ header_links_before_dropdown = "4"
30
+ navbar_align = "left"
31
+ footer_start = "charte-footer"
32
+ footer_center = ""
33
+ footer_end = ""
34
+ pygments_light_style = "a11y-high-contrast-light"
35
+ pygments_dark_style = "a11y-high-contrast-dark"
@@ -0,0 +1,83 @@
1
+ Metadata-Version: 2.5
2
+ Name: makersquad-sphinx-theme
3
+ Version: 3.4.0
4
+ Summary: Sphinx theme of the Makersquad charte, on the PyData Sphinx Theme
5
+ Project-URL: Homepage, https://www.makersquad.fr/
6
+ License-Expression: MIT AND OFL-1.1
7
+ License-File: LICENSE
8
+ License-File: src/makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/OFL.txt
9
+ Classifier: Framework :: Sphinx :: Theme
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Requires-Python: >=3.11
14
+ Requires-Dist: pydata-sphinx-theme<0.25,>=0.24
15
+ Requires-Dist: sphinx>=8.2
16
+ Description-Content-Type: text/markdown
17
+
18
+ # makersquad-sphinx-theme
19
+
20
+ Sphinx theme of the Makersquad charte, a child of the [PyData Sphinx Theme](https://pydata-sphinx-theme.readthedocs.io/): it inherits PyData's layout, fills its header and footer slots with the charte's own, and maps the charte's colours, type and spacing onto PyData's CSS variables. Each Makersquad release of the charte publishes it, at the charte's version.
21
+
22
+ ```sh
23
+ pip install makersquad-sphinx-theme
24
+ ```
25
+
26
+ The options below are its public API, under semantic versioning from 3.0: a 3.x only adds options and `--charte-*` custom properties; a removal or rename is announced in a 3.x and made in 4.0.
27
+
28
+ Python 3.11 or later. Light only until the theme wires a dark mode (#607): `default_mode` is `light` and the header has no theme switcher.
29
+
30
+ ```python
31
+ # conf.py
32
+ html_theme = "makersquad"
33
+ html_theme_options = {
34
+ "charte_name": "HARP Proxy",
35
+ "charte_start_year": 2023,
36
+ "charte_accent": "#0d7fc1",
37
+ "logo": {"image_light": "logo.svg", "text": None, "alt_text": "HARP"}, # the product logo, a PyData option
38
+ }
39
+ ```
40
+
41
+ Every PyData option keeps working; the logo is PyData's `logo`. The charte's own options are the `charte_*` ones. An invalid value fails the build at its start, with a message naming the option and the value (`makersquad theme: charte_accent 'red' is not a #rrggbb colour or empty`).
42
+
43
+ ## Options
44
+
45
+ | Option | Default | Accepts |
46
+ |---|---|---|
47
+ | `charte_site` | `""` | Registry id of the site the doc belongs to (`makersquad`, `harp`), left out of the footer cross-links; `""` for a doc outside the registry, which links every live site. The Makersquad docs (`makersquad`) carry no « by Makersquad » signature. |
48
+ | `charte_name` | `""` | The product's name, shown in the footer; empty falls back to Sphinx's `project`. A string. |
49
+ | `charte_lang` | `"en"` | `"fr"` or `"en"`: the language of the footer labels, and of nothing else. A French doc also sets Sphinx's `language = "fr"` (PyData's and Sphinx's own labels, `<html lang>`). |
50
+ | `charte_start_year` | `""` | A four-digit year, as a string or an integer, or empty. Gives « © 2023–2026 » (the build's year; « © 2023 » in 2023 itself); empty shows no copyright. |
51
+ | `charte_holder` | `""` | The copyright holder, a string; empty is « Makersquad ». |
52
+ | `charte_accent` | `""` | The product accent, `#rrggbb`, or empty for the Makersquad blue. Written to the `--charte-accent` custom property. |
53
+ | `charte_blurb` | `""` | A sentence under the name in the footer, a string; empty shows none. |
54
+ | `charte_columns` | `""` | The footer's link columns, a list of `{"title": …, "links": […]}` (`Footer` `columns`); each link is `{"label": …, "href": …, "external": …}`. Empty shows none. |
55
+ | `charte_social` | `""` | The footer's social links under the blurb, a list of `{"label": …, "href": …, "external": …}`. Empty shows none. |
56
+ | `charte_cross_links` | `""` | Replaces the footer's links to the other sites (`Footer` `crossLinks`): a list of `{"label": …, "href": …, "external": …}`; `[]` drops them; empty keeps the registry's live sites, `charte_site` left out. |
57
+
58
+ A link's `label` and `href` are non-empty strings; `external` is `true` or `false` (default `false`) and opens the link in a new tab with `rel="noopener"`. A link whose scheme is not `http`, `https`, `mailto` or `tel` (`javascript:`, `data:`…) fails the build, as `safeHref` turns it into `#` on the sites. A relative link is read from the doc root: `usage.html` reaches the root's `usage.html` from every page (written `../usage.html` on `guide/install.html`); one that starts with `/`, `#` or `?` is written as given. A key other than `label`, `href`, `external` (`title`, `links` for a column) fails the build too. The error names the option and the part: `makersquad theme: charte_social[1].href 'javascript:alert(1)' is not a relative link or one with the scheme http, https, mailto or tel`.
59
+
60
+ The footer takes the charte's `--color-footer` background and the white Makersquad logo. The « by Makersquad » signature (« par » with `charte_lang` `fr`) opens in a new tab and never carries an external-link marker or hidden new-tab text, as on the sites.
61
+
62
+ ## Charte data
63
+
64
+ The wheel carries the charte's tokens (`--charte-*` custom properties), Lato, the Makersquad logo and the footer data (`charte.json`, with the links to the live Makersquad sites). They are generated from the charte at each release, never edited here.
65
+
66
+ Lato ships in the wheel under the SIL Open Font License, version 1.1, whose text is `theme/makersquad/static/charte/fonts/OFL.txt` (copied into a built doc's `_static/charte/fonts/`).
67
+
68
+ ## License
69
+
70
+ `MIT AND OFL-1.1`. The theme's code and templates are under the MIT license (`LICENSE`, held by Makersquad). Lato, shipped in the wheel, stays under the SIL Open Font License, version 1.1 (`OFL.txt`). The Makersquad name and logo are not licensed: neither license allows using them to present another project. Both files are the wheel's license files.
71
+
72
+ ## Develop
73
+
74
+ In the charte repository (Makersquad only), run `node scripts/sphinx-data.ts` from the repository root, then from its `sphinx/` directory:
75
+
76
+ ```sh
77
+ uv sync
78
+ uv run pytest
79
+ uv run sphinx-build -W --keep-going -b html fixture _build/fixture
80
+ uv build --wheel
81
+ ```
82
+
83
+ The fixture build is also what `tests/e2e/sphinx-axe.spec.ts` checks with axe and `tests/e2e/sphinx-footer.spec.ts` compares with the footer baselines (1280 and 390 px), in the pinned Playwright image: after the `sphinx-build` line, run `pnpm test:e2e sphinx-axe.spec.ts sphinx-footer.spec.ts` from the repository root (without the build, the specs are skipped, and fail under `CI`). A footer change rewrites its baselines with `pnpm test:sphinx-footer:update`, after the build.
@@ -0,0 +1,21 @@
1
+ makersquad_sphinx_theme/__init__.py,sha256=MBlr613BrBCJwFaWcd6n_LAthCLq-Xn7-_PZ01n29qw,9353
2
+ makersquad_sphinx_theme/charte.json,sha256=d9ZkmXDsYWbMC_nHUtB7xlURgGjiq_P21xuXd4IwZxM,1398
3
+ makersquad_sphinx_theme/theme/makersquad/charte-footer.html,sha256=S3byTp_Lajz7kZPZO3edheMFbjra-89DTwkIJIMsOjg,2450
4
+ makersquad_sphinx_theme/theme/makersquad/charte-search-button.html,sha256=9dbJUmeZfJ21XsmNVA5ylLg3tpq7zi9VFY1xcWxM3FU,1124
5
+ makersquad_sphinx_theme/theme/makersquad/layout.html,sha256=Ylp3KFw69E2wr42p3VBn9fXEJeMCU_1yF-8jthGkX2M,384
6
+ makersquad_sphinx_theme/theme/makersquad/theme.toml,sha256=WlF5dDxlyoU5ovcrCrsW-7-j6GBruVkzEywSrVVav5Q,1384
7
+ makersquad_sphinx_theme/theme/makersquad/static/makersquad.css,sha256=ypHUeUHHFEUYtIGPDpP8NNNiVwlgDwlxZNz7Ib6RB90,5028
8
+ makersquad_sphinx_theme/theme/makersquad/static/charte/fonts.css,sha256=3-4iB3cZs7Lr9p6g1CfeuthkRdBR0upGqHHfnpv-GvI,1291
9
+ makersquad_sphinx_theme/theme/makersquad/static/charte/logo-white.svg,sha256=xDuuYZi6SBG2sSetScU0EhYCjUV9Hj73pxyB5wXwK7c,3908
10
+ makersquad_sphinx_theme/theme/makersquad/static/charte/tokens.css,sha256=Swby6bbFbkWqRXXfhiH6JQwyfVW3j5rt08DPrxweCuM,2304
11
+ makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/OFL.txt,sha256=lkglNkHsHR-LovvomXkJ97_EjMOFN5RvYnIyF4hGW4Q,6074
12
+ makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/lato-latin-400-italic.woff2,sha256=vKHYitpUTZyAhy1NonEz-rbTRzYfom6TK0fslVkIj9A,24408
13
+ makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/lato-latin-400-normal.woff2,sha256=kYt9w-Li0BXBbOCLV7y2TSJTuvwXB2WPNh5yhlSY5Tc,23580
14
+ makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/lato-latin-700-italic.woff2,sha256=bIQ0gpbr4uKggww5YusCFWQZ2bx2Nxwura9zKdgn1VA,24448
15
+ makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/lato-latin-700-normal.woff2,sha256=xEfddne0Gdt7Idvfxid8eBapE__adv0uUnAt9TjeDkk,23040
16
+ makersquad_sphinx_theme-3.4.0.dist-info/METADATA,sha256=SQDa-jQjSUWdl1u4qdoY7i25LgYBTllhmtKjWDQ52u8,6403
17
+ makersquad_sphinx_theme-3.4.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
18
+ makersquad_sphinx_theme-3.4.0.dist-info/entry_points.txt,sha256=oMdPq3C708VOBuKaIdCwk2JdGxRmbVXmq49SrNOiRMQ,58
19
+ makersquad_sphinx_theme-3.4.0.dist-info/licenses/LICENSE,sha256=aFz8QBBLjUF14RSX25jlsOgjbgXVs-fy0nRUgWh2UPA,1316
20
+ makersquad_sphinx_theme-3.4.0.dist-info/licenses/src/makersquad_sphinx_theme/theme/makersquad/static/charte/fonts/OFL.txt,sha256=lkglNkHsHR-LovvomXkJ97_EjMOFN5RvYnIyF4hGW4Q,6074
21
+ makersquad_sphinx_theme-3.4.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [sphinx.html_themes]
2
+ makersquad = makersquad_sphinx_theme
@@ -0,0 +1,26 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Makersquad
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ Scope: the MIT License above covers the theme's code and templates only. The
24
+ Lato font files shipped with the theme are under the SIL Open Font License,
25
+ version 1.1, whose text is OFL.txt beside them. The Makersquad name and logo
26
+ are not licensed.
@@ -0,0 +1,93 @@
1
+ Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-HairlineItalic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Light.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-LightItalic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Regular.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Italic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Bold.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-BoldItalic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-Black.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1. Lato-BlackItalic.ttf: Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1.
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.