Spookie/templates/blog/index.html.twig

39 lines
1.6 KiB
Twig
Raw Normal View History

2021-06-01 18:48:20 +02:00
{# templates/blog/blog_show.html.twig #}
2021-05-30 17:34:33 +02:00
{% extends 'base.html.twig' %}
2021-06-01 18:48:20 +02:00
{% block title %} Blogpost {% endblock %}
2021-05-30 17:34:33 +02:00
{% block body %}
2021-06-01 18:48:20 +02:00
<div class="container">
<div class="row">
<!-- blog List -->
<div class="col-sm-12">
{% for blogpost in blogs %}
<div class="blog-container my-4">
<a href="{{ path('blog', { slug: blogpost.slug }) }} ">
{% if blogpost.teaserImage %}
<img class="blog-img" src="{{ asset('build/images/asteroid.jpeg') }}" alt="asteroid">
{% endif %}
<div class="article-title d-inline-block pl-3 align-middle">
<span>{{ blogpost.title }}</span>
</div>
</a>
<br>
<span class="align-left blog-details">
<img class="article-author-img rounded-circle"
src="{{ asset('build/images/alien-profile.png') }}" alt="profile">
{{ blogpost.author }}
</span>
<span class="pl-5 blog-details float-right">{{ blogpost.createdAt|ago }}</span>
<br>
<span class="blog-teaser">
{{ blogpost.teaser }}
</span>
</div>
{% endfor %}
2021-05-30 17:34:33 +02:00
2021-06-01 18:48:20 +02:00
</div>
</div>
</div>
2021-05-30 17:34:33 +02:00
{% endblock %}