From 451bad02f05cb2d9c303fdbd62becccbdbefc746 Mon Sep 17 00:00:00 2001 From: Alexandr Danilov Date: Mon, 14 Sep 2015 02:12:39 +0300 Subject: [PATCH] improved display pictures --- .../themes/material/Entry/entries.html.twig | 51 +++++++++++++++---- .../views/themes/material/public/css/main.css | 21 ++++++-- 2 files changed, 56 insertions(+), 16 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 b46d8f11..77483a09 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 @@ -33,19 +33,48 @@ {% for entry in entries %}
  • -
    - {{ entry.title|raw }} - {% if entry.readingTime > 0 %} -
    {% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min
    - {% else %} -
    {% trans %}estimated reading time: {% endtrans %} < 1 min
    - {% endif %} - {% if entry.previewPicture is null %} -

    {{ entry.content|striptags|slice(0, 300) }}…

    - {% else %} - {{ entry.title|raw }} + +
    + {% if not entry.previewPicture is null %} +
    +
    +
    {% endif %} + +
    + {% if not entry.previewPicture is null %} + + {% endif %} + + {{ entry.title|raw|striptags|slice(0, 42) }} + + {% if entry.readingTime > 0 %} +
    {% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min
    + {% else %} +
    {% trans %}estimated reading time: {% endtrans %} < 1 min
    + {% endif %} + + {% if entry.previewPicture is null %} +

    {{ entry.content|striptags|slice(0, 300) }}…

    + {% endif %} +
    + + {% if not entry.previewPicture is null %} +
    + + {{ entry.title|raw }} + + {% if entry.readingTime > 0 %} +
    {% trans %}estimated reading time: {% endtrans %} {{ entry.readingTime }} min
    + {% else %} +
    {% trans %}estimated reading time: {% endtrans %} < 1 min
    + {% endif %} + +

    {{ entry.content|striptags|slice(0, 300) }}…

    +
    + {% endif %} +
    {{ entry.domainName | truncate(18) }} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css index 5e1ae8bd..144e259f 100755 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css @@ -221,15 +221,11 @@ main ul.row { padding: 0px 0.75rem; } -.data .card .card-content { +.data .card .card-body { height: 22em; overflow: hidden; } -img.preview { - max-width: 100%; -} - .card .card-content .card-title { line-height: 32px; } @@ -262,6 +258,21 @@ img.preview { margin-right: auto; } +.mdi-card-close:before { + content: "\e8aa"; +} + +.card .card-image { + height: 14em; +} + +.card .card-image .preview { + height: 14em; + background-size: cover; + background-repeat: no-repeat; + background-position: 50%; +} + /* ========================================================================== 5 = Article ========================================================================== */ -- 2.41.0