Feature #30
Hide huge tag lists
| Status: | Closed | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | % 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
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.