Tag list visuals
- long tag text overflow in post-view and tag-list - tag usage visualized in tag-list
This commit is contained in:
parent
e910d2f517
commit
7743753641
4 changed files with 14 additions and 3 deletions
|
@ -21,6 +21,10 @@ embed {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
#sidebar .tags li {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
#sidebar .tags li .count {
|
#sidebar .tags li .count {
|
||||||
padding-left: 0.5em;
|
padding-left: 0.5em;
|
||||||
color: silver;
|
color: silver;
|
||||||
|
|
|
@ -6,11 +6,17 @@
|
||||||
-moz-column-width: 14em;
|
-moz-column-width: 14em;
|
||||||
-webkit-column-width: 14em;
|
-webkit-column-width: 14em;
|
||||||
}
|
}
|
||||||
|
.tags li a:hover {
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
.tags li {
|
.tags li {
|
||||||
margin: 0.2em 0.5em;
|
margin: 0.2em 0.5em;
|
||||||
text-align: top;
|
text-align: top;
|
||||||
width: 14em;
|
width: 14em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-wrapper {
|
.form-wrapper {
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<h1>tags (<?php echo count($this->context->transport->post->sharedTag) ?>)</h1>
|
<h1>tags (<?php echo count($this->context->transport->post->sharedTag) ?>)</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach ($this->context->transport->post->sharedTag as $tag): ?>
|
<?php foreach ($this->context->transport->post->sharedTag as $tag): ?>
|
||||||
<li>
|
<li title="<?php echo $tag->name ?>">
|
||||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
||||||
<?php echo $tag->name ?>
|
<?php echo $tag->name ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
<?php $max = max($this->context->transport->tagDistribution) ?>
|
||||||
<div class="tags">
|
<div class="tags">
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach ($this->context->transport->tagDistribution as $tagName => $count): ?>
|
<?php foreach ($this->context->transport->tagDistribution as $tagName => $count): ?>
|
||||||
<li class="tag">
|
<li class="tag" title="<?php echo $tagName ?> (<?php echo $count ?>)">
|
||||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tagName]) ?>">
|
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tagName]) ?>" style="opacity: <?php printf('%.02f', 0.25 + 0.75 * log($count) / log($max)) ?>">
|
||||||
<?php echo $tagName . ' (' . $count . ')' ?>
|
<?php echo $tagName . ' (' . $count . ')' ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue