Generateurv2/frontend/styles/exos/Card.module.scss
2022-06-24 13:42:16 +02:00

221 lines
4.2 KiB
SCSS

@import "../variables";
@import "../mixins";
.ex_card--full {
z-index: 1;
min-height: 250px;
background-color: $background;
display: flex;
flex-direction: column;
border-radius: 2px;
cursor: pointer;
position: relative;
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.75);
transform: translate(0, 0);
transition: 0.4s;
&:not(.card-deleted):hover {
/* border: 1px solid $primary;
*/
box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.75);
@include up(800px) {
transform: translate(5px, -8px);
}
transition: transform 0.4s;
}
&:hover .card_icons {
opacity: 1;
transition: 0.4s;
}
}
.no_hover:hover {
border: none;
transform: none;
//box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.75);
}
%card-hover-effect {
border: 1px solid $primary;
transition: 0.4s;
}
.ex_card--content {
color: grey;
font-size: 0.95em;
// margin: 1% 5%;
margin-top: 0;
z-index: 3;
// padding: 1% 5%;
&:not(.no_hover):hover ~ .card-hover {
@extend %card-hover-effect;
}
}
.ex_card--title {
font-size: 1.3em;
margin: 5%;
//padding: 2%;
font-weight: 900;
cursor: pointer;
margin: 0;
max-width: 90%;
& p,
a {
position: relative;
margin: 0;
z-index: 15;
&:not(.no_hover):hover {
color: $primary;
transition: 0.4s;
}
}
}
.ex_card--body {
display: grid;
grid-template-columns: 1fr;
padding: 8%;
grid-gap: calc(1 * 8px); //gap = 2 space = 8px
margin-bottom: 10%;
}
.exemple {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 80%;
}
.card-hover {
&:not(.no_hover):hover {
@extend %card-hover-effect;
& ~ .ex_card--footer {
border: 1px solid $primary;
border-top: none;
transition: 0.4s;
}
}
border: 1px solid $border;
width: 100%;
height: 100%;
z-index: 10;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
transition: 0.4s;
&.no_hover span {
position: absolute;
top: 50%;
right: 50%;
width: 30px;
height: 30px;
transform: translate(-50%, -50%);
animation: rotation 1s infinite linear;
}
}
@keyframes rotation {
0% {
transform: translate(0%, -50%) rotate(0deg);
}
100% {
transform: translate(0%, -50%) rotate(360deg);
}
}
.ex_card--footer-not-tag {
display: grid;
grid-template-columns: 85% auto;
grid-gap: 8px;
}
.ex_card--footer {
background-color: darken($color: $background, $amount: 5);
//min-width: 0;
min-height: 0;
position: absolute;
bottom: 0;
width: 100%;
transition: 0.8s;
border: 1px solid darken($color: $background, $amount: 5);
margin: 0;
z-index: 100;
border-top: none;
transition: 0.4s;
transition: min-height 0.7s border 0.4s;
}
.footer-size {
opacity: 0;
width: 100%;
}
.tag_card {
position: absolute;
min-height: 100%;
transition: 0.7s;
bottom: 0;
z-index: 100;
padding: 2%;
//animation: tagMode 10s forwards;
}
.tag--container {
display: flex;
overflow: auto;
overflow-y: hidden;
scrollbar-width: thin;
scrollbar-color: $contrast $background-light;
@include color-scroll($background-light, $contrast);
}
.ex_card--add-tag {
display: flex;
align-items: center;
z-index: 4;
& hr {
width: 2%;
height: 70%;
border: none;
background-color: black;
}
& p {
margin: auto;
font-size: 1.2em;
font-weight: 900;
width: 100%;
text-align: center;
transition: 0.5s;
&:hover {
transform: rotate(180deg);
}
}
}
.card-progress {
margin-top: auto;
}
.card-deleted {
opacity: 0.5;
}
.icon-container {
position: absolute;
right: 0;
top: 0;
margin: 5%;
z-index: 100;
& svg {
opacity: 0.5;
transition: 0.3s;
&:hover {
opacity: 1;
}
}
}
.registered svg {
opacity: 1;
fill: red;
}