This document is specific to DayCal v1.0 - 1.5
Please see the new documentation to find out how to customize CalPack CSS
So you want to put your own unique spin on the look of our black boxes? Believe it or not this can be really easy... as long as you understand the terms CSS and FeedReactor!
Lets take a look at the Day Calendar.

The basic style of the Day Calendar. Yeah, its nice but...
Now lets say you wanted it to look like this:

Enhanced Day Calendar using DayCalendar.css
The Day Calendar (along with some other Black Boxes) automatically pull in a CSS Override file. The styles will follow the basic rules of CSS. Learn more about how this works. To give reactor the extra CSS file, we will need to FeedReactor() during the start up script of the Database we are using.
# Somewhere in our Startup Script
Set Variable[$DayCalCSS; Value:FeedReactor( "DayCalendar.css" MyTable::MyCSSField )]
# We have an image we want to use, so load that too.
Set Variable[$DayCalCSS; Value:FeedReactor( "DayCalBackground.png" MyTable::MyImageField )]
The $DayCalCSS variable will contain the URL to the file. We don't really need that in either case, as we know where we are loading the file.
#timeline {
/* Changes the background color of the bottom timeline */
background: #333;
}
#toolbar {
/* Changes the background color of the left toolbar */
background: #333;
}
.hourbar {
/* Changes the border color of the blocks in the left toolbar
Should be the same as the background of #toolbar
*/
border-color: #333;
}
.hourbar p {
/* Changes the font color and weight of the toolbar text */
color : #fff;
font-weight: bold;
}
.dayblock, .hourblock {
/* Change the grid border color in the main viewer */
border-color: #66A9C6;
}
#viewer {
/* Change the background color of the main viewer
Notice this is where we attatch our repeating background image
*/
background: #0076A2 url( 'DayCalBackground.png' ) repeat;
}
div.booking {
/* Changes the colour of the main booking border */
background: #333;
}
div.bookingDetails {
/* Changes the color of the midde booking details area */
background: #66A9C6;
}
div.selected {
/* changes the color of a selected bookings border */
background: #000;
}
.nonwork {
/* remove the nonwork shading */
background: transparent;
}
As you can see, very little is required to make dramatic changes to the basic look of the calendar. You can further enhance the look by adding more images in the CSS. There are many more css selectors you can use than what was shown in this example.
You want the Developer Pack. There you can find source code for the black box you want to customize. If you have a Reactor Development License, you can download it now from your FP Account under the Resources tab. Otherwise, you can buy a licence to get access to these great resources!
Comments