Peter's Blog

Redefining the Impossible

New Drupal Theme


Put my new Drupal theme in place on my site. Some design notes:

  • It is xhtml + css, no tables, hand coded. That means big time trial and error.
  • It uses fancy rounded corners and shadows as these have been fascinating me. It's more a technology thing than a statement. My design skills are not good enough for this to be a statement.
  • It uses the Drupal phptemplate engine.
  • For a development tool I wrote a python script that would allow me to code the html like this:
    <div id="abox">
        <style>
            background: blue;
            font-family: verdana;
        </style>
        Hello Peter.
    </div>
    
    The python script parses this using the HTMLParser library, extracts all the <style> declarations and automatically generates the css file, e.g:
    .abox {
        background: blue;
        font-family: verdana;
    }
    
    I found this a better way for me to work, without having to switch between an html file and a css file (a process akin to maintaining c and h files in C programming).
  • The screen is resizable, it doesn't restrict the viewer to a 600 pixel wide strip down the middle of their £1000 21 inch monitor.
  • Choosing a colour scheme is hard for an engineer, especially a male one. I used this colour scheme generator in an effort to make it tasteful.
  • Tested on:
    • Firefox 1
    • IE 5
    • IE 6
    • Opera 7.54
    • Mozilla 1.6
    • Lynx

If it is broken in your browser then please let me know, unless you use some old version of netscape or IE3 in which case you should be accustomed to broken web sites.


Filed under: drupal firefox python theme

Czar Says:

over 3 years ago

Dear Peter,

Your fresh theme looks very pleasant. I agree with you that having curved corners is fascinating (slashdot'ish).

One suggestion:

Set your site name image as background and try to use text on top; rather then your name being an image. It is good for the Google and other areas.

Regards,

Derek “Czar” pHanGuYe

Peter Says:

over 3 years ago

Thanks Czar,

It is an interesting thought about the title. It may boost the position of "Peter's Blog" in the rankings but I'm not sure anyone other than me ever searches for that. This site is way down the results for that search because there are a lot of Peter's with blogs. It is number 1 for "petersblog" though smile

Also, with text I would not be able to have a fancy drop shadow effect unless I used a special font or something.

I have set up the 'alt' attribute and many google is smart enough to use that.

Peter

Anonymous Says:

over 3 years ago

Great work! Hope to see it in the contrib repository at drupal.org someday. Congrats smile

Peter Says:

over 3 years ago

Thanks.

I'll think about contributing it, only I haven't themed everything: forums, calendars etc. I haven't even tried them out, they may be ok with the default Drupal theming.

Here is a zip file containing the theme, including a 'petersblog' logo. It's raw, no screenshot or anything. unzip it in /themes/pcw and it should work.

Sorry for use of zip file but I never have bothered to learn to make tar files.

Peter

Anonymous Says:

over 3 years ago

It looks nice. It even looks good on my very outdated Opera 6.

Not that anyone sensible is still using a browser that old, of course. But I thought you might like to know that everything degrades well.

I like your spam-guard, too. smile

Peter Says:

over 3 years ago

Thanks.

Peter

Comments are Closed