publik-base-theme/static/entrouvert/_carrousel-references.scss

144 lines
2.7 KiB
SCSS

div.carrousel-references-content {
position: relative;
height: 172px;
overflow: hidden;
input {
visibility: hidden;
}
input + div {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
pointer-events: none;
transition: opacity ease 0.5s;
div.carrousel-item {
display: table;
position: relative;
background-position: center center;
box-sizing: border-box;
width: 100%;
height: 100%;
background-size: cover;
padding: 10px;
&::after {
content: "";
display: block;
left: 0;
top: 0;
width: 100%;
height: 100%;
position: absolute;
background: inherit;
opacity: 0.3;
}
div.carrousel-item-content {
> a {
display: block;
color: inherit;
box-sizing: border-box;
}
position: relative;
@if $carrousel-text-position == "middle" {
> a {
padding: 1rem;
margin-left: 6rem;
margin-right: 6rem;
}
display: table-cell;
vertical-align: middle;
p {
margin-left: auto;
margin-right: auto;
}
} @else if $carrousel-text-position == "bottom-left" {
text-align: left;
position: absolute;
bottom: 1rem;
}
z-index: 100;
line-height: 110%;
p {
max-width: 40ex;
}
}
color: white;
font-size: 120%;
text-align: center;
}
}
input:checked + div {
opacity: 1;
pointer-events: auto;
}
div.carrousel-nav {
position: absolute;
@if $carrousel-navigation == "visible" {
display: block;
} @else {
display: none;
}
bottom: 10px;
text-align: center;
width: 100%;
height: 20px;
z-index: 100;
label {
display: inline-block;
margin: 0 10px;
width: 10px;
height: 10px;
border: 1px solid #fff;
border-radius: 50%;
cursor: pointer;
transition: background-color 0.25s;
}
}
a.carrousel-references-previous,
a.carrousel-references-next {
@if $carrousel-arrows == visible {
display: block;
} @else {
display: none;
}
position: absolute;
top: calc(50% - 3rem);
color: #ccc;
height: 6rem;
line-height: 6rem;
width: 6rem;
cursor: pointer;
z-index: 1000;
text-align: center;
&::after {
font-family: FontAwesome;
font-size: 24px;
}
&.carrousel-references-previous {
left: 1ex;
&::after {
content: "\f053"; // chevron-left;
}
}
&.carrousel-references-next {
right: 1ex;
&::after {
content: "\f054"; // chevron-right;
}
}
@media screen and (max-width: $nav-mobile-limit) {
display: none;
}
}
@for $i from 1 through 10 {
.carrousel-radio-#{$i}:checked ~ .carrousel-nav label.carrousel-label-#{$i} {
background-color: $carrousel-navigation-bullet-color;
}
}
}