<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Modest Construct &#187; web design</title>
	<atom:link href="http://heliologue.com/tag/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://heliologue.com</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 17:18:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using YUI compressor in a web project</title>
		<link>http://heliologue.com/2008/09/22/using-yui-compressor-in-a-web-project/</link>
		<comments>http://heliologue.com/2008/09/22/using-yui-compressor-in-a-web-project/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 23:35:42 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://heliologue.com/?p=2692</guid>
		<description><![CDATA[Last year, I moved our small programming department from using JDeveloper and editing shared files directly on a network drive to using Netbeans 6.x and a proper version control system (Subversion). After the initial learning curve, this has all been going swimmingly. I merged my first development branch into the trunk yesterday, and this branch [...]]]></description>
			<content:encoded><![CDATA[<p>Last year, I moved our small programming department from using JDeveloper and editing shared files directly on a network drive to using Netbeans 6.x and a proper version control system (Subversion).</p>
<p>After the initial learning curve, this has all been going swimmingly.  I merged my first development branch into the trunk yesterday, and this branch just so happens to dovetail nicely into the whole point of this post, which is the <a href="http://developer.yahoo.com/yui/compressor/">YUI compressor</a>, an open-source javascript and CSS minification tool developed by Yahoo&#8217;s <abbr title="Yahoo User Interface">YUI</abbr> team.</p>
<p><span id="more-2692"></span></p>
<h3>The Problem</h3>
<p>To understand quickly why one should minify production client-side code, consider only that with the upward trend of size in javascript libraries (and the necessary files for such libraries), it&#8217;s possibly to be downloading a <em>lot</em> of client-side code in a typical web application, especially as its scope grows.</p>
<p>For a long time, I was using <a href="http://dean.edwards.name/packer/">Dean Edward&#8217;s Packer</a>, as was everyone, because its Base62 encoding produced the very lowest file size.  However, what should have been obvious to everyone is that <code>eval(bunch_of_stuff_goes_here)</code> is making the browser do a lot more work, and this is a problem on dinosaurs like IE6.  </p>
<p>To make matters worse, the nature of such encoding also meant that for servers which tried to compress outgoing content like javascript (either with zlib or gzip), the compression ratio suffered.  Just look at this table that Julien Lecomte posted last August.</p>
<table class="sortable rowstyle-even">
<caption>Javascript compression</caption>
<thead>
<tr>
<th class="sortable-text">File</th>
<th class="sortable-numeric">File size (bytes)</th>
<th class="sortable-numeric">Gzipped file size (bytes)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Original jQuery libraries</td>
<td>62,885</td>
<td>19,758</td>
</tr>
<tr>
<td>jQuery minified with <a href="http://www.crockford.com/javascript/jsmin.html">JSMin</a></td>
<td>36,391</td>
<td>11,541</td>
</tr>
<tr>
<td>jQuery minified with Packer</td>
<td>21,557</td>
<td>11,119</td>
</tr>
<tr>
<td>jQuery minified with the YUI compressor</td>
<td>31,822</td>
<td>10,818</td>
</tr>
</tbody>
</table>
<p>I said to myself, &#8220;Hey, we use a lot of this stuff, and we still support a lot of users with slow computers and slow browsers.&#8221;  So, I moved our project from a Packer-based compression to a YUI-based compression, and turned on server-side GZIP compression for javascript files.  The only problem was that I was storing the javascript files already minified, and simply pasted them into a large a couple of large global <code>.js</code> files.  I had to keep a separate source directory, along with any customizations.</p>
<p>This got to be a pain in the ass, as you might well expect, and so when it occurred to me that I might be able to use the YUI library at build-time in our Netbeans project, I immediately sprung into action.</p>
<p>This was around April, and one night while attending <a href="http://heliologue.com/2008/04/13/anaheim-and-other-larks/">Sungard Summit</a> in Anaheim.  I did the initial work to get our Netbeans project into a state that could use the YUI compressor at build-time, creating separate source file directories and breaking our massive javascript file into modules;  I did the same with our CSS, splitting it up based on what it decorated.</p>
<p>There are a few tutorials about using the YUI library.  <a href="http://blog.gomilko.com/2007/11/29/yui-compression-tool-as-ant-task/">Some of them</a> involve adding the YUI library to Ant&#8217;s classpath (didn&#8217;t want to go down this route); <a href="http://www.henke.ws/machblog/index.cfm?event=showEntry&#038;entryId=8A5CAB53-19B9-BA51-EECADB57919F9714">a lot of them</a> involve invoking the library as an external executable during the build process, which is messy.</p>
<p>The solution I finally settled on was <a href="http://code.google.com/p/javaflight-code/">yui-compressor-ant-task</a>, a small library that allows Ant to use YUI as a build task.  By adding this library and the YUI compressor library to our common libraries folder, and enabling them at build only (and not for deploying in the web archive), it makes using the compressor pretty easy.</p>
<p>Here&#8217;s part of our <code>build.xml</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">   * minify will concatenate all of our non-TinyMCE javascripts and stylesheets</span>
<span style="color: #808080; font-style: italic;">   * then use the YUI compressor library to compress them</span>
<span style="color: #808080; font-style: italic;">   --&gt;</span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;minify&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
       <span style="color: #808080; font-style: italic;">&lt;!--${libs} is path to the downloaded jars --&gt;</span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span></span>
<span style="color: #009900;">           <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;yui-compressor.jar&quot;</span></span>
<span style="color: #009900;">           <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${file.reference.yuicompressor.jar}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span></span>
<span style="color: #009900;">           <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;yui-compressor-ant-task.jar&quot;</span></span>
<span style="color: #009900;">           <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${file.reference.yui-compressor-ant-task.jar}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;path</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;task.classpath&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${yui-compressor.jar}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pathelement</span> <span style="color: #000066;">location</span>=<span style="color: #ff0000;">&quot;${yui-compressor-ant-task.jar}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
       <span style="color: #808080; font-style: italic;">&lt;!-- yui-compressor task definition --&gt;</span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;taskdef</span></span>
<span style="color: #009900;">           <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;yui-compressor&quot;</span></span>
<span style="color: #009900;">           <span style="color: #000066;">classname</span>=<span style="color: #ff0000;">&quot;net.noha.tools.ant.yuicompressor.tasks.YuiCompressorTask&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;classpath</span> <span style="color: #000066;">refid</span>=<span style="color: #ff0000;">&quot;task.classpath&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/taskdef<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
       <span style="color: #808080; font-style: italic;">&lt;!-- concatenation of javascript --&gt;</span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Building global javascript&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;concat</span> <span style="color: #000066;">destfile</span>=<span style="color: #ff0000;">&quot;${build.dir}/web/common/js/global.js&quot;</span> <span style="color: #000066;">force</span>=<span style="color: #ff0000;">&quot;no&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
           <span style="color: #808080; font-style: italic;">&lt;!-- explicitly order js concat because ordering matters here --&gt;</span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.bgiframe.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.hoverIntent.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/ui.core.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/ui.autocomplete.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/ui.datepicker.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/ui.tabs.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/tablesort.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/customsort.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.blockUI.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.form.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.ifixpng.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.superfish.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.cluetip.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.scrollTo.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.jqModal.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/validation.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/js/jquery.timeentry.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/concat<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
       <span style="color: #808080; font-style: italic;">&lt;!-- concatenation of cascading stylesheets --&gt;</span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Building global cascading stylesheets&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;concat</span> <span style="color: #000066;">destfile</span>=<span style="color: #ff0000;">&quot;${build.dir}/web/common/css/global.css&quot;</span> <span style="color: #000066;">force</span>=<span style="color: #ff0000;">&quot;no&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/base.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/superfish.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/announcements.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/myvt.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/forms.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/cluetip.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>   
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/tables.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/ui.tabs.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/ui.datepicker.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/ui.autocomplete.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/linkspan.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/stepMenu.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/print.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">includes</span>=<span style="color: #ff0000;">&quot;web/common/css/youHaveMessages.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/concat<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
       <span style="color: #808080; font-style: italic;">&lt;!-- invoke compressor --&gt;</span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;yui-compressor</span> <span style="color: #000066;">warn</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">charset</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span> <span style="color: #000066;">fromdir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;web/common/js/global.js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;web/common/css/global.css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/yui-compressor<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
   <span style="color: #808080; font-style: italic;">&lt;!--</span>
<span style="color: #808080; font-style: italic;">   * purge-src takes our compressed files, moves them to the base /common dir</span>
<span style="color: #808080; font-style: italic;">   * and deletes the source js and css dirs from the build dir</span>
<span style="color: #808080; font-style: italic;">   --&gt;</span>
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;purge-src&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;minify&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Purging javascript and stylesheet sources&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;move</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${build.dir}/web/common/js/global-min.js&quot;</span> <span style="color: #000066;">tofile</span>=<span style="color: #ff0000;">&quot;${build.dir}/web/common/global.js&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;move</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${build.dir}/web/common/css/global-min.css&quot;</span> <span style="color: #000066;">tofile</span>=<span style="color: #ff0000;">&quot;${build.dir}/web/common/global.css&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}/web/common/js&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}/web/common/css&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
   <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>What you see there is essentially four steps.</p>
<ol>
<li>Concatenate all the constituent source files into a <code>global.js</code> and a <code>global.css</code></li>
<li>Compress both of these files, which creates <code>global-min.js</code> and <code>global-min.css</code> (default behavior)</li>
<li>Move these files out of the source directories and into the root of the common web directory as <code>global.js</code> and <code>global.css</code></li>
<li>Delete the source directories in our build folder so they don&#8217;t get deployed with the web archive</li>
</ol>
<p>Because certain browsers (IE) break without explicit ordering, we unfortunately can&#8217;t just use &#8220;*.js&#8221; and &#8220;*.css&#8221; in our concatenation step, but having to explicitly list our components in the build file certainly isn&#8217;t the end of the world.  The nice thing is that the Ant task will even print out handy statistics on just how much you&#8217;ve been able to compress the files down.  In our case, we have about 441.8KB of common Javascript and CSS in our source code that, by the time it gets sent to the user, has been minified and/or gzipped to about 89KB.</p>
]]></content:encoded>
			<wfw:commentRss>http://heliologue.com/2008/09/22/using-yui-compressor-in-a-web-project/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Creating an admissions dashboard</title>
		<link>http://heliologue.com/2008/09/11/creating-an-admissions-dashboard/</link>
		<comments>http://heliologue.com/2008/09/11/creating-an-admissions-dashboard/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 19:02:16 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://heliologue.com/?p=2354</guid>
		<description><![CDATA[This entry pertains to work done in the context of my employment. Please remember, however, that any opinions expressed on this blog do not necessarily reflect those of my employer or co-workers. The Problem Admissions needed help. They had been moved from their former product, Exeter, to Banner&#8217;s native admissions module. But Banner&#8217;s interface stinks, [...]]]></description>
			<content:encoded><![CDATA[<p class="alert">
This entry pertains to work done in the context of my employment.  Please remember, however, that any opinions expressed on this blog do not necessarily reflect those of my employer or co-workers.
</p>
<h3>The Problem</h3>
<p>Admissions needed help.  They had been moved from their former product, Exeter, to Banner&#8217;s native admissions module.  But Banner&#8217;s interface stinks, and there was no decent way for counselors to do, well, anything.  They relied on daily reports run out of an Excel pivot table by the executive directory of admissions, and therefore they lived on paper.  The counselors needed a better way to get their work done and stay on top (figuratively speaking) of their recruits.</p>
<p>Enter my department.  It fell to us, after some discussion, to build a tool that would be initial for undergraduate counselors, to let them slice and dice their data as needed.  After a pilot run, it will gradually be expanded to include graduate and transfer admissions, as well as reporting tools for directors and and other muckity-mucks.</p>
<p><span id="more-2354"></span></p>
<p>The current iteration is 4808 lines of code, for both the views and the comment submissions servlet.  Most of it was written by me, though some was reused code, and the initial servlet skeleton was written by my boss.</p>
<div class="gallery">
<h4 class="gallery">Admissions Dashboard</h4>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_01.png" title="Parameter page, loading recruiter list via AJAX" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_01_thumb.png" alt="Parameter page, loading recruiter list via AJAX" /></a></p>
<div class="gallery-hidden" id="admissionsdashboard">
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_02.png" title="Parameter page, using the high school autocomplete" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_02_thumb.png" alt="Parameter page, using the high school autocomplete" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_03.png" title="The table view" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_03_thumb.png" alt="The table view" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_04.png" title="Base detail view" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_04_thumb.png" alt="Base detail view" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_05.png" title="Checklist detail view" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_05_thumb.png" alt="Checklist detail view" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_06.png" title="Comments" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_06_thumb.png" alt="Comments" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_07.png" title="Mailings" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_07_thumb.png" alt="Mailings" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_08.png" title="Contacts" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_08_thumb.png" alt="Contacts" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_09.png" title="Entering a comment (with date widget)" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_09_thumb.png" alt="Entering a comment (with date widget)" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_10.png" title="Financial Aid summary" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_10_thumb.png" alt="Financial Aid summary" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_11.png" title="Student Bill" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_11_thumb.png" alt="Student Bill" /></a></p>
<p><a href="http://heliologue.com/img/albums/admissions_dashboard/dashboard_12.png" title="Student schedule" rel="lightbox[admissionsdashboard]"><img src="http://heliologue.com/img/albums/admissions_dashboard/dashboard_11_thumb.png" alt="Student schedule" /></a></p>
</div>
<p><a class="showImages" rel="admissionsdashboard">toggle thumbnails</a>
</div>
<h3>Setting Parameters</h3>
<p>The first thing an admissions counselor sees is a parameter page.  There are a number of options to choose from:</p>
<ul>
<li>Term (can be multiple)</li>
<li>Population selection (e.g. active applicants, active but non-applied recruits, enrolled applicants, etc)</li>
<li>Student level (can be multiple)</li>
<li>Recruiter (signed-in counselors will be auto-selected (can be multiple)</li>
<li>High School (can be multiple)</li>
</ul>
<p>Selecting from term or student level repopulates the possible recruiter list with only applicable options.  Selecting &#8220;Undergraduate&#8221; applicants will necessarily filter out (or should filter out) graduate admissions counselors so they&#8217;re no longer an option.</p>
<p>Perhaps the toughest engineering challenge here was high schools.  We currently have ≈10&#8217;000 high schools in our database, and will likely have a lot more soon.  Loading all those into a multiple select box would make the page huge, and likely overload some underpowered browsers.  My solution?  Autocomplete.  Using a simple JSP fragment and the <a href="http://docs.jquery.com/UI/Autocomplete">Autocomplete</a> plugin for jQuery, I was able to make a simple autosearch/complete behavior;  selecting an item drops it into a list below the input box.</p>
<p>The odd thing about the plugin was that it didn&#8217;t end up being very flexible about the format of returned data.  I had figured it would ask you to specify a data type and do your own parsing.  It seems, though, that it only wanted one format:  pipe-delimited data, with newlines between records.  After wrestling with it for a while, I finally got it to work, but I really would have rather just returned XML and done some simple parsing.</p>
<h3>The Table View</h3>
<p>Once the parameters are chosen, the user gets a very complex table (the specifications were given to us by the Admissions department).</p>
<ul>
<li>Name</li>
<li>Term (if >1 chosen)</li>
<li>High School (if >1 chosen or none specified)</li>
<li>Intended major (code display; full description on hover)</li>
<li>Application decision (e.g. accepted, denied, etc) (code display; full description on hover)</li>
<li>Student type (e.g. new freshman, transfer, etc)</li>
<li>Athlete indicator</li>
<li>Registered indicator</li>
<li>Application status
<ul>
<li>Green:  complete, no pending items</li>
<li>Yellow:  complete, but pending items which don&#8217;t affect admission</li>
<li>Red:  incomplete: pending items affect admission</li>
<li>None (has no application;  is only a recruit)</li>
</ul>
</li>
<li>Financial Aid
<ul>
<li>Green:  all items complete, and aid is packaged</li>
<li>Yellow:  all items complete, but aid is not yet packaged</li>
<li>Red:  outstanding items; aid cannot be packaged</li>
<li>None (has no financial aid)</li>
</ul>
</li>
<li>Date of application</li>
<li>Composite admissions score</li>
<li>Date of last comment (usually a contact with applicant)</li>
<li>Visited campus indicator (is not currently used)</li>
</ul>
<p>The recruiter can export this table as an Excel document for easy printing and carrying;  otherwise, clicking on a recruit/applicant&#8217;s name will bring up a detail screen, which is divided into several sections.</p>
<h3>The Detail View</h3>
<h4>Basic</h4>
<p>I call it basic, but this is really the most detailed tab of this entire view.</p>
<ul>
<li><strong>Application-related Items</strong>
<ul>
<li>Entry Term</li>
<li>Source</li>
<li>Major</li>
<li>Admissions Counselor</li>
<li>Application Status</li>
</ul>
</li>
<li><strong>Biographical Items</strong>
<ul>
<li>Banner ID</li>
<li>PIN (for helping with portal access)</li>
<li>Last Portal login</li>
<li>Student Type</li>
<li>Advisor (email link)</li>
<li>Residence (dorm icon for on-campus, car icon for commuter)</li>
<li>College (Education, Arts &#038; Science, etc)</li>
<li>Date of Birth</li>
<li>Phone Number(s) (shows primary; expands to show others)</li>
<li>Email Address(es) (shows primary; expands to show others)</li>
<li>Address</li>
</ul>
</li>
<li><strong>Holds</strong> (is only shown when there are holds on the student&#8217;s account)
<ul>
<li>Hold Type</li>
<li>List of items which this hold prevents</li>
</ul>
</li>
<li><strong>Education</strong>
<ul>
<li>High School (for undergrad and transfer)
<ul>
<li>Name of high school</li>
<li>Graduation Date</li>
<li>GPA</li>
<li>Class rank</li>
<li>ACT composite score</li>
</ul>
</li>
<li>College (for graduate and transfer)
<ul>
<li>Name of college</li>
<li>Dates of attendance</li>
<li>GPA transferred</li>
</ul>
</li>
</ul>
</li>
<li><strong>Athletics</strong> (list of sports/activities)</li>
</ul>
<h4>Checklist</h4>
<p>The checklist is a simple table displaying pending and completed items necessary for admission.  The applicant sees the exact same table when they sign into the portal, so now the counselor can see what the applicant sees.</p>
<h4>Mailings/Contacts/Comment</h4>
<p>This is a tripartite screen.  The first and most important section is &#8220;Comments,&#8221; which is a sort of chronicle of counselors contacts with the applicant or the applicant&#8217;s parents.  This screen is especially nasty using the native Banner interface, and so the object was not only to make the viewing nice, but also allow for the deletion, editing, and creation of comments.</p>
<p>Contacts and mailings are merely for records of correspondence the applicant or recruit has received, aggregated from several places.</p>
<h4>Financial Aid</h4>
<p>This screen gives detail of all awarded financial aid, as well as both completed and outstanding documents.  This, too, is almost exactly what the applicant will see when signed into his or her portal.  </p>
<h4>Bill</h4>
<p>This screen, which details charges and payments for the student, is once again a replica of screens available to the applicant when logged in.   These screens are mostly to provide parity for support with applicants who have questions about financial aid, bills, or schedules.</p>
<h4>Schedule</h4>
<p>Once an applicant is accepted, and registers for class, this schedule tab will be filled out.  It is a slight modification of the student&#8217;s schedule, which is displayed to them upon portal sign-in.   Advisor see a similar view, since this is a module we reuse in several different portions of the web app.</p>
<h3>The Big Finish</h3>
<p>There are always bugs.  I realize, just before going live, that the <abbr title="abbreviation">abbr</abbr> tag that I used so heavily in the tabular view isn&#8217;t natively supported by Internet Explorer 6.</p>
<p>Luckily, good old <a href="http://dean.edwards.name/my/abbr-cadabra.html">Dean Edwards</a> notes that for some reason, prefixing the namespace to the <code>&lt;abbr&gt;</code> tag makes the damn thing suddenly work, and it&#8217;s still valid XHTML!  Crisis averted.</p>
<p>As with most of our web application, we make heavy use of <a href="http://jquery.com">jQuery</a>. Specifically for this application, we make use of the UI Tabs plugin, the UI Autocomplete plugin, and jQuery&#8217;s native AJAX functionality.  We also use the <a href="http://www.frequency-decoder.com/2006/09/16/unobtrusive-table-sort-script-revisited">Unobtrusive Tablesort Script</a> from Frequency Decoder, which has much better performance than jQuery equivalents.</p>
<p>As I said, this is only a first try at a first stage, but we&#8217;re pretty happy with the progress, and the admissions folks seem to be as well, so we&#8217;re doing <em>something</em> right.</p>
]]></content:encoded>
			<wfw:commentRss>http://heliologue.com/2008/09/11/creating-an-admissions-dashboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leaving 9Rules</title>
		<link>http://heliologue.com/2007/11/14/leaving-9rules/</link>
		<comments>http://heliologue.com/2007/11/14/leaving-9rules/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 15:25:00 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[9rules]]></category>
		<category><![CDATA[site updates]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://heliologue.com/blog/2007/11/14/leaving-9rules/</guid>
		<description><![CDATA[A month late, sure, but better late than never&#8230; Some of you remember that I joined the 9Rules network a while ago. At the beginning of October, 9Rules members got an e-mail advertising a new membership agreement. After talking it out in Clubhouse, we made participating either in the private member area or my.9rules a [...]]]></description>
			<content:encoded><![CDATA[<p><em>A month late, sure, but better late than never&#8230;</em></p>
<p>Some of you remember that I <a href="http://heliologue.com/2006/12/18/look-ma-im-on-9rules/">joined the 9Rules network</a> a while ago.  At the beginning of October, 9Rules members got an e-mail advertising a new membership agreement.  </p>
<blockquote title="Tyme White, COO, 9Rules">
<p>After talking it out in Clubhouse, we made participating either in the private member area or my.9rules a requirement, part of the membership agreement. This goes back to the 9rules core because that is the way it used to be except members naturally interacted with one another so a requirement was not necessary [...]</p>
<p>If you feel you are contributing by your entries being shown only, 9rules is no longer a good fit for you, decline the agreement (or do not respond), please remove the leaf from your site and we will remove your site from displaying on 9rules.</p>
</blockquote>
<p>I was in the middle of a move at the time, and the news underwhelmed me.  <i>Clearly</i>, I thought, <i>I haven&#8217;t even had the time to blog very much lately, much less blog <strong>and</strong> start arbitrarily posting in a forum</i>.  So, though it seemed a shame, I ignored the e-mail and passed quietly from the 9Rules world.</p>
<p>When I <a href="http://heliologue.com/2007/11/13/a-modest-construct-v20-hooloovoo/">redesigned my site</a>, I began thinking more heavily about the little leaf I was excluding, and became a little more irritated at the whole thing.  A couple of years ago, 9Rules was a &#8220;Who&#8217;s Who&#8221; of the blogging world.  It highlighted the best designs and the best content.  It didn&#8217;t ask for anything else.  This is partly why I joined it.</p>
<p>And perhaps it was my generation that finally changed things.  Mandatory forum posting?  Really?  When did 9Rules become a glorified social network?  Wasn&#8217;t it all about driving users to good content?</p>
<p>Apparently, I&#8217;m not the only one who was peeved, as there seems to have been a mass exodus of really excellent blogs in response to the revised membership agreement.</p>
<ul>
<li><a href="http://www.brokenkode.com/archives/9rules-exit/">Broken Kode</a></li>
<li><a href="http://chrisjdavis.org/rule-10">Chris J. Davis</a></li>
<li><a href="http://www.standardsforlife.com/finally-leaving-9rules">Standards for Life</a></li>
<li><a href="http://openswitch.org/journal/ive-left-9rules">Open Switch</a></li>
<li><a href="http://h0bbel.p0ggel.org/leaving-9rules">h0bbel.p0ggel.org</a></li>
<li><a href="http://www.wynia.org/wordpress/2007/10/07/yeah-im-out-of-9rules-too/">Wynia</a></li>
<li><a href="http://www.seopher.com/articles/standing_down_from_my_9rules_membership">Seopher</a></li>
<li><a href="http://www.i-marco.nl/weblog/archive/2007/10/06/leaving_9rules">I-Marco</a></li>
<li><a href="http://transformatum.com/2007/10/12/the-leaf-is-gone/">Transformatum</a></li>
<li><a href="http://baires.elsur.org/archives/dropping-out-of-9rules/">baires.elsur.org</a></li>
<li><a href="http://architectures.danlockton.co.uk/2007/10/05/bye-bye-9rules/">Dan Lockton</a></li>
<li><a href="http://h3h.net/2007/10/9rules-takes-a-dive/">h3h</a></li>
</ul>
<p>9Rules is, of course, free to do as it wants.  If this is the direction that it wants wants go, more power to it.  But it&#8217;s a different 9Rules than the one I joined (or thought I did), and I&#8217;m feeling better every day about my decision to leave.</p>
]]></content:encoded>
			<wfw:commentRss>http://heliologue.com/2007/11/14/leaving-9rules/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A Modest Construct v2.0:  Hooloovoo</title>
		<link>http://heliologue.com/2007/11/13/a-modest-construct-v20-hooloovoo/</link>
		<comments>http://heliologue.com/2007/11/13/a-modest-construct-v20-hooloovoo/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 20:31:04 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[science fiction]]></category>
		<category><![CDATA[site updates]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://heliologue.com/blog/2007/11/13/a-modest-construct-v20-hooloovoo/</guid>
		<description><![CDATA[Last week, I finally went live with a new design that I&#8217;ve been toying with for this blog. It sort of grew organically out of a few failures that I&#8217;d played with on and off for the last few months. After looking at a lot of available themes, I decided to more or less write [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, I finally went live with a new design that I&#8217;ve been toying with for this blog.  It sort of grew organically out of a few failures that I&#8217;d played with on and off for the last few months.  After looking at a lot of available themes, I decided to more or less write my own from scratch.  I&#8217;ve codenamed this new design &#8220;Hooloovoo,&#8221; which some of you will probably get (and those who don&#8217;t can just as easily Google it).</p>
<p>As I <a href="http://heliologue.com/2007/11/02/friday-random-ten-cxxx/#comment-129118">said</a> in a previous comment, the problem with having content about a new theme is that it won&#8217;t be relevant when the theme goes away or changes.  So this post is to both exhibit and archive this theme so that there is some record of it.</p>
<div class="gallery">
<h4>Hooloovoo</h4>
<p><a href="http://heliologue.com/img/albums/hooloovoo/main.png" title="Hooloovoo main page" rel="lightbox[hooloovoo]"><img src="http://heliologue.com/img/albums/hooloovoo/main_thumb.png" alt="Hooloovoo main page" /></a></p>
<div id="hooloovoo" class="gallery-hidden">
<a href="http://heliologue.com/img/albums/hooloovoo/menu.png" title="Hooloovoo menu" rel="lightbox[hooloovoo]"><img src="http://heliologue.com/img/albums/hooloovoo/menu_thumb.png" alt="Hooloovoo menu" /></a></p>
<p><a href="http://heliologue.com/img/albums/hooloovoo/meta.png" title="Hooloovoo post metadata" rel="lightbox[hooloovoo]"><img src="http://heliologue.com/img/albums/hooloovoo/meta_thumb.png" alt="Hooloovoo post metadata" /></a></p>
<p><a href="http://heliologue.com/img/albums/hooloovoo/comments.png" title="Hooloovoo comments" rel="lightbox[hooloovoo]"><img src="http://heliologue.com/img/albums/hooloovoo/comments_thumb.png" alt="Hooloovoo comments" /></a></p>
<p><a href="http://heliologue.com/img/albums/hooloovoo/footer.png" title="Hooloovoo footer" rel="lightbox[hooloovoo]"><img src="http://heliologue.com/img/albums/hooloovoo/footer_thumb.png" alt="Hooloovoo footer" /></a>
</div>
<p><a class="showImages" rel="hooloovoo">toggle thumbnails</a>
</div>
<p>It&#8217;s a different creature than I&#8217;m used to—I&#8217;ve never <em>not</em> had a sidebar, but I decided that perhaps a sidebar wasn&#8217;t the best way to do things.  I moved that sort of ancillary data to the top, but I used a pull-down menu &aacute; la <a href="http://5thirtyone.com/wordpress-foliage-mod-theme">Foliage mod</a>.  Since sidebar data tends to not be particularly important to the content anyway, it doesn&#8217;t need to take up real estate.</p>
<p>Metadata, while displayed more or less inline on the index page, is moved down into a content footer on the individual post pages.  This kind of graphical metaphor is actually very common now, but I&#8217;ve wanted to do it ever since I saw it in <a href="http://warpspire.com/hemingway">Hemingway</a> about a year and a half ago.  Like the upper menu, I&#8217;m dividing into thirds, and iterating with lists.</p>
<p>In general, I&#8217;ve tried to round off a lot of corners.  This involves more images than I&#8217;d normally like, but I&#8217;ve tried to take shortcuts wherever possible, combining multiple images and simply changing their positioning:  I managed to reduce the number of server requests significantly from the early phases of the design, but I still have some more to go.  </p>
<p>Which brings me to another thing:  I&#8217;ve used some 24-bit PNGs, not only as icons but as background images as well.  I made a half-hearted attempt to use <a href="http://jquery.khurshid.com/ifixpng.php">ifixpng</a> to resolve display issues for IE6, but when it didn&#8217;t work satisfactorily, I decided that I spend enough timer catering to IE6 users and work, and I&#8217;ll be damned if I&#8217;m going to expend any extra effort on my hobby site.   So let me make myself clear:</p>
<p class="alert">
Attention IE6 users: there is <em>no</em> good excuse to be using IE6.  Either <a href="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx">upgrade</a> or use a different browser.  <a href="http://getfirefox.com">Firefox</a> is good, as is <a href="http://opera.com">Opera</a>.  Or go away.
</p>
<p>On with the tour:  I&#8217;ve heavily incorporated the jQuery javascript library into my redesign, and attempted to make it as performance-tuned as possible by including the extra plugins in a common file, and gzipping everything on the fly.</p>
<p>Beyond that, the theme is pretty unremarkable, really, but (I hope) aesthetically-pleasing and useful.  I&#8217;ve completely removed categories from the template, since I think that tags have much more utility.</p>
<p>Comments?  Questions?  Suggestions?  Venom? </p>
]]></content:encoded>
			<wfw:commentRss>http://heliologue.com/2007/11/13/a-modest-construct-v20-hooloovoo/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Using jQuery to extract blockquote metadata</title>
		<link>http://heliologue.com/2007/09/18/using-jquery-to-extract-blockquote-metadata/</link>
		<comments>http://heliologue.com/2007/09/18/using-jquery-to-extract-blockquote-metadata/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 16:58:08 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://heliologue.com/blog/2007/09/18/using-jquery-to-extract-blockquote-metadata/</guid>
		<description><![CDATA[5 Nov. 2007 • I&#8217;ve formatted this code as a plugin, too. Go to the project page. Blockquotes, by definition, can and should in most cases have a title attribute and, if possible, a cite attribute. The former is the actually name of the quote&#8217;s source. The latter is the URI to the quotes location, [...]]]></description>
			<content:encoded><![CDATA[<p class="alert">
<strong>5 Nov. 2007</strong> • I&#8217;ve formatted this code as a plugin, too.  <a href="http://heliologue.com/projects/blockquote-metadata-extractor/">Go to the project page</a>.
</p>
<p>Blockquotes, by definition, can and should in most cases have a <code>title</code> attribute and, if possible, a <code>cite</code> attribute.  The former is the actually name of the quote&#8217;s source.  The latter is the URI to the quotes location, if it was retrieved online.</p>
<p>For instance:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">blockquote</span> <span style="color: #000066;">cite</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://heliologue.com&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;A Modest Construct&quot;</span>&gt;</span>
&nbsp;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer arcu ligula, tempus vel, dignissim at, molestie ut, leo. Etiam luctus, ipsum sit amet tincidunt malesuada, magna nisi feugiat eros, in tempus libero justo sed dui. Aliquam bibendum pulvinar turpis. Ut iaculis gravida nibh. Quisque elementum ligula vel nibh. Sed leo augue, tempor sed, nonummy in, interdum at, quam. Ut cursus tincidunt felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pharetra vulputate nunc. Cras nec felis ornare augue tempor fermentum. Nullam rutrum malesuada nunc. Aliquam vel purus. Aliquam faucibus malesuada orci. Nulla sit amet nulla sit amet tortor fermentum euismod.
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">blockquote</span>&gt;</span></pre></div></div>

<p>This is all well and good for search engines, but it doesn&#8217;t do much for human readers (who are arguably more important, though it depends on who you ask).  A human might want to see something like this:</p>
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer arcu ligula, tempus vel, dignissim at, molestie ut, leo. Etiam luctus, ipsum sit amet tincidunt malesuada, magna nisi feugiat eros, in tempus libero justo sed dui. Aliquam bibendum pulvinar turpis. Ut iaculis gravida nibh. Quisque elementum ligula vel nibh. Sed leo augue, tempor sed, nonummy in, interdum at, quam. Ut cursus tincidunt felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pharetra vulputate nunc. Cras nec felis ornare augue tempor fermentum. Nullam rutrum malesuada nunc. Aliquam vel purus. Aliquam faucibus malesuada orci. Nulla sit amet nulla sit amet tortor fermentum euismod.</p>
<p><cite class="source"><a href="http://heliologue.com" title="A Modest Construct">A Modest Construct</a></cite></p></blockquote>
<p>Which I achieved by appending</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">cite</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;source&quot;</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://heliologue.com&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;A Modest Construct&quot;</span>&gt;</span>A Modest Construct<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">cite</span>&gt;</span></pre></div></div>

<p>to the blockquote.</p>
<p>But nobody wants to hard-code a citation into every blockquote, especially when it&#8217;s technically correct to attach the information to the semantic element in question (the <code>blockquote</code>, for those of you not following along).  So, how to be structurally correct when using blockquotes, while still allowing human readers the benefit of such data?</p>
<p><span id="more-1906"></span></p>
<p>Well, there are a number of methods.   If you&#8217;re using a CMS or any kind of dynamically-generated page, you can use the system itself to parse blockquotes for their attributes and reuse that information.</p>
<h4>The Old Way</h4>
<p>A somewhat simpler and more flexible solution would be Javascript, which isn&#8217;t foolproof, but should be good enough for most people.  Previously, I used <a href="http://demo.1976design.com/blockquotes/">Dunstan&#8217;s Blockquotes</a>, which was an excellent solution for a long time.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> extractBlockquoteInfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
        quotes <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'blockquote'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> quotes.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
		cite <span style="color: #339933;">=</span> quotes<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'cite'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		title <span style="color: #339933;">=</span> quotes<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>cite<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>cite <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>cite.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'http://'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>cite.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ftp://'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>cite.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'person://'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'i'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
				newlink <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				newlink.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #339933;">,</span> cite<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				newlink.<span style="color: #660066;">setAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'title'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Go to '</span> <span style="color: #339933;">+</span> cite<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				title <span style="color: #339933;">=</span> quotes<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>title<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>title <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
					<span style="color: #009900;">&#123;</span>
					newlink.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">createTextNode</span><span style="color: #009900;">&#40;</span>title<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #000066; font-weight: bold;">else</span>
					<span style="color: #009900;">&#123;</span>
					newlink.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">createTextNode</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Quote source'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #009900;">&#125;</span>
				newdiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				newdiv.<span style="color: #660066;">className</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'source'</span><span style="color: #339933;">;</span>
				newdiv.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">createTextNode</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\u</span>2014 '</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				newdiv.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>newlink<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				quotes<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #000066; font-weight: bold;">else</span>
				<span style="color: #009900;">&#123;</span>
				newdiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				newdiv.<span style="color: #660066;">className</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'source'</span><span style="color: #339933;">;</span>
				newdiv.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">createTextNode</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\u</span>2014 '</span> <span style="color: #339933;">+</span> cite<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				quotes<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>title<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>title <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
			newdiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			newdiv.<span style="color: #660066;">className</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'source'</span><span style="color: #339933;">;</span>
			newdiv.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">createTextNode</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\u</span>2014 '</span> <span style="color: #339933;">+</span> title<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			quotes<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>newdiv<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
window.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
extractBlockquoteInfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h4>The New Way</h4>
<p>I ran into conflict issues, however.  Also, the script seems overly complicated for what it&#8217;s doing.  I long ago chose my spot in the <a href="http://jquery.com">jQuery</a> camp, and am currently using it on this blog for <a href="http://jquery.com/demo/thickbox/">Thickbox</a> and a few other miscellaneous things.   So I thought:  why not get blockquote data using jQuery?  Here&#8217;s my resulting code (which I&#8217;m sure is flawed and crufty, but I put it together in about five minutes;  suggestions are welcome).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
     $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;blockquote&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
          <span style="color: #003366; font-weight: bold;">var</span> title <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
          <span style="color: #003366; font-weight: bold;">var</span> cite <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cite&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
          <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>cite <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> title <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
              $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;cite class='source'&gt;&quot;</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/cite&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
          <span style="color: #009900;">&#125;</span>
&nbsp;
          <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>cite <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> title <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
               $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;cite class='source'&gt;&lt;a href='&quot;</span><span style="color: #339933;">+</span>cite<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;' title='&quot;</span><span style="color: #339933;">+</span>cite<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;&quot;</span><span style="color: #339933;">+</span>cite<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt;&lt;/cite&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
          <span style="color: #009900;">&#125;</span>
&nbsp;
          <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>cite <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> title <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
               $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;cite class='source'&gt;&lt;a href='&quot;</span><span style="color: #339933;">+</span>cite<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;' title='&quot;</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;'&gt;&quot;</span><span style="color: #339933;">+</span>title<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/a&gt;&lt;/cite&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
          <span style="color: #009900;">&#125;</span>
&nbsp;
          <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #009900;">&#125;</span>
     <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Essentially, I&#8217;m looking for <code>blockquote</code>s that contains at least one of our particular attributes, and then parsing them for <code>title</code> and <code>cite</code> values.    There are four possible outcomes:</p>
<p>1. <strong><code>title</code> but no <code>cite</code>:</strong></p>
<blockquote title="A Modest Construct">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer arcu ligula, tempus vel, dignissim at, molestie ut, leo. Etiam luctus, ipsum sit amet tincidunt malesuada, magna nisi feugiat eros, in tempus libero justo sed dui. Aliquam bibendum pulvinar turpis. Ut iaculis gravida nibh. Quisque elementum ligula vel nibh. Sed leo augue, tempor sed, nonummy in, interdum at, quam. Ut cursus tincidunt felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pharetra vulputate nunc. Cras nec felis ornare augue tempor fermentum. Nullam rutrum malesuada nunc. Aliquam vel purus. Aliquam faucibus malesuada orci. Nulla sit amet nulla sit amet tortor fermentum euismod.</p>
</blockquote>
<p>2. <strong><code>cite</code> but no <code>title</code>:</strong></p>
<blockquote cite="http://heliologue.com">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer arcu ligula, tempus vel, dignissim at, molestie ut, leo. Etiam luctus, ipsum sit amet tincidunt malesuada, magna nisi feugiat eros, in tempus libero justo sed dui. Aliquam bibendum pulvinar turpis. Ut iaculis gravida nibh. Quisque elementum ligula vel nibh. Sed leo augue, tempor sed, nonummy in, interdum at, quam. Ut cursus tincidunt felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pharetra vulputate nunc. Cras nec felis ornare augue tempor fermentum. Nullam rutrum malesuada nunc. Aliquam vel purus. Aliquam faucibus malesuada orci. Nulla sit amet nulla sit amet tortor fermentum euismod.</p>
</blockquote>
<p>3. <strong><code>cite</code> and <code>title</code>:</strong></p>
<blockquote cite="http://heliologue.com" title="A Modest Construct">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer arcu ligula, tempus vel, dignissim at, molestie ut, leo. Etiam luctus, ipsum sit amet tincidunt malesuada, magna nisi feugiat eros, in tempus libero justo sed dui. Aliquam bibendum pulvinar turpis. Ut iaculis gravida nibh. Quisque elementum ligula vel nibh. Sed leo augue, tempor sed, nonummy in, interdum at, quam. Ut cursus tincidunt felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pharetra vulputate nunc. Cras nec felis ornare augue tempor fermentum. Nullam rutrum malesuada nunc. Aliquam vel purus. Aliquam faucibus malesuada orci. Nulla sit amet nulla sit amet tortor fermentum euismod.</p>
</blockquote>
<p>4.  <strong>no <code>cite</code> and no <code>title</code>:</strong></p>
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Integer arcu ligula, tempus vel, dignissim at, molestie ut, leo. Etiam luctus, ipsum sit amet tincidunt malesuada, magna nisi feugiat eros, in tempus libero justo sed dui. Aliquam bibendum pulvinar turpis. Ut iaculis gravida nibh. Quisque elementum ligula vel nibh. Sed leo augue, tempor sed, nonummy in, interdum at, quam. Ut cursus tincidunt felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer pharetra vulputate nunc. Cras nec felis ornare augue tempor fermentum. Nullam rutrum malesuada nunc. Aliquam vel purus. Aliquam faucibus malesuada orci. Nulla sit amet nulla sit amet tortor fermentum euismod.</p>
</blockquote>
<p>I think that the <code>&lt;cite&gt;</code> element is the most semantically correct, but of course you&#8217;ll have to change that to fit your needs.  I style it like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">blockquote cite<span style="color: #6666ff;">.source</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">dashed</span> <span style="color: #cc00cc;">#aaa</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0.95em</span><span style="color: #00AA00;">;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
     <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>And there you go.  An excellent Javascript library, a few lines of code (more than necessary even, as I wanted to cover all the possible cases), and you&#8217;ve got a flexible solution to blockquote citations.</p>
]]></content:encoded>
			<wfw:commentRss>http://heliologue.com/2007/09/18/using-jquery-to-extract-blockquote-metadata/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Conference: Day III</title>
		<link>http://heliologue.com/2006/06/30/the-conference-day-iii/</link>
		<comments>http://heliologue.com/2006/06/30/the-conference-day-iii/#comments</comments>
		<pubDate>Sat, 01 Jul 2006 01:47:02 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://heliologue.com/blog/2006/06/30/the-conference-day-iii/</guid>
		<description><![CDATA[A Retrospective on Cleveland qua æsthetic Cleveland is a funny place. Like Wisconsin, it&#8217;s significantly greener than Illinois, and I find myself surprisingly aflush at the sight of all the verdure, but Cleveland is like a rusted, hulking monolith overgrown by jungle. The juxtaposition is frightening: while lost, we drove along so many leafy parkways [...]]]></description>
			<content:encoded><![CDATA[<h4>A Retrospective on Cleveland qua æsthetic</h4>
<p>Cleveland is a funny place.  Like Wisconsin, it&#8217;s significantly <em>greener</em> than Illinois, and I find myself surprisingly aflush at the sight of all the verdure, but Cleveland is like a rusted, hulking monolith overgrown by jungle.  The juxtaposition is frightening:  while lost, we drove along so many leafy parkways lined with large embellished houses, but our destination was inevitably in the sprawl of the city itself, hemmed together with slummy, apartmented streets and the blackened <i>faux</i>-marble of the botanical gardens, the public library, and the enormous Presbyterian church on Euclid Ave.  One building along a main drag called Chester St. appeared to have two dark bronze statues of skeleton warriors, as though someone had stitched together twisted detritus from a plane wreck to make this thanatotic duo, their sharp ribs prominent, their wielded swords even moreso.</p>
<p>It rained all three days we were there, in random spurts of thunderstorms.  Cleveland&#8217;s drainage—at least downtown—isn&#8217;t the best, as even a relatively gentle storm left standing pools of water on the roadsides and muddy ponds in the grassy medians as late as the next morning.  I&#8217;ve already said that Cleveland is organic, but add near-constant construction and rain to the list, and the city itself is a violent storm of confusion, parkways ceding to slums, trees to effaced apartment complexes, prestigious university to vacant, overgrown gas stations.</p>
<p>I realize that I saw but a fraction of the city, but I would expect that the university-dominated section would be a thriving little community of its own.  Perhaps things are different during the school year:  I saw few college students at all;  only middle-aged conference attendees and the occasional gaggle of misguided tourists—why Cleveland?—gaping at the squalor.</p>
<h4>A Retrospective on Ben qua Conference Attendee, as Well as a Discussion of Code</h4>
<p>But enough sentiment.  My own journey to get here, in a plain grey van, speeding down I-480, was just as mixed.  I woke at 7:09 this morning and —my understanding being that only my boss and his boss were going to the presentation at 10:30—went back to bed, to be awoken exactly four hours later at 11:09 by the sound of little kids (?) playing soccer on the athletic field next door.  I was alone—all four of my companions had gone to the presentation, had even called for me through the door of my sleeping area, but to no apparent avail.  The neck-ache I awoke with had nothing on the painful feeling of being such a schlub.</p>
<p>I mentioned last night that the recurring theme of the conference was that Oracle&#8217;s portal is utter shit.  To that end, I find myself excited not by the opportunity to work with <em>it</em>, my loving ministrations being severely limited by its obstinate nature, but the opportunity to work with Tim, our DBA and resident Java guru, on his separate-but-not webpiece that will tie into the portal.  Having seen yesterday&#8217;s presentation on Web 2.0 and AJAX, he and I decided that it would be a good idea to integrate it into his webpiece.  Since the logic that drives the overhead menu requires database calls, we thought that using AJAX to load content into the specified area would reduce overhead and feel more responsive to the user, broken back-button or no.  So, during the afternoon session on Thursday, I found a little AJAX script and made a working prototype with static HTML.  Tim came back from <em>his</em> afternoon session with news of <a href="http://os3grid.sf.net">OS3Grid</a>, a Javascript-based table system that allows for dynamic reordering, editing, and effects that wouldn&#8217;t be possible in IE with pure CSS.  The only problem is that they don&#8217;t want to work together:  the function to render the grid is run on page load, which doesn&#8217;t work if you are loading the grid&#8217;s host page with AJAX.  I hacked up a fix by adding a new line to the AJAX script&#8217;s <code>pageload</code> function that reevaluates OS3Grid&#8217;s table-rendering function, forcing the grid to be rendered when the page was loaded with AJAX. The only problem is that each grid has a specific line that has to include the name of the parent <code>div</code> that hosts the rendered table, and since we&#8217;re guaranteed to have pages with multiple tables, we can&#8217;t simple hard code a standard <code>id</code> into the function and let it go.  I will need to research other methods of forcing the script to run.</p>
<p>These are both neat Javascript tricks, but the real question is how well we can get them to work with the database.  The AJAX function for navigation is entirely client-side:  there&#8217;s not yet AJAX to submit any forms or grab any data from the database—it merely calls a JSP, which in turns talks to the database.  One of the interesting features of OS3Grid, however, is the ability to edit table contents, and I&#8217;d like to make it so that an edited table cell submits—via AJAX, of course—back to the the database the changed contents.  For that, I&#8217;ll need Tim&#8217;s help in using AJAX to talk to Java to talk to the database.  It&#8217;s <em>possible</em>, of course, but my experience with Java is so limited that the slightest problem will sending me running to Google.  Still, I think that this has the potential to be a really great interface, and I really like working with Tim because he&#8217;s truly excited about what he&#8217;s doing, and he asks things of me that push my limits and force me to improve my knowledge set.</p>
]]></content:encoded>
			<wfw:commentRss>http://heliologue.com/2006/06/30/the-conference-day-iii/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Curly Quotes</title>
		<link>http://heliologue.com/2006/03/03/curly-quotes/</link>
		<comments>http://heliologue.com/2006/03/03/curly-quotes/#comments</comments>
		<pubDate>Fri, 03 Mar 2006 18:35:08 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://heliologue.com/blog/2006/03/03/curly-quotes/</guid>
		<description><![CDATA[I&#8217;ve always been one inclined to heavily stylize my blockquotes. Some people merely indent, some change the color. Me, I apply to blockquotes the same sort of design æsthetic that I would to dropquotes, which is to visually separate and emphasize. So, I have a pleasing bluish-violet background color to it, a distinct &#60;cite&#62;. The [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been one inclined to heavily stylize my blockquotes.  Some people merely indent, some change the color.  Me, I apply to blockquotes the same sort of design æsthetic that I would to dropquotes, which is to visually separate and emphasize.  So, I have a pleasing bluish-violet background color to it, a distinct <code>&lt;cite&gt;</code>.</p>
<p>The default blockquote style in K2 is a simple indent and a left-positioned PNG openquote.  Not only is the quote graphic kind of ugly (a not-very-stylized grey), but it seems incomplete in that it&#8217;s only an openquote, and doesn&#8217;t include a closequote.  Because it&#8217;s set as a background image, of course, we can&#8217;t have two (one for open, one for closed).</p>
<p>In my old theme, I solved this with a messy hack wherein I searched and replaced all blockquotes with a blockquote and a nested <code>div</code>.  I set the blockquote to have the openquote in the top left and the <code>div</code> to display the closequote in the bottom right.  Semantically bad, but it worked.</p>
<p>For K2, though, I wanted less cruft, but I wanted to accomplish the same basic thing.  Enter CSS and Design Meme&#8217;s <a href="http://www.designmeme.com/articles/csscurlyquotes/">Curly Quotes</a> idea.  It uses <code>:before</code> and <code>:after</code> pseudo-classes to add areas before and after the blockquote.  Then it uses the <code>content</code> attribute to add in <code>open-quote</code> and <code>close-quote</code>.  It&#8217;s an elegant solution, but it has two problems.  One:  it&#8217;s not cross-browser (IE doesn&#8217;t support pseudo-classes).  Two: even among CSS-compliant browsers, the handling of the <code>open-quote</code> and <code>close-quote</code> varies.  Obviously, I want the quotes to appear as &ldquo;&rdquo; and not &quot;&quot;.  However, only Firefox 1.5 did that:  Opera 8.52, Safari 1.3, Firefox =&lt; 1.0.7 and others all displayed &quot;.  <span id="more-1010"></span></p>
<p>So, I changed</p>
<p><code>content: open-quote | close-quote</code></p>
<p>to</p>
<p><code>content: """ | """</code></p>
<p>Still no luck.  Only Firefox 1.5 would display them correctly.  The others just gave me marks that looked more like 11s than stylized quotes.  So, I went back to my old theme, grabbed the quote images, resized them to 50px and adapted the CSS to use images instead of content.  Here&#8217;s the result:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">blockquote <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">60px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">350px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#c6c9ff</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f0f0ff</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
blockquote<span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span> blockquote<span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#616d9f</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">900%</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span>  <span style="color: #ff0000;">'Georgia'</span><span style="color: #00AA00;">,</span> <span style="color: #ff0000;">'Times New Roman'</span><span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
blockquote<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>images/quote1.png<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-0.55em</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-50px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
blockquote<span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span>images/quote2.png<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-50px</span><span style="color: #00AA00;">;</span>   
<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">360px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
blockquote cite <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">dashed</span> <span style="color: #cc00cc;">#69c</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The rendering is pretty good—except for IE6, which doesn&#8217;t display the images at all, but degrades pretty gracefully—<del datetime="2006-03-03T20:17:09+00:00">but I can&#8217;t for the life of me figure out why Opera pushes the open-quote so far to the right (see below).  Anyone have any ideas?</del> <ins datetime="2006-03-03T20:17:09+00:00">I was able to fix it.  For some reason, I overlooked the fact that the original curly quotes designer had used <code>em</code> width <em>only</em> for the left margin on the <code>blockquote:before</code> declaration.  When I noticed that Opera seems to handle <code>em</code> a bit differently than its peers, it clicked.</ins></p>
<div class="center">
<img src="http://heliologue.com/img/albums/blockquotes/safari132.png" alt="Blockquotes as rendered by Safari 1.3.2" /><br />
Safari 1.3.2 [OS X 10.3]</div>
<div class="center">
<img src="http://heliologue.com/img/albums/blockquotes/safari203.png" alt="Blockquotes as rendered by Safari 2.0.3" /><br />
Safari 2.0.3 [<a href="http://www.danvine.com/icapture/">iCapture</a>]</div>
<div class="center">
<img src="http://heliologue.com/img/albums/blockquotes/konqueror342.png" alt="Blockquotes as rendered by Konqueror 3.4.2" /><br />
Konqueror 3.4.2 [SuSe 10]</div>
<div class="center">
<img src="http://heliologue.com/img/albums/blockquotes/firefox107.png" alt="Blockquotes as rendered by Firefox 1.0.7" /><br />
Firefox 1.0.7 [SuSe 10]</div>
<div class="center">
<img src="http://heliologue.com/img/albums/blockquotes/firefox1501.png" alt="Blockquotes as rendered by Firefox 1.5.0.1" /><br />
Firefox 1.5.0.1 [Windows XP SP2]</div>
<div class="center">
<img src="http://heliologue.com/img/albums/blockquotes/opera852.png" alt="Blockquotes as rendered by Opera 8.5.2" /><br />
Opera 8.5.2 [Windows XP SP2]</div>
<div class="center">
<img src="http://heliologue.com/img/albums/blockquotes/ie60.png" alt="Blockquotes as rendered by Internet Explorer 6.0" /><br />
Internet Explorer 6.0 [Windows XP SP2]</div>
]]></content:encoded>
			<wfw:commentRss>http://heliologue.com/2006/03/03/curly-quotes/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Out with the crufty, in with the new</title>
		<link>http://heliologue.com/2005/10/16/out-with-the-crufty-in-with-the-new/</link>
		<comments>http://heliologue.com/2005/10/16/out-with-the-crufty-in-with-the-new/#comments</comments>
		<pubDate>Sun, 16 Oct 2005 21:53:05 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://heliologue.com/blog/?p=801</guid>
		<description><![CDATA[For those of you unaware, I work (as a student, sadly) in the Web Services Dept. of the University of St. Francis. It&#8217;s a nice job, really. Alas, we&#8217;re a small school, and still pretty stupid about some things. A laundry list of all of them (even those limited to the technological) would be beyond [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you unaware, I work (as a student, sadly) in the Web Services Dept. of the University of St. Francis.  It&#8217;s a nice job, really.</p>
<p>Alas, we&#8217;re a small school, and still pretty stupid about some things.  A laundry list of all of them (even those limited to the technological) would be beyond the scope of this post.  One thing in which we&#8217;re stupid is our website, which is sprawling (the faculty tend to use the web server for storage instead of their network drive) and not database driven.  We&#8217;re moving to a portal system in January &#8217;06 (tentative), but we&#8217;ll still have a lot of the current site.</p>
<p>Therein lies one of my biggest problems:  instead of pulling content dynamically and running it through some CSS, we&#8217;re still using crufty, hardcoded pages and the horrible, byzantine templating system of Dreamweaver.</p>
<p>Until summer of 2004, we were on a template created entirely by Adobe GoLive.  Why anyone was ever allowed to use such a miserable program is completely beyond me:  it filled the code with GoLive &#8220;actions&#8221;:  in other words, proprietary markup similar to what Microsoft does with its created HTML files.</p>
<p>But I&#8217;m not going to talk about the template <em>per se</em>, because I have yet to tinker with that.  I <em>am</em>, however, going to talk about the home page, which in many respects is far more important. <span id="more-801"></span></p>
<p>In 2002 (and up until 2004), we had a <a href="http://web.archive.org/web/20020527124046/http://www.stfrancis.edu/">homepage that looked like this</a> [copy stored on Archive.org].  The buttons weren&#8217;t distorted when we had it live, but that&#8217;s the basic look.  In 2003, we updated the menu slightly.  Take a look at the source, and you&#8217;ll see hundreds of lines like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;csaction <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;GoLiveAction2&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Set Image URL&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;onevent&quot;</span> val0<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;default_32&quot;</span> </span>
<span style="color: #009900;">val1<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.stfrancis.edu/images/default_32- default_07_over.jpg&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span>csaction&gt;</span></pre></div></div>

<p>The page itself isn&#8217;t that large:  about 133KB without rollover images.  Still, it obviously needed to go, as did the rest of the template.  So, in early 2004, the Web Services Department began an extensive redesign effort.  It was spearheaded by my boss, Mike, and had to go through committee after committee (since the website constitutes our online image) and revision after revision.  I was a new guy at that point, so the actual design work was handled by my former coworker, Ryan.  He was an excellent graphic artist, but his approach to the technical aspects of web design?  Eh, not so good.</p>
<p>His method involved creating a screen-sized picture in Photoshop and then cutting it up in ImageReady. Then he further edited it in Dreamweaver, creating editable regions and places for text.  To see his version of the homepage, click for the current <a href="http://www.stfrancis.edu">USF homepage</a> [stfrancis.edu] which still uses this system or an <a href="http://web.archive.org/web/20041129003802/http://www.stfrancis.edu/">archived copy</a> [Archive.org] from November of 2004.  There have been no substative changes between then and now.</p>
<p>For starters, try looking at the <a href="http://web.archive.org/web/20051016142239/http://www.stfrancis.edu/images/indexbg.jpg">background image alone</a>.  The first thing you&#8217;ll notice is that the background image <em>is</em> the homepage.  The second thing you&#8217;ll notice is that it&#8217;s 203.51KB.  That&#8217;s a lot for a 56K user (we do have them).</p>
<p>Secondly, look at the menu system.  It&#8217;s ugly, inconsistent, and under the hood, completely inadequate.  For starts, it&#8217;s hardcoded into every page (this same menu persists on all pages), which means that it needs to be reloaded every time.  Secondly, it works by showing and hiding individual layers.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> MM_showHideLayers<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #006600; font-style: italic;">//v3.0</span>
  <span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">,</span>p<span style="color: #339933;">,</span>v<span style="color: #339933;">,</span>obj<span style="color: #339933;">,</span>args<span style="color: #339933;">=</span>MM_showHideLayers.<span style="color: #660066;">arguments</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span> <span style="color: #009900;">&#40;</span>args.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> i<span style="color: #339933;">+=</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#41;</span> 
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">=</span>MM_findObj<span style="color: #009900;">&#40;</span>args<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">!=</span><span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span> v<span style="color: #339933;">=</span>args<span style="color: #009900;">&#91;</span>i<span style="color: #339933;">+</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>obj.<span style="color: #660066;">style</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> obj<span style="color: #339933;">=</span>obj.<span style="color: #660066;">style</span><span style="color: #339933;">;</span> v<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span>v<span style="color: #339933;">==</span><span style="color: #3366CC;">'show'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">?</span><span style="color: #3366CC;">'visible'</span><span style="color: #339933;">:</span>
<span style="color: #009900;">&#40;</span>v<span style="color: #339933;">=</span><span style="color: #3366CC;">'hide'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">?</span><span style="color: #3366CC;">'hidden'</span><span style="color: #339933;">:</span>v<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
    obj.<span style="color: #660066;">visibility</span><span style="color: #339933;">=</span>v<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> timerID <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;global&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> hideMenus<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> 
<span style="color: #009900;">&#123;</span>
   <span style="color: #006600; font-style: italic;">// insert the MM_showHideLayers function you create that </span>
   <span style="color: #006600; font-style: italic;">// hides all popout layers. Be sure you put a semi-colon</span>
   <span style="color: #006600; font-style: italic;">// at the end of the code. Here is an example:</span>
   <span style="color: #006600; font-style: italic;">// MM_showHideLayers('menu1', '', 'hide', 'menu2', '', 'hide');</span>
   MM_showHideLayers<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'AboutUSF'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'hide'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Academics'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'hide'</span><span style="color: #339933;">,</span> 
<span style="color: #3366CC;">'Athletics'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'hide'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'Prospective'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'hide'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'StudentLife'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'hide'</span><span style="color: #339933;">,</span> 
<span style="color: #3366CC;">'Calendar'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'hide'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> startTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   stopTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #006600; font-style: italic;">// the number &quot;1000&quot; is the number of </span>
thousands<span style="color: #339933;">-</span>of<span style="color: #339933;">-</span>a<span style="color: #339933;">-</span>second
&nbsp;
 timerID <span style="color: #339933;">=</span> setTimeout<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hideMenus()&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> stopTimer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   clearTimeout<span style="color: #009900;">&#40;</span>timerID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Later, in the body:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;admissions/index.htm&quot;</span></span>
<span style="color: #009900;"><span style="color: #000066;">onMouseOver</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;MM_swapImage('Image5', '', 'images/indexr_08.gif', 1);</span>
<span style="color: #009900;">MM_showHideLayers('AboutUSF', '', 'hide', </span>
<span style="color: #009900;">'Academics', '', 'hide', 'Athletics',</span>
<span style="color: #009900;">'', 'hide', 'Prospective', '', 'show', </span>
<span style="color: #009900;">'StudentLife', '', 'hide', 'Calendar', '', 'hide'); </span>
<span style="color: #009900;">MM_callJS('stopTimer()')&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">onMouseOut</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;MM_swapImgRestore(); </span>
<span style="color: #009900;">MM_callJS('startTimer()')&quot;</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;images/index_08.gif&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;169&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;28&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Image5&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span></pre></div></div>

<p>That&#8217;s a single rollover image in the menu that calls a layer to be shown.  Byzantine, right?  The total size for this incarnation of the homepage to be loaded is almost half a MB (420KB without rollovers).  For any users on a slow connection, that means, basically, no access.  Anyone who waits that long for a University web page to load is an idiot.  Also notice the number of nested tables used in the layout (it&#8217;s worse on the content pages).  Dreamweaver&#8217;s templates don&#8217;t play well with tables, so this means a lot of screw-ups when we do a template update.</p>
<p>You&#8217;ve probably gathered by now that none of the code that the University has used so far has been anything close to standards-compliant.  As you can see from the links in my meta section, I&#8217;m all about standards compliance, so this bugs me to no end.</p>
<p>Last week, after my boss complained about how difficult it is to make any sort of changes to the homepage (he wants the white news section expanded), I offered to recode it.  I can&#8217;t make any substantial changes to the <em>look</em>, of course, since that would require more committee meanings and long delays.  I can, however, redo the guts.</p>
<p>Because of the way the University web server serves up CSS files (wrong MIME type:  we&#8217;re in the process of fixing it), my testing version can&#8217;t currently be viewed on that server.  However, I have hosted it on mine, so you may <a href="http://heliologue.com/pages/usfnew/">view my tentative design now</a>.</p>
<p>The first thing you&#8217;ll notice is a redesigned header.  It uses our new officially approved logo, but within a 100% div, so it stretches regardless of screen size.  Same with the thinner brown bar below.  One of my goals was to scale the design better.  Mike says that we&#8217;re only going to officially support resolutions of 1024 x 786, so my end design scrolls a bit on lower, but is still functional.</p>
<p>The second thing you&#8217;ll notice is the redesigned menu.  Not only does it blend better with the header, but it&#8217;s consistent in its look, is simpler (in a sense) by not simply showing and hiding <code>div</code> layers.  Also, and more importantly, it&#8217;s all housed in 3 called data files, only one of which needs editing.  This makes updating the menu sitewide a matter of seconds.  The off/hover colors are not finalized, depending on what input we get.  The menu is cross-browser (I&#8217;ve tested on Safari 1.x, IE 5.x, Netscape 7.x, IE 6.x, Firefox 1.0.x, and Opera 8.x).</p>
<p>Thirdly, the new design makes <em>extensive</em> use of CSS.  The old one, to its credit, did use a CSS file, but only for setting a sitewide default font and <code>&lt;h1&gt;</code>.  I expanded it later to stylize table elements and floating images.  Still, this one uses CSS for <em>everything</em>, and will use it even more heavily for content pages.</p>
<p>One of the tricks I used CSS for was eliminating image rollovers.  On the current layout, you&#8217;ll notice that the five central buttons (Faculty, Current Students, Alumni, &#038;c.) have a rollover which turns them from a sepia tone to their actual RGB values.  I dislike image rollovers in general (images are largely crufty), so I instead used an opacity effect to turn them from 75% opaque to 100% opaque on a hover.  It was tricky, because IE 6 doesn&#8217;t support the addition of <code>:hover</code> to any elements besides anchors.   Here&#8217;s my CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#buttonset</span> a<span style="color: #3333ff;">:link </span>img<span style="color: #00AA00;">,</span> 
<span style="color: #cc00cc;">#buttonset</span> a<span style="color: #3333ff;">:visited </span>img<span style="color: #00AA00;">,</span> 
<span style="color: #cc00cc;">#buttonset</span> a<span style="color: #3333ff;">:active </span>img<span style="color: #00AA00;">,</span> 
<span style="color: #cc00cc;">#buttonset</span> a<span style="color: #3333ff;">:focus </span>img <span style="color: #00AA00;">&#123;</span>
opacity<span style="color: #00AA00;">:</span> .75<span style="color: #00AA00;">;</span>
filter<span style="color: #00AA00;">:</span> alpha<span style="color: #00AA00;">&#40;</span>opacity<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">75</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#buttonset</span> a<span style="color: #3333ff;">:hover </span>img <span style="color: #00AA00;">&#123;</span>
opacity<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1.0</span><span style="color: #00AA00;">;</span>
filter<span style="color: #00AA00;">:</span> alpha<span style="color: #00AA00;">&#40;</span>opacity<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">100</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><code>#buttonset</code> is the floating <code>div</code> that houses the buttons in my version.  Unfortunately, this opacity effects invalidates the standards compliance for CSS.  If anyone knows a way around this, let me know.  Also, Opera doesn&#8217;t show the hover effect, but since it is an infinitesimal portion of our user base, we&#8217;ll allow it.  Otherwise, all tested browsers work with it.</p>
<p>Finally, we have the pesky news section.  On the original site, the yellow news bar is graphically separate from the news section.  I could have emulated this, but I thought it was better combined in a single element.  I simply nested a block displayed <code>div</code> instead the larger news section and floated the whole thing.  Something I had to grapple with after the face was getting all these different <code>div</code>s to clear each other; also, getting both IE and good browsers to handle the code in substantially similar ways.  I really need to get my hands on a beta of IE7 and doublecheck that.</p>
<p>The total size for the loaded homepage is about 165KB.  This is larger than I&#8217;d like, but I had to work within certain boundaries to ensure that the new design was visually compatible with the old one.  I also console myself with the fact that since the menu system is separate from the page, and it persists throughout the site (as will several other key graphics), any decent browser will cache it and continue to use it during further perusal.  Since the menu makes up 32KB of the load, this is significant.</p>
<p>Most importantly, though (to me), is the link you see at the bottom of my version that says &#8220;Valid XHTML.&#8221;  Yes, it validates, even if the CSS doesn&#8217;t.  I decided upon XHTML 1.0 Transitional because my boss likes to use the <code>target="_blank"</code> attribute a lot, and this was the only way for it to validate as such.</p>
<p>So, there you have it:  my recent travails in the world of (semi-)corporate web design.  Stay tuned, and I&#8217;ll eventually be able to write at length about redesigning the rest of the content pages, as well as all of the (enormous) headaches that such a thing entails.</p>
<p>For those of my readers with m4d h4xx0rz 5k1llz, any improvements or advice would be appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://heliologue.com/2005/10/16/out-with-the-crufty-in-with-the-new/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

