aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-10-16 11:51:38 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-10-22 13:08:04 +0200
commit34aa06a9b9c9bc6cdfb61607b2def8e1fc861b76 (patch)
tree482d734a8e8c9a6717adee8743ca4fefb0c16af4 /src/Wallabag
parentf99ddbc6f82b0e5619d51ec4415738bf34d350b6 (diff)
downloadwallabag-34aa06a9b9c9bc6cdfb61607b2def8e1fc861b76.tar.gz
wallabag-34aa06a9b9c9bc6cdfb61607b2def8e1fc861b76.tar.zst
wallabag-34aa06a9b9c9bc6cdfb61607b2def8e1fc861b76.zip
WIP
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig30
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig53
2 files changed, 42 insertions, 41 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 919f94ec..d0786936 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,7 +9,7 @@
9 <br /> 9 <br />
10 <ul class="row data"> 10 <ul class="row data">
11 {% for entry in entries %} 11 {% for entry in entries %}
12 <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> 12 <li id="entry-{{ entry.id|e }}" class="col l3 m6 s12">
13 <div class="card"> 13 <div class="card">
14 14
15 <div class="card-body"> 15 <div class="card-body">
@@ -26,20 +26,15 @@
26 26
27 <div class="card-content"> 27 <div class="card-content">
28 {% if not entry.previewPicture is null %} 28 {% if not entry.previewPicture is null %}
29 <i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i> 29 <i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
30 {% endif %} 30 {% endif %}
31 31
32 <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> 32 <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>
33 33
34 <div class="estimatedTime grey-text"> 34 <div class="original grey-text">
35 <span class="tool reading-time"> 35 <a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.list.original_article'|trans }}: {{ entry.title|e }} - {{ entry.domainName|removeWww }}" class="tool original grey-text">
36 {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} 36 <span>{{ entry.domainName|removeWww|truncate(18) }}</span>
37 {% if readingTime > 0 %} 37 </a>
38 {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
39 {% else %}
40 {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
41 {% endif %}
42 </span>
43 </div> 38 </div>
44 39
45 {% if entry.previewPicture is null %} 40 {% if entry.previewPicture is null %}
@@ -55,15 +50,9 @@
55 50
56 {% if not entry.previewPicture is null %} 51 {% if not entry.previewPicture is null %}
57 <div class="card-reveal"> 52 <div class="card-reveal">
58 <i class="card-title grey-text text-darken-4 material-icons right">clear</i> 53 <i class="card-title activator grey-text text-darken-4 material-icons right">clear</i>
59 <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> 54 <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span>
60 55
61 <div class="estimatedTime grey-text">
62 <span class="tool reading-time">
63 {% if readingTime > 0 %}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}{% else %}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{% endif %}
64 </span>
65 </div>
66
67 <p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p> 56 <p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p>
68 57
69 <ul class="card-entry-labels-hidden"> 58 <ul class="card-entry-labels-hidden">
@@ -75,8 +64,9 @@
75 {% endif %} 64 {% endif %}
76 65
77 <div class="card-action"> 66 <div class="card-action">
78 <span class="bold"> 67 <span class="reading-time grey-text">
79 <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> 68 <i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
69 {{ entry.readingTime / app.user.config.readingSpeed }} min
80 </span> 70 </span>
81 71
82 <ul class="tools right"> 72 <ul class="tools right">
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 } )) }}