Skip to content

Commit 2fd5265

Browse files
author
Ravbug
committed
Add theme
1 parent e2f8843 commit 2fd5265

21 files changed

+6771
-3
lines changed

doxyconfig

+3-3
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ WARN_LOGFILE =
943943
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
944944
# Note: If this tag is empty the current directory is searched.
945945

946-
INPUT = RavEngine
946+
INPUT = RavEngine RavEngine/deps/RGL
947947

948948
# This tag can be used to specify the character encoding of the source files
949949
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -1397,7 +1397,7 @@ HTML_STYLESHEET =
13971397
# documentation.
13981398
# This tag requires that the tag GENERATE_HTML is set to YES.
13991399

1400-
HTML_EXTRA_STYLESHEET =
1400+
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css
14011401

14021402
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
14031403
# other source files which should be copied to the HTML output directory. Note
@@ -1728,7 +1728,7 @@ DISABLE_INDEX = NO
17281728
# The default value is: NO.
17291729
# This tag requires that the tag GENERATE_HTML is set to YES.
17301730

1731-
GENERATE_TREEVIEW = NO
1731+
GENERATE_TREEVIEW = YES
17321732

17331733
# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
17341734
# FULL_SIDEBAR option determines if the side bar is limited to only the treeview

doxygen-awesome-css/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
docs/html
2+
.DS_Store
3+
.idea
4+
5+
node_modules
6+
*.tgz

doxygen-awesome-css/.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!doxygen-awesome*
3+

doxygen-awesome-css/Doxyfile

+2,932
Large diffs are not rendered by default.

doxygen-awesome-css/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 - 2023 jothepro
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

doxygen-awesome-css/Makefile

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <[email protected]>
2+
# SPDX-License-Identifier: MIT
3+
4+
.POSIX:
5+
6+
PROJECT = doxygen-awesome-css
7+
8+
# Paths
9+
PREFIX = /usr/local
10+
DATADIR = share
11+
INSTALLDIR = $(DESTDIR)$(PREFIX)/$(DATADIR)/$(PROJECT)
12+
13+
# Utilities
14+
INSTALL = install -m 644
15+
MKDIR = mkdir -p
16+
RM = rm -f
17+
18+
# Files to be installed
19+
FILES = doxygen-awesome-darkmode-toggle.js \
20+
doxygen-awesome-fragment-copy-button.js \
21+
doxygen-awesome-interactive-toc.js \
22+
doxygen-awesome-paragraph-link.js \
23+
doxygen-awesome-sidebar-only-darkmode-toggle.css \
24+
doxygen-awesome-sidebar-only.css \
25+
doxygen-awesome-tabs.js \
26+
doxygen-awesome.css
27+
28+
# Empty targets so that `make` and `make clean` do not cause errors
29+
all:
30+
clean:
31+
32+
install:
33+
$(MKDIR) $(INSTALLDIR)
34+
$(INSTALL) $(FILES) $(INSTALLDIR)/
35+
36+
uninstall:
37+
$(RM) -r $(INSTALLDIR)/
38+
39+
.PHONY: all clean install uninstall

doxygen-awesome-css/README.md

+206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# Doxygen Awesome
2+
3+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/jothepro/doxygen-awesome-css)](https://github.com/jothepro/doxygen-awesome-css/releases/latest)
4+
[![GitHub](https://img.shields.io/github/license/jothepro/doxygen-awesome-css)](https://github.com/jothepro/doxygen-awesome-css/blob/main/LICENSE)
5+
![GitHub Repo stars](https://img.shields.io/github/stars/jothepro/doxygen-awesome-css)
6+
7+
<div class="title_screenshot">
8+
9+
![Screenshot of Doxygen Awesome CSS](img/screenshot.png)
10+
11+
</div>
12+
13+
**Doxygen Awesome** is a custom CSS theme for Doxygen HTML documentation with lots of customization parameters.
14+
15+
## Motivation
16+
17+
I really like how the Doxygen HTML documentation is structured! But IMHO it looks a bit outdated.
18+
19+
This theme is an attempt to update the visuals of Doxygen without changing its overall layout too much.
20+
21+
## Features
22+
23+
- 🌈 Clean, modern design
24+
- 🚀 Heavily customizable by adjusting CSS variables
25+
- 🧩 No changes to the HTML structure of Doxygen are required
26+
- 📱 Improved mobile usability
27+
- 🌘 Dark mode support!
28+
- 🥇 Works best with **doxygen 1.9.1** - **1.9.4** and **1.9.6** - **1.12.0**
29+
30+
## Examples
31+
32+
Some websites using this theme:
33+
34+
- [Documentation of this repository](https://jothepro.github.io/doxygen-awesome-css/)
35+
- [wxWidgets](https://docs.wxwidgets.org/3.2/)
36+
- [OpenCV 5.x](https://docs.opencv.org/5.x/)
37+
- [Zephyr](https://docs.zephyrproject.org/latest/doxygen/html/index.html)
38+
- [FELTOR](https://mwiesenberger.github.io/feltor/dg/html/modules.html)
39+
- [Spatial Audio Framework (SAF)](https://leomccormack.github.io/Spatial_Audio_Framework/index.html)
40+
- [Randolf Richardson's C++ classes](https://www.randolf.ca/c++/docs/)
41+
- [libCloudSync](https://jothepro.github.io/libCloudSync/)
42+
- [libsl3](https://a4z.github.io/libsl3/)
43+
44+
## Installation
45+
46+
To use the theme when generating your documentation, bring the required CSS and JS files from this repository into your project.
47+
48+
This can be done in several ways:
49+
50+
- manually copying the files
51+
- adding the project as a Git submodule
52+
- downloading the project with CMake FetchContent
53+
- adding the project as a npm/xpm dependency
54+
- installing the theme system-wide
55+
56+
All theme files are located in the root of this repository and start with the prefix `doxygen-awesome-`. You may not need all of them. Follow the install instructions to figure out what files are required for your setup.
57+
58+
### Git submodule
59+
For projects that use git, add the repository as a submodule and check out the desired release:
60+
61+
```sh
62+
git submodule add https://github.com/jothepro/doxygen-awesome-css.git
63+
cd doxygen-awesome-css
64+
git checkout v2.3.4
65+
```
66+
67+
### CMake with FetchContent
68+
69+
For project that build with CMake, the `FetchContent` module can be used to download the repository at configure-time.
70+
71+
Add the following snippet to your `CMakeLists.txt`
72+
73+
```cmake
74+
include(FetchContent)
75+
FetchContent_Declare(
76+
doxygen-awesome-css
77+
URL https://github.com/jothepro/doxygen-awesome-css/archive/refs/heads/main.zip
78+
)
79+
FetchContent_MakeAvailable(doxygen-awesome-css)
80+
81+
# Save the location the files were cloned into
82+
# This allows us to get the path to doxygen-awesome.css
83+
FetchContent_GetProperties(doxygen-awesome-css SOURCE_DIR AWESOME_CSS_DIR)
84+
85+
# Generate the Doxyfile
86+
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/doc/Doxyfile.in)
87+
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
88+
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
89+
```
90+
91+
This downloads the latest main (but any other revision could be used) and unpacks in the build folder. The `Doxyfile.in` can reference this location in the `HTML_EXTRA_STYLESHEET` field
92+
93+
```text
94+
HTML_EXTRA_STYLESHEET = @AWESOME_CSS_DIR@/doxygen-awesome.css
95+
```
96+
97+
When the configure stage of CMake is run, the `Doxyfile.in` is rendered to Doxyfile and Doxygen can be run as usual.
98+
99+
### npm/xpm dependency
100+
101+
In the npm ecosystem, this project can be added as a development dependency
102+
to your project:
103+
104+
```sh
105+
cd your-project
106+
npm install https://github.com/jothepro/doxygen-awesome-css#v2.3.4 --save-dev
107+
108+
ls -l node_module/@jothepro/doxygen-awesome-css
109+
```
110+
111+
Similarly, in the [xPack](https://xpack.github.io) ecosystem, this project can be added
112+
as a development dependency to an [`xpm`](https://xpack.github.io/xpm/)
113+
managed project.
114+
115+
### System-wide
116+
117+
You can even install the theme system-wide by running `make install`.
118+
The files will be installed to `/usr/local/share/` by default,
119+
but you can customize the install location with `make PREFIX=/my/custom/path install`.
120+
121+
### Choosing a layout
122+
123+
There are two layout options. Choose one of them and configure Doxygen accordingly:
124+
125+
<div class="tabbed">
126+
127+
- <b class="tab-title">Base Theme</b><div class="darkmode_inverted_image">
128+
![](img/theme-variants-base.drawio.svg)
129+
</div>
130+
Comes with the typical Doxygen titlebar. Optionally the treeview in the sidebar can be enabled.
131+
132+
Required files: `doxygen-awesome.css`
133+
134+
Required `Doxyfile` configuration:
135+
```
136+
GENERATE_TREEVIEW = YES # optional. Also works without treeview
137+
DISABLE_INDEX = NO
138+
FULL_SIDEBAR = NO
139+
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css
140+
HTML_COLORSTYLE = LIGHT # required with Doxygen >= 1.9.5
141+
```
142+
143+
- <b class="tab-title">Sidebar-Only Theme</b><div class="darkmode_inverted_image">
144+
![](img/theme-variants-sidebar-only.drawio.svg)
145+
</div>
146+
Hides the top titlebar to give more space to the content. The treeview must be enabled in order for this theme to work.
147+
148+
Required files: `doxygen-awesome.css`, `doxygen-awesome-sidebar-only.css`
149+
150+
Required `Doxyfile` configuration:
151+
```
152+
153+
GENERATE_TREEVIEW = YES # required!
154+
DISABLE_INDEX = NO
155+
FULL_SIDEBAR = NO
156+
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css \
157+
doxygen-awesome-css/doxygen-awesome-sidebar-only.css
158+
HTML_COLORSTYLE = LIGHT # required with Doxygen >= 1.9.5
159+
```
160+
161+
</div>
162+
163+
<br>
164+
165+
@warning
166+
- This theme is not compatible with the `FULL_SIDEBAR = YES` option provided by Doxygen!
167+
- `HTML_COLORSTYLE` must be set to `LIGHT` since Doxygen 1.9.5!
168+
169+
### Further installation instructions
170+
171+
- [Installing extensions](docs/extensions.md)
172+
- [Customizing the theme (colors, spacing, border-radius, ...)](docs/customization.md)
173+
- [Tips and Tricks for further configuration](docs/tricks.md)
174+
175+
## Browser support
176+
177+
Tested with
178+
179+
- Chrome 119, Chrome 119 for Android, Chrome 119 for iOS
180+
- Safari 17, Safari for iOS 16
181+
- Firefox 118, Firefox 120 for Android, Firefox 119 for iOS
182+
- Edge 119
183+
- Opera 108
184+
185+
186+
The theme does not strive to be backward compatible with (significantly) older browser versions.
187+
188+
189+
## Credits
190+
191+
Thanks for all the bug reports and inspiring feedback on GitHub!
192+
193+
Special thanks to all the contributors:
194+
<br><br>
195+
<a href="https://github.com/jothepro/doxygen-awesome-css/graphs/contributors">
196+
<img src="https://contrib.rocks/image?repo=jothepro/doxygen-awesome-css" />
197+
</a>
198+
199+
200+
<div class="section_buttons">
201+
202+
| Read Next |
203+
|---------------------------------:|
204+
| [Extensions](docs/extensions.md) |
205+
206+
</div>

0 commit comments

Comments
 (0)