diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-05-24 13:16:49 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-05-24 13:16:49 +1200 |
commit | 0a812656617be313c6648918f9b4c52a2ddb59c4 (patch) | |
tree | e895bbd8ddec9f7011ff5132138e9d0a85b5ab9f /doc-src | |
parent | b91999507e662cbcce6c7968647d8cbac54fbcb5 (diff) | |
download | mitmproxy-0a812656617be313c6648918f9b4c52a2ddb59c4.tar.gz mitmproxy-0a812656617be313c6648918f9b4c52a2ddb59c4.tar.bz2 mitmproxy-0a812656617be313c6648918f9b4c52a2ddb59c4.zip |
docs: adjust for countershape changes
Diffstat (limited to 'doc-src')
-rw-r--r-- | doc-src/_layout.html | 88 | ||||
-rw-r--r-- | doc-src/index.py | 7 |
2 files changed, 52 insertions, 43 deletions
diff --git a/doc-src/_layout.html b/doc-src/_layout.html index 0a12e25e..221da466 100644 --- a/doc-src/_layout.html +++ b/doc-src/_layout.html @@ -1,46 +1,54 @@ - -<div class="nav navbar-default navbar-static-top"> - <div class="container"> - <div class="navbar-header"> - <button type="button" - class="navbar-toggle collapsed" - data-toggle="collapse" - data-target="#bs-example-navbar-collapse-1" - > - <span class="sr-only">Toggle navigation</span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - <a class="navbar-brand" href="@!urlTo("/index.html")!@"> - <img height="20px" src="@!urlTo("mitmproxy-long.png")!@"/> - </a> - </div> - <div class="navbar-header navbar-right"> - <a class="navbar-brand" hre="#">$!VERSION!$ docs</a> +<!DOCTYPE html> +<html> + <head> + <title>@!pageTitle!@</title> + $!header!$ + </head> + <body> + <div class="nav navbar-default navbar-static-top"> + <div class="container"> + <div class="navbar-header"> + <button type="button" + class="navbar-toggle collapsed" + data-toggle="collapse" + data-target="#bs-example-navbar-collapse-1" + > + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="@!urlTo("/index.html")!@"> + <img height="20px" src="@!urlTo("mitmproxy-long.png")!@"/> + </a> + </div> + <div class="navbar-header navbar-right"> + <a class="navbar-brand" hre="#">$!VERSION!$ docs</a> + </div> + </div> </div> - </div> -</div> -<div class="container"> - <div class="row"> - <div class="col-md-3"> - $!navbar!$ - </div> - <div class="col-md-9"> - <div class="page-header"> - <h1>@!this.title!@</h1> + <div class="container"> + <div class="row"> + <div class="col-md-3"> + $!navbar!$ + </div> + <div class="col-md-9"> + <div class="page-header"> + <h1>@!this.title!@</h1> + </div> + $!body!$ + </div> + </div> </div> - $!body!$ - </div> - </div> -</div> -<div class="container"> - <hr> + <div class="container"> + <hr> - <footer> - <p>@!copyright!@</p> - </footer> -</div> + <footer> + <p>@!copyright!@</p> + </footer> + </div> + </body> +</html> 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, "<h1>@!this.title!@</h1>") this.titlePrefix = "%s - " % version.NAMEVERSION @@ -51,7 +52,7 @@ 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") |