Have you ever thought it would be great if you could make the latest entry in your Serendipity blog stand out, perhaps use a different color, or even add some imagery to let your visitors know this entry is special?
Using some Smarty code and css we can, imagine how much more usable your blog would be. Even more so if your blog is part of a network. If you run competitions, review new products, or perhaps comment on breaking news, your site visitors will appreciate seeing at a glance which entry is most important.
So what could your latest entry or sticky post look like? Well, CSS allows us to do so much, you could literally change every single style. In my experiments I changed the background color around the entry title, in another I added a background image which reads 'Breaking News', but you could go so far as to give your entry different font settings, adjust your margins and padding, perhaps even remove the entry footer so your latest entry looks like an html box.
So how do you go about making your latest entry stand out? The key is to understand that all entries on overview pages are given a unique id starting at 0 which is the top (first) entry. Once we understand this, we also need to make sure Serendipity only changes our first entry if it also appears on the startpage otherwise the top entry of every page will adopt our new styles.
Read More