Fix little glitches that the layout change has introduced

This commit is contained in:
Philipp Möller 2012-10-18 12:48:48 +00:00
parent d18c87c820
commit 967cc9b616
5 changed files with 37 additions and 26 deletions

View File

@ -173,7 +173,10 @@ div.groupText {
}
#doc-content {
/* this is the header/footer padding */
/* so the content does not hide behind them */
padding-top: 91px;
padding-bottom: 32px;
overflow: visible;
}
@ -192,3 +195,12 @@ div.groupText {
padding-top: 91px;
margin-top: -91px;
}
#doc-content .anchor {
padding-top: 91px;
margin-top: -91px;
}
#MSearchResultsWindow {
z-index: 2;
}

View File

@ -21,7 +21,7 @@ def conceptify_nested_classes(d):
def conceptify(d):
# fix the title
title = d(".title")
title.html(re.sub("Class Reference", "Concept Reference", title.html()))
title.html(re.sub("Class( Template)? Reference", "Concept Reference", title.html()))
# remove the include
include_statement = d(".contents").children().eq(0)
# should check that this is really the div we think it is
@ -30,7 +30,7 @@ def conceptify(d):
conceptify_nested_classes(d)
def write_out_html(d, fn):
f = open(fn, 'w')
f = open(fn, 'w', encoding='utf-8')
# this is the normal doxygen doctype, which is thrown away by pyquery
f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n')
print(d, file=f)
@ -40,7 +40,10 @@ def write_out_html(d, fn):
def clean_doc():
duplicate_files=glob.glob('./output/CGAL.CGAL.*/html/jquery.js')
duplicate_files.extend(glob.glob('./output/CGAL.CGAL.*/html/dynsections.js'))
duplicate_files.extend(glob.glob('./output/CGAL.CGAL.*/html/resize.js'))
duplicate_files.extend(glob.glob('./output/CGAL.CGAL.*/html/stylesheet.css'))
# kill _all_, including the one in CGAL.CGAL tabs.css files
duplicate_files.extend(glob.glob('./output/CGAL.CGAL*/html/tabs.css'))
# left-over by doxygen?
duplicate_files.extend(glob.glob('./output/CGAL.CGAL.*/bib2xhtml.pl'))
duplicate_files.extend(glob.glob('./output/CGAL.CGAL.*/cgal_manual.bib'))
@ -54,14 +57,14 @@ def clean_doc():
# from http://stackoverflow.com/a/1597755/105672
def re_replace_in_file(pat, s_after, fname):
# first, see if the pattern is even in the file.
with open(fname) as f:
with open(fname, encoding='utf-8') as f:
if not any(re.search(pat, line) for line in f):
return # pattern does not occur in file so we are done.
# pattern is in the file, so perform replace operation.
with open(fname) as f:
with open(fname, encoding='utf-8') as f:
out_fname = fname + ".tmp"
out = open(out_fname, "w")
out = open(out_fname, "w", encoding='utf-8')
for line in f:
out.write(re.sub(pat, s_after, line))
out.close()

View File

@ -1,6 +1,6 @@
function generate_autotoc() {
var toc = $("#autotoc").append('<ul></ul>');
if(toc) {
if(toc.length > 1) { // an autotoc has been requested
toc = toc.find('ul');
$("h1, h2, h3").each(function(i) {
var current = $(this);
@ -8,6 +8,7 @@ function generate_autotoc() {
var cur_id = current.attr("id");
if(cur_id == undefined) {
current.attr('id', 'title' + i);
current.addClass('anchor');
toc.append("<li class='level" + levelTag + "'><a id='link" + i + "' href='#title" +
i + "' title='" + current.prop("tagName") + "'>" + current.text() + "</a></li>");
} else {
@ -18,24 +19,6 @@ function generate_autotoc() {
}
}
// hack around a bug in resize.js. The original resizeHeight is not
// considering margins or borders when calculating the div heights. Our
// ready hook is run after the original resize. We fixup the footer
// variable and then do our thing.
function fix_resize() {
footer = $("#footer");
resizeHeight = function() {
var headerHeight = header.outerHeight(true);
var footerHeight = footer.outerHeight(true);
var windowHeight = $(window).outerHeight(true) - headerHeight - footerHeight;
content.css({height:windowHeight + "px"});
navtree.css({height:windowHeight + "px"});
sidenav.css({height:windowHeight + "px",top: headerHeight+"px"});
}
$(window).resize(resizeHeight);
$(window).resize();
}
// throw a stick at the modules array and hijack gotoNode
// for our own evil purposes
$(document).ready(function() {
@ -65,7 +48,6 @@ $(document).ready(function() {
$("#doc-content").append('<ol id="autoFootnotes0" class="footnotesList"></ol>');
$("body").footnotes();
generate_autotoc();
// fix_resize();
});

View File

@ -21,6 +21,13 @@
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
resizeHeight = function() {
var headerHeight = header.height();
var footerHeight = footer.height();
var windowHeight = $(window).height() - headerHeight - footerHeight;
navtree.css({height:windowHeight + "px"});
sidenav.css({height:windowHeight + "px",top: headerHeight+"px"});
}
$(document).ready(initResizable);
</script>
$search

View File

@ -10,9 +10,16 @@
<link href="$relpath$../../CGAL.CGAL/html/cgal_stylesheet.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="$relpath$../../CGAL.CGAL/html/jquery.js"></script>
<script type="text/javascript" src="$relpath$../../CGAL.CGAL/html/dynsections.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="$relpath$../../CGAL.CGAL/html/resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
resizeHeight = function() {
var headerHeight = header.height();
var footerHeight = footer.height();
var windowHeight = $(window).height() - headerHeight - footerHeight;
navtree.css({height:windowHeight + "px"});
sidenav.css({height:windowHeight + "px",top: headerHeight+"px"});
}
$(document).ready(initResizable);
</script>
$search