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

98 lines
3.7 KiB
PHP
Raw Normal View History

2018-05-31 21:59:29 +00:00
@extends('layouts.app')
@section('content')
<div class="container following-page" style="min-height: 60vh;">
2018-06-02 04:32:19 +00:00
<div class="profile-header row my-5">
<div class="col-12 col-md-4 d-flex">
<div class="profile-avatar mx-auto">
2018-05-31 21:59:29 +00:00
<img class="img-thumbnail" src="{{$profile->avatarUrl()}}" style="border-radius:100%;" width="172px">
</div>
</div>
2018-06-02 04:32:19 +00:00
<div class="col-12 col-md-8 d-flex align-items-center">
2018-05-31 21:59:29 +00:00
<div class="profile-details">
2018-06-02 04:32:19 +00:00
<div class="username-bar pb-2 d-flex align-items-center">
<span class="font-weight-ultralight h1">{{$profile->username}}</span>
2018-05-31 21:59:29 +00:00
</div>
<div class="profile-stats pb-3 d-inline-flex lead">
<div class="font-weight-light pr-5">
<a class="text-dark" href="{{$profile->url()}}">
2018-06-02 03:00:03 +00:00
<span class="font-weight-bold">{{$profile->statuses()->whereNull('in_reply_to_id')->count()}}</span>
2018-05-31 21:59:29 +00:00
Posts
</a>
</div>
<div class="font-weight-light pr-5">
<a class="text-dark" href="{{$profile->url('/followers')}}">
<span class="font-weight-bold">{{$profile->followerCount(true)}}</span>
Followers
</a>
</div>
<div class="font-weight-light pr-5">
<a class="text-dark" href="{{$profile->url('/following')}}">
<span class="font-weight-bold">{{$profile->followingCount(true)}}</span>
Following
</a>
</div>
</div>
<p class="lead font-weight-bold">
{{$profile->name}}
</p>
</div>
</div>
</div>
<div class="col-12 col-md-8 offset-2">
@if($followers->count() !== 0)
<ul class="list-group mt-4">
@foreach($followers as $user)
<li class="list-group-item following">
<span class="following-icon pr-3">
<img src="{{$user->avatarUrl()}}" width="32px" class="rounded-circle">
</span>
<a class="following-username font-weight-bold text-dark" href="{{$user->url()}}">
{{$user->username}}
</a>
<span class="following-name text-muted">
{{$user->name}}
</span>
@if(Auth::check() && Auth::id() != $user->user_id)
@if ($user->followedBy(Auth::user()->profile) == true)
<span class="float-right notification-action">
<form class="follow-form" method="post" action="/i/follow" style="display: inline;" data-id="{{$user->id}}" data-action="unfollow">
@csrf
<input type="hidden" name="item" value="{{$user->id}}">
<button class="btn btn-outline-secondary font-weight-bold px-4 py-0" type="submit">Unfollow</button>
</form>
</span>
@else
<span class="float-right notification-action">
<form class="follow-form" method="post" action="/i/follow" style="display: inline;" data-id="{{$user->id}}" data-action="follow">
@csrf
<input type="hidden" name="item" value="{{$user->id}}">
<button class="btn btn-primary font-weight-bold px-4 py-0" type="submit">Follow</button>
</form>
</span>
@endif
@endif
2018-05-31 21:59:29 +00:00
</li>
@endforeach
</ul>
@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">
<p class="lead font-weight-bold">{{ __('profile.emptyFollowers') }}</p>
</div>
</div>
</div>
</div>
@endif
<div class="d-flex justify-content-center mt-4">
{{$followers->links()}}
</div>
</div>
</div>
@endsection