Skip to content

Commit

Permalink
Navbar fixed, readme improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeioth committed Jan 15, 2017
1 parent 4f37eaa commit 9dcbc94
Show file tree
Hide file tree
Showing 13 changed files with 704 additions and 573 deletions.
67 changes: 38 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,56 @@
doxygen-bootstrapped
===================
Doxygen theme that applies the styles of twitter bootstrap

Customize doxygen (v1.8.8) output to use the twitter bootstrap framework (v3.2.0)
[SEE DEMO HERE](https://biogearsengine.com/documentation/index.html)

[Demo](https://biogearsengine.com/documentation/index.html)
# Installation

I took the work done by CoActionOS and extended it further.
[Credit](http://coactionos.com/embedded%20design%20tips/2014/01/07/Tips-Integrating-Doxygen-and-Bootstrap/)
Requires 'doxygen v1.8.9' or below, and 'doxygen-gui'.

* Open doxywizard
* File > Open > /example-site/Doxyfile

Now you can use this configuration as template for your project.

# Customizing Doxygen
Doxygen provides for 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. The following command will generate the default Doxygen HTML files.
# For developers
Doxygen allows to customize the HTML output by modifying the HTML header,
footer and stylesheet. If you want, 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.
Modifying these files alone is not enough to get a good 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, here you will find extra ways to
[customize the output](http://www.stack.nl/~dimitri/doxygen/manual/customize.html).

# How to Integrate
# Files

This is easy to integrate into your own doxyfile. Simply tell your doxyfile to use these 3 files in the HTML section (see the example site for an example of each file):
This theme uses the next files in the HTML section of doxywizard. See example-site.

* HTML_HEADER=header.html
* Adds a simple Bootstrap navbar for the title
* Wraps the content in a Bootstrap container/row combo

> Adds a Bootstrap navbar
>
> Wraps the content in a Bootstrap container/row
* HTML_FOOTER=footer.html
* Simply closes the extra divs opened in the header.html
* HTML_EXTRA_STYLESHEET=customdoxygen.css

You should also copy `doxy-boot.js` into your `html` directory, else it won't be found.
> Closes the extra divs opened in the header.html
We have also modified the HTML header/footer to load the Bootstrap css/javascript and our custom javascript (doxy-boot.js). This is where you can specify your own bootstrap compilation. These files will also need to be placed in the html directory (or sub-directory) else they wont be found.
* HTML\_EXTRA_STYLESHEET=customdoxygen.css

```
<link href="bootstrap3/css/bootstrap.min.css" rel="stylesheet">
<script src="bootstrap3/js/jquery-2.0.3.min.js"></script>
<script src="bootstrap3/js/bootstrap.min.js"></script>
<script type="text/javascript" src="doxy-boot.js"></script>
```
> Adds additional styling such as a sticky footer
* HTML\_EXTRA_FILES=doxy-boot.js

> Where the magic happens to augment the HTML with bootstrap
## Todo List
* Menu is not correctly displayed when Doxygen sidebar is enabled.
* Class index is incorrectly displayed.
* Search engine is not fully responsive.
* GENERATE_TREEVIEW option is not shown, or initialized correctly.

## Credits
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/)
134 changes: 112 additions & 22 deletions customdoxygen.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ font-size: 1.15em !important;
.navbar{
border: 0px solid #222 !important;
}
table{
white-space:pre-wrap !important;
}
/*
===========================
*/


/* Sticky footer styles
Expand Down Expand Up @@ -142,16 +148,16 @@ div.fragment {
}

div.line {
font-family: monospace, fixed;
font-size: 13px;
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: break-word; /* IE 5.5+ */
word-wrap: normal; /* IE 5.5+ */
text-indent: -53px;
padding-left: 53px;
padding-bottom: 0px;
Expand All @@ -167,6 +173,9 @@ div.line {
transition-property: background-color, box-shadow;
transition-duration: 0.5s;
}
div.line:hover{
background-color: #FBFF00;
}

div.line.glow {
background-color: cyan;
Expand All @@ -177,16 +186,21 @@ div.line.glow {
span.lineno {
padding-right: 4px;
text-align: right;
border-right: 2px solid #0F0;
background-color: #E8E8E8;
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: #D8D8D8;
background-color: #FAFAFA;
cursor:pointer;
}

span.lineno a:hover {
background-color: #C8C8C8;
background-color: #EFE200;
color: #1e1e1e;
}

div.groupHeader {
Expand Down Expand Up @@ -255,26 +269,102 @@ blockquote {

/*---------------- Search Box */

#MSearchBox {
top: 7px;
margin-bottom: 2em;
#search-box {
margin: 10px 0px;
}

/*---------------- Search filter selection */

#MSearchSelectWindow {
position: fixed;
#search-box .close {
display: none;
position: absolute;
right: 0px;
padding: 6px 12px;
z-index: 5;
}

/*---------------- Search results window */

#search-results-window {
display: none;
}

iframe#MSearchResults {
width: 100%;
height: 15em;
width: 100%;
height: 15em;
}

.SRChildren {
padding-left: 3ex; padding-bottom: .5em
}
.SRPage .SRChildren {
display: none;
}
a.SRScope {
display: block;
}
a.SRSymbol:focus, a.SRSymbol:active,
a.SRScope:focus, a.SRScope:active {
text-decoration: underline;
}
span.SRScope {
padding-left: 4px;
}
.SRResult {
display: none;
}

/* class and file list */
.directory .icona,
.directory .arrow {
height: auto;
}
.directory .icona .icon {
height: 16px;
}
.directory .icondoc {
background-position: 0px 0px;
height: 20px;
}
.directory .iconfopen {
background-position: 0px 0px;
}
.directory td.entry {
padding: 7px 8px 6px 8px;
}

#MSearchResultsWindow {
position: static;
border: 1px solid #ccc;
border-radius: 4px;
}
.table > tbody > tr > td.memSeparator {
line-height: 0;
.table-hover;

}

.memItemLeft, .memTemplItemLeft {
white-space: normal;
}

/* enumerations */
.panel-body thead > tr {
background-color: #e0e0e0;
}

/* todo lists */
.todoname,
.todoname a {
font-weight: bold;
}

/* Class title */
.summary {
margin-top: 25px;
}
.page-header {
margin: 20px 0px !important;
}
.page-header .title {
display: inline-block;
}
.page-header .pull-right {
margin-top: 0.3em;
margin-left: 0.5em;
}
.page-header .label {
font-size: 50%;
}
Loading

0 comments on commit 9dcbc94

Please sign in to comment.