Skip to content

Commit

Permalink
Add programmable Google Search to pytorch tutorials site (#2820)
Browse files Browse the repository at this point in the history
* Add programmable Google Search to pytorch tutorials site
  • Loading branch information
svekars authored Aug 22, 2024
1 parent 42aaa33 commit 96b9c27
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
9 changes: 9 additions & 0 deletions _static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,12 @@
transition: none;
transform-origin: none;
}

.pytorch-left-menu-search input[type=text] {
background-image: none;
}

.gsc-control-cse {
padding-left: 0px !important;
padding-bottom: 0px !important;
}
17 changes: 17 additions & 0 deletions _templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@
</script>
{%- endblock %}

{% block sidebartitle %}
{% if theme_display_version %}
{%- set nav_version = version %}
{% if READTHEDOCS and current_version %}
{%- set nav_version = current_version %}
{% endif %}
{% if nav_version %}
<div class="version">
{{ nav_version }}
</div>
{% endif %}
{% endif %}
<div class="searchbox">
<script async src="https://cse.google.com/cse.js?cx=e65585f8c3ea1440e"></script>
<div class="gcse-search"></div>
</div>
{% endblock %}

{% block footer %}
{{ super() }}
Expand Down

0 comments on commit 96b9c27

Please sign in to comment.