Posts in the category "Web design & Coding".

Random cuteness

I made a random header image script for

<?php // Random header image
/* there are 3 pictures to choose from, so number is either 0, 1 or 2 */
$i = rand(0,2);
if ( $i == 0 ) { ?>
  <img src=”<?php bloginfo(‘template_directory’); ?>/images/header_01.jpg” alt=”Caramel Ears” />
<?php } else if ( $i == 1 ) { ?>
  <img src=”<?php bloginfo(‘template_directory’); ?>/images/set2/header_01.jpg” alt=”Caramel Ears” />
<?php } else if ( $i == 2 ) { ?>
  <img src=”<?php bloginfo(‘template_directory’); ?>/images/set3/header_01.jpg” alt=”Caramel Ears” />
<?php } ?>

As there is also the horizontal menu that has part of the image as a background, I had to move that bit of CSS from the style sheet file to the index file:

<div id=”nav” style=”background-image:url(<?php bloginfo(‘template_directory’); ?>/images/<?php if ($i == 1) { ?>set2/<?php } else if ($i == 2 ) { ?>set3/<?php } ?>header_02.jpg);”>

That’s a bit crammed but I didn’t want to make it as long and elaborate as for the header image.

Anyway, this post wasn’t about my amazing coding abilities :razz: but the pictures: GO SEE! [site has been removed]

Creative crisis

I’m liking this current layout — which I’ve had for 7 months! — so much that I find myself keeping away from the new layout under development. It’s pretty much done, but there’re some things that bug me, and the final polishings are the most “tiring” of the whole process (type a little, refresh site, type, refresh ad infinitum). If I had another site that I updated as much as this, I could make a layout for it. I’m too pleased with my current layouts (except for the X-Files site, gosh) so I don’t have an urge to change them. The XF site is too much work to change (unbelievable amount of graphics) and it’s not unbearably bad (the header images are bad).

Someone hire me as a web designer!! :laugh: Kidding!

Sites on diet

This is why I dislike 3-column layouts Narrow view

5 pages of fame

So, my article on cascading stylesheets came out on 31st. It was nice seeing my own handiwork in an actual magazine — along with pretty pictures by my namesake. Not that I’ve been dreaming of journalism since I was a kid (my friend and I made a magazine for our class, though, in early grades) but what can I say, it was a lot of fun to write for fun for a change. Oh, what am I talking about, I write here all the time! Anyway, you know what I mean.

I had told my father before (response: “uh-huh…”) and when the magazine came out, I showed Mum (response: “what am I supposed to be looking at” and then “oh, that’s what you’ve been up to! Getting all those mysterious envelopes”). Luckily the people at work were a bit more enthusiastic, otherwise I would’ve jumped on some table and shouted I got published in a magazine, dammit! Oh, Grandma asked me questions about it when I told her beforehand, so at least I got to tell the whole story to someone :)

Today I got my extra copies of the magazine. I sent one to my grandparents, Dad took one (on the excuse of paying most of the tool that was used to write the article… it’s his fault, he never took the money from me), and I’m keeping one wrapped — I also have the one that came in the mail on the day it was published.

So, the story: the editor had read my blog which he’d found via a blog list. Mum always asks why I bother with my homepage. Now I can tell her, and other heretics, that you can get a job (or at least freelance assignments) by bothering with homepages.

Web portfolio

On Thursday, after staying up until 3am the previous night, I decided to stay home and do Uni stuff: checking texts for grammar and things, and my beloved web portfolio of which there’s been a little tasting earlier.

Here are some new pictures of the layout. I can’t give out the site link because there’s an open insert/update form to the database, so you’ll have to settle for hand-picked favourites of mine:
This is the view on a post editing page when no post has been selected yet. I made those fancy “drop down” post numbers. They’re post IDs wrapped in span tags floated left.
List to edit posts
Here’s my WP style quicktag pane: Smiley panel
And last but not least, a snippet off of the documentation page including the right side of my horizontal menu (the main links are on the left hand side) and the header with fancy underlining. Snippet off of documentation
I could rant on and on about the (cool?) things I’ve done on the site-slash-blog-application but I’ve just done that, all day long. Writing the documentation and tons of comments. Maybe I will rant some day.

Oh yeah, I just realized. When next week’s craziness is over (exam and perhaps I should find some time to study for it too, an essay, loads of papers to check for grammar etc, new course, finishing touches to the portfolio — and work), I can start modifying the portfolio layout to fit my WP blog!! Can’t wait!! Today (= yesterday) I installed XAMPP and put up a local WP where I can test out my themes — and write some very secret things that no one else is allowed to read! Now… how could I get such secret things to write about…
(XAMPP is an Apache distribution containing MySQL, PHP and Perl. And then some.)

[Edit: March 14th @ 23:00] Now I sent in my portfolio (or the url, actually) so now I can only sit, be scared, and wait for the judgment day. I actually noticed some whoopsies after sending the url and quickly corrected them (a non-validating documentation and a form handler that didn’t display a “don’t use this page directly” notice). Now they work. Now ALL of it works I hope. Ugh, I hate this sort of uncertainty. [/edit]

Nervous excitement

Mum (or any other relative), STOP READING! I’ll tell you in time :)
Here’s the secret I’ve been keeping for quite a while now. I can’t take it anymore! :lol:
Continues »

Greedy little…

A lot of the time when people post their site links for others to see at “Strut your own stuff” (I’m talking about WP forums), pretty soon someone will write “that’s cool/beautiful/nice/awesome/the best layout I’ve ever seen!! Do you have it for download?/Please make it available ASAP!!!1”

What if the person has worked their butt off to get a beautiful, ORIGINAL, DISTINCTIVE layout? What if they don’t want to stumble across a clone everywhere they turn? Some people have miles and miles of themes in their theme switcher (right next to the miles and miles of blogs they apparently read), and they add to the list practically every theme they can get their hands on.

I know I’m being too hard on people who don’t have the knowledge/patience/interest to do their own themes but that is my opinion and this is my blog! :mrgreen:

Disclaimer: This writing is by no means affected by the fact that I’ve been doing my portfolio layout for hours and hours (loving it though, but the theme pleads — in a wrong place — are a pet peeve). I might modify the layout to fit here, too :razz: It could be an invigorating change.

Mmm… tasty!

Today I’ve been doing the layout for a portfolio I’m doing. It’s for a computer studies’ course “Digital Media Technology” (emphasis on webpage techniques). I know that making a layout will take me a lot of time because I always tweak and tweak to no end. Changing colours, fonts, widths, placings. Next I’m going to start worrying about the technique part; I have access to a database and I’m using PHP to do all kinds of cool things :) Here’s a little tasting of the layout I’m whipping up:

A little tasting of the portfolio layout

Oooh, pretty! What do you think? Oh yeah, I’m making a blog :mrgreen: There were several topics available, but I felt most passionate about a blog. Go figure. ;)

It’s going to be really interesting to get to dig into the stuff that makes things work. I know WP, I can use it, do a little tweaking, but the database part is complete blur. Today I learnt how to set up a database connection and do statements. Unfortunately the db at the dept. of computer studies is using Oracle — I’m more familiar with MySQL — but luckily I was just on a introduction to databases course where we learnt the Oracle syntax. And luckily, they aren’t disturbingly different.

*go backs to staring at the layout in awe*
Sometimes I amaze myself. Sometimes.

New trick for an old HTML dog

Today’s lecture for Digital Media Technology was a draaaaag (about tables, frames and forms). I did learn one thing, however: <fieldset>

<fieldset>
  <legend>Some title</legend>
  Content
</fieldset>

Makes a neat looking box:

Some title

Content
 

Of course you can style it to your heart’s content. It’s meant to be used in forms to group data and I don’t know if it’ll tick off the validator if it’s used outside form tags.

To upgrade or not to upgrade

I’ve been making my own template of this site. Sorry, I happen to like this design for some reason, ain’t getting rid of it just yet. Besides, with the new theme system on WordPress I intend to mess with the core code as little as possible and making my site easy to change style to. I’m now pondering whether I should upgrade to some 1.5 version or not… I hate to miss the tons of tweaking I’ve done to the code but then again, without the tweaking it’ll be easier to upgrade in the future and some of the things I’ve done have legitimate ways of doing them.

Also — you should be proud of me — I’m determined to make my new layout completely CSS (maybe as a result of the secret I’ve been talking about — ah-ha! A hint!). And I’ve actually managed to do that! Yes, all those rounded corners and fluid width layout. All implemented.

I gave up on a table-free layout the last time because I was in a hurry to get the site looking like something. I have a history of table layouts and I’m comfortable with them. Besides, let’s admit it, sometimes tables just do what they’re supposed to do, nicely and across browers. They work for poor IE, too.

Anyway, before wandering off to a completely different topic — ah, look at those pretty lights — I’m going to continue pondering the upgrade and tinkering the theme.