A fun little bit that I discovered during the creation of this website is that you can give your links an underline with a color different than the font color itself (see primary navigation in the header), by giving the <a> tag a border-bottom instead of a text-decoration: underline;. The idea actually came from the implementation of the theme on this website, which uses the same technique.
The two highlights of this project for me were the several tricks for cutting out the images from a PSD file I learned, and the 2 user interfaces I created for the Member directory listing and the club directory listing.
The HTML & CSS were fun to create because I learned a few new tricks for cutting out the images out of the PSD file:
If you select a wider area around an image, if there is nothing else other than that image in the selection Photoshop only selects the image. This helps with not having to exactly select the pixels you need, which makes things slightly faster
If you copy a layer over to a new file, if the effects applied to the layer are not copied over, you can right click on the original layer and select “copy layer style” then paste it over into the layer in the new file.
To select a layer exactly, you can first select the selection tool, then hold down ctrl and click on the image representing the layer in the layer browser on the right. Then you can easily cut it out to get the image to use in the CSS.
The Club directory listing is alphabetically ordered, and there are two methods used that make it easier to find what you are looking for:
On the top of the list, there is a “table of contents” – a list of links to the first letter of the club name.
Along the left side of the page, the first letter of the club name is shown in large letters above the first club with any given initial.
The Member directory listing uses a tabular layout, and the rows are alternating in color for making it easy to read a single row. The columns are separated with a border which makes it easy to read down a single column.
For example I need to style all the h1s in the blog branch to be blue, and all h1s in the about branch to be purple.
I’ve been putting “if (have_posts()) while(…): the_post();” of the loop before the get_header() call of a given template. I thought that $post is not available before the call to the_post(), but it turns out it is. Then after starting the loop, I would write a function to use as a filter for the body_class filter which would add a class to the body based on $post, and then I have a branch-specific CSS class to hook into it.
I’m probably going to stop moving the loop beginning before the get_header() call now that I know that the global $post is available before calling the_post(), and also I am just going to give a parameter to body_class() in header.php instead of hooking into the body_class filter.
Let me know if you have some ideas on how to do this better!