Mercurial > genshi > genshi-test
diff examples/turbogears/markuptest/templates/master.html @ 4:f8612f05af99
Added first stab of an implementation of the !TurboGears [http://www.turbogears.org/docs/plugins/template.html plugin API for template engines], and also a !TurboGears-based example using this plugin. Both written by Matt Good.
author | cmlenz |
---|---|
date | Sat, 03 Jun 2006 12:31:58 +0000 |
parents | |
children | 5da45906dda7 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/examples/turbogears/markuptest/templates/master.html @@ -0,0 +1,40 @@ +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:py="http://purl.org/kid/ns#" + xmlns:xi="http://www.w3.org/2001/XInclude" + py:strip=""> +<xi:include href="sitetemplate.html"><xi:fallback/></xi:include> + +<head py:match="head"> + <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/> + <title py:replace="''">Your title goes here</title> + ${select('*/*')} + <style type="text/css"> + #pageLogin + { + font-size: 10px; + font-family: verdana; + text-align: right; + } + </style> +</head> + +<body py:match="body"> + <div py:if="tg.config('identity.on', False) and not logging_in" + id="pageLogin"> + <span py:if="tg.identity.anonymous"> + <a href="/login">Login</a> + </span> + <span py:if="not tg.identity.anonymous"> + Welcome ${tg.identity.user.display_name}. + <a href="/logout">Logout</a> + </span> + </div> + + <div py:if="tg_flash" class="flash" py:content="tg_flash"></div> + + ${select('*')} + + <p align="center"><img src="/static/images/tg_under_the_hood.png" alt="TurboGears under the hood"/></p> +</body> + +</html>