<?xml version="1.0" encoding="UTF-8"?>
<article>
  <content>Over the years, I have had the great pleasure of working with the Midnite Youth Theatre Company on a number of their Perth based productions. Naturally, I decided they _had_ to have a website!

It started out in a Plone/Zope setup - it was a nightmare - documentation on theming was thin on the ground and getting people to maintain it was even harder as the backend UI wasn't that friendly for those not as technically savvy as the authors of the system.

The site died for a while - motivation was low after the initial failure - then about a year and a half later, we found a home in the Wordpress blogging platform. It was easy enough to tweak for more of a CMS feel, the backend UI made sense - things were on the up.

Thankfully, there's not a &quot;but&quot; at the end of that sentence! The site's had 9 or 10 redesigns since (we went through a phase of having a new theme each time a production was being performed - a management nightmare!) and visits to the site are slowly, but surely, on the increase.

We're slowly outgrowing Wordpress though - it's primary purpose is to be a blogging platform, not a full blown content management system that can incorporate a database of all Midnite's productions (with venue details, 8 different tiers of pricing to display etc), sell tickets (one day, one day....) etc, so it was time to move on.

What we're going to end up with (the bugs are still being ironed out) once the new site is live will be something more flexible and hopefully something that better caters for the needs of Midnite.

I couldn't help writing this post however to talk about the HTML and CSS we're using to build the thing - HTML5 and CSS3 are getting a workout on this project and it excites me (but, as you'll hear, also brought me to tears at points)

![Midnite Youth Theatre Company's new site](/images/redesigning-midnite/midnitepreview.png &quot;Midnite Youth Theatre Company's new site&quot;)

The thing I like most about working on the Midnite site pro-bono is that I get a lot of creative liberties - as I mentioned, this design iteration makes use of the new HTML5 and CSS3 specifications that are in development at the moment.

Let's step through some of the new parts of the spec I'm using on the site with the HTML and CSS to match:

## Rounded corners ##

&lt;img src=&quot;/images/redesigning-midnite/roundedcnr.png&quot; alt=&quot;Rounded corner example from the new MYTC website&quot; /&gt;

The CSS used to generate this looks a little like this:

@@@ css
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
@@@

Yeah, the browser specific declarations are a little annoying, but hey, not having to do it with javascript or thousands of CSS lines dedicated to images for each corner has got to be a bonus!

## @font-face (or Font Embedding) ##

&lt;img src=&quot;/images/redesigning-midnite/font.png&quot; alt=&quot;Font embeding on the new Midnite Youth Theatre Company website&quot; /&gt;

Guess what  - it even works in IE 6 - sure, you have to use a strange format that only Microsoft care about, but it works!

@@@ css
@font-face {
  font-family: 'LeagueGothicRegular';
  src: url('../fonts/League_Gothic.eot');
  src: local('League Gothic Regular'), local('LeagueGothic'), url('../fonts/League_Gothic.otf') format('opentype'), url('../fonts/League_Gothic.svg#LeagueGothic') format('svg'); }
@@@

You have to use the .eot format for IE6 and have it on it's own line so it can be picked up and used, but there's a handy tool for generating all the right font files and the CSS markup to match that can be found over at &lt;a href=&quot;http://www.fontsquirrel.com/fontface/generator&quot;&gt;Font Squirrel&lt;/a&gt;.

Using the font you've just declared isn't hard either:

@@@ css
font-family: &quot;LeagueGothicRegular&quot;, Gill Sans, Verdana, sans-serif;
@@@

## Sprites ##

Image sprites aren't new news by any stretch of the imagination - there's talk they will make an appearance in the final &lt;a href=&quot;http://www.w3.org/TR/css3-images&quot;&gt;CSS3 spec&lt;/a&gt;, at the moment however, there's just a placeholder with a lot of discussion about whether sprites belong in the spec and if so, what the syntax should be.

The new Midnite site makes use of them in their current state though, as depicted below:

&lt;img src=&quot;/images/redesigning-midnite/hover.png&quot; alt=&quot;An example of CSS sprites from the Midnite website&quot; /&gt;

Once again, here's the CSS:

@@@ css
.season {
  // Unimportant bits left out
  background-image: url(&quot;../images/season2010.png&quot;);
  background-position: 0 0;
  height: 176px;
  width: 450px; }
@@@

And for the hover effect:

@@@ css
.season:hover {
  background-position: 0 -176px; }
@@@

Now, I mentioned earlier that there were tears - you've already had the rant about EOT files for @font-face declarations, but there's one for CSS sprites as well!

IE6 and below don't support the :hover selector on elements other that anchor &lt;code&gt;&lt;a&amp;gt;&lt;/code&gt; tags, which makes my CSS above somewhat useless in a browser that is only starting now to lose its stranglehold on the market.

Easy fix though - (1) &lt;a href=&quot;http://www.kavoir.com/wp-content/uploads/2009/01/csshover3.htc&quot;&gt;get this file&lt;/a&gt;; (2) put the following CSS in your pipe and make IE6 smoke it:
@@@ css
body {
  behavior:url(&quot;/styles/csshover3.htc&quot;); }
@@@

Hat-tip: make sure that path is absolute (i.e. falls off the root '/') as the URL is relative to the page, not the CSS file location.

Once you have that tiny hack in place, your sprites work in IE6+, FF and Webkit.

## RGBA ##

We're using RGBA for our navigation link hovers (so you can see the stars faintly behind even when you hover)

&lt;img src=&quot;/images/redesigning-midnite/rgba.png&quot; alt=&quot;RGBa example&quot; /&gt;

RGBA is the new kid on the block for declaring colours with their alpha, or transparency set. I'd talk about it here, but Drew McLellan explains it far better over at &lt;a href=&quot;http://24ways.org/2009/working-with-rgba-colour&quot;&gt;his 2009 24 ways article&lt;/a&gt;.

## HTML5 ##

So I've really only spoken about the CSS stuff we're doing to this point and frankly, the HTML5 stuff is more structure than eye candy, but the new &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;,  &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;aside&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt; tags are getting a workout and I enjoy the semantics of the markup - it feels cleaner to me than having div's all over the place with ID's like #header and #footer.

I'd encourage you to read such good websites as &lt;a href=&quot;http://diveintohtml5.org&quot;&gt;Dive into HTML5&lt;/a&gt; and &lt;a href=&quot;http://html5doctor.com/&quot;&gt;HTML5 Doctor&lt;/a&gt; for more on getting started using HTML5 today - &lt;a href=&quot;http://smashingmagazine.com&quot;&gt;Smashing Magazine&lt;/a&gt; also have a couple of good articles, as do &lt;a href=&quot;http://24ways.org&quot;&gt;24 ways&lt;/a&gt;</content>
  <created-at type="datetime">2009-12-29T13:54:16Z</created-at>
  <id type="integer">3</id>
  <parsed>&lt;p&gt;Over the years, I have had the great pleasure of working with the Midnite Youth Theatre Company on a number of their Perth based productions. Naturally, I decided they &lt;em&gt;had&lt;/em&gt; to have a website!&lt;/p&gt;&lt;p&gt;It started out in a Plone/Zope setup - it was a nightmare - documentation on theming was thin on the ground and getting people to maintain it was even harder as the backend UI wasn't that friendly for those not as technically savvy as the authors of the system.&lt;/p&gt;&lt;p&gt;The site died for a while - motivation was low after the initial failure - then about a year and a half later, we found a home in the Wordpress blogging platform. It was easy enough to tweak for more of a CMS feel, the backend UI made sense - things were on the up.&lt;/p&gt;&lt;p&gt;Thankfully, there's not a &quot;but&quot; at the end of that sentence! The site's had 9 or 10 redesigns since (we went through a phase of having a new theme each time a production was being performed - a management nightmare!) and visits to the site are slowly, but surely, on the increase.&lt;/p&gt;&lt;p&gt;We're slowly outgrowing Wordpress though - it's primary purpose is to be a blogging platform, not a full blown content management system that can incorporate a database of all Midnite's productions (with venue details, 8 different tiers of pricing to display etc), sell tickets (one day, one day....) etc, so it was time to move on.&lt;/p&gt;&lt;p&gt;What we're going to end up with (the bugs are still being ironed out) once the new site is live will be something more flexible and hopefully something that better caters for the needs of Midnite.&lt;/p&gt;&lt;p&gt;I couldn't help writing this post however to talk about the HTML and CSS we're using to build the thing - HTML5 and CSS3 are getting a workout on this project and it excites me (but, as you'll hear, also brought me to tears at points)&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/images/redesigning-midnite/midnitepreview.png&quot; title=&quot;Midnite Youth Theatre Company's new site&quot; alt=&quot;Midnite Youth Theatre Company's new site&quot;&gt;&lt;/p&gt;&lt;p&gt;The thing I like most about working on the Midnite site pro-bono is that I get a lot of creative liberties - as I mentioned, this design iteration makes use of the new HTML5 and CSS3 specifications that are in development at the moment.&lt;/p&gt;&lt;p&gt;Let's step through some of the new parts of the spec I'm using on the site with the HTML and CSS to match:&lt;/p&gt;&lt;h2&gt;Rounded corners&lt;/h2&gt;&lt;p&gt;&lt;img src=&quot;/images/redesigning-midnite/roundedcnr.png&quot; alt=&quot;Rounded corner example from the new MYTC website&quot;&gt;&lt;/p&gt;&lt;p&gt;The CSS used to generate this looks a little like this:&lt;/p&gt;&lt;div class=&quot;highlight css code highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nt&quot;&gt;-webkit-border-top-left-radius&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;-moz-border-radius-topleft&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;border-top-left-radius&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Yeah, the browser specific declarations are a little annoying, but hey, not having to do it with javascript or thousands of CSS lines dedicated to images for each corner has got to be a bonus!&lt;/p&gt;&lt;h2&gt;@font-face (or Font Embedding)&lt;/h2&gt;&lt;p&gt;&lt;img src=&quot;/images/redesigning-midnite/font.png&quot; alt=&quot;Font embeding on the new Midnite Youth Theatre Company website&quot;&gt;&lt;/p&gt;&lt;p&gt;Guess what  - it even works in IE 6 - sure, you have to use a strange format that only Microsoft care about, but it works!&lt;/p&gt;&lt;div class=&quot;highlight css code highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;@font-face&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'LeagueGothicRegular'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'../fonts/League_Gothic.eot'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;local&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'League Gothic Regular'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;local&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'LeagueGothic'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'../fonts/League_Gothic.otf'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'opentype'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'../fonts/League_Gothic.svg#LeagueGothic'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'svg'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You have to use the .eot format for IE6 and have it on it's own line so it can be picked up and used, but there's a handy tool for generating all the right font files and the CSS markup to match that can be found over at &lt;a href=&quot;http://www.fontsquirrel.com/fontface/generator&quot;&gt;Font Squirrel&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Using the font you've just declared isn't hard either:&lt;/p&gt;&lt;div class=&quot;highlight css code highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nt&quot;&gt;font-family&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;LeagueGothicRegular&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;Gill&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;Sans&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;Verdana&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;sans-serif&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;h2&gt;Sprites&lt;/h2&gt;&lt;p&gt;Image sprites aren't new news by any stretch of the imagination - there's talk they will make an appearance in the final &lt;a href=&quot;http://www.w3.org/TR/css3-images&quot;&gt;CSS3 spec&lt;/a&gt;, at the moment however, there's just a placeholder with a lot of discussion about whether sprites belong in the spec and if so, what the syntax should be.&lt;/p&gt;&lt;p&gt;The new Midnite site makes use of them in their current state though, as depicted below:&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/images/redesigning-midnite/hover.png&quot; alt=&quot;An example of CSS sprites from the Midnite website&quot;&gt;&lt;/p&gt;&lt;p&gt;Once again, here's the CSS:&lt;/p&gt;&lt;div class=&quot;highlight css code highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nc&quot;&gt;.season&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Unimportant&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;bits&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;out&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;background-image&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sx&quot;&gt;url(&quot;../images/season2010.png&quot;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;background-position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;176px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;450px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And for the hover effect:&lt;/p&gt;&lt;div class=&quot;highlight css code highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nc&quot;&gt;.season&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:hover&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;background-position&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;-176px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, I mentioned earlier that there were tears - you've already had the rant about EOT files for @font-face declarations, but there's one for CSS sprites as well!&lt;/p&gt;&lt;p&gt;IE6 and below don't support the :hover selector on elements other that anchor &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tags, which makes my CSS above somewhat useless in a browser that is only starting now to lose its stranglehold on the market.&lt;/p&gt;&lt;p&gt;Easy fix though - (1) &lt;a href=&quot;http://www.kavoir.com/wp-content/uploads/2009/01/csshover3.htc&quot;&gt;get this file&lt;/a&gt;; (2) put the following CSS in your pipe and make IE6 smoke it:
&lt;/p&gt;
&lt;div class=&quot;highlight css code highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nt&quot;&gt;body&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;behavior&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;sx&quot;&gt;url(&quot;/styles/csshover3.htc&quot;)&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Hat-tip: make sure that path is absolute (i.e. falls off the root '/') as the URL is relative to the page, not the CSS file location.&lt;/p&gt;&lt;p&gt;Once you have that tiny hack in place, your sprites work in IE6+, FF and Webkit.&lt;/p&gt;&lt;h2&gt;RGBA&lt;/h2&gt;&lt;p&gt;We're using RGBA for our navigation link hovers (so you can see the stars faintly behind even when you hover)&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/images/redesigning-midnite/rgba.png&quot; alt=&quot;RGBa example&quot;&gt;&lt;/p&gt;&lt;p&gt;RGBA is the new kid on the block for declaring colours with their alpha, or transparency set. I'd talk about it here, but Drew McLellan explains it far better over at &lt;a href=&quot;http://24ways.org/2009/working-with-rgba-colour&quot;&gt;his 2009 24 ways article&lt;/a&gt;.&lt;/p&gt;&lt;h2&gt;HTML5&lt;/h2&gt;&lt;p&gt;So I've really only spoken about the CSS stuff we're doing to this point and frankly, the HTML5 stuff is more structure than eye candy, but the new &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;,  &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;aside&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt; tags are getting a workout and I enjoy the semantics of the markup - it feels cleaner to me than having div's all over the place with ID's like #header and #footer.&lt;/p&gt;&lt;p&gt;I'd encourage you to read such good websites as &lt;a href=&quot;http://diveintohtml5.org&quot;&gt;Dive into HTML5&lt;/a&gt; and &lt;a href=&quot;http://html5doctor.com/&quot;&gt;HTML5 Doctor&lt;/a&gt; for more on getting started using HTML5 today - &lt;a href=&quot;http://smashingmagazine.com&quot;&gt;Smashing Magazine&lt;/a&gt; also have a couple of good articles, as do &lt;a href=&quot;http://24ways.org&quot;&gt;24 ways&lt;/a&gt;&lt;/p&gt;</parsed>
  <slug>redesigning-midnite</slug>
  <title>Redesigning Midnite</title>
  <updated-at type="datetime">2009-12-29T13:57:36Z</updated-at>
</article>
