kazhnuz.css/src/scss/components/_previews.scss

261 lines
4.3 KiB
SCSS
Raw Normal View History

2019-12-07 15:50:12 +01:00
/*
* 4. Previews
* Special style for previews cards
*
*/
$preview-height: 8*$lineheight;
2019-10-17 15:23:55 +02:00
2019-10-08 13:06:59 +02:00
.previews-section {
2019-10-17 15:23:55 +02:00
display: grid;
grid-template-columns: 1fr;
2019-10-17 15:23:55 +02:00
grid-template-rows: auto;
grid-gap: $lineheight;
padding-bottom: $lineheight;
@include xl() {
grid-template-columns: 1fr 1fr;
}
@include xxl() {
grid-template-columns: 1fr 1fr 1fr;
}
2019-10-08 13:06:59 +02:00
}
.preview-container {
2019-10-17 15:23:55 +02:00
width:100%;
2019-10-08 13:06:59 +02:00
}
@media(max-width:767px){}
@media(min-width:768px){}
@media(min-width:992px){
.prev-col-2 .preview-container {
width:50%;
}
.prev-col-3 .preview-container {
width:33%;
}
.prev-col-4 .preview-container {
width:25%;
}
}
.card-preview {
2019-10-17 15:23:55 +02:00
padding:0;
width:100%;
2019-10-08 13:06:59 +02:00
margin:auto;
box-shadow: $large-shadow, $inset-shadow;
}
2021-07-24 16:59:42 +02:00
.preview-link {
padding:0;
background-color: transparent;
2021-07-28 17:00:52 +02:00
margin:0!important;
2019-10-08 13:06:59 +02:00
}
.preview-item {
2019-10-17 15:23:55 +02:00
height: $preview-height;
font-size:0.9rem;
line-height: $lineheight !important;
2019-10-08 13:06:59 +02:00
text-align:justify;
2019-10-17 15:23:55 +02:00
background-color:rgba(0,0,0,0.00);
2019-10-08 13:06:59 +02:00
color:rgba(0,0,0,0.4);
position: relative;
2019-12-07 15:50:12 +01:00
2019-10-08 13:06:59 +02:00
display: flex;
-ms-flex-align: center !important;
align-items: center !important;
justify-content: center;
2019-10-17 15:23:55 +02:00
.preview-overlay {
height: 100%;
width: 100%;
top: 0;
left: 0;
position: absolute;
padding-top: $lineheight_half;
2019-10-17 15:23:55 +02:00
backdrop-filter: none;
transition: background-color 0.3s;
2021-07-28 17:36:04 +02:00
@include border-radius();
2019-10-17 15:23:55 +02:00
h1, h2, h3, h4, h5, h6 {
2021-07-25 14:12:29 +02:00
color: $color-font-light;
2019-10-17 15:23:55 +02:00
font-size: 1rem;
line-height: $lineheight;
font-weight:$fontweight_big;
2019-10-17 15:23:55 +02:00
}
.card-header {
font-family: $basefont;
2019-10-17 15:23:55 +02:00
font-size: 1rem;
background-color: $color-primary;
@include card-header($lineheight_half);
font-weight: $fontweight_big;
2021-07-28 17:00:52 +02:00
margin-top:0px;
2019-10-17 15:23:55 +02:00
}
}
2019-10-08 13:06:59 +02:00
2019-10-17 15:23:55 +02:00
&:hover {
.preview-overlay {
backdrop-filter: blur(2px);
background-color:rgba(0,0,0,0.4);
2019-10-08 13:06:59 +02:00
.metadata-pills {
2019-10-17 15:23:55 +02:00
opacity: .9;
transition: opacity .5s, height .5s;
height:135px;
2019-10-17 15:23:55 +02:00
}
}
}
2019-10-08 13:06:59 +02:00
}
2019-10-17 15:23:55 +02:00
.preview-content {
max-height: $preview-height;
overflow:hidden;
background-size: cover;
min-height:100%;
min-width:100%;
2021-07-28 17:36:04 +02:00
@include border-radius();
2019-10-08 13:06:59 +02:00
2019-10-17 15:23:55 +02:00
h1, h2, h3, h4, h5, h6 {
margin-bottom:0px;
max-width:100%;
display:none;
}
2019-10-08 13:06:59 +02:00
2019-10-17 15:23:55 +02:00
& > p {
width:100%;
margin:auto;
& > img {
max-width:100%;
height:auto;
vertical-align:middle;
margin:auto;
text-align:center;
}
&.p-img {
text-align:center;
margin:auto;
padding:auto;
display: block;
width:100%;
}
}
2019-10-08 13:06:59 +02:00
}
2019-10-17 15:23:55 +02:00
.preview-metadata {
2021-07-25 14:12:29 +02:00
color: $color-font-light;
height:165px;
overflow: hidden;
2021-07-28 17:36:04 +02:00
@include border-radius();
.metadata-pills {
height:165px;
opacity: 0;
transition: opacity .3s, height .3s;
display:flex;
justify-content:space-between;
padding-left: $lineheight/2;
padding-right: $lineheight/2;
2021-07-24 16:59:42 +02:00
font-size:0.9em;
}
2019-10-08 13:06:59 +02:00
}
.card-preview.card-info {
.comment-text {
2021-07-25 14:12:29 +02:00
@include angled-edge('outside top', 'upper left', $color-info, 16);
background-color:$color-info;
}
}
.card-preview.card-grey {
.comment-text {
2021-07-25 14:12:29 +02:00
@include angled-edge('outside top', 'upper left', $color-muted, 16);
background-color:$color-muted;
}
}
2019-10-08 13:06:59 +02:00
.comment-text {
2021-07-25 14:12:29 +02:00
@include angled-edge('outside top', 'upper left', $color-primary, 16);
color: $color-font-light;
background-color:$color-primary;
text-align: center;
2019-10-08 13:06:59 +02:00
}
.card-preview time {
margin-bottom:0.4em;
display:block;
}
2019-10-17 10:26:19 +02:00
2019-10-17 15:23:55 +02:00
// Author area
2019-10-17 10:26:19 +02:00
.author-area {
display:flex;
2021-07-24 16:59:42 +02:00
img.author-avatar, img.avatar {
2019-10-17 10:26:19 +02:00
display:block;
height: 4.5rem;
width:auto;
border-radius:100%;
padding:0;
margin:0;
margin-right:$lineheight;
2019-10-17 10:26:19 +02:00
}
.author-metadata {
align-items:center;
display:flex;
flex-direction:column;
justify-content: center;
align-items: flex-start;
}
.author-date {
font-style:italic;
}
&:not(:last-child) {
margin-bottom:$lineheight;
2019-10-17 10:26:19 +02:00
}
2019-10-18 13:41:02 +02:00
}
.pigimg {
display:block;
max-width: 100%;
height:auto;
margin:auto;
}
2021-07-24 16:59:42 +02:00
.avatar {
background: transparent;
2019-10-18 13:41:02 +02:00
}
2021-07-24 16:59:42 +02:00
.mwarea {
padding-bottom: $lineheight;
.avatar {
width:80%;
height:auto;
display:block;
margin:auto;
}
2019-12-07 15:50:12 +01:00
}
.cover {
width:100%;
height:auto;
}
.roman {
@include md() {
width:80%;
position:relative;
top:-240px;
margin:auto;
}
}