Skip to content

Commit

Permalink
Dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderBand committed May 17, 2021
1 parent ba22e63 commit a8faf87
Show file tree
Hide file tree
Showing 6 changed files with 1,905 additions and 3 deletions.
30 changes: 27 additions & 3 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_logo = 'img/unbound-duotone-white.svg'
html_favicon = 'img/favicon.ico'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_logo = 'resources/unbound-duotone-white.svg'
html_favicon = 'resources/favicon.ico'
html_theme_options = {
'logo_only': True,
'display_version': True,
Expand All @@ -93,7 +94,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['../static']
html_static_path = ['resources']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -190,3 +191,26 @@

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

# -- Extension interface --------------------------------------------------
from sphinx import addnodes
def parse_cmd_args_node(env, sig, signode):
try:
cmd, args = sig.strip().split(' ', 1)
except ValueError:
cmd, args = sig, None
# distinguish cmd from its args
signode += addnodes.desc_name(cmd, cmd)
if args:
args = ' ' + args
signode += addnodes.desc_addname(args, args)
return cmd
# define new directive/role that can be used as .. subcmd::/:subcmd:
def setup(app):
app.add_object_type('subcmd', 'subcmd',
objname='module sub-command',
indextemplate='pair: %s; module sub-command',
parse_node=parse_cmd_args_node)
app.add_css_file('css/dark.css')
app.add_css_file('css/light.css')

Binary file removed source/img/unbound-duotone-white.png
Binary file not shown.

0 comments on commit a8faf87

Please sign in to comment.