From 6f1fa30bc6bc0081917dbabe7da34c2a7ee9ea61 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 1 Jan 2013 15:30:02 +1300 Subject: [PATCH] Docs: make nav sidebar work --- doc-src/_layout.html | 56 ++++++++++++++++++++++---------------------- doc-src/index.py | 15 +++++++++--- 2 files changed, 40 insertions(+), 31 deletions(-) diff --git a/doc-src/_layout.html b/doc-src/_layout.html index 1ea11bf2f..ecc107363 100644 --- a/doc-src/_layout.html +++ b/doc-src/_layout.html @@ -19,42 +19,42 @@ diff --git a/doc-src/index.py b/doc-src/index.py index 2c4aa992e..5b6fcc5ee 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -1,6 +1,6 @@ import os, sys import countershape -from countershape import Page, Directory, PythonModule, markup +from countershape import Page, Directory, PythonModule, markup, model import countershape.template sys.path.insert(0, "..") from libmproxy import filt @@ -64,6 +64,15 @@ filt_help.extend( ns.filt_help = filt_help +def nav(page, current, state): + if current.match(page, False): + pre = '
  • ' + else: + pre = "
  • " + p = state.application.getPage(page) + return pre + '%s
  • '%(model.UrlTo(page), p.title) +ns.nav = nav + pages = [ Page("index.html", "docs"), @@ -79,8 +88,8 @@ pages = [ Page("reverseproxy.html", "Reverse proxy mode"), Page("anticache.html", "Anticache"), Page("filters.html", "Filter expressions"), - Page("ssl.html", "Setting up SSL interception"), - Page("transparent.html", "Transparent Proxying"), + Page("ssl.html", "SSL Overview"), + Page("transparent.html", "Transparent Overview"), Directory("certinstall"), Directory("scripting"), Directory("tutorials"),