Feature #30

avatar

Hide huge tag lists

Added by Shish - 964 days ago. Updated 300 days ago.

Status:Closed Start:
Priority:Normal Due date:
Assigned to:avatarShish - % Done:

0%

Category:themes
Target version:2.3

Description

When you have loads of tags, the title bar gets huge; hide / show with javascript?

History

Updated by artanis-00-gmail-com - 925 days ago

avatar

Put this in a theme I'm working on, because I'm tired of the "absolutely_everyone" Nasuverse Character & Relations chart heading taking out half of the screen. (I have it for the same reason it's on the testbed, to see what happens when you put 1200 characters in the tag string.)

Leaves the full list in the page head>title.

(theme > default.php ~ln75)
if(strlen($this->heading) > 90) {
    // 80-90 seems like a good length for 2em font-size, so cut
    // the long ones down to size:
    $heading = substr($this->heading, 0,89);
    // after abbreviating our tag string, cut any half-a-tag
    // there might be and append an elipsis to show what we've done: 
    $heading = substr($heading,0, strrpos($heading,' '))." ...";
} else {
    // These aren't the droids we are looking for... You may go about
    // your business... Move along.
    $heading = $this->heading;
}

Then replace {$this->heading} in the header div (not the title tag) with $heading.

Updated by anonymous - 300 days ago

avatar
  • Status changed from New to Closed
  • 1 set to fixed

done in 2.3

Also available in: Atom PDF