From b91999507e662cbcce6c7968647d8cbac54fbcb5 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 23 May 2015 12:36:52 +1200 Subject: Move websitelayout to website. --- doc-src/index.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc-src/index.py') diff --git a/doc-src/index.py b/doc-src/index.py index 52b9c31a..b049e3ce 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -15,10 +15,9 @@ 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("_layout.html") ns.title = countershape.template.Template(None, "

@!this.title!@

") this.titlePrefix = "%s - " % version.NAMEVERSION -- cgit v1.2.3 From 0a812656617be313c6648918f9b4c52a2ddb59c4 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 24 May 2015 13:16:49 +1200 Subject: docs: adjust for countershape changes --- doc-src/index.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'doc-src/index.py') diff --git a/doc-src/index.py b/doc-src/index.py index b049e3ce..4fefc866 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( @@ -17,7 +17,8 @@ if ns.options.website: ns.idxpath = "doc/index.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, "

@!this.title!@

") this.titlePrefix = "%s - " % version.NAMEVERSION @@ -51,7 +52,7 @@ def nav(page, current, state): else: pre = "
  • " p = state.application.getPage(page) - return pre + '%s
  • '%(model.UrlTo(page), p.title) + return pre + '%s'%(countershape.widgets.UrlTo(page), p.title) ns.nav = nav ns.navbar = countershape.template.File(None, "_nav.html") -- cgit v1.2.3 From a05a70d8168a07c92b2a3ecbbb1958d85532efe3 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 30 May 2015 12:03:28 +1200 Subject: Add coding style check, reformat. --- doc-src/index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc-src/index.py') diff --git a/doc-src/index.py b/doc-src/index.py index 4fefc866..2ae9fafe 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -37,7 +37,7 @@ def mpath(p): def example(s): d = file(mpath(s)).read().rstrip() extemp = """
    %s
    (%s)
    """ - 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 = "
  • " p = state.application.getPage(page) - return pre + '%s
  • '%(countershape.widgets.UrlTo(page), p.title) + return pre + \ + '%s' % (countershape.widgets.UrlTo(page), p.title) ns.nav = nav ns.navbar = countershape.template.File(None, "_nav.html") -- cgit v1.2.3