Created: January 6, 2011
By: Ruven Pelka
Informations about updates and new templates are always announced on Twitter and Facebook.
Thank you for purchasing my template!
This documentation will teach you how to use the Digitalis HTML template for your own needs. I provide pretty extensive help in this file, but this doesn’t mean the template is hard to use. I just want to cover every question that might occur.
This template is build on a rock solid and organized CSS/XHTML foundation. You shouldn‘t have trouble to browse or edit the code, if you are familiar with the basics.
Have fun with your new template! Best regards,
Ruven Pelka
The CSS structure is pretty simple.
In every CSS file you will find headlines that tell you what the following code is about.
Technical Note:
In front of every headline is the word @group.
This is a special tag, that is used by some CSS-Editors in order to let you navigate through your code faster by the use of a tree view where every group gets displayed as a folder.
The main CSS file of the template is the layout.css, where all the all styles, except the colors, are included.
The template has two different layouts. The default, which leaves the main section (between the header and footer section) white and only adds color to the header and the footer section and the dark layout, that covers the whole page (including the main content section) in dark color.
You will find the the colors files for each layout inside the folder stylesheets.
The default layout includes the shared.css file, that contains the code for the never changing main content section, in each color CSS file.
The color files for the dark layout contains the color styles for the whole page and don’t include a third CSS file.
This template makes use of the jQuery JavaScript Framework and contains plugins that are written with the frameworks syntax. Further the template is using the font replacement engine Cufon.
All JavaScript files are included in the head of the template files.
Most of the JavaScript files can be found in the javascript folder. The files of plugins that require more than just a JavaScript file are located in the plugins folder.
To change the settings of a plugin (e.g. you want to change the transition effects of the slider), simply edit the custom.js file inside the javascript folder. Here you will find all the code that configures and invokes the plugins.
You should use the following picture sizes for certain areas of the template:
Type | Width (in pixels) | Height (in pixels) |
---|---|---|
Frontpage | 940 | 420 |
Fullscreen | 940 | * (various) |
Two Third (with Sidebar) | 610 | * (various) |
Half (2-column Portfolio) | 445 | * (various) |
One Third (3-column Portfolio / features on frontpage) | 280 | * (various) |
Image inside Sidebar Box | 248 | * (various) |
Before and/or after putting your own content in the template, please make sure you followed these steps:
In order to change the color of a page, you just have to change the path and/or name of the color CSS file:
<!-- Stylesheets: Screen, Projection -->
<link href="stylesheets/layout.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="stylesheets/default/black.css" media="screen, projection" rel="stylesheet" type="text/css">
Note: The color CSS file needs to be included below the layout.css file.
There are two kinds of layouts. The default (lighter) and the dark (full-color) layout. Each layout has it’s own colors. Here is an overview:
<link href="stylesheets/<<LAYOUT>>/<<COLOR>>.css" media="screen, projection" rel="stylesheet" type="text/css">
To change the logo, just overwrite the logo.png file inside the directory images/layout/<<YOUR LAYOUT>>/<<YOUR COLOR>>/.
If your logo is too long and gets cut off on the right side, you can change the width of the logo space in the layout.css file under the Headings Layout Structure > Header > “#header #logo h1 a”.
Digitalis supports a frontpage Slider and also inline Sliders. You can set certain options for every group of slider. Just open the file javascripts/custom.js and scroll to the headline Nivo Slider. Here you can set Transition Effect, Animation Speed (animSpeed) and Pause Time (pauseTime) for every slider group. Please note that Animation Speed and Pause Time need to be adjusted in milliseconds (3000 milliseconds = 3 seconds and 500 milliseconds = 0.5 seconds).
Here are the effects you can insert:
To learn more about the options visit the Nivo Slider creators website: http://nivo.dev7studios.com/.
This template includes a working AJAX-Contact-Form. In order to receive E-Mails that get sent from this form, you need to host the template on a server with PHP 5 and mail support (99% of all hosters should cover these requirements).
All you have to do then, is to open the file contactform_mailer.php and change the value of the receiver variable to your own E-Mail-Address:
$receiver = "youraddy@example.com";
In this file you can also change the output-notifications of the mailer-script.
You can control how the layout should look by adding certain classes to the body element, like this:
<body class="sidebar-left no-topbar no-nav-bg">
This example would render the page with the sidebar on the left instead on the right side, without a top bar (in which you can put a slogan) and without a background for the navigation menu.
Here is an overview of all the classes you can include:
Class | Description |
---|---|
preview | Makes room for a big slideshow (e.g. on the Frontpage). |
fullwidth | Makes room for content in fullwidth of the page and hides the Sidebar. |
boxed | Instead of a stretched layout, the page will have a restricted width of 1040 pixel and will apper in a “box”. But don’t worry, if a user has a smaller screen resolution the page automatically jumps back to the stretched layout an the width will only be 940 pixel. |
no-topbar |
Hides the the Top Bar in which you can put a slogan.
Note: You can also just delete div#topbar to get rid of it. |
sidebar-left | Puts the Sidebar on the left instead of the right side. |
no-nav-bg | Hides the navigation background box and makes the navigation look more minimalistic. |
no-boxed-sidebar | The sidebar content and navigation boxes won’t appear in a box anymore. This makes the page look more minimalistic. |
minimal | Lets the page appear more minimalistic and 2-Dimensional. Some details will disappear. |
no-header-gradient | Hides the header background image and shows only one color instead of a gradient. |
no-footer-gradient | Hides the footer background image and shows only one color instead of a gradient. |
no-rounded-corners | Makes the rounded corners disappear. |
no-sliding-links | Disables the sliding effect of the sidebar and footer navigation links |
show-bottombar |
Shows the Bottom Bar, which is hidden by default, over the Footer.
Note: The code for the Bottom Bar is in the HTML-Markup by default, but the Bottom Bar is hidden. If you don’t want it at all just delete div#bottombar. |
no-footer |
Hides the Footer.
Note: You can also just delete div#footer to get rid of it. |
show-footerbar |
Shows the Footer Bar, which is hidden by default, under the Footer.
Note: The code for the Footer Bar is in the HTML-Markup by default, but the Footer Bar is hidden. If you don’t want it at all just delete div#footerbar. |
footerbar-inline | The line over the Footer Bar is fullwidth by default. This class makes the line be only as wide as the content of the Footer Bar is. |
In this section I describe how to use custom elements.
Note: All Dividers and Spacers will clear floats on both sides.
Clears floats on both sides. You should always use it, when you work with columns.
<div class=”divider”></div>
Creates a horizontal ruler (hr).
<div class=”hr”></div>
Creates a 15 pixel spacer between two elements.
<div class=”spacer”></div>
Creates a 35 pixel spacer between two elements.
<div class=”big-spacer”></div>
Lets an element float on the left side.
<img src="picture.jpg" class=”float-left” />
Lets an element float on the right side.
<img src="picture.jpg" class=”float-right” />
To underline a heading, add the class underline to it or wrap many headings inside and element assigned with the class underline-headings.
<h3 class=”underline”>Single underlined heading</h3>
<div class=”underline-headings”> <h3>Underlined heading 1</h3> <p>Some text...</p> <h3>Underlined heading 2</h3> <p>Some more text...</p> </div>
Highlight text to make it stand out.
<p>Lorem <span class="highlight">ipsum</span> dolor sit <span class="highlight-2">amet</span> elit.</p>
Creates a frame around your content elements.
<div class="content-frame>Content here</div>
Creates a small frame around your content.
<div class="frame>Content here</div>
Create a frame around an image element.
<div class="img-frame"><img src="picture.jpg" /></div>
Lets you put a caption under an image.
<div class="img-with-caption"> <img src="picture.jpg" /> <p class="caption">Image with caption</p> </div>
You can even combine frames and captions, like in this example:
<div class="img-frame img-with-caption">
<img src="picture.jpg" />
<p class="caption">Image-Frame with caption</p>
</div>
Use the class data on a table to let it look good. Use the class alt on a table row or on a table data field to highlight it.
<table class=”data”> ... </table>
<p><span class="dropcap">H</span>ello</p>
<p><span class="dropcap-square">H</span>ello</p>
<p><span class="dropcap-circle">H</span>ello</p>
<blockquote> <p>Some Text</p> </blockquote>
<blockquote> <p>Some Text</p> <p class="author">— <b>Ruven Pelka</b></p> </blockquote>
To get Blockquotes floatet on a specific side, use the classes float-left and float-right.
<blockquote class="float-left"> <p>Some Text</p> </blockquote>
Use the class paginator to style links as page navigator.
<div class="paginator"> <a href="page1.html" class="first">« Prev</a> <span class="active">1</span> <a href="page2.html">2</a> <a href="page3.html">3</a> <a href="page4.html">4</a> <a href="page5.html">5</a> <a href="page2.html" class="last">Next »</a> </div>
To let a linked image or Flash-Video appear in a Lightbox, add the attribut rel=”lightbox” to the anker element.
<a rel='lightbox' href="big_picture.jpg"> <img src="picture.jpg" /> </a>
In order to let the user browse through many images inside the Lightbox, assign a sub-attribute to the rel attributes value.
<a rel="lightbox[group]" href="big_picture1.jpg"><img src="picture1.jpg" /></a> <a rel="lightbox[group]" href="big_picture2.jpg"><img src="picture2.jpg" /></a> <a rel="lightbox[group]" href="big_picture3.jpg"><img src="picture3.jpg" /></a>
This template contains two different Lightbox plugins.
Fancybox, which is visually more appealing, and prettyPhoto, which has more features (e.g. playing of Flash-Video).
The default Lightbox plugin is prettyPhoto.
However, if you want to activate Fancybox, all you have to do is to go into the head of the HTML file and delete the following code:
<!-- prettyPhoto --> <link href="plugins/prettyPhoto/css/prettyPhoto.css" media="screen, projection" rel="stylesheet" type="text/css" /> <script src="plugins/prettyPhoto/js/jquery.prettyPhoto.js" type="text/javascript"></script>
Then uncomment (delete “<!--” and “-->”) the following code, that you will find right below, to activate Fancybox:
<!-- Fancybox --> <!-- <link href="plugins/fancybox/jquery.fancybox-1.3.1.css" media="screen, projection" rel="stylesheet" type="text/css" /> <script src="plugins/fancybox/jquery.fancybox-1.3.1.pack.js" type="text/javascript"></script> -->
To configure either one of these plugins, please edit the custom.js file in the javascripts folder.
Use the class gallery to style a list of images.
<ul class="gallery"> <li><a rel='lightbox[gallery]' href="big_picture.jpg"><img src="picture.jpg" /></a></li> <li><a rel='lightbox[gallery]' href="big_picture.jpg"><img src="picture.jpg" /></a></li> <li><a rel='lightbox[gallery]' href="big_picture.jpg"><img src="picture.jpg" /></a></li> <li><a rel='lightbox[gallery]' href="big_picture.jpg"><img src="picture.jpg" /></a></li> </ul>
Shows and hides content with one click. This works well for FAQ pages.
<div class="toggler"><strong>Title</strong></div> <div class="toggle-content"> <p>Content...</p> </div>
Note: Make sure the title is wrapped in <strong> tags.
If you want the toggler to close all other open togglers on the page, when you click on the title, use the class close-all.
<div class="toggler close-all"><strong>Title</strong></div> ...
Make Image-Slideshows that can be played automatically or manually.
<div class="slider"> <img src="picture1.jpg" /> <img src="picture2.jpg" /> </div>
<div class="slider automatic"> <img src="picture1.jpg" /> <img src="picture2.jpg" /> </div>
<div class="slider show-nav-arrows"> <img src="picture1.jpg" /> <img src="picture2.jpg" /> </div>
To add a text caption to a slider image, just add the title attribute to the img element.
To add a HTML caption, create a div with the class nivo-html-caption under the slider div and assign it with an ID.
Then write the ID, prefixed with an #, in the title attribute of the image you want to assign the caption to.
<div class="slider"> <img src="picture1.jpg" title="A text normal caption" /> <img src="picture2.jpg" title="#html-caption"/> </div> <div id="html-caption" class="nivo-html-caption"> <strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a> </div>
You can create different kinds of lists, just by adding certain classes to the element.
<ul class="check"> <li>List element</li> </ul>
<ul class="cross"> <li>List element</li> </ul>
<ul class="mixed"> <li class="check">Checked list element</li> <li class="cross">Crossed list element</li> <li class="check">Checked list element</li> </ul>
Use columns to place elements side by side. You can specify the width of a column by the class name.
<p class=”one-third”>Some Text</p> <p class=”two-third last”>Some Text</p> <div class=”divider”></div>
Note: Make sure to add the class last to the last column and to put a divider below to clear the floats of the columns.
The following column class names are available:
You can use columns inside content-frame and frame and to position form elements. In a fullwidth page you can also add the class wide-columns to a wrapping element to make the column width bigger and the space between them smaller.
To make an image appear with rounded corners, add the class rounded to the image element.
<img src="picture.jpg" class=”rounded” />
Note: Some older Browsers may not support rounded corners (e.g. Internet Explorer < Version 9)
Technical Note: In order to use advanced CSS techniques and to minimize difficulties with certain Browsers, images with the class rounded will be rendered as background images.
Certain objects (e.g. Sliders) that can’t be rounded with the simple adding of a class, need to be wrapped in a <div> with the class rounded-box.
<div class="rounded-box"> <div class="slider automatic"> <img src="picture.jpg" /> </div> </div>
There are two ways to include Flash-Videos. Either you link it with the help of a Lightbox to play it, or you embed it directly into the page.
Note: Only the default Lightbox plugin prettyPhoto supports Flash-Videos. If you changed your Lightbox to Fancybox you will not be able to play Flash-Videos.
All what prettyPhoto needs, in order to play the video, is the URL. If you want to link to a YouTube-Video, just go to the video of your choice, click below on Share and copy the URL into your anker element.
<a rel="lightbox" href="http://www.youtube.com/watch?v=5L1wHSl_h8w"> <img src="picture.jpg" class="rounded" /> </a>
It works the same way with videos from the website vimeo.com.
To embed a Video from YouTube or Vimeo just go to the video page, click the share button, make some adjustments (e.g. 610 pixel width on pages with a sidebar or 940 pixel width on fullwidth pages), copy the source code and include it into your page.
If you want the corners of the video to be rounded, just add the class rounded to the object or iframe element.
You can also embed Flash-Videos directly on the Blog index (just like pictures):
... <div class="post-box"> <iframe class="rounded" src="http://player.vimeo.com/video/10988919?title=0&byline=0&portrait=0&color=ffffff" width="610" height="343" frameborder="0"></iframe> <p class="post-data"> <span class="date">December 21, 2010</span> <span class="categories"><a href="#">News</a>, <a href="#">Inspiration</a></span> <span class="comments"><a href="post.php#comments">9 Comments</a></span> </p> </div> ...
In this documentation I showed you how to implement the most important features.
You will find more code examples in the HTML files. Just look how they are done there and do it the same way or just copy the code and paste your own content in. It‘s really simple.
Among with the template come all PSD files needed to edit the different layout styles and colors. With these files you can even create your own unique layout style.
If you have any further questions, please use the comment section of this item at mojo-themes.com. This way other useres can benefit from the solution as well. I will try my best to answer every question.
The template is using the following external scripts and resources:
Again, thank you very much purchasing this template! I wish you all the best for the website that will grow out of it. If you want, you can post the URL of your final website in the comment section. I would really like to see how this template takes its place in the world wide web :)
Best regards,
Ruven Pelka