From 865a78a88623c83de46d977e9f1535e01ff7da0a Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Fri, 31 Jul 2015 13:01:44 -0700 Subject: [PATCH] Using caption with different toc sections instead of JS/CSS hack. This fits within the Sphinx construct and would allow our docs to be built on readthedocs.org. --- docs/_static/css/main.css | 12 ++++++++++++ docs/_static/js/main.js | 10 ---------- docs/_templates/layout.html | 1 - docs/conf.py | 19 ++++++++++++++----- docs/index.rst | 25 +++++++++++++++++++++++++ tox.ini | 2 +- 6 files changed, 52 insertions(+), 17 deletions(-) diff --git a/docs/_static/css/main.css b/docs/_static/css/main.css index 674948469063..eb7139223244 100755 --- a/docs/_static/css/main.css +++ b/docs/_static/css/main.css @@ -862,6 +862,18 @@ h2 .headerlink:hover { margin-top: 2em; } +.side-nav > ul > li.toctree-l1 { + padding-left: 2em; +} + +p.caption { + padding-left: 2em; +} + +span.caption-text { + font-weight: bold; +} + .external-links img { margin-right: 0.3em; opacity: 0.3; diff --git a/docs/_static/js/main.js b/docs/_static/js/main.js index 35a57b701d32..dcd61f346e86 100755 --- a/docs/_static/js/main.js +++ b/docs/_static/js/main.js @@ -13,16 +13,6 @@ $('.headerlink').parent().each(function() { ); }); -$('.side-nav').children('ul:nth-child(2)').children().each(function() { - var itemName = $(this).text(); - if (itemName !== 'Datastore' && - itemName !== 'Storage' && - itemName !== 'Pub/Sub' && - itemName !== 'BigQuery') { - $(this).css('padding-left','2em'); - } -}); - var apiQsSection; // don't even ask me why if ($('#cloud-datastore-in-10-seconds').length) diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index f3fe1e7f6279..ef28000ba8c9 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -127,7 +127,6 @@

Python

{% block body %} {% endblock %}