Skip to content

Commit 628b943

Browse files
authored
Merge pull request #26 from DenverCoder1/docs-style
2 parents 107f983 + 85e7e19 commit 628b943

File tree

5 files changed

+41
-31
lines changed

5 files changed

+41
-31
lines changed

docs/source/_static/css/custom.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ a.icon.icon-home:visited {
2424
/* Change code highlight background on dark mode */
2525
@media (prefers-color-scheme: dark) {
2626
.rst-content .highlight {
27-
background: #26292b;
27+
background: #26292b;
2828
}
2929
}
30+
31+
/* Change code block font */
32+
.rst-content .linenodiv pre,
33+
.rst-content div[class^="highlight"] pre,
34+
.rst-content pre.literal-block {
35+
font-family: Source Code Pro, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, Courier, monospace;
36+
}

docs/source/_templates/layout.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
<link rel="stylesheet" href="{{ pathto('_static/css/theme.css', 1)|e }}" type="text/css" />
4141
<link rel="stylesheet" href="{{ pathto('_static/css/custom.css', 1)|e }}" type="text/css" />
4242

43+
<link href="https://adobe-fonts.github.io/source-code-pro/source-code-pro.css" rel="stylesheet">
44+
4345
{%- for cssfile in extra_css_files %}
4446
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
4547
{%- endfor -%}

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import os
1414
import sys
1515

16-
sys.path.insert(0, os.path.abspath("."))
16+
sys.path.insert(0, os.path.abspath("../.."))
1717
sys.path.append(os.path.abspath("extensions"))
1818

1919

docs/source/generate_style_list.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def generate_style_list():
3636
)
3737
style_heading = f"`{style}`\n" + "~" * len(f"`{style}`")
3838
output_example = indent_all_lines(full + "\n\n" + body_only)
39-
style_list += f"{style_heading}\n\n::\n\n{output_example}\n\n"
39+
style_list += f"{style_heading}\n\n.. code-block:: none\n\n{output_example}\n\n"
4040
# put it all together
4141
return f"{heading}\n\n{table_of_contents}\n{style_list}"
4242

@@ -49,4 +49,5 @@ def write_to_file(filename, content):
4949

5050
if __name__ == "__main__":
5151
content = generate_style_list()
52-
write_to_file(os.path.join("docs", "source", "styles.rst"), content)
52+
write_to_file(os.path.join(os.path.dirname(__file__), "styles.rst"), content)
53+
print("Successfully generated styles.rst")

docs/source/styles.rst

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Preset styles
88
`ascii`
99
~~~~~~~
1010

11-
::
11+
.. code-block:: none
1212
1313
+-----+-----------------------+
1414
| # | G H R S |
@@ -29,7 +29,7 @@ Preset styles
2929
`ascii_borderless`
3030
~~~~~~~~~~~~~~~~~~
3131

32-
::
32+
.. code-block:: none
3333
3434
# | G H R S
3535
----- ----- ----- ----- -----
@@ -44,7 +44,7 @@ Preset styles
4444
`ascii_box`
4545
~~~~~~~~~~~
4646

47-
::
47+
.. code-block:: none
4848
4949
+-----+-----+-----+-----+-----+
5050
| # | G | H | R | S |
@@ -65,7 +65,7 @@ Preset styles
6565
`ascii_compact`
6666
~~~~~~~~~~~~~~~
6767

68-
::
68+
.. code-block:: none
6969
7070
+-----+-----------------------+
7171
| # | G H R S |
@@ -84,7 +84,7 @@ Preset styles
8484
`ascii_double`
8585
~~~~~~~~~~~~~~
8686

87-
::
87+
.. code-block:: none
8888
8989
+-----+-----------------------+
9090
| # | G H R S |
@@ -105,7 +105,7 @@ Preset styles
105105
`ascii_minimalist`
106106
~~~~~~~~~~~~~~~~~~
107107

108-
::
108+
.. code-block:: none
109109
110110
-----------------------------
111111
# | G H R S
@@ -126,7 +126,7 @@ Preset styles
126126
`ascii_simple`
127127
~~~~~~~~~~~~~~
128128

129-
::
129+
.. code-block:: none
130130
131131
===== ===== ===== ===== =====
132132
# | G H R S
@@ -145,7 +145,7 @@ Preset styles
145145
`borderless`
146146
~~~~~~~~~~~~
147147

148-
::
148+
.. code-block:: none
149149
150150
# ┃ G H R S
151151
━━━━━ ━━━━━ ━━━━━ ━━━━━ ━━━━━
@@ -160,7 +160,7 @@ Preset styles
160160
`double`
161161
~~~~~~~~
162162

163-
::
163+
.. code-block:: none
164164
165165
╔═════╦═══════════════════════╗
166166
║ # ║ G H R S ║
@@ -181,7 +181,7 @@ Preset styles
181181
`double_box`
182182
~~~~~~~~~~~~
183183

184-
::
184+
.. code-block:: none
185185
186186
╔═════╦═════╦═════╦═════╦═════╗
187187
║ # ║ G ║ H ║ R ║ S ║
@@ -202,7 +202,7 @@ Preset styles
202202
`double_compact`
203203
~~~~~~~~~~~~~~~~
204204

205-
::
205+
.. code-block:: none
206206
207207
╔═════╦═══════════════════════╗
208208
║ # ║ G H R S ║
@@ -221,7 +221,7 @@ Preset styles
221221
`double_thin_compact`
222222
~~~~~~~~~~~~~~~~~~~~~
223223

224-
::
224+
.. code-block:: none
225225
226226
╔═════╦═══════════════════════╗
227227
║ # ║ G H R S ║
@@ -240,7 +240,7 @@ Preset styles
240240
`markdown`
241241
~~~~~~~~~~
242242

243-
::
243+
.. code-block:: none
244244
245245
| # | G | H | R | S |
246246
|-----|-----|-----|-----|-----|
@@ -255,7 +255,7 @@ Preset styles
255255
`minimalist`
256256
~~~~~~~~~~~~
257257

258-
::
258+
.. code-block:: none
259259
260260
─────────────────────────────
261261
# │ G H R S
@@ -276,7 +276,7 @@ Preset styles
276276
`simple`
277277
~~~~~~~~
278278

279-
::
279+
.. code-block:: none
280280
281281
═════ ═════ ═════ ═════ ═════
282282
# ║ G H R S
@@ -295,7 +295,7 @@ Preset styles
295295
`thick`
296296
~~~~~~~
297297

298-
::
298+
.. code-block:: none
299299
300300
┏━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
301301
┃ # ┃ G H R S ┃
@@ -316,7 +316,7 @@ Preset styles
316316
`thick_box`
317317
~~~~~~~~~~~
318318

319-
::
319+
.. code-block:: none
320320
321321
┏━━━━━┳━━━━━┳━━━━━┳━━━━━┳━━━━━┓
322322
┃ # ┃ G ┃ H ┃ R ┃ S ┃
@@ -337,7 +337,7 @@ Preset styles
337337
`thick_compact`
338338
~~~~~~~~~~~~~~~
339339

340-
::
340+
.. code-block:: none
341341
342342
┏━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
343343
┃ # ┃ G H R S ┃
@@ -356,7 +356,7 @@ Preset styles
356356
`thin`
357357
~~~~~~
358358

359-
::
359+
.. code-block:: none
360360
361361
┌─────┬───────────────────────┐
362362
│ # │ G H R S │
@@ -377,7 +377,7 @@ Preset styles
377377
`thin_box`
378378
~~~~~~~~~~
379379

380-
::
380+
.. code-block:: none
381381
382382
┌─────┬─────┬─────┬─────┬─────┐
383383
│ # │ G │ H │ R │ S │
@@ -398,7 +398,7 @@ Preset styles
398398
`thin_compact`
399399
~~~~~~~~~~~~~~
400400

401-
::
401+
.. code-block:: none
402402
403403
┌─────┬───────────────────────┐
404404
│ # │ G H R S │
@@ -417,7 +417,7 @@ Preset styles
417417
`thin_compact_rounded`
418418
~~~~~~~~~~~~~~~~~~~~~~
419419

420-
::
420+
.. code-block:: none
421421
422422
╭─────┬───────────────────────╮
423423
│ # │ G H R S │
@@ -436,7 +436,7 @@ Preset styles
436436
`thin_double`
437437
~~~~~~~~~~~~~
438438

439-
::
439+
.. code-block:: none
440440
441441
┌─────┬───────────────────────┐
442442
│ # │ G H R S │
@@ -457,7 +457,7 @@ Preset styles
457457
`thin_double_rounded`
458458
~~~~~~~~~~~~~~~~~~~~~
459459

460-
::
460+
.. code-block:: none
461461
462462
╭─────┬───────────────────────╮
463463
│ # │ G H R S │
@@ -478,7 +478,7 @@ Preset styles
478478
`thin_rounded`
479479
~~~~~~~~~~~~~~
480480

481-
::
481+
.. code-block:: none
482482
483483
╭─────┬───────────────────────╮
484484
│ # │ G H R S │
@@ -499,7 +499,7 @@ Preset styles
499499
`thin_thick`
500500
~~~~~~~~~~~~
501501

502-
::
502+
.. code-block:: none
503503
504504
┌─────┬───────────────────────┐
505505
│ # │ G H R S │
@@ -520,7 +520,7 @@ Preset styles
520520
`thin_thick_rounded`
521521
~~~~~~~~~~~~~~~~~~~~
522522

523-
::
523+
.. code-block:: none
524524
525525
╭─────┬───────────────────────╮
526526
│ # │ G H R S │

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy