Rewrite styles with SCSS.

This commit is contained in:
Cotes Chung 2020-02-25 17:56:03 +08:00
parent f353c7a97b
commit 73d1027acc
10 changed files with 1165 additions and 1104 deletions

View File

@ -47,6 +47,19 @@
--footnote-target-bg: rgb(63, 81, 181); --footnote-target-bg: rgb(63, 81, 181);
--btn-sharing: #6c757d; --btn-sharing: #6c757d;
/* tags */
--tag-border: rgb(59, 79, 88);
--tag-shadow: rgb(32, 33, 33);
/* categories */
--categories-hover-bg: rgb(73, 75, 76);
/* archives */
--timeline-node-bg: rgb(150, 152, 156);
/* Footer */
---footer-link: rgb(146, 146, 146);
hr { hr {
border-color: var(--main-border); border-color: var(--main-border);
} }
@ -68,40 +81,29 @@
background-color: var(--card-bg); background-color: var(--card-bg);
} }
.categories .card-header { .categories {
background-color: var(--card-header-bg); .card-header {
background-color: var(--card-header-bg);
}
.list-group-item {
// @extend %category-bg;
border-left: none;
border-right: none;
padding-left: 2rem;
border-color: var(--main-border);
&:last-child {
border-bottom-color: var(--card-bg);
}
}
} }
.categories .list-group-item {
border-left: none;
border-right: none;
padding-left: 2rem;
border-color: var(--main-border);
}
.categories .list-group-item:last-child {
border-bottom-color: var(--card-bg);
}
/* tags */
--tag-border: rgb(59, 79, 88);
--tag-shadow: rgb(32, 33, 33);
/* categories */
--categories-hover-bg: rgb(73, 75, 76);
/* archives */
--timeline-node-bg: rgb(150, 152, 156);
#archives li:nth-child(odd) { #archives li:nth-child(odd) {
background-image: linear-gradient(to left, background-image: linear-gradient(to left,
rgb(26, 26, 30), rgb(39, 39, 45), rgb(39, 39, 45), rgb(39, 39, 45), rgb(26, 26, 30)); rgb(26, 26, 30), rgb(39, 39, 45), rgb(39, 39, 45), rgb(39, 39, 45), rgb(26, 26, 30));
} }
/* Footer */ } // dark-scheme
---footer-link: rgb(146, 146, 146);
}
@mixin light-mode-invisible { @mixin light-mode-invisible {

84
assets/css/_module.scss Normal file
View File

@ -0,0 +1,84 @@
/*
* Mainly scss modules, only imported to `assets/css/main.scss`
*
* v2.1
* https://github.com/cotes2020/jekyll-theme-chirpy
* © 2020 Cotes Chung
* MIT Licensed
*/
/*---------- scss placeholder ---------*/
%tag-hover {
background: var(--tag-hover, rgb(222, 226, 230));
transition: background 0.35s ease-in-out;
}
%table-cell {
padding: .35rem .8rem;
font-size: 95%;
}
%link-hover {
color: #d2603a!important;
border-bottom: 1px solid #d2603a;
text-decoration: none;
}
%link-color {
color: var(--link-color, #2a408e);
}
%no-bottom-border {
border-bottom: none;
}
%section {
line-height: 1.2;
margin-bottom: 1rem;
}
%anchor {
padding-top: 3.5rem;
margin-top: -2.5rem;
}
%footer-content {
font-weight: 600;
color: var(---footer-link, inherit);
}
/*---------- scss mixin ---------*/
@mixin no-text-decoration {
text-decoration: none;
}
@mixin sidebar-icon {
color: rgba(255, 255, 255, 0.5);
transition: color 0.35s ease-in-out;
user-select: none;
margin: 0 .25rem;
}
@mixin icon-round($diameter) {
border: 1px solid;
border-radius: 50%;
width: $diameter;
height: $diameter;
}
@mixin ml-mr($value) {
margin-left: $value;
margin-right: $value;
}
@mixin pl-pr($val) {
padding-left: $val;
padding-right: $val;
}
@mixin input-placeholder {
opacity: 0.6;
}

View File

@ -8,109 +8,9 @@
MIT License MIT License
*/ */
#archives { $dot-color: #c2c6cc;
letter-spacing: 0.03rem;
}
#archives li { %date-timeline {
font-size: 1.1rem;
line-height: 3rem;
}
#archives li:nth-child(odd) {
background-color: var(--main-wrapper-bg, #fff);
background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
}
#archives li>div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#archives span.lead {
font-size: 1.5rem;
font-family: 'Oswald', sans-serif;
position: relative;
left: 8px;
}
#archives span.lead:not(:first-child) {
position: relative;
left: 4px;
}
#archives span.lead:not(:first-child)::after {
left: 67px;
}
#archives span.lead::after { /* Year dot */
content: "";
display: block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 12px;
height: 12px;
top: -26px;
left: 63px;
border: 3px solid;
background-color: var(--main-border, #ffffff);
border-color: var(--timeline-node-bg, #c2c6cc);
box-shadow: 0 0 2px 0 #c2c6cc;
z-index: 1;
}
#archives .date {
white-space: nowrap;
display: inline-block;
}
#archives .date.month {
width: 1.4rem;
text-align: center;
font-family: 'Oswald', sans-serif;
}
#archives .date.day {
font-size: 85%;
font-family: sans-serif;
text-align: center;
margin-right: -2px;
width: 1.2rem;
position: relative;
left: -.15rem;
}
#archives ul>li>div>a {
/* post title in Archvies */
margin-left: 2.5rem;
position: relative;
top: .1rem;
}
#archives .date.month ~ a::before {
/* A dot for Month and Day */
content: "";
display: inline-block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 8px;
height: 8px;
float: left;
top: 1.35rem;
left: 69px;
background-color: var(--timeline-node-bg, #c2c6cc);
box-shadow: 0 0 3px 0 #c2c6cc;
z-index: 1;
}
/* timeline for date */
#archives ul>li::after,
#archives ul>li:first-child::before {
content: ""; content: "";
width: 4px; width: 4px;
left: 75px; left: 75px;
@ -120,30 +20,127 @@
background-color: var(--main-border, rgba(0, 0, 0, 0.075)); background-color: var(--main-border, rgba(0, 0, 0, 0.075));
} }
#archives ul>li::after { #archives {
height: 2.8rem; letter-spacing: 0.03rem;
top: -1.3rem; li {
} font-size: 1.1rem;
line-height: 3rem;
&:nth-child(odd) {
background-color: var(--main-wrapper-bg, #fff);
background-image: linear-gradient(to left, #fff, #fbfbfb, #fbfbfb, #fbfbfb, #fff);
}
>div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
#archives ul>li:first-child::before { span.lead {
height: 3.06rem; font-size: 1.5rem;
top: -1.61rem; font-family: 'Oswald', sans-serif;
} position: relative;
left: 8px;
#archives ul:not(:last-child)>li:last-child::after { &:not(:first-child) {
height: 3.4rem; position: relative;
} left: 4px;
&::after {
left: 67px;
}
}
&::after {
/* Year dot */
content: "";
display: block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 12px;
height: 12px;
top: -26px;
left: 63px;
border: 3px solid;
background-color: var(--main-border, #ffffff);
border-color: var(--timeline-node-bg, $dot-color);
box-shadow: 0 0 2px 0 $dot-color;
z-index: 1;
}
} // #archives span.lead
.date {
white-space: nowrap;
display: inline-block;
&.month {
width: 1.4rem;
text-align: center;
font-family: 'Oswald', sans-serif;
~a::before {
/* A dot for Month and Day */
content: "";
display: inline-block;
position: relative;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 8px;
height: 8px;
float: left;
top: 1.35rem;
left: 69px;
background-color: var(--timeline-node-bg, $dot-color);
box-shadow: 0 0 3px 0 $dot-color;
z-index: 1;
}
}
&.day {
font-size: 85%;
font-family: sans-serif;
text-align: center;
margin-right: -2px;
width: 1.2rem;
position: relative;
left: -.15rem;
}
} // #archives .date
ul {
>li {
>div>a {
/* post title in Archvies */
margin-left: 2.5rem;
position: relative;
top: .1rem;
}
&::after {
@extend %date-timeline;
height: 2.8rem;
top: -1.3rem;
}
&:first-child::before {
@extend %date-timeline;
height: 3.06rem;
top: -1.61rem;
}
}
&:not(:last-child)>li:last-child::after {
height: 3.4rem;
}
&:last-child>li:last-child::after {
display: none;
}
} // #archives ul
} // #archives
#archives ul:last-child>li:last-child::after {
display: none;
}
@media all and (max-width: 576px) { @media all and (max-width: 576px) {
#archives { #archives {
margin-top: -1rem; margin-top: -1rem;
} ul {
letter-spacing: 0;
#archives ul { }
letter-spacing: 0;
} }
} }

View File

@ -8,35 +8,43 @@
MIT License MIT License
*/ */
.categories { %category-icon-color {
margin-bottom: 2rem;
}
.categories .card-header {
padding-right: 12px;
}
.categories .card-header>span>i:first-child,
.categories .list-group-item>i {
color: gray; color: gray;
} }
.categories .list-group-item { .categories {
border-left: none; margin-bottom: 2rem;
border-right: none; .card-header {
padding-left: 2rem; padding-right: 12px;
} }
.list-group-item {
border-left: none;
border-right: none;
padding-left: 2rem;
}
.categories .collapsing .list-group-item:first-child, .card-header>span>i:first-child {
.categories .collapse .list-group-item:first-child { @extend %category-icon-color;
border-top-left-radius: 0; }
border-top-right-radius: 0;
}
.categories i.far, .list-group-item {
.categories i.fas { // fontawesome icons >i {
font-size: 86%; @extend %category-icon-color;
} }
.collapsing &:first-child,
.collapse &:first-child {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}
i {
&.far, &.fas {
font-size: 86%; // fontawesome icons
}
}
} // .categories
.category-trigger { .category-trigger {
width: 1.7rem; width: 1.7rem;
@ -44,6 +52,12 @@
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
color: #6c757d!important; color: #6c757d!important;
>i.fas {
position: relative;
height: .7rem;
width: 1rem;
transition: 300ms ease all;
}
} }
@media (hover: hover) { // only works on desktop @media (hover: hover) { // only works on desktop
@ -52,15 +66,8 @@
} }
} }
.category-trigger>i.fas {
position: relative;
height: .7rem;
width: 1rem;
transition: 300ms ease all;
}
.rotate { .rotate {
-ms-transform: rotate(-90deg); /* IE 9 */ -ms-transform: rotate(-90deg); /* IE 9 */
-webkit-transform: rotate(-90deg); /* Safari 3-8 */ -webkit-transform: rotate(-90deg); /* Safari 3-8 */
transform: rotate(-90deg); transform: rotate(-90deg);
} }

View File

@ -8,33 +8,29 @@
MIT License MIT License
*/ */
#page-category ul>li, #page-category, #page-tag {
#page-tag ul>li { ul>li {
line-height: 1.5rem; line-height: 1.5rem;
padding: .6rem 0; padding: .6rem 0;
} &::before { // dot
background: #999;
#page-category ul>li::before, width: 5px;
#page-tag ul>li::before { height: 5px;
background: #999; border-radius: 50%;
width: 5px; display: block;
height: 5px; content: "";
border-radius: 50%; position: relative;
display: block; top: .6rem;
content: ""; margin-right: .5rem;
position: relative; }
top: .6rem; >a { /* post's title */
margin-right: .5rem; font-size: 1.1rem;
} }
>span:last-child {
#page-tag ul>li>a, white-space: nowrap;
#page-category ul>li>a, { /* post's title */ }
font-size: 1.1rem; /* post's date */
} }
#page-category ul>li>span:last-child,
#page-tag ul>li>span:last-child { /* post's date */
white-space: nowrap;
} }
#page-tag h1>i { // tag icon #page-tag h1>i { // tag icon
@ -45,10 +41,12 @@
font-size: 1.25rem; font-size: 1.25rem;
} }
#page-category a:hover, a:hover {
#page-tag a:hover, #page-category &,
#access-lastmod a:hover { #page-tag &,
margin-bottom: -1px; // Avoid jumping #access-lastmod & {
margin-bottom: -1px; // Avoid jumping
}
} }
.dash { .dash {
@ -57,17 +55,16 @@
} }
@media all and (max-width: 576px) { @media all and (max-width: 576px) {
#page-category, #page-tag {
#page-category ul>li::before, ul>li {
#page-tag ul>li::before { &::before {
margin: 0 .5rem; margin: 0 .5rem;
}
>a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
} }
#page-tag ul>li>a,
#page-category ul>li>a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
} }

View File

@ -1,6 +1,5 @@
--- ---
--- ---
/*! /*!
Style for Homepage Style for Homepage
v2.0 v2.0
@ -12,95 +11,90 @@
#post-list { #post-list {
margin-top: 1rem; margin-top: 1rem;
padding-right: .5rem; padding-right: .5rem;
.post-meta {
i:not(:first-child) { // post-meta icons on HOME
margin-left: 1.5rem;
}
}
} }
.pagination { .pagination {
font-size: 1rem; font-size: 1rem;
} a:hover {
text-decoration: none;
.pagination a:hover { }
text-decoration: none;
} }
.post-preview { .post-preview {
padding-top: 1.5rem; padding-top: 1.5rem;
padding-bottom: 1rem; padding-bottom: 1rem;
border-bottom: 1px solid rgba(158, 158, 158, 0.17); border-bottom: 1px solid rgba(158, 158, 158, 0.17);
>h1 {
font-size: 1.4rem;
margin: 0;
}
i.far { /* fontawesome icons */
font-size: 86%;
}
.post-content {
margin-top: .6rem;
margin-bottom: .6rem;
color: var(--text-color, dimgray);
>p { /* Make preview shorter in Home page*/
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
} }
.post-preview>h1 { .page-item {
font-size: 1.4rem; .page-link {
margin: 0; color: var(--text-color, #555555);
} width: 2.5rem;
height: 2.5rem;
padding: 0;
text-align: center;
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
border-radius: 50%;
border: 1px solid var(--main-border, #f1f1f1);
font-family: 'Lato', sans-serif;
background-color: var(--button-bg);
}
&.active {
.page-link {
background-color: var(--btn-active-bg, #2a408e);
border-color: var(--btn-active-border-color, #007bff);
box-shadow: 0 0 8px 0 var(--main-wrapper-bg, #4b92d2) !important;
color: var(--text-color, #f8f8f8);
}
}
&.disabled {
cursor: not-allowed;
.page-link {
color: rgba(108, 117, 125, 0.57);
border-color: var(--main-border, #f1f1f1);
background-color: var(--button-bg);
}
}
&:first-child .page-link,
&:last-child .page-link {
border-radius: 50%;
}
&:not(:last-child) {
margin-right: 0.6rem;
}
.post-preview i.far { } // .page-item
/* fontawesome icons */
font-size: 86%;
}
.post-preview .post-content {
margin-top: .6rem;
margin-bottom: .6rem;
color: var(--text-color, dimgray);
}
/* Make preview shorter in Home page*/
.post-preview .post-content>p {
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.page-item .page-link {
color: var(--text-color, #555555);
width: 2.5rem;
height: 2.5rem;
padding: 0;
text-align: center;
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
border-radius: 50%;
border: 1px solid var(--main-border, #f1f1f1);
font-family: 'Lato', sans-serif;
background-color: var(--button-bg);
}
.page-item.active .page-link {
background-color: var(--btn-active-bg, #2a408e);
border-color: var(--btn-active-border-color, #007bff);
box-shadow: 0 0 8px 0 var(--main-wrapper-bg, #4b92d2) !important;
color: var(--text-color, #f8f8f8);
}
.page-item.disabled .page-link {
color: rgba(108, 117, 125, 0.57);
border-color: var(--main-border, #f1f1f1);
background-color: var(--button-bg);
}
.page-item.disabled {
cursor: not-allowed;
}
.page-item:first-child .page-link,
.page-item:last-child .page-link {
border-radius: 50%;
}
.page-item:not(:last-child) {
margin-right: 0.6rem;
}
#post-list .post-meta i:not(:first-child) { // post-meta icons on HOME
margin-left: 1.5rem;
}
@media all and (max-width: 576px) { @media all and (max-width: 576px) {
#post-list .post-meta>span i:not(:first-child) { #post-list .post-meta>span i:not(:first-child) {

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,20 @@
$prompt-older: "{{ site.data.label.post.button.previous }}"; $prompt-older: "{{ site.data.label.post.button.previous }}";
$prompt-newer: "{{ site.data.label.post.button.next }}"; $prompt-newer: "{{ site.data.label.post.button.next }}";
@mixin btn-sharing-color($light-color, $important: false) {
@if $important {
color: var(--btn-sharing, $light-color)!important;
} @else {
color: var(--btn-sharing, $light-color);
}
}
@mixin btn-post-nav {
width: 50%;
position: relative;
border-color: var(--main-border, #e9ecef);
}
.post img { .post img {
margin-top: .5rem; margin-top: .5rem;
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
@ -34,37 +48,27 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
padding-top: 3rem; padding-top: 3rem;
padding-bottom: 2rem; padding-bottom: 2rem;
@mixin post-nav-btn {
width: 50%;
position: relative;
border-color: var(--main-border, #e9ecef);
}
.btn { .btn {
@include post-nav-btn; @include btn-post-nav;
color: var(--link-color, #2a408e); color: var(--link-color, #2a408e);
} &:hover {
background: #2a408e;
.btn:hover { color: #fff;
background: #2a408e; border-color: #2a408e;
color: #fff; }
border-color: #2a408e; &.disabled {
} @include btn-post-nav;
pointer-events: auto;
.btn.disabled { cursor: not-allowed;
@include post-nav-btn; background: none;
pointer-events: auto; color: gray;
cursor: not-allowed; &:hover {
background: none; border-color: none;
color: gray; }
} }
&.btn-outline-primary.disabled:focus {
.btn.disabled:hover { box-shadow: none;
border-color: none; }
}
.btn.btn-outline-primary.disabled:focus {
box-shadow: none;
} }
p { p {
@ -74,38 +78,30 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
white-space: normal; white-space: normal;
} }
a::before, a, span {
span::before { &::before {
color: var(--text-muted-color, gray); color: var(--text-muted-color, gray);
font-size: .65rem; font-size: .65rem;
text-transform: uppercase; text-transform: uppercase;
}
&:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
left: .5px;
&::before {
content: $prompt-older
}
}
&:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
right: .5px;
&::before {
content: $prompt-newer
}
}
} }
} // .post-navigation
a:first-child,
span:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
left: .5px;
}
a:last-child,
span:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
right: .5px;
}
a:first-child::before,
span:first-child::before {
content: $prompt-older
}
a:last-child::before,
span:last-child::before {
content: $prompt-newer
}
}
@keyframes fade-up { @keyframes fade-up {
from { from {
@ -127,16 +123,14 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
top: 2rem; top: 2rem;
transition: top 0.2s ease-in-out; transition: top 0.2s ease-in-out;
animation: fade-up .8s; animation: fade-up .8s;
} &.topbar-down {
top: 6rem;
#toc-wrapper.topbar-down { }
top: 6rem; >h3 {
} font-size: 1rem;
font-family: 'Oswald', sans-serif;
#toc-wrapper>h3 { color: gray;
font-size: 1rem; }
font-family: 'Oswald', sans-serif;
color: gray;
} }
#toc li>a { #toc li>a {
@ -148,13 +142,12 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
/*--- Related Posts ---*/ /*--- Related Posts ---*/
#related-posts > h3 {
color: gray;
font-size: 1.1rem;
font-family: 'Oswald', sans-serif;
}
#related-posts { #related-posts {
>h3 {
color: gray;
font-size: 1.1rem;
font-family: 'Oswald', sans-serif;
}
.card { .card {
border: 1px solid var(--main-wrapper-bg, #f1f1f1); border: 1px solid var(--main-wrapper-bg, #f1f1f1);
background-color: var(--card-bg); background-color: var(--card-bg);
@ -165,12 +158,11 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
h3 { h3 {
color: var(--relate-post-title, #353a3d); color: var(--relate-post-title, #353a3d);
} }
} &:hover {
-webkit-transform: translate3d(0, -3px, 0);
.card:hover { transform: translate3d(0, -3px, 0);
-webkit-transform: translate3d(0, -3px, 0); filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
transform: translate3d(0, -3px, 0); }
filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.08));
} }
.timeago { .timeago {
@ -194,18 +186,17 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
ul { ul {
list-style-type: none; list-style-type: none;
padding-inline-start: 1.5rem; padding-inline-start: 1.5rem;
} >li::before {
background: #c2c9d4;
ul>li::before { width: 5px;
background: #c2c9d4; height: 5px;
width: 5px; border-radius: 1px;
height: 5px; display: block;
border-radius: 1px; content: "";
display: block; position: relative;
content: ""; top: 1rem;
position: relative; right: 1rem;
top: 1rem; }
right: 1rem;
} }
} }
@ -223,32 +214,31 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
a:hover, a:hover,
i:hover { i:hover {
@include btn-sharing-color(#2a408e, true);
text-decoration: none; text-decoration: none;
color: var(--link-color, #2a408e)!important;
} }
.share-icon { .share-icon {
font-size: 1.2rem; font-size: 1.2rem;
.fab {
.fab.fa-twitter { &.fa-twitter {
color: var(--btn-sharing, rgba(29, 161, 242, 1.00)); @include btn-sharing-color(rgba(29, 161, 242, 1.00));
} }
&.fa-facebook-square {
.fab.fa-facebook-square { @include btn-sharing-color(rgb(66, 95, 156));
color: var(--btn-sharing, rgb(66, 95, 156)); }
} &.fa-telegram {
.fab.fa-telegram { @include btn-sharing-color(rgb(39, 159, 217));
color: var(--btn-sharing, rgb(39, 159, 217)); }
} &.fa-weibo {
@include btn-sharing-color(rgb(229, 20, 43));
.fab.fa-weibo { }
color: var(--btn-sharing, rgb(229, 20, 43));
} }
} // .share-icon } // .share-icon
.fas.fa-link { .fas.fa-link {
color: var(--btn-sharing, rgb(171, 171, 171)); @include btn-sharing-color(rgb(171, 171, 171));
} }
} // .share-wrapper } // .share-wrapper
@ -256,23 +246,19 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
.share-label { .share-label {
font-family: 'Oswald', sans-serif; font-family: 'Oswald', sans-serif;
} &::after {
content: ":";
.share-label::after { }
content: ":";
} }
.license-wrapper { .license-wrapper {
line-height: 1.2rem; line-height: 1.2rem;
.license-text>a { .license-text>a {
font-weight: 600; font-weight: 600;
} }
i { i {
font-weight: 400; font-weight: 400;
} }
span:last-child { span:last-child {
font-size: .85rem; font-size: .85rem;
} }
@ -283,10 +269,9 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
.post-tail-bottom { .post-tail-bottom {
-ms-flex-wrap: wrap!important; -ms-flex-wrap: wrap!important;
flex-wrap: wrap!important; flex-wrap: wrap!important;
} >div:first-child {
margin-bottom: 1rem;
.post-tail-bottom>div:first-child { }
margin-bottom: 1rem;
} }
} }
@ -297,20 +282,23 @@ $prompt-newer: "{{ site.data.label.post.button.next }}";
} }
@media all and (min-width: 768px) { @media all and (min-width: 768px) {
.post .post-meta > div:not(:first-child)::before { .post {
content: "\2022"; .post-meta {
color: rgba(158, 158, 158, 0.8); >div:not(:first-child)::before {
font-weight: bold; content: "\2022";
padding-left: .5rem; color: rgba(158, 158, 158, 0.8);
padding-right: .3rem; font-weight: bold;
} padding-left: .5rem;
padding-right: .3rem;
.post .post-meta.flex-column { }
-webkit-box-orient: horizontal!important; &.flex-column {
-webkit-box-direction: normal!important; -webkit-box-orient: horizontal!important;
-ms-flex-direction: row!important; -webkit-box-direction: normal!important;
flex-direction: row!important; -ms-flex-direction: row!important;
} flex-direction: row!important;
}
}
} // .post
} }
@media all and (min-width: 768px) and (max-width: 830px) { @media all and (min-width: 768px) and (max-width: 830px) {

View File

@ -77,68 +77,77 @@
/*-- Codes Snippet --*/ /*-- Codes Snippet --*/
div.highlight, %highlight-pre-bg {
figure.highlight,
.highlighter-rouge {
background: var(--highlight-pre-bg, #f7f7f7) background: var(--highlight-pre-bg, #f7f7f7)
} }
.highlight { %code-snippet-radius {
overflow: auto; border-radius: 5px;
} }
.highlight .lineno {
margin: .8rem 0rem;
padding: 0 .5rem;
min-width: 2.2rem;
text-align: right;
color: var(--highlight-lineno, #c2c6cc);
border-right: 1px solid var(--highlight-lineno-border, #e9ecef);
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.highlight table {
padding: 0;
border: 0;
}
.highlight td {
padding: 0;
border: 0;
}
.highlight pre {
margin-bottom: 0;
font-size: .85rem;
line-height: 1.4rem;
word-wrap: normal; /* Fixed Safari overflow-x */
}
.highlight table td pre {
overflow: visible; /* Fixed iOS safari overflow-x */
word-break: normal; /* Fixed iOS safari linenos code break */
}
/* Override BS Inline-code style */
.highlighter-rouge { .highlighter-rouge {
margin-bottom: 1.2em; @extend %highlight-pre-bg;
@extend %code-snippet-radius;
margin-bottom: 1.2em; /* Override BS Inline-code style */
} }
.highlight {
@extend %code-snippet-radius;
@at-root div#{&} {
@extend %highlight-pre-bg;
}
@at-root figure#{&} {
@extend %highlight-pre-bg;
}
overflow: auto;
.lineno {
margin: .8rem 0rem;
padding: 0 .5rem;
min-width: 2.2rem;
text-align: right;
color: var(--highlight-lineno, #c2c6cc);
border-right: 1px solid var(--highlight-lineno-border, #e9ecef);
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
table {
padding: 0;
border: 0;
td pre {
overflow: visible; /* Fixed iOS safari overflow-x */
word-break: normal; /* Fixed iOS safari linenos code break */
}
}
td {
padding: 0;
border: 0;
}
pre {
margin-bottom: 0;
font-size: .85rem;
line-height: 1.4rem;
word-wrap: normal;
/* Fixed Safari overflow-x */
}
} // .highlight
code { code {
-webkit-hyphens: none; -webkit-hyphens: none;
-ms-hyphens: none; -ms-hyphens: none;
-moz-hyphens: none; -moz-hyphens: none;
hyphens: none; hyphens: none;
}
code.highlighter-rouge { &.highlighter-rouge {
padding: 2px 4px; padding: 2px 4px;
margin: 0 .3rem; margin: 0 .3rem;
border-radius: 4px; border-radius: 4px;
}
} }
td.rouge-code { td.rouge-code {
@ -146,11 +155,6 @@ td.rouge-code {
padding-right: 1rem; padding-right: 1rem;
} }
/* code snippet radius */
.highlighter-rouge,
.highlight {
border-radius: 5px;
}
/* Hide line numbers for defualt, console, and terminal code snippets */ /* Hide line numbers for defualt, console, and terminal code snippets */
div[class^='highlighter-rouge'] pre.lineno, div[class^='highlighter-rouge'] pre.lineno,
@ -171,11 +175,9 @@ div.language-terminal.highlighter-rouge td.rouge-code {
-webkit-box-shadow: inset 0 0 2px #c2c6cc; -webkit-box-shadow: inset 0 0 2px #c2c6cc;
box-shadow: inset 0 0 2px #c2c6cc; box-shadow: inset 0 0 2px #c2c6cc;
} }
.highlighter-rouge { .highlighter-rouge {
color: black; color: black;
} }
code.highlighter-rouge { code.highlighter-rouge {
border: 1px solid #e9ecef; border: 1px solid #e9ecef;
} }

View File

@ -17,14 +17,9 @@
letter-spacing: 0; letter-spacing: 0;
border: 1px solid var(--tag-border, #dee2e6) !important; border: 1px solid var(--tag-border, #dee2e6) !important;
box-shadow: 0 0 3px 0 var(--tag-shadow, #e9ecef); box-shadow: 0 0 3px 0 var(--tag-shadow, #e9ecef);
} span {
margin-left: 0.6em;
.tag span { font-size: 0.7em;
margin-left: 0.6em; font-family: 'Oswald', sans-serif;
font-size: 0.7em; }
font-family: 'Oswald', sans-serif;
}
a.tag:hover {
text-decoration: none;
} }