1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 21:53:26 +00:00

Redesign the post meta layout

- posted date
- updated date
- read time
- license statement of post bottom
- also refactor the `timeago.js`
This commit is contained in:
Cotes Chung
2021-12-04 06:56:33 +08:00
parent 6220d09ffb
commit 563e8085e8
14 changed files with 113 additions and 112 deletions

View File

@@ -74,10 +74,14 @@
.post-meta {
i {
font-size: 0.73rem;
&:not(:first-child) {
margin-left: 1.2rem;
}
}
span:not(:last-child) {
margin-right: 1.2rem;
em {
@extend %normal-font-style;
}
}

View File

@@ -16,18 +16,19 @@
border-color: var(--btn-border-color);
}
@mixin dot($pl: 0.2rem, $pr: 0.4rem) {
@mixin dot($pl: 0.25rem, $pr: 0.25rem) {
content: "\2022";
color: rgba(158, 158, 158, 0.8);
padding-left: $pl;
padding-right: $pr;
}
h1 + .post-meta {
> div:nth-child(2) {
> span:not(:first-child)::before {
@include dot;
}
span + span::before {
@include dot;
}
em {
color: var(--text-color);
}
}
@@ -165,6 +166,10 @@ nav[data-toggle=toc] {
@include label(1.1rem, 600);
}
em {
@extend %normal-font-style;
}
.card {
border-color: var(--card-border-color);
background-color: var(--card-bg);
@@ -308,7 +313,7 @@ nav[data-toggle=toc] {
line-height: 1.2rem;
> a {
font-weight: 600;
color: var(--text-color);
&:hover {
@extend %link-hover;
@@ -338,23 +343,6 @@ nav[data-toggle=toc] {
}
}
@media all and (min-width: 768px) {
#core-wrapper {
h1 + .post-meta {
> div:not(:first-child)::before {
@include dot(0.5rem, 0.2rem);
}
&.flex-column {
-webkit-box-orient: horizontal !important;
-webkit-box-direction: normal !important;
-ms-flex-direction: row !important;
flex-direction: row !important;
}
}
} // .post
}
/* Hide SideBar and TOC */
@media all and (max-width: 830px) {
.post-navigation {