Today is a special day of days, my fifth wedding anniversary. My wife remarked "5 years. That's a drop in the bucket. We have a long way to go." I find that very comforting.
Be mine! Be mine forever. Take my hand, my ring and my name, and let me call you my wife for the rest of my days. She smiled sweetly, and my breath caught and my heart skipped a beat. Alright she said. But the name part is out.
Hacking the Blog ... in Hacking
I've been spending time researching Roller and slowly figuring out how to tweak the template. I'm constantly playing around with the style sheet, and seeing how much I can pull off there. So far it's been pretty simple - just tweaking values here and there. Initially the template used many styles that simply weren't defined, so it was a matter of adding them to the style sheet.
After reading gconf's blog, I was inspired to figure out how to add the category next to the entry title. Looking over Roller's macro documentation, I couldn't find the string I wanted. I was hoping there was a variation of showWeblogCategoryChooser, which is called in the beginning of the template:
<div id="Content">
<center>
<img src="http://blogs.sun.com/roller/resources/frosty/frostyland.title.v2.jpg"
width="435" height="120" border="0">
<p class="descrip">#showWebsiteDescription()</p>
#showWeblogCategoryChooser()<br>
</center>
#showWeblogEntries("_day" 15)
<hr />
#showReferers( 40 25 )
</div>
... but no such luck. Then I remembered reading that it is possible to subscribe to a blog's RSS feeds by category - so there had to be way then, right?. So off to the Roller Macro Reference to take a peek at the the rss velocimacro. And there it was in the template source:
<category>$entry.category.name</category>
So off to plug that in to my _day template file. And while I was at it, I made some other tweaks (spacing and alignment):
#foreach( $entry in $entries )
<a name="$entry.anchor" id="$entry.anchor"></a>
<b>$entry.title</b>
<span class="category"> ... <i>in</i> $entry.category.name</span>
$entry.text
<p align="right">
#showCommentsPageLink( $entry ) :
#showEntryPermalink( $entry ) :
<span class="dateStamp">($entry.pubTime)</span>
</p>
#end
I'm pleased with the results. It's not that hard, just takes a bit of persistence.
Next up is more style sheet tweaks and additions of classes, and to fix one of my biggest peaves, the <ul> tag. If you're a CSS hacker, you probably know about A List Apart. There's a great article about lists and how to customize the layout and appearance. You'd be surprised at what you can do with <ul>.



