From: Raphaƫl Gertz Date: Sun, 25 Feb 2018 05:28:04 +0000 (+0100) Subject: Switch from hello world page to new index X-Git-Tag: 0.1~50 X-Git-Url: https://git.rapsys.eu/blogbundle/commitdiff_plain/d0154ce723171034c1c33a23238f1ab08cefe2bf Switch from hello world page to new index --- 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 %}