From patchwork Mon Oct 21 10:24:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2202 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BA38960BE0 for ; Mon, 21 Oct 2019 12:25:06 +0200 (CEST) Received: from pendragon.ideasonboard.com (143.121.2.93.rev.sfr.net [93.2.121.143]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E3EF1540 for ; Mon, 21 Oct 2019 12:25:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1571653506; bh=HS4rQo9qmj0jsYhh40wRPtrqUgVpU5CQ8RI8V5//jNM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wms6CMJhI2AmqhJzQnnQpEYjujkxC5CBYrmwfaGvuzrRjNOqCv60uSZPsrt8Ta1l+ A9H02j0OaD1j4g2dAkn9L2RzI3wBAh91GPKBWfmKnz8rG6dje8wKKn1TJOXKQbEuyQ Pls6M9RyUCxasvoOQazVNiNndHoXiQ8XPWI5l61Q= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 21 Oct 2019 13:24:49 +0300 Message-Id: <20191021102453.26471-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191021102453.26471-1-laurent.pinchart@ideasonboard.com> References: <20191021102453.26471-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/8] Documentation: Generate local TOC on demand X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2019 10:25:06 -0000 All pages are generated with a local TOC, which is pointless on simple pages such as the front page, or other pages containing little content. Use the .. contents:: :local: directive instead to generate the local TOC on demand, and remove the automatic local TOC generation. Only the Docs page uses a local TOC. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Documentation/docs.rst | 3 ++ Documentation/theme/layout.html | 5 ---- Documentation/theme/static/css/theme.css | 38 ++++++++++++++++-------- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Documentation/docs.rst b/Documentation/docs.rst index 7a3977c13110..7cb6059616fd 100644 --- a/Documentation/docs.rst +++ b/Documentation/docs.rst @@ -1,3 +1,6 @@ +.. contents:: + :local: + ************* Documentation ************* diff --git a/Documentation/theme/layout.html b/Documentation/theme/layout.html index a5cc2776adf5..139c39c7cc38 100644 --- a/Documentation/theme/layout.html +++ b/Documentation/theme/layout.html @@ -100,11 +100,6 @@
-
-
Contents
- {{ toc }} -
- {# PAGE CONTENT #}
{% block body %}{% endblock %} diff --git a/Documentation/theme/static/css/theme.css b/Documentation/theme/static/css/theme.css index 047aff07dddb..4901bbf564f7 100644 --- a/Documentation/theme/static/css/theme.css +++ b/Documentation/theme/static/css/theme.css @@ -24,6 +24,10 @@ a.headerlink { visibility: hidden; } +a.toc-backref { + text-decoration: none; +} + h1:hover a.headerlink, h2:hover a.headerlink, h3:hover a.headerlink, @@ -206,37 +210,47 @@ div#content { div#content > div.block { font-size: 16px; margin-right: 0px; - margin-left: 20px; - max-width: 800px; - padding: 20px 60px 0px 60px; + margin-left: 0px; + max-width: 1280px; + padding: 0px 60px 0px 60px; text-align: justify; - width: 70%; } div#content > div.block h1 { color: black; font-size: 40px; + margin-top: 0px; text-align: left; } -div.local-toc { +div#content > div.block > div.section { + max-width: 800px; +} + +div.local.topic { float: right; background-color: #fcfcff; border: 1px dotted #4896e0; - margin-right: 100px; + margin-left: 20px; + margin-right: 0px; + max-width: 15em; padding: 10px 20px 10px 10px; + text-align: left; } -div.toc-title { - font-weight: bold; -} - -div.local-toc ul { +div.local.topic ul { padding-left: 20px; margin-bottom: 5px; } -div.local-toc a { +div.local.topic > ul:before { + content: "Contents"; + display: block; + font-weight: bold; + margin-bottom: 10px; +} + +div.local.topic a { font-weight: normal; padding-left: 10px; text-decoration: none;