Building the pages
Today was all about turning the plan into real pages. Every page on the site is a PHP file that pulls in three shared includes: a header with my logo, the navigation menu, and a footer with the two W3C validation badges. Changing the menu once now updates every page, which already saved me time.
The layout is built with DIVs and one stylesheet, global/main.css: a dark navy background with a teal accent, a menu on the left and the content on the right. I kept everything valid XHTML 1.0 Strict, which meant closing every tag, quoting every attribute and never using things like target or iframe.
What I built today
- A picture gallery in plain JavaScript (no jQuery): a large picture, thumbnails underneath, and Previous/Next buttons.
- A schedule table that uses
rowspanandcolspan, with a separateprint.cssso only the table prints. - A feedback form with two fieldsets, checked by
validation.jsbefore it is sent, with errors shown inside the page. - A Projects page that reads two related MySQL tables (categories and projects) with a JOIN.
- A contact page where my e-mail is assembled by JavaScript, so it never appears in the page source.
The trickiest part was making the error messages friendly while still being strict: the cursor jumps to the first field with a problem, and the same rules run again on the server in PHP, so the form is safe even if JavaScript is turned off.
Next up: uploading everything to the server and connecting the live database.
Leave a Reply