diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-05-31 01:51:31 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-05-31 01:51:31 +0200 |
commit | ec92fca8c030fe5971a034a658033f70965b990a (patch) | |
tree | ef9a2049eeab539d13e1f9662fd51220ab4ee817 /doc-src/index.py | |
parent | 0f8e8ee1ad667c8d747d5876f9b630ecbc01d7e9 (diff) | |
parent | a05a70d8168a07c92b2a3ecbbb1958d85532efe3 (diff) | |
download | mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.tar.gz mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.tar.bz2 mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.zip |
Merge branch 'master' of github.com:mitmproxy/mitmproxy
Diffstat (limited to 'doc-src/index.py')
-rw-r--r-- | doc-src/index.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/doc-src/index.py b/doc-src/index.py index 52b9c31a..2ae9fafe 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -2,7 +2,7 @@ import os import sys import datetime import countershape -from countershape import Page, Directory, markup, model +from countershape import Page, Directory, markup import countershape.template MITMPROXY_SRC = os.path.abspath( @@ -15,10 +15,10 @@ ns.VERSION = version.VERSION if ns.options.website: ns.idxpath = "doc/index.html" - this.layout = countershape.Layout("_websitelayout.html") else: ns.idxpath = "index.html" - this.layout = countershape.Layout("_layout.html") + +this.layout = countershape.layout.FileLayout("_layout.html") ns.title = countershape.template.Template(None, "<h1>@!this.title!@</h1>") this.titlePrefix = "%s - " % version.NAMEVERSION @@ -37,7 +37,7 @@ def mpath(p): def example(s): d = file(mpath(s)).read().rstrip() extemp = """<div class="example">%s<div class="example_legend">(%s)</div></div>""" - return extemp%(countershape.template.Syntax("py")(d), s) + return extemp % (countershape.template.Syntax("py")(d), s) ns.example = example @@ -52,7 +52,8 @@ def nav(page, current, state): else: pre = "<li>" p = state.application.getPage(page) - return pre + '<a href="%s">%s</a></li>'%(model.UrlTo(page), p.title) + return pre + \ + '<a href="%s">%s</a></li>' % (countershape.widgets.UrlTo(page), p.title) ns.nav = nav ns.navbar = countershape.template.File(None, "_nav.html") |