Deploying to gh-pages from @ 133572c8d2
🚀
This commit is contained in:
parent
2692505e11
commit
f8996a1fe8
11 changed files with 1161 additions and 321 deletions
43
scss/components/_anchor.scss
Normal file
43
scss/components/_anchor.scss
Normal file
|
@ -0,0 +1,43 @@
|
|||
// Author: Sivan [sun.sivan@gmail.com]
|
||||
// Description: anchor.
|
||||
|
||||
.anchor {
|
||||
margin-inline-start: 0.25em;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 640px) {
|
||||
.article {
|
||||
.anchor {
|
||||
position: absolute;
|
||||
left: -1em;
|
||||
width: 1em;
|
||||
margin-inline-start: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-weight: 400;
|
||||
line-height: inherit;
|
||||
text-align: center;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s linear;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
.anchor {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
68
scss/components/_card.scss
Normal file
68
scss/components/_card.scss
Normal file
|
@ -0,0 +1,68 @@
|
|||
// Author: Sivan [sun.sivan@gmail.com]
|
||||
// Description: card.
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
left: -12px;
|
||||
width: 100%;
|
||||
margin-block-start: 24px;
|
||||
margin-block-end: 48px;
|
||||
padding-block-start: 12px;
|
||||
padding-block-end: 12px;
|
||||
padding-inline-start: 12px;
|
||||
padding-inline-end: 12px;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 4px 16px hsla(0, 0%, 0%, 0.16);
|
||||
background-color: hsl(0, 0%, 100%);
|
||||
|
||||
// 内容居左,覆盖 .heti figure
|
||||
.article & {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
> figcaption {
|
||||
display: inline-block;
|
||||
margin-block-start: 16px;
|
||||
padding-block-start: 4px;
|
||||
padding-block-end: 3px;
|
||||
padding-inline-start: 0;
|
||||
padding-inline-end: 72px;
|
||||
line-height: 24px;
|
||||
border-block-start: 1px solid hsl(0, 0%, 93%);
|
||||
}
|
||||
}
|
||||
|
||||
.card__vertical-container {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 30em;
|
||||
border: 1px solid hsl(0, 0%, 93%);
|
||||
overflow: auto;
|
||||
writing-mode: vertical-rl;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 640px) {
|
||||
.card {
|
||||
box-sizing: border-box;
|
||||
left: -20%;
|
||||
width: 140%;
|
||||
padding-block-start: 24px;
|
||||
padding-block-end: 24px;
|
||||
padding-inline-start: 32px;
|
||||
padding-inline-end: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.card {
|
||||
background-color: hsl(0, 0%, 16%);
|
||||
|
||||
> figcaption {
|
||||
border-block-start: 1px solid hsl(0, 0%, 20%);
|
||||
}
|
||||
}
|
||||
|
||||
.card__vertical-container {
|
||||
border-color: hsl(0, 0%, 20%);
|
||||
}
|
||||
}
|
66
scss/components/_grid-container.scss
Normal file
66
scss/components/_grid-container.scss
Normal file
|
@ -0,0 +1,66 @@
|
|||
// Author: Sivan [sun.sivan@gmail.com]
|
||||
// Description: grid container.
|
||||
|
||||
$grid-sizes: (
|
||||
"12": 12px,
|
||||
"24": 24px
|
||||
);
|
||||
$padding-mobile: 12px;
|
||||
$padding-desktop: 48px;
|
||||
|
||||
@mixin grid-image-horizontal($grid-width, $padding-width, $grid-color: hsl(0, 0%, 93%), $margin-color: $grid-color) {
|
||||
background-image:
|
||||
linear-gradient(transparent ($grid-width - 1px), $grid-color 1px),
|
||||
linear-gradient(to left, transparent $padding-width, $grid-color, transparent ($padding-width + 1px)),
|
||||
linear-gradient(to right, transparent $padding-width, $margin-color, transparent ($padding-width + 1px));
|
||||
}
|
||||
|
||||
@mixin grid-image-vertical($grid-width, $grid-color: hsl(0, 0%, 93%)) {
|
||||
background-size: $grid-width 100%;
|
||||
background-image: linear-gradient(to left, transparent ($grid-width - 1px), $grid-color 1px);
|
||||
}
|
||||
|
||||
.container {
|
||||
@each $size, $width in $grid-sizes {
|
||||
&[data-bg-grid="grid-#{$size}"] {
|
||||
background-size: 100% $width;
|
||||
|
||||
@include grid-image-horizontal($width, $padding-mobile);
|
||||
|
||||
.heti--vertical {
|
||||
outline: 1px solid hsl(0, 0%, 93%);
|
||||
|
||||
@include grid-image-vertical($width);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@each $size, $width in $grid-sizes {
|
||||
&[data-bg-grid="grid-#{$size}"] {
|
||||
@include grid-image-horizontal($width, $padding-mobile, hsl(0, 0%, 20%));
|
||||
|
||||
.heti--vertical {
|
||||
@include grid-image-vertical($width, hsl(0, 0%, 20%));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 640px) {
|
||||
@each $size, $width in $grid-sizes {
|
||||
&[data-bg-grid="grid-#{$size}"] {
|
||||
// 桌面端增加缩进,修改边距线为红色
|
||||
@include grid-image-horizontal($width, $padding-desktop, hsl(0, 0%, 93%), hsla(360, 100%, 50%, 0.4));
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
@each $size, $width in $grid-sizes {
|
||||
&[data-bg-grid="grid-#{$size}"] {
|
||||
@include grid-image-horizontal($width, $padding-desktop, hsl(0, 0%, 20%), hsla(360, 100%, 65%, 0.4));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
181
scss/components/_panel-list.scss
Normal file
181
scss/components/_panel-list.scss
Normal file
|
@ -0,0 +1,181 @@
|
|||
// Author: Sivan [sun.sivan@gmail.com]
|
||||
// Description: panel list.
|
||||
|
||||
.panel-list {
|
||||
--bg-color: hsl(240, 100%, 100%);
|
||||
--bg-tap-color: hsl(300, 3%, 94%);
|
||||
--border-color: hsla(0, 0%, 76%, 0.88);
|
||||
--border-inline-start-color: hsl(0, 0%, 76%);
|
||||
--border-inline-end-color: hsl(0, 0%, 76%);
|
||||
--border-block-start-color: hsl(0, 0%, 79%);
|
||||
--border-block-end-color: hsl(0, 0%, 65%);
|
||||
--text-color: hsl(60, 1%, 16%);
|
||||
--box-shadow-color: hsla(0, 0%, 86%, 0.54);
|
||||
--bg-highlight-color-start: hsl(216, 87%, 70%);
|
||||
--bg-highlight-color-end: hsl(215, 93%, 52%);
|
||||
--bg-highlight-tap-color-start: hsl(216, 92%, 65%);
|
||||
--bg-highlight-tap-color-end: hsl(215, 95%, 44%);
|
||||
--border-highlight-color: hsla(216, 90%, 57%, 0.88);
|
||||
--border-highlight-tap-color: hsla(216, 85%, 52%, 0.88);
|
||||
--border-inline-start-highlight-color: hsl(216, 90%, 57%);
|
||||
--border-inline-end-highlight-color: hsl(216, 90%, 57%);
|
||||
--border-inline-start-highlight-tap-color: hsl(216, 85%, 52%);
|
||||
--border-inline-end-highlight-tap-color: hsl(216, 85%, 52%);
|
||||
--border-block-start-highlight-color: hsl(216, 87%, 63%);
|
||||
--border-block-end-highlight-color: hsl(215, 99%, 49%);
|
||||
--border-block-start-highlight-tap-color: hsl(216, 93%, 57%);
|
||||
--border-block-end-highlight-tap-color: hsl(216, 100%, 42%);
|
||||
--text-highlight-color: hsl(0, 0%, 100%);
|
||||
|
||||
&--gray {
|
||||
--bg-color: hsl(180, 100%, 100%);
|
||||
--bg-tap-color: hsl(0, 0%, 94%);
|
||||
--border-color: hsla(0, 0%, 72%, 0.88);
|
||||
--border-inline-start-color: hsl(0, 0%, 76%);
|
||||
--border-inline-end-color: hsl(0, 0%, 76%);
|
||||
--border-block-start-color: hsl(0, 0%, 79%);
|
||||
--border-block-end-color: hsl(0, 0%, 65%);
|
||||
--text-color: hsl(0, 0%, 16%);
|
||||
--box-shadow-color: hsla(0, 0%, 86%, 0.54);
|
||||
--bg-highlight-color-start: hsl(225, 3%, 70%);
|
||||
--bg-highlight-color-end: hsl(228, 2%, 58%);
|
||||
--bg-highlight-tap-color-start: hsl(228, 2%, 58%);
|
||||
--bg-highlight-tap-color-end: hsl(240, 3%, 35%);
|
||||
--border-highlight-color: hsla(225, 2%, 64%, 0.88);
|
||||
--border-highlight-tap-color: hsla(228, 2%, 47%, 0.88);
|
||||
--border-inline-start-highlight-color: hsl(240, 3%, 59%);
|
||||
--border-inline-end-highlight-color: hsl(228, 2%, 54%);
|
||||
--border-inline-start-highlight-tap-color: hsl(240, 3%, 39%);
|
||||
--border-inline-end-highlight-tap-color: hsl(228, 3%, 39%);
|
||||
--border-block-start-highlight-color: hsl(240, 3%, 66%);
|
||||
--border-block-end-highlight-color: hsl(228, 2%, 50%);
|
||||
--border-block-start-highlight-tap-color: hsl(228, 2%, 51%);
|
||||
--border-block-end-highlight-tap-color: hsl(228, 4%, 26%);
|
||||
--text-highlight-color: hsl(0, 0%, 92%);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
--bg-color: hsl(225, 2%, 40%);
|
||||
--bg-tap-color: hsl(210, 2%, 49%);
|
||||
--border-color: hsla(210, 2%, 33%, 0.88);
|
||||
--border-inline-start-color: hsl(210, 2%, 33%);
|
||||
--border-inline-end-color: hsl(210, 2%, 33%);
|
||||
--border-block-start-color: hsl(225, 2%, 45%);
|
||||
--border-block-end-color: hsl(210, 2%, 40%);
|
||||
--text-color: hsl(0, 0%, 91%);
|
||||
--box-shadow-color: hsla(225, 4%, 21%, 0.54);
|
||||
--bg-highlight-color-start: hsl(216, 77%, 49%);
|
||||
--bg-highlight-color-end: hsl(216, 76%, 45%);
|
||||
--bg-highlight-tap-color-start: hsl(214, 83%, 55%);
|
||||
--bg-highlight-tap-color-end: hsl(215, 74%, 51%);
|
||||
--border-highlight-color: hsla(215, 77%, 47%, 0.88);
|
||||
--border-highlight-tap-color: hsla(215, 79%, 54%, 0.88);
|
||||
--border-inline-start-highlight-color: hsl(215, 77%, 47%);
|
||||
--border-inline-end-highlight-color: hsl(215, 77%, 47%);
|
||||
--border-inline-start-highlight-tap-color: hsl(215, 79%, 54%);
|
||||
--border-inline-end-highlight-tap-color: hsl(215, 79%, 54%);
|
||||
--border-block-start-highlight-color: hsl(216, 76%, 55%);
|
||||
--border-block-end-highlight-color: hsl(216, 76%, 44%);
|
||||
--border-block-start-highlight-tap-color: hsl(215, 84%, 60%);
|
||||
--border-block-end-highlight-tap-color: hsl(215, 74%, 51%);
|
||||
--text-highlight-color: hsl(0, 0%, 100%);
|
||||
|
||||
&--gray {
|
||||
--bg-color: hsl(0, 0%, 40%);
|
||||
--bg-tap-color: hsl(0, 0%, 49%);
|
||||
--border-color: hsla(120, 1%, 34%, 0.88);
|
||||
--border-inline-start-color: hsl(0, 0%, 40%);
|
||||
--border-inline-end-color: hsl(360, 0%, 40%);
|
||||
--border-block-start-color: hsl(0, 0%, 46%);
|
||||
--border-block-end-color: hsl(120, 0%, 40%);
|
||||
--text-color: hsl(0, 0%, 91%);
|
||||
--box-shadow-color: hsla(0, 0%, 17%, 0.54);
|
||||
--bg-highlight-color-start: hsl(0, 0%, 60%);
|
||||
--bg-highlight-color-end: hsl(0, 0%, 60%);
|
||||
--bg-highlight-tap-color-start: hsl(0, 0%, 69%);
|
||||
--bg-highlight-tap-color-end: hsl(0, 0%, 69%);
|
||||
--border-highlight-color: hsla(0, 0%, 60%, 0.88);
|
||||
--border-highlight-tap-color: hsla(0, 0%, 69%, 0.88);
|
||||
--border-inline-start-highlight-color: hsl(0, 0%, 60%);
|
||||
--border-inline-end-highlight-color: hsl(0, 0%, 60%);
|
||||
--border-inline-start-highlight-tap-color: hsl(0, 0%, 69%);
|
||||
--border-inline-end-highlight-tap-color: hsl(0, 0%, 69%);
|
||||
--border-block-start-highlight-color: hsl(0, 0%, 64%);
|
||||
--border-block-end-highlight-color: hsl(0, 0%, 60%);
|
||||
--border-block-start-highlight-tap-color: hsl(0, 0%, 73%);
|
||||
--border-block-end-highlight-tap-color: hsl(0, 0%, 69%);
|
||||
--text-highlight-color: hsl(0, 0%, 15%);
|
||||
}
|
||||
}
|
||||
|
||||
display: inline-flex;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
margin-inline-start: 16px;
|
||||
|
||||
& + & {
|
||||
margin-inline-start: 12px;
|
||||
}
|
||||
|
||||
label {
|
||||
position: relative;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
padding-inline-start: 12px;
|
||||
padding-inline-end: 12px;
|
||||
border: 1px solid;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
background-color: var(--bg-color);
|
||||
border-color: var(--border-color);
|
||||
border-block-start-color: var(--border-block-start-color);
|
||||
border-block-end-color: var(--border-block-end-color);
|
||||
color: var(--text-color);
|
||||
box-shadow: 0 1px 0 var(--box-shadow-color);
|
||||
|
||||
&:active {
|
||||
background-color: var(--bg-tap-color);
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
margin-inline-end: -1px;
|
||||
|
||||
&:first-child label {
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-inline-start-color: var(--border-inline-start-color);
|
||||
}
|
||||
|
||||
&:last-child label {
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-inline-end-color: var(--border-inline-end-color);
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
display: none;
|
||||
|
||||
&:checked + label {
|
||||
z-index: 1;
|
||||
background-image: linear-gradient(to bottom, var(--bg-highlight-color-start), var(--bg-highlight-color-end));
|
||||
border-color: var(--border-highlight-color);
|
||||
border-block-start-color: var(--border-block-start-highlight-color);
|
||||
border-block-end-color: var(--border-block-end-highlight-color);
|
||||
color: var(--text-highlight-color);
|
||||
|
||||
&:active {
|
||||
background-image: linear-gradient(to bottom, var(--bg-highlight-tap-color-start), var(--bg-highlight-tap-color-end));
|
||||
border-color: var(--border-highlight-tap-color);
|
||||
border-block-start-color: var(--border-block-start-highlight-tap-color);
|
||||
border-block-end-color: var(--border-block-end-highlight-tap-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue