1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-23 00:27:30 +00:00

Force 3 columns on mobile

This commit is contained in:
Cadence Fish 2020-01-29 23:08:52 +13:00
parent e3e1e007ed
commit 3297333312
No known key found for this signature in database
GPG Key ID: 81015DF9AA8607E1
2 changed files with 21 additions and 2 deletions

View File

@ -149,7 +149,7 @@ class TimelineEntry extends TimelineBaseMethods {
} }
getThumbnailSizes() { getThumbnailSizes() {
return `(max-width: 820px) 120px, 260px` // from css :( return `(max-width: 820px) 200px, 260px` // from css :(
} }
async fetchChildren() { async fetchChildren() {

View File

@ -1,5 +1,6 @@
$layout-a-max: 820px $layout-a-max: 820px
$layout-b-min: 821px $layout-b-min: 821px
$layout-c-max: 680px;
$layout-home-a-max: 520px $layout-home-a-max: 520px
$layout-home-b-min: 521px $layout-home-b-min: 521px
@ -100,9 +101,12 @@ body
$background: #fff4e8 $background: #fff4e8
@media screen and (max-width: $layout-a-max) @media screen and (max-width: $layout-a-max)
--image-size: 120px --image-size: 150px
flex: 1 flex: 1
@media screen and (max-width: $layout-c-max)
--image-size: calc(33vw - 10px)
background-color: $background background-color: $background
padding: 15px 15px 40px padding: 15px 15px 40px
@ -154,6 +158,12 @@ body
flex-wrap: wrap flex-wrap: wrap
margin: 0 auto margin: 0 auto
@media screen and (max-width: $layout-c-max)
display: grid
grid-template-columns: repeat(3, 1fr)
justify-content: center
justify-items: center
@mixin sized() @mixin sized()
width: $image-size width: $image-size
height: $image-size height: $image-size
@ -172,6 +182,15 @@ body
margin: $margin - $border-width margin: $margin - $border-width
border: $border-width solid #111 border: $border-width solid #111
@media screen and (max-width: $layout-c-max)
$margin: 2px
margin: $margin
&:hover
$border-width: 2px
margin: $margin - $border-width
border: $border-width solid #111
.sized-image .sized-image
@include sized @include sized