Skip to content
Myr

[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

7 files+34 added−65 removed

modified:jinja/parser.py+3 added-2 removed
581 unmodified lines
582 # 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 lines
deleted:www/layout/base.html-29 removed
modified: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 lines
18 <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> &raquo;35 <% endif %>36 <% endfor %>37 </div>38 <% endif %>27 <div id="content">28 <div id="contentwrapper">29 <% block content %><% endblock %>30 </div>
6 unmodified lines
modified:www/static/style.css+3 added-2 removed
38 unmodified lines
39 color: #444;40}4142pre {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 lines
144 border-bottom: 4px solid #ccc;145}146147#header h1 {147 display: none148 display: none;149}150151#navigation {152 background-color: #fff;
56 unmodified lines
deleted: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 lines
51 <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 lines
65 <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 first
6 unmodified lines
80 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 lines
12from pygments import highlight13from pygments.lexers import get_lexer_by_name14from pygments.formatters import HtmlFormatter151617_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