更新 Slinky 并调整文件结构

更新 Slinky 至 4.2.1
This commit is contained in:
2020-09-09 22:46:08 +08:00
parent 2dc03fbe55
commit 86b257294f
24 changed files with 341 additions and 314 deletions

112
assets/css/nav-all.css Normal file
View File

@@ -0,0 +1,112 @@
* {
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
/* 背景 */
.page-background {
z-index: -100;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-attachment: fixed;
background-image: url(../img/Unsplash_V6TWE6h8gyg_Blur.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
/*
.page-background:after {
content: "";
z-index: -90;
position: inherit;
top: inherit;
left: inherit;
width: inherit;
height: inherit;
background: inherit;
filter: blur(4px);
}
*/
/* 滚动条 */
::-webkit-scrollbar {
height: 8px;
width: 8px;
}
::-webkit-scrollbar-thumb {
background-color: #CCC;
border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
background-color: #03A9F4;
}
::-webkit-scrollbar-track {
background-color: #FFF;
border-radius: 0;
}
/* 选中 */
::selection {
background:#03A9F4;
color:#FFF;
}
::-moz-selection {
background:#03A9F4;
color:#FFF;
}
::-webkit-selection {
background:#03A9F4;
color:#FFF;
}
/* 动画 */
@keyframes spinner {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes FloatingBarSlide {
from {
bottom: -50px;
}
}
@keyframes ToTopAnimation {
0% {
}
50% {
right: 2.2rem;
bottom: 2.2rem;
height: 2.6rem;
width: 2.6rem;
line-height: 40px;
color: #FFF;
}
100% {
color: #2196F3;
transform: rotate(360deg);
}
}
@keyframes ToolPanelShow {
from {
bottom: -110%;
opacity: 0;
}
to {
bottom: 0;
opacity: 1;
}
}

356
assets/css/nav-index.css Normal file
View File

@@ -0,0 +1,356 @@
@charset "UTF-8";
/* 标签 */
body {
background-color: #999;
color: #000;
margin: 6em auto;
text-transform: none;
overflow-x: hidden;
scroll-behavior: smooth;
}
a {
color: #222;
}
a:hover {
color: #03A9F4;
}
a:active {
color: #00BCD4;
}
h2 {
color: #FFF;
font-size: 1.6em;
text-shadow: 4px 4px 5px rgba(0, 0, 0, 0.2);
}
h3 {
color: #03A9F4;
}
/* 覆盖 Slinky */
header,
h1 {
color: #444;
}
header h1::before {
background-image: url('../../favicon.ico');
background-position: center;
background-repeat: no-repeat;
background-size: contain;
}
header p {
color: #555;
}
main {
/* opacity: 0; */
background-color: transparent;
transition: opacity 1s;
}
footer {
color: #FFF;
font-size: 0.9em;
line-height: 1.5em;
}
footer a {
color: #FFF;
}
footer p {
margin: 0;
}
/* 工具面板 */
.tool-panel {
display: none;
z-index: 100;
position: fixed;
left: 0;
bottom: 0;
opacity: 1;
transition: all 0.5s;
animation: ToolPanelShow 0.5s;
}
.tool-panel-bar {
height: 32px;
}
.tool-panel-newtab,
.tool-panel-close {
position: absolute;
top: 0;
height: 32px;
width: 64px;
box-shadow: -2px 0 10px 0 rgba(0, 0, 0, 0.1);
line-height: 32px;
text-align: center;
font-size: 14px;
color: #FFF;
}
.tool-panel-blank {
position: absolute;
top: 0;
left: 0;
height: 32px;
width: 100%;
background-color: #FFF;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.tool-panel-newtab {
right: 72px;
background-color: #2196F3;
}
.tool-panel-close {
right: 8px;
background-color: #F44336;
}
.tool-panel-iframe iframe {
height: calc(100vh - 32px);
width: 100vw;
}
/* 链接图标 */
/*
main section li img {
height: 28px;
position: absolute;
transform: translate(10px, 10px);
}
main section li a:not(.back) {
padding-left: 45px !important;
}
*/
/* 全屏文字 */
.fullscreen-text {
position: fixed;
top: 50%;
left: 50%;
font-size: 5vw;
color: #FFF;
transform: translate(-50%, -50%);
transition: opacity 1s;
}
/* 查找面板 */
.search-panel {
visibility: hidden;
position: fixed;
top: 50%;
left: 50%;
height: 300px;
width: 500px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
transform: translate(-50%, -50%);
}
.search-bar{
text-align: center;
}
.search-bar .search-input {
margin: 20px 5px 0 0;
padding: 0 15px;
width: 60%;
height: 50px;
border: solid 2px #03A9F4;
box-shadow: 0 0 5px rgba(3, 169, 244, 0.1);
font-size: 20px;
transition: border 0.2s;
}
.search-bar .search-input:hover {
border: solid 2px #00BCD4;
}
.search-bar .search-submit,
.search-bar .search-cancel {
width: 75px;
height: 50px;
border: none;
background-color: #03A9F4;
box-shadow: 0 5px 10px -5px rgba(3, 169, 244, 0.4);
font-size: 20px;
color: #FFF;
transition: background 0.2s;
}
.search-bar .search-submit:hover,
.search-bar .search-cancel:hover {
background-color: #00BCD4;
}
.search-bar .search-submit {
margin-right: 5px;
}
.search-result {
margin-top: 10px;
padding: 0 16px;
height: calc(100% - 100px);
overflow-y: scroll;
}
.search-result a {
display: block;
margin-bottom: 10px;
font-size: 20px;
}
#search-result-title {
border-bottom: 1px solid #DDD;
}
#search-result-link {
margin-top: 7px;
}
@media screen and (max-width: 500px) {
.search-panel {
height: 300px;
width: 95%;
}
.search-bar .search-input {
margin: 15px 5px 0 0;
padding: 0 10px;
width: 55%;
height: 40px;
font-size: 16px;
}
.search-bar .search-submit,
.search-bar .search-cancel {
width: 16%;
height: 40px;
font-size: 16px;
}
.search-result {
padding: 0 5%;
height: calc(100% - 80px);
}
.search-result a {
margin-bottom: 8px;
font-size: 16px;
}
}
/* 搜索引擎 */
.search-engine {
width: 100%;
}
.search-engine-bar {
height: 45px;
width: 100%;
background-color: #FFF;
border-radius: 5px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
white-space: nowrap;
}
.search-engine-select {
color: #FFF;
text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
}
#search-engine-input {
padding-left: 15px;
box-sizing: border-box;
height: 100%;
width: calc(100% - 45px);
background-color: transparent;
border: none;
font-size: 14px;
}
.search-engine-submit {
display: inline-block;
position: relative;
top: 7px;
left: 7px;
height: 24px;
width: 24px;
color: #03A9F4;
fill: currentcolor;
user-select: none;
}
.search-engine-select ul {
margin-top: 20px;
width: 100%;
text-align: center;
}
.search-engine-select ul li {
display: inline-block;
margin: 0 5px;
list-style: none;
font-size: 16px;
}
/* radio 样式 */
.search-engine-select ul li input[type="radio"] {
position: absolute;
opacity: 0;
}
.search-engine-select ul li input[type="radio"] + label:before {
content: '';
border-radius: 0px;
background: #FFF;
border: 1px solid #999;
display: inline-block;
width: 1em;
height: 1em;
position: relative;
top: 0;
margin-right: 0.25em;
vertical-align: top;
text-align: center;
transition: all 0.25s ease;
}
.search-engine-select ul li input[type="radio"]:checked + label:before {
background-color: #03A9F4;
box-shadow: inset 0 0 0 2px #FFF;
}
.search-engine-select ul li input[type="radio"]:focus + label:before {
outline: none;
border-color: #00BCD4;
}
.search-engine-select ul li input[type="radio"]:disabled + label:before {
box-shadow: inset 0 0 0 2px #FFF;
border-color: #999;
background: #999;
}
.search-engine-select ul li input[type="radio"] + label:empty:before {
margin-right: 0;
}
/* 悬浮栏 */
.floating-bar {
z-index: 50;
position: fixed;
left: 0;
bottom: 20px;
width: 100%;
/* opacity: 0.9; */
text-align: center;
animation: FloatingBarSlide 1s ease-out 1;
}
.floating-bar-search,
.floating-bar-tool,
.floating-bar-about,
.floating-bar-totop {
display: inline-block;
width: 50px;
height: 32px;
background-color: #4CAF50;
box-shadow: 0 8px 10px -4px rgba(76, 175, 80, 0.5);
text-align: center;
line-height: 32px;
font-size: 14px;
color: #fff;
}
.floating-bar-tool,
.floating-bar-about,
.floating-bar-totop {
margin-left: 5px;
}

240
assets/css/nav-tool.css Normal file
View File

@@ -0,0 +1,240 @@
@charset "UTF-8";
html {
font-size: 16px;
}
body {
padding: 1.2rem 0 5rem 0;
background-color: #999;
scroll-behavior: smooth;
}
/* 主要 */
.main {
margin: 0 auto;
width: 25rem;
}
.main > div {
margin: 1.2rem 0;
padding: 1rem;
box-sizing: border-box;
width: 100%;
border-radius: 0.4rem;
background-color: #FFF;
box-shadow: 0 0 0.6rem rgba(0, 0, 0, 0.05);
user-select: none;
}
.main > div header {
margin-bottom: 1rem;
text-align: center;
font-size: 1.2rem;
font-weight: bold;
}
.main > div hr {
margin: 0.5rem 0;
height: 0.1rem;
border: none;
background-color: #EEE;
}
.main > div input:focus {
outline: none;
}
.main > div input[type="checkbox"] {
width: 0.8rem;
height: 0.8rem;
}
.main > div input[type="radio"] {
width: 0.8rem;
height: 0.8rem;
}
.main > div input[type="range"] {
-webkit-appearance: none;
width: 6rem;
}
.main > div input[type=range]::-webkit-slider-runnable-track {
height: 0.7rem;
border-radius: 0.7rem;
background-color: #999;
}
.main > div input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
height: 1.2rem;
width: 1rem;
margin-top: -0.25rem;
background: #555;
border-radius: 0.2rem;
}
.main > div input[type="text"] {
padding: 0.3rem 0.4rem;
border: 0.08rem solid #03A9F4;
font-size: 0.9rem;
}
.main > div p {
margin: 0.5rem 0;
}
.main > div textarea {
padding: 0.4rem;
box-sizing: border-box;
width: 100%;
border: 0.08rem solid #03A9F4;
box-shadow: 0 0 0.4rem rgba(3, 169, 244, 0.2);
font-size: 0.9rem;
resize: vertical;
}
.main > div textarea:focus {
outline: none;
}
/* 按钮 */
.tool-button {
margin: 0.5rem 0 !important;
}
.tool-button > div {
display: inline-block;
user-select: none;
margin: 0 0.4rem 0 0 !important;
padding: 0.4rem 0.9rem;
background-color: #03A9F4;
text-align: center;
font-size: 0.9rem;
color: #FFF;
border-radius: 0.4rem;
box-shadow: 0.2rem 0.2rem 0.4rem rgba(3, 169, 244, 0.4);
transition: background 0.2s;
}
.tool-button > div:hover {
background-color: #2196F3;
}
/* 索引 */
.tool-nav ul li {
display: inline-block;
list-style: none;
}
.tool-nav ul li a {
display: block;
float: left;
padding: 0.4rem 0.6rem;
border-radius: 0.4rem;
background-color: #4CAF50;
text-decoration: none;
font-size: 0.9rem;
color: #FFF;
transition: background 0.2s;
}
.tool-nav ul li a:hover {
background-color: #8BC34A;
}
.tool-nav-link {
margin: 0 auto;
box-sizing: border-box;
width: 100%;
}
/* Unix 时间戳转换 */
#tool-unixtime > div {
margin: 0.2rem 0;
}
#tool-unixtime > div > span {
display: inline-block;
width: 7rem;
text-align: right;
font-weight: bold;
}
#tool-unixtime > p {
margin: 0.5rem 0;
font-size: 1rem;
font-weight: bold;
}
#tool-unixtime input[type="text"] {
width: 10rem;
}
/* 计算下载用时 */
#tool-downloadtime {
}
#tool-downloadtime-input {
}
#tool-downloadtime-output {
}
#tool-downloadtime-help {
font-size: 0.9rem;
}
/* 简易计算 */
#tool-calculate textarea {
font-size: 1rem;
}
#tool-calculate-tofixed {
width: 1rem;
text-align: center;
}
/* 生成批量下载链接 */
#tool-genlink-link input[type="text"] {
width: 80%;
}
#tool-genlink-settings > div {
margin: 0.4rem 0;
}
#tool-genlink-settings input[type="text"] {
width: 1.5rem;
text-align: center;
}
#tool-genlink-settings input[type="radio"] + label {
font-weight: bold;
}
/* 生成随机字符串 */
#genstring-result input[type="text"] {
width: 80%;
font-family: monospace;
}
/* 新窗口(小窗)中打开 */
#tool-newwindow > div {
margin-bottom: 0.6rem;
}
#tool-newwindow-link input[type="text"] {
width: 80%;
}
#tool-newwindow-meta input[type="text"] {
width: 7rem;
}
/* 运行 JavaScript */
#tool-runjs textarea {
font-family: monospace;
}
/* 返回顶部 */
.to-top {
position: fixed;
right: 2rem;
bottom: 2rem;
height: 3rem;
width: 3rem;
border-radius: 50%;
box-shadow: 0 0 0.6rem 0 rgba(0, 0, 0, 0.1);
background-color: #FFF;
text-align: center;
line-height: 3rem;
font-family: monospace;
font-size: 1.2rem;
color: #2196F3;
user-select: none;
}
.to-top:hover {
animation: ToTopAnimation 0.5s ease-in-out;
}

View File

@@ -0,0 +1,221 @@
/*
* colors
* primary #4cd964
* accent #5ac8fa
* accent #ff2d55
* background #fff
* text #222
*/
/* reset */
* {
border-radius: 0;
box-sizing: border-box;
font-weight: normal;
margin: 0;
outline: none;
padding: 0;
user-select: none;
}
::selection {
background: #cbf3b4;
}
/* global */
body {
background: #fff;
color: #222;
cursor: default;
display: flex;
flex-direction: column;
font: normal 14px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica,
Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
justify-content: center;
margin: 4em auto;
max-width: calc(100% - 2em);
min-height: calc(100vh - 8em);
text-transform: lowercase;
width: 30em;
}
a {
color: #4cd964;
text-decoration: none;
transition: 200ms;
}
a:hover {
color: #59e671;
}
a:active {
color: #3fcc57;
}
code {
font-family: 'Consolas', monospace;
}
h1,
h2,
h3 {
font-weight: 500;
text-align: center;
}
h2 {
color: #4cd964;
font-size: 1.5em;
margin-bottom: 2em;
position: relative;
}
h2::before {
content: '';
height: 1px;
position: absolute;
width: 100%;
}
h3 {
color: #5ac8fa;
font-size: 1.25em;
margin: 2em 0;
}
img {
border: none;
max-width: 100%;
vertical-align: top;
}
p {
margin: 2em 0;
text-align: center;
}
pre {
background: #f6f7f8;
display: block;
line-height: 1.4;
padding: 1em;
user-select: text;
width: 100%;
}
table {
background: #f6f7f8;
border-collapse: collapse;
border-spacing: 0;
margin: 2em 0;
width: 100%;
}
thead tr {
border-bottom: 1px solid rgba(0, 0, 0, 0.025);
}
thead th {
color: #ff2d55;
font-weight: 500;
}
tbody tr:not(:first-child) {
border-top: 1px solid rgba(0, 0, 0, 0.025);
}
tbody td {
line-height: 1.4;
}
th,
td {
padding: 1em;
text-align: left;
vertical-align: top;
}
/* layout */
header,
h1 {
align-items: center;
align-self: center;
display: flex;
flex-direction: column;
}
header h1::before {
content: '';
background: url('slinky.svg') center no-repeat;
background-size: 2em;
height: 2em;
margin-bottom: 1em;
width: 2em;
}
header p {
color: gray;
margin-top: 1em;
}
main {
background: #fff;
margin: 4em 0;
}
main section:not(:first-child) {
margin-top: 4em;
}
footer {
color: #999;
font-size: 0.875em;
line-height: 1.5;
text-align: center;
}
footer img {
height: 1.5em;
}
/* components */
#menu {
width: 100%;
}
.loading {
align-items: center;
display: flex;
justify-content: center;
margin: 2em;
text-align: center;
}
.loading::before {
animation: spinner 1s infinite linear;
content: '';
border: 2px solid transparent;
border-top-color: #5ac8fa;
border-right-color: #5ac8fa;
border-radius: 1em;
height: 1.5em;
margin-right: 1em;
width: 1.5em;
}
/* animations */
@keyframes spinner {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

69
assets/css/slinky.min.css vendored Normal file
View File

@@ -0,0 +1,69 @@
.slinky-menu {
overflow: hidden;
transform: translateZ(0); }
.slinky-menu > ul {
left: 0;
position: relative;
transform: translateZ(0); }
.slinky-menu ul,
.slinky-menu li {
list-style: none;
margin: 0; }
.slinky-menu ul {
width: 100%; }
.slinky-menu a {
align-items: center;
display: flex; }
.slinky-menu a span {
flex: 1;
line-height: 1.4; }
.slinky-menu li ul {
display: none;
left: 100%;
position: absolute;
top: 0; }
.slinky-menu .header {
display: flex; }
.slinky-menu .header .title {
flex: 1;
line-height: 1.4;
margin: 0;
order: 1; }
.slinky-theme-default {
background: #f6f7f8; }
.slinky-theme-default .title {
color: #333;
padding: 1em; }
.slinky-theme-default li {
line-height: 1; }
.slinky-theme-default a:not(.back) {
color: #333;
padding: 1em; }
.slinky-theme-default a:not(.back):hover {
background: rgba(90, 200, 250, 0.25); }
.slinky-theme-default a:not(.back):active {
background: rgba(90, 200, 250, 0.5); }
.slinky-theme-default .next::after,
.slinky-theme-default .back::before {
background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+ICAgIDxwYXRoIGQ9Ik0xMi4yMTkgMi4yODFMMTAuNzggMy43MiAxOC4wNjIgMTFIMnYyaDE2LjA2M2wtNy4yODIgNy4yODEgMS40MzggMS40MzggOS05IC42ODctLjcxOS0uNjg3LS43MTl6IiAvPjwvc3ZnPg==) center no-repeat;
background-size: 1em;
content: '';
height: 1em;
opacity: 0.25;
transition: 200ms;
width: 1em; }
.slinky-theme-default .next::after {
margin-left: 1em; }
.slinky-theme-default .back::before {
padding: 1em;
transform: scaleX(-1); }
.slinky-theme-default .next:hover::after,
.slinky-theme-default .back:hover::before {
opacity: 0.75; }
.slinky-theme-default .next:active::after,
.slinky-theme-default .back:active::before {
opacity: 1; }
/*# sourceMappingURL=slinky.min.css.map*/

View File

@@ -0,0 +1 @@
{"version":3,"sources":["webpack:///./src/slinky.scss"],"names":[],"mappings":"AAAA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,cAAc;AACd;AACA,gBAAgB;AAChB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA,sBAAsB;AACtB;AACA;AACA,iBAAiB;AACjB;AACA,mBAAmB;AACnB;AACA;AACA,iBAAiB;AACjB;AACA,2CAA2C;AAC3C;AACA,0CAA0C;AAC1C;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA,qBAAqB;AACrB;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,kBAAkB;AAClB;AACA;AACA,eAAe","file":"slinky.min.css","sourcesContent":[".slinky-menu {\n overflow: hidden;\n transform: translateZ(0); }\n .slinky-menu > ul {\n left: 0;\n position: relative;\n transform: translateZ(0); }\n .slinky-menu ul,\n .slinky-menu li {\n list-style: none;\n margin: 0; }\n .slinky-menu ul {\n width: 100%; }\n .slinky-menu a {\n align-items: center;\n display: flex; }\n .slinky-menu a span {\n flex: 1;\n line-height: 1.4; }\n .slinky-menu li ul {\n display: none;\n left: 100%;\n position: absolute;\n top: 0; }\n .slinky-menu .header {\n display: flex; }\n .slinky-menu .header .title {\n flex: 1;\n line-height: 1.4;\n margin: 0;\n order: 1; }\n\n.slinky-theme-default {\n background: #f6f7f8; }\n .slinky-theme-default .title {\n color: #333;\n padding: 1em; }\n .slinky-theme-default li {\n line-height: 1; }\n .slinky-theme-default a:not(.back) {\n color: #333;\n padding: 1em; }\n .slinky-theme-default a:not(.back):hover {\n background: rgba(90, 200, 250, 0.25); }\n .slinky-theme-default a:not(.back):active {\n background: rgba(90, 200, 250, 0.5); }\n .slinky-theme-default .next::after,\n .slinky-theme-default .back::before {\n background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+ICAgIDxwYXRoIGQ9Ik0xMi4yMTkgMi4yODFMMTAuNzggMy43MiAxOC4wNjIgMTFIMnYyaDE2LjA2M2wtNy4yODIgNy4yODEgMS40MzggMS40MzggOS05IC42ODctLjcxOS0uNjg3LS43MTl6IiAvPjwvc3ZnPg==) center no-repeat;\n background-size: 1em;\n content: '';\n height: 1em;\n opacity: 0.25;\n transition: 200ms;\n width: 1em; }\n .slinky-theme-default .next::after {\n margin-left: 1em; }\n .slinky-theme-default .back::before {\n padding: 1em;\n transform: scaleX(-1); }\n .slinky-theme-default .next:hover::after,\n .slinky-theme-default .back:hover::before {\n opacity: 0.75; }\n .slinky-theme-default .next:active::after,\n .slinky-theme-default .back:active::before {\n opacity: 1; }\n"],"sourceRoot":""}