mastodon-wall/templates/default/index.html.twig

62 lines
1.4 KiB
Twig
Raw Normal View History

2023-05-17 17:06:51 +02:00
{% extends 'base.html.twig' %}
{% block title %}Hello DefaultController!{% endblock %}
{% block body %}
<style>
.example-wrapper {
margin: 1em auto;
max-width: 800px;
width: 95%;
font: 18px/1.5 sans-serif;
}
.example-wrapper code {
background: #F5F5F5;
padding: 2px 6px;
}
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
le truc par défaut
<h2>
{{ data | length }} Images
</h2>
{{ (data) | length }}
<fieldset>
<h2> liste des images</h2>
{% for img in (data) %}
{# {{ img }}#}
{{ img.media_attachments | length }}
{% for media in img.media_attachments %}
<a href="{{ img.url }}">
<img src="{{ media.preview_url }}" alt="image" class="gallery_img">
<strong>
{{ img.account.acct }}
</strong>
</a>
{% endfor %}
{% endfor %}
</fieldset>
<h2>debug</h2>
{{ dump(data) }}
</div>
<style>
img{
max-width: 90vw;
margin-right: 1em;
margin-bottom: 1em;
width: 600px;
}
</style>
{% endblock %}