1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Blog/templates/home/index.html.twig

20 lines
752 B
Twig
Raw Normal View History

2021-01-14 12:02:10 +01:00
{% extends 'base.html.twig' %}
{% block title %}Hello HomeController!{% endblock %}
{% block body %}
2021-01-14 13:24:19 +01:00
<h1 class="text-center">Last 5 posts</h1>
<div class="container-fluid justify-content-center">
{% for post in posts %}
<div class="card text-center">
<div class="card-body">
<h5 class="card-title">{{ post.title }}</h5>
<p class="card-text">{{ post.description }}</p>
<a href="{{ path('post', {slug: post.slug}) }}" class="btn btn-primary">Read more</a>
</div>
<div class="card-footer text-muted">{{ post.publishedAt.format('Y-m-d H:i:s') }}</div>
</div>
{% endfor %}
</div>
2021-01-14 12:02:10 +01:00
{% endblock %}