feat(landing): add history slides
This commit is contained in:
parent
c4937bd0d1
commit
bf7e64d98d
13 changed files with 433 additions and 130 deletions
|
|
@ -88,6 +88,7 @@ $height: 30rem;
|
|||
|
||||
.carousel__viewport {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
|
@ -106,6 +107,25 @@ $height: 30rem;
|
|||
counter-increment: item;
|
||||
}
|
||||
|
||||
.slide-content {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
|
||||
|
||||
.slide-image {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
figcaption {
|
||||
font-size: .9rem;
|
||||
opacity: 0.9;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slide-inner {
|
||||
}
|
||||
|
||||
// .carousel__slide:nth-child(even) {
|
||||
// background-color: #99f;
|
||||
// }
|
||||
|
|
@ -126,6 +146,7 @@ $height: 30rem;
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
scroll-snap-align: center;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
// @media (hover: hover) {
|
||||
|
|
@ -154,6 +175,7 @@ $height: 30rem;
|
|||
|
||||
.carousel__navigation {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
right: 0;
|
||||
bottom: 1rem;
|
||||
left: 0;
|
||||
|
|
@ -170,8 +192,9 @@ $height: 30rem;
|
|||
display: inline-block;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
background-color: rgba(51, 51, 51, 0.7);
|
||||
background-clip: content-box;
|
||||
background-color: #eeeeee;
|
||||
box-shadow: inset 0 0 2px black;
|
||||
border: 0.25rem solid transparent;
|
||||
border-radius: 50%;
|
||||
font-size: 0;
|
||||
|
|
@ -190,39 +213,45 @@ $height: 30rem;
|
|||
border-radius: 50%;
|
||||
font-size: 0;
|
||||
outline: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.carousel::before,
|
||||
.carousel__prev {
|
||||
left: .5rem;
|
||||
left: -0.5rem;
|
||||
}
|
||||
|
||||
.carousel::after,
|
||||
.carousel__next {
|
||||
right: .5rem;
|
||||
right: -0.5rem;
|
||||
}
|
||||
|
||||
// the big circle navigation button left and right
|
||||
.carousel::before,
|
||||
.carousel::after {
|
||||
content: '';
|
||||
z-index: 1;
|
||||
background-color: #333;
|
||||
background-color: transparent;
|
||||
opacity: 0.65;
|
||||
background-size: 1.5rem 1.5rem;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
color: #fff;
|
||||
font-size: 2.5rem;
|
||||
line-height: 4rem;
|
||||
text-align: center;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.carousel::before:hover, .carousel::after:hover {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.carousel::before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,50 80,100 80,0' fill='%23fff'/%3E%3C/svg%3E");
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,50 80,100 80,0' /%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.carousel::after {
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='100,50 20,100 20,0' fill='%23fff'/%3E%3C/svg%3E");
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='100,50 20,100 20,0' /%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.carousel__navigation-item {
|
||||
|
|
@ -233,7 +262,75 @@ $height: 30rem;
|
|||
.carousel__navigation-item.enabled {
|
||||
.carousel__navigation-button {
|
||||
opacity: 0.5;
|
||||
background-color: #eeeeee;
|
||||
box-shadow: inset 0 0 2px black;
|
||||
background-color: lighten($accent, 0%);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: $md-breakpoint) {
|
||||
$md-height: 45rem;
|
||||
.carousel {
|
||||
height: $md-height !important;
|
||||
}
|
||||
|
||||
.carousel::before,
|
||||
.carousel::after,
|
||||
.carousel__prev,
|
||||
.carousel__next {
|
||||
transform: translateY($md-height/2 - 2rem) !important;
|
||||
}
|
||||
|
||||
.carousel::next {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// layout definitions inside the slides
|
||||
.layout-grid-image {
|
||||
display: grid;
|
||||
grid-column-gap: 2rem;
|
||||
|
||||
|
||||
.image-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.double-image-container {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.layout-grid-image.third {
|
||||
grid-template-columns: 3fr 1fr;
|
||||
}
|
||||
|
||||
.layout-grid-image.half {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
@media (max-width: $md-breakpoint) {
|
||||
.carousel {
|
||||
.layout-grid-image.half {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.layout-grid-image.third {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.image-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.slide-image {
|
||||
height: 19rem;
|
||||
img {
|
||||
width: auto;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue