1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-26 18:21:02 +00:00
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2016-10-16 11:51:38 +02:00 committed by Jeremy Benoist
parent f99ddbc6f8
commit 34aa06a9b9
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
5 changed files with 134 additions and 59 deletions

View file

@ -9,7 +9,7 @@
<br />
<ul class="row data">
{% for entry in entries %}
<li id="entry-{{ entry.id|e }}" class="col l4 m6 s12">
<li id="entry-{{ entry.id|e }}" class="col l3 m6 s12">
<div class="card">
<div class="card-body">
@ -26,20 +26,15 @@
<div class="card-content">
{% if not entry.previewPicture is null %}
<i class="card-title grey-text text-darken-4 activator material-icons right">more_vert</i>
<i class="grey-text text-darken-4 activator material-icons right">more_vert</i>
{% endif %}
<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>
<div class="estimatedTime grey-text">
<span class="tool reading-time">
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
{% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
{% else %}
{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
{% endif %}
</span>
<div class="original grey-text">
<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>
</div>
{% if entry.previewPicture is null %}
@ -55,15 +50,9 @@
{% if not entry.previewPicture is null %}
<div class="card-reveal">
<i class="card-title grey-text text-darken-4 material-icons right">clear</i>
<i class="card-title activator grey-text text-darken-4 material-icons right">clear</i>
<span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span>
<div class="estimatedTime grey-text">
<span class="tool reading-time">
{% if readingTime > 0 %}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}{% else %}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{% endif %}
</span>
</div>
<p>{{ entry.content|striptags|slice(0, 300)|raw }}&hellip;</p>
<ul class="card-entry-labels-hidden">
@ -75,8 +64,9 @@
{% endif %}
<div class="card-action">
<span class="bold">
<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>
<span class="reading-time grey-text">
<i class="material-icons" title="{{ 'entry.list.reading_time'|trans }}">timer</i>
{{ entry.readingTime / app.user.config.readingSpeed }} min
</span>
<ul class="tools right">

View file

@ -212,27 +212,38 @@
<h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1>
</header>
<aside>
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
<i class="material-icons">timer</i>
<span class="link">
{% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
{% else %}
{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
{% endif %}
</span>
<i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i><span class="link">{{ entry.createdAt|date('Y-m-d') }}</span>
<a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
<i class="material-icons link">link</i> <span class="link">{{ entry.domainName|removeWww }}</span>
</a>
<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>
<div id="list">
{% for tag in entry.tags %}
<div class="chip">
<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>
</div>
{% endfor %}
</div>
<ul class="tools">
<li>
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
<i class="material-icons">timer</i>
{% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes_short'|trans({'%readingTime%': readingTime|round}) }}
{% else %}
{{ 'entry.list.reading_time_less_one_minute_short'|trans|raw }}
{% endif %}
</li>
<li>
<i class="material-icons" title="{{ 'entry.view.created_at'|trans }}">today</i>
{{ entry.createdAt|date('Y-m-d') }}
</li>
<li>
<i class="material-icons link">link</i>
<a href="{{ entry.url|e }}" target="_blank" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e }}" class="tool">
{{ entry.domainName|removeWww }}
</a>
</li>
<li>
<i class="material-icons link">comment</i>
{{ 'entry.view.annotations_on_the_entry'|transchoice(entry.annotations | length) }}
</li>
<li id="list">
{% for tag in entry.tags %}
<div class="chip">
<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>
</div>
{% endfor %}
</li>
</ul>
<div class="input-field nav-panel-add-tag" style="display: none">
{{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}