diff options
author | Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> | 2023-04-21 03:02:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 02:02:04 +0100 |
commit | b430e052858c490a4e90f3143f159ee6240eb948 (patch) | |
tree | 5e4ece131815c1fb12c8ed0f182f187c38a89d49 /doc | |
parent | e2f66cea4997b6d8c588d3509adb68d4e9108ee6 (diff) | |
download | sphinx-git-b430e052858c490a4e90f3143f159ee6240eb948.tar.gz |
Create a 'search field' component for themes (#11045)
``searchfield.html`` is similar to the existing ``searchbox.html``, but does not
have the heading "Quick Search". Instead, it uses "Search" as a placeholder
text. This gives a cleaner and less cluttered appearance.
The searchfield component is added to the basic theme and thus can be used
in any derivative theme. It is not used by default for backward compatibility.
The searchfield compenent is made the default in the sphinx13 theme.
CSS changes ensure that the top of the search field is aligned with the
top of the main content.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/_themes/sphinx13/layout.html | 2 | ||||
-rw-r--r-- | doc/_themes/sphinx13/static/sphinx13.css | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/doc/_themes/sphinx13/layout.html b/doc/_themes/sphinx13/layout.html index afab3693b..8010517a6 100644 --- a/doc/_themes/sphinx13/layout.html +++ b/doc/_themes/sphinx13/layout.html @@ -32,7 +32,7 @@ {%- block content %} <div class="document"> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> - {%- include "searchbox.html" %} + {%- include "searchfield.html" %} <div class="sphinxsidebar-navigation__contents"> <h3>{{ _('On this page') }}</h3> {{ toc }} diff --git a/doc/_themes/sphinx13/static/sphinx13.css b/doc/_themes/sphinx13/static/sphinx13.css index 397c1f789..674d211ea 100644 --- a/doc/_themes/sphinx13/static/sphinx13.css +++ b/doc/_themes/sphinx13/static/sphinx13.css @@ -68,6 +68,7 @@ div.sphinxsidebar { overflow-wrap: break-word; margin: 0; padding-right: 15px; + padding-top: 0.5em; font-size: 1em; } @@ -127,6 +128,10 @@ div.sphinxsidebar li.current > a { display: none; } +div.sphinxsidebar #searchbox { + margin: 12px 0 20px 0; +} + div.footer { background-color: var(--colour-sphinx-blue); color: #ccc; |