aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2018-11-25 15:00:08 +0100
committerKevin Decherf <kevin@kdecherf.com>2018-11-25 15:00:08 +0100
commite5de9917fdd78d4cd3b46b376e3b2a4175efa36a (patch)
tree084cd32cecf07d3c4fb365730b5899d22fac0fc8
parentbffe65478de71113a16f6e7a7ef75845c9d61180 (diff)
downloadwallabag-e5de9917fdd78d4cd3b46b376e3b2a4175efa36a.tar.gz
wallabag-e5de9917fdd78d4cd3b46b376e3b2a4175efa36a.tar.zst
wallabag-e5de9917fdd78d4cd3b46b376e3b2a4175efa36a.zip
material: fix missing thumbnail on list view
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
-rw-r--r--app/Resources/static/themes/material/css/cards.scss34
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig11
2 files changed, 20 insertions, 25 deletions
diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss
index 6691adc6..9e3599d5 100644
--- a/app/Resources/static/themes/material/css/cards.scss
+++ b/app/Resources/static/themes/material/css/cards.scss
@@ -116,18 +116,6 @@ main {
116 height: 13.5em; 116 height: 13.5em;
117 } 117 }
118 118
119 .card-image .preview,
120 .card-fullimage .preview {
121 height: 100%;
122 background: no-repeat 50%/cover;
123 background-color: #efefef;
124 display: block;
125
126 &--default {
127 background-size: contain;
128 }
129 }
130
131 &.sw { 119 &.sw {
132 max-width: 370px; 120 max-width: 370px;
133 margin-left: auto; 121 margin-left: auto;
@@ -142,6 +130,19 @@ a.original:not(.waves-effect) {
142 display: block; 130 display: block;
143} 131}
144 132
133.card .card-image .preview,
134.card .card-fullimage .preview,
135.card-stacked .preview {
136 height: 100%;
137 background: no-repeat 50%/cover;
138 background-color: #efefef;
139 display: block;
140
141 &--default {
142 background-size: contain;
143 }
144}
145
145.card-entry-labels li, 146.card-entry-labels li,
146.card-tag-labels li { 147.card-tag-labels li {
147 margin: 10px 10px 10px auto; 148 margin: 10px 10px 10px auto;
@@ -210,16 +211,11 @@ a.original:not(.waves-effect) {
210 text-align: right; 211 text-align: right;
211 } 212 }
212 213
213 .preview { 214 .card-preview {
214 max-width: 100px; 215 max-width: 100px;
215 height: auto; 216 max-height: 50px;
216 margin-right: 10px; 217 margin-right: 10px;
217 flex: 1; 218 flex: 1;
218
219 img {
220 max-width: 100%;
221 max-height: 100%;
222 }
223 } 219 }
224 220
225 div.metadata { 221 div.metadata {
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig
index 7c83c3bb..1c00f2fa 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig
@@ -1,10 +1,9 @@
1<div class="card-stacked"> 1<div class="card-stacked">
2 <div class="preview"> 2 <div class="card-preview">
3 {% if entry.previewPicture is not null %} 3 <a href="{{ path('view', { 'id': entry.id }) }}">
4 <a href="{{ path('view', { 'id': entry.id }) }}"> 4 {% set previewClassModifier = entry.previewPicture ? '' : ' preview--default' %}
5 <img src="{{ entry.previewPicture }}" /> 5 <span class="preview{{ previewClassModifier }}" style="background-image: url({{ entry.previewPicture | default(asset('wallassets/themes/_global/img/logo-square.svg')) }})"></span>
6 </a> 6 </a>
7 {% endif %}
8 </div> 7 </div>
9 {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %} 8 {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %}
10 <ul class="tools-list hide-on-small-only"> 9 <ul class="tools-list hide-on-small-only">