[r7043]: branches / 1.1 / turbogears / qstemplates / quickstart / +package+ / templates / master.html History

Child: [r7044] (diff)

Download this file

master.html    98 lines (84 with data), 3.6 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
<head py:match="head" py:attrs="select('@*')">
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title py:replace="''">Your title goes here</title>
<link py:for="css in tg_css" py:replace="css.display()" />
<link py:for="js in tg_js_head" py:replace="js.display()" />
<meta py:replace="select('*')" />
<link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/static/css/style.css')}" />
</head>
<?python
# define mock menus as list of (title, url, is_active) tuples
menu_top = [
('Welcome','/',True),
('Model','/#model', False),
('View','/#view', False),
('Controller','/#controller', False),
('About','/#about', False),
('Contact','http://docs.turbogears.org/GettingHelp', False)
]
menu_side = [
('Official Website', 'http://www.turbogears.org'),
('Documentation', 'http://docs.turbogears.org'),
('Bugs & Suggestions', 'http://trac.turbogears.org'),
('Mailing List', 'http://groups.google.com/group/turbogears'),
]
?>
<body py:match="body" py:attrs="select('@*')">
<div py:for="js in tg_js_bodytop" py:replace="js.display()" />
<div id="header">
<h1>
Welcome to TurboGears
<span class="subtitle">The Python web metaframework</span>
</h1>
</div>
<ul id="mainmenu">
<li py:for="num, (title, url, is_active) in enumerate(menu_top)" class="${('', 'first')[not num]}">
<a href="${url}" class="${('', 'active')[is_active]}" py:content="title"></a>
</li>
<li py:if="tg.config('identity.on') and not defined('logging_in')" class="loginlogout"><py:choose>
<py:when test="tg.identity.anonymous">
<a href="${tg.url(tg.identity.login_url)}" class="loginlogout">Login</a>
</py:when>
<py:otherwise>
<span>Welcome <span py:replace="tg.identity.user.display_name or tg.identity.user.user_name">user</span></span>
<a href="${tg.url('/logout')}" class="loginlogout">Logout</a>
</py:otherwise>
</py:choose></li>
</ul>
<div id="content">
<div id="flash" class="notice" py:if="value_of('tg_flash', None)" py:content="tg_flash"></div>
<div id="sb_top" class="sidebar">
<h2>Learn More</h2>
<p>Want to learn more about TurboGears and
take part in its development?</p>
<ul class="links">
<li py:for="title, url in menu_side"><a py:attrs="dict(href=url)" py:content="title"></a></li>
</ul>
</div>
<div id="sb_bottom" class="sidebar">
<h2>Successful Quickstart!</h2>
<p>If you can read this page it means you have successfully quickstarted your
TurboGears application. Thank you for choosing TurboGears.</p>
</div>
<div py:replace="select('*|text()')"/>
<div id="footer">
<div class="flogo">
<a href="http://www.turbogears.org/" title="Powered by TurboGears"
><img src="${tg.url('/static/images/under_the_hood_blue.png')}"
alt="TurboGears under the hood" border="0" /></a>
</div>
<div class="foottext">
<p>TurboGears is a open source front-to-back web development
framework written in Python. Copyright (c) 2005-2010</p>
</div>
</div>
</div>
<div py:for="js in tg_js_bodybottom" py:replace="js.display()" />
</body>
</html>