mekki 0.1.0__tar.gz

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.
mekki-0.1.0/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ __pycache__/
2
+ dist/
mekki-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (C) 2024-2026 Yoshiyuki Wakinotani
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.
mekki-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,127 @@
1
+ Metadata-Version: 2.5
2
+ Name: mekki
3
+ Version: 0.1.0
4
+ Summary: A simple, lightweight Sphinx HTML theme.
5
+ Project-URL: Homepage, https://github.com/wakinotani/mekki
6
+ Project-URL: Issues, https://github.com/wakinotani/mekki/issues
7
+ Author-email: Yoshiyuki Wakinotani <wakinotani@gmail.com>
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Web Environment
11
+ Classifier: Framework :: Sphinx
12
+ Classifier: Framework :: Sphinx :: Theme
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Topic :: Documentation :: Sphinx
18
+ Classifier: Topic :: Software Development :: Documentation
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: sphinx>=8
21
+ Description-Content-Type: text/x-rst
22
+
23
+ ========================================================================
24
+ mekki
25
+ ========================================================================
26
+
27
+ A simple, lightweight `Sphinx <https://www.sphinx-doc.org>`_ HTML theme.
28
+
29
+ It works well together with `sphinx-mekki <https://github.com/wakinotani/sphinx-mekki>`_, a Sphinx extension to embed images, download files, CSSs, and JSs into a single HTML file.
30
+
31
+ Installation
32
+ ========================================================================
33
+
34
+ You are able to install ``mekki`` with ``pip``.
35
+
36
+ .. code-block:: shell
37
+
38
+ pip install mekki
39
+
40
+ Usage
41
+ ========================================================================
42
+
43
+ Set ``html_theme`` to ``mekki`` in your ``conf.py``. No entry in ``extensions`` is needed.
44
+
45
+ .. code-block:: python
46
+
47
+ html_theme = "mekki"
48
+
49
+ Layout
50
+ ========================================================================
51
+
52
+ ``mekki`` is built on Sphinx's ``basic`` theme and keeps its templates, so
53
+ pages get basic's search, index and accessibility markup.
54
+
55
+ - The sidebar is on the left, takes the full height of the window and
56
+ scrolls separately from the body. It holds the logo and project title,
57
+ the global table of contents, the previous/next links, "Show Source" and
58
+ the search box. It is hidden on screens narrower than 900px and when
59
+ printing.
60
+ - The body takes the rest of the width, and the footer is placed at the
61
+ bottom of the body column.
62
+ - By default there are no related (navigation) bars at the top and bottom
63
+ of the page. With the ``relbar`` option they are shown above and below the
64
+ body, inside the body column, and the previous/next links are removed from
65
+ the sidebar.
66
+
67
+ Theme options
68
+ ========================================================================
69
+
70
+ Besides the options inherited from the ``basic`` theme, ``mekki`` sets these
71
+ defaults:
72
+
73
+ .. code-block:: python
74
+
75
+ html_theme_options = {
76
+ "nosidebar": "false", # hide the sidebar if "true"
77
+ "sidebarwidth": "240", # sidebar width in pixels
78
+ "body_max_width": "none", # maximum body width ("none": no limit)
79
+ "relbar": "false", # show the related bars if "true"
80
+ "show_project": "false", # show the project name in the footer if "true"
81
+ "show_version": "false", # show the version in the footer if "true"
82
+ "logo_link": "root", # where the logo and the title link to
83
+ "show_sidebar_title": "true", # hide the title under the logo if "false"
84
+ }
85
+
86
+ The sidebar contents can be changed with ``html_sidebars`` in ``conf.py``.
87
+ When ``relbar`` is ``"true"``, ``relations.html`` is removed from the sidebar
88
+ contents, including one given in ``html_sidebars``. When it is ``"false"``,
89
+ the sidebar contents are used as they are.
90
+
91
+ ``show_project`` and ``show_version`` add the project name and the version
92
+ (``project`` and ``version`` in ``conf.py``) at the start of the footer, as
93
+ "project version", "project" or "version". An empty ``version`` is not
94
+ shown. The rest of the footer is controlled by Sphinx's
95
+ ``html_show_copyright``, ``html_last_updated_fmt`` and ``html_show_sphinx``.
96
+
97
+ ``logo_link`` says where the logo and the project title at the top of the
98
+ sidebar link to: ``"root"`` (the root document), ``"top"`` (the top of the
99
+ current page) or ``"none"`` (no link). ``show_sidebar_title = "false"`` shows
100
+ only the logo there, without the project title. Both are shown only when
101
+ ``html_logo`` is set.
102
+
103
+ Footer
104
+ ========================================================================
105
+
106
+ The footer is split into these blocks, in this order:
107
+
108
+ - ``footer_project``: the project name and version (``show_project`` /
109
+ ``show_version``)
110
+ - ``footer_copyright``: "© Copyright ..." (``html_show_copyright``)
111
+ - ``footer_last_updated``: "Last updated on ..." (``html_last_updated_fmt``)
112
+ - ``footer_sphinx``: "Created using Sphinx ..." (``html_show_sphinx``)
113
+
114
+ To change some parts, add a ``_templates/layout.html`` to your project
115
+ (with ``templates_path = ["_templates"]`` in ``conf.py``) that overrides
116
+ only those blocks, for example:
117
+
118
+ .. code-block:: jinja
119
+
120
+ {% extends "!layout.html" %}
121
+ {% block footer_copyright %}&#169; 2026 Your Name{% endblock %}
122
+ {% block footer_project %}{{ project }} v{{ version }}{% endblock %}
123
+
124
+ An overridden block is shown as it is: for example, ``footer_project`` above
125
+ is shown even if ``show_project`` and ``show_version`` are ``"false"``.
126
+
127
+ Enjoy writing docs!
mekki-0.1.0/README.rst ADDED
@@ -0,0 +1,105 @@
1
+ ========================================================================
2
+ mekki
3
+ ========================================================================
4
+
5
+ A simple, lightweight `Sphinx <https://www.sphinx-doc.org>`_ HTML theme.
6
+
7
+ It works well together with `sphinx-mekki <https://github.com/wakinotani/sphinx-mekki>`_, a Sphinx extension to embed images, download files, CSSs, and JSs into a single HTML file.
8
+
9
+ Installation
10
+ ========================================================================
11
+
12
+ You are able to install ``mekki`` with ``pip``.
13
+
14
+ .. code-block:: shell
15
+
16
+ pip install mekki
17
+
18
+ Usage
19
+ ========================================================================
20
+
21
+ Set ``html_theme`` to ``mekki`` in your ``conf.py``. No entry in ``extensions`` is needed.
22
+
23
+ .. code-block:: python
24
+
25
+ html_theme = "mekki"
26
+
27
+ Layout
28
+ ========================================================================
29
+
30
+ ``mekki`` is built on Sphinx's ``basic`` theme and keeps its templates, so
31
+ pages get basic's search, index and accessibility markup.
32
+
33
+ - The sidebar is on the left, takes the full height of the window and
34
+ scrolls separately from the body. It holds the logo and project title,
35
+ the global table of contents, the previous/next links, "Show Source" and
36
+ the search box. It is hidden on screens narrower than 900px and when
37
+ printing.
38
+ - The body takes the rest of the width, and the footer is placed at the
39
+ bottom of the body column.
40
+ - By default there are no related (navigation) bars at the top and bottom
41
+ of the page. With the ``relbar`` option they are shown above and below the
42
+ body, inside the body column, and the previous/next links are removed from
43
+ the sidebar.
44
+
45
+ Theme options
46
+ ========================================================================
47
+
48
+ Besides the options inherited from the ``basic`` theme, ``mekki`` sets these
49
+ defaults:
50
+
51
+ .. code-block:: python
52
+
53
+ html_theme_options = {
54
+ "nosidebar": "false", # hide the sidebar if "true"
55
+ "sidebarwidth": "240", # sidebar width in pixels
56
+ "body_max_width": "none", # maximum body width ("none": no limit)
57
+ "relbar": "false", # show the related bars if "true"
58
+ "show_project": "false", # show the project name in the footer if "true"
59
+ "show_version": "false", # show the version in the footer if "true"
60
+ "logo_link": "root", # where the logo and the title link to
61
+ "show_sidebar_title": "true", # hide the title under the logo if "false"
62
+ }
63
+
64
+ The sidebar contents can be changed with ``html_sidebars`` in ``conf.py``.
65
+ When ``relbar`` is ``"true"``, ``relations.html`` is removed from the sidebar
66
+ contents, including one given in ``html_sidebars``. When it is ``"false"``,
67
+ the sidebar contents are used as they are.
68
+
69
+ ``show_project`` and ``show_version`` add the project name and the version
70
+ (``project`` and ``version`` in ``conf.py``) at the start of the footer, as
71
+ "project version", "project" or "version". An empty ``version`` is not
72
+ shown. The rest of the footer is controlled by Sphinx's
73
+ ``html_show_copyright``, ``html_last_updated_fmt`` and ``html_show_sphinx``.
74
+
75
+ ``logo_link`` says where the logo and the project title at the top of the
76
+ sidebar link to: ``"root"`` (the root document), ``"top"`` (the top of the
77
+ current page) or ``"none"`` (no link). ``show_sidebar_title = "false"`` shows
78
+ only the logo there, without the project title. Both are shown only when
79
+ ``html_logo`` is set.
80
+
81
+ Footer
82
+ ========================================================================
83
+
84
+ The footer is split into these blocks, in this order:
85
+
86
+ - ``footer_project``: the project name and version (``show_project`` /
87
+ ``show_version``)
88
+ - ``footer_copyright``: "© Copyright ..." (``html_show_copyright``)
89
+ - ``footer_last_updated``: "Last updated on ..." (``html_last_updated_fmt``)
90
+ - ``footer_sphinx``: "Created using Sphinx ..." (``html_show_sphinx``)
91
+
92
+ To change some parts, add a ``_templates/layout.html`` to your project
93
+ (with ``templates_path = ["_templates"]`` in ``conf.py``) that overrides
94
+ only those blocks, for example:
95
+
96
+ .. code-block:: jinja
97
+
98
+ {% extends "!layout.html" %}
99
+ {% block footer_copyright %}&#169; 2026 Your Name{% endblock %}
100
+ {% block footer_project %}{{ project }} v{{ version }}{% endblock %}
101
+
102
+ An overridden block is shown as it is: for example, ``footer_project`` above
103
+ is shown even if ``show_project`` and ``show_version`` are ``"false"``.
104
+
105
+ Enjoy writing docs!
@@ -0,0 +1,23 @@
1
+ """mekki: a simple Sphinx HTML theme."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ from importlib.metadata import version
7
+ from typing import Any
8
+
9
+ from sphinx.application import Sphinx
10
+
11
+ __version__ = version("mekki")
12
+
13
+
14
+ def setup(app: Sphinx) -> dict[str, Any]:
15
+
16
+ # register the mekki theme
17
+ app.add_html_theme("mekki", os.path.abspath(os.path.dirname(__file__)))
18
+
19
+ return {
20
+ "version": __version__,
21
+ "parallel_read_safe": True,
22
+ "parallel_write_safe": True,
23
+ }
@@ -0,0 +1,114 @@
1
+ {#- mekki layout: built on basic/layout.html, overriding only the blocks that differ. #}
2
+ {%- extends "basic/layout.html" %}
3
+
4
+ {#- with the related bars (relbar option), the previous/next links are not
5
+ needed in the sidebar; a top-level set runs before basic/layout.html renders #}
6
+ {%- if theme_relbar|tobool %}
7
+ {%- set sidebars = sidebars|reject("equalto", "relations.html")|list %}
8
+ {%- endif %}
9
+
10
+ {#- basic renders the related bars outside div.document, across the sidebar;
11
+ mekki renders them inside the body column instead (see the document block) #}
12
+ {%- block relbar1 %}{% endblock %}
13
+ {%- block relbar2 %}{% endblock %}
14
+
15
+ {#- same as basic, plus the related bars above and below div.body and the
16
+ footer after them, all inside the body column, so that the sidebar can use
17
+ the full height of the page #}
18
+ {%- block document %}
19
+ <div class="documentwrapper">
20
+ {%- if render_sidebar %}
21
+ <div class="bodywrapper">
22
+ {%- endif %}
23
+ {%- block relbar_top %}{% if theme_relbar|tobool %}{{ relbar() }}{% endif %}{% endblock %}
24
+ <div class="body" role="main">
25
+ {% block body %} {% endblock %}
26
+ <div class="clearer"></div>
27
+ </div>
28
+ {%- block relbar_bottom %}{% if theme_relbar|tobool %}{{ relbar() }}{% endif %}{% endblock %}
29
+ <div class="footer" role="contentinfo">
30
+ {#- the footer is split into small blocks, so that a project can
31
+ change one part with a short _templates/layout.html that does
32
+ {% extends "!layout.html" %} and overrides that block #}
33
+ {%- block footer_project %}
34
+ {#- project name and version, as "project version" (show_project /
35
+ show_version options) #}
36
+ {%- if theme_show_project|tobool %}
37
+ {{ project|e }}
38
+ {%- endif %}
39
+ {%- if theme_show_version|tobool and version %}
40
+ {{ version|e }}
41
+ {%- endif %}
42
+ {%- endblock %}
43
+ {%- block footer_copyright %}
44
+ {#- same as basic's copyright_block() macro, which is defined later in
45
+ basic/layout.html than this block and so cannot be called here #}
46
+ {%- if show_copyright %}
47
+ {%- if hasdoc('copyright') %}
48
+ {%- set copyright_prefix = '<a href="' + pathto('copyright') + '">' + _('Copyright') + '</a>' -%}
49
+ {%- else %}
50
+ {%- set copyright_prefix = _('Copyright') %}
51
+ {%- endif %}
52
+ {%- if copyright is iterable and copyright is not string %}
53
+ {% for copyright_line in copyright %}
54
+ {% trans trimmed copyright_prefix=copyright_prefix, copyright=copyright_line|e %}
55
+ &#169; {{ copyright_prefix }} {{ copyright }}.
56
+ {% endtrans %}
57
+ {%- if not loop.last %}<br/>{%- endif %}
58
+ {% endfor %}
59
+ {%- else %}
60
+ {% trans trimmed copyright_prefix=copyright_prefix, copyright=copyright|e %}
61
+ &#169; {{ copyright_prefix }} {{ copyright }}.
62
+ {% endtrans %}
63
+ {%- endif %}
64
+ {%- endif %}
65
+ {%- endblock %}
66
+ {%- block footer_last_updated %}
67
+ {%- if last_updated %}
68
+ {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
69
+ {%- endif %}
70
+ {%- endblock %}
71
+ {%- block footer_sphinx %}
72
+ {%- if show_sphinx %}
73
+ {% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
74
+ {%- endif %}
75
+ {%- endblock %}
76
+ </div>
77
+ {%- if render_sidebar %}
78
+ </div>
79
+ {%- endif %}
80
+ </div>
81
+ {%- endblock %}
82
+
83
+ {#- the footer is rendered inside the document block above #}
84
+ {%- block footer %}{% endblock %}
85
+
86
+ {#- logo and site title at the top of the sidebar (the title can be hidden with
87
+ the show_sidebar_title option); the logo_link option says
88
+ where they link to: "root" (the root document), "top" (the top of the
89
+ current page) or "none" (no link) #}
90
+ {%- block sidebarlogo %}
91
+ {%- if logo_url %}
92
+ {%- if theme_logo_link == "top" %}
93
+ {%- set logo_href = "#" %}
94
+ {%- elif theme_logo_link == "none" %}
95
+ {%- set logo_href = "" %}
96
+ {%- else %}
97
+ {%- set logo_href = pathto(root_doc) %}
98
+ {%- endif %}
99
+ <div class="siteheader">
100
+ <div class="sitelogo">
101
+ <p class="logo">
102
+ {%- if logo_href %}<a href="{{ logo_href|e }}">{% endif -%}
103
+ <img class="logo" src="{{ logo_url|e }}" alt="{{ logo_alt|e }}"/>
104
+ {%- if logo_href %}</a>{% endif -%}
105
+ </p>
106
+ </div>
107
+ {%- if theme_show_sidebar_title|tobool %}
108
+ <div class="sitetitle">
109
+ {%- if logo_href %}<a href="{{ logo_href|e }}">{{ shorttitle|e }}</a>{% else %}{{ shorttitle|e }}{% endif -%}
110
+ </div>
111
+ {%- endif %}
112
+ </div>
113
+ {%- endif %}
114
+ {%- endblock %}
@@ -0,0 +1,535 @@
1
+ @import url("basic.css");
2
+
3
+ :root {
4
+ /* colors */
5
+ --mkc-white: #ffffff;
6
+ --mkc-glay05: #f2f2f2;
7
+ --mkc-glay10: #e6e6e6;
8
+ --mkc-glay15: #d9d9d9;
9
+ --mkc-glay20: #cccccc;
10
+ --mkc-glay25: #bfbfbf;
11
+ --mkc-glay30: #b3b3b3;
12
+ --mkc-glay35: #a6a6a6;
13
+ --mkc-glay40: #999999;
14
+ --mkc-glay45: #8c8c8c;
15
+ --mkc-glay50: #808080;
16
+ --mkc-glay55: #737373;
17
+ --mkc-glay60: #666666;
18
+ --mkc-glay65: #595959;
19
+ --mkc-glay70: #4d4d4d;
20
+ --mkc-glay75: #404040;
21
+ --mkc-glay80: #333333;
22
+ --mkc-glay85: #262626;
23
+ --mkc-glay90: #1a1a1a;
24
+ --mkc-glay95: #0d0d0d;
25
+ --mkc-black: #000000;
26
+ --mkc-red: #cc3300;
27
+ --mkc-blue: #0066cc;
28
+ --mkc-green: #44ff44;
29
+ --mkc-cyan: #44ffff;
30
+ --mkc-pink: #ff4444;
31
+
32
+ /* fonts */
33
+ --mkf-sans-serif: sans-serif;
34
+ --mkf-monospace: 'Consolas', 'Courier New', monospace;
35
+
36
+ /* div.body */
37
+ --mkc-doc-bg: var(--mkc-white);
38
+ --mkc-doc-fg: var(--mkc-glay80);
39
+ --mkc-doc-hdr-hr: var(--mkc-glay50);
40
+ --mkc-doc-hdr-anchor-fg: var(--mkc-blue);
41
+ --mkc-doc-hdr-anchor-hover-fg: var(--mkc-red);
42
+ --mkc-doc-code-bg: var(--mkc-glay15);
43
+ --mkc-doc-code-fg: var(--mkc-glay80);
44
+ --mkc-doc-anchor: var(--mkc-blue);
45
+ --mkc-doc-anchor-visited: var(--mkc-blue);
46
+ --mkc-doc-anchor-hover: var(--mkc-red);
47
+ --mkc-doc-cblk-caption-bg: var(--mkc-glay10);
48
+ --mkc-doc-cblk-bg: var(--mkc-glay05);
49
+ --mkc-doc-cblk-linenos-fg: var(--mkc-glay40);
50
+ /* admonition */
51
+ --mkc-doc-note-dir: var(--mkc-glay50);
52
+ --mkc-doc-seealso-dir: var(--mkc-green);
53
+ --mkc-doc-warning-dir: var(--mkc-pink);
54
+ --mkc-doc-tip-dir: var(--mkc-cyan);
55
+ /* table */
56
+ --mkc-doc-th-bg: var(--mkc-glay10);
57
+ --mkc-doc-th-border: var(--mkc-glay40);
58
+ --mkc-doc-td-border: var(--mkc-glay20);
59
+ /* scrollbar */
60
+ --mkc-scrollbar-bg: var(--mkc-glay20);
61
+
62
+ /* div.sphinxsidebar */
63
+ --mkc-sb-bg: var(--mkc-glay05);
64
+ --mkc-sb-fg: var(--mkc-glay75);
65
+ --mkc-sb-anchor: var(--mkc-sb-fg);
66
+
67
+ /* div.related */
68
+ --mkc-rb-bg: var(--mkc-glay05);
69
+ --mkc-rb-fg: var(--mkc-glay75);
70
+ --mkc-rb-border: var(--mkc-glay20);
71
+
72
+ /* div.footer */
73
+ --mkc-ft-fg: var(--mkc-glay60);
74
+ }
75
+
76
+ body {
77
+ font-family: var(--mkf-sans-serif);
78
+ font-size: 1.0em;
79
+ background-color: var(--mkc-doc-bg);
80
+ color: var(--mkc-doc-fg);
81
+ margin: 0;
82
+ border: 0;
83
+ padding: 0;
84
+ }
85
+
86
+ div.siteheader {
87
+ margin: 0;
88
+ border: 0;
89
+ padding: 0;
90
+ }
91
+
92
+ div.sitelogo {
93
+ margin: 0;
94
+ border: 0;
95
+ padding: 0.5em;
96
+ text-align: center;
97
+ }
98
+
99
+ div.sitetitle {
100
+ margin: 0;
101
+ border: 0;
102
+ padding: 0.5em;
103
+ text-align: center;
104
+ font-weight: bold;
105
+ font-size: 1.5em;
106
+ }
107
+
108
+ /*
109
+ * Two-column layout: div.document is a horizontal flexbox with the sidebar
110
+ * and the body column. The sidebar comes after the body column in the HTML,
111
+ * so order: -1 moves it to the left. The footer is rendered inside the body
112
+ * column (see layout.html), so the sidebar takes the full height of the
113
+ * window from top to bottom.
114
+ *
115
+ * The body column is a vertical flexbox at least as tall as the window:
116
+ * div.body, then the footer. div.body grows to take the spare height, so the
117
+ * footer sits at the bottom of the window on short pages and right after the
118
+ * body on long ones.
119
+ * div.bodywrapper is only rendered when there is a sidebar, so both wrappers
120
+ * are set up this way.
121
+ */
122
+ div.documentwrapper {
123
+ flex: 1;
124
+ min-width: 0;
125
+ display: flex;
126
+ flex-direction: column;
127
+ min-height: 100vh;
128
+ }
129
+
130
+ div.bodywrapper {
131
+ margin: 0;
132
+ border: 0;
133
+ padding: 0;
134
+ flex: 1;
135
+ display: flex;
136
+ flex-direction: column;
137
+ }
138
+
139
+ hr {
140
+ border: 1px solid var(--mkc-doc-hdr-hr);
141
+ }
142
+
143
+ /* keep overflow visible here: the sticky sidebar sticks to the nearest scrolling ancestor */
144
+ div.document {
145
+ display: flex;
146
+ }
147
+
148
+ /* the maximum width comes from the body_max_width theme option ("none" in theme.toml) */
149
+ div.body {
150
+ margin: 0;
151
+ border: 0;
152
+ padding: 0 20px 20px 20px;
153
+ font-size: 1.0em;
154
+ overflow: auto;
155
+ flex: 1 0 auto;
156
+ }
157
+
158
+ /* related (navigation) bars above and below div.body (relbar option);
159
+ basic.css lays out the items */
160
+ div.related {
161
+ margin: 0;
162
+ border: 0;
163
+ padding: 6px 10px;
164
+ box-sizing: border-box;
165
+ font-size: 0.8em;
166
+ line-height: 1.7em;
167
+ background-color: var(--mkc-rb-bg);
168
+ color: var(--mkc-rb-fg);
169
+ }
170
+
171
+ div.related:first-child {
172
+ margin-bottom: 20px;
173
+ border-bottom: 1px solid var(--mkc-rb-border);
174
+ }
175
+
176
+ div.body + div.related {
177
+ border-top: 1px solid var(--mkc-rb-border);
178
+ }
179
+
180
+ div.related a {
181
+ color: var(--mkc-rb-fg);
182
+ }
183
+
184
+ div.footer {
185
+ margin: 0;
186
+ border: 0;
187
+ padding: 20px 0;
188
+ width: 100%;
189
+ text-align: center;
190
+ font-size: 0.8em;
191
+ color: var(--mkc-ft-fg);
192
+ }
193
+
194
+ div.footer a {
195
+ color: var(--mkc-ft-fg);
196
+ text-decoration: underline;
197
+ }
198
+
199
+ div.sphinxsidebar {
200
+ order: -1;
201
+ flex: 0 0 {{ theme_sidebarwidth|todim }};
202
+ float: none;
203
+ /* keep the sidebar on screen and scroll it separately from the body */
204
+ position: sticky;
205
+ top: 0;
206
+ align-self: flex-start; /* do not stretch to the body's height, or sticky has no room to work */
207
+ height: 100vh; /* always the full window height, even when its contents are short */
208
+ overflow-x: hidden;
209
+ overflow-y: auto;
210
+ background-color: var(--mkc-sb-bg);
211
+ color: var(--mkc-sb-fg);
212
+ font-size: 0.8em;
213
+ line-height: 1.7em;
214
+ margin: 0;
215
+ padding: 0;
216
+ }
217
+
218
+ div.sphinxsidebarwrapper {
219
+ margin: 0;
220
+ padding: 0;
221
+ }
222
+
223
+ div.sphinxsidebar p {
224
+ padding: 5px 10px;
225
+ }
226
+
227
+ div.sphinxsidebar p.logo {
228
+ margin: 0;
229
+ border: 0;
230
+ padding: 0;
231
+ }
232
+
233
+ div.sphinxsidebar h1, h2, h3, h4, h5, h6,
234
+ div.sphinxsidebar ul {
235
+ margin: 8px 4px 8px 8px;
236
+ padding: 0;
237
+ }
238
+
239
+ div.sphinxsidebar ul ul,
240
+ div.sphinxsidebar ul.want-points {
241
+ margin-left: 16px;
242
+ margin-right: 0px;
243
+ list-style-type: disc;
244
+ }
245
+
246
+ div.sphinxsidebar a {
247
+ color: var(--mkc-sb-anchor);
248
+ }
249
+
250
+ code.download {
251
+ color: var(--mkc-doc-anchor);
252
+ text-decoration: underline;
253
+ font-size: 1em;
254
+ font-weight: bold;
255
+ font-family: var(--mkf-sans-serif);
256
+ text-decoration: underline;
257
+ }
258
+
259
+ code.download:hover {
260
+ color: var(--mkc-doc-anchor-hover);
261
+ text-decoration: underline;
262
+ }
263
+
264
+ a {
265
+ color: var(--mkc-doc-anchor);
266
+ text-decoration: none;
267
+ }
268
+
269
+ a:visited {
270
+ color: var(--mkc-doc-anchor-visited);
271
+ text-decoration: none;
272
+ }
273
+
274
+ a:hover {
275
+ color: var(--mkc-doc-anchor-hover);
276
+ text-decoration: underline;
277
+ }
278
+
279
+ div.body h1,
280
+ div.body h2,
281
+ div.body h3,
282
+ div.body h4,
283
+ div.body h5,
284
+ div.body h6 {
285
+ font-family: var(--mkf-sans-serif);
286
+ font-weight: normal;
287
+ margin: 20px 0px 10px 0px;
288
+ padding: 5px 0 5px 0px;
289
+ }
290
+ div.body h1 { font-size: 1.8em; border-bottom: 3px solid var(--mkc-doc-hdr-hr); margin-top: 0; }
291
+ div.body h2 { font-size: 1.5em; border-bottom: 2px solid var(--mkc-doc-hdr-hr); }
292
+ div.body h3 { font-size: 1.3em; border-bottom: 1px solid var(--mkc-doc-hdr-hr); }
293
+ div.body h4 { font-size: 1.2em; border-bottom: 1px solid var(--mkc-doc-hdr-hr); }
294
+ div.body h5 { font-size: 1.1em; border-bottom: 1px solid var(--mkc-doc-hdr-hr); }
295
+ div.body h6 { font-size: 1.0em; border-bottom: 1px solid var(--mkc-doc-hdr-hr); }
296
+
297
+ a.toc-backref {
298
+ text-decoration: none
299
+ }
300
+
301
+ a.headerlink {
302
+ color: var(--mkc-doc-hdr-anchor-fg);
303
+ font-size: 0.7em;
304
+ margin-left: 0.3em;
305
+ padding: 0;
306
+ text-decoration: none;
307
+ }
308
+
309
+ a.headerlink:hover {
310
+ color: var(--mkc-doc-hdr-anchor-hover-fg);
311
+ text-decoration: underline;
312
+ }
313
+
314
+ div.body p {
315
+ line-height: 1.7em;
316
+ }
317
+
318
+ div.body dd {
319
+ line-height: 1.7em;
320
+ }
321
+
322
+ div.body li {
323
+ line-height: 1.7em;
324
+ }
325
+
326
+ div.body li p {
327
+ margin: 0;
328
+ }
329
+
330
+ div[class*="highlight-"] {
331
+ margin: 4px 0;
332
+ }
333
+
334
+ div.admonition p.admonition-title + p {
335
+ display: inline;
336
+ }
337
+
338
+ p.admonition-title {
339
+ display: inline;
340
+ }
341
+
342
+ p.admonition-title:after {
343
+ content: ":";
344
+ }
345
+
346
+ div.literal-block-wrapper {
347
+ margin: 4px 0;
348
+ }
349
+
350
+ div.code-block-caption span.caption-number {
351
+ margin-right: 0.5em;
352
+ }
353
+
354
+ figcaption {
355
+ padding: 0;
356
+ }
357
+
358
+ div.body figcaption p {
359
+ margin: 0;
360
+ padding: 0;
361
+ }
362
+
363
+ figcaption span.caption-number {
364
+ margin-right: 1.0em;
365
+ }
366
+
367
+ figcaption span.caption-text {
368
+ line-height: 1.0em;
369
+ }
370
+
371
+ div.note,
372
+ div.topic,
373
+ nav.contents,
374
+ aside.topic {
375
+ border: 1px solid var(--mkc-doc-note-dir);
376
+ }
377
+
378
+ div.seealso {
379
+ border: 1px solid var(--mkc-doc-seealso-dir);
380
+ }
381
+
382
+ div.attention,
383
+ div.caution,
384
+ div.danger,
385
+ div.error,
386
+ div.important,
387
+ div.warning {
388
+ border: 1px solid var(--mkc-doc-warning-dir);
389
+ }
390
+
391
+ div.hint,
392
+ div.tip {
393
+ border: 1px solid var(--mkc-doc-tip-dir);
394
+ }
395
+
396
+ pre {
397
+ font-family: var(--mkf-monospace);
398
+ padding: 0.5em 2.0em 0.5em 0.5em;
399
+ line-height: 1.2em;
400
+ margin: 1.5em 0 1.5em 0;
401
+ }
402
+
403
+ code {
404
+ font-family: var(--mkf-monospace);
405
+ background-color: var(--mkc-doc-code-bg);
406
+ color: var(--mkc-doc-code-fg);
407
+ }
408
+
409
+ div.code-block-caption {
410
+ margin: 0;
411
+ padding: 0 5px;
412
+ font-size: 0.8em;
413
+ line-height: 1.7em;
414
+ background-color: var(--mkc-doc-cblk-caption-bg);
415
+ }
416
+
417
+ div.highlight {
418
+ background-color: var(--mkc-doc-cblk-bg);
419
+ }
420
+
421
+ span.section-number {
422
+ padding-right: 8px;
423
+ }
424
+
425
+ span.linenos {
426
+ padding-left: 5px;
427
+ padding-right: 20px;
428
+ user-select: none;
429
+ color: var(--mkc-doc-cblk-linenos-fg);
430
+ }
431
+
432
+ div.line-block {
433
+ margin: 0;
434
+ }
435
+
436
+ ol, ul {
437
+ padding-left: 20px;
438
+ list-style-type: disc;
439
+ }
440
+
441
+ ol.arabic li {
442
+ padding-left: 4px;
443
+ }
444
+
445
+ .align-default {
446
+ text-align: center;
447
+ }
448
+
449
+ table.docutils {
450
+ margin-top: 1em;
451
+ margin-bottom: 1em;
452
+ margin-left: auto; /* align the table to the center. */
453
+ margin-right: auto; /* align the table to the center. */
454
+ padding: 0;
455
+ border: 1px solid var(--mkc-doc-tbl-border);
456
+ }
457
+
458
+ table.docutils caption {
459
+ padding: 8px;
460
+ }
461
+
462
+ table.docutils th {
463
+ padding: 1px 8px 1px 5px;
464
+ border: 1px solid var(--mkc-doc-th-border);
465
+ background-color: var(--mkc-doc-th-bg);
466
+ }
467
+
468
+ table.docutils th p {
469
+ margin-top: 0.2em;
470
+ margin-bottom: 0.2em;
471
+ line-height: 1.2em;
472
+ }
473
+
474
+ table.docutils td {
475
+ padding: 1px 8px 1px 5px;
476
+ border: 1px solid var(--mkc-doc-td-border);
477
+ }
478
+
479
+ table.docutils td p {
480
+ margin-top: 0.2em;
481
+ margin-bottom: 0.2em;
482
+ line-height: 1.2em;
483
+ }
484
+
485
+ table.field-list td, table.field-list th {
486
+ border: 0 !important;
487
+ word-break: break-word;
488
+ }
489
+
490
+ table.footnote td, table.footnote th {
491
+ border: 0 !important;
492
+ }
493
+
494
+ th {
495
+ color: var(--mkc-doc-fg);
496
+ font-weight: normal;
497
+ text-align: left;
498
+ padding-right: 5px;
499
+ }
500
+
501
+ table span.caption-number {
502
+ margin-right: 1.0em;
503
+ }
504
+
505
+ ::-webkit-scrollbar {
506
+ height: 8px;
507
+ width: 8px;
508
+ }
509
+
510
+ ::-webkit-scrollbar-track {
511
+ background: transparent;
512
+ }
513
+
514
+ ::-webkit-scrollbar-thumb {
515
+ background-color: var(--mkc-scrollbar-bg);
516
+ border-radius: 16px;
517
+ border: transparent;
518
+ }
519
+
520
+
521
+ /* hide the sidebar on narrow screens; the body column then takes the full width */
522
+ @media (max-width: 899px) {
523
+ div.sphinxsidebar {
524
+ display: none;
525
+ }
526
+ }
527
+
528
+ @media print {
529
+ div.footer {
530
+ display: block;
531
+ }
532
+ div.sphinxsidebar {
533
+ display: none;
534
+ }
535
+ }
@@ -0,0 +1,28 @@
1
+ [theme]
2
+ inherit = "basic"
3
+ stylesheets = [
4
+ "mekki.css",
5
+ ]
6
+ sidebars = [
7
+ "globaltoc.html",
8
+ "relations.html",
9
+ "sourcelink.html",
10
+ "searchbox.html",
11
+ ]
12
+ pygments_style = { default = "tango" }
13
+
14
+ [options]
15
+ sidebarwidth = "240"
16
+ # let div.body fill the whole body column (basic's default is 800px)
17
+ body_max_width = "none"
18
+ # "true": show the related (navigation) bars above and below the body and drop
19
+ # relations.html (previous/next links) from the sidebar
20
+ relbar = "false"
21
+ # "true": show the project name / the version at the start of the footer
22
+ show_project = "false"
23
+ show_version = "false"
24
+ # where the logo and the project title in the sidebar link to: "root" (the root
25
+ # document), "top" (the top of the current page) or "none" (no link)
26
+ logo_link = "root"
27
+ # "false": hide the project title under the logo in the sidebar
28
+ show_sidebar_title = "true"
@@ -0,0 +1,49 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "mekki"
7
+ version = "0.1.0"
8
+ authors = [
9
+ { name="Yoshiyuki Wakinotani", email="wakinotani@gmail.com" },
10
+ ]
11
+ description = "A simple, lightweight Sphinx HTML theme."
12
+ readme = "README.rst"
13
+ requires-python = ">=3.11"
14
+ classifiers = [
15
+ "Framework :: Sphinx",
16
+ "Framework :: Sphinx :: Theme",
17
+ "Development Status :: 4 - Beta",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Environment :: Web Environment",
20
+ "Intended Audience :: Developers",
21
+ "Programming Language :: Python :: 3",
22
+ "Operating System :: OS Independent",
23
+ "Topic :: Documentation :: Sphinx",
24
+ "Topic :: Software Development :: Documentation",
25
+ ]
26
+ dependencies = [
27
+ "sphinx>=8",
28
+ ]
29
+
30
+ [project.urls]
31
+ Homepage = "https://github.com/wakinotani/mekki"
32
+ Issues = "https://github.com/wakinotani/mekki/issues"
33
+
34
+ [project.entry-points]
35
+ "sphinx.html_themes" = { mekki = "mekki" }
36
+
37
+ [tool.hatch.build.targets.wheel]
38
+ packages = ["mekki"]
39
+
40
+ [tool.hatch.build.targets.sdist]
41
+ exclude = [".github"]
42
+
43
+ [tool.ruff]
44
+ # used for both linting and formatting; target-version is taken from requires-python
45
+ line-length = 119
46
+
47
+ [tool.ruff.lint]
48
+ # pycodestyle, pyflakes, isort, bugbear, pyupgrade
49
+ select = ["E", "W", "F", "I", "B", "UP"]