91 |
s = "" |
s = "" |
92 |
for el in tree.files: |
for el in tree.files: |
93 |
if el[0].endswith('index.html'): continue |
if el[0].endswith('index.html'): continue |
94 |
s += '%s<a href="%s">%s</a><br>\n' % \ |
s += '<li class="boxitem"><a href="%s">%s</a></li>\n' % \ |
95 |
(indent, el[0][len(_slashify(config.working_directory)):len(el[0])], el[1]) |
(el[0][len(_slashify(config.working_directory)):len(el[0])], el[1]) |
96 |
if len(el) > 2: |
if len(el) > 2: |
97 |
s += simpleNavbar(el[2], indent+" ") |
s += simpleNavbar(el[2], indent+" ") |
98 |
return s |
return s |
100 |
def insertNavbars(tree, bar=None, single_file=None): |
def insertNavbars(tree, bar=None, single_file=None): |
101 |
if bar is None: |
if bar is None: |
102 |
bar = '<hr class="footer"/>' |
bar = '<hr class="footer"/>' |
103 |
|
bar += '<center class="navigation-title">Navigation</center>\n' |
104 |
bar += '<div class="left-bar">\n' |
bar += '<div class="left-bar">\n' |
105 |
bar += ('<h3 class="boxhead"><a href="./">%s' |
bar += ('<p class="boxhead"><a href="./">%s' |
106 |
'</a></h3>\n') % tree.name |
'</a></p>\n') % tree.name |
107 |
bar += '<p class="boxcontent">\n' |
bar += '<p class="boxcontent"><ul>\n' |
108 |
bar += simpleNavbar(tree) |
bar += simpleNavbar(tree) |
109 |
bar += '</p></div>\n' |
bar += '</ul></p></div>\n' |
110 |
|
|
111 |
if single_file: |
if single_file: |
112 |
file = open(el[0]); s = file.read(); file.close() |
file = open(el[0]); s = file.read(); file.close() |