Donald Noble’s Site

Probably only interesting to me

Website Technical Details

For those of you that may be interested in such things, this post goes into some of the software powering the site, and the styling of the content. If that doesn’t interest you, feel free to skip onto something else…

Textpattern

The content management system I have been using for the past few months since the refresh to power the site is Textpattern.

Textpattern is an elegant content management system that is free, open source software. It has a powerful, sophisticated engine that can be infinitely tuned to suit whatever type of web site you can imagine.

I hope to make more use of this, to customise further the display of each section, e.g. I have implemented a basic a categorised list of recipes on the main page of that section.

Textile

One of the benefits of Textpattern, is that it has support for Textile) built in. This allows for simple markup of the content, without having to resort to writing raw XHTML in your posts.

For example to get emphasised text _underscores_ are used, or * asterisks at the start of the line to give bulleted lists. See the Textile page for a full list and demo.

I know WordPress has a toolbar which allows you to insert the relevant markup, but I find it easier to keep typing, plus I can compose fully marked up posts on my phone, and the resulting markup from WYSIWHG web forms like Wordpress uses can be cluttered.

Site Styles

Those of you browsing in a modern standards compliant browser (Safari 4, Firefox 3, Chrome, or Opera 10 to an extent) will have effects like fancy gothic lettering, drop shadows, and semi-transparent layers of white and black to highlight the content. Some of these will work in Internet Explorer, but it does not fully support everything1.

Alpha Transparency

It is remarkably easy to specify semi-transparent effects with CSS3 rgba() colours. Wherever you specify the colour, replace the normal color:#00FF00 hexadecimal codes with color:rgba(0,255,0,0.5) and specify an amount of transparency as the fourth parameter (50% in this case). Unfortunately, IE doesn’t support this as yet1. This should also make changing the colour scheme much easier, as all the highlight tones change with the background image, instead of having to manually calculate complimentary colours.

Web-fonts & text-stroke

To spice up the headings, I’m using CSS @font-face to import a free blackletter style font. This can then be used, as you would any other font.

screenshot of styled text

For the title, I have also used the text-stroke property (only implemented in Safari/Webkit). This allows for different outline and fill colours, as shown in the enlarged screenshot of the text. The relevant parts of the CSS are:

hgroup h1 {
 font: 3em IncisedBlackWideNormal, cursive;
 text-shadow:2px 3px 3px #420;
 -webkit-text-fill-color: #630;
 -webkit-text-stroke: 1px black;
 }

Drop-caps

The drop capitals at the start of each article are automatically applied using the CSS-selector .body > p:first-child:first-letter {} which matches the first letter, of the first paragraph (p:first child) where this is directly contained within an element with class .body (which I use to denote the main text of each article). The CSS used for the formatting is a little more complex, and I’ll not explain it in detail as it has been done ad infinitum elsewhere.

.body > p:first-child:first-letter {
 float:left;
 display:block;
 font: 2.2em IncisedBlackWideNormal;
 margin: 0 2pt 0 -2pt;
 padding: 0;
 line-height:0.8; }

1 I have reverted to using a semi-transparent image to provide a similar (but less elegant) effect for IE, as the site looked very plain otherwise.

Posted: 5 May 2010, 19:03; tagged: , , .


A general method for soup, including stock

When making soup, don’t discard the flavour in the peelings and skins — instead use them to make a vegetable stock. Simply put all the off-cuts, tops and tails, onion skins, peelings etc. in the pan and boil up with water whist you chop up the vegetables. Once this has simmered for 15 minutes or so, set aside the liquid and discard the boiled up skins. I tend to use a large pan with a colander sitting in it to collect the stock.

After rinsing the pan out, fry the onions (and leeks if using them) until starting to soften, then add the other vegetables and sauté for around 10 minutes, before adding the stock — making sure not to disturb any soil residue in the bottom (an added bonus of organic produce).

Season to taste, then simmer until cooked — perhaps half an hour. Then either leave chunky or blend as desired.

Simple really.

Posted: 5 May 2010, 18:43; tagged: , , .


Couscous with Red Pepper and Spinach

Inspired partly by this recipe I decided to improvise a dish based around couscous and red pepper — as that was pretty much all I had in.

photo of couscous with red pepper

Ingredients

  • small onion, chopped
  • red pepper, chopped
  • clove garlic
  • small handful spinach leaves
  • dash lemon juice
  • ¼ tsp. each ground cumin & ground coriander seed
  • ½ tsp. each freshly chopped parsley & mint leaves
  • salt & freshly ground black pepper, to taste
  • 1 cup each couscous & boiling water

Preparation time about a minute, cooking time 15 minutes.

Method

  1. Fry the onion in olive oil over a medium heat until starting to soften and turn golden
  2. Add the pepper and garlic, and fry for a minute longer
  3. Mix in the cumin & coriander, then add spinach, lemon juice and water
  4. Next, add the couscous, cover, and set aside from heat for about 5 minutes until little water remains (you may want to stir part way through)
  5. Finally, stir through the mint and parsley, and serve — either as a light meal, or an accompaniment to a fish dish

Posted: 5 May 2010, 18:35; tagged: , , , , .

Comment


Do objects have 'Habit Fields'?.

Something I’d never consciously considered before — but on reading Jack Cheng’s article — makes a lot of sense.

Every object emits a habit field. When we sit down at the desk in our office to work, we shape its habit field into a productive one. When we sit down in a lounge chair to watch our favorite TV program, we nudge the chair’s habit field toward relaxation and consumption. The more we repeat the same activity around an object, the stronger its habit field gets.

Very similar to advice I once read about insomnia — if you can’t sleep, the best thing is to get out of bed, otherwise you begin to associate not sleeping with your bed, and the insomnia gets worse.

The other related example of this I’m immediately reminded of, is when I switched off all notifications of new email at work, I became bore productive. However, slowly but inexorably, I have started checking email more frequently, and now it has become a bad habit, reducing productivity back to where it started. I’m not a prodigious slave to work — but I’d rather be unproductive on something less inane than work emails!

Posted: 4 May 2010, 20:16; tagged: , , .

Comment


Podcasts

I’ve been meaning to put together a list of podcasts I regularly listen to/watch for a while now, so in alphabetical order…

Electronic Explorations

To quote from the website, electronicexplorations.org/

this podcast is a mix of “dubstep, minimal electronica, techno and advanced soundscapes. … If you like your music experimental, uncompromising, hand crafted and eerie, mathematical and heavy on the bass then look no further than Electronic Explorations.

It contains an excellent range of music, most of it right up my street — and I’m willing to challenge my taste in music with the rest. Rob manages to select an amazing range of producers to supply mixes for the show, whether that be to promote their label, new release, or just for the love of music. He also manages to provide enough information on what is playing, without sounding like an over-eagre breakfast-show DJ on local radio, often mixing together 2, 3 or more tracks in a group.

The Pod Delusion

a podcast about interesting things. From scepticism to lefty liberal things, it’s commentary from a secular, rationalist, ‘Guardianista’, sort of perspective. A bit like From Our Own Correspondent but with more jokes.

A significant proportion of this podcast is not topics I would necessarily look out for in the media. Some are quite lighthearted, many are of massive importance to the future of this country (like the Libel Reform Petition), but few are boring. Plus it is a brilliant name. More details at the Pod Delusion website

Carpool

Robert Llewellen (Red Dwarf, Scrapheap Challenge, …) produces a weekly video podcast, where he offers someone a lift in his Prius, and interviews them en-route. I think the main advantage of this format, is that the interviews are so much less formal. You get to see what the people he is interviewing are really like.

More at llewtube.com (not sure if google are happy with this name)

Guardian Science Weekly

While I read most of what is discussed on this podcast in some other source, it offers some interesting discussion on the issues. Plus, as a podcast, it can be listened to whilst walking. Which is difficult to do with a broadsheet newspaper.

Posted: 1 May 2010, 19:06; tagged: , , , .

Comment