aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2017-05-29 10:59:30 +0200
committerNicolas Lœuillet <nicolas@loeuillet.org>2017-05-31 13:26:29 +0200
commit812c980fa5ea03b9282e32a93723e459eee763a3 (patch)
tree3c9f39794d576a21dc966f390323549c9f367427
parent21242a02a170208bcdd3ffbdb351f0929f708c5a (diff)
downloadwallabag-812c980fa5ea03b9282e32a93723e459eee763a3.tar.gz
wallabag-812c980fa5ea03b9282e32a93723e459eee763a3.tar.zst
wallabag-812c980fa5ea03b9282e32a93723e459eee763a3.zip
Fixed tags display on grid view
-rw-r--r--app/Resources/static/themes/material/css/cards.scss17
-rw-r--r--app/Resources/static/themes/material/css/entries.scss9
-rw-r--r--app/Resources/static/themes/material/css/various.scss20
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_list.html.twig47
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig4
5 files changed, 74 insertions, 23 deletions
diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss
index f5b79193..1e0155c3 100644
--- a/app/Resources/static/themes/material/css/cards.scss
+++ b/app/Resources/static/themes/material/css/cards.scss
@@ -182,6 +182,23 @@ a.original:not(.waves-effect) {
182 ul.tools-list { 182 ul.tools-list {
183 display: none; 183 display: none;
184 } 184 }
185
186 .preview {
187 float: left;
188 width: 90px;
189 height: 50px;
190
191 img {
192 max-height: 50px;
193 padding-right: 10px;
194 width: 80px;
195 }
196 }
197
198 .domain,
199 .footer {
200 font-size: 12px;
201 }
185} 202}
186 203
187.quickstart .card .card-action a, 204.quickstart .card .card-action a,
diff --git a/app/Resources/static/themes/material/css/entries.scss b/app/Resources/static/themes/material/css/entries.scss
index b6a46a9e..c667be27 100644
--- a/app/Resources/static/themes/material/css/entries.scss
+++ b/app/Resources/static/themes/material/css/entries.scss
@@ -2,6 +2,15 @@
2 * Entries 2 * Entries
3 * ========================================================================== */ 3 * ========================================================================== */
4 4
5.collection {
6 margin: 15px 15px 0;
7
8 .collection-item {
9 padding: 7px;
10 height: 65px;
11 }
12}
13
5.results { 14.results {
6 height: 1em; 15 height: 1em;
7 16
diff --git a/app/Resources/static/themes/material/css/various.scss b/app/Resources/static/themes/material/css/various.scss
index 7daf40ec..512ed8cd 100644
--- a/app/Resources/static/themes/material/css/various.scss
+++ b/app/Resources/static/themes/material/css/various.scss
@@ -30,3 +30,23 @@ nav .input-field input {
30.tab { 30.tab {
31 flex: 1; 31 flex: 1;
32} 32}
33
34.chip {
35 margin: auto 0;
36 border-radius: 4px;
37 background-color: #eee;
38 font-weight: normal;
39 height: 20px;
40 line-height: normal;
41
42 a {
43 color: #9e9e9e;
44 }
45
46 i.material-icons {
47 float: right;
48 font-size: 16px;
49 line-height: 32px;
50 padding-left: 8px;
51 }
52}
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 24d76a05..8a22f0c8 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,25 +1,30 @@
1<div class="card"> 1<div class="card-stacked">
2 <div class="card-stacked"> 2 <div class="card-content">
3 <div class="card-content"> 3 <div class="preview"><img src="{{ entry.previewPicture }}" /></div>
4 <span class="card-title dot-ellipsis dot-resize-update"> 4 <span class="card-title dot-ellipsis dot-resize-update">
5 <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> 5 <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}">
6 {{ entry.title| striptags | truncate(120, true, '…') | raw }} 6 {{ entry.title| striptags | truncate(120, true, '…') | raw }}
7 </a> 7 </a>
8 <a href="{{ entry.url|e }}" class="grey-text domain" target="_blank" title="{{ entry.domainName|removeWww }}">
9 <span>{{ entry.domainName|removeWww }}</span>
10 </a>
11 </span>
12
13 <div class="footer">
14 {% for tag in entry.tags | slice(0, 3) %}
15 <span class="chip hide-on-med-and-down">
16 <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a>
8 </span> 17 </span>
9 <ul class="right"> 18 {% endfor %}
10 <li> 19
11 <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> 20 <ul class="tools-list right">
12 <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> 21 <li>
13 <a title="{{ 'entry.list.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a> 22 <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>
14 </li> 23 <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>
15 </ul> 24 <a title="{{ 'entry.list.delete'|trans }}" onclick="return confirm('{{ 'entry.confirm.delete'|trans|escape('js') }}')" class="tool grey-text delete" href="{{ path('delete_entry', { 'id': entry.id }) }}"><i class="material-icons">delete</i></a>
16 <div class="right"> 25 </li>
17 {% for tag in entry.tags | slice(0, 3) %} 26 </ul>
18 <span class="chip"> 27
19 <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}"><i class="material-icons">delete</i></a>
20 </span>
21 {% endfor %}
22 </div>
23 </div> 28 </div>
24 </div> 29 </div>
25</div> 30</div>
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 b2d91c9c..6f657b18 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
@@ -24,9 +24,9 @@
24 </div> 24 </div>
25 25
26 <br /> 26 <br />
27 <ul class="row data"> 27 <ul class="{% if listMode == 1 %}collection{% else %}row data{% endif %}">
28 {% for entry in entries %} 28 {% for entry in entries %}
29 <li id="entry-{{ entry.id|e }}" class="col {% if listMode == 0 %}l3 m6{% endif %} s12"> 29 <li id="entry-{{ entry.id|e }}" class="col {% if listMode == 0 %}l3 m6{% else %}collection-item{% endif %} s12">
30 {% if listMode == 1 %} 30 {% if listMode == 1 %}
31 {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %} 31 {% include "@WallabagCore/themes/material/Entry/_card_list.html.twig" with {'entry': entry} only %}
32 {% elseif entry.previewPicture is null %} 32 {% elseif entry.previewPicture is null %}