From d0154ce723171034c1c33a23238f1ab08cefe2bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 25 Feb 2018 06:28:04 +0100 Subject: [PATCH 1/1] Switch from hello world page to new index --- Resources/views/index.html.twig | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/Resources/views/index.html.twig b/Resources/views/index.html.twig index a32a0ca..0036a4e 100644 --- a/Resources/views/index.html.twig +++ b/Resources/views/index.html.twig @@ -1,3 +1,28 @@ {% extends 'RapsysBlogBundle::body.html.twig' %} -{% block title %}Welcome!{% endblock %} -{% block content %}Hello world !{% endblock %} +{% block content %} +
+

{% trans %}Articles list{% endtrans %}

+ {% for article in articles %} +
+
+

{{article.title}}

+

+ {% trans with {'%date%': article.created|localizeddate('full', 'short')} %}Published the %date%{% endtrans %}{% if article.created != article.updated %}{% trans with {'%date%': article.updated|localizeddate('short', 'short')} %}, edited the %date%{% endtrans %}{% endif %} + {% if article.keywords %} + + {% transchoice article.keywords|length %}{1} Keyword:|]1,Inf[ Keywords:{% endtranschoice %} + {% for slug, keyword in article.keywords %} + {{ keyword }} + {% endfor %} + + {% endif %} +

+
+

{{article.description}}

+ +
+ {% endfor %} +
+{% endblock %} -- 2.41.1