Corrected the TOC ids to classes, updated the CSS accordingly

This commit is contained in:
Ed Ward 2017-04-19 11:12:09 +02:00 committed by Len Ovens
parent 146de9657e
commit b818a4a213
2 changed files with 13 additions and 13 deletions

View File

@ -444,13 +444,13 @@ for header in fileStruct:
if level == 0:
toc = toc + '<h2>Part ' + num2roman(levelNums[level]) + ': ' + header['title'] + '</h2>\n';
elif level == 1:
toc = toc + ' <p id=chapter>Ch. ' + str(levelNums[level]) + ':&nbsp;&nbsp;<a href="/' + header['filename'] + '/">' + header['title'] + '</a></p>\n'
toc = toc + ' <p class="chapter">Ch. ' + str(levelNums[level]) + ':&nbsp;&nbsp;<a href="/' + header['filename'] + '/">' + header['title'] + '</a></p>\n'
elif level == 2:
toc = toc + ' <a id=subchapter href="/' + header['filename'] + '/">' + header['title'] + '</a><br>\n'
toc = toc + ' <p class="subchapter"><a href="/' + header['filename'] + '/">' + header['title'] + '</a></p>\n'
elif level == 3:
toc = toc + ' <a id=section href="/' + header['filename'] + '/">' + header['title'] + '</a><br>\n'
toc = toc + ' <p class="section"><a href="/' + header['filename'] + '/">' + header['title'] + '</a></p>\n'
elif level == 4:
toc = toc + ' <a id=subsection href="/' + header['filename'] + '/">' + header['title'] + '</a><br>\n'
toc = toc + ' <p class="subsection"><a href="/' + header['filename'] + '/">' + header['title'] + '</a></p>\n'
# Make the 'this thing contains...' stuff
if HaveChildren(fileStruct, pageNumber):

View File

@ -579,16 +579,16 @@ samp:after {
}
/* for the TOC */
#chapter,
#subchapter,
#section,
#subsection {
line-height:1.5em;
#content p.chapter,
#content p.subchapter,
#content p.section,
#content p.subsection {
line-height:1em;
}
#chapter { padding-top: 1em; padding-left: 1em; }
#subchapter { padding-left: 4em; }
#section { padding-left: 6em; }
#subsection { padding-left: 8em; }
#content p.chapter { padding-top: 1em; padding-left: 1em; padding-bottom:1em; }
#content p.subchapter { padding-left: 4em; }
#content p.section { padding-left: 6em; }
#content p.subsection { padding-left: 8em; }
/* for images sliced in divs, as in http://manual.ardour.org/ardours-interface/about/ */
.container { position: relative; border: none; }