Compare commits

...

5 Commits
v3.1.0 ... main

Author SHA1 Message Date
08284c78ce fix: spacing 2021-07-11 04:32:15 +07:00
12329cb4a8 feat: new post design 2021-07-11 04:23:40 +07:00
478d47217b feat: animate caption 2021-07-11 03:35:31 +07:00
77c6d76d46 feat: new caption design 2021-07-11 03:19:24 +07:00
a1d30b3b13 chore: update depends 2021-07-11 01:01:07 +07:00
8 changed files with 552 additions and 445 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);
@ -36,6 +44,7 @@
&__contents { &__contents {
z-index: 1; z-index: 1;
width: 100%;
padding-top: 3rem; padding-top: 3rem;
@include screen(md) { @include screen(md) {
padding-top: 4rem; padding-top: 4rem;

View File

@ -1,4 +1,8 @@
.post-header { .post-header {
width: 100%;
margin-top: 3rem;
margin-bottom: 1rem;
&__heading { &__heading {
@include my(0.5rem); @include my(0.5rem);
@ -9,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;
} }
@ -35,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 {
@ -43,8 +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);
@include py(0.5rem);
} }
&__author-images { &__author-images {
display: flex; display: flex;
@ -63,10 +65,59 @@
flex-grow: 1; flex-grow: 1;
justify-content: center; justify-content: center;
} }
&__author-name {
color: $white;
}
&__social { &__social {
color: $white; color: $white;
} }
&__caption {
text-align: center;
font-size: 0.75rem;
margin-top: 0;
margin-bottom: 0;
@include screen(md) {
text-align: center;
font-size: 0.875rem;
}
}
&__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);
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

@ -13,9 +13,34 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
object-fit: contain; object-fit: contain;
position: relative;
.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;
@ -33,13 +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;
color: var(--highlight-color);
margin-top: 0.5rem;
text-align: center;
}
.kg-gallery-container { .kg-gallery-container {
min-width: 100vw; min-width: 100vw;
@include screen(md) { @include screen(md) {
@ -133,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);
} }

868
yarn.lock

File diff suppressed because it is too large Load Diff