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%;
top: -23vh;
&--enabled {
opacity: 100%;
top: 0;
}
}
&.enabled &__background {
opacity: 100%;
top: 0;
}
&__overlay {
background-color: rgba(0, 0, 0, 0.5);

View File

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

View File

@ -1,9 +1,11 @@
.post-header {
width: 100%;
padding-top: 3rem;
padding-bottom: 1rem;
&__heading {
@include my(0.5rem);
&--tag {
display: flex;
flex-direction: row;
@ -11,12 +13,12 @@
}
&--tag-text {
margin-right: 0.5rem;
color: $white;
}
&--tag-color {
display: inline-block;
border-radius: 9999px;
vertical-align: text-bottom;
margin-right: 0.5rem;
height: 4rem;
width: 4rem;
}
@ -37,7 +39,6 @@
@include my(0.5rem);
}
&__title {
color: $white;
@include my(0.5rem);
}
&__author-list {
@ -45,7 +46,7 @@
display: flex;
flex-direction: row;
justify-content: center;
@include my(0.5rem);
@include my(1rem);
}
&__author-images {
display: flex;
@ -64,9 +65,6 @@
flex-grow: 1;
justify-content: center;
}
&__author-name {
color: $white;
}
&__social {
color: $white;
}
@ -80,16 +78,45 @@
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) {
padding: 0.5rem 2rem;
&__featured-image {
@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 {
@include my(2rem);
@include my(1rem);
display: grid;
grid-template-columns: 1fr;
row-gap: 1rem;

View File

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

View File

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