2018-06-05 04:09:48 +00:00
@ extends ( 'layouts.app' ,[ 'title' => $user -> username . " posted a photo: " . $status -> likes_count . " likes, " . $status -> comments_count . " comments " ])
2018-05-30 02:33:27 +00:00
@ section ( 'content' )
2018-06-02 23:47:06 +00:00
< div class = " container px-0 mt-md-4 " >
2018-06-09 19:47:40 +00:00
< div class = " card card-md-rounded-0 status-container orientation- { { $status -> firstMedia () -> orientation ? ? 'unknown' } } " >
2018-06-02 23:47:06 +00:00
< div class = " row mx-0 " >
2018-06-09 23:36:45 +00:00
< div class = " d-flex d-md-none align-items-center justify-content-between card-header bg-white w-100 " >
2018-08-14 21:12:44 +00:00
< a href = " { { $user -> url () } } " class = " d-flex align-items-center status-username text-truncate " data - toggle = " tooltip " data - placement = " bottom " title = " { { $user -> username } } " >
2018-06-04 21:55:28 +00:00
< div class = " status-avatar mr-2 " >
2018-08-14 21:12:44 +00:00
< img src = " { { $user -> avatarUrl () } } " width = " 24px " height = " 24px " style = " border-radius:12px; " >
2018-06-04 21:55:28 +00:00
</ div >
< div class = " username " >
2018-08-14 21:12:44 +00:00
< span class = " username-link font-weight-bold text-dark " > {{ $user -> username }} </ span >
2018-06-04 21:55:28 +00:00
</ div >
2018-08-14 21:12:44 +00:00
</ a >
2018-06-04 21:55:28 +00:00
</ div >
2018-06-02 23:47:06 +00:00
< div class = " col-12 col-md-8 status-photo px-0 " >
2018-06-14 00:54:27 +00:00
@ if ( $status -> is_nsfw && $status -> media_count == 1 )
2018-06-10 02:34:52 +00:00
< details class = " details-animated " >
2018-08-10 04:29:56 +00:00
< summary >
< p class = " mb-0 lead font-weight-bold " > CW / NSFW / Hidden Media </ p >
< p class = " font-weight-light " > ( click to show ) </ p >
</ summary >
< a class = " max-hide-overflow { { $status -> firstMedia () -> filter_class } } " href = " { { $status -> url () } } " >
< img class = " card-img-top " src = " { { $status -> mediaUrl () } } " >
</ a >
2018-06-10 02:34:52 +00:00
</ details >
2018-06-14 00:54:27 +00:00
@ elseif ( ! $status -> is_nsfw && $status -> media_count == 1 )
< div class = " { { $status -> firstMedia () -> filter_class } } " >
< img src = " { { $status -> mediaUrl () } } " width = " 100% " >
</ div >
@ elseif ( $status -> is_nsfw && $status -> media_count > 1 )
@ elseif ( ! $status -> is_nsfw && $status -> media_count > 1 )
< div id = " photoCarousel " class = " carousel slide carousel-fade " data - ride = " carousel " >
< ol class = " carousel-indicators " >
@ for ( $i = 0 ; $i < $status -> media_count ; $i ++ )
< li data - target = " #photoCarousel " data - slide - to = " { { $i } } " class = " { { $i == 0 ? 'active' : '' } } " ></ li >
@ endfor
</ ol >
< div class = " carousel-inner " >
@ foreach ( $status -> media () -> orderBy ( 'order' ) -> get () as $media )
< div class = " carousel-item { { $loop -> iteration == 1 ? 'active' : '' } } " >
< figure class = " { { $media -> filter_class } } " >
< img class = " d-block w-100 " src = " { { $media -> url () } } " alt = " { { $status -> caption } } " >
</ figure >
</ div >
@ endforeach
</ div >
< a class = " carousel-control-prev " href = " #photoCarousel " role = " button " data - slide = " prev " >
< span class = " carousel-control-prev-icon " aria - hidden = " true " ></ span >
< span class = " sr-only " > Previous </ span >
</ a >
< a class = " carousel-control-next " href = " #photoCarousel " role = " button " data - slide = " next " >
< span class = " carousel-control-next-icon " aria - hidden = " true " ></ span >
< span class = " sr-only " > Next </ span >
</ a >
</ div >
2018-06-10 02:34:52 +00:00
@ endif
2018-06-02 23:47:06 +00:00
</ div >
2018-06-03 13:05:23 +00:00
< div class = " col-12 col-md-4 px-0 d-flex flex-column border-left border-md-left-0 " >
2018-06-09 23:36:45 +00:00
< div class = " d-md-flex d-none align-items-center justify-content-between card-header py-3 bg-white " >
2018-08-14 21:12:44 +00:00
< a href = " { { $user -> url () } } " class = " d-flex align-items-center status-username text-truncate " data - toggle = " tooltip " data - placement = " bottom " title = " { { $user -> username } } " >
2018-06-02 23:47:06 +00:00
< div class = " status-avatar mr-2 " >
2018-08-14 21:12:44 +00:00
< img src = " { { $user -> avatarUrl () } } " width = " 24px " height = " 24px " style = " border-radius:12px; " >
2018-05-30 02:33:27 +00:00
</ div >
2018-06-02 23:47:06 +00:00
< div class = " username " >
2018-08-14 21:12:44 +00:00
< span class = " username-link font-weight-bold text-dark " > {{ $user -> username }} </ span >
2018-06-02 23:47:06 +00:00
</ div >
2018-08-14 21:12:44 +00:00
</ a >
2018-08-10 04:29:56 +00:00
< div class = " float-right " >
< div class = " dropdown " >
< button class = " btn btn-link text-dark no-caret dropdown-toggle " type = " button " data - toggle = " dropdown " aria - haspopup = " true " aria - expanded = " false " title = " Post options " >
< span class = " fas fa-ellipsis-v text-muted " ></ span >
</ button >
< div class = " dropdown-menu dropdown-menu-right " aria - labelledby = " dropdownMenuButton " >
< a class = " dropdown-item font-weight-bold " href = " { { $status->reportUrl ()}} " > Report </ a >
{{ -- < a class = " dropdown-item " href = " # " > Embed </ a > -- }}
@ if ( Auth :: check ())
@ if ( Auth :: user () -> profile -> id === $status -> profile -> id || Auth :: user () -> is_admin == true )
{{ -- < a class = " dropdown-item " href = " { { $status -> editUrl () } } " > Edit </ a > -- }}
< form method = " post " action = " /i/delete " >
@ csrf
< input type = " hidden " name = " type " value = " post " >
< input type = " hidden " name = " item " value = " { { $status -> id } } " >
< button type = " submit " class = " dropdown-item btn btn-link font-weight-bold " > Delete </ button >
</ form >
@ endif
@ endif
</ div >
</ div >
</ div >
2018-06-02 23:47:06 +00:00
</ div >
2018-06-04 21:55:28 +00:00
< div class = " d-flex flex-md-column flex-column-reverse h-100 " >
< div class = " card-body status-comments " >
< div class = " status-comment " >
< p class = " mb-1 " >
< span class = " font-weight-bold pr-1 " > {{ $status -> profile -> username }} </ span >
2018-08-10 04:29:56 +00:00
< span class = " comment-text " v - pre > { !! $status -> rendered ? ? e ( $status -> caption ) !! } </ span >
2018-06-02 23:47:06 +00:00
</ p >
2018-08-10 04:29:56 +00:00
< p class = " mb-1 " >< a href = " { { $status -> url () } }/c " class = " text-muted " > View all comments </ a ></ p >
2018-06-04 21:55:28 +00:00
< div class = " comments " >
2018-08-10 04:29:56 +00:00
@ foreach ( $replies as $item )
< p class = " mb-1 " >
< span class = " font-weight-bold pr-1 " >< bdi >< a class = " text-dark " href = " { { $item -> profile -> url () } } " > {{ str_limit ( $item -> profile -> username , 15 )}} </ a ></ bdi ></ span >
< span class = " comment-text " v - pre > { !! $item -> rendered ? ? e ( $item -> caption ) !! } < a href = " { { $item -> url () } } " class = " text-dark small font-weight-bold float-right pl-2 " > {{ $item -> created_at -> diffForHumans ( null , true , true , true )}} </ a ></ span >
2018-06-04 21:55:28 +00:00
</ p >
@ endforeach
</ div >
2018-05-30 02:33:27 +00:00
</ div >
2018-06-02 23:47:06 +00:00
</ div >
2018-06-09 23:36:45 +00:00
< div class = " card-body flex-grow-0 py-1 " >
2018-06-15 06:05:37 +00:00
< div class = " reactions my-1 " >
2018-08-10 04:29:56 +00:00
@ if ( Auth :: check ())
< form class = " d-inline-flex pr-3 " method = " post " action = " /i/like " style = " display: inline; " data - id = " { { $status -> id } } " data - action = " like " >
2018-05-30 02:33:27 +00:00
@ csrf
< input type = " hidden " name = " item " value = " { { $status -> id } } " >
2018-06-15 06:05:37 +00:00
< button class = " btn btn-link text-dark p-0 border-0 " type = " submit " title = " Like! " >
2018-08-10 04:29:56 +00:00
< h3 class = " m-0 { { $status -> liked () ? 'fas fa-heart text-danger' : 'far fa-heart text-dark' } } " ></ h3 >
2018-06-04 02:21:02 +00:00
</ button >
2018-05-30 02:33:27 +00:00
</ form >
2018-06-15 06:05:37 +00:00
< h3 class = " far fa-comment pr-3 m-0 " title = " Comment " ></ h3 >
2018-08-10 04:29:56 +00:00
< form class = " d-inline-flex share-form pr-3 " method = " post " action = " /i/share " style = " display: inline; " data - id = " { { $status -> id } } " data - action = " share " data - count = " { { $status -> shares_count } } " >
2018-06-04 21:55:28 +00:00
@ csrf
< input type = " hidden " name = " item " value = " { { $status -> id } } " >
2018-08-10 04:29:56 +00:00
< button class = " btn btn-link text-dark p-0 " type = " submit " title = " Share " >
< h3 class = " m-0 { { $status -> shared () ? 'fas fa-share-square text-primary' : 'far fa-share-square ' } } " ></ h3 >
2018-06-04 21:55:28 +00:00
</ button >
</ form >
2018-08-10 04:29:56 +00:00
2018-06-04 21:55:28 +00:00
@ endif
< span class = " float-right " >
2018-08-10 04:29:56 +00:00
< form class = " d-inline-flex " method = " post " action = " /i/bookmark " style = " display: inline; " data - id = " { { $status -> id } } " data - action = " bookmark " >
2018-06-04 21:55:28 +00:00
@ csrf
< input type = " hidden " name = " item " value = " { { $status -> id } } " >
2018-06-15 06:05:37 +00:00
< button class = " btn btn-link text-dark p-0 border-0 " type = " submit " title = " Save " >
2018-08-10 04:29:56 +00:00
< h3 class = " m-0 { { $status -> bookmarked () ? 'fas fa-bookmark text-warning' : 'far fa-bookmark' } } " ></ h3 >
2018-06-04 21:55:28 +00:00
</ button >
</ form >
</ span >
</ div >
< div class = " likes font-weight-bold mb-0 " >
< span class = " like-count " data - count = " { { $status -> likes_count } } " > {{ $status -> likes_count }} </ span > likes
</ div >
2018-06-09 23:36:45 +00:00
< div class = " timestamp " >
< a href = " { { $status -> url () } } " class = " small text-muted " >
{{ $status -> created_at -> format ( 'F j, Y' )}}
</ a >
</ div >
2018-06-02 23:47:06 +00:00
</ div >
</ div >
2018-06-09 23:36:45 +00:00
< div class = " card-footer bg-white sticky-md-bottom " >
2018-06-02 23:47:06 +00:00
< form class = " comment-form " method = " post " action = " /i/comment " data - id = " { { $status -> id } } " data - truncate = " false " >
@ csrf
< input type = " hidden " name = " item " value = " { { $status -> id } } " >
2018-08-10 04:29:56 +00:00
< input class = " form-control " name = " comment " placeholder = " Add a comment... " autocomplete = " off " >
2018-06-02 23:47:06 +00:00
</ form >
2018-05-30 02:33:27 +00:00
</ div >
</ div >
</ div >
</ div >
</ div >
2018-06-02 23:47:06 +00:00
@ endsection
2018-06-02 18:11:08 +00:00
@ push ( 'meta' )
2018-06-09 03:34:49 +00:00
< meta property = " og:description " content = " { { $status->caption }} " >
2018-08-10 04:29:56 +00:00
< meta property = " og:image " content = " { { $status -> mediaUrl () } } " >
2018-08-14 04:23:40 +00:00
< link href = '{{$status->url()}}' rel = 'alternate' type = 'application/activity+json' >@ endpush