1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 00:05:29 +00:00

Update admin user view, improve previews

This commit is contained in:
Daniel Supernault 2023-07-16 04:23:41 -06:00
parent 3590adbd87
commit ff2c16fe74
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -140,10 +140,15 @@
<p class="title h4 font-weight-bold mt-2 py-2">Recent Posts</p>
<hr>
<div class="row">
@foreach($profile->statuses()->whereHas('media')->latest()->take(9)->get() as $item)
<div class="col-12 col-md-4 col-sm-6 px-0" style="margin-bottom: 1px;">
@foreach($profile->statuses()->whereHas('media')->latest()->take(16)->get() as $item)
@php($post = \App\Services\StatusService::get($item->id, false))
<div class="col-12 col-md-3 col-sm-6 mb-3 px-0">
<a href="{{$item->url()}}">
<img src="{{$item->thumb(true)}}" width="200px" height="200px">
@if($post)
<img src="{{$post['media_attachments'][0]['url']}}" width="200px" height="200px" style="object-fit: cover;" onerror="this.src='/storage/no-preview.png';this.onerror=null;">
@else
<img src="/storage/no-preview.png" width="200px" height="200px">
@endif
</a>
</div>
@endforeach