2024-01-03 08:54:30 +00:00
|
|
|
@extends('layouts.app', [
|
|
|
|
'title' => $desc ?? "{$user->username} shared a post",
|
|
|
|
'ogTitle' => $ogTitle
|
|
|
|
])
|
|
|
|
|
|
|
|
@php
|
2024-02-16 04:41:18 +00:00
|
|
|
$s = \App\Services\StatusService::get($status->id, false);
|
2024-01-03 08:54:30 +00:00
|
|
|
$displayName = $s && $s['account'] ? $s['account']['display_name'] : false;
|
|
|
|
$captionPreview = false;
|
|
|
|
$domain = $displayName ? '@' . parse_url($s['account']['url'], PHP_URL_HOST) : '';
|
|
|
|
$wf = $displayName ? $s['account']['username'] . $domain : '';
|
|
|
|
$ogTitle = $displayName ? $displayName . ' (@' . $s['account']['username'] . $domain . ')' : '';
|
|
|
|
$mediaCount = $s['media_attachments'] && count($s['media_attachments']) ? count($s['media_attachments']) : 0;
|
|
|
|
$mediaSuffix = $mediaCount < 2 ? '' : 's';
|
|
|
|
$ogDescription = $s['content_text'] ? $s['content_text'] : 'Attached: ' . $mediaCount . ' ' . $s['media_attachments'][0]['type'] . $mediaSuffix;
|
|
|
|
if($s['content_text']) {
|
|
|
|
$captionLen = strlen($s['content_text']);
|
|
|
|
$captionPreview = $captionLen > 40 ? substr($s['content_text'], 0, 40) . '…' : $s['content_text'];
|
|
|
|
}
|
|
|
|
$desc = false;
|
|
|
|
if($displayName && $captionPreview) {
|
|
|
|
$desc = $displayName . ': "' . $captionPreview . '" - Pixelfed';
|
|
|
|
} else if($displayName) {
|
|
|
|
$desc = $displayName . ': Shared a new post - Pixelfed';
|
|
|
|
}
|
|
|
|
|
|
|
|
@endphp
|
2018-05-30 02:33:27 +00:00
|
|
|
|
|
|
|
@section('content')
|
2019-02-11 05:51:11 +00:00
|
|
|
<noscript>
|
2020-01-29 07:00:09 +00:00
|
|
|
<div class="container">
|
|
|
|
<p class="pt-5 text-center lead">Please enable javascript to view this content.</p>
|
2019-02-11 05:51:11 +00:00
|
|
|
</div>
|
|
|
|
</noscript>
|
|
|
|
<div class="mt-md-4"></div>
|
2024-01-03 08:54:30 +00:00
|
|
|
<post-component
|
|
|
|
status-template="{{$status->viewType()}}"
|
|
|
|
status-id="{{$status->id}}"
|
|
|
|
status-username="{{$s['account']['username']}}"
|
|
|
|
status-url="{{$s['url']}}"
|
|
|
|
status-profile-url="{{$s['account']['url']}}"
|
|
|
|
status-avatar="{{$s['account']['avatar']}}"
|
|
|
|
status-profile-id="{{$status->profile_id}}"
|
|
|
|
profile-layout="metro" />
|
2018-08-10 04:29:56 +00:00
|
|
|
|
2018-05-30 02:33:27 +00:00
|
|
|
|
2018-06-02 23:47:06 +00:00
|
|
|
@endsection
|
2018-06-02 18:11:08 +00:00
|
|
|
|
2024-01-03 08:54:30 +00:00
|
|
|
@push('meta')@if($mediaCount && $s['pf_type'] === "photo" || $s['pf_type'] === "photo:album")
|
|
|
|
<meta property="og:image" content="{{$s['media_attachments'][0]['url']}}">
|
|
|
|
@elseif($mediaCount && $s['pf_type'] === "video" || $s['pf_type'] === "video:album")<meta property="og:video" content="{{$s['media_attachments'][0]['url']}}">
|
|
|
|
@endif<meta property="og:description" content="{{ $ogDescription }}">
|
|
|
|
<meta property="og:published_time" content="{{$s['created_at']}}">
|
|
|
|
<meta property="profile:username" content="{{ $wf }}">
|
|
|
|
<link href='{{$s['url']}}' rel='alternate' type='application/activity+json'>
|
|
|
|
<meta name="twitter:card" content="summary">
|
|
|
|
<meta name="description" content="{{ $ogDescription }}">
|
2018-11-09 05:29:28 +00:00
|
|
|
@endpush
|
|
|
|
|
|
|
|
@push('scripts')
|
2019-02-11 05:51:11 +00:00
|
|
|
<script type="text/javascript" src="{{ mix('js/status.js') }}"></script>
|
2021-07-07 06:23:43 +00:00
|
|
|
<script type="text/javascript">App.boot();</script>
|
2018-11-09 05:29:28 +00:00
|
|
|
@endpush
|