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 {
padding: 1rem;
margin: 1rem;
@include px(1rem);
@include screen(sm) {
@include px(2rem);
}

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%;
margin-top: 3rem;
margin-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,46 @@
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);
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 {
@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

@ -18,6 +18,29 @@
.kg-image {
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 {
min-width: 100vw;
@ -35,27 +58,6 @@
.kg-width-full .kg-image {
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 {
min-width: 100vw;
@include screen(md) {
@ -149,10 +151,15 @@
}
.site-header {
&.search-enabled {
height: 100%;
}
&.search-enabled &__background {
opacity: 100%;
top: 0;
}
&.search-enabled &__inner {
background: rgba(0, 0, 0, 0.5);
}