python-gallery/gallery/static/sass/components/banner.sass

190 lines
3.6 KiB
Sass
Raw Normal View History

2023-04-04 19:36:24 +00:00
.banner,
.banner-small
width: 100%
position: relative
2023-03-25 16:22:32 +00:00
color: RGB($fg-white)
.link
color: inherit
cursor: pointer
text-decoration: underline
&:hover
text-decoration: none
2023-04-02 21:15:51 +00:00
&::after
content: ''
width: $rad
height: calc(#{$rad} * 2)
position: absolute
2023-04-02 21:15:51 +00:00
bottom: calc(#{$rad} * -2)
left: 0
2023-04-02 21:15:51 +00:00
background-color: RGB($bg-bright)
border-radius: $rad 0 0 0
box-shadow: 0 calc(#{$rad} * -1) 0 0 RGB($bg-100)
2023-04-04 19:36:24 +00:00
.banner
height: 30rem
background-color: RGB($bg-300)
2023-04-02 21:15:51 +00:00
img
position: absolute
inset: 0
width: 100%
height: 100%
2023-04-02 21:15:51 +00:00
background-color: inherit
object-fit: cover
object-position: center center
.banner-filter
position: absolute
2023-04-02 21:15:51 +00:00
inset: 0
width: 100%
height: 100%
2023-03-25 16:22:32 +00:00
background: linear-gradient(to right, RGB($primary), transparent)
z-index: +1
.banner-content
2023-04-04 19:36:24 +00:00
padding: 0.5rem
width: 100%
2023-04-04 19:36:24 +00:00
height: auto
2023-04-02 21:15:51 +00:00
position: absolute
2023-04-04 19:36:24 +00:00
left: 0
bottom: 0
2023-04-04 19:36:24 +00:00
display: grid
grid-template-columns: 1fr auto
grid-template-rows: 1fr auto auto
grid-template-areas: 'info info' 'header header' 'subtitle options'
gap: 0.5rem
z-index: +2
2023-04-04 19:36:24 +00:00
.banner-header,
.banner-info,
.banner-subtitle
margin: 0
padding: 0
2023-04-02 21:15:51 +00:00
width: 100%
2023-04-04 19:36:24 +00:00
.banner-header
grid-area: header
2023-04-02 21:15:51 +00:00
text-align: left
font-size: 6.9rem
font-weight: 800
2023-03-25 16:22:32 +00:00
color: RGB($primary)
2023-04-04 19:36:24 +00:00
.banner-info
grid-area: info
font-size: 1rem
font-weight: 600
.banner-subtitle
grid-area: subtitle
font-size: 1rem
font-weight: 600
2023-04-04 19:36:24 +00:00
.pill-row
margin-top: auto
grid-area: options
2023-04-04 19:36:24 +00:00
.banner-small
height: 3.5rem
background-color: RGB($bg-100)
2023-04-04 19:36:24 +00:00
.banner-content
padding: 0.5rem
2023-04-04 19:36:24 +00:00
width: 100%
height: 100%
2023-04-04 19:36:24 +00:00
position: absolute
inset: 0
display: flex
flex-direction: row
justify-content: flex-start
2023-04-04 19:36:24 +00:00
gap: 1rem
z-index: +2
.banner-header,
.banner-info
margin: auto 0
padding: 0
width: auto
height: auto
justify-self: flex-start
.banner-header
padding-bottom: 0.25rem
2023-04-02 21:15:51 +00:00
2023-04-04 19:36:24 +00:00
white-space: nowrap
text-overflow: ellipsis
overflow: hidden
text-align: left
font-weight: 800
font-size: 1.5rem
color: RGB($primary)
.banner-info
font-size: 0.9rem
font-weight: 600
.pill-row
margin-left: auto
2023-04-04 19:36:24 +00:00
width: auto
@media (max-width: $breakpoint)
.banner,
.banner-small
2023-04-02 21:15:51 +00:00
&::after
display: none
2023-04-04 19:36:24 +00:00
.banner
min-height: 17rem
height: auto
.banner-content
padding: 0.5rem
2023-04-04 19:36:24 +00:00
height: 100%
display: flex
2023-04-04 19:36:24 +00:00
flex-direction: column
justify-content: center
align-items: center
2023-04-04 19:36:24 +00:00
gap: 0.25rem
2023-04-04 19:36:24 +00:00
.banner-header
text-align: center
font-size: 2.5rem
.banner-info
font-size: 1.1rem
text-align: center
.banner-subtitle
display: none
2023-04-04 19:36:24 +00:00
.pill-row
margin-top: 1rem
2023-04-05 11:22:21 +00:00
.banner-small
.banner-content
.banner-info
display: none