Thursday, July 21, 2005

Restyling

Everything I know about CSS I learned from experimenting with Movable Type. And you may or may not care that I've never upgraded.  EWM is vintage MT 2.65.  I've installed new versions of MT for other folks (another install just a few days ago, in fact), but I've never gotten around to upgrading my own weblog.  Could be the lag reflects my felt knowledge that the new version would come with a slightly different set of class and id tags.  No hurry to bother with it.

In the early months of this weblog, I doctored the style sheet in TopStyle Lite--the mediocreware that comes with something else I have on my system (Dreamweaver 4? Old but good enough, and my software budget...paltry).  But shortly after getting hooked on Firefox, I came upon Edit CSS, a browser plugin that reveals the style sheet of any site (yeah, I can probably access the CSS of your site, lift and modify bits of code and put them to my own uses).  Because MT keeps all of its CSS definitions in a single style sheet, it's quite easy to tweak.  The changes, using Edit CSS automatically reflect on the page as it appears in the browser window.  It's a live what-if enactment.  To save changes, copy and paste the modified CSS definitions into the template and do a quick rebuild. (Honestly, I don't know whether everyone already knows this).  The code in my style sheet is unorthodox--a mish-mash of what-ifs, both kept and unkempt, a stash of aberrant and idle lines (among the pieces doing the work).

I installed a Wordpress weblog just to mess around with it, try it out.  But I found that the style sheets were split up.  No good.  Like five hair products and five combs. I want a single style sheet that cascades through the site.  Lazy that way.  Seemed like a lot of work to do a redesign in multiple style sheets, especially when the class and id tags are unfamiliar.

So what's with all this blog talk?  Well, someone asked me about design, and I've been dropping in a few plugins, floating the blog on some new .pl scripts.  Among the latest plugins: MTDropcap, MTKeywords, MTLoop, MTGlue and MTRandomLine.  Unsurprisingly, MTDropcap is doing the work of dropping the caps that begin each entry.  Into the main index template:

<MTDropCap>
<MTDropCapFormat>
<span class="drop"><$MTDropCapLetter$></span>
</MTDropCapFormat>
<$MTEntryBody$>
</MTDropCap>

Into the style sheet:

/*dropcap*/
.drop {
float: left;
padding: 0px 5px 5px 3px;
font-size: 62px;
line-height: 51px;
font-weight: none;
color:#444B60;
font-family: georgia, times;
}

MTRandomline refs a template file with a list of quotations--the ones you'll find at the bottom of this main page and also at the foot of each page in the individual entry archive.  Randomline regenerates only when a page is rebuilt, but because I have comments showing here, a different (or the same, it's random) quotation will cycle in with each new comment.  I'm going to wait a while before rolling out the keywords, loop, glue combination.  More on that another time. Why randomline rather than php?  Some of the php stuff I've tried busies the server with extraneous processes (this is probably myth, but I had trouble with too many processes invoking when I was running a random image script some time ago).

Here's the tagging for RandomLine. 

<table class="headfoot" align="center">
<tr> <td class="headfoot" align="center">
<$MTRandomLine module="quotations"$></td></tr></table>

Easy.  Presumably, it can pull anything, so it would be possible to have a Randomline module that invokes images, text or some combination.

Bookmark and Share Posted by at July 21, 2005 10:35 PM to On Weblogs
Comments

Funny, D. I also learned everything I know about CSS from messing w/ MT. Not a bad way to learn.

Posted by: Jenny Edbauer at July 24, 2005 10:29 AM

I like to think I've learned CSS okay, but then I'm pretty sure that the style sheets are filled with great bumbling messiness. Hey, what works, right?

Posted by: Derek at July 24, 2005 4:09 PM