"""
from jinja.environment import Environment
from jinja.loaders import *
+
+
+from_string = Environment().from_string
def __float__(self):
return 1
+ def __call__(self, *args, **kwargs):
+ return self
+
Undefined = UndefinedType()
return self.loop_function(seq)
return Undefined
+ def __repr__(self):
+ return str(self._stack)
+
class CycleContext(object):
"""
return True
eos = property(lambda x: not x.__nonzero__(), doc=__nonzero__.__doc__)
-
+
def next(self):
"""Return the next token from the stream."""
if self._pushed:
"""
Get the attribute name from obj.
"""
- if name in obj:
+ try:
return obj[name]
- elif hasattr(obj, name):
- rv = getattr(obj, name)
- r = getattr(obj, 'jinja_allowed_attributes', None)
- if r is not None:
- if name not in r:
+ except (TypeError, KeyError, IndexError):
+ if hasattr(obj, name):
+ r = getattr(obj, 'jinja_allowed_attributes', None)
+ if r is not None and name not in r:
raise SecurityException('unsafe attributed %r accessed' % name)
- return rv
+ return getattr(obj, name)
return Undefined
def call_function(self, f, args, kwargs, dyn_args, dyn_kwargs):
end_of_filter = lambda p, t, d: t == 'name' and d == 'endfilter'
end_of_macro = lambda p, t, d: t == 'name' and d == 'endmacro'
end_of_block_tag = lambda p, t, d: t == 'name' and d == 'endblock'
+end_of_raw = lambda p, t, d: t == 'name' and d == 'endraw'
class Parser(object):
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Documentation | Jinja Template Engine</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="./static/style.css" type="text/css" />
+ <link rel="stylesheet" href="./static/print.css" type="text/css" media="print" />
+ <link rel="stylesheet" href="./static/pygments.css" type="text/css" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>Jinja</h1>
+ </div>
+ <ul id="navigation">
+ <li><a href="./index.html">Index</a></li>
+ <li><a href="./faq.html">FAQ</a></li>
+ <li class="active">Documentation</li>
+ <li><a href="./download.html">Download</a></li>
+ </ul>
+ <div id="content">
+ <div id="contentwrapper">
+ <h1>Documentation</h1>
+ <p>
+ You can browse the documentation either online or download it:
+ </p>
+ </div>
+ <p id="meta">
+ <a href="./documentation.tmpl">show template source</a>
+ </p>
+ </div>
+ <div id="footer">
+ © Copyright 2007 by the Pocoo Team.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<% extends 'layout/base.tmpl' %>
+<% block title %>Documentation<% endblock %>
+<% block content %>
+ <h1>Documentation</h1>
+ <p>
+ You can browse the documentation either online or download it:
+ </p>
+<% endblock %>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Download | Jinja Template Engine</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="./static/style.css" type="text/css" />
+ <link rel="stylesheet" href="./static/print.css" type="text/css" media="print" />
+ <link rel="stylesheet" href="./static/pygments.css" type="text/css" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>Jinja</h1>
+ </div>
+ <ul id="navigation">
+ <li><a href="./index.html">Index</a></li>
+ <li><a href="./faq.html">FAQ</a></li>
+ <li><a href="./documentation.html">Documentation</a></li>
+ <li class="active">Download</li>
+ </ul>
+ <div id="content">
+ <div id="contentwrapper">
+ <h1>Download</h1>
+ <p>
+ If you want to install the release with
+ <a href="http://peak.telecommunity.com/DevCenter/EasyInstall">easy_install</a>,
+ you can do it using this command:
+ </p>
+ <pre>easy_install Pygments</pre>
+ <p>
+ You can also get the development source from subversion using this command:
+ </p>
+ <pre>svn co http://trac.pocoo.org/repos/jinja/trunk jinja</pre>
+ <p>
+ Installing the current subversion trunk as a Python egg is done with:
+ </p>
+ <pre>easy_install Jinja==dev</pre>
+ <p>
+ Development takes place at the <a href="http://trac.pocoo.org/">Pocoo trac</a>,
+ you can browse the source online
+ <a href="http://trac.pocoo.org/browser/jinja/trunk">here</a>.
+ </p>
+ </div>
+ <p id="meta">
+ <a href="./download.tmpl">show template source</a>
+ </p>
+ </div>
+ <div id="footer">
+ © Copyright 2007 by the Pocoo Team.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<% extends 'layout/base.tmpl' %>
+<% block title %>Download<% endblock %>
+<% block content %>
+ <h1>Download</h1>
+ <p>
+ If you want to install the release with
+ <a href="http://peak.telecommunity.com/DevCenter/EasyInstall">easy_install</a>,
+ you can do it using this command:
+ </p>
+ <pre>easy_install Pygments</pre>
+ <p>
+ You can also get the development source from subversion using this command:
+ </p>
+ <pre>svn co http://trac.pocoo.org/repos/jinja/trunk jinja</pre>
+ <p>
+ Installing the current subversion trunk as a Python egg is done with:
+ </p>
+ <pre>easy_install Jinja==dev</pre>
+ <p>
+ Development takes place at the <a href="http://trac.pocoo.org/">Pocoo trac</a>,
+ you can browse the source online
+ <a href="http://trac.pocoo.org/browser/jinja/trunk">here</a>.
+ </p>
+<% endblock %>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>FAQ | Jinja Template Engine</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="./static/style.css" type="text/css" />
+ <link rel="stylesheet" href="./static/print.css" type="text/css" media="print" />
+ <link rel="stylesheet" href="./static/pygments.css" type="text/css" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>Jinja</h1>
+ </div>
+ <ul id="navigation">
+ <li><a href="./index.html">Index</a></li>
+ <li class="active">FAQ</li>
+ <li><a href="./documentation.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ </ul>
+ <div id="content">
+ <div id="contentwrapper">
+ <h1>Frequently Asked Questions</h1>
+ <p>
+ Here a list of frequently asked questions.
+ </p>
+ <h2>Why the Name?</h2>
+ <p>
+ The name Jinja was chosen because it's the name of a Japanese temple and
+ temple and template share a similar pronunciation.
+ </p>
+ <h2>How fast is it?</h2>
+ <p>
+ I really hate benchmarks especially since they don't reflect much. The
+ performance of a template depends on many factors and you would have to
+ benchmark different engines in differen situations. However Jinja isn't
+ slow. The benchmarks from the testsuite show that Jinja is about twice
+ as fast as Django templates and about three times as slow as
+ <a href="http://www.makotemplates.org/">mako</a>. That's not bad for a
+ sandboxed template engine that has to sanitize template input on the fly.
+ If you really need the best performance of a template engine consider
+ using mako.
+ </p>
+ <h2>What happened to Jinja < 1?</h2>
+ <p>
+ Before Jinja 1 there was a template engine too with the same name. Beside
+ the name and the same maintainer those two projects don't share a single
+ line of code. If you have an application using Jinja < 1 you should try
+ to make it Jinja 1 compatible. If that's not possible, the old project is
+ still available as
+ <a href="http://trac.pocoo.org/repos/jinja/branches/0.9-maint/">0.9-maint</a>
+ in the Jinja subversion repository.
+ </p>
+ <h2>Why should I use Jinja?</h2>
+ <p>
+ There are dozens of template engines for Python, many of them try to
+ achieve different things. If you are looking for a XML based template
+ engine have a look at <a href="http://genshi.edgewall.org/">genshi</a>,
+ if you want a bleezing fast template engine with the full range of
+ python constructs have a look at mako. If you want sandboxed templates
+ you probably want to check out Jinja.
+ </p>
+ </div>
+ <p id="meta">
+ <a href="./faq.tmpl">show template source</a>
+ </p>
+ </div>
+ <div id="footer">
+ © Copyright 2007 by the Pocoo Team.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<% extends 'layout/base.tmpl' %>
+<% block title %>FAQ<% endblock %>
+<% block content %>
+ <h1>Frequently Asked Questions</h1>
+ <p>
+ Here a list of frequently asked questions.
+ </p>
+ <h2>Why the Name?</h2>
+ <p>
+ The name Jinja was chosen because it's the name of a Japanese temple and
+ temple and template share a similar pronunciation.
+ </p>
+ <h2>How fast is it?</h2>
+ <p>
+ I really hate benchmarks especially since they don't reflect much. The
+ performance of a template depends on many factors and you would have to
+ benchmark different engines in differen situations. However Jinja isn't
+ slow. The benchmarks from the testsuite show that Jinja is about twice
+ as fast as Django templates and about three times as slow as
+ <a href="http://www.makotemplates.org/">mako</a>. That's not bad for a
+ sandboxed template engine that has to sanitize template input on the fly.
+ If you really need the best performance of a template engine consider
+ using mako.
+ </p>
+ <h2>What happened to Jinja < 1?</h2>
+ <p>
+ Before Jinja 1 there was a template engine too with the same name. Beside
+ the name and the same maintainer those two projects don't share a single
+ line of code. If you have an application using Jinja < 1 you should try
+ to make it Jinja 1 compatible. If that's not possible, the old project is
+ still available as
+ <a href="http://trac.pocoo.org/repos/jinja/branches/0.9-maint/">0.9-maint</a>
+ in the Jinja subversion repository.
+ </p>
+ <h2>Why should I use Jinja?</h2>
+ <p>
+ There are dozens of template engines for Python, many of them try to
+ achieve different things. If you are looking for a XML based template
+ engine have a look at <a href="http://genshi.edgewall.org/">genshi</a>,
+ if you want a bleezing fast template engine with the full range of
+ python constructs have a look at mako. If you want sandboxed templates
+ you probably want to check out Jinja.
+ </p>
+<% endblock %>
--- /dev/null
+#!/usr/bin/env python
+"""
+ jinja webpage generator
+ ~~~~~~~~~~~~~~~~~~~~~~~
+"""
+import os
+from codecs import open
+from jinja import Environment, FileSystemLoader
+from jinja.filters import stringfilter
+from pygments import highlight
+from pygments.lexers import get_lexer_by_name
+from pygments.formatters import HtmlFormatter
+
+
+formatter = HtmlFormatter(cssclass='syntax', encoding=None, style='pastie')
+
+env = Environment('<%', '%>', '<%=', '%>', loader=FileSystemLoader('.'), trim_blocks=True)
+env.filters['pygmentize'] = stringfilter(lambda v, l:
+ highlight(v.strip(), get_lexer_by_name(l), formatter))
+
+
+def get_files(folder):
+ for fn in os.listdir(folder):
+ fn = os.path.join(folder, fn)
+ if os.path.isdir(fn):
+ for item in get_files(fn):
+ yield item
+ elif fn.endswith('.tmpl'):
+ yield fn
+
+
+for filename in get_files('.'):
+ root = './' + ''.join(['../' for _ in os.path.dirname(filename).
+ split(os.path.sep)[1:]])
+
+ t = env.get_template(filename)
+ f = open(filename[:-5] + '.html', 'w', 'utf-8')
+ f.write(t.render(
+ file_id=filename[2:-5],
+ root=root
+ ))
+ f.close()
+
+f = file('static/pygments.css', 'w')
+f.write(formatter.get_style_defs('.syntax'))
+f.close()
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Index | Jinja Template Engine</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="./static/style.css" type="text/css" />
+ <link rel="stylesheet" href="./static/print.css" type="text/css" media="print" />
+ <link rel="stylesheet" href="./static/pygments.css" type="text/css" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>Jinja</h1>
+ </div>
+ <ul id="navigation">
+ <li class="active">Index</li>
+ <li><a href="./faq.html">FAQ</a></li>
+ <li><a href="./documentation.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ </ul>
+ <div id="content">
+ <div id="contentwrapper">
+ <h1>Jinja Templates</h1>
+ <p>
+ Jinja is a
+ <a href="http://en.wikipedia.org/wiki/Sandbox_%28computer_security%29">sandboxed</a>
+ template engine written in pure <a href="http://www.python.org/">Python</a>. It
+ provides a <a href="http://www.djangoproject.com/">Django</a>-like non-XML syntax
+ and compiles templates into executable python code. It's basically a combination
+ of Django templates and python code.
+ </p>
+ <h2>Nutshell</h2>
+ <div class="syntax"><pre><span class="cp">{%</span> <span class="k">extends</span> <span class="s1">'base.html'</span> <span class="cp">%}</span>
+<span class="cp">{%</span> <span class="k">block</span> <span class="nv">title</span> <span class="cp">%}</span>Memberlist<span class="cp">{%</span> <span class="k">endblock</span> <span class="cp">%}</span>
+<span class="cp">{%</span> <span class="k">block</span> <span class="nv">content</span> <span class="cp">%}</span>
+ <span class="nt"><ul></span>
+ <span class="cp">{%</span> <span class="k">for</span> <span class="nv">user</span> <span class="k">in</span> <span class="nv">users</span> <span class="cp">%}</span>
+ <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"</span><span class="cp">{{</span> <span class="nv">user.url</span><span class="o">|</span><span class="nf">e</span> <span class="cp">}}</span><span class="s">"</span><span class="nt">></span><span class="cp">{{</span> <span class="nv">user.username</span><span class="o">|</span><span class="nf">e</span> <span class="cp">}}</span><span class="nt"></a></li></span>
+ <span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
+ <span class="nt"></ul></span>
+<span class="cp">{%</span> <span class="k">endblock</span> <span class="cp">%}</span>
+</pre></div>
+ <h2>Philosphy</h2>
+ <p>
+ Application logic is for the controller but don't try to make the live for the
+ template designer too hard by giving him too less functionality.
+ </p>
+ <h2>Features</h2>
+ <ul>
+ <li><strong>Simple API</strong>. For basic usage just one function is needed:
+<div class="syntax"><pre><span class="k">from</span> <span class="nn">jinja</span> <span class="k">import</span> <span class="n">from_string</span>
+<span class="k">print</span> <span class="n">from_string</span><span class="p">(</span><span class="s">'Hello {{ data }}!'</span><span class="p">)</span><span class="o">.</span><span class="n">render</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="s">'World'</span><span class="p">)</span>
+</pre></div>
+</li>
+ <li><strong>Sandboxed</strong>. The whole engine is completely sandboxed. A
+ template designer won't be able to modify application data or execute
+ dangerous code.</li>
+ <li><strong>Python expressions</strong>. You can use nearly every python
+ expression. Not supported are the binary operators and list comprehensions /
+ generator expressions.</li>
+ <li><strong>Inheritance</strong>. Jinja uses the same concept for inheritance
+ Django uses. It's very powerful and easy to understand.</li>
+ <li><strong>Macros</strong>. Jinja provides so called macros that allow you to
+ put often used template snippets into callable blocks:
+<div class="syntax"><pre><span class="cp">{%</span> <span class="k">macro</span> <span class="nv">dialog</span> <span class="nv">title</span><span class="o">,</span> <span class="nv">text</span> <span class="cp">%}</span>
+ <span class="nt"><div</span> <span class="na">class=</span><span class="s">"dialog"</span><span class="nt">></span>
+ <span class="nt"><h2</span> <span class="na">class=</span><span class="s">"title"</span><span class="nt">></span><span class="cp">{{</span> <span class="nv">title</span> <span class="cp">}}</span><span class="nt"></h2></span>
+ <span class="nt"><div</span> <span class="na">class=</span><span class="s">"text"</span><span class="nt">></span><span class="cp">{{</span> <span class="nv">text</span> <span class="cp">}}</span><span class="nt"></div></span>
+ <span class="nt"></div></span>
+<span class="cp">{%</span> <span class="k">endmacro</span> <span class="cp">%}</span>
+</pre></div>
+You can then use this block by calling it:
+<div class="syntax"><pre><span class="cp">{{</span> <span class="nv">dialog</span><span class="o">(</span><span class="s1">'Notification'</span><span class="o">,</span> <span class="s1">'Here the text for the macro.'</span><span class="o">)</span> <span class="cp">}}</span>
+</pre></div>
+</li>
+ <li><strong>Designer friendly</strong>. Jinja simplifies many things for a
+ template designer. Loops can be used in a recursive way, filters are
+ available to format values, loops know about their iteration etc.</li>
+ <li><strong>Dynamic Syntax</strong>. You don't like the Django block syntax?
+ You can override the syntax elements on environment initialisation. It's
+ no problem to use ASP/PHP/Ruby syntax, html comments for blocks etc.</li>
+ </ul>
+ </div>
+ <p id="meta">
+ <a href="./index.tmpl">show template source</a>
+ </p>
+ </div>
+ <div id="footer">
+ © Copyright 2007 by the Pocoo Team.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<% extends 'layout/base.tmpl' %>
+<% block title %>Index<% endblock %>
+<% block content %>
+ <h1>Jinja Templates</h1>
+ <p>
+ Jinja is a
+ <a href="http://en.wikipedia.org/wiki/Sandbox_%28computer_security%29">sandboxed</a>
+ template engine written in pure <a href="http://www.python.org/">Python</a>. It
+ provides a <a href="http://www.djangoproject.com/">Django</a>-like non-XML syntax
+ and compiles templates into executable python code. It's basically a combination
+ of Django templates and python code.
+ </p>
+ <h2>Nutshell</h2>
+ <% filter pygmentize('html+jinja') %>
+{% extends 'base.html' %}
+{% block title %}Memberlist{% endblock %}
+{% block content %}
+ <ul>
+ {% for user in users %}
+ <li><a href="{{ user.url|e }}">{{ user.username|e }}</a></li>
+ {% endfor %}
+ </ul>
+{% endblock %}
+<% endfilter %>
+ <h2>Philosphy</h2>
+ <p>
+ Application logic is for the controller but don't try to make the live for the
+ template designer too hard by giving him too less functionality.
+ </p>
+ <h2>Features</h2>
+ <ul>
+ <li><strong>Simple API</strong>. For basic usage just one function is needed:
+<% filter pygmentize('python') %>
+from jinja import from_string
+print from_string('Hello {{ data }}!').render(data='World')
+<% endfilter %></li>
+ <li><strong>Sandboxed</strong>. The whole engine is completely sandboxed. A
+ template designer won't be able to modify application data or execute
+ dangerous code.</li>
+ <li><strong>Python expressions</strong>. You can use nearly every python
+ expression. Not supported are the binary operators and list comprehensions /
+ generator expressions.</li>
+ <li><strong>Inheritance</strong>. Jinja uses the same concept for inheritance
+ Django uses. It's very powerful and easy to understand.</li>
+ <li><strong>Macros</strong>. Jinja provides so called macros that allow you to
+ put often used template snippets into callable blocks:
+<% filter pygmentize('html+jinja') %>
+{% macro dialog title, text %}
+ <div class="dialog">
+ <h2 class="title">{{ title }}</h2>
+ <div class="text">{{ text }}</div>
+ </div>
+{% endmacro %}
+<% endfilter %>You can then use this block by calling it:
+<% filter pygmentize('html+jinja') %>
+{{ dialog('Notification', 'Here the text for the macro.') }}
+<% endfilter %></li>
+ <li><strong>Designer friendly</strong>. Jinja simplifies many things for a
+ template designer. Loops can be used in a recursive way, filters are
+ available to format values, loops know about their iteration etc.</li>
+ <li><strong>Dynamic Syntax</strong>. You don't like the Django block syntax?
+ You can override the syntax elements on environment initialisation. It's
+ no problem to use ASP/PHP/Ruby syntax, html comments for blocks etc.</li>
+ </ul>
+<% endblock %>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Untitled | Jinja Template Engine</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="./../static/style.css" type="text/css" />
+ <link rel="stylesheet" href="./../static/print.css" type="text/css" media="print" />
+ <link rel="stylesheet" href="./../static/pygments.css" type="text/css" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>Jinja</h1>
+ </div>
+ <ul id="navigation">
+ <li><a href="./../index.html">Index</a></li>
+ <li><a href="./../faq.html">FAQ</a></li>
+ <li><a href="./../documentation.html">Documentation</a></li>
+ <li><a href="./../download.html">Download</a></li>
+ </ul>
+ <div id="content">
+ <div id="contentwrapper">
+ </div>
+ <p id="meta">
+ <a href="./../layout/base.tmpl">show template source</a>
+ </p>
+ </div>
+ <div id="footer">
+ © Copyright 2007 by the Pocoo Team.
+ </div>
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<% set navigation = [
+ ('index', 'Index'),
+ ('faq', 'FAQ'),
+ ('documentation', 'Documentation'),
+ ('download', 'Download')
+] %>
+<% block code %><% endblock %>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title><% block title %>Untitled<% endblock %> | Jinja Template Engine</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link rel="stylesheet" href="<%= root %>static/style.css" type="text/css" />
+ <link rel="stylesheet" href="<%= root %>static/print.css" type="text/css" media="print" />
+ <link rel="stylesheet" href="<%= root %>static/pygments.css" type="text/css" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>Jinja</h1>
+ </div>
+ <ul id="navigation">
+ <% for id, caption in navigation %>
+ <% if id == file_id or id.startswith(file_id + '/') %>
+ <li class="active"><%= caption|escape %></li>
+ <% else %>
+ <li><a href="<%= root %><%= id|escape %>.html"><%= caption|escape %></a></li>
+ <% endif %>
+ <% endfor %>
+ </ul>
+ <% if trace %>
+ <div id="trace">
+ <% for href, caption in trace %>
+ <% if loop.last %>
+ <%= caption %>
+ <% else %>
+ <a href="<%= href|escape %>"><%= caption %></a> »
+ <% endif %>
+ <% endfor %>
+ </div>
+ <% endif %>
+ <div id="content">
+ <div id="contentwrapper">
+ <% block content %><% endblock %>
+ </div>
+ <p id="meta">
+ <a href="<%= root + file_id + '.tmpl' %>">show template source</a>
+ </p>
+ </div>
+ <div id="footer">
+ © Copyright 2007 by the Pocoo Team.
+ </div>
+ </body>
+</html>
--- /dev/null
+.syntax { background: #ffffff; }
+.syntax .c { color: #888888 } /* Comment */
+.syntax .err { color: #a61717; background-color: #e3d2d2 } /* Error */
+.syntax .k { color: #008800; font-weight: bold } /* Keyword */
+.syntax .cm { color: #888888 } /* Comment.Multiline */
+.syntax .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
+.syntax .c1 { color: #888888 } /* Comment.Single */
+.syntax .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
+.syntax .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
+.syntax .ge { font-style: italic } /* Generic.Emph */
+.syntax .gr { color: #aa0000 } /* Generic.Error */
+.syntax .gh { color: #999999 } /* Generic.Heading */
+.syntax .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
+.syntax .go { color: #888888 } /* Generic.Output */
+.syntax .gp { color: #555555 } /* Generic.Prompt */
+.syntax .gs { font-weight: bold } /* Generic.Strong */
+.syntax .gu { color: #aaaaaa } /* Generic.Subheading */
+.syntax .gt { color: #aa0000 } /* Generic.Traceback */
+.syntax .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
+.syntax .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
+.syntax .kp { color: #008800 } /* Keyword.Pseudo */
+.syntax .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
+.syntax .kt { color: #888888; font-weight: bold } /* Keyword.Type */
+.syntax .m { color: #0000DD; font-weight: bold } /* Literal.Number */
+.syntax .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
+.syntax .na { color: #336699 } /* Name.Attribute */
+.syntax .nb { color: #003388 } /* Name.Builtin */
+.syntax .nc { color: #bb0066; font-weight: bold } /* Name.Class */
+.syntax .no { color: #003366; font-weight: bold } /* Name.Constant */
+.syntax .nd { color: #555555 } /* Name.Decorator */
+.syntax .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
+.syntax .nf { color: #0066bb; font-weight: bold } /* Name.Function */
+.syntax .nl { color: #336699; font-style: italic } /* Name.Label */
+.syntax .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
+.syntax .py { color: #336699; font-weight: bold } /* Name.Property */
+.syntax .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
+.syntax .nv { color: #336699 } /* Name.Variable */
+.syntax .ow { color: #008800 } /* Operator.Word */
+.syntax .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
+.syntax .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
+.syntax .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
+.syntax .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
+.syntax .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
+.syntax .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
+.syntax .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
+.syntax .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
+.syntax .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
+.syntax .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
+.syntax .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
+.syntax .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
+.syntax .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
+.syntax .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
+.syntax .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
+.syntax .bp { color: #003388 } /* Name.Builtin.Pseudo */
+.syntax .vc { color: #336699 } /* Name.Variable.Class */
+.syntax .vg { color: #dd7700 } /* Name.Variable.Global */
+.syntax .vi { color: #3333bb } /* Name.Variable.Instance */
+.syntax .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
\ No newline at end of file
--- /dev/null
+/**
+ * Jinja Webpage Design
+ */
+
+body {
+ background-color: #333;
+ margin: 0;
+ padding: 0;
+ font-family: 'Georgia', serif;
+ font-size: 15px;
+ color: #111;
+}
+
+p, li, dd, dt, blockquote {
+ color: #333;
+}
+
+p {
+ line-height: 150%;
+ margin-bottom: 0;
+ margin-top: 10px;
+ text-align: justify;
+}
+
+hr {
+ border-top: 1px solid #ccc;
+ border-bottom: 0;
+ border-right: 0;
+ border-left: 0;
+ margin-bottom: 10px;
+ margin-top: 20px;
+}
+
+a {
+ color: #b41717;
+}
+
+a:hover {
+ color: #444;
+}
+
+pre {
+ background-color: #f9f9f9;
+ border-top: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
+ padding: 5px;
+ font-size: 13px;
+ font-family: 'Bitstream Vera Sans Mono', 'Monaco', monospace;
+}
+
+#content {
+ background-color: white;
+ background-image: url(watermark.png);
+ padding: 10px;
+ margin: 25px 25px 0 25px;
+ border: 4px solid #ddd;
+ border-bottom: none;
+}
+
+#footer {
+ margin: 0 25px 25px 25px;
+ border-bottom: 4px solid #ddd;
+ background-color: #fff;
+ text-align: right;
+ padding: 0 10px 5px 0;
+}
+
+#contentwrapper {
+ max-width: 700px;
+ padding: 0 10px 0 20px;
+}
+
+#header {
+ height: 80px;
+ background-color: #eee;
+ background-image: url(jinjabanner.png);
+ background-repeat: no-repeat;
+ border-bottom: 4px solid #ccc;
+}
+
+#header h1 {
+ display: none
+}
+
+#navigation {
+ background-color: #fff;
+ border: 1px solid #ccc;
+ border-right: none;
+ margin: 50px 29px 10px 10px;
+ padding: 0;
+ float: right;
+ list-style: none;
+ font-weight: bold;
+}
+
+#navigation li a {
+ display: block;
+ text-decoration: none;
+ padding: 5px 10px 5px 10px;
+ color: #333;
+}
+
+#navigation li a:hover {
+ color: #fff;
+ background-color: #444;
+}
+
+#navigation li.active {
+ padding: 5px 10px 5px 10px;
+ background-color: #b41717;
+ color: white;
+}
+
+#navigation li a:focus {
+ outline: none;
+ background-color: #222;
+ color: #fff;
+}
+
+#contentwrapper h1 {
+ color: #b41717;
+ font-size: 26px;
+ margin: 20px 0 0 -5px;
+}
+
+#contentwrapper h2 {
+ color: #444;
+ font-size: 20px;
+ margin: 20px 0 0 0;
+}
+
+#meta {
+ clear: both;
+ text-align: right;
+ color: #888;
+ font-size: 13px;
+}