material: replace card activator with article link on card preview

Fixes #2424

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
Kevin Decherf 2017-11-05 15:18:45 +01:00
parent 8abb6c1321
commit 2f510787e7
5 changed files with 15 additions and 4 deletions

View file

@ -134,6 +134,7 @@ main {
.card-fullimage .preview { .card-fullimage .preview {
height: 14em; height: 14em;
background: no-repeat 50%/cover; background: no-repeat 50%/cover;
display: block;
} }
&.sw { &.sw {

View file

@ -6,7 +6,9 @@
<li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></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> <a href="{{ path('view', { 'id': entry.id }) }}">
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
</a>
</div> </div>
<div class="card-content"> <div class="card-content">

View file

@ -1,5 +1,11 @@
<div class="card-stacked"> <div class="card-stacked">
<div class="preview">{% if entry.previewPicture is not null %}<img src="{{ entry.previewPicture }}" />{% endif %}</div> <div class="preview">
{% if entry.previewPicture is not null %}
<a href="{{ path('view', { 'id': entry.id }) }}">
<img src="{{ entry.previewPicture }}" />
</a>
{% endif %}
</div>
<div class="card-content"> <div class="card-content">
<span class="card-title dot-ellipsis dot-resize-update"> <span class="card-title dot-ellipsis dot-resize-update">
<a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}">

View file

@ -6,7 +6,9 @@
<li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></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> <a href="{{ path('view', { 'id': entry.id }) }}">
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
</a>
</div> </div>
<div class="card-content"> <div class="card-content">

File diff suppressed because one or more lines are too long