[development] Default Theme for Drupal 4.8

Nick Lewis nick at smartcampaigns.com
Wed Mar 8 06:49:40 UTC 2006

Yesterday morning, Dries informed me of the following plans for 4.8:
1. A new default theme that is more slick. We're done with Bluemarine.
2. A dashboard module to replace the current main administration page 
3. A reorganization of the administration pages.
4. An install system.

I've been storming away at items 1,2 and 3 and didn't even know that 
there were already plans to put this in the next version. With this 
news, I'd like to offer my support to any current efforts, and to give 
an overview of what I've accomplished so far that could be of benefit to 
item one. I'd put my GPL work on the CVS, but I don't think I've been 
granted access yet. So, I'll just give a brief overview of where I'm at, 
and see who comes out of the woodwork (I know... 4.7's bugs... see 
bottom if you're pissed...).

For now, I'll spare y'all and keep it to item one:

1.So I've been working on one theme, Curved_Slate, but a variety of 
factors (my stupid head, the experiemental nature, and the so far 
disorganized approach to version tracking have lead it to be bugtacular 
for the moment.) I'm currently in the process of going backwords, and 
modularizing it into a a lightweight configuration, which can be easily 
extened into the heavy weight configuration. If no work has been done 
thus far on the default theme for 4.8, a lightweight distro (no js, or 
experiemental scripts, just templates, art and CSS) might provide a good 
starting point.

The theme is has largely solved a number of persistant drupal themeing 
problems -- namely:
1. all css
2. .main-content expands and contracts smoothly in response to various 
$layout configurations.
3. all  columns  grow and shrink perfectly to fit any page height
4. page.tpl.php ordered content, sidebars, footer.
5. min-max width support in both firefox and safari (albeit, by way of 
an ugly hack): [see: 
6.A page.tpl.php file that nevertheless looks an awful lot like good old 
7. Only two wrapper divs
8. You can easily (especially with some PHP scripting) expand and 
contract the columns or #main div to fit whatever needs you have.

The theme most likely doesn't support IE5 (IE5 -- the great ugly stick 
of websites...) -- but I don't really care, and my guess is it would be 
more to drupal's benefit to focus on the 95% of web users who use modern 
browsers, than to settle for tables and hacks so that grandma on the mac 
classic can keep up with her persistant reading of online content 
(though my grandma tells me she's enjoyed reading my blog -- and she 
uses IE 4!, so it might not be so bad... but grandmas lie sometimes....) 
And, we could always keep bluemarine around for her. It wouldn't be 
terribily difficult to setup something to detect browsers that won't 
support standards, and serve them a crappy-browser-safe theme.

Anyways, I'd be happy to throw my efforts this direction, but don't want 
to step on any toes, so let me know if your working on the same thing. 
Otherwise, provided I can login to the CVS, I'd be happy to CVS-itize a 
bare bones version of my theme as a place to start.

A sidenote:
---Curvy Corners, a dream that Rico's Apache Liscense prevents---

I know practically nothing about Javascript...  but... this is what I've 
hacked together to generate curved corners.

The curved corners script is now a 15 kilobyte dandy (down from Rico's 
150kb library).
sourcecode: http://nicklewis.smartcampaigns.com/modules/jstoolbox/rico.js

However, practical considerations (such as making it dead simple to 
implement curved corners) have forced me to use a patched Prototype 1.5 
beta library
source code: 

While this approach is still buggy, and their are other techniques like 
sliding doors (when considering how short life actually is, sliding 
doors looks like less and less of an ideal solution), with those two 
scripts included, I can generate a curved corner around any part of the 
site. Take a look at the code that actually creates those corners on my 

<script type="text/javascript">
var roundCorners = Rico.Corner.round.bind(Rico.Corner);
roundCorners('div#top-nav', {corners:'bl br'});
roundCorners('.sidebar div.block',{border:'#eeeeee'});

I'd argue that the simplicity of the Javascript solution is beautiful (I 
realize that its lacking in a lot of areas that developers tend to focus 
on, but for mid-level users, this stuff is golden). Its not something 
that other CMS's offer, and I think its a subtle feature that could set 
drupal apart. If anyone has any insight into this it would be very 

That's enough for one night (er... morning for y'all continentals).

Nick Lewis

Reference: page.tpl.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language 
?>" xml:lang="<?php print $language ?>">
        <title><?php print $head_title ?></title>
    <?php print $head ?>
    <?php print $styles ?>
<div id="main" class="<?php print $layout; /*THIS CLASS ALLOWS SIDEBARS 
<?php if ($site_name) : ?>
    <div id="site-name">
        <h1><a href="<?php print url() ?>" title="Index Page"><?php 
print($site_name) ?></a></h1>
 <?php endif;?>
<div id="header">
     <?php if ($site_slogan) : ?>
         <span id="site-slogan">
            <?php print($site_slogan) ?>
     <?php endif;?>
<div id="primary-menu">
    <?php print $primary_links; ?>
    <br class="clear" />
<div id="columns" class="show-all" >
    <div class="cols-wrapper">
         <div class="float-wrapper">
<div id="content">
    <div class="main-content">
    <?php if ($mission) { ?>
        <div id="mission">
            <?php print $mission ?>
    <?php } ?>
        <?php print $tabs; ?>
    <?php /*Supress content title if page is the front page */if 
(!$is_front) { ?>
        <h1 class="content-title"><?php print $title ?></h1>
    <?php } ?>
            <?php print $help ?>
            <?php if ($messages) { ?>
            <div id="message">
                <?php print $messages ?>
            <?php } ?>
<?php print $content; ?>
<?php print $breadcrumb ?>
/* remove all columns if $layout variable returns  as "nosidebars" (see 
template.php file) */
 if ($layout != "nosidebars") {
    <?php if ($sidebar_left) { ?>
        <div id="sidebar-left" class="sidebar">
        <?php print $sidebar_left ?>
    <?php } ?>
    <?php if ($layout != "left") { ?>
    <?php if ($sidebar_right) { ?>
        <div id="sidebar-right" class="sidebar">
        <?php print $sidebar_right ?>
    <?php } ?> 
        <?php } ?>
<?php } ?> 
<div class="clear" id="em"></div>
    <div id="footer">
        <?php print $footer_message ?>
        <?php print $closure ?>
<?php include "$onload_js"; ?>

For uppity folk:
I'm sorry, but I am swamped with work, and don't have time (or really 
the programming knowledge) to take on those bugs -- however, all of my 
"put a roof over your head" work is directly related to these goals of 
4.8 -- I figure some contribution is better than no contribution.  I'm 
very interested in having my efforts pay off for drupal as a whole. 
That's my excuse and I'm sticking to it.

More information about the development mailing list