aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2016-11-04 08:49:52 +0100
committerGitHub <noreply@github.com>2016-11-04 08:49:52 +0100
commit2db9142bfc3e34c1f79f3aabf5b302c3a487b3e1 (patch)
treea840ae833b85d2b4a80e96c1426ab63f001d06cf /src
parentf53f542fa51075e742fc2295bfff2681b0375ea1 (diff)
parentd56d416d9bf18722a54a1b262e742767a41fb165 (diff)
downloadwallabag-2db9142bfc3e34c1f79f3aabf5b302c3a487b3e1.tar.gz
wallabag-2db9142bfc3e34c1f79f3aabf5b302c3a487b3e1.tar.zst
wallabag-2db9142bfc3e34c1f79f3aabf5b302c3a487b3e1.zip
Merge pull request #2460 from wallabag/ui-changes
UI Changes
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig18
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/pager.html.twig12
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig54
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig53
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/pager.html.twig10
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig6
6 files changed, 79 insertions, 74 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
index 5d657c7e..0f1c010f 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entries.html.twig
@@ -9,7 +9,17 @@
9{% endblock %} 9{% endblock %}
10 10
11{% block content %} 11{% block content %}
12 {% include "WallabagCoreBundle:Entry:pager.html.twig" with {'entries': entries} %} 12
13 <div class="results">
14 <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
15 <div class="pagination">
16 <i class="btn-clickable download-btn material-icons md-36">file_download</i>
17 <i class="btn-clickable filter-btn material-icons md-36">filter_list</i>
18 {% if entries.getNbPages > 1 %}
19 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
20 {% endif %}
21 </div>
22 </div>
13 23
14 {% for entry in entries %} 24 {% for entry in entries %}
15 <div id="entry-{{ entry.id|e }}" class="entry"> 25 <div id="entry-{{ entry.id|e }}" class="entry">
@@ -50,6 +60,10 @@
50 </div> 60 </div>
51 {% endfor %} 61 {% endfor %}
52 62
63 {% if entries.getNbPages > 1 %}
64 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
65 {% endif %}
66
53 <!-- Export --> 67 <!-- Export -->
54 <aside id="download-form"> 68 <aside id="download-form">
55 {% set currentRoute = app.request.attributes.get('_route') %} 69 {% set currentRoute = app.request.attributes.get('_route') %}
@@ -75,7 +89,7 @@
75 89
76 <!-- Filter --> 90 <!-- Filter -->
77 {% if form is not null %} 91 {% if form is not null %}
78 <div id="filters" class=""> 92 <div id="filters">
79 <form method="get" action="{{ path('all') }}"> 93 <form method="get" action="{{ path('all') }}">
80 <h2>{{ 'entry.filters.title'|trans }}</h2> 94 <h2>{{ 'entry.filters.title'|trans }}</h2>
81 <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a> 95 <a href="javascript: void(null);" id="filter-form-close" class="close-button--popup close-button">&times;</a>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/pager.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/pager.html.twig
deleted file mode 100644
index faaa21a8..00000000
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/pager.html.twig
+++ /dev/null
@@ -1,12 +0,0 @@
1{% block pager %}
2 <div class="results">
3 <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
4 <div class="pagination">
5 <i class="btn-clickable download-btn material-icons md-36">file_download</i>
6 <i class="btn-clickable filter-btn material-icons md-36">filter_list</i>
7 {% if entries.getNbPages > 1 %}
8 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
9 {% endif %}
10 </div>
11 </div>
12{% endblock %}
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 1225e680..6347afac 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,11 +9,19 @@
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 <div class="card">
18 26
19 <div class="card-body"> 27 <div class="card-body">
@@ -30,24 +38,19 @@
30 38
31 <div class="card-content"> 39 <div class="card-content">
32 {% if not entry.previewPicture is null %} 40 {% if not entry.previewPicture is null %}
33 <i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i> 41 <i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
34 {% endif %} 42 {% endif %}
35 43
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> 44 <span class="card-title dot-ellipsis dot-resize-update"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | raw | striptags }}">{{ entry.title| striptags | truncate(80, true, '…') | raw }}</a></span>
37 45
38 <div class="estimatedTime grey-text"> 46 <div class="original grey-text">
39 <span class="tool reading-time"> 47 <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text">
40 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} 48 <span>{{ entry.domainName|removeWww }}</span>
41 {% if readingTime > 0 %} 49 </a>
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> 50 </div>
48 51
49 {% if entry.previewPicture is null %} 52 {% if entry.previewPicture is null %}
50 <p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p> 53 <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
51 <ul class="card-entry-labels-hidden"> 54 <ul class="card-entry-labels-hidden">
52 {% for tag in entry.tags | slice(0, 2) %} 55 {% for tag in entry.tags | slice(0, 2) %}
53 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> 56 <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li>
@@ -59,16 +62,10 @@
59 62
60 {% if not entry.previewPicture is null %} 63 {% if not entry.previewPicture is null %}
61 <div class="card-reveal"> 64 <div class="card-reveal">
62 <i class="card-title grey-text text-darken-4 material-icons right">clear</i> 65 <i class="card-title activator 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> 66 <span class="card-title" title="{{ entry.title | raw | striptags }}"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title | raw | striptags | truncate(90, true, '…') }}</a></span>
64 67
65 <div class="estimatedTime grey-text"> 68 <p>{{ entry.content|striptags|slice(0, 250)|raw }}&hellip;</p>
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 }}&hellip;</p>
72 69
73 <ul class="card-entry-labels-hidden"> 70 <ul class="card-entry-labels-hidden">
74 {% for tag in entry.tags %} 71 {% for tag in entry.tags %}
@@ -79,8 +76,9 @@
79 {% endif %} 76 {% endif %}
80 77
81 <div class="card-action"> 78 <div class="card-action">
82 <span class="bold"> 79 <span class="reading-time grey-text">
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> 80 <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
81 {{ entry.readingTime / app.user.config.readingSpeed }} min
84 </span> 82 </span>
85 83
86 <ul class="tools right"> 84 <ul class="tools right">
@@ -96,6 +94,10 @@
96 {% endfor %} 94 {% endfor %}
97 </ul> 95 </ul>
98 96
97 {% if entries.getNbPages > 1 %}
98 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
99 {% endif %}
100
99 <!-- Export --> 101 <!-- Export -->
100 <div id="export" class="side-nav fixed right-aligned"> 102 <div id="export" class="side-nav fixed right-aligned">
101 {% set currentRoute = app.request.attributes.get('_route') %} 103 {% set currentRoute = app.request.attributes.get('_route') %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
index 5188eb01..c615a907 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
@@ -212,27 +212,38 @@
212 <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> 212 <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
213 </header> 213 </header>
214 <aside> 214 <aside>
215 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} 215 <ul class="tools">
216 <i class="material-icons">timer</i> 216 <li>
217 <span class="link"> 217 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
218 {% if readingTime > 0 %} 218 <i class="material-icons">timer</i>
219 {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }} 219 {% if readingTime > 0 %}
220 {% else %} 220 {{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
221 {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }} 221 {% else %}
222 {% endif %} 222 {{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
223 </span> 223 {% endif %}
224 <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i><span class="link">{{ entry.createdAt|date('Y-m-d') }}</span> 224 </li>
225 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool"> 225 <li>
226 <i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span> 226 <i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i>
227 </a> 227 {{ entry.createdAt|date('Y-m-d') }}
228 <span class="tool"><i class="material-icons link">comment</i></span> <span class="link">{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}</span> 228 </li>
229 <div id="list"> 229 <li>
230 {% for tag in entry.tags %} 230 <i class="material-icons link">link</i>
231 <div class="chip"> 231 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
232 <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> 232 {{ entry.domainName|removeWww }}
233 </div> 233 </a>
234 {% endfor %} 234 </li>
235 </div> 235 <li>
236 <i class="material-icons link">comment</i>
237 {{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}
238 </li>
239 <li id="list">
240 {% for tag in entry.tags %}
241 <div class="chip">
242 <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>
243 </div>
244 {% endfor %}
245 </li>
246 </ul>
236 247
237 <div class="input-field nav-panel-add-tag" style="display: none"> 248 <div class="input-field nav-panel-add-tag" style="display: none">
238 {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} 249 {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/pager.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/pager.html.twig
deleted file mode 100644
index 6f8e60fc..00000000
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/pager.html.twig
+++ /dev/null
@@ -1,10 +0,0 @@
1{% block pager %}
2 <div class="results clearfix">
3 <div class="nb-results left">
4 {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
5 </div>
6 {% if entries.getNbPages > 1 %}
7 {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
8 {% endif %}
9 </div>
10{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
index de0049d3..3469e6a8 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -127,12 +127,12 @@
127 <div class="footer-copyright"> 127 <div class="footer-copyright">
128 <div class="container"> 128 <div class="container">
129 <div class="row"> 129 <div class="row">
130 <div class="col s8"> 130 <div class="col m12 l8 hide-on-small-only">
131 <p> 131 <p title="{{ display_stats() | raw | striptags }}">
132 {{ display_stats() }} 132 {{ display_stats() }}
133 </p> 133 </p>
134 </div> 134 </div>
135 <div class="col s4"> 135 <div class="col s12 l4">
136 <p> 136 <p>
137 {{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a> – 137 {{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a> –
138 <a class="grey-text text-lighten-4" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans|lower }}</a> 138 <a class="grey-text text-lighten-4" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans|lower }}</a>