[svn] again some changes on the webpage
Before adoption: this commit came in with the history the project adopted, so no landing records it.
--HG-- branch : trunk
authored by Armin Ronacher · committed by Armin Ronacher · parent 6ec1b7e · Browse files · 7 files·+34 added−65 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
7 files+34 added−65 removed
- other:+34 added−65 removed
Provenance
- Commit
1560b62- Tree
fa0ae9d- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent
6ec1b7e
7 files changed+34 added−65 removed
modified:jinja/parser.py+3 added-2 removed
581 unmodified lines582 # template syntax error.583 if data in self.directives:584 node = self.directives[data](lineno, gen)585 else:586- raise TemplateSyntaxError('unknown directive %r' % data,587- lineno, self.filename)586+ raise TemplateSyntaxError('unknown directive %r' %587+ str(data), lineno,588+ self.filename)589 # some tags like the extends tag do not output nodes.590 # so just skip that.591 if node is not None:592 result.append(node)34 unmodified linesdeleted:www/layout/base.html-29 removed
1234567891011121314151617181920212223242526272829<!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> </div> <div id="footer"> © Copyright 2007 by the Pocoo Team. </div> </body></html>No newline at end of filemodified:www/layout/base.tmpl+6 added-18 removed
1 <% set navigation = [2- ('index', 'Index'),3- ('faq', 'FAQ'),4- ('documentation', 'Documentation'),5- ('download', 'Download')2+ ('index.html', 'index', 'Index'),3+ ('faq.html', 'faq', 'FAQ'),4+ ('documentation/index.html', 'documentation', 'Documentation'),5+ ('download.html', 'download', 'Download')6 ] %>7 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Frameset//EN"8 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">9 <html xmlns="http://www.w3.org/1999/xhtml">8 unmodified lines18 <div id="header">19 <h1>Jinja</h1>20 </div>21 <ul id="navigation">22- <% for id, caption in navigation %>22+ <% for href, id, caption in navigation %>23 <li<% if id == active_page %> class="active"<% endif24- %>><a href="<%= root %><%= id|escape %>.html"><%= caption|escape25- %></a></li>24+ %>><a href="<%= (root + href)|escape %>"><%= caption|escape %></a></li>25 <% endfor %>26 </ul>28- <% if trace %>29- <div id="trace">30- <% for href, caption in trace %>31- <% if loop.last %>32- <%= caption %>33- <% else %>34- <a href="<%= href|escape %>"><%= caption %></a> »35- <% endif %>36- <% endfor %>37- </div>38- <% endif %>27 <div id="content">28 <div id="contentwrapper">29 <% block content %><% endblock %>30 </div>6 unmodified linesmodified:www/static/style.css+3 added-2 removed
38 unmodified lines39 color: #444;40 }41 42 pre {43- background-color: #f9f9f9;43+ background-color: #f8f8f8;44+ color: #000;45 border-top: 1px solid #ccc;46 border-bottom: 1px solid #ccc;47 padding: 5px;48 font-size: 13px;95 unmodified lines144 border-bottom: 4px solid #ccc;145 }146 147 #header h1 {147- display: none148+ display: none;149 }150 151 #navigation {152 background-color: #fff;56 unmodified linesdeleted:www/documentation.tmpl-12 removed
1-<% extends 'layout/base.tmpl' %>2-<% set title = 'Documentation' %>3-<% set active_page = 'documentation' %>4-<% block content %>5- <h1>Documentation</h1>6- <p>7- Currently Jinja 1 in still under heavy development and we have neither8- released a final version nor do we provide a documentation you can download.9- However you can browse the documentation of the current SVN version online:10- </p>11- <p><a href="./documentation/index.html">browse online documentation</a></p>12-<% endblock %>modified:www/faq.tmpl+21 added-2 removed
50 unmodified lines51 <p>Features that Jinja has in common with Django</p>52 <ul>53 <li>filter functions</li>54 <li>block based template inheritance</li>55- <li>the <tt>{% cycle %}</tt> and <tt>{% filter %}</li> tag</li>55+ <li>the <tt>{% cycle %}</tt> and <tt>{% filter %}</tt> tag</li>56 <li>being sandboxed</li>57 <li>similar default syntax</li>58 </ul>59 <p>Differences to Django</p>5 unmodified lines65 <li>raw blocks</li>66 <li>uncoupled internationalization support</li>67 <li>expression support in any tag</li>68 <li>abbility of modifying the context from the template69- by using the <tt>{% set %}</li> tag.</li>69+ by using the <tt>{% set %}</tt> tag.</li>70 <li>support for function calling with arguments</li>71 <li>filters can be called with a variable argument count</li>72 <li>full unicode support</li>73 <li>deferred objects (objects that are resolved on first6 unmodified lines80 there was no iteration.</li>81 <li>test functions like <tt>is even</tt> etc.</li>82 <li>block delimiters are exchangeable.</il>83 <li>no implicit function calling</li>84+ <li><tt>{% endblock %}</tt> doesn't support the optional name argument</li>85+ <li><tt>{% ifchanged %}</tt> is not implemented because of performance86+ reasons. If there's enough interest an implementation might be added</li>87+ <li><tt>{% templatetag %}</tt> is not implemented because Jinja supports88+ escaping via <tt>{% raw %}</tt> or the variable syntax</li>89+ <li><tt>{% comment %}</tt> is not implemented, rather use90+ <tt>{# ... #}</tt> for commenting out stuff.</li>91+ <li><tt>{% now %}</tt> is not implemented because Jinja doesn't handle92+ l10n. Datetime specific stuff should be provided by the application.</li>93+ <li><tt>{% load %}</tt>, loading components for Jinja works from the94+ application side. Template designers don't have to import stuff on95+ their own.</li>96+ <li><tt>{% debug %}</tt> is not implemented. You can use the global97+ function <tt>debug()</tt>.</li>98+ <li>custom tags are not supported. Most of the stuff that is99+ possible with django template tags is possible with either functions,100+ filters, tests or a combination of them.</li>101+ <li>using keywords like <tt>endfor</tt> as identifer raises an102+ exception.</li>103 </ul>104 <% endblock %>modified:www/generate.py+1 added
11 unmodified lines12 from pygments import highlight13 from pygments.lexers import get_lexer_by_name14 from pygments.formatters import HtmlFormatter15 16+17 _data_re = re.compile(18 r'<!-- TITLE -->(?P<page_title>.*?)<!-- ENDTITLE -->.*?'19 r'<!-- TOC -->(?P<page_toc>.*?)<!-- ENDTOC -->.*?'20 r'<!-- BODY -->(?P<page_body>.*?)<!-- ENDBODY -->(?sm)'67 unmodified lines