From bd9f08157cc10619e9bb9dace6df43090dde44a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 22 Jan 2015 21:11:22 +0100 Subject: article view, fav list, archive list --- .../Resources/views/Entry/entries.html.twig | 43 +++++---- .../Resources/views/Entry/entry.html.twig | 104 +++++++++++++++++++++ src/WallabagBundle/Resources/views/_menu.html.twig | 17 ++++ src/WallabagBundle/Resources/views/_top.html.twig | 3 +- 4 files changed, 147 insertions(+), 20 deletions(-) create mode 100644 src/WallabagBundle/Resources/views/Entry/entry.html.twig create mode 100644 src/WallabagBundle/Resources/views/_menu.html.twig (limited to 'src/WallabagBundle/Resources/views') diff --git a/src/WallabagBundle/Resources/views/Entry/entries.html.twig b/src/WallabagBundle/Resources/views/Entry/entries.html.twig index f4d7a7ab..81177298 100644 --- a/src/WallabagBundle/Resources/views/Entry/entries.html.twig +++ b/src/WallabagBundle/Resources/views/Entry/entries.html.twig @@ -2,25 +2,32 @@ {% block title "Unread" %} -{% block content_header '' %} +{% block menu %} + {% include "WallabagBundle::_menu.html.twig" %} +{% endblock %} {% block content %} - {% for entry in entries %} -
-

{{ entry.title|raw }}

- {% if entry.content| readingTime > 0 %} -
{% trans %}estimated reading time :{% endtrans %} {{ entry.content| readingTime }} min
- {% else %} -
{% trans %}estimated reading time :{% endtrans %} < 1 min
- {% endif %} - -

{{ entry.content|striptags|slice(0, 300) }}...

-
- {% endfor %} + {% if entries is empty %} +

{% trans %}No articles found.{% endtrans %}

+ {% else %} + {% for entry in entries %} +
+

{{ entry.title|raw }}

+ {% if entry.content| readingTime > 0 %} +
{% trans %}estimated reading time :{% endtrans %} {{ entry.content| readingTime }} min
+ {% else %} +
{% trans %}estimated reading time :{% endtrans %} < 1 min
+ {% endif %} + + +

{{ entry.content|striptags|slice(0, 300) }}...

+
+ {% endfor %} + {% endif %} {% endblock %} diff --git a/src/WallabagBundle/Resources/views/Entry/entry.html.twig b/src/WallabagBundle/Resources/views/Entry/entry.html.twig new file mode 100644 index 00000000..19d4650e --- /dev/null +++ b/src/WallabagBundle/Resources/views/Entry/entry.html.twig @@ -0,0 +1,104 @@ +{% extends "WallabagBundle::layout.html.twig" %} + +{% block title %}{{ entry.title|raw }} ({{ entry.url | e | domainName }}){% endblock %} + +{% block menu %} + {% include "WallabagBundle::_menu.html.twig" %} +{% endblock %} + +{% block content %} +
+ +
+
+
+

{{ entry.title|raw }}

+
+ +
+ {{ entry.content | raw }} +
+
+ + +{% endblock %} \ No newline at end of file diff --git a/src/WallabagBundle/Resources/views/_menu.html.twig b/src/WallabagBundle/Resources/views/_menu.html.twig new file mode 100644 index 00000000..b001aec5 --- /dev/null +++ b/src/WallabagBundle/Resources/views/_menu.html.twig @@ -0,0 +1,17 @@ + + + diff --git a/src/WallabagBundle/Resources/views/_top.html.twig b/src/WallabagBundle/Resources/views/_top.html.twig index 576df806..34d925df 100755 --- a/src/WallabagBundle/Resources/views/_top.html.twig +++ b/src/WallabagBundle/Resources/views/_top.html.twig @@ -1,6 +1,5 @@

- {% block logo %}wallabag logo{% endblock %} - + {% block logo %}wallabag logo{% endblock %}

-- cgit v1.2.3