Merge pull request #2374 from wallabag/clickable-tags

Clickable tags
This commit is contained in:
Jeremy Benoist 2016-10-05 16:16:21 +02:00 committed by GitHub
commit 046f33e21b
10 changed files with 40 additions and 14 deletions

View file

@ -383,9 +383,11 @@ footer a {
max-height: 2em; max-height: 2em;
overflow-y: hidden; overflow-y: hidden;
padding: 0; padding: 0;
margin: 0;
} }
.card-entry-tags li { .card-entry-tags li,
.card-entry-tags span {
display: inline-block; display: inline-block;
margin: 0 5px; margin: 0 5px;
padding: 5px 12px; padding: 5px 12px;
@ -394,9 +396,19 @@ footer a {
max-height: 2em; max-height: 2em;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
}
.card-entry-tags a,
.card-entry-labels a {
text-decoration: none;
font-weight: normal;
color: #fff; color: #fff;
} }
.nav-panel-add-tag {
margin-top: 10px;
}
.list-entries + .results { .list-entries + .results {
margin-bottom: 2em; margin-bottom: 2em;
} }
@ -509,6 +521,7 @@ img.preview {
color: #666; color: #666;
font-size: 0.9em; font-size: 0.9em;
line-height: 1.7; line-height: 1.7;
margin-top: 5px;
} }
.entry h2 a::first-letter { .entry h2 a::first-letter {
@ -1021,6 +1034,7 @@ blockquote {
#article_toolbar li { #article_toolbar li {
display: inline-block; display: inline-block;
margin: 3px auto;
} }
#article_toolbar a { #article_toolbar a {

View file

@ -445,6 +445,15 @@ main ul.row {
white-space: nowrap; white-space: nowrap;
} }
.card-entry-tags a,
.card-entry-labels a,
.card-entry-labels-hidden a,
#list .chip a {
text-decoration: none;
font-weight: normal;
color: #fff;
}
.card .card-content .estimatedTime { .card .card-content .estimatedTime {
margin-bottom: 10px; margin-bottom: 10px;
} }

View file

@ -29,16 +29,16 @@
<li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName|removeWww }}</span></a></li> <li><a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }} : {{ entry.title|e }}" class="tool link icon-link icon"><span>{{ entry.domainName|removeWww }}</span></a></li>
</ul> </ul>
{% if entry.previewPicture is null %} {% if entry.previewPicture is null %}
<p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
<ul class="card-entry-tags"> <ul class="card-entry-tags">
{% for tag in entry.tags %} {% for tag in entry.tags %}
<li>{{ tag.label }}</li> <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
<p>{{ entry.content|striptags|slice(0, 300) }}&hellip;</p>
{% else %} {% else %}
<ul class="card-entry-labels"> <ul class="card-entry-labels">
{% for tag in entry.tags | slice(0, 3) %} {% for tag in entry.tags | slice(0, 3) %}
<li>{{ tag.label }}</li> <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
<img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /> <img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" />

View file

@ -57,9 +57,11 @@
{% set nbAnnotations = entry.annotations | length %} {% set nbAnnotations = entry.annotations | length %}
<span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> <span class="tool link"><i class="material-icons link">comment</i> {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
<aside class="tags"> <aside class="tags">
<div class="card-entry-tags">
{% for tag in entry.tags %} {% for tag in entry.tags %}
<span class="label-outline"><i class="material-icons">label_outline</i> {{ tag.label }}</span> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"class="nostyle"><i>✘</i></a> <span class="label-outline"><i class="material-icons">label_outline</i> <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" class="nostyle"><i>✘</i></a></span>
{% endfor %} {% endfor %}
</div>
<div class="input-field nav-panel-add-tag" style="display: none"> <div class="input-field nav-panel-add-tag" style="display: none">
{{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
</div> </div>

View file

@ -17,7 +17,7 @@
<div class="card-image waves-effect waves-block waves-light"> <div class="card-image waves-effect waves-block waves-light">
<ul class="card-entry-labels"> <ul class="card-entry-labels">
{% for tag in entry.tags | slice(0, 3) %} {% for tag in entry.tags | slice(0, 3) %}
<li>{{ tag.label }}</li> <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
<div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div> <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div>
@ -46,7 +46,7 @@
<p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p> <p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p>
<ul class="card-entry-labels-hidden"> <ul class="card-entry-labels-hidden">
{% for tag in entry.tags | slice(0, 2) %} {% for tag in entry.tags | slice(0, 2) %}
<li>{{ tag.label }}</li> <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
@ -68,7 +68,7 @@
<ul class="card-entry-labels-hidden"> <ul class="card-entry-labels-hidden">
{% for tag in entry.tags %} {% for tag in entry.tags %}
<li>{{ tag.label }}</li> <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>

View file

@ -223,12 +223,13 @@
</span> </span>
<i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i><span class="link">{{ entry.createdAt|date('Y-m-d') }}</span> <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i><span class="link">{{ entry.createdAt|date('Y-m-d') }}</span>
<a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool"> <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
<i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span></a> <i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span>
</a>
<span class="tool"><i class="material-icons link">comment</i> <span class="link">{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> <span class="tool"><i class="material-icons link">comment</i> <span class="link">{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span>
<div id="list"> <div id="list">
{% for tag in entry.tags %} {% for tag in entry.tags %}
<div class="chip"> <div class="chip">
{{ tag.label }} <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i class="material-icons">delete</i></a> <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i class="material-icons">delete</i></a>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long