X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=build.py;h=376204959f810b72d7c5bfe126233c36b2346e01;hb=95ba1c292ae93b762486b8d1ae9983bae97ff168;hp=dbe5448e56bdf85a8b9c42ddd07a9a3e586e59ec;hpb=649aea9ef93c962db54eef8b210c7a7ba8ecad74;p=ardour-manual
diff --git a/build.py b/build.py
index dbe5448..3762049 100755
--- a/build.py
+++ b/build.py
@@ -312,15 +312,15 @@ def FixInternalLinks(links, content, title):
# looking at currently
#
def BuildList(lst, fs, pagePos, cList):
- content = '\n\n
\n'
+ content = '\n\n\n'
for i in range(len(lst)):
curPos = lst[i]
- nextPos = lst[i + 1] if i + 1 < len(lst) else len(fs)
+ nextPos = lst[i + 1] if i + 1 < len(lst) else len(fs)
active = ' class=active' if curPos == pagePos else ''
menuTitle = fs[curPos]['menu_title'] if 'menu_title' in fs[curPos] else fs[curPos]['title']
- content = content + '- ' + menuTitle + '
- '
+ content = content + '
- ' + menuTitle + '
'
# If the current page is our page, and it has children, enumerate them
if curPos == pagePos:
@@ -332,9 +332,7 @@ def BuildList(lst, fs, pagePos, cList):
elif (pagePos > curPos) and (pagePos < nextPos):
content = content + BuildList(cList[curPos], fs, pagePos, cList)
- content = content + ' \n'
-
- content = content + '
\n'
+ content = content + '\n\n'
return content
@@ -398,10 +396,10 @@ def BuildOnePageSidebar(fs):
def CreateLinkSidebar(fs, pos, childList):
# Build the list recursively from the top level nodes
- #content = BuildList(FindTopLevelNodes(fs), fs, pos, childList)
content = BuildList(FindTopLevelNodes(fs), fs, pos, childList)
# Shove the TOC link and one file link at the top...
- content = content[:7] + 'Table of Contents\n' + content[7:]
+ active = ' class=active' if pos<0 else ''
+ content = content.replace('