Saturday, December 29, 2007

rounded corners anyone?

You may notice my new rounded corners.

Well in true fashion, they're CSS corners.

Instead of loading up one of the many css corner library, i decided to take the opportunity to write my own. The other plus is that as this is a blogger account, i have no real file storage, so linking against the jquery lib makes way more sense.

//Corner rounding function
roundCorners = function( pElement, pSize, pForeground, pBackground ){
console.log( 'Corner size ' + pSize);
console.log( 'Fore color ' + pForeground );
console.log( 'Back color ' + pBackground );
if( pBackground.match('none') != null ){
pBackground = 'transparent';
//console.log('transparent background');

containerStr = '<div class="cornerContainer" style="margin:0px 0px;height:auto;background:'+ pBackground +'"></div>';
cornerAttributesStr = 'border:none;overflow:hidden;height:1px;background-color:'+ pForeground +';';

//Reset the parent element
$( pElement).parent().css('padding','none');

//Insert container Div and set background color
$(pElement).prepend( containerStr );
$(pElement).append( containerStr );

for(i=1;i < pSize; i++){
$('div.cornerContainer').eq(0).append('<div style="' + cornerAttributesStr + 'margin: 0 '+ Math.round(pSize/i) +'pt"></div>');
//console.log('Insert element ' + pSize/i);

for(i=pSize; i > 1; i--){
$('div.cornerContainer').eq(1).append('<div style="' + cornerAttributesStr + 'margin: 0 '+ Math.round(pSize/i) +'pt"></div>');


Currently it doesn't support chaining, however according to my understanding, you just have to encapsulated within a jquery.extend, and change the passed object references call and your good to go.

Tuesday, December 25, 2007

New Design

Just a quick note to say here is the new design. Nice and light weight, no shiny stuff (yet). I'll add in some javascript nuts and bolts later, but now i have to set the table for christmas dinner. Btw, this took me like 3 hours, not too bad considering i have to cut and paste into the online editor.

Merry Christmas

Saturday, December 22, 2007

And to think people think i waste my time

I've been hitting the Dev Trail pretty hard over the last week or so. My fringe Cocoa/Objective-C skills are getting better each day. To give you an idea of what my Programming space looks like here's a screenshot.
The Work zone
To summerize, i'm in the middle of linking the mysql-cocoa framework into my project. Now i have hit a slight snag on that front. The snag being that it looks like i can't sell the app.

Why? Because the use of the GPL'd open source framework means that i have to release the source code. Now for a long time, i have considered releasing an application that one has to pay for, but is also open source. However with this kinda of app, my target market, most likely already has xcode installed, and would find it trivial to download the source and hit 'build'.

I'm gonna email the FSF, and find out what they have to say. But i think i might try and release this as an open source application. I love open source as much as the next guy, so maybe this is the way it should go down.

In other news i've finally popped for a Western digital 250GB notebook hard drive. After some stupidity (and a trip to Eastleigh) on my part it's churning away inside my Macbook. The old drive is now a Time machine Drive, speaking of time machine ...

Interface design at it's wildest

It's a nutty excuse for an interface, but it really is fantastic. Pre-Time Machine, i used a backup script i 'wrote' in automator, however it wasn't as flash as this. However it did zip my documents folder from almost 2GB to 700MB which always impressed me, or at least one side of me.

Well it's almost the end of another year and this blog has seen quite a few annual transitions now, 4 to be correct. In keeping with RSS tradition i'll have the usual wrap up posts, plus a 4/5 redesign. Hopefully this time done properly with more ajax than you can shake a stick at, and a cleaner ui, after all i'm a professional now ........

Quote of the Day


Sunday, December 16, 2007

One byte

Not sure what all the moaning was about, but i must say i like the look of the new iplayer from the bbc. It's not a big slab of flash. Nice ajax like effects. Works in safari. A nice job i would say overall.

I doubt it works for those outside these fair shores, but if it does work i would recommend.

Btw this is post 255, hence the title.

Merry Christmas

Wednesday, December 12, 2007

Reg Exp

In case you ever need them, here are a couple of regular expressions for dealing with dates.

For dates like this: December 19, 2008


For dates like this: 05/03/87


They form part of my fantastic plan to .... write loads of regular expressions ^_^