How do I change the font look for....
How do I change the font look for....
How do I change the look of the font for 'Continue Reading...' in the extended entry section?
DragonFly
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: How do I change the font look for....
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
Serendipity 1.0-beta2 has this unique ID/class builtin...
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I don't seem to have an entries.tpl file
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?
Can this be?
DragonFly
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
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
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
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.
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.
DragonFly
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
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;
Now open your stylesheet, 'style.css' in your theme folder, and add this;
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
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}
Code: Select all
.continue_reading {
color: 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
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
Another option if you don't want to use a paragraph is a <span> around the 'continue reading';
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
Code: Select all
<span class="continue_reading"><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a></span>
Carl
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.)
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.
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.
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.
DragonFly
Thanks Judebert
Thank you Judebert.
I need a laugh about now.
Talk to you later.
DragonFly
I need a laugh about now.
Talk to you later.
DragonFly
DragonFly