Styling the "extend-entry" link

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
codeless
Regular
Posts: 23
Joined: Thu Apr 12, 2012 3:38 pm

Styling the "extend-entry" link

Post by codeless »

Hi there!

While trying my best to create a responsive template for S9Y, i stumbled upon a "missing feature" in the default/entries.tpl. It is not possible to individually style the "extend-entry" link without copying the entries.tpl file and editing it accordingly. I would suggest to add a CSS-class to this link named "serendipity_entry_extend"... or the like.

Thank you.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Styling the "extend-entry" link

Post by yellowled »

codeless wrote:While trying my best to create a responsive template for S9Y, i stumbled upon a "missing feature" in the default/entries.tpl. It is not possible to individually style the "extend-entry" link without copying the entries.tpl file and editing it accordingly. I would suggest to add a CSS-class to this link named "serendipity_entry_extend"... or the like.
/templates/default/ is very old, it hasn't been edited for about 8 years, I guess. In those days, it way considered a good thing, a feature that you could just copy it's entries.tpl to your template's directory and edit it. (I assume you're already familiar with s9y's fallback mechanism for template files.)

Newer templates will almost always have their own set of template files (which is one reason why s9y needs a new standard/default template). If you want to build a responsive template, I guess you want to use HTML5 as well? Then you'll have to edit basically everything else as well to make use of new elements.

Oh, and also, .serendipity_entry>a should work as a selector for the extended entry link. Yay, CSS3. :)

YL
codeless
Regular
Posts: 23
Joined: Thu Apr 12, 2012 3:38 pm

Re: Styling the "extend-entry" link

Post by codeless »

The default template is untouched for about eight years? Unbelievable -- it still works very well for my needs!
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Styling the "extend-entry" link

Post by yellowled »

codeless wrote:The default template is untouched for about eight years? Unbelievable -- it still works very well for my needs!
Well, you have to make a distinction here. s9y has kind of a history of confusion in the whole template area, i.e. the terms "template", "theme" and "style" are used for the same thing all over the documentation, which of course made users confuse them as well. (I tend to refer to them as "templates", although that should actually be the proper term for the tpl files.)

Another thing is the "default template" – we actually have two of those. There's /templates/default/ and /templates/bulletproof/. I like to call bulletproof the "standard template", because it's the preset template in any s9y installation right now (can't remember for how long, but quite a while). I usually refer to default as the "fallback template" since that's what it's used for – if another template does not have i.e. an entries.tpl, it will use the one from /templates/default/.

So, yes, default hasn't been touched in a long time (so has bulletproof, actually), but that's kind of a good thing as well since it ensures backwards compatibility for a lot of templates which seem to be still in use and rely on default to "just work". It's not pretty, it sure as hell isn't modern, but it does what it's supposed to do.

By the way, you do not want to try bulletproof as a boilerplate for new templates, it's more of a "template construction kit" for end users. Its code is way to complicated and extensive to use as a starting point.

YL
Don Chambers
Regular
Posts: 3652
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: Styling the "extend-entry" link

Post by Don Chambers »

BP became the preset in 1.2 I think. Remember that massive thread we had that became BP??!!! :mrgreen: Wow, that was 4 years ago!!!
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Styling the "extend-entry" link

Post by yellowled »

Don Chambers wrote:BP became the preset in 1.2 I think.
Wow, 1.2. That seems like light years away. :)
Don Chambers wrote:Remember that massive thread we had that became BP??!!!
I have repressed any memory of that thread. Seriously. My brain has deleted it. Gone. Anyone, do NOT attempt to read that thread. Seriously. You WILL get lost. :mrgreen:

YL
Post Reply