Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a3090a4b
Commit
a3090a4b
authored
Sep 09, 2016
by
Zachary Ware
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #19489: Move the search box from sidebar to header and footer.
parent
1140a034
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
11 deletions
+45
-11
Doc/conf.py
Doc/conf.py
+4
-1
Doc/tools/pydoctheme/static/pydoctheme.css
Doc/tools/pydoctheme/static/pydoctheme.css
+11
-0
Doc/tools/templates/customsourcelink.html
Doc/tools/templates/customsourcelink.html
+10
-0
Doc/tools/templates/layout.html
Doc/tools/templates/layout.html
+20
-10
No files found.
Doc/conf.py
View file @
a3090a4b
...
...
@@ -60,7 +60,10 @@ templates_path = ['tools/templates']
# Custom sidebar templates, filenames relative to this file.
html_sidebars
=
{
'index'
:
'indexsidebar.html'
,
# Defaults taken from http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars
# Removes the quick search block
'**'
:
[
'localtoc.html'
,
'relations.html'
,
'customsourcelink.html'
],
'index'
:
[
'indexsidebar.html'
],
}
# Additional templates that should be rendered to pages.
...
...
Doc/tools/pydoctheme/static/pydoctheme.css
View file @
a3090a4b
...
...
@@ -22,6 +22,16 @@ div.related:first-child {
border-bottom
:
1px
solid
#ccc
;
}
.inline-search
{
display
:
inline
;
}
form
.inline-search
input
{
display
:
inline
;
}
form
.inline-search
input
[
type
=
"submit"
]
{
width
:
30px
;
}
div
.sphinxsidebar
{
background-color
:
#eeeeee
;
border-radius
:
5px
;
...
...
@@ -45,6 +55,7 @@ div.sphinxsidebar a:hover {
color
:
#0095C4
;
}
form
.inline-search
input
,
div
.sphinxsidebar
input
{
font-family
:
'Lucida Grande'
,
Arial
,
sans-serif
;
border
:
1px
solid
#999999
;
...
...
Doc/tools/templates/customsourcelink.html
0 → 100644
View file @
a3090a4b
{%- if show_source and has_source and sourcename %}
<div
role=
"note"
aria-label=
"source link"
>
<h3>
{{ _('This Page') }}
</h3>
<ul
class=
"this-page-menu"
>
<li><a
href=
"{{ pathto('bugs') }}"
>
{% trans %}Report a Bug{% endtrans %}
</a></li>
<li><a
href=
"{{ pathto('_sources/' + sourcename, true)|e }}"
rel=
"nofollow"
>
{{ _('Show Source') }}
</a></li>
</ul>
</div>
{%- endif %}
Doc/tools/templates/layout.html
View file @
a3090a4b
...
...
@@ -12,8 +12,28 @@
{%- endif %}
</li>
{% endblock %}
{%- macro searchbox() %}
{# modified from sphinx/themes/basic/searchbox.html #}
<div
class=
"inline-search"
style=
"display: none"
role=
"search"
>
<form
class=
"inline-search"
action=
"{{ pathto('search') }}"
method=
"get"
>
<input
placeholder=
"{{ _('Quick search') }}"
type=
"text"
name=
"q"
/>
<input
type=
"submit"
value=
"{{ _('Go') }}"
/>
<input
type=
"hidden"
name=
"check_keywords"
value=
"yes"
/>
<input
type=
"hidden"
name=
"area"
value=
"default"
/>
</form>
</div>
<script
type=
"text/javascript"
>
$
(
'
.inline-search
'
).
show
(
0
);
</script>
{%- endmacro %}
{% block relbar1 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
{% block relbar2 %} {% if builder != 'qthelp' %} {{ relbar() }} {% endif %} {% endblock %}
{% block relbaritems %}
{%- if pagename != "search" and builder != "singlehtml" %}
<li
class=
"right"
>
{{ searchbox() }}
{{ reldelim2 }}
</li>
{%- endif %}
{% endblock %}
{% block extrahead %}
<link
rel=
"shortcut icon"
type=
"image/png"
href=
"{{ pathto('_static/py.png', 1) }}"
/>
{% if not embedded %}
<script
type=
"text/javascript"
src=
"{{ pathto('_static/copybutton.js', 1) }}"
></script>
{% endif %}
...
...
@@ -90,13 +110,3 @@
{% trans sphinx_version=sphinx_version|e %}Created using
<a
href=
"http://sphinx.pocoo.org/"
>
Sphinx
</a>
{{ sphinx_version }}.{% endtrans %}
</div>
{% endblock %}
{% block sidebarsourcelink %}
{%- if show_source and has_source and sourcename %}
<h3>
{{ _('This Page') }}
</h3>
<ul
class=
"this-page-menu"
>
<li><a
href=
"{{ pathto('bugs') }}"
>
{% trans %}Report a Bug{% endtrans %}
</a></li>
<li><a
href=
"{{ pathto('_sources/' + sourcename, true)|e }}"
rel=
"nofollow"
>
{% trans %}Show Source{% endtrans %}
</a></li>
</ul>
{%- endif %}
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment