diff options
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.twig | 101 |
1 files changed, 21 insertions, 80 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 a0205ffb..160dbf3d 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 | |||
@@ -9,93 +9,34 @@ | |||
9 | {% endblock %} | 9 | {% endblock %} |
10 | 10 | ||
11 | {% block content %} | 11 | {% block content %} |
12 | {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} | 12 | <div class="results clearfix"> |
13 | <div class="nb-results left"> | ||
14 | {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} | ||
15 | </div> | ||
16 | {% if entries.getNbPages > 1 %} | ||
17 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | ||
18 | {% endif %} | ||
19 | </div> | ||
20 | |||
13 | <br /> | 21 | <br /> |
14 | <ul class="row data"> | 22 | <ul class="row data"> |
15 | {% for entry in entries %} | 23 | {% for entry in entries %} |
16 | <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> | 24 | <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12"> |
17 | <div class="card"> | 25 | {% if entry.previewPicture is null %} |
18 | 26 | {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %} | |
19 | <div class="card-body"> | 27 | {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %} |
20 | {% if not entry.previewPicture is null %} | 28 | {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %} |
21 | <div class="card-image waves-effect waves-block waves-light"> | 29 | {% elseif not entry.previewPicture is null %} |
22 | <ul class="card-entry-labels"> | 30 | {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %} |
23 | {% for tag in entry.tags | slice(0, 3) %} | 31 | {% endif %} |
24 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | ||
25 | {% endfor %} | ||
26 | </ul> | ||
27 | <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div> | ||
28 | </div> | ||
29 | {% endif %} | ||
30 | |||
31 | <div class="card-content"> | ||
32 | {% if not entry.previewPicture is null %} | ||
33 | <i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i> | ||
34 | {% endif %} | ||
35 | |||
36 | <span class="card-title dot-ellipsis dot-resize-update"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|striptags|raw }}</a></span> | ||
37 | |||
38 | <div class="estimatedTime grey-text"> | ||
39 | <span class="tool reading-time"> | ||
40 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | ||
41 | {% if readingTime > 0 %} | ||
42 | {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }} | ||
43 | {% else %} | ||
44 | {{ 'entry.list.reading_time_less_one_minute'|trans|raw }} | ||
45 | {% endif %} | ||
46 | </span> | ||
47 | </div> | ||
48 | |||
49 | {% if entry.previewPicture is null %} | ||
50 | <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p> | ||
51 | <ul class="card-entry-labels-hidden"> | ||
52 | {% for tag in entry.tags | slice(0, 2) %} | ||
53 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | ||
54 | {% endfor %} | ||
55 | </ul> | ||
56 | {% endif %} | ||
57 | </div> | ||
58 | </div> | ||
59 | |||
60 | {% if not entry.previewPicture is null %} | ||
61 | <div class="card-reveal"> | ||
62 | <i class="card-title grey-text text-darken-4 material-icons right">clear</i> | ||
63 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> | ||
64 | |||
65 | <div class="estimatedTime grey-text"> | ||
66 | <span class="tool reading-time"> | ||
67 | {% if readingTime > 0 %}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}{% else %}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{% endif %} | ||
68 | </span> | ||
69 | </div> | ||
70 | |||
71 | <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p> | ||
72 | |||
73 | <ul class="card-entry-labels-hidden"> | ||
74 | {% for tag in entry.tags %} | ||
75 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | ||
76 | {% endfor %} | ||
77 | </ul> | ||
78 | </div> | ||
79 | {% endif %} | ||
80 | |||
81 | <div class="card-action"> | ||
82 | <span class="bold"> | ||
83 | <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }}: {{ entry.title|e }} - {{ entry.domainName|removeWww }}" class="tool original grey-text"><span>{{ entry.domainName|removeWww|truncate(18) }}</span></a> | ||
84 | </span> | ||
85 | |||
86 | <ul class="tools right"> | ||
87 | <li> | ||
88 | <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> | ||
89 | <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> | ||
90 | <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> | ||
91 | </li> | ||
92 | </ul> | ||
93 | </div> | ||
94 | </div> | ||
95 | </li> | 32 | </li> |
96 | {% endfor %} | 33 | {% endfor %} |
97 | </ul> | 34 | </ul> |
98 | 35 | ||
36 | {% if entries.getNbPages > 1 %} | ||
37 | {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }} | ||
38 | {% endif %} | ||
39 | |||
99 | <!-- Export --> | 40 | <!-- Export --> |
100 | <div id="export" class="side-nav fixed right-aligned"> | 41 | <div id="export" class="side-nav fixed right-aligned"> |
101 | {% set currentRoute = app.request.attributes.get('_route') %} | 42 | {% set currentRoute = app.request.attributes.get('_route') %} |