forked from mirror/pixelfed
Merge pull request #197 from hellcp/patch-13
Fixes to look of status view
This commit is contained in:
commit
70082078d8
2 changed files with 80 additions and 47 deletions
24
resources/assets/sass/custom.scss
vendored
24
resources/assets/sass/custom.scss
vendored
|
@ -71,9 +71,12 @@ body, button, input, textarea {
|
|||
margin: auto !important;
|
||||
}
|
||||
|
||||
.card.status-container .status-comments {
|
||||
overflow-y: scroll;
|
||||
border-bottom:1px solid rgba(0, 0, 0, 0.1);
|
||||
@media (min-width: map-get($grid-breakpoints, "md")) {
|
||||
.card.status-container .status-comments {
|
||||
overflow-y:scroll;
|
||||
border-bottom:1px solid rgba(0,0,0,.1);
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
.no-caret.dropdown-toggle {
|
||||
|
@ -184,3 +187,18 @@ body, button, input, textarea {
|
|||
|
||||
.fas.fa-heart {
|
||||
}
|
||||
|
||||
@media (max-width: map-get($grid-breakpoints, "md")) {
|
||||
.border-md-left-0 {
|
||||
border-left:0!important
|
||||
}
|
||||
.card.status-container .status-comments {
|
||||
border-top:1px solid rgba(0,0,0,.1);
|
||||
}
|
||||
.sticky-md-bottom {
|
||||
position:-webkit-sticky;
|
||||
position:sticky;
|
||||
bottom:0;
|
||||
z-index:1020
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,24 @@
|
|||
<div class="container px-0 mt-md-4">
|
||||
<div class="card status-container orientation-{{$status->firstMedia()->orientation ?? 'unknown'}}">
|
||||
<div class="row mx-0">
|
||||
<div class="d-flex d-md-none align-items-center justify-content-between card-header w-100">
|
||||
<div class="d-flex align-items-center status-username">
|
||||
<div class="status-avatar mr-2">
|
||||
<img class="img-thumbnail" src="{{$user->avatarUrl()}}" width="24px" height="24px" style="border-radius:12px;">
|
||||
</div>
|
||||
<div class="username">
|
||||
<a href="{{$user->url()}}" class="username-link font-weight-bold text-dark">{{$user->username}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timestamp mb-0">
|
||||
<p class="small text-uppercase mb-0"><a href="{{$status->url()}}" class="text-muted">{{$status->created_at->diffForHumans(null, true, true, true)}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-8 status-photo px-0">
|
||||
<img src="{{$status->mediaUrl()}}" width="100%">
|
||||
</div>
|
||||
<div class="col-12 col-md-4 px-0 d-flex flex-column border-left border-md-left-0">
|
||||
<div class="d-flex align-items-center justify-content-between card-header">
|
||||
<div class="d-md-flex d-none align-items-center justify-content-between card-header">
|
||||
<div class="d-flex align-items-center status-username">
|
||||
<div class="status-avatar mr-2">
|
||||
<img class="img-thumbnail" src="{{$user->avatarUrl()}}" width="24px" height="24px" style="border-radius:12px;">
|
||||
|
@ -22,59 +35,61 @@
|
|||
<p class="small text-uppercase mb-0"><a href="{{$status->url()}}" class="text-muted">{{$status->created_at->diffForHumans(null, true, true, true)}}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<span class="comment-text">{!! $status->rendered ?? e($status->caption) !!}</span>
|
||||
</p>
|
||||
<div class="comments">
|
||||
@foreach($status->comments->reverse()->take(10) as $item)
|
||||
<p class="mb-0">
|
||||
<span class="font-weight-bold pr-1"><bdi><a class="text-dark" href="{{$item->profile->url()}}">{{$item->profile->username}}</a></bdi></span>
|
||||
<span class="comment-text">{!!$item->rendered!!} <a href="{{$item->url()}}" class="text-dark small font-weight-bold float-right">{{$item->created_at->diffForHumans(null, true, true ,true)}}</a></span>
|
||||
<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>
|
||||
<span class="comment-text">{!! $status->rendered ?? e($status->caption) !!}</span>
|
||||
</p>
|
||||
@endforeach
|
||||
<div class="comments">
|
||||
@foreach($status->comments->reverse()->take(10) as $item)
|
||||
<p class="mb-0">
|
||||
<span class="font-weight-bold pr-1"><bdi><a class="text-dark" href="{{$item->profile->url()}}">{{$item->profile->username}}</a></bdi></span>
|
||||
<span class="comment-text">{!!$item->rendered!!} <a href="{{$item->url()}}" class="text-dark small font-weight-bold float-right">{{$item->created_at->diffForHumans(null, true, true ,true)}}</a></span>
|
||||
</p>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body flex-grow-0">
|
||||
<div class="reactions h3 mb-0">
|
||||
<form class="d-inline-flex like-form pr-3" method="post" action="/i/like" style="display: inline;" data-id="{{$status->id}}" data-action="like">
|
||||
@csrf
|
||||
<input type="hidden" name="item" value="{{$status->id}}">
|
||||
<button class="btn btn-link text-dark p-0" type="submit">
|
||||
<span class="far fa-heart fa-lg mb-0"></span>
|
||||
</button>
|
||||
</form>
|
||||
<span class="far fa-comment fa-lg pt-1 pr-3"></span>
|
||||
@if(Auth::check())
|
||||
@if(Auth::user()->profile->id === $status->profile->id || Auth::user()->is_admin == true)
|
||||
<form method="post" action="/i/delete" class="d-inline-flex">
|
||||
@csrf
|
||||
<input type="hidden" name="type" value="post">
|
||||
<input type="hidden" name="item" value="{{$status->id}}">
|
||||
<button type="submit" class="btn btn-link text-dark p-0">
|
||||
<span class="far fa-trash-alt fa-lg mb-0"></span>
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
@endif
|
||||
<span class="float-right">
|
||||
<form class="d-inline-flex bookmark-form" method="post" action="/i/bookmark" style="display: inline;" data-id="{{$status->id}}" data-action="bookmark">
|
||||
<div class="card-body flex-grow-0">
|
||||
<div class="reactions h3 mb-0">
|
||||
<form class="d-inline-flex like-form pr-3" method="post" action="/i/like" style="display: inline;" data-id="{{$status->id}}" data-action="like">
|
||||
@csrf
|
||||
<input type="hidden" name="item" value="{{$status->id}}">
|
||||
<button class="btn btn-link text-dark p-0" type="submit">
|
||||
<span class="far fa-bookmark fa-lg mb-0"></span>
|
||||
<span class="far fa-heart fa-lg mb-0"></span>
|
||||
</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
|
||||
<span class="far fa-comment fa-lg pt-1 pr-3"></span>
|
||||
@if(Auth::check())
|
||||
@if(Auth::user()->profile->id === $status->profile->id || Auth::user()->is_admin == true)
|
||||
<form method="post" action="/i/delete" class="d-inline-flex">
|
||||
@csrf
|
||||
<input type="hidden" name="type" value="post">
|
||||
<input type="hidden" name="item" value="{{$status->id}}">
|
||||
<button type="submit" class="btn btn-link text-dark p-0">
|
||||
<span class="far fa-trash-alt fa-lg mb-0"></span>
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
@endif
|
||||
<span class="float-right">
|
||||
<form class="d-inline-flex bookmark-form" method="post" action="/i/bookmark" style="display: inline;" data-id="{{$status->id}}" data-action="bookmark">
|
||||
@csrf
|
||||
<input type="hidden" name="item" value="{{$status->id}}">
|
||||
<button class="btn btn-link text-dark p-0" type="submit">
|
||||
<span class="far fa-bookmark fa-lg mb-0"></span>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="card-footer bg-light sticky-md-bottom">
|
||||
<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}}">
|
||||
|
|
Loading…
Reference in a new issue