mirror of
https://github.com/rclone/rclone.git
synced 2024-11-21 16:03:29 +01:00
Add google search widget to rclone.org
This commit is contained in:
parent
721bae11c3
commit
1cc6dd349e
@ -57,5 +57,6 @@
|
||||
<script src="/js/popper.min.1.16.0.js"></script>
|
||||
<script src="/js/bootstrap.min.4.4.1.js"></script>
|
||||
<script src="/js/custom.js?r={{ .Date.Unix }}"></script>
|
||||
<script src="/js/search.js?r={{ .Date.Unix }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -113,5 +113,10 @@
|
||||
<a class="nav-link" href="/donate/"><i class="fa fa-heart heart"></i> Donate</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="form-inline" name="search_form" action="https://google.com/search" target="_blank" onsubmit="on_search();">
|
||||
<input name="words" value="" type="search" placeholder="search..." class="form-control form-control-sm">
|
||||
<input name="q" value="" type="hidden">
|
||||
<input name="as_sitesearch" value="https://rclone.org/" type="hidden">
|
||||
</form>
|
||||
</div>
|
||||
</nav>
|
||||
|
4
docs/static/js/search.js
vendored
Normal file
4
docs/static/js/search.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
function on_search() {
|
||||
document.search_form.q.value = document.search_form.words.value + " -site:forum.rclone.org";
|
||||
return true;
|
||||
}
|
Loading…
Reference in New Issue
Block a user