I recentry created the brand new site for jDCBot (http://jdcbot.sourceforge.net ). For the Javadoc section I wanted the Javadoc to match the site’s red and black theme. Below is its screenshot. Click on it for a better view, or even better visit jDCBot’s site (link is above) and goto to the Javadoc section.
Well anyway, below is the script.
The code
License: GNU Public License version 3.
/* Javadoc style sheet theme - Red N Black - by Nirupam Biswas (AppleGrew)*/ /* Define colors, fonts and other style attributes here to override the defaults */ /* Page background color */ body { background-color: #FFFFFF; color:#000000 } /* Headings */ h1, h2, h3 { font-family: Arial, Helvetica, sans-serif; color: #555555; } h1 {font-size: 145%;} a:link { line-height: 14px; font-weight: bold; text-decoration: none; color: #444444; } a:visited { color: #777777; text-decoration: none; font-weight: bold; } a:hover { border-bottom: 2px solid #666666; } hr{ color: #666666; background-color: #666666; text-align: left; border: 0; text-align: left;/*this will align it for IE*/ margin-left: 0; /*this will align it left for Mozilla*/ } /* Table colors */ .TableHeadingColor { background-image:url(javadoc.jpg); background-repeat:repeat-x; color:#FFFFFF;} .TableHeadingColor a:link, .TableHeadingColor a:visited { color: #bbbbbb; } .TableHeadingColor a:hover { border: none; background-color:#666666; } .TableSubHeadingColor { background: #EEEEEE; color:#000000 } .TableRowColor { background: #FFFFFF; color:#000000 } /* Font used in left-hand frame lists */ .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } /* Navigation bar fonts and colors */ .NavBarCell1 { background-image:url(javadoc.jpg);} .NavBarCell1 a:hover { border: none; background-color:#666666; } .NavBarCell1Rev { background-color:#666666; color:#FFFFFF} .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
Also please save the following image and save it in the same directory with the style sheet above.
I was being lazy and looking for a sexy looking javadoc stylesheet… Thanks !
How did you get the documentation centered with that shadowed border ? Is that achievable in the CSS template or a feature of Sourceforge ?
@Everett
Between the shadows of my site, I have put an iframe. The documentation is displayed inside that iframe.
Hi Apple Grew,
Thanks a lot. This article has given me a great startup for custom stylesheet use in javadoc.
Keep up the good work.
You are welcome, and thanks.
Thanks! Interestingly I found no Javadoc theme collections with Google.
Yup I too was surprised by that.
Thank you very much for the stylesheet! It looks great!
Just what I was looking for! Someone needed to bring Javadoc out of 1995.
Very good information, I am currently putting together a directory javadoc templates, I added this template and included a reference to you.
Here is the link http://java-white-box.blogspot.com.ar/2012/08/javadoc-como-personalizar-el-html.html
Regards
Thanks. 🙂
Give example of using it in JavaDocs…
Hi there
Thank you very much, however it is not working for me, I got a grey java doc with no frames.
And yes the javadoc.jpg is at the same place than the stylesheet