portfolios_pgp/themes/academia-hugo/assets/sass/academia/_card.scss

118 lines
2 KiB
SCSS
Raw Normal View History

2021-12-31 12:44:26 +01:00
/*************************************************
* Card component
**************************************************/
.card-simple {
background: #fff;
box-shadow: 0 1px 4px rgba(0,0,0,.04);
border: 1px solid rgba(0,0,0,.09);
border-radius: 3px;
margin-top: 20px;
}
.card-simple:first-of-type {
margin-top: 0;
}
.card-simple p.read-more {
margin: 0;
}
.dark .card-simple {
background: rgb(40, 42, 54);
box-shadow: 0 1px 4px rgba(0,0,0,.04);
border: 1px solid rgb(68, 71, 90);
}
.card {
margin-bottom: 1.5rem;
overflow: hidden;
text-overflow: ellipsis;
background: #fff;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.2);
transition: all 0.2s ease-out;
}
.card .card-image {
display: block;
position: relative;
min-height: 100px;
}
.card h4 {
font-size: 0.9rem;
font-weight: 700;
line-height: 1.5;
text-transform: uppercase;
}
.card h4 a {
color: #000;
border-bottom: solid 1px transparent;
}
.card h4 a:hover {
color: #000;
border-bottom: solid 1px #000;
text-decoration: none;
}
.card .card-text {
padding: 0.75rem 1rem 0.75rem;
}
.card .card-text p {
color: rgba(0,0,0,0.54);
font-size: 0.75rem;
}
.dark .card-text p {
color: rgb(248, 248, 242);
}
.card p:last-child {
margin-bottom: 0;
}
.card .card-image.hover-overlay:before {
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #fff;
content: " ";
opacity: 0;
transition: all 0.2s ease-out;
}
.card .card-image.hover-overlay:after {
display: block;
position: absolute;
left: 0;
top: 50%;
width: 100%;
transform: translate(0, -50%);
opacity: 0;
transition: all 0.2s ease-out;
font-family: 'Font Awesome 5 Free';
font-weight: 900;
content: '\f0c1';
text-align: center;
font-size: 3rem;
color: #666;
}
.card:hover {
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}
.card:hover .card-image.hover-overlay:before {
opacity: 0.8;
}
.card:hover .card-image.hover-overlay:after {
opacity: 0.6;
}