Generateurv2/frontend/styles/exos/Card.module.scss

221 lines
4.2 KiB
SCSS
Raw Normal View History

2022-05-18 10:15:54 +02:00
@import "../variables";
2022-06-11 23:39:03 +02:00
@import "../mixins";
.ex_card--full {
2022-05-18 10:15:54 +02:00
z-index: 1;
2022-06-24 13:42:16 +02:00
min-height: 250px;
2022-05-18 10:15:54 +02:00
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);
2022-06-24 13:42:16 +02:00
@include up(800px) {
transform: translate(5px, -8px);
}
2022-05-18 10:15:54 +02:00
transition: transform 0.4s;
}
&:hover .card_icons {
opacity: 1;
transition: 0.4s;
}
}
2022-06-11 23:39:03 +02:00
.no_hover:hover {
2022-05-18 10:15:54 +02:00
border: none;
transform: none;
//box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.75);
}
2022-06-11 23:39:03 +02:00
%card-hover-effect {
2022-05-18 10:15:54 +02:00
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%;
2022-06-11 23:39:03 +02:00
&:not(.no_hover):hover ~ .card-hover {
2022-05-18 10:15:54 +02:00
@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%;
2022-06-11 23:39:03 +02:00
& p,
a {
2022-05-18 10:15:54 +02:00
position: relative;
margin: 0;
z-index: 15;
2022-06-11 23:39:03 +02:00
&:not(.no_hover):hover {
2022-05-18 10:15:54 +02:00
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;
2022-06-11 23:39:03 +02:00
& ~ .ex_card--footer {
2022-05-18 10:15:54 +02:00
border: 1px solid $primary;
border-top: none;
2022-06-11 23:39:03 +02:00
transition: 0.4s;
2022-05-18 10:15:54 +02:00
}
}
border: 1px solid $border;
width: 100%;
height: 100%;
z-index: 10;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
transition: 0.4s;
2022-06-11 23:39:03 +02:00
&.no_hover span {
2022-05-18 10:15:54 +02:00
position: absolute;
top: 50%;
right: 50%;
width: 30px;
height: 30px;
transform: translate(-50%, -50%);
animation: rotation 1s infinite linear;
}
}
@keyframes rotation {
2022-06-11 23:39:03 +02:00
0% {
transform: translate(0%, -50%) rotate(0deg);
}
100% {
transform: translate(0%, -50%) rotate(360deg);
}
2022-05-18 10:15:54 +02:00
}
.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%;
2022-06-11 23:39:03 +02:00
transition: 0.8s;
2022-05-18 10:15:54 +02:00
border: 1px solid darken($color: $background, $amount: 5);
margin: 0;
z-index: 100;
border-top: none;
2022-06-11 23:39:03 +02:00
transition: 0.4s;
transition: min-height 0.7s border 0.4s;
2022-05-18 10:15:54 +02:00
}
.footer-size {
opacity: 0;
width: 100%;
}
.tag_card {
position: absolute;
min-height: 100%;
2022-06-11 23:39:03 +02:00
transition: 0.7s;
2022-05-18 10:15:54 +02:00
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;
2022-06-11 23:39:03 +02:00
@include color-scroll($background-light, $contrast);
2022-05-18 10:15:54 +02:00
}
.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;
}
2022-06-11 23:39:03 +02:00
.card-deleted {
opacity: 0.5;
}
2022-05-18 10:15:54 +02:00
2022-06-11 23:39:03 +02:00
.icon-container {
position: absolute;
right: 0;
top: 0;
margin: 5%;
z-index: 100;
2022-06-24 13:42:16 +02:00
& svg {
opacity: 0.5;
transition: 0.3s;
&:hover {
opacity: 1;
}
2022-06-11 23:39:03 +02:00
}
}
2022-05-18 10:15:54 +02:00
2022-06-24 13:42:16 +02:00
.registered svg {
2022-06-11 23:39:03 +02:00
opacity: 1;
fill: red;
2022-06-24 13:42:16 +02:00
}