mastodon wall style
This commit is contained in:
parent
b94d2d303d
commit
0315defb21
@ -11,12 +11,9 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="f0e1128e-d3f4-4b56-88a7-ef7c80dc164c" name="Default Changelist" comment="">
|
<list default="true" id="f0e1128e-d3f4-4b56-88a7-ef7c80dc164c" name="Default Changelist" comment="">
|
||||||
<change afterPath="$PROJECT_DIR$/.idea/php.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/.idea/sf-webapp.iml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/Controller/DefaultController.php" beforeDir="false" afterPath="$PROJECT_DIR$/src/Controller/DefaultController.php" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/Controller/DefaultController.php" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/templates/default/index.html.twig" beforeDir="false" afterPath="$PROJECT_DIR$/templates/default/index.html.twig" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/templates/default/index.html.twig" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/composer.json" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/composer.lock" beforeDir="false" afterPath="$PROJECT_DIR$/composer.lock" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -202,7 +199,7 @@
|
|||||||
<option name="number" value="Default" />
|
<option name="number" value="Default" />
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1684327639044</updated>
|
<updated>1684327639044</updated>
|
||||||
<workItem from="1684327640262" duration="7261000" />
|
<workItem from="1684327640262" duration="8472000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
@ -12,8 +12,10 @@ class DefaultController extends AbstractController
|
|||||||
public function index(): Response
|
public function index(): Response
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// TODO merge all these post list and deduplicate them
|
||||||
$url = "https://mastodon.cipherbliss.com/api/v1/timelines/public?remote=false&allow_local_only=true&only_media=true";
|
$url = "https://mastodon.cipherbliss.com/api/v1/timelines/public?remote=false&allow_local_only=true&only_media=true";
|
||||||
// $url = "https://mastodon.cipherbliss.com/api/v1/timelines/tag/art&only_media=true";
|
$url = "https://mastodon.cipherbliss.com/api/v1/timelines/tag/art";
|
||||||
|
$url = "https://mastodon.cipherbliss.com/api/v1/timelines/tag/mastoart";
|
||||||
|
|
||||||
$client = new \GuzzleHttp\Client();
|
$client = new \GuzzleHttp\Client();
|
||||||
$response = $client->request('GET', $url );
|
$response = $client->request('GET', $url );
|
||||||
|
@ -6,52 +6,76 @@
|
|||||||
<style>
|
<style>
|
||||||
.example-wrapper {
|
.example-wrapper {
|
||||||
margin: 1em auto;
|
margin: 1em auto;
|
||||||
max-width: 800px;
|
max-width: 1600px;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
font: 18px/1.5 sans-serif;
|
font: 18px/1.5 sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.example-wrapper img {
|
||||||
|
width: 100%;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
.example-wrapper strong {
|
||||||
|
float: left;
|
||||||
|
margin-top: -4em;
|
||||||
|
position: relative;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: rgba(0, 0, 0, .7);
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
.example-wrapper code {
|
.example-wrapper code {
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
}
|
}
|
||||||
|
a{
|
||||||
|
float:left;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
a:hover strong{
|
||||||
|
color: #ddd;
|
||||||
|
background: rgba(0, 0, 0, .7);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="example-wrapper">
|
<div class="example-wrapper">
|
||||||
<h1>Hello {{ controller_name }}! ✅</h1>
|
<h1>Découverte d'artistes sur mastodon</h1>
|
||||||
|
|
||||||
le truc par défaut
|
|
||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
|
|
||||||
{{ data | length }} Images
|
{{ data | length }} Images
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{ (data) | length }}
|
{# {{ (data) | length }}#}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
||||||
<h2> liste des images</h2>
|
<h2> liste des images</h2>
|
||||||
{% for img in (data) %}
|
{% for img in (data) %}
|
||||||
{# {{ img }}#}
|
{# {{ img }}#}
|
||||||
{{ img.media_attachments | length }}
|
{# {{ img.media_attachments | length }}#}
|
||||||
{% for media in img.media_attachments %}
|
{% for media in img.media_attachments %}
|
||||||
<a href="{{ img.url }}">
|
<a href="{{ img.url }}">
|
||||||
|
<figure>
|
||||||
|
|
||||||
<img src="{{ media.preview_url }}" alt="image" class="gallery_img">
|
|
||||||
|
<img src="{{ media.preview_url }}" alt="image" class="gallery_img /">
|
||||||
<strong>
|
<strong>
|
||||||
{{ img.account.acct }}
|
{{ img.account.acct }}
|
||||||
</strong>
|
</strong>
|
||||||
|
</figure>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<h2>debug</h2>
|
{# <h2>debug</h2>#}
|
||||||
{{ dump(data) }}
|
{# {{ dump(data) }}#}
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
img{
|
img {
|
||||||
max-width: 90vw;
|
max-width: 90vw;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
Loading…
Reference in New Issue
Block a user