Skip to content

Enhance JavaDocs with a modern and customizable aesthetic.

Notifications You must be signed in to change notification settings

xMrAfonso/BetterJDocs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

Header - BetterJDocs

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.

How to install

  1. Download the stylesheet from GitHub. (betterjdocs.css)
  2. Place the file inside your project in a place of your choice.
  3. Check below to see how to add the style to your project.

Using Gradle:

javadoc {
  // Your own configurations...
  options.stylesheetFile = file('path/to/betterjdocs.css')
}

Using Maven:

<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>

Using other methods:

  • I only use Gradle, if you know how to do it in any other way, please consider contributing.

How to customize

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.

Color Palettes

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;

Contact me

If you have any questions or feedback, please contact me via Discord: @mrafonso.

About

Enhance JavaDocs with a modern and customizable aesthetic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages