]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Use sphinx_rtd_theme instead of our lightly-customized version of sphinx default.
authorBen Darnell <ben@bendarnell.com>
Sun, 13 Jul 2014 02:57:16 +0000 (22:57 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 13 Jul 2014 02:57:16 +0000 (22:57 -0400)
The main benefit of this change is the responsive layout for phones and
tablets.

docs/Makefile
docs/conf.py
docs/tornado.css [deleted file]
maint/requirements.txt

index 97b258758dd9875f0186631ad115ddfd07302983..a4916851af0d0a11076d2fd43f5054ff738573b8 100644 (file)
@@ -1,3 +1,6 @@
+.PHONY: all
+all: sphinx
+
 SPHINXOPTS=-n -W -d build/doctrees .
 
 .PHONY: sphinx
index 89882afa16e1c9bbe57e18308b63b169df602e1d..d9b4761ce15725bc543488c974d28492358a2c1e 100644 (file)
@@ -75,32 +75,6 @@ coverage_ignore_functions = [
     "multi_future",
 ]
 
-html_static_path = ['tornado.css']
-html_theme = 'default'
-html_style = "tornado.css"
-highlight_language = "none"
-html_theme_options = dict(
-    footerbgcolor="#fff",
-    footertextcolor="#000",
-    sidebarbgcolor="#fff",
-    #sidebarbtncolor
-    sidebartextcolor="#4d8cbf",
-    sidebarlinkcolor="#216093",
-    relbarbgcolor="#fff",
-    relbartextcolor="#000",
-    relbarlinkcolor="#216093",
-    bgcolor="#fff",
-    textcolor="#000",
-    linkcolor="#216093",
-    visitedlinkcolor="#216093",
-    headbgcolor="#fff",
-    headtextcolor="#4d8cbf",
-    codebgcolor="#fff",
-    codetextcolor="#060",
-    bodyfont="Georgia, serif",
-    headfont="Calibri, sans-serif",
-    stickysidebar=True,
-    )
 html_favicon = 'favicon.ico'
 
 latex_documents = [
@@ -123,3 +97,13 @@ extlinks = {
 intersphinx_mapping = {
     'python': ('http://python.readthedocs.org/en/latest/', None),
     }
+
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+# On RTD we can't import sphinx_rtd_theme, but it will be applied by
+# default anyway.  This block will use the same theme when building locally
+# as on RTD.
+if not on_rtd:
+    import sphinx_rtd_theme
+    html_theme = 'sphinx_rtd_theme'
+    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
diff --git a/docs/tornado.css b/docs/tornado.css
deleted file mode 100644 (file)
index 20598a3..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-@import url("default.css");
-
-/* These style tweaks are probably going to turn out to be a little fragile.
-   They're currently based on the default theme from sphinx 1.0.7.
-*/
-
-div.body h1,
-div.body h2,
-div.body h3,
-div.body h4,
-div.body h5,
-div.body h6,
-div.sphinxsidebar h3,
-div.sphinxsidebar h4 {
-    font-weight: bold;
-    border-bottom: none;
-}
-
-pre {
-    line-height: 14pt;
-    margin: 17pt;
-    padding-left: 1em;
-    border: none;
-    border-left: 1px solid #ccc;
-}
-
-div.body p, div.body dd, div.body li {
-    text-align: left;
-}
-
-.highlight {
-    background: #fff !important;
-}
-
-th.field-name {
-    background: #fff;
-}
-
-tt {
-    background: #fff;
-}
-
-/* "related" = top header */
-div.related {
-    position: fixed;
-}
-
-/* body settings copied from div.sphinxsidebar so following a link to a
-   specific object positions that object below the fixed header */
-div.body {
-    top: 30px;
-    bottom: 0;
-    right: 0;
-    left: 230px;
-    margin: 0;
-    position: fixed;
-    overflow: auto;
-    height: auto;
-}
-
-div.related, div.sphinxsidebar {
-    font-family: Calibri, sans-serif;
-}
-
-div.section {
-    max-width: 850px;
-}
-
-/* sphinx renders an em tag inside internal reference links; we don't want
-   these to be italic */
-a.reference.internal em {
-    font-style: normal;
-}
\ No newline at end of file
index 90f3a403518e1a6fd4c0ddc647bace96724c259f..f4166a63de22d7e156df7c8f35348df49b150570 100644 (file)
@@ -21,6 +21,7 @@ autopep8==1.0.2
 coverage==3.7.1
 pep8==1.5.6
 pyflakes==0.8.1
+sphinx-rtd-theme==0.1.6
 tox==1.7.1
 virtualenv==1.11.6