aboutsummaryrefslogtreecommitdiffstats
path: root/doc-src/index.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc-src/index.py')
-rw-r--r--doc-src/index.py11
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")