🏗️ First time sync the css & js files from hexo theme NexT
This commit is contained in:
99
assets/css/_common/scaffolding/base.scss
Normal file
99
assets/css/_common/scaffolding/base.scss
Normal file
@@ -0,0 +1,99 @@
|
||||
::selection {
|
||||
background: $selection-bg;
|
||||
color: $selection-color;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--body-bg-color);
|
||||
box-sizing: border-box;
|
||||
color: var(--text-color);
|
||||
font-family: $font-family-base;
|
||||
font-size: $font-size-base;
|
||||
line-height: $line-height-base;
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
transition: padding $transition-ease;
|
||||
|
||||
@if hexo-config('body_scrollbar.overlay') {
|
||||
overflow-x: hidden;
|
||||
@supports (overflow-x: clip) {
|
||||
overflow-x: clip;
|
||||
}
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
@if hexo-config('body_scrollbar.stable') {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: $font-family-headings;
|
||||
font-weight: bold;
|
||||
line-height: 1.5;
|
||||
margin: 30px 0 15px;
|
||||
}
|
||||
|
||||
@for $headline from 1 through 6 {
|
||||
h#{$headline} {
|
||||
font-size: $font-size-headings-base - $font-size-headings-step * $headline;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: 1px solid $link-decoration-color;
|
||||
color: var(--link-color);
|
||||
// For a:not(:any-link)
|
||||
cursor: pointer;
|
||||
outline: 0;
|
||||
text-decoration: none;
|
||||
@include word-wrap();
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: var(--link-hover-color);
|
||||
color: var(--link-hover-color);
|
||||
}
|
||||
}
|
||||
|
||||
iframe, img, video, embed {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
hr {
|
||||
background-image: repeating-linear-gradient(-45deg, $grey-lighter, $grey-lighter 4px, transparent 4px, transparent 8px);
|
||||
border: 0;
|
||||
height: 3px;
|
||||
margin: 40px 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 4px solid $grey-lighter;
|
||||
color: var(--blockquote-color);
|
||||
margin: 0;
|
||||
padding: 0 15px;
|
||||
|
||||
cite::before {
|
||||
content: '-';
|
||||
padding: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
26
assets/css/_common/scaffolding/buttons.scss
Normal file
26
assets/css/_common/scaffolding/buttons.scss
Normal file
@@ -0,0 +1,26 @@
|
||||
.btn {
|
||||
background: var(--btn-default-bg);
|
||||
border: 2px solid var(--btn-default-border-color);
|
||||
border-radius: $btn-default-radius;
|
||||
color: var(--btn-default-color);
|
||||
display: inline-block;
|
||||
font-size: $font-size-small;
|
||||
line-height: 2;
|
||||
padding: 0 20px;
|
||||
transition: background-color $transition-ease;
|
||||
|
||||
&:hover {
|
||||
background: var(--btn-default-hover-bg);
|
||||
border-color: var(--btn-default-hover-border-color);
|
||||
color: var(--btn-default-hover-color);
|
||||
}
|
||||
|
||||
+ .btn {
|
||||
margin: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
.fa-fw {
|
||||
text-align: left;
|
||||
width: (18em / 14);
|
||||
}
|
||||
}
|
||||
39
assets/css/_common/scaffolding/comments.scss
Normal file
39
assets/css/_common/scaffolding/comments.scss
Normal file
@@ -0,0 +1,39 @@
|
||||
.comments {
|
||||
margin-top: 60px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.comment-button-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap-reverse;
|
||||
justify-content: center;
|
||||
margin: 1em 0;
|
||||
|
||||
.comment-button {
|
||||
margin: .1em .2em;
|
||||
|
||||
&.active {
|
||||
background: var(--btn-default-hover-bg);
|
||||
border-color: var(--btn-default-hover-border-color);
|
||||
color: var(--btn-default-hover-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comment-position {
|
||||
display: none;
|
||||
|
||||
&.active {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs-comment {
|
||||
margin-top: 4em;
|
||||
padding-top: 0;
|
||||
|
||||
.comments {
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
55
assets/css/_common/scaffolding/highlight/copy-code.scss
Normal file
55
assets/css/_common/scaffolding/highlight/copy-code.scss
Normal file
@@ -0,0 +1,55 @@
|
||||
.highlight:hover .copy-btn, pre:hover .copy-btn {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
color: $black-dim;
|
||||
cursor: pointer;
|
||||
line-height: 1.6;
|
||||
opacity: 0;
|
||||
padding: 2px 6px;
|
||||
position: absolute;
|
||||
transition: opacity $transition-ease;
|
||||
|
||||
@if hexo-config('codeblock.copy_button.style') == 'flat' {
|
||||
background: white;
|
||||
border: 0;
|
||||
font-size: $font-size-smaller;
|
||||
right: 0;
|
||||
top: 0;
|
||||
} @else if hexo-config('codeblock.copy_button.style') == 'mac' {
|
||||
color: var(--highlight-foreground);
|
||||
font-size: 14px;
|
||||
right: 0;
|
||||
top: 2px;
|
||||
} @else {
|
||||
background-color: $gainsboro;
|
||||
background-image: linear-gradient(#fcfcfc, $gainsboro);
|
||||
border: 1px solid #d5d5d5;
|
||||
border-radius: 3px;
|
||||
font-size: $font-size-smaller;
|
||||
right: 4px;
|
||||
top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@if hexo-config('codeblock.copy_button.style') == 'mac' {
|
||||
figure.highlight {
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4);
|
||||
padding-top: 30px;
|
||||
|
||||
.table-container {
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
&::before {
|
||||
background: #fc625d;
|
||||
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
||||
left: 12px;
|
||||
margin-top: -20px;
|
||||
position: absolute;
|
||||
@include round-icon(12px);
|
||||
}
|
||||
}
|
||||
}
|
||||
140
assets/css/_common/scaffolding/highlight/index.scss
Normal file
140
assets/css/_common/scaffolding/highlight/index.scss
Normal file
@@ -0,0 +1,140 @@
|
||||
// Use `@use` to fix issue #67
|
||||
@import '(theme.highlight.enable && theme.highlight.light.file) ? theme.highlight.light.file : null';
|
||||
@import '(theme.prism.enable && theme.prism.light) ? theme.prism.light : null';
|
||||
@import '(theme.prism.enable && theme.prism.number) ? theme.prism.number : null';
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@import '(theme.darkmode && theme.highlight.enable && theme.highlight.dark.file) ? theme.highlight.dark.file : null';
|
||||
@import '(theme.darkmode && theme.prism.enable && theme.prism.dark) ? theme.prism.dark : null';
|
||||
}
|
||||
|
||||
@import 'theme.codeblock.copy_button.enable ? "copy-code" : null';
|
||||
|
||||
// Placeholder: %code-inline %code-block
|
||||
%code-inline {
|
||||
background: var(--highlight-background);
|
||||
color: var(--highlight-foreground);
|
||||
}
|
||||
|
||||
%code-block {
|
||||
@extend %code-inline;
|
||||
line-height: $line-height-code-block;
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
|
||||
%figcaption {
|
||||
background: var(--highlight-gutter-background);
|
||||
color: var(--highlight-foreground);
|
||||
display: flow-root;
|
||||
font-size: $table-font-size;
|
||||
line-height: 1.2;
|
||||
padding: .5em;
|
||||
|
||||
a {
|
||||
color: var(--highlight-foreground);
|
||||
float: right;
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: var(--highlight-foreground);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-family: $code-font-family;
|
||||
}
|
||||
|
||||
code {
|
||||
@extend %code-inline;
|
||||
border-radius: 3px;
|
||||
font-size: $table-font-size;
|
||||
padding: 2px 4px;
|
||||
@include word-wrap();
|
||||
}
|
||||
|
||||
kbd {
|
||||
@extend %code-inline;
|
||||
border: 2px solid $grey-light;
|
||||
border-radius: .2em;
|
||||
box-shadow: .1em .1em .2em rgba(0, 0, 0, .1);
|
||||
font-family: inherit;
|
||||
padding: .1em .3em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// `highlight.line_number: false` and `highlight.wrap: false`
|
||||
// in Hexo config generates code.highlight elements
|
||||
figure.highlight {
|
||||
@extend %code-block;
|
||||
position: relative;
|
||||
|
||||
pre {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
@extend %figcaption;
|
||||
}
|
||||
|
||||
.gutter {
|
||||
@include disable-user-select();
|
||||
|
||||
pre {
|
||||
background: var(--highlight-gutter-background);
|
||||
color: var(--highlight-gutter-foreground);
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.code pre {
|
||||
padding-left: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// See https://github.com/next-theme/hexo-theme-next/discussions/410
|
||||
.marked {
|
||||
background: rgba(0, 0, 0, .3);
|
||||
}
|
||||
}
|
||||
|
||||
// See https://github.com/hexojs/hexo-util/pull/229
|
||||
pre .caption, pre figcaption {
|
||||
@extend %figcaption;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.gist table {
|
||||
width: auto;
|
||||
|
||||
td {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
@extend %code-block;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
|
||||
code {
|
||||
background: none;
|
||||
padding: 0;
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
12
assets/css/_common/scaffolding/index.scss
Normal file
12
assets/css/_common/scaffolding/index.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Scaffolding
|
||||
// ==================================================
|
||||
@import 'normalize';
|
||||
@import 'base';
|
||||
@import 'tables';
|
||||
@import 'buttons';
|
||||
@import 'toggles';
|
||||
@import 'highlight';
|
||||
@import 'tags';
|
||||
@import 'pagination';
|
||||
@import 'comments';
|
||||
289
assets/css/_common/scaffolding/normalize.scss
vendored
Normal file
289
assets/css/_common/scaffolding/normalize.scss
vendored
Normal file
@@ -0,0 +1,289 @@
|
||||
/* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
||||
/* Document
|
||||
========================================================================== */
|
||||
/**
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
html {
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
/**
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the `main` element consistently in IE.
|
||||
*/
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: .67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
a {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
b, strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
code, kbd, samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
sub, sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
/**
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
button, input, optgroup, select, textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
button, input {
|
||||
/* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
button, select {
|
||||
/* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
button, [type='button'], [type='reset'], [type='submit'] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
button::-moz-focus-inner, [type='button']::-moz-focus-inner, [type='reset']::-moz-focus-inner, [type='submit']::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
button:-moz-focusring, [type='button']:-moz-focusring, [type='reset']:-moz-focusring, [type='submit']:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
fieldset {
|
||||
padding: .35em .75em .625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
[type='checkbox'], [type='radio'] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
[type='number']::-webkit-inner-spin-button, [type='number']::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
[type='search'] {
|
||||
outline-offset: -2px; /* 2 */
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
[type='search']::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit; /* 2 */
|
||||
-webkit-appearance: button; /* 1 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
/**
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
55
assets/css/_common/scaffolding/pagination.scss
Normal file
55
assets/css/_common/scaffolding/pagination.scss
Normal file
@@ -0,0 +1,55 @@
|
||||
%page-number-basic {
|
||||
display: inline-block;
|
||||
margin: -1px 10px 0;
|
||||
padding: 0 10px;
|
||||
|
||||
@include mobile() {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
%page-number-current {
|
||||
background: $pagination-active-bg;
|
||||
border-color: $pagination-active-border;
|
||||
color: $pagination-active-color;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
border-top: 1px solid $pagination-border;
|
||||
margin: 120px 0 0;
|
||||
text-align: center;
|
||||
|
||||
.prev, .next, .page-number {
|
||||
@extend %page-number-basic;
|
||||
border-bottom: 0;
|
||||
border-top: 1px solid $pagination-link-border;
|
||||
transition: border-color $transition-ease;
|
||||
|
||||
&:hover {
|
||||
border-top-color: $pagination-link-hover-border;
|
||||
}
|
||||
}
|
||||
|
||||
@include mobile() {
|
||||
border-top: 0;
|
||||
|
||||
.prev, .next, .page-number {
|
||||
border-bottom: 1px solid $pagination-link-border;
|
||||
border-top: 0;
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: $pagination-link-hover-border;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.space {
|
||||
@extend %page-number-basic;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.page-number.current {
|
||||
@extend %page-number-current;
|
||||
}
|
||||
}
|
||||
39
assets/css/_common/scaffolding/tables.scss
Normal file
39
assets/css/_common/scaffolding/tables.scss
Normal file
@@ -0,0 +1,39 @@
|
||||
.table-container {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
font-size: $table-font-size;
|
||||
margin: 0 0 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
&:nth-of-type(odd) {
|
||||
background: var(--table-row-odd-bg-color);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--table-row-hover-bg-color);
|
||||
}
|
||||
}
|
||||
|
||||
caption, th, td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid $table-border-color;
|
||||
border-bottom: 3px solid $table-cell-border-bottom-color;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 700;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
34
assets/css/_common/scaffolding/tags/blockquote-center.scss
Normal file
34
assets/css/_common/scaffolding/tags/blockquote-center.scss
Normal file
@@ -0,0 +1,34 @@
|
||||
// Blockquote with all children centered.
|
||||
.blockquote-center {
|
||||
border-left: 0;
|
||||
margin: 40px 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
&::before, &::after {
|
||||
left: 0;
|
||||
line-height: 1;
|
||||
opacity: .6;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&::before {
|
||||
border-top: 1px solid $grey-light;
|
||||
text-align: left;
|
||||
top: -20px;
|
||||
@include font-family-icons('\f10d');
|
||||
}
|
||||
|
||||
&::after {
|
||||
border-bottom: 1px solid $grey-light;
|
||||
bottom: -20px;
|
||||
text-align: right;
|
||||
@include font-family-icons('\f10e');
|
||||
}
|
||||
|
||||
p, div {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
20
assets/css/_common/scaffolding/tags/group-pictures.scss
Normal file
20
assets/css/_common/scaffolding/tags/group-pictures.scss
Normal file
@@ -0,0 +1,20 @@
|
||||
.group-picture {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.group-picture-row {
|
||||
display: flex;
|
||||
gap: 3px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.group-picture-column {
|
||||
flex: 1;
|
||||
|
||||
img {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
object-fit: cover;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
assets/css/_common/scaffolding/tags/index.scss
Normal file
8
assets/css/_common/scaffolding/tags/index.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
@import 'blockquote-center';
|
||||
@import 'group-pictures';
|
||||
@import 'label';
|
||||
@import 'link-grid';
|
||||
@import 'mermaid';
|
||||
@import 'note';
|
||||
@import 'pdf';
|
||||
@import 'tabs';
|
||||
12
assets/css/_common/scaffolding/tags/label.scss
Normal file
12
assets/css/_common/scaffolding/tags/label.scss
Normal file
@@ -0,0 +1,12 @@
|
||||
@use 'sass:map';
|
||||
|
||||
.post-body .label {
|
||||
color: $text-color;
|
||||
padding: 0 2px;
|
||||
|
||||
@each $type in $note-types {
|
||||
&.#{$type} {
|
||||
background: map.get($label, $type);
|
||||
}
|
||||
}
|
||||
}
|
||||
113
assets/css/_common/scaffolding/tags/link-grid.scss
Normal file
113
assets/css/_common/scaffolding/tags/link-grid.scss
Normal file
@@ -0,0 +1,113 @@
|
||||
.post-body .link-grid {
|
||||
display: grid;
|
||||
// https://caniuse.com/mdn-css_properties_gap_grid_context
|
||||
grid-gap: 1.5rem;
|
||||
gap: 1.5rem;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
margin-bottom: 20px;
|
||||
padding: 1rem;
|
||||
|
||||
@include mobile() {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.link-grid-container {
|
||||
border: solid $grey-lighter;
|
||||
box-shadow: 1rem 1rem .5rem rgba(0, 0, 0, .5);
|
||||
min-height: 5rem;
|
||||
// Fix issue #30
|
||||
min-width: 0;
|
||||
padding: .5rem;
|
||||
position: relative;
|
||||
transition: background .3s;
|
||||
|
||||
&:hover {
|
||||
animation: next-shake .5s;
|
||||
background: var(--card-bg-color);
|
||||
}
|
||||
|
||||
&:active {
|
||||
box-shadow: .5rem .5rem .25rem rgba(0, 0, 0, .5);
|
||||
transform: translate(.2rem, .2rem);
|
||||
}
|
||||
|
||||
.link-grid-image {
|
||||
border: 1px solid $grey-lighter;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
height: 5rem;
|
||||
padding: 3px;
|
||||
position: absolute;
|
||||
width: 5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 1rem 0 6rem;
|
||||
|
||||
&:first-of-type {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
font-size: .8em;
|
||||
line-height: 1.3rem;
|
||||
opacity: .7;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
border: 0;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes next-shake {
|
||||
0% {
|
||||
transform: translate(1pt, 1pt) rotate(0deg);
|
||||
}
|
||||
|
||||
10% {
|
||||
transform: translate(-1pt, -2pt) rotate(-1deg);
|
||||
}
|
||||
|
||||
20% {
|
||||
transform: translate(-3pt, 0pt) rotate(1deg);
|
||||
}
|
||||
|
||||
30% {
|
||||
transform: translate(3pt, 2pt) rotate(0deg);
|
||||
}
|
||||
|
||||
40% {
|
||||
transform: translate(1pt, -1pt) rotate(1deg);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translate(-1pt, 2pt) rotate(-1deg);
|
||||
}
|
||||
|
||||
60% {
|
||||
transform: translate(-3pt, 1pt) rotate(0deg);
|
||||
}
|
||||
|
||||
70% {
|
||||
transform: translate(3pt, 1pt) rotate(-1deg);
|
||||
}
|
||||
|
||||
80% {
|
||||
transform: translate(-1pt, -1pt) rotate(1deg);
|
||||
}
|
||||
|
||||
90% {
|
||||
transform: translate(1pt, 2pt) rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate(1pt, -2pt) rotate(-1deg);
|
||||
}
|
||||
}
|
||||
6
assets/css/_common/scaffolding/tags/mermaid.scss
Normal file
6
assets/css/_common/scaffolding/tags/mermaid.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
@if hexo-config('mermaid.enable') {
|
||||
.mermaid {
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
114
assets/css/_common/scaffolding/tags/note.scss
Normal file
114
assets/css/_common/scaffolding/tags/note.scss
Normal file
@@ -0,0 +1,114 @@
|
||||
@use 'sass:map';
|
||||
|
||||
@if hexo-config('note.style') != 'disabled' {
|
||||
.post-body .note {
|
||||
$note-icons : hexo-config('note.icons');
|
||||
$note-style : hexo-config('note.style');
|
||||
|
||||
border-radius: $note-border-radius;
|
||||
margin-bottom: 20px;
|
||||
padding: 1em;
|
||||
position: relative;
|
||||
|
||||
@if $note-style == 'simple' {
|
||||
border: 1px solid $gainsboro;
|
||||
border-left-width: 5px;
|
||||
}
|
||||
|
||||
@if $note-style == 'modern' {
|
||||
background: $whitesmoke;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
@if $note-style == 'flat' {
|
||||
background: lighten($gainsboro, 65%);
|
||||
border: initial;
|
||||
border-left: 3px solid $gainsboro;
|
||||
}
|
||||
|
||||
summary {
|
||||
cursor: pointer;
|
||||
outline: 0;
|
||||
|
||||
p {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
h2, h3, h4, h5, h6 {
|
||||
border-bottom: initial;
|
||||
margin: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
p, ul, ol, table, pre, blockquote, img {
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@if $note-icons {
|
||||
&:not(.no-icon) {
|
||||
padding-left: 2.5em;
|
||||
|
||||
&::before {
|
||||
font-size: 1.5em;
|
||||
left: .3em;
|
||||
position: absolute;
|
||||
top: calc(50% - 1em);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@each $type in $note-types {
|
||||
&.#{$type} {
|
||||
@if $note-style == 'flat' {
|
||||
background: map.get($note-bg, $type);
|
||||
@if hexo-config('darkmode') {
|
||||
@media (prefers-color-scheme: dark) {
|
||||
background: mix(map.get($note-bg, $type), $body-bg-color-dark, 10%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@if $note-style == 'modern' {
|
||||
background: map.get($note-modern-bg, $type);
|
||||
border-color: map.get($note-modern-border, $type);
|
||||
color: map.get($note-modern-text, $type);
|
||||
|
||||
a:not(.btn) {
|
||||
border-bottom-color: map.get($note-modern-text, $type);
|
||||
color: map.get($note-modern-text, $type);
|
||||
|
||||
&:hover {
|
||||
border-bottom-color: map.get($note-modern-hover, $type);
|
||||
color: map.get($note-modern-hover, $type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@if $note-style != 'modern' {
|
||||
border-left-color: map.get($note-border, $type);
|
||||
|
||||
h2, h3, h4, h5, h6 {
|
||||
color: map.get($note-text, $type);
|
||||
}
|
||||
}
|
||||
|
||||
@if $note-icons {
|
||||
&:not(.no-icon)::before {
|
||||
@include font-family-icons(map.get($note-icon, $type));
|
||||
|
||||
@if $note-style != 'modern' {
|
||||
color: map.get($note-text, $type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
assets/css/_common/scaffolding/tags/pdf.scss
Normal file
8
assets/css/_common/scaffolding/tags/pdf.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
@if hexo-config('pdf.enable') {
|
||||
.pdfobject-container {
|
||||
iframe, embed {
|
||||
height: convert(hexo-config('pdf.height'));
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
103
assets/css/_common/scaffolding/tags/tabs.scss
Normal file
103
assets/css/_common/scaffolding/tags/tabs.scss
Normal file
@@ -0,0 +1,103 @@
|
||||
.post-body .tabs {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.post-body .tabs, .tabs-comment {
|
||||
padding-top: 10px;
|
||||
|
||||
ul.nav-tabs {
|
||||
background: if(($scheme == 'Muse') or ($scheme == 'Mist'), var(--body-bg-color), var(--content-bg-color));
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
// Fix issue #398
|
||||
z-index: $zindex-0;
|
||||
|
||||
@include mobile-smallest() {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
li.tab {
|
||||
border-bottom: 1px solid $grey-lighter;
|
||||
border-left: 1px solid transparent;
|
||||
border-right: 1px solid transparent;
|
||||
border-radius: $tbr $tbr 0 0;
|
||||
border-top: 3px solid transparent;
|
||||
flex-grow: 1;
|
||||
list-style-type: none;
|
||||
|
||||
@include mobile-smallest() {
|
||||
border-bottom: 1px solid transparent;
|
||||
border-left: 3px solid transparent;
|
||||
border-right: 1px solid transparent;
|
||||
border-top: 1px solid transparent;
|
||||
}
|
||||
|
||||
@include mobile-smallest() {
|
||||
border-radius: $tbr;
|
||||
}
|
||||
|
||||
@if hexo-config('tabs.transition.tabs') {
|
||||
transition: all $transition-ease-out;
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: initial;
|
||||
display: block;
|
||||
line-height: 1.8;
|
||||
padding: .25em .75em;
|
||||
text-align: center;
|
||||
|
||||
i {
|
||||
width: (18em / 14);
|
||||
}
|
||||
|
||||
@if hexo-config('tabs.transition.labels') {
|
||||
transition: all $transition-ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: $table-border-color;
|
||||
border-right-color: $table-border-color;
|
||||
border-top-color: $orange;
|
||||
|
||||
@include mobile-smallest() {
|
||||
border-bottom-color: $table-border-color;
|
||||
border-left-color: $orange;
|
||||
border-right-color: $table-border-color;
|
||||
border-top-color: $table-border-color;
|
||||
}
|
||||
|
||||
a {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
border: 1px solid $table-border-color;
|
||||
border-radius: 0 0 $tbr $tbr;
|
||||
border-top-color: transparent;
|
||||
|
||||
@include mobile-smallest() {
|
||||
border-radius: $tbr;
|
||||
border-top-color: $table-border-color;
|
||||
}
|
||||
|
||||
.tab-pane {
|
||||
padding: 20px 20px 0;
|
||||
|
||||
&:not(.active) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
26
assets/css/_common/scaffolding/toggles.scss
Normal file
26
assets/css/_common/scaffolding/toggles.scss
Normal file
@@ -0,0 +1,26 @@
|
||||
.toggle {
|
||||
line-height: 0;
|
||||
|
||||
.toggle-line {
|
||||
background: white;
|
||||
display: block;
|
||||
height: 2px;
|
||||
left: 0;
|
||||
position: relative;
|
||||
top: 0;
|
||||
transition: all .4s;
|
||||
width: 100%;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toggle.toggle-arrow {
|
||||
@include toggle-arrow(hexo-config('sidebar.position'));
|
||||
}
|
||||
|
||||
.toggle.toggle-close {
|
||||
@include toggle-close(hexo-config('sidebar.position'));
|
||||
}
|
||||
Reference in New Issue
Block a user