annotate kallithea/templates/base/root.html @ 6823:2e72d2d16a0f

comments: display comment previews while submitting Instead of just saying 'Submitting' and not showing any progress to the user until the comment has been accepted by the server, show a preview of the comment above the comment box in a way which is makes it obvious to the user the comment is being submitted. Apart from that, also clear the comment box so that a repeated clicking the submit button doesn't result in a duplicate comment. The preview doesn't highlight URLs or support @mentions or *bold*, which is a good enough approximation in this case. When/if we (re-)add the rST/Markdown support, we will need a client-side parser for the syntax we choose. When the submission fails, display a message and offer the user to retry or cancel the submission.
author Andrew Shadura <andrew@shadura.me>
date Mon, 10 Jul 2017 13:13:10 -0500
parents d43cf470e625
children b44cc07c2f9b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1157
41241617a7a3 rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 ## -*- coding: utf-8 -*-
2163
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
2 <!DOCTYPE html>
1157
41241617a7a3 rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 <html xmlns="http://www.w3.org/1999/xhtml">
41241617a7a3 rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 <head>
4845
3a3ec35466e7 templates: move site branding in page title to base template
Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com>
parents: 4811
diff changeset
5 <title><%block name="title"/><%block name="branding_title"/></title>
1157
41241617a7a3 rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
41241617a7a3 rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 <meta name="robots" content="index, nofollow"/>
6393
4fa8b2ca0508 style: drop png version of Kallithea logo - all supported browsers are fine with svg
Mads Kiilerich <mads@kiilerich.com>
parents: 6128
diff changeset
8 <link rel="icon" href="${h.url('/images/favicon.ico')}" type="image/x-icon" />
1421
c6b811f11c94 Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
9
c6b811f11c94 Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
10 ## CSS ###
5937
4e78a8ed3f07 datatables: introduce jQuery DataTables to replace YAHOO.widget.DataTable
Daniel Hobley <danielh@unity3d.com>
parents: 5936
diff changeset
11 <link rel="stylesheet" type="text/css" href="${h.url('/css/jquery.dataTables.css', ver=c.kallithea_version)}"/>
4734
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
12 <link rel="stylesheet" type="text/css" href="${h.url('/js/select2/select2.css', ver=c.kallithea_version)}"/>
6675
35d3a85fc650 style: use plain Bootstrap with existing CSS styling
Mads Kiilerich <mads@kiilerich.com>
parents: 6532
diff changeset
13 <link rel="stylesheet" type="text/css" href="${h.url('/css/bootstrap.css', ver=c.kallithea_version)}"/>
35d3a85fc650 style: use plain Bootstrap with existing CSS styling
Mads Kiilerich <mads@kiilerich.com>
parents: 6532
diff changeset
14 <link rel="stylesheet" type="text/css" href="${h.url('/js/select2/select2-bootstrap.css', ver=c.kallithea_version)}"/>
4734
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
15 <link rel="stylesheet" type="text/css" href="${h.url('/css/pygments.css', ver=c.kallithea_version)}"/>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
16 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.kallithea_version)}" media="screen"/>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
17 <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.kallithea_version)}" media="screen"/>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
18 <link rel="stylesheet" type="text/css" href="${h.url('/fontello/css/kallithea.css', ver=c.kallithea_version)}">
4810
6a825018a498 template: use mako block for root.html extra sections
Mads Kiilerich <madski@unity3d.com>
parents: 4809
diff changeset
19 <%block name="css_extra"/>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
20
1421
c6b811f11c94 Javascripts rewrite: updated yui to latest 2.9, simplified ajax loading for multiple pages. Removed YUI dev package
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
21 ## JAVASCRIPT ##
4734
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
22 <script type="text/javascript">
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
23 ## JS translations map
2369
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2188
diff changeset
24 var TRANSLATION_MAP = {
6823
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
25 'Cancel': ${h.jshtml(_("Cancel"))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
26 'Retry': ${h.jshtml(_("Retry"))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
27 'Submitting ...': ${h.jshtml(_("Submitting ..."))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
28 'Unable to post': ${h.jshtml(_("Unable to post"))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
29 'Add Another Comment': ${h.jshtml(_("Add Another Comment"))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
30 'Stop following this repository': ${h.jshtml(_('Stop following this repository'))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
31 'Start following this repository': ${h.jshtml(_('Start following this repository'))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
32 'Group': ${h.jshtml(_('Group'))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
33 'members': ${h.jshtml(_('members'))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
34 'Loading ...': ${h.jshtml(_('Loading ...'))},
2e72d2d16a0f comments: display comment previews while submitting
Andrew Shadura <andrew@shadura.me>
parents: 6807
diff changeset
35 'loading ...': ${h.jshtml(_('loading ...'))},
6532
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
36 'Search truncated': ${h.jshtml(_('Search truncated'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
37 'No matching files': ${h.jshtml(_('No matching files'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
38 'Open New Pull Request from {0}': ${h.jshtml(_('Open New Pull Request from {0}'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
39 'Open New Pull Request for {0} &rarr; {1}': ${h.js(_('Open New Pull Request for {0} &rarr; {1}'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
40 'Show Selected Changesets {0} &rarr; {1}': ${h.js(_('Show Selected Changesets {0} &rarr; {1}'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
41 'Selection Link': ${h.jshtml(_('Selection Link'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
42 'Collapse Diff': ${h.jshtml(_('Collapse Diff'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
43 'Expand Diff': ${h.jshtml(_('Expand Diff'))},
6807
d43cf470e625 autocomplete: use select2 when selecting users or groups to give permissions
Mads Kiilerich <mads@kiilerich.com>
parents: 6720
diff changeset
44 'Type name of user or member to grant permission': ${h.jshtml(_('Type name of user or member to grant permission'))},
6532
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
45 'Failed to revoke permission': ${h.jshtml(_('Failed to revoke permission'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
46 'Confirm to revoke permission for {0}: {1} ?': ${h.jshtml(_('Confirm to revoke permission for {0}: {1} ?'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
47 'Enabled': ${h.jshtml(_('Enabled'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
48 'Disabled': ${h.jshtml(_('Disabled'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
49 'Select changeset': ${h.jshtml(_('Select changeset'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
50 'Specify changeset': ${h.jshtml(_('Specify changeset'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
51 'MSG_SORTASC': ${h.jshtml(_('Click to sort ascending'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
52 'MSG_SORTDESC': ${h.jshtml(_('Click to sort descending'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
53 'MSG_EMPTY': ${h.jshtml(_('No records found.'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
54 'MSG_ERROR': ${h.jshtml(_('Data error.'))},
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
55 'MSG_LOADING': ${h.jshtml(_('Loading...'))}
2369
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2188
diff changeset
56 };
c2f131502037 Autocomplete fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 2188
diff changeset
57 var _TM = TRANSLATION_MAP;
3388
cb40b3f6428c review members are dynamically changed based on selected other_repo owner
Marcin Kuzminski <marcin@python-works.com>
parents: 3246
diff changeset
58
6532
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
59 var TOGGLE_FOLLOW_URL = ${h.js(h.url('toggle_following'))};
3246
b9ba0d4d3abf implemented #83 show repo size on summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 3206
diff changeset
60
3695
45df84d36b44 Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents: 3592
diff changeset
61 var REPO_NAME = "";
45df84d36b44 Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents: 3592
diff changeset
62 %if hasattr(c, 'repo_name'):
6532
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
63 var REPO_NAME = ${h.js(c.repo_name)};
3695
45df84d36b44 Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents: 3592
diff changeset
64 %endif
4992
569199be3475 javascript: provide secure_form compatible_authentication_token in all AJAX POSTs
Mads Kiilerich <madski@unity3d.com>
parents: 4845
diff changeset
65
6532
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
66 var _authentication_token = ${h.js(h.authentication_token())};
4734
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
67 </script>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
68 <script type="text/javascript" src="${h.url('/js/yui.2.9.js', ver=c.kallithea_version)}"></script>
5936
7a4dec17e837 js: update jQuery to 1.12.3
Mads Kiilerich <madski@unity3d.com>
parents: 5664
diff changeset
69 <script type="text/javascript" src="${h.url('/js/jquery.min.js', ver=c.kallithea_version)}"></script>
5937
4e78a8ed3f07 datatables: introduce jQuery DataTables to replace YAHOO.widget.DataTable
Daniel Hobley <danielh@unity3d.com>
parents: 5936
diff changeset
70 <script type="text/javascript" src="${h.url('/js/jquery.dataTables.min.js', ver=c.kallithea_version)}"></script>
4734
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
71 <script type="text/javascript" src="${h.url('/js/bootstrap.js', ver=c.kallithea_version)}"></script>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
72 <script type="text/javascript" src="${h.url('/js/select2/select2.js', ver=c.kallithea_version)}"></script>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
73 <script type="text/javascript" src="${h.url('/js/yui.flot.js', ver=c.kallithea_version)}"></script>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
74 <script type="text/javascript" src="${h.url('/js/native.history.js', ver=c.kallithea_version)}"></script>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
75 <script type="text/javascript" src="${h.url('/js/base.js', ver=c.kallithea_version)}"></script>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
76 ## EXTRA FOR JS
4810
6a825018a498 template: use mako block for root.html extra sections
Mads Kiilerich <madski@unity3d.com>
parents: 4809
diff changeset
77 <%block name="js_extra"/>
4734
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
78 <script type="text/javascript">
2686
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
79 (function(window,undefined){
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
80 var History = window.History; // Note: We are using a capital H instead of a lower h
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
81 if ( !History.enabled ) {
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
82 // History.js is disabled for this browser.
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
83 // This is because we can optionally choose to support HTML4 browsers or not.
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
84 return false;
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
85 }
269c6e0b54cc Reimplemented file-browser using partial-ajax
Marcin Kuzminski <marcin@python-works.com>
parents: 2453
diff changeset
86 })(window);
3149
68f9c216377d white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3066
diff changeset
87
4387
e271a8766951 javascript: replace YUE.onDOMReady with $(document).ready
Mads Kiilerich <madski@unity3d.com>
parents: 4267
diff changeset
88 $(document).ready(function(){
3066
5d580e9bc730 JS cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3001
diff changeset
89 tooltip_activate();
5d580e9bc730 JS cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3001
diff changeset
90 show_more_event();
3388
cb40b3f6428c review members are dynamically changed based on selected other_repo owner
Marcin Kuzminski <marcin@python-works.com>
parents: 3246
diff changeset
91 // routes registration
6532
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
92 pyroutes.register('home', ${h.js(h.url('home'))}, []);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
93 pyroutes.register('new_gist', ${h.js(h.url('new_gist'))}, []);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
94 pyroutes.register('gists', ${h.js(h.url('gists'))}, []);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
95 pyroutes.register('new_repo', ${h.js(h.url('new_repo'))}, []);
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4064
diff changeset
96
6532
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
97 pyroutes.register('summary_home', ${h.js(h.url('summary_home', repo_name='%(repo_name)s'))}, ['repo_name']);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
98 pyroutes.register('changelog_home', ${h.js(h.url('changelog_home', repo_name='%(repo_name)s'))}, ['repo_name']);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
99 pyroutes.register('files_home', ${h.js(h.url('files_home', repo_name='%(repo_name)s',revision='%(revision)s',f_path='%(f_path)s'))}, ['repo_name', 'revision', 'f_path']);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
100 pyroutes.register('edit_repo', ${h.js(h.url('edit_repo', repo_name='%(repo_name)s'))}, ['repo_name']);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
101 pyroutes.register('edit_repo_perms', ${h.js(h.url('edit_repo_perms', repo_name='%(repo_name)s'))}, ['repo_name']);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
102 pyroutes.register('pullrequest_home', ${h.js(h.url('pullrequest_home', repo_name='%(repo_name)s'))}, ['repo_name']);
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4064
diff changeset
103
6532
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
104 pyroutes.register('toggle_following', ${h.js(h.url('toggle_following'))});
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
105 pyroutes.register('changeset_info', ${h.js(h.url('changeset_info', repo_name='%(repo_name)s', revision='%(revision)s'))}, ['repo_name', 'revision']);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
106 pyroutes.register('repo_size', ${h.js(h.url('repo_size', repo_name='%(repo_name)s'))}, ['repo_name']);
33b71a130b16 templates: properly escape inline JavaScript values
Søren Løvborg <sorenl@unity3d.com>
parents: 6434
diff changeset
107 pyroutes.register('repo_refs_data', ${h.js(h.url('repo_refs_data', repo_name='%(repo_name)s'))}, ['repo_name']);
4734
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
108 });
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
109 </script>
1c27ffa45832 html: minor cleanup of root.html
Mads Kiilerich <madski@unity3d.com>
parents: 4570
diff changeset
110
4810
6a825018a498 template: use mako block for root.html extra sections
Mads Kiilerich <madski@unity3d.com>
parents: 4809
diff changeset
111 <%block name="head_extra"/>
1157
41241617a7a3 rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
112 </head>
6400
437545429441 templates: drop id="body" on body - it wasn't used and caused duplicate IDs
Mads Kiilerich <mads@kiilerich.com>
parents: 6393
diff changeset
113 <body>
6428
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
114 <nav class="navbar navbar-inverse">
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
115 <div class="navbar-header" id="logo">
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
116 <a class="navbar-brand" href="${h.url('home')}">
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
117 <img class="pull-left" src="${h.url('/images/kallithea-logo.svg')}" alt="Kallithea"/>
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
118 %if c.site_name:
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
119 <span class="branding">${c.site_name}</span>
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
120 %endif
4809
ec39e73be935 template: move header to root.html, use mako block for header menu
Mads Kiilerich <madski@unity3d.com>
parents: 4734
diff changeset
121 </a>
6428
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
122 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
123 <span class="sr-only">Toggle navigation</span>
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
124 <span class="icon-bar"></span>
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
125 <span class="icon-bar"></span>
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
126 <span class="icon-bar"></span>
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
127 </button>
4809
ec39e73be935 template: move header to root.html, use mako block for header menu
Mads Kiilerich <madski@unity3d.com>
parents: 4734
diff changeset
128 </div>
6428
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
129 <div id="navbar" class="navbar-collapse collapse">
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
130 <%block name="header_menu"/>
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
131 </div>
8bd7a637cea0 template: use Bootstrap compatible navbar markup
domruf <dominikruf@gmail.com>
parents: 6400
diff changeset
132 </nav>
4809
ec39e73be935 template: move header to root.html, use mako block for header menu
Mads Kiilerich <madski@unity3d.com>
parents: 4734
diff changeset
133
2163
e77fbd3b069c IE ui fixes ref #349
Marcin Kuzminski <marcin@python-works.com>
parents: 2141
diff changeset
134 ${next.body()}
4462
fb5760e8ba43 support other analytic systems then just Google Analytics
domruf <dominikruf@gmail.com>
parents: 4390
diff changeset
135
fb5760e8ba43 support other analytic systems then just Google Analytics
domruf <dominikruf@gmail.com>
parents: 4390
diff changeset
136 %if c.ga_code:
fb5760e8ba43 support other analytic systems then just Google Analytics
domruf <dominikruf@gmail.com>
parents: 4390
diff changeset
137 ${h.literal(c.ga_code)}
fb5760e8ba43 support other analytic systems then just Google Analytics
domruf <dominikruf@gmail.com>
parents: 4390
diff changeset
138 %endif
1157
41241617a7a3 rewrote templates, all small pages will inherit from root for easier changes and controll
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
139 </body>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1778
diff changeset
140 </html>