# Extensions [TOC] On top of the base theme provided by `doxygen-awesome.css`, this repository comes with Javascript extensions that require additional setup steps to get them running. The extensions require customizations in the header HTML template. This is how you can create the default template with Doxygen: 1. Create default header template: ```sh doxygen -w html header.html delete_me.html delete_me.css ``` 2. Reference the template in your `Doxyfile`: ``` HTML_HEADER = header.html ``` [More details on header customization](https://www.doxygen.nl/manual/customize.html#minor_tweaks_header_css) ## Dark Mode Toggle {#extension-dark-mode-toggle} Adds a button next to the search bar to enable and disable the dark theme variant manually:
![](img/darkmode_toggle.png){width=250px}
### Installation 1. Add the required resources in your `Doxyfile`: - **HTML_EXTRA_FILES:** `doxygen-awesome-darkmode-toggle.js` - **HTML_EXTRA_STYLESHEET:** `doxygen-awesome-sidebar-only-darkmode-toggle.css` (ONLY required for the sidebar-only theme variant!) 2. In the `header.html` template, include `doxygen-awesome-darkmode-toggle.js` at the end of the `` and then initialize it: ```html ``` ### Customizing Changing the tooltip of the button: ```js DoxygenAwesomeDarkModeToggle.title = "Zwischen hellem/dunklem Modus wechseln" ``` Changing Icons. Both Emoji or SVG icons are supported: ```js DoxygenAwesomeDarkModeToggle.lightModeIcon = '🌞' // icon from https://fonts.google.com/icons DoxygenAwesomeDarkModeToggle.darkModeIcon = `` ``` All customizations must be applied before calling `DoxygenAwesomeDarkModeToggle.init()`! ## Fragment Copy Button {#extension-copy-button} Shows a copy button when the user hovers over a code fragment:
![](img/fragment_copy_button.png){width=490}
### Installation 1. Add the required resources in your `Doxyfile`: - **HTML_EXTRA_FILES:** `doxygen-awesome-fragment-copy-button.js` - **HTML_COPY_CLIPBOARD:** `NO` required with Doxygen >= 1.10.0 2. In the `header.html` template, include `doxygen-awesome-fragment-copy-button.js` at the end of the `` and then initialize it: ```html ``` ### Customizing The tooltip of the button can be changed: ```js DoxygenAwesomeFragmentCopyButton.title = "In die Zwischenablage kopieren" ``` The icon can be changed. It must be an SVG: ```js DoxygenAwesomeFragmentCopyButton.copyIcon = `` DoxygenAwesomeFragmentCopyButton.successIcon = `` ``` All customizations must be applied before calling `DoxygenAwesomeDarkModeToggle.init()`! ## Paragraph Linking {#extension-para} Provides a button on hover behind every headline to allow easy creation of a permanent link to the headline:
![](img/paragraph_link.png){width=220}
Works for all headlines and for many documentation section titles. ### Installation 1. Add the required resources in your `Doxyfile`: - **HTML_EXTRA_FILES:** `doxygen-awesome-paragraph-link.js` 2. In the `header.html` template, include `doxygen-awesome-paragraph-link.js` at the end of the `` and then initialize it: ```html ``` ### Customizing The button tooltip can be changed: ```js DoxygenAwesomeParagraphLink.title = "Abschnitt verknüpfen" ``` The icon of the button can be changed. Both plain characters or SVG icons are supported: ```js DoxygenAwesomeParagraphLink.icon = "¶" ``` All customizations must be applied before calling `DoxygenAwesomeParagraphLink.init()`! ## Interactive TOC {#extension-toc} On large screens, the Table of Contents (TOC) is anchored on the top right of the page. This extension visualizes the reading progress by dynamically highlighting the currently active section. On small screens, the extension hides the TOC by default. The user can open it manually when needed:
![](img/interactive_toc_mobile.png){width=380}
### Installation 1. Add the required resources in your `Doxyfile`: - **HTML_EXTRA_FILES:** `doxygen-awesome-interactive-toc.js` 2. In the `header.html` template, include `doxygen-awesome-interactive-toc.js` at the end of the `` and then initialize it: ```html ``` ### Customizing The offset for when a headline is considered active can be changed. A smaller value means that the headline of the section must be closer to the top of the viewport before it is highlighted in the TOC: ```js DoxygenAwesomeInteractiveToc.topOffset = 45 ``` Hiding the TOC on small screens can be disabled. It is still interactive and can be hidden by the user but will now be open by default: ```js DoxygenAwesomeInteractiveToc.hideMobileMenu = false ``` ## Tabs {#extension-tabs} @warning Experimental feature! Please report bugs [here](https://github.com/jothepro/doxygen-awesome-css/issues). This extension allows to arrange list content in tabs:
- Tab 1 This is the content of tab 1 - Tab 2 This is the content of tab 2 1. it has a list 2. with multiple items
### Installation 1. Add the required resources in your `Doxyfile`: - **HTML_EXTRA_FILES:** `doxygen-awesome-tabs.js` 2. In the `header.html` template, include `doxygen-awesome-tabs.js` at the end of the `` and then initialize it: ```html ``` ### Usage Each list that is supposed to be displayed as tabs has to be wrapped with the `tabbed` CSS class. Each item in the list must start with an element that has the class `tab-title`. It will then be used as tab title. ```md
- Tab 1 This is the content of tab 1 - Tab 2 This is the content of tab 2
``` ## Page Navigation {#extension-page-navigation} @warning Experimental feature! Please report bugs [here](https://github.com/jothepro/doxygen-awesome-css/issues). To allow the user to easily navigate from one document to another, "Next" and "Previous" buttons can be added at the end of a Markdown document. ### Installation The feature is shipped inside the default `doxygen-awesome.css`. No additional stylesheets or scripts need to be added. ### Usage The following conditions must be met for the feature to work properly: - The navigation must be inside a Markdown table with 1-2 columns. - The alignment of the column defines the alignment of the arrow on the navigation button. - the table must be wrapped inside a `
` with the class `section_buttons`.
- Code ```md
| Previous | Next | |:------------------|----------------------------------:| | [Home](README.md) | [Customization](customization.md) |
``` - Result
| Previous | Next | |:------------------|----------------------------------:| | [Home](README.md) | [Customization](customization.md) |
| Previous | Next | |:------------------|----------------------------------:| | [Home](README.md) | [Customization](customization.md) |