aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-11-08 22:17:46 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-11-08 22:17:46 +0100
commit8d7b4f0eff9d07f8d6d354e09fd926abf26aa4ce (patch)
treef8a932f9e991ae49578bff9c70b27fffd78a929c /src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
parente9490a344376036978956aedeb213066fdbf49e4 (diff)
downloadwallabag-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/entries.html.twig')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig75
1 files changed, 7 insertions, 68 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
index 498234b9..c610c8d2 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig
@@ -22,74 +22,13 @@
22 <ul class="row data"> 22 <ul class="row data">
23 {% for entry in entries %} 23 {% for entry in entries %}
24 <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12"> 24 <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12">
25 <div class="card"> 25 {% if entry.previewPicture is null %}
26 26 {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %}
27 <div class="card-body"> 27 {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
28 {% if not entry.previewPicture is null %} 28 {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %}
29 <div class="card-image waves-effect waves-block waves-light"> 29 {% elseif not entry.previewPicture is null %}
30 <ul class="card-entry-labels"> 30 {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %}
31 {% for tag in entry.tags | slice(0, 3) %} 31 {% endif %}
32 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
33 {% endfor %}
34 </ul>
35 <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div>
36 </div>
37 {% endif %}
38
39 <div class="card-content">
40 {% if not entry.previewPicture is null %}
41 <i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
42 {% endif %}
43
44 <span class="card-title dot-ellipsis dot-resize-update"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">{{ entry.title| striptags | truncate(80, true, '…') | raw }}</a></span>
45
46 <div class="original grey-text">
47 <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
48 <span>{{ entry.domainName|removeWww }}</span>
49 </a>
50 </div>
51
52 {% if entry.previewPicture is null %}
53 <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
54 <ul class="card-entry-labels-hidden">
55 {% for tag in entry.tags | slice(0, 2) %}
56 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
57 {% endfor %}
58 </ul>
59 {% endif %}
60 </div>
61 </div>
62
63 {% if not entry.previewPicture is null %}
64 <div class="card-reveal">
65 <i class="card-title activator grey-text text-darken-4 material-icons right">clear</i>
66 <span class="card-title" title="{{ entry.title | raw | striptags }}"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title | raw | striptags | truncate(90, true, '…') }}</a></span>
67
68 <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
69
70 <ul class="card-entry-labels-hidden">
71 {% for tag in entry.tags %}
72 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
73 {% endfor %}
74 </ul>
75 </div>
76 {% endif %}
77
78 <div class="card-action">
79 <span class="reading-time grey-text">
80 <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
81 {{ entry.readingTime / app.user.config.readingSpeed|round }} min
82 </span>
83
84 <ul class="tools right">
85 <li>
86 <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}redo{% endif %}</i></a>
87 <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text" href="{{ path('star_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isStarred == 0 %}star_border{% else %}star{% endif %}</i></a>
88 <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
89 </li>
90 </ul>
91 </div>
92 </div>
93 </li> 32 </li>
94 {% endfor %} 33 {% endfor %}
95 </ul> 34 </ul>