diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views')
9 files changed, 39 insertions, 83 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 12cead48..27c8e8a2 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 | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | {% for entry in entries %} | 39 | {% for entry in entries %} |
40 | <div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}"> | 40 | <div id="entry-{{ entry.id|e }}" class="{% if listMode == 0 %}entry{% else %}listmode entry{% endif %}"> |
41 | <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title|e|raw }}</a></h2> | 41 | <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|e|raw }}">{{ entry.title | striptags | truncate(80, true, '…') | raw | default('entry.default_title'|trans) }}</a></h2> |
42 | 42 | ||
43 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} | 43 | {% set readingTime = entry.readingTime / app.user.config.readingSpeed %} |
44 | <div class="estimatedTime"> | 44 | <div class="estimatedTime"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 7ff24dfd..f18e32ca 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig | |||
@@ -1,11 +1,11 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ entry.title|e|raw }} ({{ entry.domainName|removeWww }}){% endblock %} | 3 | {% block title %}{{ entry.title|e|raw|default('entry.default_title'|trans) }} ({{ entry.domainName|removeWww }}){% endblock %} |
4 | 4 | ||
5 | {% block content %} | 5 | {% block content %} |
6 | <div id="article"> | 6 | <div id="article"> |
7 | <header class="mbm"> | 7 | <header class="mbm"> |
8 | <h1>{{ entry.title|e|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> | 8 | <h1>{{ entry.title|e|raw |default('entry.default_title'|trans) }} <a href="{{ path('edit', { 'id': entry.id }) }}" class="nostyle" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> |
9 | </header> | 9 | </header> |
10 | 10 | ||
11 | <div id="article_toolbar"> | 11 | <div id="article_toolbar"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig new file mode 100644 index 00000000..ab7295d5 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/Card/_content.html.twig | |||
@@ -0,0 +1,15 @@ | |||
1 | <div class="card-content"> | ||
2 | {% if withPreview is defined %} | ||
3 | <i class="grey-text text-darken-4 activator material-icons right">more_vert</i> | ||
4 | {% endif %} | ||
5 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title| striptags | e('html_attr') }}" class="card-title dot-ellipsis dot-resize-update"> | ||
6 | {{ entry.title | striptags | truncate(80, true, '…') | raw | default('entry.default_title'|trans) }} | ||
7 | </a> | ||
8 | |||
9 | <div class="{{ subClass|default('original grey-text') }}"> | ||
10 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a> | ||
11 | {% if withTags is defined %} | ||
12 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'listClass': ' hide-on-med-and-down'} only %} | ||
13 | {% endif %} | ||
14 | </div> | ||
15 | </div> | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig index a4958b58..ceb95381 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_full_image.html.twig | |||
@@ -10,20 +10,7 @@ | |||
10 | <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span> | 10 | <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span> |
11 | </a> | 11 | </a> |
12 | </div> | 12 | </div> |
13 | 13 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %} | |
14 | <div class="card-content"> | ||
15 | <span class="card-title dot-ellipsis dot-resize-update"> | ||
16 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title| striptags | e('html_attr') }}"> | ||
17 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} | ||
18 | </a> | ||
19 | </span> | ||
20 | |||
21 | <div class="original grey-text"> | ||
22 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text"> | ||
23 | <span>{{ entry.domainName|removeWww }}</span> | ||
24 | </a> | ||
25 | </div> | ||
26 | </div> | ||
27 | </div> | 14 | </div> |
28 | 15 | ||
29 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} | 16 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} |
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 08f5b0e2..7c83c3bb 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 | |||
@@ -6,24 +6,7 @@ | |||
6 | </a> | 6 | </a> |
7 | {% endif %} | 7 | {% endif %} |
8 | </div> | 8 | </div> |
9 | <div class="card-content"> | 9 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %} |
10 | <span class="card-title dot-ellipsis dot-resize-update"> | ||
11 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> | ||
12 | {{ entry.title| striptags | truncate(120, true, '…') | raw }} | ||
13 | </a> | ||
14 | </span> | ||
15 | |||
16 | <div class="metadata"> | ||
17 | <a href="{{ entry.url|e }}" class="grey-text domain" target="_blank" title="{{ entry.domainName|removeWww }}"> | ||
18 | <span>{{ entry.domainName|removeWww }}</span> | ||
19 | </a> | ||
20 | {% for tag in entry.tags | slice(0, 3) %} | ||
21 | <span class="chip hide-on-med-and-down"> | ||
22 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
23 | </span> | ||
24 | {% endfor %} | ||
25 | </div> | ||
26 | </div> | ||
27 | <ul class="tools-list hide-on-small-only"> | 10 | <ul class="tools-list hide-on-small-only"> |
28 | <li> | 11 | <li> |
29 | <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 %}unarchive{% endif %}</i></a> | 12 | <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 %}unarchive{% endif %}</i></a> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig index eb158659..8e6bbae0 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_no_preview.html.twig | |||
@@ -1,25 +1,6 @@ | |||
1 | <div class="card"> | 1 | <div class="card"> |
2 | <div class="card-body"> | 2 | <div class="card-body"> |
3 | <div class="card-content"> | 3 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry} only %} |
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') }}"> | ||
6 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} | ||
7 | </a> | ||
8 | </span> | ||
9 | |||
10 | <div class="original grey-text"> | ||
11 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text"> | ||
12 | <span>{{ entry.domainName|removeWww }}</span> | ||
13 | </a> | ||
14 | </div> | ||
15 | |||
16 | <p>{{ entry.content|striptags|slice(0, 250)|raw }}…</p> | ||
17 | <ul class="card-entry-labels-hidden"> | ||
18 | {% for tag in entry.tags | slice(0, 2) %} | ||
19 | <li><a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a></li> | ||
20 | {% endfor %} | ||
21 | </ul> | ||
22 | </div> | ||
23 | </div> | 4 | </div> |
24 | 5 | ||
25 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} | 6 | {% include "@WallabagCore/themes/material/Entry/_card_actions.html.twig" with {'entry': entry} only %} |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig index c77e716b..e93646dc 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_card_preview.html.twig | |||
@@ -10,22 +10,7 @@ | |||
10 | <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span> | 10 | <span class="preview" style="background-image: url({{ entry.previewPicture }})"></span> |
11 | </a> | 11 | </a> |
12 | </div> | 12 | </div> |
13 | 13 | {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withPreview': true} only %} | |
14 | <div class="card-content"> | ||
15 | <i class="grey-text text-darken-4 activator material-icons right">more_vert</i> | ||
16 | |||
17 | <span class="card-title dot-ellipsis dot-resize-update"> | ||
18 | <a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title | striptags | e('html_attr') }}"> | ||
19 | {{ entry.title | striptags | truncate(80, true, '…') | raw }} | ||
20 | </a> | ||
21 | </span> | ||
22 | |||
23 | <div class="original grey-text"> | ||
24 | <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool original grey-text"> | ||
25 | <span>{{ entry.domainName|removeWww }}</span> | ||
26 | </a> | ||
27 | </div> | ||
28 | </div> | ||
29 | </div> | 14 | </div> |
30 | 15 | ||
31 | <div class="card-reveal"> | 16 | <div class="card-reveal"> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig new file mode 100644 index 00000000..144a105e --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/_tags.html.twig | |||
@@ -0,0 +1,14 @@ | |||
1 | {% if tags is iterable and tags is not empty %} | ||
2 | <ul class="tags{{ listClass|default("")}}"> | ||
3 | {% for tag in tags %} | ||
4 | <li class="chip"> | ||
5 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
6 | {% if withRemove %} | ||
7 | <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')"> | ||
8 | <i class="material-icons vertical-align-middle">delete</i> | ||
9 | </a> | ||
10 | {% endif %} | ||
11 | </li> | ||
12 | {% endfor %} | ||
13 | </ul> | ||
14 | {% endif %} | ||
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 86588a7b..bebe29a2 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 | |||
@@ -1,6 +1,6 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "WallabagCoreBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{{ entry.title|striptags|raw }} ({{ entry.domainName|removeWww }}){% endblock %} | 3 | {% block title %}{{ entry.title|striptags|raw|default('entry.default_title'|trans) }} ({{ entry.domainName|removeWww }}){% endblock %} |
4 | 4 | ||
5 | {% block body_class %}entry{% endblock %} | 5 | {% block body_class %}entry{% endblock %} |
6 | 6 | ||
@@ -223,7 +223,7 @@ | |||
223 | {% block content %} | 223 | {% block content %} |
224 | <div id="article"> | 224 | <div id="article"> |
225 | <header class="mbm"> | 225 | <header class="mbm"> |
226 | <h1>{{ entry.title|striptags|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> | 226 | <h1>{{ entry.title|striptags|raw|default('entry.default_title'|trans) }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{{ 'entry.view.edit_title'|trans }}">✎</a></h1> |
227 | </header> | 227 | </header> |
228 | <aside> | 228 | <aside> |
229 | <div class="tools"> | 229 | <div class="tools"> |
@@ -268,16 +268,7 @@ | |||
268 | </li> | 268 | </li> |
269 | {% endif %} | 269 | {% endif %} |
270 | </ul> | 270 | </ul> |
271 | <ul class="tags"> | 271 | {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags, 'withRemove': true} only %} |
272 | {% for tag in entry.tags %} | ||
273 | <li class="chip"> | ||
274 | <a href="{{ path('tag_entries', {'slug': tag.slug}) }}">{{ tag.label }}</a> | ||
275 | <a href="{{ path('remove_tag', { 'entry': entry.id, 'tag': tag.id }) }}" onclick="return confirm('{{ 'entry.confirm.delete_tag'|trans|escape('js') }}')"> | ||
276 | <i class="material-icons vertical-align-middle">delete</i> | ||
277 | </a> | ||
278 | </li> | ||
279 | {% endfor %} | ||
280 | </ul> | ||
281 | </div> | 272 | </div> |
282 | 273 | ||
283 | <div class="input-field nav-panel-add-tag" style="display: none"> | 274 | <div class="input-field nav-panel-add-tag" style="display: none"> |