In an effort to get some more good quality themes ready for the next release of dasBlog, I’m going to host a little contest.
Introducing...
The idea is simple. Submit a new dasBlog theme, created by you, using valid XHTML and CSS. Entries should be original and should be zipped up and sent to me at subdigital_AT_gmail_DOT_com.
Are you ready for the prize? How about …
The rules:
The prize for this contest has been donated by Scott Hanselman and myself.
Creating a theme is simple! The best way to learn is to open up one of the existing themes and take a look. The basic structure of a theme is this:
Inside of your dasBlog directory there is a themes folder:
Each theme that you want to create (or install) goes in its own folder. dasBlog ships with over 20 themes currently, so there are a lot to choose from as a starting point. If you open the directory and take a look, you’ll see a folder for each.
Let’s take a look at mono.
Inside of the specific theme’s folder you’ll find all artifacts for the theme. Any images, css, or template files go in here.
As you can see, there isn’t much to it…
Notice the theme.manifest file here. This is just a text file telling dasBlog that this folder is a theme and mono is its name.
You also have the opportunity to add named images, but you don’t have to do that if you don’t want to.
The next thing I want to open up are the 3 template files:
I will show the homeTemplate right here, just to give you an idea of what it’s like to edit the themes.
Most of this is standard XHTML, however you’ll notice the macro tags marked with <% %>. These will be picked up by the renderer and replaced with whatever the macro calls for. For example, to tell dasBlog to output your administration bar at a certain location, you’d write <% newtelliigence.adminBar()%>.
For a complete list of dasBlog macros, check John Forsythe’s page on macros: http://www.jforsythe.com/jforsythe/projects/dasBlogMacros.html
That’s enough of an introduction to get you started, so….
I'm Ben Scheirman. I am a .NET software developer with a strong interest in agility. I work as a Principal Consultant with Sogeti.
Read more here.
email me
Ads by The Lounge
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.