{"id":1350,"date":"2008-11-10T05:45:09","date_gmt":"2008-11-10T12:45:09","guid":{"rendered":"http:\/\/css-tricks.com\/?p=1350"},"modified":"2008-11-09T10:00:37","modified_gmt":"2008-11-09T17:00:37","slug":"about-the-css-tricks-redesign","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/about-the-css-tricks-redesign\/","title":{"rendered":"About the CSS-Tricks Redesign"},"content":{"rendered":"
In case you haven’t noticed, I’ve done a bit of a design overhaul around here. I thought I’d take the opportunity to go over some points and features of the new design.<\/p>\n
Because it was fun. Because I’m a designer and we never stay satisfied. Because I think websites should always get a little design refresh at least every year or so. <\/p>\n
Nope, not really. Just a new face. On the back-end, I’m slowly moving some stuff into WordPress that lived outside of it before. Like all the video pages. Most of them are on static pages I built one-by-one as I need them. I don’t even remember why. But now I have a special WordPress page template for them, where I insert the stuff into Custom Fields, which will work out great I think. This will allow for commenting on the video pages themselves, which is nice. This will also make future design tweaking a hell of a lot easier.<\/p>\n
I’ve said many times in the past that I like evolutionary<\/em> design more than revolutionary<\/em> design. Essentially, tweaking and improving rather than starting from scratch. While this design feels quite a bit different, I still feel it’s evolutionary. The underlying code hardly changed at all. The background texture, while lighter, is the same. The tag is still here! The sidebar is still on the right and has the exact same stuff in the exact same places. The footer is still humongous =)<\/p>\n I like jQuery, you like jQuery, WordPress likes jQuery. I was using it a little bit in the last design, but I figure if I’m going to load the library I might as well make more use of it. Things jQuery does in the new design:<\/p>\n The old design appended ” – CSS-Tricks” to the end of almost every page. I don’t even remember why, I think it was either some early effort at SEO, or just came in as a part of a template I started from. I never liked it. Now I’m using a much smarter technique for properly naming pages in WordPress. The homepage is just the name of the blog. Posts are just the name of the post. <\/p>\n Here is the clever bit of PHP (specific to WordPress) that handles page titles:<\/p>\n As a nod to CSS3, I am using @font-face for some of the text in the footer. You’ll only be able to see it (at the time of this writing) in Firefox 3.1 beta and the latest versions of Safari. I am using the free and very nice Fontin<\/a> font from Jos Buivenga.<\/p>\n <\/p>\n If you are interested in using @font-face, want to learn more, and want to learn how you can make it work in IE, check out Jon Tan’s article<\/a>.<\/p>\n I decided that it would make things easier to work in the exact same environment that CSS-Tricks currently lives. So I registered a top level domain name<\/a> and put it on the same server. That way when it was done an complete, I could literally just move a few folders and files and that was it. All the relative file paths would be exactly the same, which I wouldn’t be able to do if I was working from a subdirectory of the original site. Maybe overkill, maybe better ways to do it. Whatever, it worked great for me.<\/p>\n One problem I ran into was the fact that I wanted to copy all the posts and comments over to the test site from the main site. I should have been able to just export from the main site and import at the test site. Tried that, but the file was 10MB which was too big (even after some fancy hacking tricks) for WordPress to import. I could have moved the database, but I just got lazy and didn’t do it.<\/p>\njQuery<\/h3>\n
\n
Changes to Page Titles<\/h3>\n
<title>\r\n\t<?php if (is_home()) { echo bloginfo('name');\r\n\t} elseif (is_404()) {\r\n\techo '404 Error - Page Not Found';\r\n\t} elseif (is_category()) {\r\n\techo 'Category:'; wp_title('');\r\n\t} elseif (is_search()) {\r\n\techo 'Search Results';\r\n\t} elseif ( is_day() || is_month() || is_year() ) {\r\n\techo 'Archives:'; wp_title('');\r\n\t} else {\r\n\techo wp_title('');\r\n\t}\r\n\t?>\r\n<\/title><\/code><\/pre>\n
@font-face<\/h3>\n
Coding the new theme<\/h3>\n