Skip to content

Commit 5fbd0b8

Browse files
committed
Override the searchbox to avoid vue.js complaining about the script tag.
For reference, adding the type attribute is what was needed.
1 parent 055a688 commit 5fbd0b8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/_templates/searchbox.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{#
2+
searchbox.html
3+
~~~~~~~~~~~~~~~~~~~~
4+
5+
Replaces basic/searchbox.html because vue.js does not like <script> without the type attribute
6+
#}
7+
{%- if pagename != "search" and builder != "singlehtml" %}
8+
<div id="searchbox" style="display: none" role="search">
9+
<h3 id="searchlabel">{{ _('Quick search') }}</h3>
10+
<div class="searchformwrapper">
11+
<form class="search" action="{{ pathto('search') }}" method="get">
12+
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
13+
<input type="submit" value="{{ _('Go') }}" />
14+
</form>
15+
</div>
16+
</div>
17+
<script type="application/javascript">$('#searchbox').show(0);</script>
18+
{%- endif %}

0 commit comments

Comments
 (0)