Remake Home page

This commit is contained in:
Michał Gdula 2023-05-21 21:56:57 +01:00
parent 9676819871
commit e4f53f9ea4
19 changed files with 258 additions and 147 deletions

View file

@ -1,45 +1,25 @@
section
margin: 0 auto 1rem
padding: 1rem
max-width: 75rem
margin: 3rem auto 0
max-width: 85rem
display: flex
flex-direction: column
justify-content: center
text-align: center
gap: 1rem
scroll-margin-top: 4rem
> h2
margin: 0 0 1rem
margin: 0
font-size: 2rem
font-weight: bold
> p
margin: 0 0 1rem
margin: 0
font-size: 1rem
&.center
height: 100%
justify-content: center
align-items: center
@media (max-width: 600px)
section
scroll-margin-top: 7rem
&.fill
background-color: RGB($secondary)
color: RGB($primary)
border-radius: $radius
div.games
margin: 1rem
display: grid
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr))
gap: 2rem
@media (max-width: 24rem)
div.games
margin: 0
display: flex
flex-direction: column
gap: 1rem
div.login
.login
padding: 0.5rem
background-color: RGB($primary)
@ -96,75 +76,120 @@ div.login
outline: none
background-color: RGB($secondary-button)
.games
display: flex
flex-direction: row
flex-wrap: wrap
gap: 1rem
.game-box
margin: 0 auto
padding: 0.5rem
padding: 1rem
width: 100%
height: auto
width: 16rem
// Height is set by JS to keep an aspect ratio
// Though there is a CSS solution, its too new
// For me to be comfortable using it
height: 0
position: relative
display: flex
flex-direction: column
font-family: $main-font
font-size: 1rem
text-decoration: none
background-color: RGB($primary)
color: RGB($secondary)
border-radius: $radius
box-shadow: 0 0.2rem 1rem 0 RGB($primary)
transition: box-shadow 0.1s ease-in-out, transform 0.25s ease-in-out
overflow: hidden
transition: box-shadow 0.1s ease-in-out, transform 0.1s ease-in-out
> img
margin: 0 0 0.5rem
.background
position: absolute
inset: 0
width: 100%
display: block
// border-radius: calc(#{$radius} - 0.5rem) calc(#{$radius} - 0.5rem) calc(calc(#{$radius} - 0.5rem) / 2) calc(calc(#{$radius} - 0.5rem) / 2)
> h2
margin: 0 0 0.5rem
font-size: 1.5rem
font-weight: bold
> p
height: 100%
margin: 0 0 1rem
object-fit: cover
opacity: 0.3
filter: blur(0.25rem)
z-index: +1
&::after
content: ''
position: absolute
inset: 0
background-image: linear-gradient(to top, transparent, RGB($primary))
z-index: +2
> div
position: relative
height: 100%
> .options
display: flex
flex-direction: row
flex-direction: column
gap: 0.5rem
font-family: $monospace-font
> a
z-index: +3
.logo
margin: 0 auto 1rem
width: auto
height: auto
max-width: 100%
max-height: 50%
display: block
border-radius: calc(#{$radius} - 0.5rem)
> h2
margin: 0
padding: 0.5rem 1rem
font-size: 2rem
font-weight: bold
color: RGB($accent)
height: 2.5rem
> p
margin: 0
> span
height: 100%
> ul
margin: 0
padding: 0
list-style: none
display: flex
justify-content: center
align-items: center
flex-direction: row
flex-wrap: wrap
gap: 0.5rem
text-decoration: none
> li
margin: 0
padding: 0.25rem 0.5rem
background-color: RGB($primary-button)
color: RGB($primary)
border-radius: calc(calc(#{$radius} - 0.5rem) / 2)
font-size: 0.9rem
transition: transform 0.1s ease-in-out, border-radius 0.1s ease-in-out
background-color: RGBA($accent, 0.5)
color: RGB($secondary)
border-radius: $radius
&:hover
box-shadow: 0 0.25rem 1.25rem 0 RGB($primary)
transform: scale(1.03) translateY(-0.25rem)
> i
font-size: 1.2rem
@media (max-width: 600px)
.game-box
margin-bottom: 2rem
padding: 0.75rem
width: 14rem
> div
.logo
margin-bottom: 0.5rem
max-height: 25%
&:first-child
border-bottom-left-radius: calc(#{$radius} - 0.5rem)
&:last-child
border-bottom-right-radius: calc(#{$radius} - 0.5rem)
&:hover, &:focus-visible
outline: none
transform: translateY(-0.1rem)
> h2
font-size: 1.5rem