mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-09 05:40:45 +00:00
Merge pull request #151 from hellcp/patch-6
Make user images square and not dependant on aspect ratio
This commit is contained in:
commit
fb3c45943f
2 changed files with 28 additions and 6 deletions
20
resources/assets/sass/custom.scss
vendored
20
resources/assets/sass/custom.scss
vendored
|
@ -153,3 +153,23 @@ body, button, input, textarea {
|
||||||
.font-weight-ultralight {
|
.font-weight-ultralight {
|
||||||
font-weight: 200 !important;
|
font-weight: 200 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.square {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.square::after {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
padding-bottom: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.square-content {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: 50%;
|
||||||
|
}
|
||||||
|
|
|
@ -101,12 +101,14 @@
|
||||||
@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">
|
||||||
<a class="card info-overlay" href="{{$status->url()}}">
|
<a class="card info-overlay" href="{{$status->url()}}">
|
||||||
<img class="card-img-top" src="{{$status->thumb()}}" width="300px" height="300px">
|
<div class="square">
|
||||||
<div class="info-overlay-text">
|
<div class="square-content" style="background-image: url('{{$status->thumb()}}')"></div>
|
||||||
<h5 class="text-white m-auto">
|
<div class="info-overlay-text">
|
||||||
<span class="icon-heart">{{$item->likes()->count()}}</span>
|
<h5 class="text-white m-auto">
|
||||||
<span class="icon-speech">{{$item->comments()->count()}}</span>
|
<span class="icon-heart">{{$item->likes()->count()}}</span>
|
||||||
</h5>
|
<span class="icon-speech">{{$item->comments()->count()}}</span>
|
||||||
|
</h5>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue