Skip to content

Commit 96b9c27

Browse files
authored
Add programmable Google Search to pytorch tutorials site (#2820)
* Add programmable Google Search to pytorch tutorials site
1 parent 42aaa33 commit 96b9c27

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

_static/css/custom.css

+9
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,12 @@
9191
transition: none;
9292
transform-origin: none;
9393
}
94+
95+
.pytorch-left-menu-search input[type=text] {
96+
background-image: none;
97+
}
98+
99+
.gsc-control-cse {
100+
padding-left: 0px !important;
101+
padding-bottom: 0px !important;
102+
}

_templates/layout.html

+17
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,23 @@
1111
</script>
1212
{%- endblock %}
1313

14+
{% block sidebartitle %}
15+
{% if theme_display_version %}
16+
{%- set nav_version = version %}
17+
{% if READTHEDOCS and current_version %}
18+
{%- set nav_version = current_version %}
19+
{% endif %}
20+
{% if nav_version %}
21+
<div class="version">
22+
{{ nav_version }}
23+
</div>
24+
{% endif %}
25+
{% endif %}
26+
<div class="searchbox">
27+
<script async src="https://cse.google.com/cse.js?cx=e65585f8c3ea1440e"></script>
28+
<div class="gcse-search"></div>
29+
</div>
30+
{% endblock %}
1431

1532
{% block footer %}
1633
{{ super() }}

0 commit comments

Comments
 (0)