diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | 53 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | 111 |
2 files changed, 164 insertions, 0 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 new file mode 100644 index 00000000..f68eec12 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig | |||
@@ -0,0 +1,53 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title "Unread" %} | ||
4 | |||
5 | {% block content %} | ||
6 | {% block pager %} | ||
7 | {% if entries is not empty %} | ||
8 | <div class="results clearfix"> | ||
9 | <div class="nb-results left">{{ entries.count }} {% trans %}entries{% endtrans %}</div> | ||
10 | <ul class="pagination right"> | ||
11 | {% for p in range(1, entries.nbPages) %} | ||
12 | <li class="{{ currentPage == p ? 'active':'waves-effect'}}"> | ||
13 | <a href="{{ path(app.request.attributes.get('_route'), {'page': p}) }}" >{{ p }}</a> | ||
14 | </li> | ||
15 | {% endfor %} | ||
16 | </div> | ||
17 | </div> | ||
18 | {% endif %} | ||
19 | {% endblock %} | ||
20 | <br> | ||
21 | {% if entries is empty %} | ||
22 | <div class="messages warning"><p>{% trans %}No articles found.{% endtrans %}</p></div> | ||
23 | {% else %} | ||
24 | <ul class="row"> | ||
25 | {% for entry in entries %} | ||
26 | <li id="entry-{{ entry.id|e }}" class="col l4 m6 s12"> | ||
27 | <div class="card"> | ||
28 | <div class="card-content"> | ||
29 | <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></span> | ||
30 | {% if entry.content| readingTime > 0 %} | ||
31 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} {{ entry.content| readingTime }} min</span></div> | ||
32 | {% else %} | ||
33 | <div class="estimatedTime grey-text"><span class="tool reading-time">{% trans %}estimated reading time: {% endtrans %} <small class="inferieur"><</small> 1 min</span></div> | ||
34 | {% endif %} | ||
35 | <p>{{ entry.content|striptags|slice(0, 300) }}...</p> | ||
36 | </div> | ||
37 | <div class="card-action"> | ||
38 | <span class="bold"><a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %}: {{ entry.title|e }}" class="tool original grey-text"><span>{{ entry.url | e | domainName }}</span></a></bold> | ||
39 | |||
40 | <ul class="tools links right"> | ||
41 | <li> | ||
42 | <a title="{% trans %}Toggle mark as read{% endtrans %}" class="tool grey-text {% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"></a> | ||
43 | <a title="{% trans %}toggle favorite{% endtrans %}" class="tool grey-text {% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %}" href="{{ path('star_entry', { 'id': entry.id }) }}"></a> | ||
44 | <a title="{% trans %}delete{% endtrans %}" class="tool grey-text delete mdi-action-delete " href="{{ path('delete_entry', { 'id': entry.id }) }}"></a> | ||
45 | </li> | ||
46 | </ul> | ||
47 | </div> | ||
48 | </div> | ||
49 | </li> | ||
50 | {% endfor %} | ||
51 | </ul> | ||
52 | {% endif %} | ||
53 | {% endblock %} | ||
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 new file mode 100644 index 00000000..bbff8c47 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | |||
@@ -0,0 +1,111 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ entry.title|raw }} ({{ entry.url | e | domainName }}){% endblock %} | ||
4 | |||
5 | {% block menu %} | ||
6 | <ul style="width: 240px; left: 0px;" id="slide-out" class="collapsible side-nav fixed reader-mode" data-collapsible="accordion"> | ||
7 | <li class="bold border-bottom"> | ||
8 | <a class="waves-effect collapsible-header" href="/"> | ||
9 | <i class="mdi-action-exit-to-app small"></i> | ||
10 | <span>{% trans %}back{% endtrans %}</span> | ||
11 | </a> | ||
12 | <div class="collapsible-body"></div> | ||
13 | </li> | ||
14 | |||
15 | <li class="bold"> | ||
16 | <a class="waves-effect collapsible-header" title="{% trans %}Mark as read{% endtrans %}" href="{{ path('archive_entry', { 'id': entry.id }) }}" id="markAsRead"> | ||
17 | <i class="{% if entry.isArchived == 0 %}mdi-action-done{% else %}mdi-content-redo{% endif %} small"></i> | ||
18 | <span>{% trans %}Toggle mark as read{% endtrans %}</span> | ||
19 | </a> | ||
20 | <div class="collapsible-body"></div> | ||
21 | </li> | ||
22 | |||
23 | <li class="bold"> | ||
24 | <a class="waves-effect collapsible-header" title="{% trans %}Favorite{% endtrans %}" href="{{ path('star_entry', { 'id': entry.id }) }}" id="setFav"> | ||
25 | <i class="{% if entry.isStarred == 0 %}mdi-action-favorite-outline{% else %}mdi-action-favorite{% endif %} small"></i> | ||
26 | <span>{% trans %}Toggle favorite{% endtrans %}</span> | ||
27 | </a> | ||
28 | <div class="collapsible-body"></div> | ||
29 | </li> | ||
30 | <li class="bold border-bottom"> | ||
31 | <a class="waves-effect collapsible-header" title="{% trans %}Delete{% endtrans %}" href="{{ path('delete_entry', { 'id': entry.id }) }}"> | ||
32 | <i class="mdi-action-delete small"></i> | ||
33 | <span>{% trans %}Delete{% endtrans %}</span> | ||
34 | </a> | ||
35 | <div class="collapsible-body"></div> | ||
36 | </li> | ||
37 | |||
38 | <li class="bold"> | ||
39 | <a class="waves-effect collapsible-header"> | ||
40 | <i class="mdi-social-share small"></i> | ||
41 | <span>{% trans %}Share{% endtrans %}</span> | ||
42 | </a> | ||
43 | <div class="collapsible-body"> | ||
44 | <ul> | ||
45 | {% if share_twitter %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans %}Tweet{% endtrans %}"><span>{% trans %}Tweet{% endtrans %}</span></a></li>{% endif %} | ||
46 | {% if share_shaarli %}<li><a href="{{ shaarli_url }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans %}shaarli{% endtrans %}"><span>{% trans %}shaarli{% endtrans %}</span></a></li>{% endif %} | ||
47 | {% if share_diaspora %}<li><a href="{{ diaspora_url }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}¬es=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="{% trans %}diaspora{% endtrans %}"><span>{% trans %}diaspora{% endtrans %}</span></a></li>{% endif %} | ||
48 | {# {% if flattr %}{% if flattr.status == flattrable %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans %}flattr{% endtrans %}"><span>{% trans %}flattr{% endtrans %}</span></a></li>{% elseif flattr.status == flattred %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans %}flattr{% endtrans %}><span>{% trans %}flattr{% endtrans %}</span> ({{ flattr.numFlattrs }})</a></li>{% endif %}{% endif %} #} | ||
49 | {% if carrot %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="{% trans %}carrot{% endtrans %}"><span>Carrot</span></a></li>{% endif %} | ||
50 | {% if share_mail %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans %}Email{% endtrans %}"><span>{% trans %}Email{% endtrans %}</span></a></li>{% endif %} | ||
51 | </ul> | ||
52 | </div> | ||
53 | </li> | ||
54 | |||
55 | <li class="bold"> | ||
56 | <a class="waves-effect collapsible-header"> | ||
57 | <i class="mdi-file-file-download small"></i> | ||
58 | <span>{% trans %}Download{% endtrans %}</span> | ||
59 | </a> | ||
60 | <div class="collapsible-body"> | ||
61 | <ul> | ||
62 | {% if export_epub %}<li><a href="?epub&method=id&value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %} | ||
63 | {% if export_mobi %}<li><a href="?mobi&method=id&value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %} | ||
64 | {% if export_pdf %}<li><a href="?pdf&method=id&value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %} | ||
65 | </ul> | ||
66 | </div> | ||
67 | </li> | ||
68 | |||
69 | <li class="bold"> | ||
70 | <a class="waves-effect collapsible-header" href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&body={{ entry.url|url_encode }}" title="{% trans %}Does this article appear wrong?{% endtrans %}"> | ||
71 | <i class="mdi-alert-error small"></i> | ||
72 | <span>{% trans %}Problems?{% endtrans %}</span> | ||
73 | </a> | ||
74 | <div class="collapsible-body"></div> | ||
75 | </li> | ||
76 | |||
77 | </ul> | ||
78 | |||
79 | <script> | ||
80 | $(document).ready(function(){ | ||
81 | $('.collapsible').collapsible({ | ||
82 | accordion : false | ||
83 | }); | ||
84 | }); | ||
85 | </script> | ||
86 | |||
87 | </script> | ||
88 | <style> | ||
89 | main { | ||
90 | padding: 0; | ||
91 | } | ||
92 | </style> | ||
93 | {% endblock %} | ||
94 | |||
95 | {% block content %} | ||
96 | <div id="article"> | ||
97 | <header class="mbm"> | ||
98 | <h1>{{ entry.title|raw }} <a href="{{ path('edit', { 'id': entry.id }) }}" title="{% trans %}Edit tags{% endtrans %}">✎</a></h1> | ||
99 | <a href="{{ entry.url|e }}" target="_blank" title="{% trans %}original{% endtrans %} : {{ entry.title|e }}" class="tool link"><span>{{ entry.url | e | domainName }}</span></a> | ||
100 | </header> | ||
101 | <aside class="tags"> | ||
102 | tags: {% for tag in entry.tags %}<a href="./?view=tag&id={{ tag.id }}">{{ tag.label }}</a> {% endfor %}<a href="./?view=edit-tags&id={{ entry.id }}" title="{% trans %}Edit tags{% endtrans %}">✎</a> | ||
103 | </aside> | ||
104 | <article> | ||
105 | {{ entry.content | raw }} | ||
106 | </article> | ||
107 | </div> | ||
108 | {% endblock %} | ||
109 | |||
110 | {% block footer %} | ||
111 | {% endblock %} \ No newline at end of file | ||