Page 1 of 1

How do I change the font look for....

Posted: Mon Feb 06, 2006 6:59 pm
by DragonFly
How do I change the look of the font for 'Continue Reading...' in the extended entry section?

Re: How do I change the font look for....

Posted: Mon Feb 06, 2006 7:17 pm
by garvinhicking
By editing your entries.tpl file, and giving the link a unique CSS ID/class so that you can style it via CSS.

Serendipity 1.0-beta2 has this unique ID/class builtin...

HTH,
Garvin

I don't seem to have an entries.tpl file

Posted: Mon Feb 06, 2006 9:10 pm
by DragonFly
After looking at some of the other templates in file manager, I found that I don't seem to have one of those entries.tpl files like the others.

Can this be?

Posted: Mon Feb 06, 2006 9:25 pm
by carl_galloway
Dragonfly, the entries.tpl file can be different for every theme, this is because designers may wish to alter the way the default entry is displayed.

Depending on which theme you're using and whether it includes additional or non-standard styles you may be able to simply copy the entries.tpl from another theme into the theme you're using. You will then also need to adjust your stylesheet to get the effect you're looking for.

Carl

Extended Entry Issue

Posted: Mon Feb 06, 2006 9:48 pm
by DragonFly
Being a newbie to all of this, I'm liable to mess up my website but good if I go tinkering with certain aspects of the template without strict supervision.

I'd like to know what the minimum code requirement would be for use in my template in order to alter the look of "Continue Reading..."

Can I get away with just this?


{if $entry.is_extended}
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
{/if}

{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
<br /><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a><br /><br />
{/if}


And what would I have to alter in the above for it to function properly in my template?

I have another question, but I dare not ask it until I get clear with this.

Posted: Tue Feb 07, 2006 1:39 am
by carl_galloway
Dragonfly, unfortunately what you've changed isn't going to help you very much. All that does is add a couple of line breaks, but doesn't actually change the font. I'm assuming you want to change the color or perhaps the positioning, so the first thing you need to do is put in some html that you can actually change in your stylesheet. So, wrap a paragraph <p> around your 'continue reading' link, on its own a <p></p> will automatically add the line breaks anyway. Ok, now that they're in place, you need to add a class to them so that in your stylesheet you can not adjust the font, color, line-height, margins, borders and a lot more. Replace your caode with this;

Code: Select all

{if $entry.is_extended}
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
{/if}

{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
<p class="continue_reading"><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a></p>
{/if}
Now open your stylesheet, 'style.css' in your theme folder, and add this;

Code: Select all

.continue_reading {
color: orange; 
} 
Save your stylesheet and look at your theme in your browser again. Your 'continue reading' link should now be orange, or some vague impersonation of orange.

Now that you know how to change the link you could experiment with different styles.

On another point, don't be too afraid of playing around with your template files, just make a backup before you start playing. You can't damage your database by messing up your theme, and if it gets really messy just replace the files with your backup.

Carl

Posted: Tue Feb 07, 2006 1:55 am
by carl_galloway
Another option if you don't want to use a paragraph is a <span> around the 'continue reading';

Code: Select all

<span class="continue_reading"><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a></span>
Either way will work for you except that your browser will apply different defaults to the spacing of a span than it would for a paragraph.

Carl

Posted: Tue Feb 07, 2006 9:46 pm
by judebert
Glad to see you're moving right along, DragonFly.

Carl's absolutely correct, as is Garvin. The only clarification I wanted to add was: if your theme has no <whatever>.tpl, the one from templates/default will be used instead. You can modify it directly if you wish; if you use the <span> tag, it shouldn't effect the rendering of other themes.

The other obvious option is to copy the templates/default/<whatever>.tpl file to your directory and modify it there. Then it can't effect other themes. (Not that your blog uses any other themes.)

Regarding the 'continue reading' topic.

Posted: Thu Feb 09, 2006 2:27 am
by DragonFly
Thanks guys,

I will get to work on this just as soon as I can.

I'm on the verge of closing on the house I'm in right now.

The buyers pulled a fast one and shaved off (10) much needed days from my moving schedule, and I'm having to move at cartoon speed now.

Will get back to you as soon as I stop running into myself.

Posted: Thu Feb 09, 2006 1:56 pm
by judebert
Well, you should've known when the seller's agent wore her ACME uniform. :lol:

Thanks Judebert

Posted: Thu Feb 09, 2006 2:22 pm
by DragonFly
Thank you Judebert.

I need a laugh about now. :(

Talk to you later.
DragonFly :wink: