##// END OF EJS Templates
template: use mako block for root.html extra sections
Mads Kiilerich -
r4810:6a825018 default
parent child Browse files
Show More
@@ -8,14 +8,14 b''
8 %endif
8 %endif
9 </%def>
9 </%def>
10
10
11 <%def name="js_extra()">
11 <%block name="js_extra">
12 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
12 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
13 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
13 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
14 <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
14 <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
15 </%def>
15 </%block>
16 <%def name="css_extra()">
16 <%block name="css_extra">
17 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
17 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
18 </%def>
18 </%block>
19
19
20 <%def name="breadcrumbs_links()">
20 <%def name="breadcrumbs_links()">
21 ${_('Edit Gist')} &middot; ${c.gist.gist_access_id}
21 ${_('Edit Gist')} &middot; ${c.gist.gist_access_id}
@@ -8,14 +8,14 b''
8 %endif
8 %endif
9 </%def>
9 </%def>
10
10
11 <%def name="js_extra()">
11 <%block name="js_extra">
12 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
12 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
13 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
13 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
14 <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
14 <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
15 </%def>
15 </%block>
16 <%def name="css_extra()">
16 <%block name="css_extra">
17 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
17 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
18 </%def>
18 </%block>
19
19
20 <%def name="breadcrumbs_links()">
20 <%def name="breadcrumbs_links()">
21 ${_('New Gist')}
21 ${_('New Gist')}
@@ -13,8 +13,7 b''
13 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.kallithea_version)}" media="screen"/>
13 <link rel="stylesheet" type="text/css" href="${h.url('/css/style.css', ver=c.kallithea_version)}" media="screen"/>
14 <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.kallithea_version)}" media="screen"/>
14 <link rel="stylesheet" type="text/css" href="${h.url('/css/contextbar.css', ver=c.kallithea_version)}" media="screen"/>
15 <link rel="stylesheet" type="text/css" href="${h.url('/fontello/css/kallithea.css', ver=c.kallithea_version)}">
15 <link rel="stylesheet" type="text/css" href="${h.url('/fontello/css/kallithea.css', ver=c.kallithea_version)}">
16 <%def name="css_extra()"></%def>
16 <%block name="css_extra"/>
17 ${self.css_extra()}
18
17
19 ## JAVASCRIPT ##
18 ## JAVASCRIPT ##
20 <script type="text/javascript">
19 <script type="text/javascript">
@@ -70,8 +69,7 b''
70 <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.kallithea_version)}"></script>
69 <script type="text/javascript" src="${h.url('/js/pyroutes_map.js', ver=c.kallithea_version)}"></script>
71 <script type="text/javascript" src="${h.url('/js/base.js', ver=c.kallithea_version)}"></script>
70 <script type="text/javascript" src="${h.url('/js/base.js', ver=c.kallithea_version)}"></script>
72 ## EXTRA FOR JS
71 ## EXTRA FOR JS
73 <%def name="js_extra()"></%def>
72 <%block name="js_extra"/>
74 ${self.js_extra()}
75 <script type="text/javascript">
73 <script type="text/javascript">
76 (function(window,undefined){
74 (function(window,undefined){
77 var History = window.History; // Note: We are using a capital H instead of a lower h
75 var History = window.History; // Note: We are using a capital H instead of a lower h
@@ -107,8 +105,7 b''
107 });
105 });
108 </script>
106 </script>
109
107
110 <%def name="head_extra()"></%def>
108 <%block name="head_extra"/>
111 ${self.head_extra()}
112 </head>
109 </head>
113 <body id="body">
110 <body id="body">
114 ## IE hacks
111 ## IE hacks
@@ -2,14 +2,14 b''
2
2
3 <%inherit file="/base/base.html"/>
3 <%inherit file="/base/base.html"/>
4
4
5 <%def name="js_extra()">
5 <%block name="js_extra">
6 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
6 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
7 <script type="text/javascript" src="${h.url('/js/mergely.js')}"></script>
7 <script type="text/javascript" src="${h.url('/js/mergely.js')}"></script>
8 </%def>
8 </%block>
9 <%def name="css_extra()">
9 <%block name="css_extra">
10 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
10 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
11 <link rel="stylesheet" type="text/css" href="${h.url('/css/mergely.css')}"/>
11 <link rel="stylesheet" type="text/css" href="${h.url('/css/mergely.css')}"/>
12 </%def>
12 </%block>
13
13
14 <%def name="title()">
14 <%def name="title()">
15 ${_('%s File side-by-side diff') % c.repo_name}
15 ${_('%s File side-by-side diff') % c.repo_name}
@@ -7,14 +7,14 b''
7 %endif
7 %endif
8 </%def>
8 </%def>
9
9
10 <%def name="js_extra()">
10 <%block name="js_extra">
11 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
11 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
12 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
12 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
13 <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
13 <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
14 </%def>
14 </%block>
15 <%def name="css_extra()">
15 <%block name="css_extra">
16 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
16 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
17 </%def>
17 </%block>
18
18
19 <%block name="header_menu">
19 <%block name="header_menu">
20 ${self.menu('repositories')}
20 ${self.menu('repositories')}
@@ -7,14 +7,14 b''
7 %endif
7 %endif
8 </%def>
8 </%def>
9
9
10 <%def name="js_extra()">
10 <%block name="js_extra">
11 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
11 <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
12 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
12 <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
13 <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
13 <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
14 </%def>
14 </%block>
15 <%def name="css_extra()">
15 <%block name="css_extra">
16 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
16 <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
17 </%def>
17 </%block>
18
18
19 <%block name="header_menu">
19 <%block name="header_menu">
20 ${self.menu('repositories')}
20 ${self.menu('repositories')}
@@ -20,12 +20,12 b''
20 <%block name="header_menu">
20 <%block name="header_menu">
21 ${self.menu('journal')}
21 ${self.menu('journal')}
22 </%block>
22 </%block>
23 <%def name="head_extra()">
23 <%block name="head_extra">
24 <link href="${h.url('journal_atom', api_key=c.authuser.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
24 <link href="${h.url('journal_atom', api_key=c.authuser.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
25 <link href="${h.url('journal_rss', api_key=c.authuser.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
25 <link href="${h.url('journal_rss', api_key=c.authuser.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
26 </%def>
26 </%block>
27
27 <%def name="main()">
28 <%def name="main()">
28
29 <div class="box box-left">
29 <div class="box box-left">
30 <!-- box / title -->
30 <!-- box / title -->
31 <div class="title">
31 <div class="title">
@@ -12,10 +12,10 b''
12 <%block name="header_menu">
12 <%block name="header_menu">
13 ${self.menu('journal')}
13 ${self.menu('journal')}
14 </%block>
14 </%block>
15 <%def name="head_extra()">
15 <%block name="head_extra">
16 <link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" />
16 <link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" />
17 <link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" />
17 <link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" />
18 </%def>
18 </%block>
19 <%def name="main()">
19 <%def name="main()">
20
20
21 <div class="box">
21 <div class="box">
@@ -15,10 +15,10 b''
15 ${self.menu('repositories')}
15 ${self.menu('repositories')}
16 </%block>
16 </%block>
17
17
18 <%def name="head_extra()">
18 <%block name="head_extra">
19 <link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
19 <link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
20 <link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
20 <link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
21 </%def>
21 </%block>
22
22
23 <%def name="main()">
23 <%def name="main()">
24 ${self.repo_context_bar('summary')}
24 ${self.repo_context_bar('summary')}
@@ -38,25 +38,24 b''
38 ${self.menu('repositories')}
38 ${self.menu('repositories')}
39 </%block>
39 </%block>
40
40
41 <%def name="head_extra()">
41 <%block name="head_extra">
42 <link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
42 <link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
43 <link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
43 <link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
44
44
45 <script>
45 <script>
46 redirect_hash_branch = function(){
46 redirect_hash_branch = function(){
47 var branch = window.location.hash.replace(/^#(.*)/, '$1');
47 var branch = window.location.hash.replace(/^#(.*)/, '$1');
48 if (branch){
48 if (branch){
49 window.location = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"
49 window.location = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"
50 .replace('__BRANCH__',branch);
50 .replace('__BRANCH__',branch);
51 }
51 }
52 }
52 }
53 redirect_hash_branch();
53 redirect_hash_branch();
54 window.onhashchange = function() {
54 window.onhashchange = function() {
55 redirect_hash_branch();
55 redirect_hash_branch();
56 };
56 };
57 </script>
57 </script>
58
58 </%block>
59 </%def>
60
59
61 <%def name="main()">
60 <%def name="main()">
62 ${self.repo_context_bar('summary')}
61 ${self.repo_context_bar('summary')}
General Comments 0
You need to be logged in to leave comments. Login now