root/veekun/trunk/templates/wrapper.tt

Revision 436, 8.9 kB (checked in by eevee, 6 months ago)

Removed an erraneous line in wrapper.tt that was causing a blank style <link> tag to be inserted. (#293)

Line 
1[% DEFAULT skip_wrapper = 0 %]
2[% UNLESS skip_wrapper %]
3[% DEFAULT link_name = template.link_name || '' %]
4[% DEFAULT page_title = template.page_title  || 'Untitled' %]
5[% DEFAULT page_header = page_title %]
6[% DEFAULT extra_headers = [] %]
7[% DEFAULT extra_css = template.extra_css || [] %]
8[% DEFAULT extra_js = [] %]
9<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
10<html>
11<head profile="http://a9.com/-/spec/opensearch/1.1/">
12<title>[% page_title %] - [% c.site_opts.site_title %]</title>
13<link rel="shortcut icon" type="image/png" href="/images/favicon.png"/>
14<link rel="stylesheet" type="text/css" href="/style/global"/>
15[% FOREACH css IN extra_css %]
16<link rel="stylesheet" type="text/css" href="/style/[% css %]"/>
17[% END %]
18[% extra_headers.join("\n") %]
19<link rel="search" type="application/opensearchdescription+xml" title="Veekun Pok&eacute;dex" href="/files/mozsearch.pokedex.xml"/>
20<link rel="top" href="/" title="[% c.site_opts.site_title %]"/>
21[% IF crumbs AND crumbs.size > 1 %]
22[%     # XXX: AWFUL HACK ALERT %]
23<link rel="up" href="[% crumbs.-2.match('href="(.+?)"').0 %]" title="[% crumbs.-2.match('>(.+)<').0 %]"/>
24[% END %]
25[% FOR rel IN nav.keys %]
26<link rel="[% rel %]" href="[% nav.$rel.url %]" title="[% nav.$rel.title %]"/>
27[% END %]
28<script type="text/javascript" src="/script/jquery.js"></script>
29<script type="text/javascript" src="/script/dexsuggest.js"></script>
30[% FOREACH js IN extra_js %]
31<script type="text/javascript" src="/script/[% js %].js"></script>
32[% END %]
33</head>
34<body>
35<div id="header">
36    <a href="/"><img src="/images/veehead.png" alt="[logo]" id="logo"/></a>
37    <div id="site-title">[% c.site_opts.site_title %]</div>
38    <div id="page-title">[% page_header %]</div>
39    <form action="/dex" method="get" id="dex-lookup" class="tinyform"> <p>
40        Pok&eacute;dex lookup: <input type="text" name="entry" class="js-dexsuggest"/>
41        <input type="submit" value="Go!"/>
42    </p> </form>
43[% IF c.user %]
44    <div id="login"> <form action="[% c.uri('Users', 'logout') %]" method="POST" class="tinyform"><p>Logged in as <a href="[% c.uri('Users', 'info', c.user.obj.id) %]">[% c.user.name %]</a>. <input type="submit" value="Logout"/></p></form> </div>
45[% ELSE %]
46    <div id="login"> <a href="[% c.uri('Users', 'login') %]">Login</a> or <a href="[% c.uri('Users', 'register') %]">register</a> </div>
47[% END %]
48</div>
49
50<div id="statusline">
51    Found a bug?  Have a suggestion?  <a href="http://trac.veekun.com/newticket">File a bug report!</a>
52</div>
53
54[% IF 0 AND c.req.user_agent.match('MSIE (.+);') && matches.0 < 7 %]
55<div id="inferior">
56 <div id="inferior-title">Warning: You are using an obsolete browser!</div>
57 <div id="inferior-text">
58  <p>Your browser does not appear to support the following standard features.  You may experience degraded visuals or functionality.</p>
59  <p>CSS child and sibling selectors &bull; PNG alpha translucency &bull; Box overflow &bull; Generated content &bull; <code>:hover</code> on arbitrary elements</p>
60  <p>You may wish to switch to a more standards-compliant browser, such as <a href="http://www.getfirefox.com">Firefox</a>, <a href="http://www.opera.com">Opera</a>, <a href="http://kmeleon.sourceforge.net/">K-Meleon</a>, <a href="http://www.mozilla.org/projects/seamonkey/">SeaMonkey</a>, etc.</p>
61 </div>
62 <div id="inferior-book">
63  And so at last the beast fell and the unbelievers rejoiced.
64  But all was not lost, for from the ash rose a great bird.
65  The bird gazed down upon the unbelievers and cast fire
66  and thunder upon them. For the beast had been
67  reborn with its strength renewed, and the
68  followers of Mammon cowered in horror.
69 </div>
70</div>
71[% END %]
72
73<!-- It would be very nice to have this below the content in the source. -->
74<!-- Low-priority TODO. -->
75<div id="left">
76[% cur_link_category = link_name %]
77[% IF (matches = cur_link_category.match('^(.+)/')); cur_link_category = matches.0; END %]
78    <ul id="linkbar">
79<!-- TODO: don't show a link at all if there are no sublinks you're allowed to see? -->
80[% FOREACH link IN c.site_opts.link_list %]
81[%     NEXT IF link.permission && !c.can_i(link.permission) %]
82[%#     IF link.category == cur_link_category; cur_link = link; END %]
83[%# TODO: this is an ugly IF block; clean it up %]
84    <li[% IF link == cur_link %] class="link-selected"[% END %]>
85[%     IF link.url # && link.category != link_name %]
86    <a href="[% link.url %]">[% IF link.icon %]<img src="/images/icons/linklist/[% link.icon %]" alt=""/>[% END %][% link.text %]</a>
87[%     ELSE %]
88    <span>[% IF link.icon %]<img src="/images/icons/linklist/[% link.icon %]" alt=""/>[% END %][% link.text %]</span>
89[%     END %]
90[%     IF link != cur_link %]
91[%         ulopen = 0 %]
92[%         FOREACH sublink IN link.sublinks %]
93[%             NEXT IF sublink.permission && !allowed(sublink.permission) %]
94[%             IF !ulopen %]
95        <ul>
96[%             END %]
97[%             ulopen = 1 %]
98        <li><a href="[% sublink.url %]">[% IF sublink.icon %]<img src="/images/icons/linklist/[% sublink.icon %]" alt=""/>[% END %][% sublink.text %]</a></li>
99[%         END %]
100[%         IF ulopen %]
101        </ul>
102[%         END %]
103[%     END %]
104    </li>
105[% END %]
106    </ul>
107    <div class="linkbox">
108        <h1>Siblings</h1>
109        <ul>
110            <li> <a href="http://dragonflycave.com/"><img src="/images/buttons/tcod.png" alt="The Cave of Dragonflies" title="The Cave of Dragonflies"/></a> </li>
111        </ul>
112    </div>
113    <div class="linkbox">
114        <h1>Shameless Promotion</h1>
115        <ul>
116            <li> <a href="http://whatpulse.org/stats/teams/10448/"><img src="/images/buttons/whatpulse.png" alt="WhatPulse" title="WhatPulse"/> <br/> Join my WhatPulse team! <br/> (Key-count nerd thing)</a> </li>
117        </ul>
118    </div>
119</div>
120
121[% IF error %]<div id="error"><div class="heading">Internal <code>[% error.type %]</code> error</div><p>[% error.info %]</p></div>[%# ... %]
122[% ELSIF error_msg %]<div id="error"><div class="heading">Error</div><p>[% error_msg.join('<br/>') %]</p></div>[% END %]
123[% IF info_msg %]<div id="info"><div class="heading">FYI</div><p>[% info_msg.join('<br/>') %]</p></div>[% END %]
124[% IF success_msg %]<div id="success"><div class="heading">Success!</div><p>[% success_msg.join('<br/>') %]</p></div>[% END %]
125
126[%# what a clusterfuck! %]
127[% IF content %]
128<div id="content">
129[% IF crumbs %]<div id="breadcrumbs">You are here: [% crumbs.join(' :: ') %]</div>[% END %]
130[% END # content %]
131[% END # skip_wrapper %]
132[% content %]
133[% UNLESS skip_wrapper %]
134[% IF content %]
135</div>
136[% END # content %]
137
138[% IF (c.debug OR c.req.params.dump_sql) AND querylog.count %]
139<div id="debug">
140<table cellspacing="0" id="sqldump">
141    <tr> <th>Time</th> <th>%</th> <th>#</th> <th>#pl</th> <th>#TT</th> <th>SQL</th> </tr>
142    [% FOREACH q IN generate_query_list(querylog.log) %]
143    <tr class="color[% loop.count % 2 + 1 %]">
144        <td>[% q.time | format('%0.6f') %]</td>
145        <td>[% (q.time / querylog.time_elapsed) * 100 | format('%i') %]%</td>
146        <td>[% q.count %]</td>
147        <td>[% q.count_pl OR '-' %]</td>
148        <td>[% q.count - q.count_pl OR '-' %]</td>
149        <td>[% q.sql %]</td>
150    </tr>
151    [% END %]
152</table>
153</div>
154[% END %]
155
156<div id="footer">
157[% IF c.cache.svn_revision %]
158    <div id="svn-revision">Revision [%
159        c.cache.svn_revision
160        .replace(':', ' through ')
161        .replace('(\d+)', '<a href="http://trac.veekun.com/changeset/$1">$1</a>')
162    %]</div>
163[% END %]
164    All content copyright its original owners.  Pok&eacute;mon is copyright to Nintendo and Game Freak.  Current site layout by Eevee/Alex Munroe and is &copy;2005. <br/>
165[% IF from_cache %]
166    This page was retrieved from cache by a team of <a href="[% c.uri('Dex', 'pokemon', 'scyther') %]">Scyther</a> jounin in about [% time_delta = time - start_time; time_delta | format('%0.6f') %] seconds. <br/>
167[% ELSE %]
168    This page was created by a team of trained <a href="[% c.uri('Dex', 'pokemon', 'ambipom') %]">Ambipom</a> in about [% time_delta = time - start_time; time_delta | format('%0.6f') %] seconds. <br/>
169[% END %]
170[% IF querylog.count %]
171    [% querylog.time_elapsed | format('%0.6f') %] seconds [% IF time_delta %]or [% querylog.time_elapsed / time_delta * 100 | format('%0.3f') %]%[% END %] of that was spent running [% querylog.count %] SQL queries, an average of [% querylog.time_elapsed / querylog.count | format('%0.6f') %] seconds each. <br/>
172[% ELSE %]
173    No SQL was used on this page. <br/>
174[% END %]
175[% poketeam_count = time_delta * 10 %]
176[% SET poketeam_count = 20 IF poketeam_count > 20 %]
177    <div style="height: 32px; width: [% poketeam_count * 32 %]px; background: url(/dex-images/icons/[% from_cache ? 123 : 424 %].png) repeat-x"></div>
178</div>
179<script id="stats_script" type="text/javascript" src="http://metrics.performancing.com/stats.js"></script>
180<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
181<script type="text/javascript"> _uacct = "UA-246901-1"; urchinTracker(); </script>
182</body>
183</html>
184[% END # skip_wrapper %]
Note: See TracBrowser for help on using the browser.