Thursday, November 11, 2010

Altering CSS for every nth element of a class

I wanted to improve on my previous jquery fix to remove the left padding for the 4th floating div.widget on the Rabbit Software homepage. If I add more widgets, the rows won't align correctly unless I can remove the padding from every 4th one. Because of the fixed width template and fixed width of the widgets, there are always 3 widgets per row.

The index of widgets counts up from 0, so I needed to fix every child whose index is a multiple of 3.

Even floated div columns: equalHeights

When you are floating a bunch of divs inside a container, it is a design problem when the divs are of different heights depending on their content, because they tend to wrap funky. One can, by brute force, make them all the same height, but that approach is fragile and can create problems with the content contained in each div. (Why is there a flower photo? Just because it looks nice.)

A better approach would be to measure the tallest div and force that height on all the remaining divs. Alas, although there exist some CSS methods for doing this, they're not adequately cross-browser compatible, so a javascript method is the only effective approach.

I found a very nice jquery plugin called equalHeights, and implemented it in the SimpleFolio theme for rabbitsoftware. Thank you again, Filament Group, a great resource for JQuery plugins.

Sunday, November 7, 2010

Rip an Audiobook CD to an IPod

I have been spending time with audiobooks lately. Managing and navigating audio book CDs, which can have up to 99 tracks per disc, can be a nightmare on the IPod unless you build playlists before syncing.

This CNet post, How to rip an audiobook CD to an iPod, was very helpful.

Join tracks in ITunes

If you imported an audiobook CD to ITunes but didn't join the tracks when you imported, there is a solution.

Doug's Applescripts for ITunes will allow you to select a set of tracks (AAC or MP3) and join them into a single file. This is a great help for audiobooks, because there's no reason to have 99 tracks in an audio book. If you have several audiobooks in this condition, they're a holy mess to navigate in your IPod: 26 CDs of 99 tracks each? Try scrolling to the end or beginning of that list and see what I mean. This is a nightmare because my IPod Nano doesn't have a convenient album cover style browse feature for books.

Thursday, October 21, 2010

New logo for Rabbit Software

I made a new logo for Rabbit Software:
Richard loves the Barry Flanagan leaping hare, but we don't want to infringe on creative copyright. We've seen one of these wonderful sculptures at the Virginia Museum of Art.

Wednesday, October 20, 2010

Wheel of Time Online Resources

This material was first published on Dreams & Speculation: Winter's Heart Mid-month Discussion.

Here are some valuable Wheel of Time online resources. My list is necessarily incomplete, because there is so much material available. Please add links to your favorite sites in the comments.

Can't keep up with a Wheel of Time read-through?

Not to worry! Hop on to one of the read-through summary sites below, to get acquainted with the books you missed, and you’ll be ready to start on this month’s book, and join in the discussion. I assure you, you’ll be just fine. Only those masochistic enough to want to savor every word — you know who you are — will feel that they’ve missed something. Many of us are eager to find out what Brandon Sanderson does with the completion of the Wheel of Time. If you can read a few of Jordan’s novels, you’ll be able to better appreciate Sanderson’s accomplishment.

Please note that websites are ephemeral. Wheel of Time fan sites are disappearing faster than they are appearing as the series nears completion, and as fans move beyond their enthusiasms. Many of the sites, even if they exist, have broken links and server errors because they are no longer maintained.

Read-throughs and synopses of the Wheel of Time novels

Foremost among these, for its depth, wit, and authority:
Leigh Butler’s Wheel of Time Re-read on Tor, the WoT publisher
Superbly, entertainingly written. Relatively spoiler-free if you don’t read the comments.

If that’s too long for you, try the solely plot-focused Wheel of Time Summary
Click the characters in the right column to see where they appear in the books and chapters. When I checked, the rest of that site had gone offline just days ago. Thanks to Google cache you can still see some of the other pages, but the summary is the meat.

If you want just a little more detail, try the Enyclopaedia WoT chapter summaries for each book
Warning: To avoid spoilers, do not read the notes, just read the summary.

Tuesday, October 19, 2010

Some small modifications of the SimpleFolio Wordpress theme

I'm using the delightful SimpleFolio Wordpress theme for the Rabbit Software website. I made a donation; it's nice to support good opensource work.

I found a few issues with it that I have addressed.

1. The single post view was incorrectly showing the excluded "Portfolio" category in its Recent Posts sidebar widget. In this theme, you can select a specific category to populate the homepage slideshow. One doesn't necessarily want those posts to appear as normal blog posts. Unfortunately, the exclusion function wasn't working on the single post view page. This problem is easily addressed by editing the sf_portfolio_filter function in the theme's functions.php file.

Change line 50,
if(!is_archive() && !is_admin() && !is_single()){
to
if(!is_archive() && !is_admin() ){


2. I'm using more than 3 homepage widgets, and they weren't wrapping nicely. While the first one had a proper margin-left:0, the fourth one had the default margin-left:30px. I realized there must be some javascript at work behind the scenes, inserting the inline styling to adjust the left margin. Indeed, I opened custom.js in the js folder, and found this line:
$(".home_widgets .widget:first").css("margin-left", "0");
A bit of snooping on the JQuery site clarified this usage for me, and I added this line:
$(".home_widgets .widget:eq(3)").css("margin-left", "0");
to make the 2nd line of 3 widgets line up with the first batch.


3. Of course, I've made a few custom tweaks to the stylesheet so far, such as adding more space below the unordered lists in the .home_widgets .widget class, and adding underlines to the links in the .home_widgets .textwidget.

Thursday, October 7, 2010

Review: The Last Page

The Last Page book cover
Please see my guest-blogger review of Anthony Huso's fantasy novel, The Last Page at Dreams & Speculation.

Friday, September 24, 2010

D. H. Lawrence poems formatted for Kindle

I've been messing around with my new Kindle, downloading free books (e.g., Thomas Paine's "Common Sense") and turning other digital content such as PDF and HTML into Kindle-ready form. Amazon provides a free service to convert compatible documents into Kindle format, and loads them automatically onto your Kindle. Kindle owners get a personal email address which they use to convert content. For the Wifi Kindle owners, this is a free service, 3G version has to pay a small conversion fee unless they use a workaround.

My sister pointed me to a selection of D. H. Lawrence poems, and on a lark I formatted them for Kindle, adding a table of contents and suitable paragraph formatting.

If you would like my Kindle version of D. H. Lawrence poems, just download this html file, attach it to an email to send to your Kindle account, and voila, semi-properly formatted poems. Only Kindle owners can do this, and permission to send to the account is restricted to email addresses defined by the owner. Amazon receives the attachment, converts it automatically (within seconds for a small file) and shoots it back to your wireless Kindle, where it appears, like magic!