<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>ollicle.com</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/" />
    <link rel="self" type="application/atom+xml" href="http://www.ollicle.com/atom.xml" />
   <id>tag:www.ollicle.com,2008://1</id>
    <link rel="service.post" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1" title="ollicle.com" />
    <updated>2008-04-12T09:39:54Z</updated>
    <subtitle><![CDATA[Oliver Boermans works as an interactive media designer in Adelaide, South Australia. This is his web interface &mdash; a place for Ollie to rant, reflect and share. Read more about Ollie]]></subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 3.35</generator>
 
<entry>
    <title>Ollicle Reflex refined for smarter feed reading</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=89" title="Ollicle Reflex refined for smarter feed reading" />
    <id>tag:www.ollicle.com,2008://1.89</id>
    
    <published>2008-03-08T03:52:01Z</published>
    <updated>2008-04-12T09:39:54Z</updated>
    
    <summary>The sixth iteration of my NetNewsWire style, Ollicle Reflex, is smarter than your average blog style. CSS and JavaScript work as a team to keep your feeds sharp.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>It’s been a long time cooking, but I am finally taking version 6 of Ollicle Reflex out of the oven.</p>

<h2>Download and install</h2>

<p class="ollicle">Download latest version: <a href="http://www.ollicle.com/projects/netnewswire/reflex/">Ollicle Reflex</a></p>

<p>Double-click the unzipped .nnwstyle file and NetNewsWire will copy it to where it needs to be.</p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>This style uses JavaScript to do some things CSS alone cannot. Make sure you enable it</p>

<ul>
<li>NetNewsWire Preferences
<ul>
<li>Browsing
<ul>
<li>News Items
<ul>
<li>Enable JavaScript</li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<h3>Requirements</h3>

<p>I have not tested this style extensively with anything other than the current version of <a href="http://www.newsgator.com/Individuals/NetNewsWire/">NetNewsWire (3.1.3)</a> and <a href="http://www.apple.com/safari/">Safari 3</a> (which determines the version of WebKit NetNewsWire is sporting).</p>

<p><strong>Note</strong>: styles for NetNewsWire 3 do not affect the Combined view - only the Traditional and Widescreen views.</p>

<h2>Key features</h2>

<ul>
<li><h3>Simple clean style</h3>

<p>Doesn’t get in the way of your choice of feed reading font and size. <strong>New for Version 6</strong>: added some simple styling to make data tables easier to read.</p></li>
<li><h3>Clever image handling</h3>

<p>Large images are scaled to fit available space. <strong>New for Version 6</strong>: automatic alignment of smaller images, avoiding awkwardly squashed text.</p></li>
<li><h3>Automatic line height</h3>

<p>Optimises line spacing of the feed text to suit your window and font size. More about this: <a href="http://www.ollicle.com/2005/oct/12/javascript_flex_css.html">Flex CSS with JavaScript for better reading</a></p></li>
<li><h3>Del.icio.us Tagometer</h3>

<p>The number of del.icio.us bookmarks for the linked webpage is displayed along with the most popular tags they assigned to it. <strong>New for Version 6</strong>: a little hackery to see through feedburner urls and a more compact and  stylish look.</p></li>
<li><h3>Tidy diff display for recent feed changes</h3>

<p>With Highlight Differences checked in NetNewsWires general preferences you can toggle between the current and previous version of a changed feed. <strong>New for Version 6</strong>: feed changes are highlighted in a vertical bar in the left hand column. Hovering the bar with your cursor highlights additions inline, clicking it hides additions and reveals the deleted content.</p></li>
<li><h3>A choice of layouts</h3>

<p>Two layouts to choose from: One column (default for NetNewsWires Widescreen layout) with the feed info in the footer, or two column (default for the Traditional layout) with the feed info persistent in the right hand margin. <strong>New for Version 6</strong>: now possible to set a default irrespective of your choice of NNW layout (see below).</p></li>
<li><h3>Dark or light theme</h3>

<p>Choose between the default white background or the image enhancing black background. <strong>New for Version 6</strong>: changed method for setting black as the default (see below).</p></li>
<li><h3>Per feed layout and theme prefs</h3>

<p>Clicking the little button in the top right hand corner of the feed pane toggles the preference pop-up for your currently viewed feed. Cookies NetNewsWire shares with Safari are used to store your selection of layout or theme for any post from that feed. <strong>New for Version 6</strong>: the preference pop-up now scales nicely when you make the feed text bigger and smaller with Command +/-.</p></li>
<li><h3>Customisable defaults</h3>

<p><strong>New for Version 6</strong>: If you don’t like my selection of defaults in Ollicle Reflex I have made a few of the prefences more easily configurable. I have removed the unintuitive hack for changing the default theme (adding &#8220;Black&#8221; to the filename of the the nnwstyle package). Now you will need to roll up your sleeves and launch your text editor. </p>

<p>Locate the Ollicle Reflex style package <code>~/Library/Application Support/NetNewsWire/StyleSheets/Ollicle Reflex.nnwstyle</code> reveal it’s contents by right (or control) clicking it and selecting &#8220;Show Package Contents&#8221;.</p>

<p>At the top of the contained &#8220;javascript.js&#8221; you will find values set within the curly brackets of <code>var userPref = {};</code>. To set a default layout you need to first uncomment the line by removing the <code>//</code> from the start of the line. Otherwise make sure you only edit what falls between the colon and the comma, and ensure you leave the quotes around the layout and skin names. Note the last item shouldn’t have a trailing comma. </p>

<p>To see your changes take effect it is necessary to relaunch NetNewsWire so it can update it’s cache of the style. </p>

<p>Maybe someday I’ll try my hand at making a small AppleScript app to edit these options in a more friendly manner. If in the meanwhile you manage to break it (the JavaScript elements of the style will stop working), you can always come back here and download the style again. </p></li>
</ul>

<h2>Screenshots</h2>

<p>I’d love to have a screencast to give you a better preview of the style. For now here’s a few screenshots that illustrate the font size and layout flexibility. Although, rather than waste time looking at them, I recommend scrolling back up the top of this page and downloading it.</p>

<h3>Widescreen NetNewsWire layout</h3>

<h4>One column layout by default</h4>

<p><a href="http://www.ollicle.com/img/reflex6/one-column-wide-default.png"><img src="http://www.ollicle.com/img/reflex6/one-column-wide-default-sml.png" alt="Widescreen one column layout" title="View full size screenshot" /></a></p>

<h4>Larger font size</h4>

<p><a href="http://www.ollicle.com/img/reflex6/one-column-wide-big.png"><img src="http://www.ollicle.com/img/reflex6/one-column-wide-big-sml.png" alt="Widescreen one column layout with large text" title="View full size screenshot" /></a></p>

<h4>Two column—smaller font size</h4>

<p><a href="http://www.ollicle.com/img/reflex6/two-column-wide-small.png"><img src="http://www.ollicle.com/img/reflex6/two-column-wide-small-sml.png" alt="Widescreen two column layout with small text" title="View full size screenshot" /></a></p>

<h3>Traditional NetNewsWire layout</h3>

<h4>Two column layout by default</h4>

<p><a href="http://www.ollicle.com/img/reflex6/two-column-default.png"><img src="http://www.ollicle.com/img/reflex6/two-column-default-sml.png" alt="Traditional two column layout" title="View full size screenshot" /></a></p>

<h4>Larger font size</h4>

<p><a href="http://www.ollicle.com/img/reflex6/two-column-big.png"><img src="http://www.ollicle.com/img/reflex6/two-column-big-sml.png" alt="Traditional two column layout with large text" title="View full size screenshot" /></a></p>

<h4>One column—larger font size</h4>

<p><a href="http://www.ollicle.com/img/reflex6/one-column-big.png"><img src="http://www.ollicle.com/img/reflex6/one-column-big-sml.png" alt="Traditional one column layout with large text" title="View full size screenshot" /></a></p>

<h3>Black background</h3>

<p><a href="http://www.ollicle.com/img/reflex6/two-column-black.png"><img src="http://www.ollicle.com/img/reflex6/two-column-black-sml.png" alt="Traditional two column layout with black background" title="View full size screenshot" /></a></p>

<h2>Scripting image layout is tricky</h2>

<p>The logic executed to determine if an image should be scaled, aligned or left inline is much simpler than my initial somewhat ambitious scheme. I was driven crazy trying to get my head around the increasingly complex possibilities that cascaded from attempting to consider how to handle clusters of images such as those often found in the FlickrBlog.</p>

<p>After sufficient frustration I decided to focus on the more common occurrence of individual images of unpredictable dimensions alongside or within a portion of text. In a nutshell, the trade-off is that images that ought to sit nicely alongside each other in the one row are now forced under one another vertically. Very occasionally this looks broken.</p>

<p>Many bloggers continue to use double line breaks instead of regular paragraphs. I’ll give them the benefit of doubt by pointing my accusatory finger at their blogging tools rather than their shoddy HTML. Regardless, this made the task of ensuring associated text and images remained close in the layout particularly challenging. I delayed the release of this style until I came up with a means to get the better of this puzzle.</p>

<h2>Why spend some much time on a simple looking style?</h2>

<p>The consistency and convenience of feed reading comes with a price. In the thoughtfully constructed HTML content of a RSS feed I get the author’s words and images. I also get the emphasis and structure of their sentences and also links to their references. I get their meaning. I don’t get their CSS. </p>

<p>Many readers, who consider themselves visually or design literate, appreciate the aesthetic of the original artifact of the authors website. Many web authors are dismayed to see the effort they put into the presentation of their posts wasted to feed readers who never see the intended context of the site itself. These people don’t need help finding each other. For everyone else, there is work that can be done. The decisions that go into CSS in a modern website address more than just aesthetic vision of the author. </p>

<p>CSS is the primary tool for removng the obstacles to easy reading. A website built within a given layout and structure provides enough restrictions to widths and heights that effort put into molding the text to best fit it’s space is worthwhile. Outside of the cushy environment of the homepage, in the diverse wilderness of RSS and Atom consumption, these constraints lose relevance. Therefore, outside of the author’s site, so does the author’s CSS.</p>

<p>A feed reader style like Ollicle Reflex, if it is to to fulfil the needs of a discerning reader, needs to be much smarter than a style for an average blog. Not only is the content presented by a feedreader more varied (and often broken) than any given site, the user of a good feed reader has a great deal more control over how how these feeds are viewed.</p>

<p>These diverse demands, and my curiosity, have driven me to turn to JavaScript in Ollicle Reflex. CSS alone struggles to keep the content looking consistently considered.</p>

<h3>Scratching my own back</h3>

<p>Like NetNewsWire, Ollicle Reflex is free. I build it chiefly to scratch my own itches. That said, I love to know others are using it so bring on the feedback! </p>

<p>To all of you who have been suffienctly tempted by my words above to click out of your feedreader to load ollicle.com to best appreciate it’s full artistic intent&#8230; Lets say I have put a little more effort into Ollicle Reflex than my site in recent years :/ Might have to get back onto that.</p>
]]>
        <![CDATA[<h3>14 March 2008</h3>

<p>Updated the download link above to version seven:</p>

<ul>
<li><p>User preference for line-height now works (Thanks Matt).</p></li>
<li><p>Added user preference (in javascript.js) to hide/show the del.icio.us tagometer (Good suggestion Jonathon).</p></li>
</ul>
]]>
    </content>
</entry>
<entry>
    <title>NetNewsWire style hack - Show web page instead of feed</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2008/feb/07/netnewswire_style_hack.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=87" title="NetNewsWire style hack - Show web page instead of feed" />
    <id>tag:www.ollicle.com,2008://1.87</id>
    
    <published>2008-02-07T12:29:09Z</published>
    <updated>2008-02-07T13:40:29Z</updated>
    
    <summary>This stylesheet for NetNewsWire loads the linked web page instead of displaying the feed itself. It is a simple hack born from a question posed to the NetNewsWire email group yesterday.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>This stylesheet for NetNewsWire loads the linked web page instead of displaying the feed itself. It is a simple hack born from a question posed to the NetNewsWire email group yesterday. So Jan, here’s your answer:</p>

<p class="download"><a href="http://www.ollicle.com/downloads/ollicle-wittrodt1.zip">ollicle-wittrodt1.zip</a></p>

<p><img src="http://www.ollicle.com/images/wittrodt-screenshot.jpg" alt="Linked web page displayed in NetNewsWire HTML pane" /></p>

<h2>Installation</h2>

<p>Double-clicking the contained <code>Ollicle Wittrodt.nnwstyle</code> package will prompt NetNewsWire to install the style in your Library.</p>

<p>Select <code>Ollicle Wittrodt</code> from your styles menu to use it.</p>

<p><strong>Note</strong>: If you haven’t already, you need to enable JavaScript for news items in NetNewsWire’s preferences for this style to do anything remotely special:</p>

<ul>
<li>NetNewsWire Preferences
<ul>
<li>Browsing
<ul>
<li>News Items
<ul>
<li>Enable JavaScript</li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<h2>How it works</h2>

<p>One line of JavaScript! Despite calling it a stylesheet it does not include a single line of CSS, just a very trim template file:</p>

<pre><code>&lt;div id="newsItemTitle"&gt;[[newsitem_title]]&lt;/div&gt;
&lt;script type="text/javascript"&gt;
    location.replace(document.getElementById('newsItemTitle').firstChild.getAttribute('href'));
&lt;/script&gt;
</code></pre>

<h2>Coming soon</h2>

<p>For those of you who prefer their feed reading to be clean, consistent and snappy, I have been working on a slowly evolving and revamped version of <a href="http://www.ollicle.com/2007/apr/25/delicious_netnewswire_style.html">Ollicle Reflex</a>. It has some subtle niceties I am very much looking forward to sharing, so keep that browning ollicle.com feed in your list for a little longer yet. </p>
]]>
        

    </content>
</entry>
<entry>
    <title>Bigger link: easier clicking with jQuery</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/oct/23/jquery_link_plugin.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=86" title="Bigger link: easier clicking with jQuery" />
    <id>tag:www.ollicle.com,2007://1.86</id>
    
    <published>2007-10-23T12:18:51Z</published>
    <updated>2007-10-23T13:57:41Z</updated>
    
    <summary>Bigger links are easier to click for everyone. I have written a jQuery plugin which makes implementing easier to click links easier. </summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Bigger links are easier to click for everyone. I have written a jQuery plugin which makes implementing easier to click links easier. </p>

<p>For details you can jump straight to the <a href="http://www.ollicle.com/eg/jquery/biggerlink/">documentation/demo</a>. The following ramble is a little about why I think the plugin is useful.</p>

<h3>Big A</h3>

<p>There are a variety of strategies I have used at work to enlarge the &#8216;hot&#8217; or &#8216;clickable&#8217; area of a links to something more substantial than the regular familiar text link.</p>

<ul>
<li>Resize the <code>&lt;a&gt;</code> with CSS</li>
<li>Wrap it around an image</li>
<li>Link more text</li>
<li>Duplicate the link on multiple elements</li>
</ul>

<p>With HTML alone there is a significant limitation common to the above. While producing valid code, only inline elements may be included inside the <code>&lt;a&gt;</code> element. As an inline element an <code>&lt;a&gt;</code> can never contain a <code>&lt;p&gt;</code>, <code>&lt;h3&gt;</code>, <code>&lt;li&gt;</code> or any other block element.</p>

<p>Using your ninja-like CSS knowledge you can trick a <code>&lt;span&gt;</code>, <code>&lt;em&gt;</code> or <code>&lt;strong&gt;</code> into looking just like their more important blocky friends and wrap this markup in one big link to make it all clickable. Although the result will be valid code the browser bugs you will uncover can be tricky. Long passages of text in links is an accessibility no-no and can look damn nasty without the supporting CSS.</p>

<h3>Time to turn to JavaScript for help.</h3>

<p>In the bad old DHTML days you may have seen something like:</p>

<pre><code>&lt;div onclick="window.location='http://tablelayout.com'"&gt;Some stuff...&lt;/div&gt;
</code></pre>

<p>While providing the &#8216;big link&#8217; I am looking for; This is many flavours of bad. The ideal solution is one that does not influence my HTML markup at all. </p>

<p>Instead we can use the JavaScript to add the desired &#8216;clickability&#8217; on top of nice semantic HTML. For example should I wish to make clicking anything contained by the <code>&lt;div&gt;</code> be equivalent to clicking the link it contains:</p>

<pre><code>&lt;div&gt;
    &lt;h4&gt;Title of some stuff&lt;h4&gt;
    &lt;p&gt;Introductory description of stuff... &lt;/p&gt;
    &lt;p&gt;&lt;a href="more-stuff.htm"&gt;More&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</code></pre>

<p>Using JavaScript to add the additional behaviour unobtrusively ensures you site is not broken without it and avoids the error prone redundancy created of duplicating the URL in HTML and JavaScript.</p>

<p>In essence this is what jquery.biggerlink does. Additionally it adds some classes to help you add some CSS to provide some link-like feedback to your newly fattened links, such as hover or focus.</p>

<p>Have a look at the <a href="http://www.ollicle.com/eg/jquery/biggerlink/">documentation</a> - it incorporates a simple demo at the bottom of the page.</p>

<p>I wrote this plugin for use at work. It is the product of a few Friday afternoons. During this time my employer, <a href="http://www.fusion.com.au">Fusion</a>, allows me and my fellow Fusionites to work on the internal projects that interest us most.</p>

<h3>What next</h3>

<p>Suggestions that might improve the usefulness or efficiency of this code are very welcome. It would be a great way for me to directly demonstrate to my employer one of the benefits of sharing work our work in this way.</p>
]]>
        

    </content>
</entry>
<entry>
    <title>jDefault - Image resizing for your NetNewsWire style</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/aug/17/nnwstyle_jquery_template.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=85" title="jDefault - Image resizing for your NetNewsWire style" />
    <id>tag:www.ollicle.com,2007://1.85</id>
    
    <published>2007-08-16T13:58:35Z</published>
    <updated>2007-11-18T04:55:25Z</updated>
    
    <summary>jDefault is a bare-bones NetNewsWire style that loads my image resizing JavaScript, and the jQuery library it uses, into the default NetNewsWire template. To &amp;#38;#8216;enable&amp;#38;#8217; any existing style built without a custom template.html file, simply replace the contained stylesheet.css with the corresponding file from your selected style.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Some of you love the image resizing feature of my <a href="http://www.newsgator.com/Individuals/NetNewsWire/" title="NetNewsWire at Newsgator">NetNewsWire</a> style <a href="http://www.ollicle.com/2007/apr/25/delicious_netnewswire_style.html">Ollicle Reflex</a>, but would rather see it in a different style, perhaps one with your own particular CSS tweaks? If this sounds like familiar I&#8217;ve made a new NetNewsWire style package especially for you.</p>

<p class="download">Download: <a href="http://www.ollicle.com/downloads/jdefault2.zip">jdefault2.zip</a></p>

<h2>Image resizing in an existing NetNewsWire style in a snap</h2>

<p>jDefault is a bare-bones NetNewsWire style that loads my image resizing JavaScript, and the <a href="http://jquery.com" title="jQuery site">jQuery</a> library it uses, into the default NetNewsWire template. To &#8216;enable&#8217; any existing style built without a custom template.html file, simply replace the contained stylesheet.css with the corresponding file from your selected style.</p>

<p><img src="http://www.ollicle.com/img/jDefault.jpg" height="265" width="590" alt="jDefault contents" title="jDefault contents" /></p>

<p>To expose the contents of the package, right (or control) click on jDefault.nnwstyle in the Finder and select &#8216;Show Package Contents&#8217;. Your existing NetNewsWire styles can be found in your user Library directory:</p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>Double-click your custom .nnwstyle file and NetNewsWire will install it by making a copy of it into this directory. If you are editing a style that is already installed you may need to restart NetNewsWire for the changes to take effect.</p>

<p><strong>A reminder</strong>: if you haven&#8217;t already, you need to enable JavaScript for news items in NetNewsWire&#8217;s preferences for this style to do anything remotely special:</p>

<ul>
<li>NetNewsWire Preferences
<ul>
<li>Browsing
<ul>
<li>News Items
<ul>
<li>Enable JavaScript</li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<h2>Building your own JavaScript enabled nnwstyle with jDefault</h2>

<p>Of course if you are feeling more adventurous, you may wish to go further and use this template as a mere platform for a fresh custom style. Rename the .nnwstyle file to a name that takes your fancy. Replace my details in the contained Info.plist and share it with the world! I&#8217;d love to see what you come up with, and while you are in a <a href="http://ranchero.com/netnewswire/resources/styles.php">sharing mood</a> I&#8217;m sure <a href="http://inessential.com/">Brent would too</a>.</p>

<p>If you are making frequent changes it is worth making a static version of a feed to test in Safari. Right (or control) click in the feed display pane in NetNewsWire and select &#8216;Copy HTML Source&#8217; is the easiest way to grab the HTML you need. You will need to change the path to the imported stylesheet to suit your set-up.</p>

<h2>More on the imageFit jQuery plugin</h2>

<p>The contained jquery.imagefit.js is a complete rewrite of the JavaScript used in my previous NNW styles. For general tidiness and simple reuse it is written as a <a href="http://jquery.com/plugins/" title="jQuery plugin repository">jQuery plugin</a>. In a small way this is a sneak peek at the upcoming version of Ollicle Reflex.</p>

<p>It strikes me with all the web based feed aggregators popping up, this script may have a use on the web itself to keep unruly syndicated images under control. I am yet to test it in non-webkit browsers. In theory at least it ought to work in Firefox - but in it&#8217;s current form it won&#8217;t work in browsers that don&#8217;t support the CSS property max-width. Certainly not IE 6. </p>

<p>Please let me know if you give jquery.imagefit.js a spin elsewhere. If it holds up I&#8217;d like to add it at some point to the growing selection of jQuery plugins.</p>
]]>
        <![CDATA[<h3>18 August 2007</h3>

<p>Uploaded version 2 of jDefault. The updated package includes a slightly modification to jquery.imagefit.js. </p>

<p>Although I hadn&#8217;t seen problems with the previous version in NetNewsWire, the small change fixed an issue in Safari that became clear when I put up the <a href="http://www.ollicle.com/eg/jquery/imagefit/">demo page for jquery.imagefit.js</a> earlier today.</p>

<h3>18 November 2007</h3>

<p><a href="http://factoryjoe.com/blog/">Chris Messina</a> has stepped up and adapted my imageFit plugin for use as a WordPress plugin. <a href="http://factoryjoe.com/blog/2007/11/17/wp-imagefit-proportionally-resizes-images-to-fit-your-blog-template/">WP-Imagefit</a> proportionally resizes images to fit your blog template.</p>

<p>So if you’re not chained to Movable Type like me (rebuilding this blog in MT 4 is hurting&#8230;) and are fond of occasionally posting overly wide images to your WordPress driven blog give it a go.</p>
]]>
    </content>
</entry>
<entry>
    <title>Safari 3 fix for Ollicle Reflex</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/jun/16/safari3_webkit_reflex.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=84" title="Safari 3 fix for Ollicle Reflex" />
    <id>tag:www.ollicle.com,2007://1.84</id>
    
    <published>2007-06-16T09:54:34Z</published>
    <updated>2008-03-09T14:29:21Z</updated>
    
    <summary>Ollicle Reflex has been updated to fix an issue with the version of Webkit installed with the Safari 3 beta.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>If you are using my NetNewsWire style <a href="http://www.ollicle.com/2007/apr/25/delicious_netnewswire_style.html">Ollicle Reflex</a> and recently installed the <a href="http://www.apple.com/safari/">Safari 3 beta</a>, you may have noticed the style&#8217;s article title hide/show behaviour is broken (it no longer shows). Installing the new version of Safari also updates <a href="http://webkit.org/">Webkit</a> which other applications, such as <a href="http://www.newsgator.com/Individuals/NetNewsWire/">NetNewsWire</a>, incorporate to render HTML. Many thanks to <a href="http://thefragens.com/blog/">Andy</a> for bring this problem to my attention. </p>

<p>The good news is amending this only requires a small JavaScript amendment. I&#8217;ve updated Ollicle Reflex (version 5) to include this fix (no other changes).</p>

<p>I&#8217;m looking forward to experimenting with the Webkit update in my NetNewsWire styling endeavors. I expect to find many of the old frustrating bugs squashed. Fingers crossed too for poor old Brent, that some of the crashing bugs that have been plaguing <a href="http://ranchero.com/netnewswire/beta.php">NetNewsWire 3</a> combined view are resolved. Although, sadly, it will be some time before the version of Webkit bundled with Safari 2 can be disregarded.</p>
]]>
        <![CDATA[<h3>10 March 2008</h3>

<p>Another update with a bunch of improvements: <a href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a></p>
]]>
    </content>
</entry>
<entry>
    <title>Auto line-height: a jQuery plugin for flexible layouts</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/jun/03/jquery_lineheight_flexible.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=83" title="Auto line-height: a jQuery plugin for flexible layouts" />
    <id>tag:www.ollicle.com,2007://1.83</id>
    
    <published>2007-06-03T02:35:53Z</published>
    <updated>2007-06-03T07:26:16Z</updated>
    
    <summary>I&apos;m very proud to present my first jQuery plugin: jquery.autolineheight. In a nutshell, this JavaScript adjusts the line-height of a container (such as a `div`) in proportion to it&apos;s width, relative to the font size. </summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>I&#8217;m very proud to present my first <a href="http://jquery.com">jQuery</a> plugin: jquery.autolineheight. In a nutshell, this JavaScript adjusts the line-height of a container (such as a <code>div</code>) in proportion to it&#8217;s width, relative to the font size. </p>

<p><a href="http://www.ollicle.com/eg/jquery/autolineheight/">Demo of jquery.autolineheight</a>.</p>

<p>This is a rework of a script I wrote a while ago to do the same thing. You can read more about it and its purpose in the <a href="http://www.ollicle.com/2005/oct/12/javascript_flex_css.html">original post</a>. </p>

<h2>Download</h2>

<ul>
<li><a href="http://www.ollicle.com/eg/jquery/autolineheight/jquery.autolineheight.js">jquery.autolineheight.js</a> version 0.1</li>
</ul>

<p>Do what you like with this script. Of course, credits and/or links to <a href="http://www.ollicle.com">ollicle.com</a> are always welcome and encouraging!</p>

<h2>Requirements</h2>

<ul>
<li><p><a href="http://jquery.com">jQuery</a> version 1.1.2</p></li>
<li><p><a href="http://davecardwell.co.uk/javascript/jquery/plugins/jquery-em/">jQEm</a> version 0.2</p></li>
</ul>

<p>That original script didn&#8217;t require a JavaScript library to work. As a jQuery plugin this version obviously does, but with significant advantages as a result. My code for determining the relative font size has been discarded it favour of another jQuery plugin jQEm. My plugin inherits the ability of Dave Cardwell&#8217;s clever code to respond to <em>changes</em> in font size.</p>

<h2>Usage</h2>

<p>The best thing about packaging a reusable piece of JavaScript as a jQuery plugin is how easy it becomes to reuse it. With jQuery, jQEm and jquery.autolineheight all linked into the <code>HEAD</code> of your HTML page, very little further code is required to assign the behaviour to the desired element or elements in your page.</p>

<p>For example:</p>

<pre><code>&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.jqem.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery.autolineheight.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
     $(function(){
        $('#flexme').autolineheight();
     });
&lt;/script&gt;
</code></pre>

<p>Where &#8216;flexme&#8217; is the <code>id</code> of an element in your page whose contained text is to be fine tuned. </p>

<h2>Settings</h2>

<p>The above code will adjust the <code>line-height</code> based on a few sensible, easy reading, defaults written into the plugin for convenience. You may adjust these values to your taste and circumstance when you assign the behaviour to an element, for example:</p>

<pre><code>$('#flexme').autolineheight({minWidth:16,minLineHeight:1.2,ratio:.03});
</code></pre>

<p>Note the separating commas and the extra set of curly brackets. </p>

<p><code>minWidth</code> and <code>minLineHeight</code> combine to define the &#8216;tightest&#8217; end of the scale. These are the default values:</p>

<pre><code>minWidth: 15
minLineHeight: 1.4
</code></pre>

<p>If the assigned element has a width less than or equal to the <code>minWidth</code> (in ems) the value of <code>minLineHeight</code> is assigned as the <code>line-height</code>. If the element has a width greater than minWidth the <code>line-height</code> is increased with a multiplier:</p>

<pre><code>ratio: .02
</code></pre>

<p>The larger the value of <code>ratio</code> the &#8216;faster&#8217; the line-height will increase as the element is widened. </p>

<h2>Inheriting CSS</h2>

<p>It&#8217;s worth highlighting that this script will only override the line-height of elements it is explicitly assigned to. Contained elements will only inherit their parent&#8217;s line-height if they don&#8217;t have a line-height of their own set. For example with this CSS:</p>

<pre><code>body {line-height: 1.5}
p {line-height: 1}
</code></pre>

<p>And this HTML, where the autolineheight script has set the <code>line-height</code> of the <code>div</code> to 1</p>

<pre><code>&lt;body&gt;
    &lt;div id="flexme" style="line-height:2"&gt;
        &lt;p&gt;Some text&lt;/p&gt;
        &lt;p&gt;Some more text&lt;/p&gt;
    &lt;/div&gt;
&lt;/body&gt;
</code></pre>

<p>The paragraphs will have a <code>line-height</code> of 1 as set in the CSS. Overruling both the <code>line-height</code> of the <code>body</code> and its parent <code>div</code>. If I was remove the CSS assigning the <code>line-height</code> to the <code>p</code>s they would inherit their <code>line-height</code> value from the next closest parent - in this case the <code>div</code>.</p>

<p>You can apply autolineheight to the <code>p</code>s directly with <code>$('p').autolineheight();</code> but that is less effecient than having the text elements inherit their line-heights from a containing <code>div</code>. </p>

<p>My decision to set unitless line-heights (rather than using % or px) is best explained by <a href="http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/" title="Unitless line-heights">Eric Meyer</a>.</p>

<h2>Where from here</h2>

<p>I look forward to feedback from people actually using jquery.autolineheight in real projects. In the meantime I&#8217;m incubating a few more ideas for plugins that help with the presentation of content in &#8216;flexible&#8217; layouts and re-reading <a href="http://www.hunlock.com/blogs/Functional_Javascript">Functional Javascript</a> once (or twice) more.</p>
]]>
        

    </content>
</entry>
<entry>
    <title>Del.icio.us reflex</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2007/apr/25/delicious_netnewswire_style.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=82" title="Del.icio.us reflex" />
    <id>tag:www.ollicle.com,2007://1.82</id>
    
    <published>2007-04-25T10:05:51Z</published>
    <updated>2008-04-12T09:17:36Z</updated>
    
    <summary>To thank everyone who spent the time to send me feedback on my NetNewsWire style, Ollicle Reflex, I&apos;m publishing a new version. It fixes a couple of popular problems and introduces some del.icio.us love.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>To thank everyone who spent the time to send me feedback on my NetNewsWire style, <a href="http://www.ollicle.com/2006/nov/28/jquery_netnewswire_style.html">Ollicle Reflex</a>, I&#8217;m publishing a new version. It fixes a couple of popular problems and introduces some <a href="http://del.icio.us" title="Social bookmarking">del.icio.us</a> love.</p>

<p><a href="http://www.ollicle.com/img/reflex-tags.jpg" title="Full size image"><img src="http://www.ollicle.com/img/reflex-tags-sml.jpg" alt="Displaying the top ten del.icio.us tags" title="" /></a></p>

<p>If you are not already familiar with what Ollicle Reflex has to offer NetNewsWire check out the <a href="http://www.ollicle.com/2006/nov/28/jquery_netnewswire_style.html">features detailed</a> on my previous post. Otherwise download it and find out for yourself.</p>

<h2>Download and install (Updated see: <a href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a>.)</h2>

<p class="ollicle">Download latest version: <a href="http://www.ollicle.com/projects/netnewswire/reflex/">Ollicle Reflex</a></p>

<p>I have removed the link to Ollicle Reflex Black. There is a <a href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html">new method</a> for setting Black as the default background.</p>

<p>Double-click the unzipped .nnwstyle file and NetNewsWire will copy it to where it needs to be. </p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>Like the original release, this style uses JavaScript to do some things CSS alone cannot. Make sure you enable it </p>

<ul>
<li>NetNewsWire Preferences 
<ul>
<li>Browsing 
<ul>
<li>News Items
<ul>
<li>Enable JavaScript </li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<p>Requires at least NetNewsWire version 2.1 (<a href="http://www.newsgator.com/NGOLProduct.aspx?ProdId=NetNewsWire&amp;ProdView=lite">lite</a> or <a href="http://www.newsgator.com/NGOLProduct.aspx?ProdID=NetNewsWire">full</a>). The JavaScript driven magic of the style fails in NetNewsWire 2.0.1 - I have not spent the time to figure out why. Although, it does work nicely in the lovely <a href="http://ranchero.com/netnewswire/beta.php" title="Not even beta!">NetNewsWire 3 Sneak Peak Release</a>.</p>

<h2>Changes</h2>

<h3>Fixes</h3>

<ul>
<li><p>Cookied skin selections we&#8217;re failing to &#8216;stick&#8217; when using the style file name (e.g. &#8216;Ollicle Reflex black.nnwstyle&#8217;) to set the black skin by default.</p></li>
<li><p>Removed a poorly implemented &#8216;feature&#8217; which toggled the display of highlighted differences in feed content with cursor position. More on this below.</p></li>
</ul>

<h3>New features</h3>

<ul>
<li><p>Displays a del.icio.us <a href="http://del.icio.us/help/tagometer">Tagometer Badge</a> for each viewed news item. This shows you how many del.icio.us users have tagged the news item you are viewing and the top ten tags they used.</p></li>
<li><p>When NewNewsWires Highlight differences option is checked, items of deleted content are indicated with an inline ▲. Clicking each triangle toggles the display of that particular item of deleted content individually.</p></li>
</ul>

<h2>Some back story</h2>

<h3>Perseverance rewarded with tags</h3>

<p>Having recently worked out how to load <a href="http://jquery.com" title="JavaScript library">jQuery</a> into a NetNewsWire style, when I <a href="http://blog.del.icio.us/blog/2006/12/the_new_and_tag.html">read about</a> the introduction of the <a href="http://del.icio.us/help/json/url">del.icio.us JSON API</a>, I saw the potential for integrating it into a NNW style immediately. Figuring out the technical details to make it happen took me a lot longer. <a href="http://www.quirksmode.org/book/">PPK on JavaScript</a> helped me fill the necessary holes in my patchy JavaScript knowledge. It&#8217;s a wonderfully practical book I recommend to anyone struggling with the basics of JavaScript.</p>

<p>My perseverance was rewarded. The del.icio.us tags are particularly informative when viewing some del.icio.us generated feeds that are often lacking a useful descriptions. The top tags often tell me whether the bookmarked web page is one I wish investigate further or ignore.</p>

<p>It&#8217;s worth noting that feeds served up with <a href="http://www.feedburner.com/">feedburner</a>-redirected urls do not work. Because no one bookmarks feedburner urls on del.icio.us they will appear as &#8216;untagged&#8217; in Ollicle Reflex.</p>

<h3>When a feature becomes a bug</h3>

<p>NetNewsWire has a nifty feature named Highlight differences by its preference checkbox. Additions and deletions in the content of updated a posts are marked up with <code>ins</code> and <code>del</code> tags respectively. Although it&#8217;s often useful and interesting to see how an author has edited their posts - the red and green can be quite distracting to normal reading. </p>

<p>Reflex (and my previous styles) included a feature to hide and show these differences by moving your cursor over the body of the post. This confused many people who had not &#8216;read the manual&#8217; and understandably interpreted the occasionally frantic flickering as a bug.</p>

<p>Ultimately my implentation of this feature was too subtle; And the difference between a subtle feature and a bug is a fine one indeed. I have read advice to this affect from a number of software developers who have learnt this lesson the hard way. It&#8217;s enlightening to experience the problems caused by poorly advertised features first hand.</p>

<p>This version of Ollicle Reflex does away with the cursor over the body technique to instead require a directed mouse click from the user to display each deletion. Hopefully people will find this behaviour less mysterious.</p>
]]>
        <![CDATA[<h3>16 June 2007</h3>

<p>Updated to version 5 to <a href="http://www.ollicle.com/2007/jun/16/safari3_webkit_reflex.html">fix an issue</a> with the version of Webkit installed with the Safari 3 beta. Download above.</p>

<h3>10 March 2008</h3>

<p>Another update with a bunch of improvements: <a href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a></p>
]]>
    </content>
</entry>
<entry>
    <title>Reflex for NetNewsWire</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/nov/28/jquery_netnewswire_style.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=81" title="Reflex for NetNewsWire" />
    <id>tag:www.ollicle.com,2006://1.81</id>
    
    <published>2006-11-28T11:26:45Z</published>
    <updated>2008-04-12T09:14:38Z</updated>
    
    <summary>Ollicle Reflex in an evolutionary improvement on my last NetNewsWire style - Ollicle Flex. Now updated to version 4.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Ollicle Reflex in an evolutionary improvement on my last NetNewsWire style - <a href="http://www.ollicle.com/projects/netnewswire/#style4">Ollicle Flex</a>. </p>

<p>This style is designed to maximise legibility rather than add distracting &#8216;style&#8217; to your feed reading. Those who like a bit of colour and visual impact in their feed reading will appreciate it&#8217;s smart handling of full size photographs and comics.</p>

<p><a href="http://www.ollicle.com/img/reflex-white.jpg" title="Full size image"><img src="http://www.ollicle.com/img/reflex-white-sml.jpg" alt="With white background" title="" /></a> Default white background.</p>

<p><a href="http://www.ollicle.com/img/reflex-black.jpg" title="Full size image"><img src="http://www.ollicle.com/img/reflex-black-sml.jpg" alt="With black background" title="" /></a> Optional black background.</p>

<h2>Download and install (Updated see: <a href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a>.)</h2>

<p class="ollicle">Download latest version: <a href="http://www.ollicle.com/projects/netnewswire/reflex/">Ollicle Reflex</a></p>

<p>I have removed the link to Ollicle Reflex Black. There is a <a href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html">new method</a>.) for setting black as the default background.</p>

<p>Double-click the unzipped .nnwstyle file and NetNewsWire will copy it to where it needs to be. </p>

<pre><code>~/Library/Application Support/NetNewsWire/StyleSheets/
</code></pre>

<p>Like my previous release, this style uses JavaScript to do some things CSS alone cannot. Make sure you enable it </p>

<ul>
<li>NetNewsWire Preferences 
<ul>
<li>Browsing 
<ul>
<li>News Items
<ul>
<li>Enable JavaScript </li>
</ul></li>
</ul></li>
</ul></li>
</ul>

<p>Works great with the <a href="http://www.newsgator.com/NGOLProduct.aspx?ProdID=NetNewsWire">full version of NetNewsWire</a> or <a href="http://www.newsgator.com/NGOLProduct.aspx?ProdId=NetNewsWire&amp;ProdView=lite">lite</a>.</p>

<h2>Key features</h2>

<h3>Carried over from Flex (with improvements!)</h3>

<ul>
<li>Auto line-height to suit your selection of window layout (the loading &#8216;jump&#8217; has been minimised).</li>
<li>Images scale to fit window width (padding related stretching bug fixed).</li>
<li>Choice of two layouts (selection saved per feed).</li>
<li>Doesn&#8217;t interfere with your choice of font and text size.</li>
</ul>

<h3>Reflex introduces</h3>

<ul>
<li>A new preference &#8216;UI&#8217;.</li>
<li>Optional black background (nice for images).</li>
<li>Inline feed styles stripped for consistent feed legibility.</li>
<li>Some small tweaks to the display of images.</li>
<li>Fixed position news title now only appears when you scroll down the page.</li>
</ul>

<p>Mostly I continue to work on styles for NetNewsWire to please myself. Regardless, I am interested to hear your ideas on improving your reading experience.</p>

<h2>Behind the scenes</h2>

<h3>Timely challenge</h3>

<p>Initially one of my big struggles with introducing JavaScript into my NetNewsWire style was controlling when (if at all!) the script would fire. The Flex style does not perform any JavaScript until the content of the feed is loaded completely. I have a pretty quick internet connection, so it was rarely a matter of patience; Rather it was the &#8216;jump&#8217; after the images loaded that bothered me. At the time the only reliable techniques that worked for Safari/Webkit, that I could find, involved a timed delay to ensure the page would be <em>ready</em> to be manipulated by JavaScript. The text would still noticeably jump when the calculated line-height was applied.</p>

<h3>Finding the path</h3>

<p>Eventually a solution came to light that worked, but there was a problem applying the method to a NetNewsWire style. The technique relied on the JavaScript being linked into the head of the page as an external file. Simple when you are putting together a web page, but the style template NetNewsWire uses is limited to the contents of the body of the page. </p>

<p>I had a existing script to dynamically add an external file into a page, and it is a no-brainer to drop my JavaScript into its own file inside the .nnwstyle package. The tricky bit was finding the path to this file - the simple relative link doesn&#8217;t work and I couldn&#8217;t determine the full path without knowing the name of the user directory where the style package lives in advance. </p>

<h3>Frustrated potential</h3>

<p>The prospect of finding a means to load an external file was tantalising. It could provide a way to load a JavaScript library to make DOM scripting a bit more fun. I don&#8217;t enjoy wrestling JavaScript but I love getting things to work.  <a href="http://jquery.com">JQuery</a> in particular makes DOM scripting fun and also provided a solution to my initial script launching challenge. Too good to be true? It was until I found a way to load the file in the first place.</p>

<h3>Seeing the obvious</h3>

<p>It took awhile for my subconscious to get through to me and point to the answer under my nose. NetNewsWire was already determining the path to an external file residing in every style package - the CSS file! Two lines of JavaScript to read the content of the generated style tag and replace <code>stylesheet.css</code> with <code>javascript.js</code> and the path to the file was complete.</p>

<h3>Until next time</h3>

<p>My JavaScript is still a bit of a mess. I have not spent the time to rewrite my code as a showcase of the beauty jQuery can bring. I had to resist a strong temptation to put off sharing the style until I had polished it a little. Release early and often they say - so I figure I&#8217;ll release a shiny version next time - one day, maybe. </p>

<p>In the meantime it&#8217;s working for me - I hope it works for you!</p>
]]>
        <![CDATA[<h3>29 December 2006</h3>

<h4>New feature - Black skin default</h4>

<p>A significant number of you have politely requested a means to use the black skin by default. So I&#8217;ve spent a some of my hard earned holiday time to post a new version (3) of Ollicle Reflex with a trick up it&#8217;s sleeve.</p>

<p>You may change the default skin by changing the name of the unzipped file: </p>

<ul>
<li>for white use &#8216;Ollicle Reflex.nnwstyle&#8217; </li>
<li>for black use exactly &#8216;Ollicle Reflex black.nnwstyle&#8217;.</li>
</ul>

<p>Double-click the file to install it and you&#8217;re done!</p>

<p><strong>Note</strong>: JavaScript must be enabled for this bit of magic to work - see above.</p>

<p><strong>Also note</strong>: if you have a previous version of Reflex installed - installing the new version with the altered name will leave the older version in place. To remove NetNewsWire styles you can delete (or move) them from:</p>

<pre><code>~/Library/Application Support/NewNewsWire/StyleSheets/
</code></pre>

<p>If you make changes to files directly in this folder you will need to restart NetNewsWire to see the result.</p>

<h3>25 April 2007</h3>

<p>To thank everyone who spent the time to send me feedback on this style I’ve updated it. <a href="http://www.ollicle.com/2007/apr/25/delicious_netnewswire_style.html">The new version</a> fixes a couple of popular problems and introduces some del.icio.us love.</p>

<h3>10 March 2008</h3>

<p>Another update with a bunch of improvements: <a href="http://www.ollicle.com/2008/mar/08/ollicle_reflex_netnewswire_style.html">Ollicle Reflex refined</a></p>
]]>
    </content>
</entry>
<entry>
    <title>Quick accessibility fix with jQuery</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/nov/17/jquery_accessibility.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=80" title="Quick accessibility fix with jQuery" />
    <id>tag:www.ollicle.com,2006://1.80</id>
    
    <published>2006-11-17T11:42:34Z</published>
    <updated>2006-11-21T09:00:54Z</updated>
    
    <summary>IE 7 has inherited the IE 6 problem with keyboard navigation and inline anchors. The otherwise time consuming fix was made simple with little a JavaScript - made even easier with jQuery. JavaScript to improve accessibility! Who would have thought...</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>IE 7 has inherited the IE 6 problem with <a href="http://juicystudio.com/article/ie-keyboard-navigation.php">keyboard navigation</a> and inline anchors. The otherwise time consuming fix was made simple with little a JavaScript - made even easier with <a href="http://jquery.com">jQuery</a>. JavaScript to improve accessibility! Who would have thought&#8230;</p>

<h2>The accessibility problem</h2>

<p>By using a keyboard I mean tapping  the <code>tab</code> key to move from link to link through a web page. This method works well to get until you want to skip some of the content by following a link to an anchor that is within the content of the page. The page will scroll down appropriately to the location of the anchor, but tapping <code>tab</code> once more to keep moving doesn&#8217;t always do what you may expect. Instead of moving the focus to the next link <em>after</em> the anchor it will move to a different link somewhere near the top of the page - often scrolling the page back up without regard for where you <em>thought</em> you were at in the page. This is disorienting to me - imagine what it is like for someone reliant on a screen reader to tell them what is happening on the screen!</p>

<h2>Two kinds of anchor</h2>

<p>The true nature of this problem seems to be obscured by the complexity of it&#8217;s triggers. Rather than attempt to figure it out definitively I&#8217;ll just stick to the problem I was experiencing. There are two kinds of destinations for same page anchors in my project:</p>

<ul>
<li><p>div elements which appear on every page to divide the page into meaningful chunks such as (navigation vs. content): <code>&lt;div id='templatesection'&gt;...</code> (these work fine);</p></li>
<li><p>And inline anchors which our client enters in throughout long pages of content to make it quicker to navigate  <code>&lt;a id='contentsection'&gt;&lt;/a&gt;</code> (uh oh, trouble).</p></li>
</ul>

<h2>The workaround</h2>

<p>To cut a longer story short you can fix it by wrapping a span around each inline anchor;</p>

<pre><code>&lt;span class='anchor'&gt;&lt;a id='contentsection'&gt;&lt;/a&gt;&lt;/span&gt;
</code></pre>

<p>and add a line to your CSS:</p>

<pre><code>.anchor {display:absolute;}
</code></pre>

<h2>Markup baggage</h2>

<p>Unfortunately the site I am working on has many hundreds of these anchors peppered through it&#8217;s content. Each one has been individually inserted by our client with the link tool sported by WYSIWYG toolbar of the site&#8217;s CMS. Even if we hacked the code of the toolbar to change the mark-up it produced when inserting anchors. It would be necessary to reinsert every one. </p>

<h2>Using jQuery to add the markup</h2>

<p>I was considering pestering one of our developers to do a bit of database search and replace monkeying when I realised how easy it would be to add the extra code with some jQuery driven JavaScript.</p>

<p>If you are like me - HTML and CSS savvy, but not quite up with the pack in the JavaScript department - jQuery is the shit when it comes to DOM scripting JavaScript libraries. I hope this little example helps communicate my enthusiasm for it.</p>

<h3>The code</h3>

<pre><code>$(document).ready(function(){
    $("a[@id]").not("[@href]").wrap("&lt;span class='anchor'&gt;&lt;/span&gt;");
});
</code></pre>

<p>That&#8217;s it! With the (pleasantly trim) jQuery library loaded, this script will find all the anchors in the page that have an <code>id</code> but no <code>href</code> and enclose each of them in a span with a class. </p>

<h3>Links in the chain</h3>

<p>To the uninitiated the code above will look arcane. Broken down it&#8217;s simple.</p>

<ol>
<li><p>This code ensures that any functions it contains are not fired until the DOM is ready - generally well before all the content (especially images) of the page is loaded.</p>

<pre><code>$(document).ready(function(){


});
</code></pre></li>
<li><p>Firstly I need to specify which elements in the document I wish to modify.  Let&#8217;s start with the most basic expression before narrowing it down. This tells jQuery (represented by the &#8216;$&#8217;) to find every <code>&lt;a&gt;</code> in the document. Just as in CSS where <code>a{};</code> refers to every <code>&lt;a&gt;</code>. </p>

<pre><code>$(document).ready(function(){
    $("a");
});
</code></pre></li>
<li><p>With a &#8216;selector&#8217; defined I can simply add to the <a href="http://jquery.com/docs/ChainableMethods/">chain</a> to manipulate each of those elements. This will add a span around every <code>&lt;a&gt;</code>:</p>

<pre><code>$(document).ready(function(){
    $("a").wrap("&lt;span class='anchor'&gt;&lt;/span&gt;");
});
</code></pre></li>
<li><p>Of course I don&#8217;t want to do that! This would do crazy things to the regular links in my page.  To discriminate between the links and anchors I need to be more specific. </p>

<p>My anchors each have an <code>id</code> assigned which I&#8217;m pretty sure the regular navigation links don&#8217;t have. So I can use that to refine the selector expression for jQuery.  Adding the square brackets immediately after the &#8216;a&#8217; in the expression provides a context to check something about this element in particular. Inside which, the <code>@</code> refers to an attribute of that element,  in this case it&#8217;s <code>id</code> attribute. All up <code>a[@id]</code> selects every <code>&lt;a&gt;</code> with any <code>id</code>:</p>

<pre><code>$(document).ready(function(){
    $("a[@id]").wrap("&lt;span class='anchor'&gt;&lt;/span&gt;");
});
</code></pre></li>
<li><p>Now my list of <code>&lt;a&gt;</code> elements in the page only includes those that have an <code>id</code>. I&#8217;m pretty sure I don&#8217;t have any regular links with <code>id</code>s&#8230; To be absolutely sure it would be a good idea to remove all the elements from this list that have a <code>href</code>. </p>

<p>This isn&#8217;t done by further refining the expression like I have done so far. Instead I am adding a <code>not()</code> to the chain - between the <code>$()</code> and the <code>wrap()</code>. This whittles down the list of elements found by the initial expression - <em>removing</em> any that match this further check before the list is passed along down the chain for &#8216;wrapping&#8217;.  The &#8216;not&#8217; expression should look familiar now - except this time we are checking for <code>href</code> instead of <code>id</code>. Also notice there is no need to include the <code>a</code> in this expression. The list of elements is already limited to those that have passed the first test:</p>

<pre><code>$(document).ready(function(){
    $("a[@id]").not("[@href]").wrap("&lt;span class='anchor'&gt;&lt;/span&gt;");
});
</code></pre></li>
</ol>

<p>Perhaps my explanation has puzzled your curiosity sufficiently to look at jQuery for yourself. Check out the <a href="http://jquery.com">official site</a>. It has <a href="http://jquery.com/docs/">excellent documentation</a> and <a href="http://jquery.com/docs/Plugins/">astounding plugins</a>. Even <a href="http://jquery.com/docs/AJAXModule/">AJAX</a> looks easy with jQuery!</p>

<h2>Medicine. but not a cure</h2>

<p>This coding cleverness doesn&#8217;t resolve the keyboard navigation problem for those of us unlucky enough to need to use Internet Explorer <em>without</em> JavaScript. Nor does it solve the same problem for Safari users - with or without JavaScript! Misuse has earned JavaScript a bad reputation when it comes to web accessibility. I hope this does a little to demonstrate it can be a power for good too.</p>
]]>
        <![CDATA[<h2>21 November 2006</h2>

<p>Seems this script breaks some anchors altogether in IE 6. So much for enhancing accessibility! I&#8217;ll be sure to post something here when I get to the bottom of it.</p>
]]>
    </content>
</entry>
<entry>
    <title>Goodbye</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/aug/23/sad_first_ipod.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=79" title="Goodbye" />
    <id>tag:www.ollicle.com,2006://1.79</id>
    
    <published>2006-08-22T15:38:01Z</published>
    <updated>2007-01-14T04:50:48Z</updated>
    
    <summary>This week I have had to say farewell to a dear friend.  Even though four years is a long time in iPod years, my iPod died before it&apos;s time with a nasty sounding clap on the footpath.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>This week I have had to say farewell to a dear friend. I bought my beautiful 5GB firewire wonder (aka olliPod) in January 2002. Since then my iPod has been by my side more often than not. The battery time wasn&#8217;t what it used to be and the hold switch was getting dicky, but these are the kind of flaws you forgive in those you love. It wasn&#8217;t these signs of age that killed it, but rather my tolerance of the overly worn belt clip that kept my tunes handy. Even though four years is a long time in iPod years, my iPod died before it&#8217;s time with a nasty sounding clap on the footpath. </p>

<p>That night, after a quiet day, upon connecting the firewire, I was startled by a loud click and a series of ominous icons, fatally concluded with the graphic of a <a href="http://the.taoofmac.com/space/blog/2005-05-08">sad face</a> of an iPod. </p>

<p>I&#8217;m missing my daily dose from the <a href="http://www.escapepod.org/">Escape Pod</a> back catalog, and keeping up with the <a href="http://www.abc.net.au/rn/scienceshow/default.htm">Science Show</a> is a little more difficult; So it won&#8217;t be long before I start thinking seriously about a replacement. It&#8217;s funny to think for the price I payed for my first generation iPod I could now buy a 60GB and a couple of 1GB shuffles with the change. Even so, I&#8217;m still hesitant to replace my friend before it&#8217;s clear what Apple has up their sleeve for the next generation.</p>
]]>
        

    </content>
</entry>
<entry>
    <title>Family tree markdown</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/aug/14/family_tree_markdown_wiki.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=78" title="Family tree markdown" />
    <id>tag:www.ollicle.com,2006://1.78</id>
    
    <published>2006-08-13T13:37:38Z</published>
    <updated>2006-08-23T12:05:23Z</updated>
    
    <summary>At a family gathering not long ago, thinking out loud, I suggested the web would be the best place for the updated family tree. Knowing full well that ideas alone don&apos;t get anything done–I felt obliged to put the theory into practice.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>At a family gathering not long ago, thinking out loud, I suggested the web would be the best place for the updated family tree. Knowing full well that ideas alone don&#8217;t get anything done–I felt obliged to put the theory into practice. </p>

<p>It took me a while to get going while I wrestled with a number of different database and software solutions. Eventually I was struck by the most obvious and straight forward way to do it - a wiki. The approach I settled upon, and the system I have spent hours transcribing names and dates into, have together produced a wonderfully simple, elegant solution to the problem of presenting an online family tree.</p>

<p>Aaron Swartz&#8217;s greatly underrated <a href="http://infogami.com">Infogami</a> is the core tool that brought the key elements together. A bare bones wiki that uses the equally clean <a href="http://daringfireball.net/projects/markdown/">Markdown</a> syntax for structuring text. I have used the <a href="http://boermans.infogami.com/blog/">built in blog</a> to document my progress with the project so far. In keeping with the theme of simplicity I have structured the tree with something closely resembling the technically named, but beautifully elegant, <a href="http://humphrysfamilytree.com/hyper.html">Hypertext Indented Narrative</a> advocated by Mark Humphrys. There is of course still plenty to do before I start worrying about customising the templates or making it pretty - Infogami provides plenty of scope for me to address such niceties later. </p>

<p>My hope is the simplicity of Infogami and Markdown will make it easy for other members of the extended <a href="http://boermans.infogami.com">Boermans family</a> to correct my typos, as well the errors and omissions in the printed documents I have copied.</p>
]]>
        

    </content>
</entry>
<entry>
    <title>WebnoteHappier</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/jun/04/delicious_webnotehappy.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=76" title="WebnoteHappier" />
    <id>tag:www.ollicle.com,2006://1.76</id>
    
    <published>2006-06-03T13:52:42Z</published>
    <updated>2006-08-01T09:54:14Z</updated>
    
    <summary>The newest addition to my regularly used applications is the cheerily named WebnoteHappy. This fresh indie Mac app is a bookmark manager with excellent del.icio.us integration. I&apos;m excited to talk about it partly because it integrates some key features I hoped for in a del.icio.us client after discovering Cocoalicious. It&apos;s inspired me to continue thinking about my dream del.icio.us client.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>The newest addition to my regularly used applications is the cheerily named <a href="http://www.happyapps.com/webnotehappy/">WebnoteHappy</a>. This fresh indie Mac app is a bookmark manager with excellent <a href="http://del.icio.us">del.icio.us</a> integration. I&#8217;m excited to talk about it partly because it integrates some key features I hoped for in a del.icio.us client after discovering <a href="http://www.scifihifi.com/cocoalicious/">Cocoalicious</a>.</p>

<p>These features are far too sensible and obvious for me to attempt to take any credit for them, regardless if you are a Mac user with too many bookmarks I highly recommend you check this application out. </p>

<p>My last rant on the subject of a <a href="http://www.ollicle.com/2004/oct/11/delicious_client.html">dream del.icio.us client</a> concluded with a musing on how I would like to see a tag browsing interface used as an aid for assigning tags, rather than just browsing. After using happily bookmarking with WebnoteHappy for a couple of weeks I had an idea of how that could possibly be done.</p>

<p>In a nutshell I&#8217;d like to see the tag browser and webnote listing to update as I edit the tags for a given bookmark. The purpose being to provide valuable information that is likely to influence my selection of tags: </p>

<ol>
<li>Which other bookmarks (if any) share the same tags as the bookmark I&#8217;m editing?</li>
<li>What other tags have I already assigned to potentially related bookmarks?</li>
</ol>

<p>Some will disregard these concerns as problems with <em>categories</em> not <em>tags</em>. Personally I&#8217;d like to know how unique my tagging of a particular website is. Tags becomes less useful as a tool for <em>filtering</em> my links if I have hundreds of sites tagged with the same tags. Similarly, if I fail to tag two sites of related subject matter with common tags, my tags will be not be useful for <em>grouping</em> my links.  The current official browser based pop-up window for posting to del.icio.us does this to a degree by suggesting the most popular tags for a given link that is already in the database. What I&#8217;m suggesting doesn&#8217;t leverage the power of the &#8216;group mind&#8217;, but it ought to provide another valuable context - my existing collection of links and tags.</p>

<p>I&#8217;ve attempted to demonstrate this idea with a series screenshots of WebnoteHappy. I made a few clicks between each frame to roughly replicate what I envisage happening automatically. </p>

<p>Check out <a href="http://www.ollicle.com/eg/webnotehappier/">WebnoteHappier</a>.</p>

<p>If there are any del.icio.us posting interfaces out there that already do this I&#8217;d love to hear about them!</p>
]]>
        

    </content>
</entry>
<entry>
    <title>NetNewsWire styles project page</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/mar/26/netnewswire_styles.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=75" title="NetNewsWire styles project page" />
    <id>tag:www.ollicle.com,2006://1.75</id>
    
    <published>2006-03-26T14:04:16Z</published>
    <updated>2006-04-07T10:34:43Z</updated>
    
    <summary>My friend and colleague Nicolas suggested wisely that I make it easier for people to find my NetNewsWire styles. I&apos;ve made a start with a dedicated project page.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>Friend and colleague <a href="http://nicolas.noben.org/">Nicolas</a> wisely suggested that I make it easier for people to find my NetNewsWire styles. The <a href="http://www.ollicle.com/projects/netnewswire/">Ollicle NetNewsWire styles project page</a> provides quick access to the handful of styles I have published. Weaving some links from around the site into this new page will make it more useful, but it&#8217;s a start at least.</p>

<p>On the side I&#8217;m working on some ideas for an update to <a href="http://www.ollicle.com/2006/feb/04/netnewswire_cookie_style.html">Ollicle Flex</a>. I&#8217;m interested to hear your feedback, so give it a go and please <a href="http://www.ollicle.com/2006/feb/04/netnewswire_cookie_style.html#comments">let me know</a>.</p>
]]>
        <![CDATA[<h3>Update 7 April 2006</h3>

<p>More ollicle maintenance. There&#8217;s now a projects tab in the main navigation and a project index page at the end of it. While I was at it I removed the broken site search. I suspect a database glitch is the cause; Feeling too lazy to figure it out right now.</p>
]]>
    </content>
</entry>
<entry>
    <title>NetNewsWire style with free cookies</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/feb/04/netnewswire_cookie_style.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=74" title="NetNewsWire style with free cookies" />
    <id>tag:www.ollicle.com,2006://1.74</id>
    
    <published>2006-02-03T22:44:18Z</published>
    <updated>2006-12-04T02:05:10Z</updated>
    
    <summary>This is a relaunch of Ollicle Flex, a style for NetNewsWire which makes use of cookies. No doubt you are scratching your head, ‘I thought styles were written with CSS’, you may think, ‘What have cookies got to do with how my feeds look?’.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>This is a relaunch of <a href="http://www.ollicle.com/2005/oct/09/javascript_flex_css.html">Ollicle Flex</a>, a style for NetNewsWire which makes use of cookies. No doubt you are scratching your head, ‘I thought styles were written with CSS’, you may think, ‘What have cookies got to do with how my feeds <em>look</em>?’.</p>

<p>If you&#8217;re not particularly interested in the details of why and how just <a href="http://www.ollicle.com/downloads/ollicle-flex.zip" title="zip file">download Ollicle Flex</a> and try it for yourself. Remember to enable JavaScript for News Items to enable the new features. Read on for the nitty gritty.</p>

<p>The process of creating this style didn&#8217;t start with my hands in the cookie jar - these tiny bits of saved information turned a solution to a problem into a feature.</p>

<h2>The problem with large images</h2>

<p>A kind commenter highlighted an issue (thanks Dean), with an earlier version of Ollicle Flex, where wide images are overlapped by the info text block on the right. There&#8217;s some CSS that ensures you can read the text if you hold your cursor above the info, but this background colour change does nothing to prevent the distraction to the image itself. Beyond that (until recently) I had thrown this particular problem into the too-hard basket. Most feeds I regularly read keep their images within a manageable size.</p>

<p><a href="http://www.ollicle.com/img/default-comic.jpg" title="View full size screenshot"><img src="http://www.ollicle.com/img/default-comic-sml.jpg" alt="Large image cropped using Default style" title="" /></a> <br />
Even without the distraction of text overlapping them, even regular styles will obviously crop large images.</p>

<h2>DOM scripting to the rescue</h2>

<p>Armed with a copy of the wonderful <a href="http://domscripting.com/book/">DOMscripting</a> I decided to tackle this problem from a different angle. Perhaps  the <em>images</em> could scale to fit the available space. This would fit nicely into my vision for Ollicle Flex. Making this happen within a flexible layout proved tricky, I suspect I may have stumbled across a webkit bug or two. I&#8217;ll leave the tedious details and workarounds for a another post, maybe. In the long run I got it to work nicely!</p>

<p><a href="http://www.ollicle.com/img/flex-comic-default.jpg" title="View full size screenshot"><img src="http://www.ollicle.com/img/flex-comic-default-sml.jpg" alt="Large image scaled using Ollicle Flex - 2 column view" title="" /></a> <br />
When using Ollicle Flex large images are scaled to fit the width of the column.</p>

<p>All I need now is a handy way to view the images at the larger size, should I want to. </p>

<h2>Considering Lightbox</h2>

<p>Originally I planned to adapt the <a href="http://www.huddletogether.com/projects/lightbox/">Lightbox JS</a> technique. Clicking on a scaled down image would &#8216;pop&#8217; it up to a maximised size overlaying the feed. Seemed doable in theory, but considering the scenario of clicking on a large image that was already linked made my head hurt. </p>

<p>I decided that Lightbox, as cool as it is, was overkill for this problem and ultimately not really &#8216;flex&#8217;. I&#8217;ll leave the Lightbox for NetNewsWire style for someone else to wrestle with.</p>

<h2>Width control and layout options</h2>

<p>Something reminded me that I already had an &#8216;alternative&#8217; layout which positioned the meta information out of the way of wide feed content. Setting NetNewsWire&#8217;s layout to the <em>Widescreen View</em>
when using Ollicle Flex (or <a href="http://www.ollicle.com/2004/oct/27/netnewswire_css_2.html">Crisp</a>) reconfigures the columns to a more conventional single column arrangement where the meta information appears after the content of the feed. The widescreen layout best suits a narrower HTML pane - when including a second column is too tight.</p>

<p><a href="http://www.ollicle.com/img/flex-comic-wide.jpg" title="View full size screenshot"><img src="http://www.ollicle.com/img/flex-comic-wide-sml.jpg" alt="Large image scaled using Ollicle Flex - 1 column view" title="" /></a> <br />
Switching to the single column layout provides more space for optimal image width.</p>

<p>What the single column layout is also really good for is ensuring the content is as <em>wide</em> as it can be in a given window width. In the typical NetNewsWire window arrangement I see the length of text lines which span the full width of the HTML pane as an obstacle to easy reading. Ollicle Flex makes these long measures of text bearable by adding space between the lines (line-height) as you widen the window. </p>

<p><a href="http://www.ollicle.com/img/flex-text-default.jpg" title="View full size screenshot"><img src="http://www.ollicle.com/img/flex-text-default-sml.jpg" alt="Tighter line-spacing with narrower column width - 1 column view" title="" /></a> <a href="http://www.ollicle.com/img/flex-text-wide.jpg" title="View full size screenshot"><img src="http://www.ollicle.com/img/flex-text-wide-sml.jpg" alt="Looser line-spacing with wider column width - 2 column view" title="" /></a> <br />
Text line-height is adjusted in response to changes in column (and window) width.</p>

<p>Regardless I knew it would be nice to have the <em>option</em> to switch between a wide, single-column, view and a more comfortable to read double-column. The question was how to make this switch painless. Changing NetNewsWire&#8217;s view from Traditional to Widescreen to do this is stupid; Toggling between two styles with NetNewsWire&#8217;s style menu is too fiddly; The answer required a simple flip between these layouts with a single click.</p>

<h2>Adding some buttons</h2>

<p>Access to the HTML template, combined with the power afforded by JavaScript to further manipulate the markup, means that adding clickable bits within the feed reading pane is really easy.  This doesn&#8217;t make it a good idea to go button crazy! Brent has worked hard to keep NetNewsWire&#8217;s interface beautifully clean - I&#8217;m aiming for a seamless extension of that. </p>

<p>With this in mind I fashioned a pair of buttons that when clicked, change the ID on the BODY element within the displayed HTML. From here CSS takes the reins and the change is reflected in the layout. Sweet! Two styles for the price of one.</p>

<p><img src="http://www.ollicle.com/img/layout-button-default.gif" alt="Default button state" title="" />  <img src="http://www.ollicle.com/img/layout-button-2col.gif" alt="Double column view" title="" />  <img src="http://www.ollicle.com/img/layout-button-1col.gif" alt="Single column view" title="" /> <br />
Subtle buttons on the Ollicle Flex title bar.</p>

<p>With some road testing I discovered that it was common to want to view every item of a particular feed with the same alternative layout. For example, every entry in a cartoon feed is likely to have a wider than normal image, and as the view is refreshed each time a new one is selected;  It would be necessary to click the button for each individual item in the feed. </p>

<p>At this point I was ready to throw in the towel. All that clicking would quickly get very tedious. Without a means to make the layout selection persistent my hard work was as good as scrap.</p>

<h2>Eureka! Cookies!</h2>

<p>When the idea of setting a cookie in the webkit driven news item view occurred to me I was dubious. Why would Brent enable such a feature? Then again, why would he bother <em>disabling</em> it? I tried it and it worked! No only does it work, the cookies are stored exclusively per feed. Perfect! This means when a cookie is used to store a layout preference it is only reflected in the display of that particular feed.</p>

<h2>The next step</h2>

<p>Although I&#8217;m looking forward trying a few more ideas that make use of JavaScript in a NetNewsWire style, I really can&#8217;t wait to see what people smarter than me come up with. Which reminds me; Brent, it would be nice to have an independent javascript file in the NetNewsWire style package. We have <code>template.html</code> and <code>stylesheet.css</code> perhaps <code>behaviour.js</code> would complete the family?</p>
]]>
        <![CDATA[<h3>4 December 2006</h3>

<p>If you like Ollicle Flex be sure to check out the newer, flexier <a href="http://www.ollicle.com/2006/nov/28/jquery_netnewswire_style.html">Ollicle Reflex</a>.</p>
]]>
    </content>
</entry>
<entry>
    <title>New year upgrade</title>
    <link rel="alternate" type="text/html" href="http://www.ollicle.com/2006/jan/12/site_upgrade.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.ollicle.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=1/entry_id=73" title="New year upgrade" />
    <id>tag:www.ollicle.com,2006://1.73</id>
    
    <published>2006-01-12T00:38:32Z</published>
    <updated>2006-02-19T10:02:15Z</updated>
    
    <summary>I have the blueprints laid out for laying a new foundation for ollicle.com. Expect some uneven ground here while the heavy machinery is still moving around. Check back soon.</summary>
    <author>
        <name>Oliver Boermans</name>
        <uri>http://www.ollicle.com</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.ollicle.com/">
        <![CDATA[<p>I have the blueprints laid out for laying a new foundation for ollicle.com. Expect some uneven ground here while the heavy machinery is still moving around. Check back soon!</p>
]]>
        <![CDATA[<h3>12 January 2006</h3>

<p>The new templates and styles are up. Of course the work is never done:</p>

<ul>
<li>Atom feed is not validating</li>
<li>Some icon alignment issues (especially cross browser)</li>
</ul>

<p>My huge to-do list is just that little bit shorter - it feels good. Of course this new structure is just a foundation - there is a healthy number of tweaks I&#8217;d still like to make - given time some of them might happen. Before that there is much testing to be done.</p>
]]>
    </content>
</entry>

</feed> 

