1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

style: improve SCSS style

This commit is contained in:
Cotes Chung
2022-10-20 02:05:29 +08:00
parent 294e2985c1
commit a6ce765082
15 changed files with 242 additions and 296 deletions

View File

@@ -41,8 +41,6 @@
content: "";
display: inline-block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 12px;
height: 12px;
@@ -53,7 +51,6 @@
box-shadow: 0 0 2px 0 #c2c6cc;
z-index: 1;
}
}
ul {
@@ -65,8 +62,8 @@
text-overflow: ellipsis;
&:nth-child(odd) {
background-color: var(--main-bg, #fff);
background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
background-color: var(--main-bg, #ffffff);
background-image: linear-gradient(to left, #ffffff, #fbfbfb, #fbfbfb, #fbfbfb, #ffffff);
}
&::before {
@@ -81,7 +78,6 @@
&:last-child li:last-child::before {
height: 1.5rem;
}
} /* #archives ul */
.date {
@@ -97,8 +93,7 @@
&.day {
font-size: 85%;
font-family: 'Lato', sans-serif;
font-family: Lato, sans-serif;
}
}
@@ -117,8 +112,6 @@
content: "";
display: inline-block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 8px;
height: 8px;
@@ -130,8 +123,7 @@
z-index: 1;
}
}
} // #archives
} /* #archives */
@media all and (max-width: 576px) {
#archives {

View File

@@ -28,10 +28,8 @@
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
} // .categories
} /* .categories */
.category-trigger {
width: 1.7rem;
@@ -40,18 +38,18 @@
text-align: center;
color: #6c757d !important;
&:hover {
i {
color: var(--categories-icon-hover-color);
}
}
i {
position: relative;
height: 0.7rem;
width: 1rem;
transition: transform 300ms ease;
}
&:hover {
i {
color: var(--categories-icon-hover-color);
}
}
}
@media (hover: hover) { // only works on desktop

View File

@@ -14,7 +14,7 @@
padding: 0.6rem 0;
&::before { // dot
background: #999;
background: #999999;
width: 5px;
height: 5px;
border-radius: 50%;

View File

@@ -4,7 +4,7 @@
.pagination {
color: var(--btn-patinator-text-color);
font-family: 'Lato', sans-serif;
font-family: Lato, sans-serif;
a:hover {
text-decoration: none;
@@ -49,9 +49,8 @@
&:last-child .page-link {
border-radius: 50%;
}
} // .page-item
} // .pagination
} /* .page-item */
} /* .pagination */
#post-list {
margin-top: 1rem;
@@ -83,6 +82,18 @@
em {
@extend %normal-font-style;
}
.pin {
i {
transform: rotate(45deg);
padding-left: 3px;
color: var(--pin-color);
}
span {
display: none;
}
}
}
.post-content {
@@ -100,21 +111,8 @@
-webkit-box-orient: vertical;
}
}
.pin {
> i {
transform: rotate(45deg);
padding-left: 3px;
color: var(--pin-color);
}
> span {
display: none;
}
}
} // .post-preview
} // #post-list
} /* .post-preview */
} /* #post-list */
/* Hide SideBar and TOC */
@media all and (max-width: 830px) {
@@ -125,9 +123,7 @@
&:not(:first-child):not(:last-child) {
display: none;
}
}
}
}
@@ -165,15 +161,12 @@
width: 2rem;
height: 2rem;
}
}
.page-index {
display: none;
}
} // .pagination
} /* .pagination */
}
/* Panel hidden */

View File

@@ -26,6 +26,15 @@
color: var(--text-color);
}
img.preview-img {
margin: 0;
border-radius: 6px;
&.bg[data-loaded="true"] {
background: var(--preview-img-bg);
}
}
h1 + .post-meta {
span + span::before {
@include dot;
@@ -40,23 +49,94 @@ h1 + .post-meta {
}
}
img.preview-img {
margin: 0;
border-radius: 6px;
&.bg[data-loaded=true] {
background: var(--preview-img-bg);
}
}
.post-tail-wrapper {
margin-top: 6rem;
border-bottom: 1px double var(--main-border-color);
font-size: 0.85rem;
.post-tail-bottom a {
color: inherit;
}
.license-wrapper {
line-height: 1.2rem;
> a {
color: var(--text-color);
&:hover {
@extend %link-hover;
}
}
span:last-child {
font-size: 0.85rem;
}
} /* .license-wrapper */
.post-meta a:not(:hover) {
@extend %link-underline;
}
.share-wrapper {
vertical-align: middle;
user-select: none;
.share-icons {
font-size: 1.2rem;
> i {
position: relative;
bottom: 1px;
@extend %cursor-pointer;
&:hover {
@extend %btn-share-hovor;
}
}
a {
&:not(:last-child) {
margin-right: 0.25rem;
}
&:hover {
text-decoration: none;
>i {
@extend %btn-share-hovor;
}
}
}
.fab {
&.fa-twitter {
@include btn-sharing-color(rgba(29, 161, 242, 1));
}
&.fa-facebook-square {
@include btn-sharing-color(rgb(66, 95, 156));
}
&.fa-telegram {
@include btn-sharing-color(rgb(39, 159, 217));
}
&.fa-linkedin {
@include btn-sharing-color(rgb(0, 119, 181));
}
&.fa-weibo {
@include btn-sharing-color(rgb(229, 20, 43));
}
}
} /* .share-icons */
.fas.fa-link {
@include btn-sharing-color(rgb(171, 171, 171));
}
} /* .share-wrapper */
}
.post-tags {
@@ -74,7 +154,7 @@ img.preview-img {
&:hover {
background: #2a408e;
color: #fff;
color: #ffffff;
border-color: #2a408e;
}
@@ -121,7 +201,6 @@ img.preview-img {
margin-top: 0.3rem;
white-space: normal;
}
} /* .post-navigation */
@keyframes fade-up {
@@ -130,6 +209,7 @@ img.preview-img {
position: relative;
top: 2rem;
}
to {
opacity: 1;
position: relative;
@@ -158,7 +238,7 @@ img.preview-img {
}
}
nav[data-toggle=toc] {
nav[data-toggle="toc"] {
.nav {
.nav > li > a.active {
font-weight: 600 !important;
@@ -179,6 +259,20 @@ nav[data-toggle=toc] {
color: var(--relate-post-date);
}
p {
font-size: 0.9rem;
margin-bottom: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
a:hover {
text-decoration: none;
}
.card {
border-color: var(--card-border-color);
background-color: var(--card-bg);
@@ -197,37 +291,6 @@ nav[data-toggle=toc] {
box-shadow: 0 10px 15px -4px rgba(0, 0, 0, 0.15);
}
}
p {
font-size: 0.9rem;
margin-bottom: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
a:hover {
text-decoration: none;
}
ul {
list-style-type: none;
padding-inline-start: 1.5rem;
> li::before {
background: #c2c9d4;
width: 5px;
height: 5px;
border-radius: 1px;
display: block;
content: "";
position: relative;
top: 1rem;
right: 1rem;
}
}
}
#tail-wrapper {
@@ -237,82 +300,15 @@ nav[data-toggle=toc] {
margin-bottom: 2rem;
}
#disqus_thread {
#disqus_thread { /* stylelint-disable-line selector-id-pattern */
min-height: 8.5rem;
}
}
.post-tail-bottom a {
color: inherit;
}
%btn-share-hovor {
color: var(--btn-share-hover-color) !important;
}
.share-wrapper {
vertical-align: middle;
user-select: none;
.share-icons {
font-size: 1.2rem;
a {
&:not(:last-child) {
margin-right: 0.25rem;
}
&:hover {
text-decoration: none;
> i {
@extend %btn-share-hovor;
}
}
}
> i {
position: relative;
bottom: 1px;
@extend %cursor-pointer;
&:hover {
@extend %btn-share-hovor;
}
}
.fab {
&.fa-twitter {
@include btn-sharing-color(rgba(29, 161, 242, 1));
}
&.fa-facebook-square {
@include btn-sharing-color(rgb(66, 95, 156));
}
&.fa-telegram {
@include btn-sharing-color(rgb(39, 159, 217));
}
&.fa-linkedin {
@include btn-sharing-color(rgb(0, 119, 181));
}
&.fa-weibo {
@include btn-sharing-color(rgb(229, 20, 43));
}
}
} /* .share-icons */
.fas.fa-link {
@include btn-sharing-color(rgb(171, 171, 171));
}
} /* .share-wrapper */
.share-label {
@include label(inherit, 400, inherit);
@@ -321,23 +317,6 @@ nav[data-toggle=toc] {
}
}
.license-wrapper {
line-height: 1.2rem;
> a {
color: var(--text-color);
&:hover {
@extend %link-hover;
}
}
span:last-child {
font-size: 0.85rem;
}
} /* .license-wrapper */
@media all and (max-width: 576px) {
.preview-img[data-src] {
margin-top: 2.2rem;

View File

@@ -14,6 +14,6 @@
span {
margin-left: 0.6em;
font-size: 0.7em;
font-family: 'Oswald', sans-serif;
font-family: Oswald, sans-serif;
}
}