summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2018-11-24 22:48:07 +0100
committerJelle van der Waa <jelle@archlinux.org>2019-02-18 16:42:51 +0100
commit37a51bc78902a213dde155a76a9fa290cd776fd7 (patch)
tree31494a41fcb4bd000248e66779b81fed71f8d460 /templates
parentd1674c1d12f3e57c3a22ed6103b2d022016700e5 (diff)
downloadarchweb-37a51bc78902a213dde155a76a9fa290cd776fd7.tar.gz
archweb-37a51bc78902a213dde155a76a9fa290cd776fd7.zip
homepage: use self written typeahead implementation
Use a self written typeahead inmplemenation which gets rid of the jQuery requirement. This saves upgrading issues and reduces the amount of data to be loaded for the homepage by half.
Diffstat (limited to 'templates')
-rw-r--r--templates/public/index.html13
1 files changed, 2 insertions, 11 deletions
diff --git a/templates/public/index.html b/templates/public/index.html
index 6b160884..e5cefe3b 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -5,6 +5,7 @@
{% block head %}
<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/news/" />
<link rel="alternate" type="application/rss+xml" title="Arch Linux Package Updates" href="/feeds/packages/" />
+<script type="text/javascript" src="{% static "homepage.js" %}" defer></script>
{% endblock %}
{% block content_left %}
@@ -79,7 +80,7 @@
<form id="pkgsearch-form" method="get" action="/packages/">
<fieldset>
<label for="pkgsearch-field">Package Search:</label>
- <input id="pkgsearch-field" type="text" name="q" size="18" maxlength="200" />
+ <input id="pkgsearch-field" type="text" name="q" size="18" maxlength="200" autocomplete="off" />
</fieldset>
</form>
</div>
@@ -203,13 +204,3 @@
</div>
{% endcache %}
{% endblock %}
-
-{% block script_block %}
-
-{% load cdn %}{% jquery %}
-<script type="text/javascript">
-$(document).ready(function() {
- $.ajax({ url: "{% static "homepage.js" %}", cache: true, dataType: "script", success: function() { setupTypeahead(); } });
-});
-</script>
-{% endblock %}