Shian/src/sass/components/_postcard.scss

124 lines
2.1 KiB
SCSS

.post-card {
position: relative;
width: 100%;
height: 100%;
padding: 1rem;
@include transition;
@include screen(md) {
display: flex;
flex-direction: row;
}
&__image {
position: relative;
width: 100%;
overflow: hidden;
@include screen(md) {
width: 35vw;
min-width: 300px;
max-width: 450px;
}
}
&__image-inner {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
&__image::after {
display: block;
content: '';
padding-bottom: 56.25%;
}
&__info {
@include screen(md) {
padding-left: 1rem;
}
}
&__tag-row {
padding-top: 1rem;
@include screen(md) {
padding-top: 0;
}
}
&__tag-color {
display: inline-block;
padding-right: 0.25rem;
border-radius: 9999px;
vertical-align: text-bottom;
height: 1rem;
width: 1rem;
}
&__tag-name {
display: inline-block;
padding-right: 0.25rem;
font-size: $text-sm;
color: var(--text-color);
}
&__paywall {
display: inline-block;
padding-right: 0.25rem;
font-size: $text-sm;
&:hover {
text-decoration: underline;
}
color: var(--accent-color);
}
&__title {
@include transition;
color: var(--accent-color);
font-size: $text-xl;
font-weight: 300;
@include my(0rem);
@include screen(md) {
font-size: $text-2xl;
}
&:hover {
text-decoration: underline;
}
}
&__time {
@include my(0rem);
font-size: $text-xs;
}
&__author-list {
@include my(0rem);
font-size: $text-xs;
display: flex;
flex-direction: row;
justify-content: center;
@include my(0.5rem);
@include py(0.5rem);
}
&__author-images {
display: flex;
flex-direction: row;
margin-left: 0.25rem;
margin-right: 0.75rem;
}
&__author-image {
border-radius: 9999px;
height: 2rem;
}
&__author-names {
display: flex;
flex-direction: column;
flex-grow: 1;
justify-content: center;
}
&__author-name {
color: var(--text-color);
}
&__excerpt {
margin-top: 0.5rem;
margin-bottom: 1rem;
font-size: $text-sm;
}
}