forked from M-Labs/artiq
1
0
Fork 0

doc: use sphinx_rtd_theme

This commit is contained in:
Robert Jördens 2016-08-25 21:52:46 +02:00
parent afd2a37e0d
commit c4559fcd99
6 changed files with 23 additions and 13 deletions

View File

@ -28,6 +28,7 @@ requirements:
- sphinx - sphinx
- sphinx-argparse - sphinx-argparse
- sphinxcontrib-wavedrom - sphinxcontrib-wavedrom
- sphinx_rtd_theme
- h5py - h5py
- dateutil - dateutil
- pyqt5 - pyqt5

View File

@ -0,0 +1,14 @@
{% extends "!layout.html" %}
{# since sphinx_rtd_theme moves scripts to the end, hook up WaveDrom again #}
{%- block footer %}
{{ super() }}
<script>(function(){
window.addEventListener(
"load",
(function(){ try {
WaveDrom.ProcessAll();
} catch(e) {} }),
false);
})();</script>
{% endblock %}

View File

@ -16,6 +16,7 @@
import sys import sys
import os import os
import sphinx_rtd_theme
from unittest.mock import MagicMock from unittest.mock import MagicMock
@ -124,24 +125,18 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
html_theme = 'classic' html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme # 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 # further. For a list of options available for each theme, see the
# documentation. # documentation.
html_theme_options = { html_theme_options = {
'sidebarbgcolor': '#171814', 'analytics_id': 'UA-75602447-2',
'sidebarlinkcolor': '#7389ae',
'sidebartextcolor': '#b3b3bb',
'footerbgcolor': '#171814',
'footertextcolor': '#b3b3bb',
'relbarbgcolor': '#171814',
'relbarlinkcolor': '#7389ae',
'relbartextcolor': '#b3b3bb',
} }
# Add any paths that contain custom themes here, relative to this directory. # Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = [] #html_theme_path = []
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# The name for this set of Sphinx documents. If None, it defaults to # The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation". # "<project> v<release> documentation".
@ -152,7 +147,7 @@ html_theme_options = {
# The name of an image file (relative to this directory) to place at the top # The name of an image file (relative to this directory) to place at the top
# of the sidebar. # of the sidebar.
html_logo = "../logo/artiq_white.png" html_logo = '../logo/artiq_white.png'
# The name of an image file (within the static path) to use as favicon of the # The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@ -293,5 +288,5 @@ texinfo_documents = [
#texinfo_no_detailmenu = False #texinfo_no_detailmenu = False
# -- Options for sphinxcontrib-wavedrom ----------------------------------- # -- Options for sphinxcontrib-wavedrom -----------------------------------
offline_skin_js_path = 'static/default.js' offline_skin_js_path = '_static/default.js'
offline_wavedrom_js_path = 'static/WaveDrom.js' offline_wavedrom_js_path = '_static/WaveDrom.js'

View File

@ -12,7 +12,7 @@ if sys.version_info[:3] < (3, 5, 2):
# Depends on PyQt5, but setuptools cannot check for it. # Depends on PyQt5, but setuptools cannot check for it.
requirements = [ requirements = [
"sphinx", "sphinx-argparse", "sphinxcontrib-wavedrom", "sphinx", "sphinx-argparse", "sphinxcontrib-wavedrom", "sphinx_rtd_theme",
"asyncserial", "numpy", "scipy", "asyncserial", "numpy", "scipy",
"python-dateutil", "prettytable", "h5py", "python-dateutil", "prettytable", "h5py",
"quamash", "pyqtgraph", "pygit2", "aiohttp", "quamash", "pyqtgraph", "pygit2", "aiohttp",