mirror of https://git.stjo.hn/planiverse
Display reblogs
Made statuses a recursive component so we can display reblogs correctly.
This commit is contained in:
parent
b5f39c096a
commit
0143d70112
|
@ -0,0 +1,33 @@
|
|||
<div class="status">
|
||||
<div class="tooltip">
|
||||
<a href="{{ $status['account']['url'] }}">
|
||||
<img
|
||||
src="{{ $status['account']['avatar'] }}"
|
||||
alt="{{ $status['account']['acct'] }}"
|
||||
class="avatar"
|
||||
/>
|
||||
{{ $status['account']['display_name'] }}
|
||||
</a>
|
||||
<span class="tooltiptext">{{ $status['account']['acct'] }}</span>
|
||||
</div>
|
||||
@if ($status['reblog'] === null)
|
||||
<p>{!! $status['content'] !!}</p>
|
||||
@foreach ($status['media_attachments'] as $attachment)
|
||||
@if ($attachment['type'] === 'image')
|
||||
<p>
|
||||
<img
|
||||
src="{{
|
||||
$attachment['remote_url'] === null
|
||||
? $attachment['url']
|
||||
: $attachment['remote_url']
|
||||
}}"
|
||||
alt="{{ $attachment['description'] }}"
|
||||
/>
|
||||
</p>
|
||||
@endif
|
||||
@endforeach
|
||||
@else
|
||||
@component('status', ['status' => $status['reblog']])
|
||||
@endcomponent
|
||||
@endif
|
||||
</div>
|
|
@ -11,21 +11,8 @@
|
|||
</head>
|
||||
<body>
|
||||
@foreach ($statuses as $status)
|
||||
<div class="status">
|
||||
<div class="tooltip">
|
||||
<a href="{{ $status['account']['url'] }}">
|
||||
<img src="{{ $status['account']['avatar'] }}" alt="{{ $status['account']['acct'] }}" class="avatar" />
|
||||
{{ $status['account']['display_name'] }}
|
||||
</a>
|
||||
<span class="tooltiptext">{{ $status['account']['acct'] }}</span>
|
||||
</div>
|
||||
<p>{!! $status['content'] !!}</p>
|
||||
@foreach ($status['media_attachments'] as $attachment)
|
||||
@if ($attachment['type'] === 'image')
|
||||
<p><img src="{{ $attachment['url'] }}" alt="{{ $attachment['description'] }}" /></p>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@component('status', ['status' => $status])
|
||||
@endcomponent
|
||||
@endforeach
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue