Merge pull request #180 from hellcp/patch-11

New new user profile look
This commit is contained in:
daniel 2018-06-04 22:56:11 -06:00 committed by GitHub
commit e88e362d19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 121 additions and 191 deletions

View file

@ -2,46 +2,9 @@
@section('content') @section('content')
@include('profile.partial.user-info')
<div class="container following-page" style="min-height: 60vh;"> <div class="container following-page" style="min-height: 60vh;">
<div class="profile-header row my-5">
<div class="col-12 col-md-4 d-flex">
<div class="profile-avatar mx-auto">
<img class="img-thumbnail" src="{{$profile->avatarUrl()}}" style="border-radius:100%;" width="172px">
</div>
</div>
<div class="col-12 col-md-8 d-flex align-items-center">
<div class="profile-details">
<div class="username-bar pb-2 d-flex align-items-center">
<span class="font-weight-ultralight h1">{{$profile->username}}</span>
</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()}}">
<span class="font-weight-bold">{{$profile->statuses()->whereNull('in_reply_to_id')->count()}}</span>
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-md-2"> <div class="col-12 col-md-8 offset-md-2">
@if($followers->count() !== 0) @if($followers->count() !== 0)
<ul class="list-group mt-4"> <ul class="list-group mt-4">

View file

@ -2,46 +2,9 @@
@section('content') @section('content')
@include('profile.partial.user-info')
<div class="container following-page" style="min-height: 60vh;"> <div class="container following-page" style="min-height: 60vh;">
<div class="profile-header row my-5">
<div class="col-12 col-md-4 d-flex">
<div class="profile-avatar mx-auto">
<img class="img-thumbnail" src="{{$profile->avatarUrl()}}" style="border-radius:100%;" width="172px">
</div>
</div>
<div class="col-12 col-md-8 d-flex align-items-center">
<div class="profile-details">
<div class="username-bar pb-2 d-flex align-items-center">
<span class="font-weight-ultralight h1">{{$profile->username}}</span>
</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()}}">
<span class="font-weight-bold">{{$profile->statuses()->whereNull('in_reply_to_id')->count()}}</span>
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-md-2"> <div class="col-12 col-md-8 offset-md-2">
@if($following->count() !== 0) @if($following->count() !== 0)
<ul class="list-group mt-4"> <ul class="list-group mt-4">

View file

@ -0,0 +1,79 @@
<div class="bg-white py-5">
<div class="container">
<div class="row">
<div class="col-12 col-md-4 d-flex">
<div class="profile-avatar mx-auto">
<img class="img-thumbnail" src="{{$user->avatarUrl()}}" style="border-radius:100%;" width="172px">
</div>
</div>
<div class="col-12 col-md-8 d-flex align-items-center">
<div class="profile-details">
<div class="username-bar pb-2 d-flex align-items-center">
<span class="font-weight-ultralight h1">{{$user->username}}</span>
@if($owner == true)
<span class="h5 pl-2 b-0">
<a class="icon-settings text-muted" href="{{route('settings')}}"></a>
</span>
@elseif ($following == true)
<span class="pl-4">
<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>
@elseif ($following == false)
<span class="pl-4">
<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
{{-- TODO: Implement action dropdown
<span class="pl-4">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle py-0" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="icon-options"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Report User</a>
<a class="dropdown-item" href="#">Block User</a>
</div>
</div>
</span>
--}}
</div>
<div class="profile-stats pb-3 d-inline-flex lead">
<div class="font-weight-light pr-5">
<a class="text-dark" href="{{$user->url()}}">
<span class="font-weight-bold">{{$user->statuses()->whereNull('in_reply_to_id')->count()}}</span>
Posts
</a>
</div>
<div class="font-weight-light pr-5">
<a class="text-dark" href="{{$user->url('/followers')}}">
<span class="font-weight-bold">{{$user->followerCount(true)}}</span>
Followers
</a>
</div>
<div class="font-weight-light pr-5">
<a class="text-dark" href="{{$user->url('/following')}}">
<span class="font-weight-bold">{{$user->followingCount(true)}}</span>
Following
</a>
</div>
</div>
<p class="lead">
<span class="font-weight-bold">{{$user->name}}</span>
@if($user->remote_url)
<span class="badge badge-info">REMOTE PROFILE</span>
@endif
{{$user->bio}}
</p>
</div>
</div>
</div>
</div>
</div>

View file

@ -2,84 +2,10 @@
@section('content') @section('content')
<div class="container"> @include('profile.partial.user-info')
<div class="profile-header row my-5"> @if($owner == true)
<div class="col-12 col-md-4 d-flex"> <div>
<div class="profile-avatar mx-auto">
<img class="img-thumbnail" src="{{$user->avatarUrl()}}" style="border-radius:100%;" width="172px">
</div>
</div>
<div class="col-12 col-md-8 d-flex align-items-center">
<div class="profile-details">
<div class="username-bar pb-2 d-flex align-items-center">
<span class="font-weight-ultralight h1">{{$user->username}}</span>
@if($owner == true)
<span class="h5 pl-2 b-0">
<a class="icon-settings text-muted" href="{{route('settings')}}"></a>
</span>
@elseif ($following == true)
<span class="pl-4">
<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>
@elseif ($following == false)
<span class="pl-4">
<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
{{-- TODO: Implement action dropdown
<span class="pl-4">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle py-0" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="icon-options"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Report User</a>
<a class="dropdown-item" href="#">Block User</a>
</div>
</div>
</span>--}}
</div>
<div class="profile-stats pb-3 d-inline-flex lead">
<div class="font-weight-light pr-5">
<span class="font-weight-bold">{{$user->statuses()->whereNull('in_reply_to_id')->count()}}</span>
Posts
</div>
<div class="font-weight-light pr-5">
<a class="text-dark" href="{{$user->url('/followers')}}">
<span class="font-weight-bold">{{$user->followerCount(true)}}</span>
Followers
</a>
</div>
<div class="font-weight-light pr-5">
<a class="text-dark" href="{{$user->url('/following')}}">
<span class="font-weight-bold">{{$user->followingCount(true)}}</span>
Following
</a>
</div>
</div>
<p class="lead">
<span class="font-weight-bold">{{$user->name}}</span>
@if($user->remote_url)
<span class="badge badge-info">REMOTE PROFILE</span>
@endif
{{$user->bio}}
</p>
</div>
</div>
</div>
<div class="profile-timeline mt-5 row">
@if($owner == true)
<div class="col-12 mb-5">
<ul class="nav nav-topbar d-flex justify-content-center"> <ul class="nav nav-topbar d-flex justify-content-center">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link {{request()->is('*/saved') ? '':'active'}} font-weight-bold text-uppercase" href="{{$user->url()}}">Posts</a> <a class="nav-link {{request()->is('*/saved') ? '':'active'}} font-weight-bold text-uppercase" href="{{$user->url()}}">Posts</a>
@ -88,15 +14,15 @@
<a class="nav-link {{request()->is('*/saved') ? 'active':''}} font-weight-bold text-uppercase" href="{{$user->url('/saved')}}">Saved</a> <a class="nav-link {{request()->is('*/saved') ? 'active':''}} font-weight-bold text-uppercase" href="{{$user->url('/saved')}}">Saved</a>
</li> </li>
</ul> </ul>
</div> </div>
@endif @endif
<div class="container">
<div class="profile-timeline mt-5 row">
@if($owner && request()->is('*/saved')) @if($owner && request()->is('*/saved'))
<div class="col-12"> <div class="col-12">
<p class="text-muted font-weight-bold small">{{__('profile.savedWarning')}}</p> <p class="text-muted font-weight-bold small">{{__('profile.savedWarning')}}</p>
</div> </div>
@endif @endif
@if($timeline->count() > 0) @if($timeline->count() > 0)
@foreach($timeline as $status) @foreach($timeline as $status)
<div class="col-12 col-md-4 mb-4"> <div class="col-12 col-md-4 mb-4">
@ -129,7 +55,6 @@
</div> </div>
@endif @endif
</div> </div>
</div> </div>
@endsection @endsection