Skip to content

Commit f3718f3

Browse files
authored
Changed docs website to sphinx-immaterial. (#2)
1 parent a6ab146 commit f3718f3

File tree

9 files changed

+225
-30
lines changed

9 files changed

+225
-30
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ venv/
109109
ENV/
110110
env.bak/
111111
venv.bak/
112+
.idea/
112113

113114
# Spyder project settings
114115
.spyderproject

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ else.
77
Please take a look into the related project, if you want to reuse or change
88
its data.
99

10-
---
10+
----------------------
1111

1212
MIT License
1313

docs/_static/custom.css

+138-3
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,166 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Recursive:wght@300;400&display=swap');
2+
13
div.document {
24
width: 100%;
35
width: 100vw;
46
max-width: 1490px;
5-
padding:10px 5%;
7+
padding: 10px 5%;
68
}
79

10+
/*
811
div.body {
912
width: 100%;
10-
max-width: unset;
11-
}
13+
}*/
1214

1315

1416
table.needs_style_awesome_red tr.head,
1517
tr.awesome_red td.needs_sphinx_type {
1618
background-color: #ffe0d9 !important;
19+
color: #000 !important;
1720
}
1821

1922
table.needs_style_awesome_blue tr.head,
2023
tr.awesome_blue td.needs_sphinx_type {
2124
background-color: #cbd8e9 !important;
25+
color: #000 !important;
2226
}
2327

2428
table.needs_style_awesome_green tr.head,
2529
tr.awesome_green td.needs_sphinx_type {
2630
background-color: #dcfcdc !important;
31+
color: #000 !important;
2732
}
2833

2934
td.needs_title {
3035
font-weight: bold;
3136
}
37+
38+
.md-typeset pre, pre {
39+
overflow-x: auto;
40+
}
41+
42+
div.wy-table-responsive{
43+
width: 100% !important;
44+
}
45+
46+
.underline{
47+
text-decoration: underline;
48+
}
49+
50+
/*Remove READTHEDOCS version badge*/
51+
.injected {
52+
display: none !important;
53+
}
54+
55+
table.need{
56+
display: table !important;
57+
width: 100% !important;
58+
}
59+
tbody tr td {
60+
font-size: medium !important;
61+
}
62+
63+
/* Sphinx-Immaterial */
64+
65+
body,
66+
input {
67+
font-family: 'Recursive', sans-serif !important;
68+
font-size: 16px !important;
69+
font-weight: 400;
70+
line-height: 1.5 !important;
71+
}
72+
73+
.md-typeset, .md-nav, .md-typeset table:not([class]) {
74+
font-size: 16px !important;
75+
line-height: 1.5 !important;
76+
}
77+
78+
79+
h1, h2, h3 {
80+
font-family: 'Recursive', sans-serif !important;
81+
font-weight: 500 !important;
82+
line-height: 1.4 !important;
83+
}
84+
85+
h1:not([class="md-search-result__title"]) {
86+
font-size: 34px !important;
87+
margin-bottom: 20px !important;
88+
}
89+
90+
h2 {
91+
font-size: 24px !important;
92+
margin-bottom: 10px !important;
93+
}
94+
95+
h3 {
96+
font-size: 18px !important;
97+
margin-bottom: 10px !important;
98+
}
99+
100+
.dataTables_filter input {
101+
border: 1px solid var(--md-typeset-color);
102+
margin-bottom: 10px;
103+
background-color: transparent;
104+
}
105+
106+
.border {
107+
border: 1px solid var(--md-typeset-color);
108+
}
109+
110+
table.dataTable tbody tr {
111+
background-color: transparent !important;
112+
}
113+
114+
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate {
115+
color: var(--md-typeset-color) !important;
116+
}
117+
118+
.dataTables_wrapper .dataTables_paginate a.paginate_button, .dataTables_wrapper .dataTables_paginate a.paginate_button.current {
119+
color: var(--md-typeset-color) !important;
120+
}
121+
122+
div.dataTables_info {
123+
margin-top: 0 !important;
124+
}
125+
126+
table tbody tr:hover {
127+
background-color: rgb(147 147 147 / 10%) !important;
128+
box-shadow: 0 .05rem 0 var(--md-default-bg-color) inset !important;
129+
}
130+
131+
button.dt-button:hover:not(.disabled), div.dt-button:hover:not(.disabled), a.dt-button:hover:not(.disabled) {
132+
color: #000;
133+
}
134+
135+
.dataTables_wrapper .dataTables_filter {
136+
float: left !important;
137+
margin-left: 1% !important;
138+
}
139+
140+
div.dt-buttons {
141+
margin-left: 1% !important;
142+
}
143+
144+
.dataTables_wrapper .dataTables_filter input {
145+
max-width: 100px !important;
146+
}
147+
@media screen and (max-width: 640px){
148+
.dataTables_wrapper .dataTables_filter {
149+
float: none !important;
150+
text-align: center !important;
151+
}
152+
153+
.dataTables_wrapper .dataTables_filter input {
154+
max-width: inherit !important;
155+
}
156+
}
157+
158+
div.dt-button-collection button.dt-button.active:not(.disabled) {
159+
color: #000 !important;
160+
border: 1px solid #000 !important;
161+
}
162+
163+
table.NEEDS_DATATABLES, table.NEEDS_TABLE{
164+
max-width: inherit;
165+
width: inherit;
166+
}

docs/_static/custom.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$(document).ready(function() {
2+
$("table.NEEDS_DATATABLES, table.NEEDS_TABLE").wrap("<div class='wy-table-responsive'></div>");
3+
});

docs/_templates/layout.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{# Import the theme's layout. #}
2+
{% extends '!layout.html' %}
3+
4+
{%- block extrahead %}
5+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
6+
{{ super() }}
7+
{%- endblock %}

docs/conf.py

+53-7
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,73 @@
2626
extensions = [
2727
'sphinx_needs',
2828
'sphinxcontrib.plantuml',
29-
# 'sphinx_immaterial',
30-
'sphinx_design',
29+
'sphinx_immaterial',
30+
'sphinx_design'
3131
]
3232

3333
templates_path = ['_templates']
3434
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '_awesome_templates']
3535

36-
37-
3836
# -- Options for HTML output -------------------------------------------------
3937
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
4038

41-
# html_theme = 'sphinx_immaterial' # 'alabaster'
42-
html_theme = 'alabaster'
39+
html_theme = 'sphinx_immaterial' # 'alabaster'
40+
# html_theme = 'alabaster'
4341
html_static_path = ['_static']
4442
html_css_files = ['custom.css']
43+
html_js_files = ['custom.js']
4544
html_context = {
4645
'project_tags': PROJECT_TAGS,
47-
'need_ipmort_file':os.getenv('AWESOMESPHINX_NEEDS_FILE', '/../data/20221024_awesome.json')
46+
'need_ipmort_file': os.getenv('AWESOMESPHINX_NEEDS_FILE', '/../data/20221024_awesome.json')
47+
}
48+
49+
html_theme_options = {
50+
# "icon": {
51+
# "repo": "fontawesome/brands/github-square",
52+
# },
53+
"font": {
54+
"code": "JetBrains Mono"
55+
},
56+
# "site_url": "https://sphinxcontrib-needs.readthedocs.io/",
57+
# "repo_url": "https://github.com/useblocks/sphinxcontrib-needs/",
58+
# "repo_name": "awesome-sphinx",
59+
# "repo_type": "github",
60+
# "edit_uri": "blob/main/docs",
61+
# "google_analytics": ["UA-XXXXX", "auto"],
62+
"globaltoc_collapse": True,
63+
"features": [
64+
# "navigation.sections",
65+
"navigation.top",
66+
"search.share",
67+
"navigation.tracking",
68+
"toc.follow"
69+
],
70+
"palette": [
71+
{
72+
"media": "(prefers-color-scheme: light)",
73+
"scheme": "default",
74+
"primary": "blue",
75+
"accent": "light-blue",
76+
"toggle": {
77+
"icon": "material/weather-night",
78+
"name": "Switch to dark mode",
79+
},
80+
},
81+
{
82+
"media": "(prefers-color-scheme: dark)",
83+
"scheme": "slate",
84+
"primary": "blue",
85+
"accent": "yellow",
86+
"toggle": {
87+
"icon": "material/weather-sunny",
88+
"name": "Switch to light mode",
89+
},
90+
},
91+
],
92+
"toc_title_is_page_title": True,
4893
}
4994

95+
5096
# NEED CONFIG
5197

5298
needs_id_regex = r'.*'

docs/index.rst

+16-13
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,27 @@ extensions, themes and other Sphinx-related projects.
1313

1414
*Documentation was built on:* |today|
1515

16+
.. grid:: 2
17+
:gutter: 2
1618

17-
.. grid:: 2
18-
:outline:
19+
.. grid-item-card:: Types
20+
:columns: 6 6 6 6
21+
:class-card: border
1922

20-
.. grid-item-card:: Types
21-
22-
| :ref:`Extensions <extensions>`: :need_count:`sphinx_type == "extension"`
23-
| :ref:`Themes <themes>`: :need_count:`sphinx_type == "theme"`
24-
| :ref:`Other projects <others>`: :need_count:`sphinx_type == "other"`
23+
| :ref:`Extensions <extensions>`: :need_count:`sphinx_type == "extension"`
24+
| :ref:`Themes <themes>`: :need_count:`sphinx_type == "theme"`
25+
| :ref:`Other projects <others>`: :need_count:`sphinx_type == "other"`
2526
26-
:ref:`Overall <overall>`: :need_count:`type == "sw"`
27+
:ref:`Overall <overall>`: :need_count:`type == "sw"`
2728

2829

29-
.. grid-item-card:: Tags
30+
.. grid-item-card:: Tags
31+
:columns: 6 6 6 6
32+
:class-card: border
3033

31-
{% for tag, desc in project_tags.items() %}
32-
| :ref:`{{tag}} <tag_{{tag}}>`: :need_count:`"{{tag}}" in tags`
33-
{% endfor %}
34+
{% for tag, desc in project_tags.items() %}
35+
| :ref:`{{tag}} <tag_{{tag}}>`: :need_count:`"{{tag}}" in tags`
36+
{% endfor %}
3437

3538

3639
Featured themes and extensions
@@ -52,7 +55,7 @@ The export takes filter and sorting into account.
5255

5356
.. needtable::
5457
:columns: id, title as "Name", content as "Description", sphinx_type as "Type", license, points, monthly as "Monthly downloads", release_days as "Days since last release"
55-
:colwidths: 10, 20, 35,10, 5, 5, 5, 10
58+
:colwidths: 10, 20, 35, 10, 5, 5, 5, 10
5659
:style_row: awesome_[[copy('color')]]
5760

5861

docs/rating.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Points for release days:
3434
Download rating
3535
---------------
3636

37-
The downloand numbers are taken from the BigQuery Table from PyPi.
38-
Is this is tored on the google cloud and querying >1TB per month costs money, these numbers get updated once a week.
37+
The download numbers are taken from the BigQuery Table from PyPi.
38+
The data is stored on Google cloud and querying >1TB per month costs money, these numbers get updated once a week.
3939

4040

4141
Points for monthly downloads:

docs/requirements.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
sphinx-needs
2-
sphinxcontrib-plantuml
1+
git+https://github.com/useblocks/sphinx-needs/#egg=sphinx-needs
2+
sphinxcontrib.plantuml
33
google-cloud-bigquery
4-
sphinx-design
5-
git+https://github.com/jbms/sphinx-immaterial.git
4+
sphinx_design
5+
sphinx-immaterial

0 commit comments

Comments
 (0)