The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Themes Styling the "extend-entry" link

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

Postby codeless » Fri Apr 13, 2012 9:24 am

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.

User avatar
yellowled
Regular
 
Posts: 4880
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Fri Apr 13, 2012 2:20 pm

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

Postby codeless » Sat Apr 14, 2012 11:11 am

The default template is untouched for about eight years? Unbelievable -- it still works very well for my needs!

User avatar
yellowled
Regular
 
Posts: 4880
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Sat Apr 14, 2012 2:04 pm

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

User avatar
Don Chambers
Regular
 
Posts: 3077
Joined: Mon Feb 13, 2006 3:40 am
Location: Chicago, IL, USA

Postby Don Chambers » Sat Apr 14, 2012 11:19 pm

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!!!

User avatar
yellowled
Regular
 
Posts: 4880
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Sun Apr 15, 2012 1:16 am

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



Return to Themes

Who is online

Users browsing this forum: No registered users and 0 guests