Compare commits

...

3 Commits

Author SHA1 Message Date
Damillora 08284c78ce fix: spacing 2021-07-11 04:32:15 +07:00
Damillora 12329cb4a8 feat: new post design 2021-07-11 04:23:40 +07:00
Damillora 478d47217b feat: animate caption 2021-07-11 03:35:31 +07:00
7 changed files with 89 additions and 44 deletions

View File

@ -38,7 +38,9 @@ body {
} }
.main { .main {
padding: 1rem; margin: 1rem;
@include px(1rem);
@include screen(sm) { @include screen(sm) {
@include px(2rem); @include px(2rem);
} }

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,9 +1,11 @@
.post-header { .post-header {
width: 100%; width: 100%;
margin-top: 3rem;
margin-bottom: 1rem;
&__heading { &__heading {
@include my(0.5rem); @include my(0.5rem);
&--tag { &--tag {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -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,46 @@
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);
z-index: 120;
@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

@ -18,6 +18,29 @@
.kg-image { .kg-image {
width: 100%; width: 100%;
} }
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: 2rem;
box-shadow: 0px 0px 4px 1px var(--accent-color);
z-index: 120;
@include transition;
@include screen(md) {
padding: 0.5rem 2rem;
}
}
&:hover figcaption {
transform: translateY(100%) translateY(2rem);
}
} }
.kg-width-wide .kg-image { .kg-width-wide .kg-image {
min-width: 100vw; min-width: 100vw;
@ -35,27 +58,6 @@
.kg-width-full .kg-image { .kg-width-full .kg-image {
min-width: 100vw; min-width: 100vw;
} }
.kg-card 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;
@include screen(md) {
padding: 0.5rem 2rem;
}
}
.kg-image-card figcaption {
position: absolute;
bottom: 2rem;
box-shadow: 0px 0px 4px 1px var(--accent-color);
}
.kg-gallery-container { .kg-gallery-container {
min-width: 100vw; min-width: 100vw;
@include screen(md) { @include screen(md) {
@ -149,10 +151,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);
} }