merge of '1a34056fb56eb0137f1af62390d46777c654d595'

and '3839e4fc9bc916530272f4b3bb0fecfd4bdf7865'
This commit is contained in:
mathiasdm
2010-03-23 14:09:38 +00:00
2 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,8 @@ import os
from time import time
from random import randint
domain = "http://www.i2p2.de"
class Request(BaseRequest):
"""Useful subclass of the default request that knows how to build urls."""
@ -54,7 +56,7 @@ def app(environ, start_response):
tmpl = env.get_template(path + '.html')
except TemplateNotFound:
tmpl = env.get_template('not_found.html')
resp = Response(tmpl.render(static=False, theme=theme), mimetype=mime_type)
resp = Response(tmpl.render(static=False, theme=theme, domain=domain, path=path), mimetype=mime_type)
# more theme handling
if theme == 'light' and 'style' in req.cookies:
resp.delete_cookie('style')

View File

@ -5,6 +5,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>{% filter capture('title') %}{% block title %}{% endblock %}{% endfilter %} - I2P</title>
<link rel="canonical" href="{{ domain }}/{{ path }}">
<link rel="stylesheet" href="_static/styles/{{ theme }}.css" type="text/css" title="{{ theme }}">
<link rel="shortcut icon" href="_static/favicon.ico" />
<link type="application/atom+xml" rel="alternate" href="http://code.google.com/feeds/p/i2p/downloads/basic">