From 12a6d876e3ff0004e288f1c7fadb10d0431bfc24 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 8 May 2021 16:36:12 +0200 Subject: Optimized the layout in case DISABLE_INDEX=YES and GENERATE_TREEVIEW=YES - also illustrated the various layouts in the customization section of the manual to make choosing easier. --- doc/CMakeLists.txt | 4 ++++ doc/customize.doc | 12 +++++++++++ doc/layout_index_and_notreeview.png | Bin 0 -> 10472 bytes doc/layout_index_and_treeview.png | Bin 0 -> 13347 bytes doc/layout_noindex_and_notreeview.png | Bin 0 -> 8831 bytes doc/layout_noindex_and_treeview.png | Bin 0 -> 11914 bytes doc/starting.doc | 38 +++++++++++++++------------------- src/htmlgen.cpp | 11 ++++++++-- templates/html/doxygen.css | 4 ++-- templates/html/header.html | 18 +++++++++------- templates/html/navtree.css | 1 + templates/html/navtree.js | 9 +++++--- templates/html/resize.js | 18 ++++++++++++---- templates/html/search.js | 2 ++ templates/html/search_nomenu.css | 9 ++------ 15 files changed, 80 insertions(+), 46 deletions(-) create mode 100644 doc/layout_index_and_notreeview.png create mode 100644 doc/layout_index_and_treeview.png create mode 100644 doc/layout_noindex_and_notreeview.png create mode 100644 doc/layout_noindex_and_treeview.png diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f7f680f..7dbe120 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -82,6 +82,10 @@ set(DOC_FILES infoflow.fig infoflow.png install.doc + layout_index_and_notreeview.png + layout_index_and_treeview.png + layout_noindex_and_notreeview.png + layout_noindex_and_treeview.png lists.doc markdown.doc output.doc diff --git a/doc/customize.doc b/doc/customize.doc index eebeb5c..c95c4c2 100644 --- a/doc/customize.doc +++ b/doc/customize.doc @@ -52,16 +52,25 @@ corresponding with the following settings: - \ref cfg_disable_index "DISABLE_INDEX" = \c NO - \ref cfg_generate_treeview "GENERATE_TREEVIEW" = \c NO +\image html layout_index_and_notreeview.png +\image latex layout_index_and_notreeview.png width=8cm + you can switch to an interactive navigation tree as sidebar using - \ref cfg_disable_index "DISABLE_INDEX" = \c YES - \ref cfg_generate_treeview "GENERATE_TREEVIEW" = \c YES +\image html layout_noindex_and_treeview.png +\image latex layout_noindex_and_treeview.png width=8cm + or even have both forms of navigation: - \ref cfg_disable_index "DISABLE_INDEX" = \c NO - \ref cfg_generate_treeview "GENERATE_TREEVIEW" = \c YES +\image html layout_index_and_treeview.png +\image latex layout_index_and_treeview.png width=8cm + if you already use an external index (i.e. have one of the following options enabled \ref cfg_generate_htmlhelp "GENERATE_HTMLHELP", @@ -73,6 +82,9 @@ then you can also disable all indices, like so: - \ref cfg_disable_index "DISABLE_INDEX" = \c YES - \ref cfg_generate_treeview "GENERATE_TREEVIEW" = \c NO +\image html layout_noindex_and_notreeview.png +\image latex layout_noindex_and_notreeview.png width=8cm + \subsection minor_tweaks_dynsection Dynamic Content To make the HTML output more interactive, doxygen provides a number of options diff --git a/doc/layout_index_and_notreeview.png b/doc/layout_index_and_notreeview.png new file mode 100644 index 0000000..8fecd41 Binary files /dev/null and b/doc/layout_index_and_notreeview.png differ diff --git a/doc/layout_index_and_treeview.png b/doc/layout_index_and_treeview.png new file mode 100644 index 0000000..3a652fb Binary files /dev/null and b/doc/layout_index_and_treeview.png differ diff --git a/doc/layout_noindex_and_notreeview.png b/doc/layout_noindex_and_notreeview.png new file mode 100644 index 0000000..72c39a5 Binary files /dev/null and b/doc/layout_noindex_and_notreeview.png differ diff --git a/doc/layout_noindex_and_treeview.png b/doc/layout_noindex_and_treeview.png new file mode 100644 index 0000000..f0cd225 Binary files /dev/null and b/doc/layout_noindex_and_treeview.png differ diff --git a/doc/starting.doc b/doc/starting.doc index 44f2a92..7e5b404 100644 --- a/doc/starting.doc +++ b/doc/starting.doc @@ -109,27 +109,23 @@ using the following table: Extension | Language | Extension | Language | Extension | Language ---------:|--------- | ---------:|------------- | ---------:|--------- -.dox |C / C++ | .idl |IDL | .f |Fortran -.doc |C / C++ | .ddl |IDL | .for |Fortran -.c |C / C++ | .odl |IDL | .f90 |Fortran -.cc |C / C++ | .java |Java | .f95 |Fortran -.cxx |C / C++ | .cs |C# | .f03 |Fortran -.cpp |C / C++ | .d |D | .f08 |Fortran -.c++ |C / C++ | .php |PHP | .f18 |Fortran -.ii |C / C++ | .php4 |PHP | .vhd |VHDL -.ixx |C / C++ | .php5 |PHP | .vhdl |VHDL -.ipp |C / C++ | .inc |PHP | .ucf |VHDL -.i++ |C / C++ | .phtml |PHP | .qsf |VHDL -.inl |C / C++ | .m |Objective-C | .l |Lex -.h |C / C++ | .M |Objective-C | .md |Markdown -.H |C / C++ | .py |Python | .markdown |Markdown -.hh |C / C++ | .pyw |Python | .ice |Slice -.HH |C / C++ | | | | | -.hxx |C / C++ | | | | | -.hpp |C / C++ | | | | | -.h++ |C / C++ | | | | | -.mm |C / C++ | | | | | -.txt |C / C++ | | | | | +.dox |C / C++ | .hpp |C / C++ |.py |Python +.doc |C / C++ | .h++ |C / C++ |.pyw |Python +.c |C / C++ | .mm |C / C++ |.f |Fortran +.cc |C / C++ | .txt |C / C++ |.for |Fortran +.cxx |C / C++ | .idl |IDL |.f90 |Fortran +.cpp |C / C++ | .ddl |IDL |.f95 |Fortran +.c++ |C / C++ | .odl |IDL |.f03 |Fortran +.ii |C / C++ | .java |Java |.f08 |Fortran +.ixx |C / C++ | .cs |C# |.f18 |Fortran +.ipp |C / C++ | .d |D |.vhd |VHDL +.i++ |C / C++ | .php |PHP |.vhdl |VHDL +.inl |C / C++ | .php4 |PHP |.ucf |VHDL +.h |C / C++ | .php5 |PHP |.qsf |VHDL +.H |C / C++ | .inc |PHP |.l |Lex +.hh |C / C++ | .phtml |PHP |.md |Markdown +.HH |C / C++ | .m |Objective-C |.markdown |Markdown +.hxx |C / C++ | .M |Objective-C |.ice |Slice Please note that the above list might contain more items than that by default set in the \ref cfg_file_patterns "FILE_PATTERNS". diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index ea20707..c15b205 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -385,6 +385,9 @@ static QCString substituteHtmlKeywords(const QCString &str, if (treeView) { treeViewCssJs = "\n" + "\n" "\n" "\n" "\n"; @@ -2556,8 +2559,12 @@ QCString HtmlGenerator::writeSplitBarAsString(const QCString &name,const QCStrin // write split bar if (generateTreeView) { - result = QCString( - "
\n" + if (!Config_getBool(DISABLE_INDEX)) + { + result += QCString( + "
\n"); + } + result+= QCString( "
\n" "
\n" "
\n" diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css index 29dafbe..b54be20 100644 --- a/templates/html/doxygen.css +++ b/templates/html/doxygen.css @@ -1347,14 +1347,14 @@ dl.section dd { #projectname { - font: 300% Tahoma, Arial,sans-serif; + font: 200% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { - font: 120% Tahoma, Arial,sans-serif; + font: 90% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } diff --git a/templates/html/header.html b/templates/html/header.html index 9527936..7c5d14c 100644 --- a/templates/html/header.html +++ b/templates/html/header.html @@ -17,6 +17,11 @@ $mathjax $extrastylesheet + + +
+ +
@@ -29,8 +34,7 @@ $extrastylesheet -
$projectname -  $projectnumber +
$projectname $projectnumber
$projectbrief
@@ -42,13 +46,13 @@ $extrastylesheet - - - $searchbox - - + + + $searchbox + +
diff --git a/templates/html/navtree.css b/templates/html/navtree.css index 81c54c2..585ecad 100644 --- a/templates/html/navtree.css +++ b/templates/html/navtree.css @@ -87,6 +87,7 @@ position: absolute; left: 0px; width: $width; + overflow : hidden; } .ui-resizable .ui-resizable-handle { diff --git a/templates/html/navtree.js b/templates/html/navtree.js index 1e272d3..254169f 100644 --- a/templates/html/navtree.js +++ b/templates/html/navtree.js @@ -325,11 +325,14 @@ function selectAndHighlight(hash,n) $(n.itemDiv).addClass('selected'); $(n.itemDiv).attr('id','selected'); } + var topOffset=5; + if (page_layout==1) { + topOffset+=$('#top').outerHeight(); + } if ($('#nav-tree-contents .item:first').hasClass('selected')) { - $('#nav-sync').css('top','30px'); - } else { - $('#nav-sync').css('top','5px'); + topOffset+=25; } + $('#nav-sync').css('top',topOffset+'px'); showRoot(); } diff --git a/templates/html/resize.js b/templates/html/resize.js index e1ad0fe..699d15c 100644 --- a/templates/html/resize.js +++ b/templates/html/resize.js @@ -75,10 +75,20 @@ function initResizable() { var headerHeight = header.outerHeight(); var footerHeight = footer.outerHeight(); - var windowHeight = $(window).height() - headerHeight - footerHeight; - content.css({height:windowHeight + "px"}); - navtree.css({height:windowHeight + "px"}); - sidenav.css({height:windowHeight + "px"}); + var windowHeight = $(window).height(); + var contentHeight,navtreeHeight,sideNavHeight; + if (page_layout==0) { /* DISABLE_INDEX=NO */ + contentHeight = windowHeight - headerHeight - footerHeight; + navtreeHeight = contentHeight; + sideNavHeight = contentHeight; + } else if (page_layout==1) { /* DISABLE_INDEX=YES */ + contentHeight = windowHeight - footerHeight; + navtreeHeight = windowHeight - headerHeight; + sideNavHeight = windowHeight; + } + content.css({height:contentHeight + "px"}); + navtree.css({height:navtreeHeight + "px"}); + sidenav.css({height:sideNavHeight + "px"}); var width=$(window).width(); if (width!=collapsedWidth) { if (width=desktop_vp) { diff --git a/templates/html/search.js b/templates/html/search.js index fb226f7..54ad133 100644 --- a/templates/html/search.js +++ b/templates/html/search.js @@ -146,6 +146,7 @@ function SearchBox(name, resultsPath, inFrame, label, extension) // show search selection popup searchSelectWindow.style.display='block'; left -= searchSelectWindow.offsetWidth; + if (left<10) left=10; searchSelectWindow.style.left = left + 'px'; searchSelectWindow.style.top = top + 'px'; } @@ -383,6 +384,7 @@ function SearchBox(name, resultsPath, inFrame, label, extension) var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; domPopupSearchResultsWindow.style.display = 'block'; left -= domPopupSearchResults.offsetWidth; + if (left<10) left=10; domPopupSearchResultsWindow.style.top = top + 'px'; domPopupSearchResultsWindow.style.left = left + 'px'; } diff --git a/templates/html/search_nomenu.css b/templates/html/search_nomenu.css index bb50b44..c7efd64 100644 --- a/templates/html/search_nomenu.css +++ b/templates/html/search_nomenu.css @@ -8,12 +8,8 @@ white-space : nowrap; float: none; margin-top: 0px; - right: 0px; - width: 170px; + width: 161px; height: 24px; - z-index: 102; - display: inline; - position: absolute; } #MSearchBox .left @@ -64,8 +60,7 @@ #MSearchBox .right { display:block; position:absolute; - right:10px; - top:0px; + left:141px; width:20px; height:19px; background:url('search_r.png') no-repeat; -- cgit v0.12