teyla: Cartoon Ten typing on top of the TARDIS like Snoopy. (css rocks)
teyla ([personal profile] teyla) wrote2007-09-25 08:59 pm
Entry tags:

Coding Squee!

I reworked my homepage. It now has several skins and is very, very shiny.
The drawback is that it's completely based on javascript - so if you have turned that off, then you won't see much - and the new version is only viewable in Firefox. Any other browser will get the old, boring version. So if you want to see my new shiny, get Firefox already! ;D


Skin #1: red_grey



This is actually pretty much my old layout with very few minor changes in looks and very huge major changes in coding and file structure.

Note the shiny drop-down skin change menu at the bottom. And when you click on the leave button, you're redirected back to the site you came from.

This is the default look of the page. I haven't yet figured out a way to make the site remember one specific skin for each individual visitor for longer than the current visit. I doubt that it can even be done with this system. I might look into it, though.

Skin #2: disjointed



New layout which is easier to read than the red and grey one. I'm not sure whether I like it, but since I now have the possibility of having an unlimited number of skins, it stays ;).

ETA:
Skin #3: black_white



This layout I wrote just now to put the system to the test, and apparently, it works :D.



Well, the coding. I basically know nothing about javascript, except that you can write html code into a js file and then include this code via a javascript include in any html page where you need it. It's a bit like SSI, except that SSI never worked for me ;).

What I did now was that I wrote any and all html code that I needed for my site into js files. I wrote a header file, a footer file, and countless main-content files. I didn't do any design in the html code but merely determined the structure using divs.

Then I wrote html pages for every page that I needed and included the respective js files - header, footer, and the content file that I needed for this particular page. I duplicated this file system so that I had two identical sets of html pages. I stuck each into its own folder and then sat down and wrote style sheets for each.

Which leaves me with the possibility of writing as many skins as I want. I only need a new set of html pages for each, which I get by simply copying the existing file system, and the style sheet, which determines the layout of the skin.

Why the hell did I go to all this trouble? Well, I used to have this habit of completely rewriting my homepage instead of updating it, wanting to try out new layouts and playing with css. Lots of nice layouts were created, but also a lot of layouts got lost. Now I can continue to play, but keep all my layouts!

This makes me happy beyond reason ;D.

[identity profile] chaoskir.livejournal.com 2007-09-25 08:12 pm (UTC)(link)
Nice homepage. I like it. Great work I guess. I haven“t a clue about stuff like this but I know what I like. And I like your homepage.