Page 1 of 1

Another use for your calendar arrow

Posted: Sun Feb 18, 2007 2:33 am
by Don Chambers
While I continue to bang away at a new theme, something occurred to me. All themes already have left and right arrows for the calendar. Why not put them to good use?

At least one place I have found is in the "next page/previous page". Rather than use the left and right quotes, how about using the calendar arrows! This might not work in all themes if the background color is not complimentary to the arrow. Carl might not like it because he likes to set a class of "grey" in some of his themes to imply a "dimmed" appearance. However, wherever it might work, this is what I did in entries.tpl, usually located in <div class='serendipity_pageFooter' > (I also added title="whatever" to the text link):

Code: Select all

{if $footer_prev_page}
    <a title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"><img alt="{$CONST.PREVIOUS_PAGE}" title="{$CONST.PREVIOUS_PAGE}" src="{serendipity_getFile file="img/back.gif"}" /></a>
    <a title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"> {$CONST.PREVIOUS_PAGE}</a>[ascii characters for 2 spaces]
{/if}
and

Code: Select all

{if $footer_next_page}
    [ascii characters for 2 spaces]<a title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}">{$CONST.NEXT_PAGE}</a>
    <a title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}"><img alt="{$CONST.NEXT_PAGE}" title="{$CONST.NEXT_PAGE}" src="{serendipity_getFile file="img/forward.gif"}" /></a>
{/if}
Hopefully you understand the "[ascii characters for 2 spaces]" up there.

I also stripped the styling out of both entries.tpl, and the plugin_calendar.tpl and added this css:

Code: Select all

.serendipity_pageFooter img, 
.serendipity_calendarHeader img{
     height: 16px;
     width: 16px;
     border: 0;
     vertical-align: bottom;}
Many of these calendar arrows are 12 x 16, but mine happens to be 16 x 16.

Anyway, I thought it was cool & thought I would share it. If you can use it, great, if not - disregard. If the calendar arrows did not work, the same concept could be applied with a different arrow located in the theme directory.

Posted: Sun Feb 18, 2007 7:18 pm
by Don Chambers
The more I look at it, the more I like just the arrow, with no text at all, especially since I specified the title and alt tags.