diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-11-08 22:17:46 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-11-08 22:17:46 +0100 |
commit | 8d7b4f0eff9d07f8d6d354e09fd926abf26aa4ce (patch) | |
tree | f8a932f9e991ae49578bff9c70b27fffd78a929c /src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig | |
parent | e9490a344376036978956aedeb213066fdbf49e4 (diff) | |
download | wallabag-8d7b4f0eff9d07f8d6d354e09fd926abf26aa4ce.tar.gz wallabag-8d7b4f0eff9d07f8d6d354e09fd926abf26aa4ce.tar.zst wallabag-8d7b4f0eff9d07f8d6d354e09fd926abf26aa4ce.zip |
Display a bigger image in case of image content
If the content is only an image, we can display a bigger preview image because we won’t have text to display.
Also, split different card view to avoid too much complexity in the entries.html.twig
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig new file mode 100644 index 00000000..0fdd5996 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig | |||
@@ -0,0 +1,28 @@ | |||
1 | <div class="card"> | ||
2 | <div class="card-body"> | ||
3 | <div class="card-fullimage"> | ||
4 | <ul class="card-entry-labels"> | ||
5 | {% for tag in entry.tags | slice(0, 3) %} | ||
6 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | ||
7 | {% endfor %} | ||
8 | </ul> | ||
9 | <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div> | ||
10 | </div> | ||
11 | |||
12 | <div class="card-content"> | ||
13 | <span class="card-title dot-ellipsis dot-resize-update"> | ||
14 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}"> | ||
15 | {{ entry.title | raw | striptags | truncate(80, true, '…') }} | ||
16 | </a> | ||
17 | </span> | ||
18 | |||
19 | <div class="original grey-text"> | ||
20 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text"> | ||
21 | <span>{{ entry.domainName|removeWww }}</span> | ||
22 | </a> | ||
23 | </div> | ||
24 | </div> | ||
25 | </div> | ||
26 | |||
27 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} | ||
28 | </div> | ||