From 29afde24608ec16caa288e95c495706c23b0b9af Mon Sep 17 00:00:00 2001 From: Zachary Croker Date: Thu, 20 Sep 2018 10:21:29 +1000 Subject: [PATCH] Updating boostrap version, replacing .load with .on('load',...) and updating README for clearer integration --- .gitignore | 2 + README.md | 46 ++-- customdoxygen.css | 306 ++++++++++++------------ doxy-boot.js | 490 +++++++++++++++++++-------------------- example-site/Doxyfile | 2 +- example-site/README.md | 20 -- example-site/header.html | 23 +- 7 files changed, 445 insertions(+), 444 deletions(-) create mode 100644 .gitignore delete mode 100644 example-site/README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..264eac5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Ignore autogenerated files from doxygen +example-site/Docs diff --git a/README.md b/README.md index 6a62b31..81b81c4 100644 --- a/README.md +++ b/README.md @@ -8,36 +8,42 @@ Customize doxygen (v1.8.9) output to use the twitter bootstrap framework (v3.3.1 This started as work done by CoActionOS and was extended further here. [Credit](http://coactionos.com/embedded%20design%20tips/2014/01/07/Tips-Integrating-Doxygen-and-Bootstrap/) -# Customizing Doxygen -Doxygen provides a handful of ways to [customize the output](http://www.stack.nl/~dimitri/doxygen/manual/customize.html). The simplest way is to customize the HTML output. - -Doxygen allows you to customize the HTML output by modifying a master HTML header, footer and stylesheet. You can then include additional stylesheets and javascript files. The following command will generate the default Doxygen files. - -`doxygen -w html header.html footer.html customdoxygen.css` +## Example project -Modifying these files alone is not enough to get good Twitter Bootstrap integration. Bootstrap requires that certain classes be applied within the HTML. For example, a Bootstrap “table” needs to have a class called “table” in order to apply the Bootstrap table formatting. We just need to augment the default HTML with these Bootstrap classes. To do this, we use the provided doxy-boot.js javascript file. +This is a minimal working example to get you started. It can be run by executing `doxygen` from the `example-site` directory. The documentation for this minimal example will be generated in Docs/html. -Also, you can augment doxygen’s default stylesheet with a customdoxygen.css stylesheet. This is where you would place any custom styling such as sticky footers. +## How to integrate with your own Doxygen project -# How to Integrate +This example uses `footer.html` and `header.html` from the `example-site` directory. The following options must be set in your Doxyfile. -To integrate this into your own project tell your doxyfile to use these 4 files in the HTML section (see the example site for an example of each file): - -* HTML_HEADER=header.html +* HTML_HEADER=../rel/path/to/header.html * Adds a Bootstrap navbar * Wraps the content in a Bootstrap container/row -* HTML_FOOTER=footer.html +* HTML_FOOTER=../rel/path/to/footer.html * Closes the extra divs opened in the header.html -* HTML\_EXTRA_STYLESHEET=customdoxygen.css - * Adds additional styling such as a sticky footer -* HTML\_EXTRA_FILES=doxy-boot.js +* HTML\_EXTRA_STYLESHEET=../rel/path/to/customdoxygen.css + * Adds additional styling such as a sticky footer +* HTML\_EXTRA_FILES=../rel/path/to/doxy-boot.js * Where the magic happens to augment the HTML with bootstrap +* HTML_DYNAMIC_MENUS = NO +* GENERATE_TREEVIEW = NO + * Without these two options as NO, the menu looks weird or does not display at all, and makes the whole page really buggy +* GENERATE_HTML = YES -NOTE: The header.html file needs to include the Bootstrap css/javascript for this to work. This is where you can specify your own bootstrap compilation. These files will need to be manually added to the html directory, added as additional files in the doxyfile HTML\_EXTRA_FILES section or referenced externally (see example site header.html). +This will copy the header.html, footer.html, doxy-boot.js and the custom_doxygen.css files to the html output directory. See below for further customisation -NOTE: If you want to use the customdoxygen.css stylesheet from this repository, then you will need to replace the customdoxygen.css style sheet generated by the doxygen command above. If your customdoxygen.css file is in the directory when you run the doxygen command, it will be moved to customdoxygen.css.bak and you can restore it by overwriting the new version with the backup. +# Customizing Doxygen +Doxygen provides a handful of ways to [customize the output](http://www.stack.nl/~dimitri/doxygen/manual/customize.html). The simplest way is to customize the HTML output. + +Doxygen allows you to customize the HTML output by modifying a master HTML header, footer and stylesheet. You can then include additional stylesheets and javascript files. The following command will generate the default Doxygen files. + +`doxygen -w html header.html footer.html customdoxygen.css` + +Modifying these files alone is not enough to get good Twitter Bootstrap integration. Bootstrap requires that certain classes be applied within the HTML. For example, a Bootstrap “table” needs to have a class called “table” in order to apply the Bootstrap table formatting. We just need to augment the default HTML with these Bootstrap classes. To do this, we use the provided doxy-boot.js javascript file. + +Also, you can augment doxygen’s default stylesheet with a customdoxygen.css stylesheet. This is where you would place any custom styling such as sticky footers. -See the example-site directory for a minimal working example. +NOTE: Your header.html file needs to include the Bootstrap css/javascript for this to work. This is where you can specify your own bootstrap compilation. These files will need to appear in the html directory. This can be done manually, or added as additional files for HTML_EXTRA_FILES or using a hyperlink (see example-site header.html). ## Todo List -* Menu is not correctly displayed when Doxygen sidebar is enabled. + * Menu is not correctly displayed when Doxygen sidebar is enabled. diff --git a/customdoxygen.css b/customdoxygen.css index c20bd11..b8b083e 100644 --- a/customdoxygen.css +++ b/customdoxygen.css @@ -1,9 +1,9 @@ h1, .h1, h2, .h2, h3, .h3{ - font-weight: 200 !important; + font-weight: 200 !important; } #navrow1, #navrow2, #navrow3, #navrow4, #navrow5{ - border-bottom: 1px solid #EEEEEE; + border-bottom: 1px solid #EEEEEE; } .adjust-right { @@ -11,88 +11,88 @@ margin-left: 30px !important; font-size: 1.15em !important; } .navbar{ - border: 0px solid #222 !important; +border: 0px solid #222 !important; } table{ - white-space:pre-wrap !important; + white-space:pre-wrap !important; } /* - =========================== - */ +=========================== +*/ /* Sticky footer styles -------------------------------------------------- */ html, body { - height: 100%; - /* The html and body elements cannot have any padding or margin. */ + height: 100%; + /* The html and body elements cannot have any padding or margin. */ } /* Wrapper for page content to push down footer */ #wrap { - min-height: 100%; - height: auto; - /* Negative indent footer by its height */ - margin: 0 auto -60px; - /* Pad bottom by footer height */ - padding: 0 0 60px; + min-height: 100%; + height: auto; + /* Negative indent footer by its height */ + margin: 0 auto -60px; + /* Pad bottom by footer height */ + padding: 0 0 60px; } /* Set the fixed height of the footer here */ #footer { - font-size: 0.9em; - padding: 8px 0px; - background-color: #f5f5f5; + font-size: 0.9em; + padding: 8px 0px; + background-color: #f5f5f5; } .footer-row { - line-height: 44px; + line-height: 44px; } #footer > .container { - padding-left: 15px; - padding-right: 15px; + padding-left: 15px; + padding-right: 15px; } .footer-follow-icon { - margin-left: 3px; - text-decoration: none !important; + margin-left: 3px; + text-decoration: none !important; } .footer-follow-icon img { - width: 20px; + width: 20px; } .footer-link { - padding-top: 5px; - display: inline-block; - color: #999999; - text-decoration: none; + padding-top: 5px; + display: inline-block; + color: #999999; + text-decoration: none; } .footer-copyright { - text-align: center; + text-align: center; } @media (min-width: 992px) { - .footer-row { - text-align: left; - } + .footer-row { + text-align: left; + } - .footer-icons { - text-align: right; - } + .footer-icons { + text-align: right; + } } @media (max-width: 991px) { - .footer-row { - text-align: center; - } + .footer-row { + text-align: center; + } - .footer-icons { - text-align: center; - } + .footer-icons { + text-align: center; + } } /* DOXYGEN Code Styles @@ -100,271 +100,271 @@ body { a.qindex { - font-weight: bold; + font-weight: bold; } a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; } .contents a.qindexHL:visited { - color: #ffffff; + color: #ffffff; } a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; + color: #4665A2; } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; + color: #4665A2; } /* @end */ dl.el { - margin-left: -1cm; + margin-left: -1cm; } pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; - font-family: monospace, fixed; - font-size: 105%; + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; } div.fragment { - padding: 4px 6px; - margin: 4px 8px 4px 2px; - border: 1px solid #C4CFE5; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + border: 1px solid #C4CFE5; } div.line { - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 12px; - min-height: 13px; - line-height: 1.0; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: normal; /* IE 5.5+ */ - text-indent: -53px; - padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 12px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: normal; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; } div.line:hover{ - background-color: #FBFF00; + background-color: #FBFF00; } div.line.glow { - background-color: cyan; - box-shadow: 0 0 10px cyan; + background-color: cyan; + box-shadow: 0 0 10px cyan; } span.lineno { - padding-right: 4px; - text-align: right; - color:rgba(0,0,0,0.3); - border-right: 1px solid #EEE; - border-left: 1px solid #EEE; - background-color: #FFF; - white-space: pre; - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace ; + padding-right: 4px; + text-align: right; + color:rgba(0,0,0,0.3); + border-right: 1px solid #EEE; + border-left: 1px solid #EEE; + background-color: #FFF; + white-space: pre; + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace ; } span.lineno a { - background-color: #FAFAFA; - cursor:pointer; + background-color: #FAFAFA; + cursor:pointer; } span.lineno a:hover { - background-color: #EFE200; - color: #1e1e1e; + background-color: #EFE200; + color: #1e1e1e; } div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; + margin-left: 16px; + margin-top: 12px; + font-weight: bold; } div.groupText { - margin-left: 16px; - font-style: italic; + margin-left: 16px; + font-style: italic; } /* @group Code Colorization */ span.keyword { - color: #008000 + color: #008000 } span.keywordtype { - color: #604020 + color: #604020 } span.keywordflow { - color: #e08000 + color: #e08000 } span.comment { - color: #800000 + color: #800000 } span.preprocessor { - color: #806020 + color: #806020 } span.stringliteral { - color: #002080 + color: #002080 } span.charliteral { - color: #008080 + color: #008080 } span.vhdldigit { - color: #ff00ff + color: #ff00ff } span.vhdlchar { - color: #000000 + color: #000000 } span.vhdlkeyword { - color: #700070 + color: #700070 } span.vhdllogic { - color: #ff0000 + color: #ff0000 } blockquote { - background-color: #F7F8FB; - border-left: 2px solid #9CAFD4; - margin: 0 24px 0 4px; - padding: 0 12px 0 16px; + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; } /*---------------- Search Box */ #search-box { - margin: 10px 0px; +margin: 10px 0px; } #search-box .close { - display: none; - position: absolute; - right: 0px; - padding: 6px 12px; - z-index: 5; +display: none; +position: absolute; +right: 0px; +padding: 6px 12px; +z-index: 5; } /*---------------- Search results window */ #search-results-window { - display: none; +display: none; } iframe#MSearchResults { - width: 100%; - height: 15em; +width: 100%; +height: 15em; } .SRChildren { - padding-left: 3ex; padding-bottom: .5em +padding-left: 3ex; padding-bottom: .5em } .SRPage .SRChildren { - display: none; +display: none; } a.SRScope { - display: block; +display: block; } a.SRSymbol:focus, a.SRSymbol:active, a.SRScope:focus, a.SRScope:active { - text-decoration: underline; +text-decoration: underline; } span.SRScope { - padding-left: 4px; +padding-left: 4px; } .SRResult { - display: none; +display: none; } /* class and file list */ .directory .icona, .directory .arrow { - height: auto; +height: auto; } .directory .icona .icon { - height: 16px; +height: 16px; } .directory .icondoc { - background-position: 0px 0px; - height: 20px; +background-position: 0px 0px; +height: 20px; } .directory .iconfopen { - background-position: 0px 0px; +background-position: 0px 0px; } .directory td.entry { - padding: 7px 8px 6px 8px; +padding: 7px 8px 6px 8px; } .table > tbody > tr > td.memSeparator { - line-height: 0; - .table-hover; +line-height: 0; +.table-hover; } .memItemLeft, .memTemplItemLeft { - white-space: normal; +white-space: normal; } /* enumerations */ .panel-body thead > tr { - background-color: #e0e0e0; +background-color: #e0e0e0; } /* todo lists */ .todoname, .todoname a { - font-weight: bold; +font-weight: bold; } /* Class title */ .summary { - margin-top: 25px; +margin-top: 25px; } .page-header { - margin: 20px 0px !important; +margin: 20px 0px !important; } .page-header .title { - display: inline-block; +display: inline-block; } .page-header .pull-right { - margin-top: 0.3em; - margin-left: 0.5em; +margin-top: 0.3em; +margin-left: 0.5em; } .page-header .label { - font-size: 50%; +font-size: 50%; } diff --git a/doxy-boot.js b/doxy-boot.js index ac0b41f..1faaa5c 100644 --- a/doxy-boot.js +++ b/doxy-boot.js @@ -1,271 +1,271 @@ $( document ).ready(function() { - $("div.headertitle").addClass("page-header"); - $("div.title").addClass("h1"); - - $('li > a[href="index.html"] > span').before(" "); - $('li > a[href="modules.html"] > span').before(" "); - $('li > a[href="namespaces.html"] > span').before(" "); - $('li > a[href="annotated.html"] > span').before(" "); - $('li > a[href="classes.html"] > span').before(" "); - $('li > a[href="inherits.html"] > span').before(" "); - $('li > a[href="functions.html"] > span').before(" "); - $('li > a[href="functions_func.html"] > span').before(" "); - $('li > a[href="functions_vars.html"] > span').before(" "); - $('li > a[href="functions_enum.html"] > span').before(" "); - $('li > a[href="functions_eval.html"] > span').before(" "); - $('img[src="ftv2ns.png"]').replaceWith('N '); - $('img[src="ftv2cl.png"]').replaceWith('C '); - - $("ul.tablist").addClass("nav nav-pills nav-justified"); - $("ul.tablist").css("margin-top", "0.5em"); - $("ul.tablist").css("margin-bottom", "0.5em"); - $("li.current").addClass("active"); - $("iframe").attr("scrolling", "yes"); - - $("#nav-path > ul").addClass("breadcrumb"); - - $("table.params").addClass("table"); - $("div.ingroups").wrapInner(""); - $("div.levels").css("margin", "0.5em"); - $("div.levels > span").addClass("btn btn-default btn-xs"); - $("div.levels > span").css("margin-right", "0.25em"); - - $("table.directory").addClass("table table-striped"); - $("div.summary > a").addClass("btn btn-default btn-xs"); - $("table.fieldtable").addClass("table"); - $(".fragment").addClass("well"); - $(".memitem").addClass("panel panel-default"); - $(".memproto").addClass("panel-heading"); - $(".memdoc").addClass("panel-body"); - $("span.mlabel").addClass("label label-info"); - - $("table.memberdecls").addClass("table"); - $("[class^=memitem]").addClass("active"); - - $("div.ah").addClass("btn btn-default"); - $("span.mlabels").addClass("pull-right"); - $("table.mlabels").css("width", "100%") - $("td.mlabels-right").addClass("pull-right"); - - $("div.ttc").addClass("panel panel-primary"); - $("div.ttname").addClass("panel-heading"); - $("div.ttname a").css("color", 'white'); - $("div.ttdef,div.ttdoc,div.ttdeci").addClass("panel-body"); - - $('div.fragment.well div.line:first').css('margin-top', '2px'); - $('div.fragment.well div.line:last').css('margin-bottom', '2px'); - - $('table.doxtable').removeClass('doxtable').addClass('table table-striped table-bordered').each(function(){ - $(this).prepend(''); - $(this).find('tbody > tr:first').prependTo($(this).find('thead')); - - $(this).find('td > span.success').parent().addClass('success'); - $(this).find('td > span.warning').parent().addClass('warning'); - $(this).find('td > span.danger').parent().addClass('danger'); - }); - - - - if($('div.fragment.well div.ttc').length > 0) - { - $('div.fragment.well div.line:first').parent().removeClass('fragment well'); - } + $("div.headertitle").addClass("page-header"); + $("div.title").addClass("h1"); + + $('li > a[href="index.html"] > span').before(" "); + $('li > a[href="modules.html"] > span').before(" "); + $('li > a[href="namespaces.html"] > span').before(" "); + $('li > a[href="annotated.html"] > span').before(" "); + $('li > a[href="classes.html"] > span').before(" "); + $('li > a[href="inherits.html"] > span').before(" "); + $('li > a[href="functions.html"] > span').before(" "); + $('li > a[href="functions_func.html"] > span').before(" "); + $('li > a[href="functions_vars.html"] > span').before(" "); + $('li > a[href="functions_enum.html"] > span').before(" "); + $('li > a[href="functions_eval.html"] > span').before(" "); + $('img[src="ftv2ns.png"]').replaceWith('N '); + $('img[src="ftv2cl.png"]').replaceWith('C '); + + $("ul.tablist").addClass("nav nav-pills nav-justified"); + $("ul.tablist").css("margin-top", "0.5em"); + $("ul.tablist").css("margin-bottom", "0.5em"); + $("li.current").addClass("active"); + $("iframe").attr("scrolling", "yes"); + + $("#nav-path > ul").addClass("breadcrumb"); + + $("table.params").addClass("table"); + $("div.ingroups").wrapInner(""); + $("div.levels").css("margin", "0.5em"); + $("div.levels > span").addClass("btn btn-default btn-xs"); + $("div.levels > span").css("margin-right", "0.25em"); + + $("table.directory").addClass("table table-striped"); + $("div.summary > a").addClass("btn btn-default btn-xs"); + $("table.fieldtable").addClass("table"); + $(".fragment").addClass("well"); + $(".memitem").addClass("panel panel-default"); + $(".memproto").addClass("panel-heading"); + $(".memdoc").addClass("panel-body"); + $("span.mlabel").addClass("label label-info"); + + $("table.memberdecls").addClass("table"); + $("[class^=memitem]").addClass("active"); + + $("div.ah").addClass("btn btn-default"); + $("span.mlabels").addClass("pull-right"); + $("table.mlabels").css("width", "100%") + $("td.mlabels-right").addClass("pull-right"); + + $("div.ttc").addClass("panel panel-primary"); + $("div.ttname").addClass("panel-heading"); + $("div.ttname a").css("color", 'white'); + $("div.ttdef,div.ttdoc,div.ttdeci").addClass("panel-body"); + + $('div.fragment.well div.line:first').css('margin-top', '2px'); + $('div.fragment.well div.line:last').css('margin-bottom', '2px'); + +$('table.doxtable').removeClass('doxtable').addClass('table table-striped table-bordered').each(function(){ + $(this).prepend(''); + $(this).find('tbody > tr:first').prependTo($(this).find('thead')); + + $(this).find('td > span.success').parent().addClass('success'); + $(this).find('td > span.warning').parent().addClass('warning'); + $(this).find('td > span.danger').parent().addClass('danger'); +}); - $('table.memberdecls').find('.memItemRight').each(function(){ - $(this).contents().appendTo($(this).siblings('.memItemLeft')); - $(this).siblings('.memItemLeft').attr('align', 'left'); - }); - $('table.memberdecls').find('.memTemplItemRight').each(function(){ - $(this).contents().appendTo($(this).siblings('.memTemplItemLeft')); - $(this).siblings('.memTemplItemLeft').attr('align', 'left'); - }); - function getOriginalWidthOfImg(img_element) { - var t = new Image(); - t.src = (img_element.getAttribute ? img_element.getAttribute("src") : false) || img_element.src; - return t.width; - } + if($('div.fragment.well div.ttc').length > 0) + { + $('div.fragment.well div.line:first').parent().removeClass('fragment well'); + } - $('div.dyncontent').find('img').each(function(){ - if(getOriginalWidthOfImg($(this)[0]) > $('#content>div.container').width()) - $(this).css('width', '100%'); - }); + $('table.memberdecls').find('.memItemRight').each(function(){ + $(this).contents().appendTo($(this).siblings('.memItemLeft')); + $(this).siblings('.memItemLeft').attr('align', 'left'); + }); + $('table.memberdecls').find('.memTemplItemRight').each(function(){ + $(this).contents().appendTo($(this).siblings('.memTemplItemLeft')); + $(this).siblings('.memTemplItemLeft').attr('align', 'left'); + }); - /* responsive search box */ - $('#MSearchBox').parent().remove(); +function getOriginalWidthOfImg(img_element) { + var t = new Image(); + t.src = (img_element.getAttribute ? img_element.getAttribute("src") : false) || img_element.src; + return t.width; +} - var nav_container = $('
'); - $('#navrow1').parent().prepend(nav_container); +$('div.dyncontent').find('img').each(function(){ + if(getOriginalWidthOfImg($(this)[0]) > $('#content>div.container').width()) + $(this).css('width', '100%'); +}); - var left_nav = $('
'); - for (i = 0; i < 6; i++) { - var navrow = $('#navrow' + i + ' > ul.tablist').detach(); - left_nav.append(navrow); - $('#navrow' + i).remove(); - } - var right_nav = $('
').append('\ - '); - $(nav_container).append(left_nav); - $(nav_container).append(right_nav); - - $('#MSearchSelectWindow .SelectionMark').remove(); - var search_selectors = $('#MSearchSelectWindow .SelectItem'); - for (var i = 0; i < search_selectors.length; i += 1) { - var element_a = $('').text($(search_selectors[i]).text()); - - element_a.click(function(){ - $('#search-box .dropdown-menu li').removeClass('active'); - $(this).parent().addClass('active'); - searchBox.OnSelectItem($('#search-box li a').index(this)); - searchBox.Search(); - return false; - }); - - var element = $('
  • ').append(element_a); - $('#search-box .dropdown-menu').append(element); - } - $('#MSearchSelectWindow').remove(); - $('#search-box .close').click(function (){ - searchBox.CloseResultsWindow(); +/* responsive search box */ +$('#MSearchBox').parent().remove(); + +var nav_container = $('
    '); +$('#navrow1').parent().prepend(nav_container); + +var left_nav = $('
    '); +for (i = 0; i < 6; i++) { + var navrow = $('#navrow' + i + ' > ul.tablist').detach(); + left_nav.append(navrow); + $('#navrow' + i).remove(); +} +var right_nav = $('
    ').append('\ + '); +$(nav_container).append(left_nav); +$(nav_container).append(right_nav); + +$('#MSearchSelectWindow .SelectionMark').remove(); +var search_selectors = $('#MSearchSelectWindow .SelectItem'); +for (var i = 0; i < search_selectors.length; i += 1) { + var element_a = $('').text($(search_selectors[i]).text()); + + element_a.click(function(){ + $('#search-box .dropdown-menu li').removeClass('active'); + $(this).parent().addClass('active'); + searchBox.OnSelectItem($('#search-box li a').index(this)); + searchBox.Search(); + return false; }); - $('body').append('
    '); - $('body').append('
    '); - $('body').append('
    '); + var element = $('
  • ').append(element_a); + $('#search-box .dropdown-menu').append(element); +} +$('#MSearchSelectWindow').remove(); - searchBox.searchLabel = ''; - searchBox.DOMSearchField = function() { - return document.getElementById("search-field"); - } - searchBox.DOMSearchClose = function(){ - return document.getElementById("search-close"); - } - - - /* search results */ - var results_iframe = $('#MSearchResults').detach(); - $('#MSearchResultsWindow') - .attr('id', 'search-results-window') - .addClass('panel panel-default') - .append( - '
    \ -

    Search Results

    \ -
    \ -
    ' - ); - $('#search-results-window .panel-body').append(results_iframe); - - searchBox.DOMPopupSearchResultsWindow = function() { - return document.getElementById("search-results-window"); - } +$('#search-box .close').click(function (){ + searchBox.CloseResultsWindow(); +}); - function update_search_results_window() { - $('#search-results-window').removeClass('panel-default panel-success panel-warning panel-danger') - var status = $('#MSearchResults').contents().find('.SRStatus:visible'); - if (status.length > 0) { - switch(status.attr('id')) { - case 'Loading': - case 'Searching': - $('#search-results-window').addClass('panel-warning'); - break; - case 'NoMatches': - $('#search-results-window').addClass('panel-danger'); - break; - default: - $('#search-results-window').addClass('panel-default'); - } - } else { - $('#search-results-window').addClass('panel-success'); +$('body').append('
    '); +$('body').append('
    '); +$('body').append('
    '); + +searchBox.searchLabel = ''; +searchBox.DOMSearchField = function() { + return document.getElementById("search-field"); +} +searchBox.DOMSearchClose = function(){ + return document.getElementById("search-close"); +} + + +/* search results */ +var results_iframe = $('#MSearchResults').detach(); +$('#MSearchResultsWindow') + .attr('id', 'search-results-window') + .addClass('panel panel-default') + .append( + '
    \ +

    Search Results

    \ +
    \ +
    ' + ); +$('#search-results-window .panel-body').append(results_iframe); + +searchBox.DOMPopupSearchResultsWindow = function() { + return document.getElementById("search-results-window"); +} + +function update_search_results_window() { + $('#search-results-window').removeClass('panel-default panel-success panel-warning panel-danger') + var status = $('#MSearchResults').contents().find('.SRStatus:visible'); + if (status.length > 0) { + switch(status.attr('id')) { + case 'Loading': + case 'Searching': + $('#search-results-window').addClass('panel-warning'); + break; + case 'NoMatches': + $('#search-results-window').addClass('panel-danger'); + break; + default: + $('#search-results-window').addClass('panel-default'); } + } else { + $('#search-results-window').addClass('panel-success'); } - $('#MSearchResults').load(function() { - $('#MSearchResults').contents().find('link[href="search.css"]').attr('href','../doxygen.css'); - $('#MSearchResults').contents().find('head').append( - ''); - - update_search_results_window(); +} +$('#MSearchResults').on('load', function() { + $('#MSearchResults').contents().find('link[href="search.css"]').attr('href','../doxygen.css'); + $('#MSearchResults').contents().find('head').append( + ''); - // detect status changes (only for search with external search backend) - var observer = new MutationObserver(function(mutations) { - update_search_results_window(); - }); - var config = { attributes: true}; + update_search_results_window(); - var targets = $('#MSearchResults').contents().find('.SRStatus'); - for (i = 0; i < targets.length; i++) { - observer.observe(targets[i], config); - } + // detect status changes (only for search with external search backend) + var observer = new MutationObserver(function(mutations) { + update_search_results_window(); }); + var config = { attributes: true}; + + var targets = $('#MSearchResults').contents().find('.SRStatus'); + for (i = 0; i < targets.length; i++) { + observer.observe(targets[i], config); + } +}); - /* enumerations */ - $('table.fieldtable').removeClass('fieldtable').addClass('table table-striped table-bordered').each(function(){ - $(this).prepend(''); - $(this).find('tbody > tr:first').prependTo($(this).find('thead')); +/* enumerations */ +$('table.fieldtable').removeClass('fieldtable').addClass('table table-striped table-bordered').each(function(){ + $(this).prepend(''); + $(this).find('tbody > tr:first').prependTo($(this).find('thead')); - $(this).find('td > span.success').parent().addClass('success'); - $(this).find('td > span.warning').parent().addClass('warning'); - $(this).find('td > span.danger').parent().addClass('danger'); - }); + $(this).find('td > span.success').parent().addClass('success'); + $(this).find('td > span.warning').parent().addClass('warning'); + $(this).find('td > span.danger').parent().addClass('danger'); +}); - /* todo list */ - var todoelements = $('.contents > .textblock > dl.reflist > dt, .contents > .textblock > dl.reflist > dd'); - for (var i = 0; i < todoelements.length; i += 2) { - $('.contents > .textblock').append( - '
    ' - + "
    " + $(todoelements[i]).html() + "
    " - + "
    " + $(todoelements[i+1]).html() + "
    " - + '
    '); +/* todo list */ +var todoelements = $('.contents > .textblock > dl.reflist > dt, .contents > .textblock > dl.reflist > dd'); +for (var i = 0; i < todoelements.length; i += 2) { + $('.contents > .textblock').append( + '
    ' + + "
    " + $(todoelements[i]).html() + "
    " + + "
    " + $(todoelements[i+1]).html() + "
    " + + '
    '); +} +$('.contents > .textblock > dl').remove(); + + +$(".memitem").removeClass('memitem'); + $(".memproto").removeClass('memproto'); + $(".memdoc").removeClass('memdoc'); +$("span.mlabel").removeClass('mlabel'); +$("table.memberdecls").removeClass('memberdecls'); + $("[class^=memitem]").removeClass('memitem'); + $("span.mlabels").removeClass('mlabels'); + $("table.mlabels").removeClass('mlabels'); + $("td.mlabels-right").removeClass('mlabels-right'); +$(".navpath").removeClass('navpath'); +$("li.navelem").removeClass('navelem'); +$("a.el").removeClass('el'); +$("div.ah").removeClass('ah'); +$("div.header").removeClass("header"); + +$('.mdescLeft').each(function(){ + if($(this).html()==" ") { + $(this).siblings('.mdescRight').attr('colspan', 2); + $(this).remove(); } - $('.contents > .textblock > dl').remove(); - - - $(".memitem").removeClass('memitem'); - $(".memproto").removeClass('memproto'); - $(".memdoc").removeClass('memdoc'); - $("span.mlabel").removeClass('mlabel'); - $("table.memberdecls").removeClass('memberdecls'); - $("[class^=memitem]").removeClass('memitem'); - $("span.mlabels").removeClass('mlabels'); - $("table.mlabels").removeClass('mlabels'); - $("td.mlabels-right").removeClass('mlabels-right'); - $(".navpath").removeClass('navpath'); - $("li.navelem").removeClass('navelem'); - $("a.el").removeClass('el'); - $("div.ah").removeClass('ah'); - $("div.header").removeClass("header"); - - $('.mdescLeft').each(function(){ - if($(this).html()==" ") { - $(this).siblings('.mdescRight').attr('colspan', 2); - $(this).remove(); - } - }); - $('td.memItemLeft').each(function(){ - if($(this).siblings('.memItemRight').html()=="") { - $(this).attr('colspan', 2); - $(this).siblings('.memItemRight').remove(); - } - }); - $('td.memTemplItemLeft').each(function(){ - if($(this).siblings('.memTemplItemRight').html()=="") { - $(this).attr('colspan', 2); - $(this).siblings('.memTemplItemRight').remove(); - } - }); - searchBox.CloseResultsWindow(); +}); +$('td.memItemLeft').each(function(){ + if($(this).siblings('.memItemRight').html()=="") { + $(this).attr('colspan', 2); + $(this).siblings('.memItemRight').remove(); + } +}); +$('td.memTemplItemLeft').each(function(){ + if($(this).siblings('.memTemplItemRight').html()=="") { + $(this).attr('colspan', 2); + $(this).siblings('.memTemplItemRight').remove(); + } +}); +searchBox.CloseResultsWindow(); }); diff --git a/example-site/Doxyfile b/example-site/Doxyfile index c2bdeb7..6485a4d 100644 --- a/example-site/Doxyfile +++ b/example-site/Doxyfile @@ -419,7 +419,7 @@ LOOKUP_CACHE_SIZE = 0 # normally produced when WARNINGS is set to YES. # The default value is: NO. -EXTRACT_ALL = NO +EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. diff --git a/example-site/README.md b/example-site/README.md deleted file mode 100644 index aead981..0000000 --- a/example-site/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Example project - -This is a minimal working example to get you started. - -## How to run this example - -Run: - - doxygen Doxyfile - -within this folder and the documentation for this minimal example will be generated in Doc/html. - -## How to Integrate - -This example uses the provided header and footer as well as the root projects customdoxygen.css and doxyboot.js files. - -* HTML_HEADER=header.html -* HTML_FOOTER=footer.html -* HTML\_EXTRA_STYLESHEET=../customdoxygen.css -* HTML\_EXTRA_FILES=../doxy-boot.js \ No newline at end of file diff --git a/example-site/header.html b/example-site/header.html index 7863911..8c28b8a 100644 --- a/example-site/header.html +++ b/example-site/header.html @@ -8,8 +8,9 @@ - - + + + $projectname: $title $title @@ -21,15 +22,27 @@ $extrastylesheet - - + + + + + + + +