source: trac/trunk/templates/header.cs @ 3280

Revision 3036, 2.6 KB checked in by moschny, 8 years ago (diff)

Merged 0.9b2-2416 to trunk.

Line 
1<!DOCTYPE html
2    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5<head><?cs
6 if:project.name_encoded ?>
7 <title><?cs if:title ?><?cs var:title ?> - <?cs /if ?><?cs
8   var:project.name_encoded ?> - Trac</title><?cs
9 else ?>
10 <title>Trac: <?cs var:title ?></title><?cs
11 /if ?><?cs
12 if:html.norobots ?>
13 <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /><?cs
14 /if ?><?cs
15 each:rel = chrome.links ?><?cs
16  each:link = rel ?><link rel="<?cs
17   var:name(rel) ?>" href="<?cs var:link.href ?>"<?cs
18   if:link.title ?> title="<?cs var:link.title ?>"<?cs /if ?><?cs
19   if:link.type ?> type="<?cs var:link.type ?>"<?cs /if ?> /><?cs
20  /each ?><?cs
21 /each ?><style type="text/css"><?cs include:"site_css.cs" ?></style>
22 <script type="text/javascript" src="<?cs
23   var:htdocs_location ?>js/trac.js"></script>
24</head>
25<body>
26<?cs include "site_header.cs" ?>
27<div id="banner">
28
29<div id="header"><?cs
30 if:chrome.logo.src ?><a id="logo" href="<?cs
31  var:chrome.logo.link ?>"><img src="<?cs var:chrome.logo.src ?>"<?cs
32  if:chrome.logo.width ?> width="<?cs var:chrome.logo.width ?>"<?cs /if ?><?cs
33  if:chrome.logo.height ?> height="<?cs var:chrome.logo.height ?>"<?cs
34  /if ?> alt="<?cs var:chrome.logo.alt ?>" /></a><hr /><?cs
35 elif:project.name_encoded ?><h1><a href="<?cs var:chrome.logo.link ?>"><?cs
36  var:project.name_encoded ?></a></h1><?cs
37 /if ?></div>
38
39<form id="search" action="<?cs var:trac.href.search ?>" method="get">
40 <?cs if:trac.acl.SEARCH_VIEW ?><div>
41  <label for="proj-search">Search:</label>
42  <input type="text" id="proj-search" name="q" size="10" accesskey="f" value="" />
43  <input type="submit" value="Search" />
44  <input type="hidden" name="wiki" value="on" />
45  <input type="hidden" name="changeset" value="on" />
46  <input type="hidden" name="ticket" value="on" />
47 </div><?cs /if ?>
48</form>
49
50<?cs def:nav(items) ?><?cs
51 if:len(items) ?><ul><?cs
52  set:idx = 0 ?><?cs
53  set:max = len(items) - 1 ?><?cs
54  each:item = items ?><?cs
55   set:first = idx == 0 ?><?cs
56   set:last = idx == max ?><li<?cs
57   if:first || last || item.active ?> class="<?cs
58    if:item.active ?>active<?cs /if ?><?cs
59    if:item.active && (first || last) ?> <?cs /if ?><?cs
60    if:first ?>first<?cs /if ?><?cs
61    if:(item.active || first) && last ?> <?cs /if ?><?cs
62    if:last ?>last<?cs /if ?>"<?cs
63   /if ?>><?cs var:item ?></li><?cs
64   set:idx = idx + 1 ?><?cs
65  /each ?></ul><?cs
66 /if ?><?cs
67/def ?>
68
69<div id="metanav" class="nav"><?cs call:nav(chrome.nav.metanav) ?></div>
70</div>
71
72<div id="mainnav" class="nav"><?cs call:nav(chrome.nav.mainnav) ?></div>
73<div id="main">
Note: See TracBrowser for help on using the repository browser.