From patchwork Thu Jan 10 23:38:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 195 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C887660B32 for ; Fri, 11 Jan 2019 00:38:33 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (dfj612yyyyyyyyyyyyyby-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00::2]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 868B7E1F for ; Fri, 11 Jan 2019 00:38:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547163512; bh=8k33TWs8y+ejWMJEou2fB51JEoVS8Zoxy5ds9oPjcls=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sa6TKdsU6sRNxvzyqAtWceYp1P7Rvkp6d4H91PBY+W63xvzux89JZtidSVUr7+jVC vySNGvbUfmMCofg7P6zs8YTKUzFqdm+XKC1V7tzrJmkKQwG4D5OdEBpwZ1mahmRVIh e4jNVwHWUnIXw6RNB/s86zYyvkQS0mqntIBe5O6c= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Jan 2019 01:38:27 +0200 Message-Id: <20190110233829.9638-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190110233829.9638-1-laurent.pinchart@ideasonboard.com> References: <20190110233829.9638-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/3] Documentation: Add custom theme X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 23:38:34 -0000 The theme replicates the look and feel of the libcamera.org website. Signed-off-by: Laurent Pinchart Acked-by: Kieran Bingham --- Documentation/conf.py | 3 +- Documentation/theme/footer.html | 11 + Documentation/theme/layout.html | 116 ++++++++++ Documentation/theme/search.html | 60 +++++ Documentation/theme/static/css/theme.css | 274 +++++++++++++++++++++++ Documentation/theme/static/search.png | Bin 0 -> 482 bytes Documentation/theme/theme.conf | 5 + 7 files changed, 468 insertions(+), 1 deletion(-) create mode 100644 Documentation/theme/footer.html create mode 100644 Documentation/theme/layout.html create mode 100644 Documentation/theme/search.html create mode 100644 Documentation/theme/static/css/theme.css create mode 100644 Documentation/theme/static/search.png create mode 100644 Documentation/theme/theme.conf diff --git a/Documentation/conf.py b/Documentation/conf.py index 770358198f03..70fbd21448a1 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -74,7 +74,8 @@ pygments_style = None # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'theme' +html_theme_path = ['.'] # 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 diff --git a/Documentation/theme/footer.html b/Documentation/theme/footer.html new file mode 100644 index 000000000000..e63e9fb31099 --- /dev/null +++ b/Documentation/theme/footer.html @@ -0,0 +1,11 @@ +
+
+ {%- if show_copyright %} + {%- if hasdoc('copyright') %} + {% trans path=pathto('copyright'), copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} + {%- else %} + {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} + {%- endif %} + {%- endif %} +
+
diff --git a/Documentation/theme/layout.html b/Documentation/theme/layout.html new file mode 100644 index 000000000000..a5cc2776adf5 --- /dev/null +++ b/Documentation/theme/layout.html @@ -0,0 +1,116 @@ +{# TEMPLATE VAR SETTINGS #} +{%- set url_root = pathto('', 1) %} +{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} +{%- if not embedded and docstitle %} + {%- set titlesuffix = " — "|safe + docstitle|e %} +{%- else %} + {%- set titlesuffix = "" %} +{%- endif %} + + + + {{ metatags }} + + {% block htmltitle %} + {{ title|striptags|e }}{{ titlesuffix }} + {% endblock %} + + {# FAVICON #} + {% if favicon %} + + {% endif %} + + {# CSS #} + + {# OPENSEARCH #} + {% if not embedded %} + {% if use_opensearch %} + + {% endif %} + + {% endif %} + + {# RTD hosts this file, so just load on non RTD builds #} + {% if not READTHEDOCS %} + + {% endif %} + + {% for cssfile in css_files %} + + {% endfor %} + + {% for cssfile in extra_css_files %} + + {% endfor %} + + {%- block linktags %} + {%- if hasdoc('about') %} + + {%- endif %} + {%- if hasdoc('genindex') %} + + {%- endif %} + {%- if hasdoc('search') %} + + {%- endif %} + {%- if hasdoc('copyright') %} + + {%- endif %} + + {%- if parents %} + + {%- endif %} + {%- if next %} + + {%- endif %} + {%- if prev %} + + {%- endif %} + {%- endblock %} + {%- block extrahead %} {% endblock %} + + + + +
+ +
+ +
+
+
Contents
+ {{ toc }} +
+ + {# PAGE CONTENT #} +
+ {% block body %}{% endblock %} +
+
+ + {% include "footer.html" %} + + diff --git a/Documentation/theme/search.html b/Documentation/theme/search.html new file mode 100644 index 000000000000..14d59395df10 --- /dev/null +++ b/Documentation/theme/search.html @@ -0,0 +1,60 @@ +{# + basic/search.html + ~~~~~~~~~~~~~~~~~ + + Template for the search page. + + :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- extends "layout.html" %} +{% block extrahead %} + + {%- for scriptfile in script_files %} + + {%- endfor %} + + + {# this is used when loading the search index using $.ajax fails, + such as on Chrome for documents on localhost #} + +{% endblock %} +{% block body %} +

{{ _('Search') }}

+
+ +

+ Please activate JavaScript to enable the search functionality. +

+
+

+ From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. +

+
+ + + +
+ {% if search_performed %} +

{{ _('Search Results') }}

+ {% if not search_results %} +

{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}

+ {% endif %} + {% endif %} +
+ {% if search_results %} +
    + {% for href, caption, context in search_results %} +
  • {{ caption }} +
    {{ context|e }}
    +
  • + {% endfor %} +
+ {% endif %} +
+{% endblock %} diff --git a/Documentation/theme/static/css/theme.css b/Documentation/theme/static/css/theme.css new file mode 100644 index 000000000000..047aff07dddb --- /dev/null +++ b/Documentation/theme/static/css/theme.css @@ -0,0 +1,274 @@ +html { + background-image: linear-gradient(to bottom right, #4895e1, #56c3ae); + background-size: cover; + background-repeat: no-repeat; + min-height: 100vh; +} + +body { + color: rgb(0, 0, 0, 0.5); + font-family: Arial, sans-serif; + margin: 0px; +} + +a { + color: unset; + font-weight: bold; + text-decoration: underline dotted; +} + +a.headerlink { + color: rgba(0, 0, 0, 0.2); + font-size: 70%; + padding-left: 5px; + visibility: hidden; +} + +h1:hover a.headerlink, +h2:hover a.headerlink, +h3:hover a.headerlink, +h4:hover a.headerlink, +h5:hover a.headerlink, +h6:hover a.headerlink { + visibility: visible; +} + +dt { + font-weight: bold; +} + +.text-light { + color: rgba(255, 255, 255, 0.3); +} + +div#navbar { + margin-top: 0px; +} + +div.navbar-brand { + color: rgb(255, 255, 255, 1.0); + float: left; + font-size: 36px; + margin: 0px 24px 24px 24px; +} + +div.navbar-logo { + float: left; + font-family: monospace; + font-size: 18px; + font-weight: bold; + white-space: pre; +} + +div.navbar-name { + float: left; + color: rgb(255, 255, 255, 1.0); + font-size: 34px; + margin-top: 31px; + margin-left: 10px; + padding-top: 1px; +} + +div.navbar { + float: right; +} + +div.navbar p.caption { + height: 0px; + margin: 0px; + visibility: hidden; +} + +div.navbar ul { + float: left; + font-size: 24px; + list-style: none; + margin-top: 42px; + margin-right: 20px; + padding-left: 0px; +} + +div.navbar a { + font-weight: normal; + text-decoration: none; +} + +div.navbar li { + float: left; + margin-left: 20px; + margin-right: 20px; + position: relative; +} + +div.navbar li a { + color: rgb(255, 255, 255, 0.5); + position: relative; +} + +div.navbar li a:before { + content: ""; + position: absolute; + width: 100%; + height: 2px; + bottom: 0; + left: 0; + background-color: rgb(255, 255, 255, 0.5); + visibility: hidden; + transform: scaleX(0); + transition: all 0.3s ease-in-out 0s; +} + +div.navbar li a:hover { + color: rgb(255, 255, 255, 1.0); +} + +div.navbar li a:hover:before { + visibility: visible; + transform: scaleX(1); +} + +div.navbar li.current a { + color: rgb(255, 255, 255, 1.0); +} + +div.navbar li.current a:before { + visibility: visible; + transform: unset; + transition: unset; +} + +div.navbar div.searchbox { + background-color: white; + float: right; + margin-right: 50px; + margin-top: 42px; +} + +div.navbar input[type=text] { + border-width: 0; + height: 2em; + margin-left: 10px; + margin-right: 5px; +} + +div.navbar input[type=submit] { + background-color: white; + background-image: url(../search.png); + background-repeat: no-repeat; + border-width: 0; + color: rgba(0, 0, 0, 0); + margin-right: 2px; + width: 20px; +} + +div#frontpage { + clear: both; + padding-top: 50px; + margin-left: auto; + margin-right: auto; + width: 75%; + display: flex; + justify-content: space-between; +} + +div#frontpage > div.block { + background-color: white; + border-radius: 5px; + box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 40px 0 rgba(0, 0, 0, 0.19); + color: rgb(0, 0, 0, 0.5); + font-size: 20px; + margin-bottom: 40px; + margin-right: 20px; + margin-left: 20px; + padding: 20px 60px 20px 60px; + text-align: center; + width: 50%; +} + +div#frontpage > div.block h1 { + font-size: 64px; + padding-left: 20%; + padding-right: 20%; + text-align: center; + text-shadow: 4px 4px 5px; +} + +div#content { + background-color: white; + clear: both; + padding-top: 50px; + padding-bottom: 50px; + margin-left: 0px; + margin-right: 0px; + overflow: auto; +} + +div#content > div.block { + font-size: 16px; + margin-right: 0px; + margin-left: 20px; + max-width: 800px; + padding: 20px 60px 0px 60px; + text-align: justify; + width: 70%; +} + +div#content > div.block h1 { + color: black; + font-size: 40px; + text-align: left; +} + +div.local-toc { + float: right; + background-color: #fcfcff; + border: 1px dotted #4896e0; + margin-right: 100px; + padding: 10px 20px 10px 10px; +} + +div.toc-title { + font-weight: bold; +} + +div.local-toc ul { + padding-left: 20px; + margin-bottom: 5px; +} + +div.local-toc a { + font-weight: normal; + padding-left: 10px; + text-decoration: none; +} + +div.highlight-shell > div.highlight > pre, +pre.console { + background-color: #fcfcff; + border: 1px dotted #4896e0; + margin-left: 0em; + padding: 10px; + text-align: left; +} + +div.highlight-default > div.highlight > pre, +pre.diagram { + background-color: #fcfcff; + border: 1px dotted #4896e0; + font-size: 12px; + margin-left: 0em; + padding: 10px; + text-align: left; + width: 47em; +} + +div#signature { + color: rgb(255, 255, 255, 0.5); + margin: 20px; + float: right; + font-size: 12px; +} + +#libcamera div.toctree-wrapper { + visibility: hidden; +} diff --git a/Documentation/theme/static/search.png b/Documentation/theme/static/search.png new file mode 100644 index 0000000000000000000000000000000000000000..a93c40eb08106554488deaed910aba0f5aef5ec5 GIT binary patch literal 482 zcmV<80UiE{P)S{Qv(y11W$BjsN}6-{)Vx|M`d06c#vZ@BJ4Ihb|v` z{Q4gQ11Af!uc~y5qrR#TFPa8Mh?6FtzL~%Ctf7Qpw2q<#567){pJ$)D^X1p?EfEg3 za$+bt{{R1f{K;#k=A~KNPW}D&?>`KD`0>kj!7kC>HSfRw{Eq|}{{R0UwEB?Fj4jBj zA>iq!ZyasQJC9yP7Gz>zU^w*fRiw586C)#wD-<~Q`l02L@-hA47{{;&Z z)31O31UcCD$2#ka3!-RXU|{(0L+`-G70ssI207*qoM6N<$g81y{PXGV_ literal 0 HcmV?d00001 diff --git a/Documentation/theme/theme.conf b/Documentation/theme/theme.conf new file mode 100644 index 000000000000..ba25a19211c7 --- /dev/null +++ b/Documentation/theme/theme.conf @@ -0,0 +1,5 @@ +[theme] +inherit = basic +stylesheet = css/theme.css + +[options] From patchwork Thu Jan 10 23:38:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 196 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0E97260B33 for ; Fri, 11 Jan 2019 00:38:34 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (dfj612yyyyyyyyyyyyyby-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00::2]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DE60BE25 for ; Fri, 11 Jan 2019 00:38:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547163513; bh=Hv6UueJwXhMDQUTAioUwvE39dtZj5WuOO75ecPNOVF4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MTNjKV6Chis3eptBCt5ZAhq1OmvE13LfxLFONqJAigCEMVKvq1kVjk1eqLmER6huN h1uDFsF6DOV1araZ2vC4hNIDCRyLGe0E8wmww0FkJiJafJqHhDaRXx1iAWLxzl0x2i 43PfYJvIG53h4HOzWi3gfupwyxvEeGe0A4udgyP0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Jan 2019 01:38:28 +0200 Message-Id: <20190110233829.9638-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190110233829.9638-1-laurent.pinchart@ideasonboard.com> References: <20190110233829.9638-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] Documentation: Make the toctree more web-friendly X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 23:38:34 -0000 The toctree is displayed in the navigation bar at the top of the page. Add short names to the entries that replicate the names currently used on libcamera.org. Remove the link to the index and search pages, as the former is empty, and the latter can be accessed directory from the navigation bar search box. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Documentation/index.rst | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Documentation/index.rst b/Documentation/index.rst index 44176f230c0f..3e089e69729c 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -20,13 +20,7 @@ systems, including traditional Linux distributions, ChromeOS and Android. :maxdepth: 2 :caption: Contents: - coding-style - docs - contributing - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`search` + Home + Docs + Coding Style + Contribute From patchwork Thu Jan 10 23:38:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 197 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 18DAA60B34 for ; Fri, 11 Jan 2019 00:38:34 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (dfj612yyyyyyyyyyyyyby-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00::2]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B529E27 for ; Fri, 11 Jan 2019 00:38:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1547163513; bh=bR/wmvk+2FVnteD3PLHGolAZ6RyMrdAd7o763ZKcpT0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lFqy5qvn4R9CCluqjBvWIvCjscBClAwAtxI0lbZ67mOz85d/wdzumiF3d2Qp3iZLN AmYbtFD98LQhV/tHOg/mgsvlAhtUMkNPRNnlAhJRCTy0tTzaOoaFQXTKlWs4kL/NiZ O3cEGRNgsSFGo3e3RPcupA8XCr1QSARqxcZCzdQU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Jan 2019 01:38:29 +0200 Message-Id: <20190110233829.9638-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190110233829.9638-1-laurent.pinchart@ideasonboard.com> References: <20190110233829.9638-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/3] Documentation: Link to the API documentation generated by Doxygen X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 23:38:34 -0000 Add a link in the toctree to the API documentation. sphinx doesn't seem to support relative external links, but we can trick it into thinking the link is absolute by adding '#://' at the end. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Documentation/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/index.rst b/Documentation/index.rst index 3e089e69729c..a87509c24275 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -24,3 +24,4 @@ systems, including traditional Linux distributions, ChromeOS and Android. Docs Coding Style Contribute + API <../api-html/index.html#://>