feat: new post design

This commit is contained in:
Damillora 2021-07-11 04:10:22 +07:00
parent 478d47217b
commit 12329cb4a8
6 changed files with 63 additions and 23 deletions

View File

@ -21,10 +21,10 @@
opacity: 0%; opacity: 0%;
top: -23vh; top: -23vh;
&--enabled { }
opacity: 100%; &.enabled &__background {
top: 0; opacity: 100%;
} top: 0;
} }
&__overlay { &__overlay {
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);

View File

@ -10,6 +10,14 @@
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
&--short {
min-height: 3rem;
@include screen(md) {
min-height: 4rem;
}
}
&__heading { &__heading {
color: $white; color: $white;
@include my(0.5rem); @include my(0.5rem);

View File

@ -1,5 +1,7 @@
.post-header { .post-header {
width: 100%; width: 100%;
padding-top: 3rem;
padding-bottom: 1rem;
&__heading { &__heading {
@include my(0.5rem); @include my(0.5rem);
@ -11,12 +13,12 @@
} }
&--tag-text { &--tag-text {
margin-right: 0.5rem; margin-right: 0.5rem;
color: $white;
} }
&--tag-color { &--tag-color {
display: inline-block; display: inline-block;
border-radius: 9999px; border-radius: 9999px;
vertical-align: text-bottom; vertical-align: text-bottom;
margin-right: 0.5rem;
height: 4rem; height: 4rem;
width: 4rem; width: 4rem;
} }
@ -37,7 +39,6 @@
@include my(0.5rem); @include my(0.5rem);
} }
&__title { &__title {
color: $white;
@include my(0.5rem); @include my(0.5rem);
} }
&__author-list { &__author-list {
@ -45,7 +46,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
@include my(0.5rem); @include my(1rem);
} }
&__author-images { &__author-images {
display: flex; display: flex;
@ -64,9 +65,6 @@
flex-grow: 1; flex-grow: 1;
justify-content: center; justify-content: center;
} }
&__author-name {
color: $white;
}
&__social { &__social {
color: $white; color: $white;
} }
@ -80,16 +78,45 @@
font-size: 0.875rem; font-size: 0.875rem;
} }
} }
&__caption-text {
background: var(--bg-color);
color: var(--highlight-color);
padding: 0.25rem 1rem;
border-radius: 1rem;
font-size: $text-sm;
box-shadow: 0px 0px 4px 1px var(--accent-color);
@include screen(md) { &__featured-image {
padding: 0.5rem 2rem; @include my(2rem);
@include mx(0);
display: flex;
flex-direction: column;
align-items: center;
object-fit: contain;
position: relative;
img {
min-width: 100vw;
object-fit: cover;
height: 50vh;
@include screen(md) {
height: 70vh;
}
}
figcaption {
font-size: $text-sm;
background: var(--bg-color);
color: var(--highlight-color);
padding: 0.25rem 1rem;
border-radius: 1rem;
margin-left: 0.5rem;
margin-right: 0.5rem;
text-align: center;
position: absolute;
bottom: 1rem;
box-shadow: 0px 0px 4px 1px var(--accent-color);
@include transition;
@include screen(md) {
padding: 0.5rem 2rem;
}
}
&:hover figcaption {
transform: translateY(100%) translateY(2rem);
} }
} }
} }

View File

@ -1,5 +1,5 @@
.post-list { .post-list {
@include my(2rem); @include my(1rem);
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
row-gap: 1rem; row-gap: 1rem;

View File

@ -12,7 +12,7 @@
text-decoration: underline; text-decoration: underline;
} }
&--post-header { &--post-header {
color: $white; color: var(--text-color);
} }
} }
&__paywall { &__paywall {

View File

@ -38,7 +38,7 @@
} }
} }
&:hover figcaption { &:hover figcaption {
transform: translateY(150%); transform: translateY(100%) translateY(2rem);
} }
} }
.kg-width-wide .kg-image { .kg-width-wide .kg-image {
@ -150,10 +150,15 @@
} }
.site-header { .site-header {
&.search-enabled { &.search-enabled {
height: 100%; height: 100%;
} }
&.search-enabled &__background {
opacity: 100%;
top: 0;
}
&.search-enabled &__inner { &.search-enabled &__inner {
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }