- <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12">
- <div class="card">
-
- <div class="card-body">
- {% if not entry.previewPicture is null %}
- <div class="card-image waves-effect waves-block waves-light">
- <div class="preview activator" style="background-image: url({{ entry.previewPicture }})"></div>
- </div>
- {% endif %}
-
- <div class="card-content">
- {% if not entry.previewPicture is null %}
- <i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i>
- {% endif %}
-
- <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span>
-
- <div class="estimatedTime grey-text">
- <span class="tool reading-time">
- {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
- {% if readingTime > 0 %}
- {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
- {% else %}
- {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
- {% endif %}
- </span>
- </div>
-
- {% if entry.previewPicture is null %}
- <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p>
- {% endif %}
- </div>
- </div>
-
- {% if not entry.previewPicture is null %}
- <div class="card-reveal">
- <i class="card-title grey-text text-darken-4 mdi-card-close right"></i>
- <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span>
-
- <div class="estimatedTime grey-text">
- <span class="tool reading-time">
- {{ 'entry.list.reading_time'|trans }}
- {% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur"><</small> 1{% endif %} min
- </span>
- </div>
-
- <p>{{ entry.content|striptags|slice(0, 300)|raw }}…</p>
- </div>
- {% endif %}
-
- <div class="card-action">
- <span class="bold">
- <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>
- </bold>
-
- <ul class="tools links right">
- <li>
- <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a>
- <a title="{{ 'entry.list.toogle_as_star'|trans }}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a>
- <a title="{{ 'entry.list.delete'|trans }}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a>
- </li>
- </ul>
- </div>
- </div>
+ <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12">
+ {% if entry.previewPicture is null %}
+ {% include "@WallabagCore/themes/material/Entry/_card_no_preview.html.twig" with {'entry': entry} only %}
+ {% elseif not entry.previewPicture is null and entry.mimetype starts with 'image/' %}
+ {% include "@WallabagCore/themes/material/Entry/_card_full_image.html.twig" with {'entry': entry} only %}
+ {% elseif not entry.previewPicture is null %}
+ {% include "@WallabagCore/themes/material/Entry/_card_preview.html.twig" with {'entry': entry} only %}
+ {% endif %}