Fixed tags post count placement in sidebar

This commit is contained in:
Marcin Kurczewski 2014-05-30 08:45:47 +02:00
parent e382dc7f7d
commit 4d13a83047
2 changed files with 21 additions and 8 deletions

View file

@ -23,15 +23,26 @@ embed {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
#sidebar .tags .tag-wrapper {
max-width: 100%;
position: relative;
display: inline-block;
}
#sidebar .tags li a { #sidebar .tags li a {
padding-right: 2.75em;
box-sizing: border-box;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap;
display: inline-block; display: inline-block;
max-width: 90%; width: 100%;
vertical-align: text-bottom; vertical-align: text-bottom;
} }
#sidebar .tags li .count { #sidebar .tags li .count {
padding-left: 0.5em; position: absolute;
width: 2em;
right: 0;
top: 0;
color: silver; color: silver;
vertical-align: text-bottom; vertical-align: text-bottom;
} }

View file

@ -75,12 +75,14 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
<?php uasort($tags, function($a, $b) { return strnatcasecmp($a->getName(), $b->getName()); }) ?> <?php uasort($tags, function($a, $b) { return strnatcasecmp($a->getName(), $b->getName()); }) ?>
<?php foreach ($tags as $tag): ?> <?php foreach ($tags as $tag): ?>
<li title="<?= $tag->getName() ?>"> <li title="<?= $tag->getName() ?>">
<div class="tag-wrapper">
<a href="<?= Core::getRouter()->linkTo( <a href="<?= Core::getRouter()->linkTo(
['PostController', 'listView'], ['PostController', 'listView'],
['query' => $tag->getName()]) ?>" ['query' => $tag->getName()]) ?>"
><?= $tag->getName() ?> ><?= $tag->getName() ?>
</a> </a>
<span class="count"><?= TextHelper::useDecimalUnits($tag->getPostCount()) ?></span> <span class="count"><?= TextHelper::useDecimalUnits($tag->getPostCount()) ?></span>
</div>
</li> </li>
<?php endforeach ?> <?php endforeach ?>
</ul> </ul>