This theme was specifically made to replace the old JavaDocs' Interface with a much needed improved version of its design & layout while being limited only to CSS.
To check out a live demonstration, go to Andre601's JavaDocs.
If you like this resource, don't forget to leave a Star <3.
Due to recent changes to JavaDocs and lack of time to fully update this, I decided to archive the project.
- Download the stylesheet from GitHub. (
betterjdocs.css
) - Place the file inside your project in a place of your choice.
- Check below to see how to add the style to your project.
javadoc {
// Your own configurations...
options.stylesheetFile = file('path/to/betterjdocs.css')
}
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version> <!-- Make sure to update if outdated -->
<configuration>
<!-- Your own configurations... -->
<stylesheetfile>./path/to/betterjdocs.css</stylesheetfile>
</configuration>
</plugin>
</plugins>
</build>
Multi-module setup (Based on Maven docs example)
You set this in the root/parent pom.xml
and use mvn javadoc:aggregate
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>irg.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version> <!-- Make sure to update if outdated -->
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version> <!-- Make sure to update if outdated -->
<configuration>
<!-- Your own configurations... -->
<stylesheetfile>./path/to/betterjdocs.css</stylesheetfile>
</configuration>
</plugin>
</plugins>
</build>
- I only use Gradle, if you know how to do it in any other way, please consider contributing.
If you dislike the default colors, or just want to modify it to fit your own projects, you can modify the colors by opening the stylesheet.
Variable | Description |
---|---|
--primary-color | Mostly used on links & buttons. |
--secondary-color | Used in fields, parameters, types, etc. |
--description-color | Used specifically for descriptions and text. |
--hover-color | Hover color for links. |
--bg-900-color | Color for Top Navigation and Cards. |
--bg-800-color | Color used in the body's background. |
--bg-700-color | Mostly used for the odd row in tables. |
--bg-600-color | Mostly used for the even row in tables and used for the searchbar. |
There are also comments explaining what each variable corresponds to and what it does inside the stylesheet.
Dark Mode (Default)
/* Mostly used on links & buttons */
--primary-color: #4186f5;
/* Used in fields, parameters, types, etc. */
--secondary-color: #ffffff;
/* Used specifically for descriptions and text */
--description-color: #949494;
/* Hover color for links */
--hover-color: #76a6f4;
/* Color for Top Navigation and Cards */
--bg-900-color: #121212;
/* Color used in the body's background */
--bg-800-color: #171717;
/* Mostly used for the odd row in tables */
--bg-700-color: #1c1c1c;
/* Mostly used for the even row in tables and used for the searchbar */
--bg-600-color: #212121;
Light Mode
/* Mostly used on links & buttons */
--primary-color: #185bc7;
/* Used in fields, parameters, types, etc. */
--secondary-color: #000000;
/* Used specifically for descriptions and text */
--description-color: #3f3e3e;
/* Hover color for links */
--hover-color: #76a6f4;
/* Color for Top Navigation and Cards */
--bg-900-color: #f0f0f0;
/* Color used in the body's background */
--bg-800-color: #e0e0e0;
/* Mostly used for the odd row in tables */
--bg-700-color: #d0d0d0 ;
/* Mostly used for the even row in tables and used for the searchbar */
--bg-600-color: #c0c0c0;
If you have any questions or feedback, please contact me via Discord: @mrafonso
.