Debian Codegraph @

examples/javascript/js_example/templates/base.html

raw
1 <!doctype html>
2 <title>JavaScript Example</title>
3 <link rel="stylesheet" href="https://unpkg.com/[email protected]/normalize.css">
4 <link rel="stylesheet" href="https://unpkg.com/[email protected]/css/sakura.css">
5 <style>
6 ul { margin: 0; padding: 0; display: flex; list-style-type: none; }
7 li > * { padding: 1em; }
8 li.active > a { color: #5e5e5e; border-bottom: 2px solid #4a4a4a; }
9 form { display: flex; }
10 label > input { width: 3em; }
11 form > * { padding-right: 1em; }
12 #result { font-weight: bold; }
13 </style>
14 <ul>
15 <li><span>Type:</span>
16 <li class="{% if js == 'fetch' %}active{% endif %}">
17 <a href="{{ url_for('index', js='fetch') }}">Fetch</a>
18 <li class="{% if js == 'xhr' %}active{% endif %}">
19 <a href="{{ url_for('index', js='xhr') }}">XHR</a>
20 <li class="{% if js == 'jquery' %}active{% endif %}">
21 <a href="{{ url_for('index', js='jquery') }}">jQuery</a>
22 </ul>
23 <hr>
24 <p>{% block intro %}{% endblock %}</p>
25 <hr>
26 <form id="calc">
27 <label>a <input name="a"></label>
28 <span>+</span>
29 <label>b <input name="b"></label>
30 <input type="submit" value="Calculate">
31 </form>
32 <span>= <span id="result"></span></span>
33 {% block script %}{% endblock %}