From: Glenn Hutchings Date: Thu, 12 May 2016 17:11:40 +0000 (+0100) Subject: Minor improvements to the HTML look-and-feel. X-Git-Url: https://jxself.org/git/?p=ibg.git;a=commitdiff_plain;h=0d516f59baf6cdad07fe8f00264da39ddd8b0ebb Minor improvements to the HTML look-and-feel. - Don't scroll the table-of-contents with main text. - Bolden the keywords in the text. --- diff --git a/README.md b/README.md index eb05a28..ef81cf5 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,15 @@ As well as these document sources, you will need: * Sphinx. You can find the complete installation instructions [here](http://www.sphinx-doc.org/en/stable/install.html). -* Sphinx makes use of [Blockdiag](https://pypi.python.org/pypi/blockdiag) - for some of the diagrams; you'll need that too. +* [Blockdiag](https://pypi.python.org/pypi/blockdiag) is used for some of + the diagrams. + +* To create the HTML version, you'll need a recent (>=0.7.8) version of the + [Alabaster](https://pypi.python.org/pypi/alabaster) theme. If you have `pip`, this command will be all you need: - pip install sphinx blockdiag + pip install -U sphinx blockdiag alabaster After you have everything installed, you can build the HTML version of the guide from a command prompt, like this: diff --git a/conf.py b/conf.py index 61bc5ef..a83caf6 100644 --- a/conf.py +++ b/conf.py @@ -17,6 +17,10 @@ import sys import string import codecs +import alabaster +if alabaster.version.__version_info__ < (0, 7, 8): + raise RuntimeError("requires albaster 0.7.8 or newer") + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -140,6 +144,9 @@ todo_include_todos = True # a list of builtin themes. html_theme = 'alabaster' +# Override a few things with local CSS style. +html_style = "ibg.css" + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. @@ -148,6 +155,7 @@ html_theme_options = { 'head_font_family': 'Georgia', 'page_width': '1050px', 'show_related': True, + 'fixed_sidebar': True, } # Add any paths that contain custom themes here, relative to this directory. @@ -172,7 +180,7 @@ html_title = project # 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 = ['static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/static/ibg.css b/static/ibg.css new file mode 100644 index 0000000..d4dfc71 --- /dev/null +++ b/static/ibg.css @@ -0,0 +1,8 @@ +/* IBG local CSS customization */ + +@import url('alabaster.css'); + +tt, code { + background-color: white; + font-weight: bold; +}