pixelfed/resources/views/profile/show.blade.php

122 lines
4.6 KiB
PHP
Raw Normal View History

@extends('layouts.app',['title' => $user->username . " on " . config('app.name')])
2018-05-30 02:38:21 +00:00
@section('content')
2018-11-09 04:38:43 +00:00
@if (session('error'))
<div class="alert alert-danger text-center font-weight-bold mb-0">
{{ session('error') }}
</div>
@endif
2018-06-03 16:19:13 +00:00
@include('profile.partial.user-info')
2018-05-30 02:38:21 +00:00
@if(true === $owner)
2018-06-03 16:19:13 +00:00
<div>
2018-06-06 14:51:24 +00:00
<ul class="nav nav-topbar d-flex justify-content-center border-0">
2018-06-03 16:19:13 +00:00
<li class="nav-item">
2018-11-09 04:38:43 +00:00
<a class="nav-link {{request()->is($user->username) ? 'active': ''}} font-weight-bold text-uppercase" href="{{$user->url()}}">Posts</a>
2018-06-03 16:19:13 +00:00
</li>
2018-11-09 04:38:43 +00:00
{{-- <li class="nav-item">
<a class="nav-link {{request()->is('*/collections') ? 'active': ''}} font-weight-bold text-uppercase" href="{{$user->url()}}/collections">Collections</a>
</li> --}}
2018-06-03 16:19:13 +00:00
<li class="nav-item">
<a class="nav-link {{request()->is('*/saved') ? 'active':''}} font-weight-bold text-uppercase" href="{{$user->url('/saved')}}">Saved</a>
</li>
</ul>
</div>
@endif
<div class="container">
2018-05-31 22:08:04 +00:00
@if($owner && request()->is('*/saved'))
<div class="col-12">
<p class="text-muted font-weight-bold small">{{__('profile.savedWarning')}}</p>
</div>
@endif
<div class="profile-timeline mt-2 mt-md-4">
<div class="row">
2018-05-30 02:38:21 +00:00
@if($timeline->count() > 0)
2018-06-03 16:19:13 +00:00
@foreach($timeline as $status)
<div class="col-4 p-0 p-sm-2 p-md-3">
<a class="card info-overlay card-md-border-0" href="{{$status->url()}}">
<div class="square {{$status->firstMedia()->filter_class}}">
2018-11-09 04:38:43 +00:00
@switch($status->viewType())
@case('album')
2019-01-12 02:47:02 +00:00
@case('photo:album')
<span class="float-right mr-3" style="color:#fff;position:relative;margin-top:10px;z-index: 999999;opacity:0.6;text-shadow: 3px 3px 16px #272634;"><i class="fas fa-images fa-2x"></i></span>
2018-11-09 04:38:43 +00:00
@break
@case('video')
2019-01-12 02:47:02 +00:00
<span class="float-right mr-3" style="color:#fff;position:relative;margin-top:10px;z-index: 999999;opacity:0.6;text-shadow: 3px 3px 16px #272634;"><i class="fas fa-video fa-2x"></i></span>
2018-11-09 04:38:43 +00:00
@break
@case('video-album')
2019-01-12 02:47:02 +00:00
<span class="float-right mr-3" style="color:#fff;position:relative;margin-top:10px;z-index: 999999;opacity:0.6;text-shadow: 3px 3px 16px #272634;"><i class="fas fa-film fa-2x"></i></span>
2018-11-09 04:38:43 +00:00
@break
@endswitch
<div class="square-content" style="background-image: url('{{$status->thumb()}}')">
</div>
<div class="info-overlay-text">
<h5 class="text-white m-auto font-weight-bold">
<span>
<span class="far fa-heart fa-lg p-2 d-flex-inline"></span>
<span class="d-flex-inline">{{App\Util\Lexer\PrettyNumber::convert($status->likes_count)}}</span>
</span>
<span>
<span class="far fa-comment fa-lg p-2 d-flex-inline"></span>
<span class="d-flex-inline">{{App\Util\Lexer\PrettyNumber::convert($status->comments_count)}}</span>
</span>
</h5>
</div>
2018-06-02 04:25:12 +00:00
</div>
</a>
</div>
2018-06-03 16:19:13 +00:00
@endforeach
</div>
</div>
<div class="pagination-container">
<div class="d-flex justify-content-center">
{{$timeline->links()}}
</div>
</div>
2018-05-30 02:38:21 +00:00
@else
<div class="col-12">
<div class="card">
<div class="card-body py-5 my-5">
<div class="d-flex my-5 py-5 justify-content-center align-items-center">
@if($owner && request()->is('*/saved'))
<p class="lead font-weight-bold">{{ __('profile.emptySaved') }}</p>
@else
<p class="lead font-weight-bold">{{ __('profile.emptyTimeline') }}</p>
@endif
</div>
2018-05-30 02:38:21 +00:00
</div>
</div>
2018-06-03 16:19:13 +00:00
</div>
2018-05-30 02:38:21 +00:00
</div>
@endif
2018-05-30 02:38:21 +00:00
</div>
@endsection
@push('meta')<meta property="og:description" content="{{$user->bio}}">
<meta property="og:image" content="{{$user->avatarUrl()}}">
<link href="{{$user->permalink('.atom')}}" rel="alternate" title="{{$user->username}} on PixelFed" type="application/atom+xml">
@if(false == $settings->crawlable || $user->remote_url)
<meta name="robots" content="noindex, nofollow">
@endif
@endpush
@push('scripts')
<script type="text/javascript">
$(document).ready(function() {
$('.pagination-container').hide();
$('.pagination').hide();
let elem = document.querySelector('.profile-timeline');
let infScroll = new InfiniteScroll( elem, {
path: '.pagination__next',
2019-01-12 02:47:02 +00:00
append: '.profile-timeline .row',
status: '.page-load-status',
history: false,
});
});
</script>
@endpush
2018-06-04 22:10:37 +00:00