annotate globalneighbors/templates/index.html @ 19:811adc9736eb

add configuration for gunicorn
author Jeff Hammel <k0scist@gmail.com>
date Sun, 25 Jun 2017 15:43:45 -0700
parents 94af113e498a
children 2fef925fbf37
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
1 <!DOCTYPE html>
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
2 <html>
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
3 <head>
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
4 <title>Global Neighbors</title>
7
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
5 <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
12
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
6 <script src="/js/jquery.easy-autocomplete.min.js"></script>
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
7 <link rel="stylesheet" type="text/css" href="/css/style.css"/>
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
8 <link rel="stylesheet" type="text/css" href="/css/easy-autocomplete.css"/>
7
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
9 <script>
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
10 $( function() {
12
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
11 var options = {
13
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
12 url: function(phrase) {
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
13 return "/cities?term=" + phrase;
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
14 },
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
15 getValue: "name",
12
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
16 list: {
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
17 match: {
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
18 enabled: true
13
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
19 }
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
20 },
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
21 template: {
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
22 type: "custom",
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
23 method: function (value, item) {
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
24 return '<a href="/' + item.geonameid + '">' + value + '</a>';
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
25 }
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
26 }
12
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
27 };
6d89ea94930b add passthrough fileserver for autocomplete
Jeff Hammel <k0scist@gmail.com>
parents: 11
diff changeset
28 $( "#cities" ).easyAutocomplete(options);
7
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
29 });
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
30 </script>
6
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
31 </head>
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
32 <body>
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
33 <h1>Global Neighbors</h1>
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
34 <h2>Serving {{ n_cities }} cities</h2>
7
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
35
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
36 <div class="ui-widget">
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
37 <label for="cities">Enter a city: </label>
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
38 <input id="cities"/>
13
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
39 <select>
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
40 <option value="">ALL</option>
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
41 {% for country_code in country_codes %}
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
42 <option value="{{ country_code }}">{{ country_code }}</option>
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
43 {% endfor %}
94af113e498a we have links
Jeff Hammel <k0scist@gmail.com>
parents: 12
diff changeset
44 </select>
7
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
45 </div>
254195d0bac2 partial implementation of autocomplete using jqueryui; easyautocomplete.com may be more what we want
Jeff Hammel <k0scist@gmail.com>
parents: 6
diff changeset
46
6
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
47 </body>
316e1d54ffd4 move to jinja templates
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
48 </html>