diff --git a/sa-token-doc/doc/index.html b/sa-token-doc/doc/index.html index a8c65456..bfab5591 100644 --- a/sa-token-doc/doc/index.html +++ b/sa-token-doc/doc/index.html @@ -13,68 +13,82 @@ - +
+ + +
+ - 🧾  更新日志 - 💥️  常见报错 - 🚩️  推荐公众号 - 🗞️  在线考试 ++ -
- 🧱  需求墙 - 📝  问卷调查 - - - - + --> +
加载中...
@@ -99,7 +113,7 @@ var name = 'logo '; name += 'Sa-Token v' + saTokenTopVersion + ''; window.$docsify = { - name: name, // 名字 + // name: name, // 名字 repo: 'https://github.com/dromara/sa-token', // github地址 // themeColor: '#06A3D7', // 主题颜色 basePath: location.pathname.substr(0, location.pathname.lastIndexOf('/') + 1), // 自动计算项目名字 @@ -146,6 +160,7 @@ + diff --git a/sa-token-doc/doc/lib/docsify-plugin.js b/sa-token-doc/doc/lib/docsify-plugin.js index a8aaea1c..038403d4 100644 --- a/sa-token-doc/doc/lib/docsify-plugin.js +++ b/sa-token-doc/doc/lib/docsify-plugin.js @@ -52,27 +52,35 @@ var myDocsifyPlugin = function(hook, vm) { // 功能4,添加 toc 目录 var dStr = ""; $('#main h2, #main h3, #main h4, #main h5, #main h6').each(function() { - // dStr += '
  • '; - $('.toc-box').append('
  • ' + this.innerHTML + '
  • '); - - // $('.toc-box').append(this.outerHTML); - - - // dStr += '
  • ' + $(this).text() + '
  • '; - // console.log(this); - // console.log(dStr); - - - // dStr += ''; }); - // $('.toc-box').html(dStr); - - }); // 钩子函数:初始化并第一次加载完成数据后调用,没有参数。 hook.ready(function() { + // 将搜索框转移到右上角 + document.querySelector(".sear-box").innerHTML = ''; + document.querySelector(".sear-box").append(document.querySelector(".search")); + document.querySelector(".search input").placeholder = '搜索…'; + + // 点击input时,展开 + $('.sear-box input').click(function() { + if($('.search input').val() != '') { + $('.results-panel').addClass('show'); + } + }); + // 失去焦点时,收缩 + $('.sear-box input').blur(function() { + setTimeout(function() { + $('.results-panel').removeClass('show'); + }, 200); + }) + // 选择一项时,收缩 + $('.sear-box').on('click', '.matching-post', function() { + console.log('click……'); + // $('.search input').val(''); + $('.results-panel').removeClass('show'); + }); }); } \ No newline at end of file diff --git a/sa-token-doc/doc/lib/index.css b/sa-token-doc/doc/lib/index.css index bbc4a10b..0a398b4d 100644 --- a/sa-token-doc/doc/lib/index.css +++ b/sa-token-doc/doc/lib/index.css @@ -1,55 +1,94 @@ /* 调整一下左侧树的样式 */ body{font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;} -.logo-box {position: absolute;left: 30px;top: 10px;cursor: pointer;color: #000;} -.logo-box img {width: 50px;height: 50px;vertical-align: middle;} -.logo-box .logo-text {display: inline-block;vertical-align: middle;font-size: 24px;font-weight: 400;} + #main {padding-bottom: 100px;} #main h2 {font-size: 1.6rem;} #main h3 {font-size: 1.25rem;} #main p strong{font-family: -apple-system,BlinkMacSystemFont,Segoe UI;} -.main-box .markdown-section{ padding: 30px 20px; max-width: 70%; margin-left: 12%;} +.main-box .markdown-section{ padding: 38px 20px; max-width: 70%; margin-left: 12%;} .main-box .markdown-section h4{font-size: 1rem;} + +/* 媒体查询 */ @media screen and (max-width: 800px) { .logo-box {display: none;} .main-box .markdown-section{max-width: 1000px; margin-left: auto;} } -/* @media screen and (min-width: 1700px) { - .main-box .markdown-section{max-width: 70%;} -} */ /* 手机端不显示广告,和一些其它东西 */ @media (max-width: 576px) {.wwads-cn,.p-none{display:none!important}} -/* 调整一下左侧树的字体样式 */ +/* ------- 头部样式 ------- */ +.doc-header{position: fixed; top: 0; z-index: 1000; width: 100%; height: 60px; line-height: 60px;} +.doc-header{background-color: hsla(0,0%,100%,0.97); box-shadow: 0 1px 3px rgba(26,26,26,0.1);} + +/* 左边导航 */ +.nav-left{display: inline-block; float: left;} +.logo-box {display: inline-block; cursor: pointer; color: #000; padding-left: 24px; height: 60px; line-height: 60px;} +.logo-box img {width: 50px; height: 50px; vertical-align: middle; position: relative; top: -1px; margin-right: 5px;} +.logo-box .logo-text {display: inline-block; margin: 0; padding: 0; color: #000; vertical-align: middle; font-size: 22px;font-weight: 500;} +.logo-box .logo-text {font-family: "Ubuntu","Helvetica Neue","Arial,sans-serif";} +.logo-box sub{margin-left: 5px; color: #666;} + +/* 右边导航 */ +.doc-header .nav-right{margin: 0; float: right; padding-right: 4em; font-size: 15px;} +.doc-header .nav-right>*{padding: 0px; margin: 0 14px;} +.doc-header .nav-right>*:last-child{position: relative; z-index: 1002;} +.doc-header .nav-right>select{border-color: #999; color: #666; outline: 0; cursor: pointer; transition: all 0.2s; background-color: #FFF; border-width: 1px; outline: 0;} +.doc-header .nav-right>select:hover{box-shadow: 0 0 10px #aaa;} + +.github-corner{z-index: 1001 !important;} +.doc-header .nav-right .wzi{font-size: 15px; line-height: 61px; transition: color 0.2s; padding-bottom: 4px;} +.doc-header .nav-right .wzi:hover{border-bottom: 2px var(--a-color) solid;} + +.nav-right a{color: #34495E;} + +/* 搜索框 */ +.sear-box{display: inline-block; width: 180px; margin-right: 20px; line-height: 26px; text-align: left;} +.sear-box{/* position: fixed; */ } +.sear-box .search{margin-bottom: 0px; padding: 0; border: 0;} +.results-panel{border: 1px #aaa solid; border-radius: 2px; padding: 10px; max-height: 60vh; overflow: auto; position: absolute; background-color: #FFF; width: 266px;width: 316px;} +.sear-box .search input{border: 1px solid #e3e3e3; color: #345; border-radius: 15px; line-height: 30px; padding-left: 30px; transition: all 0.2s;} +.sear-box .search input{background: #fff url(./search-icon.svg) 10px 8px no-repeat; background-size: 14px;} +.clear-button{display: none !important;} + +/* 工具栏超链接 展开、收缩div */ +.zk-box{display: inline-block;} +/* 外层盒 */ +.zk-box .zk-context{max-height: 0px; position: absolute; overflow: hidden;} +.zk-box:hover .zk-context{max-height: 300px;} +/* 内层盒 */ +.zk-context>div{padding: 1em 0; border: 1px #ccc solid; border-radius: 2px; background-color: #FFF; font-size: 12px; transition: all 0.2s; opacity: 0;} +.zk-box:hover .zk-context>div{opacity: 1;} +/* 小链接 */ +.zk-box .zk-context a{font-size: 14px; display: block; line-height: 32px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;} +.zk-box .zk-context a{text-align: left; padding: 0 1.5em 0 1em;} +.zk-box .zk-context .zk-fengexian{border-bottom: 1px #d9d9d9 solid; margin: 10px 0;} + +/* 下三角小图标 */ +.zk-icon{display: inline-block; width: 0px; height: 0px; position: relative;top: 3px; margin-left: 4px;} +.zk-icon{border-style: solid; border-width: 5px; border-color: #aaa transparent transparent transparent; } + + +/* ------- 调整一下左侧树的字体样式 ------- */ +.main-box .sidebar{padding-top: 25px; margin-top: 60px;} .sidebar .sidebar-nav>ul>li>p{font-size: 1.2em; margin-top: 10px;} .sidebar .sidebar-nav>ul>li> strong{font-size: 1.2em; margin-top: 10px;} -.sidebar ul li a{color: #222;} +/* .sidebar ul li a{color: #222;} */ .sidebar .sidebar-nav>ul>li>ul>li>a{/* color: #222; */font-size: 16px; /* font-weight: 700; */} -/* GitHub折线图最大宽度 */ -[alt=github-chart]{max-width: 897px;} -/* 大屏幕时,某些图片限制一下宽度 */ -@media screen and (min-width: 800px) { - [title=s-w],[title=s-w-sh]{max-width: 80%;} -} -[title=s-w-sh]{display: inline-block; border: 1px #eee solid;} +/* 做到悬浮出现下划线的效果 */ +.main-box .sidebar>.sidebar-nav>ul{padding-left: 6px;} +/* .main-box .sidebar li{white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin: 5px 0;} +.main-box .sidebar li a{display: inline; line-height: 30px; padding: 5px 0 2px;} +.main-box .sidebar li a:hover{text-decoration: none; color: #42b983; border-bottom: 1px #42b983 solid;} +.main-box .sidebar li.active>a{border: 0px;} +.main-box .sidebar li.active>a:after{content: ''; position: absolute; height: 30px; right: 0; border-right: 3px #42b983 solid;} */ -/* 公众号table */ -.gzh-table{ /* table-layout:fixed !important; */} -/* .gzh-table,.gzh-table tr,.gzh-table td{display: block !important;} */ -/* .gzh-table tbody{display: block !important; width: 100% !important;} */ -#main .gzh-table tr{background-color: #FFF;} -.gzh-table td{padding: 20px !important; width: 20%; border: 0;} -.gzh-table td b{display: block; margin-bottom: 10px; } -/* .gzh-table td img{width: 100%;} */ -/* .gzh-table tr, .gzh-table td{ border: 0px !important;} */ -/* tab选项卡优化 */ -.docsify-tabs__tab{outline: 0; cursor: pointer;} -.docsify-tabs--classic .docsify-tabs__tab--active{box-shadow: 0 0 0;} +/* .main-box .sidebar .app-sub-sidebar li:before{float: none;} */ -/* ============== 代码样式优化 ================ */ +/* ============== code代码样式优化 ================ */ /* 背景变黑 */ .main-box [data-lang]{padding: 0px !important; border-radius: 2px;overflow-x: auto; overflow-y: hidden;} @@ -63,7 +102,6 @@ body{font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu .code-line-box {line-height: inherit !important; background-color: #191919; color: #aaa;font-weight: 400;font-size: 0.85em;text-align: center;} .code-line-box {font-family: source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace;} - /* xml语言样式优化 */ .lang-xml .token.comment{color: #CDAB53;} .lang-xml .token.tag *{color: #db2d20;} @@ -99,7 +137,31 @@ body{font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu .lang-js .token.string{color: #ddd;} .lang-js .token.punctuation{color: #ddd;} -.gt-container{padding: 1.5em; padding-bottom: 100px;} +/* .gt-container{padding: 1.5em; padding-bottom: 100px;} */ + + +/* ------- markdown 内容样式优化 ------- */ + +/* GitHub折线图最大宽度 */ +[alt=github-chart]{max-width: 897px;} +/* 大屏幕时,某些图片限制一下宽度 */ +@media screen and (min-width: 800px) { + [title=s-w],[title=s-w-sh]{max-width: 80%;} +} +[title=s-w-sh]{display: inline-block; border: 1px #eee solid;} + +/* 公众号table */ +.gzh-table{ /* table-layout:fixed !important; */} +/* .gzh-table,.gzh-table tr,.gzh-table td{display: block !important;} */ +/* .gzh-table tbody{display: block !important; width: 100% !important;} */ +#main .gzh-table tr{background-color: #FFF;} +.gzh-table td{padding: 20px !important; width: 20%; border: 0;} +.gzh-table td b{display: block; margin-bottom: 10px; } + +/* tab选项卡优化 */ +.docsify-tabs__tab{outline: 0; cursor: pointer;} +.docsify-tabs--classic .docsify-tabs__tab--active{box-shadow: 0 0 0;} + /* 调整表格的响应式 */ #main table{margin-left: 0px;} @@ -135,23 +197,6 @@ body { #main .un-dec-a-pre+p a, #main p[align=center] a{border-bottom:0px;} -/* 工具栏超链接 展开、收缩div */ -body .a-box a{font-size: 16px; display: inline-block;} -.zk-box{display: inline-block;} -/* 外层盒 */ -.zk-box .zk-context{max-height: 0px; position: absolute; overflow: hidden;} -.zk-box:hover .zk-context{max-height: 300px;} -/* 内层盒 */ -.zk-context>div{padding: 1em 0; border: 1px #ccc solid; border-radius: 2px; background-color: #FFF; font-size: 12px; transition: all 0.2s; opacity: 0;} -.zk-box:hover .zk-context>div{opacity: 1;} -/* 小链接 */ -.zk-box .zk-context a{font-size: 14px; display: block; line-height: 32px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;} -.zk-box .zk-context a{text-align: left; padding: 0 1.5em 0 1em;} -.zk-box .zk-context .zk-fengexian{border-bottom: 1px #d9d9d9 solid; margin: 10px 0;} - -/* 下三角小图标 */ -.zk-icon{display: inline-block; width: 0px; height: 0px; position: relative;top: 3px; margin-left: 4px;} -.zk-icon{border-style: solid; border-width: 5px; border-color: #aaa transparent transparent transparent; } /* toc目录树 */ .toc-box>li{margin-bottom: 15px;} @@ -162,6 +207,17 @@ body .a-box a{font-size: 16px; display: inline-block;} #main .toc-box a{border-color: rgba(0,0,0,0); transition: 0s;} #main .toc-box a span{color: inherit;} -/* .a-box a{font-family: "Helvetica Neue", Helvetica, "PingFang SC", Tahoma, Arial, sans-serif;} -.a-box a{color: var(--a-color); } -.a-box a:hover{color: var(--a-hover-color) !important; border-bottom: 1px var(--a-hover-color) solid;} */ + + +/* 导航栏悬浮时出现下滑条条 */ +/* .doc-header .nav-right .wzi::after { + content: ''; + width: 0%; + float: left; + display: inline-block; + text-align: center; + margin-top: -15px; + border-bottom: 2px var(--a-color) solid; + transition: all 0.2s; +} +.doc-header .nav-right .wzi:hover::after {width: 100%;} */ \ No newline at end of file diff --git a/sa-token-doc/doc/lib/search-icon.svg b/sa-token-doc/doc/lib/search-icon.svg new file mode 100644 index 00000000..03d83913 --- /dev/null +++ b/sa-token-doc/doc/lib/search-icon.svg @@ -0,0 +1 @@ + diff --git a/sa-token-doc/doc/more/sa-token-donate.md b/sa-token-doc/doc/more/sa-token-donate.md index 43377284..9de4a0f3 100644 --- a/sa-token-doc/doc/more/sa-token-donate.md +++ b/sa-token-doc/doc/more/sa-token-donate.md @@ -19,6 +19,8 @@ Sa-Token 采用 Apache-2.0 开源协议,**承诺框架本身与官网文档永 | 赞助人 | 赞助金额 | 留言 | 时间 | | :-------- | :-------- | :-------- | :-------- | +| 两岁 (微信打赏) | ¥ 188 | 感谢您的开源项目! | 2021-12-27 | +| 刚子 (微信打赏) | ¥ 50 | 感谢您的开源项目! | 2021-12-27 | | [网络小渣渣](https://gitee.com/a9777) | ¥ 10 | 感谢您的开源项目! | 2021-12-24 | | [周周周杨](https://gitee.com/ChaoGeWanJiu) | ¥ 10 | 感谢您的开源项目! | 2021-12-18 | | [MrXionGe](https://gitee.com/MrXionGe) | ¥ 10 | SA加油~~ | 2021-12-17 | diff --git a/sa-token-doc/index.css b/sa-token-doc/index.css index ece45ae3..78b2dd67 100644 --- a/sa-token-doc/index.css +++ b/sa-token-doc/index.css @@ -10,19 +10,29 @@ body{font-size: 16px; color: #34495E; font-family: "Source Sans Pro","Helvetica /* 分割线 */ .s-fenge{width: 80%; margin: auto; border-top: 1px #ddd solid;} -/* -------- header头部 --------- */ -.s-header{height: 70px; border: 0px #000 solid; position: fixed; width: 100%;} -.s-header{background-color: #FFF; color: #000; z-index: 99999; box-shadow: 0 1px 3px rgba(26,26,26,0.1);} -/* logo部分 */ -.logo-box {margin-top: 10px; margin-left: 30px; cursor: pointer; color: #000; float: left;} -.logo-box img {width: 50px; height: 50px; vertical-align: middle;} -.logo-box .logo-text {display: inline-block;vertical-align: middle; font-size: 22px;font-weight: 400;} -/* 小章鱼 */ -.github-corner svg{color: #fff; fill: var(--theme-color, #42b983); height: 80px; width: 80px;} +/* ------- 头部样式 ------- */ +.doc-header{position: fixed; top: 0; z-index: 1000; width: 100%; height: 60px; line-height: 60px;} +.doc-header{background-color: hsla(0,0%,100%,0.97); box-shadow: 0 1px 3px rgba(26,26,26,0.1);} + +/* 左边logo */ +.nav-left{display: inline-block; float: left;} +.logo-box {display: inline-block; cursor: pointer; color: #000; padding-left: 24px; height: 60px; line-height: 60px;} +.logo-box img {width: 50px; height: 50px; vertical-align: middle; position: relative; top: -1px;} +.logo-box .logo-text {display: inline-block; margin: 0; padding: 0; padding-left: 5px; vertical-align: middle; font-size: 22px;/* font-weight: 700; */} + /* 右边导航 */ -.nav-right{float: right; line-height: 70px; padding-right: 4.5em; white-space: nowrap;} -.nav-right a{padding: 0px 1em; color: #34495E; text-decoration: none; transition: all 0.2s;} +.doc-header .nav-right{margin: 0; float: right; line-height: 60px; padding-right: 4em; white-space: nowrap; font-size: 15px; } +.doc-header .nav-right>*{padding: 0px; margin: 0 14px;} +.doc-header .nav-right>*:last-child{position: relative; z-index: 1002; } + +.nav-right a{color: #34495E; text-decoration: none; transition: all 0.2s;} .nav-right a:hover{color: #42B983;} +.doc-header .nav-right .wzi{font-size: 15px; line-height: 61px; transition: color 0.2s; padding-bottom: 4px;} +.doc-header .nav-right .wzi:hover{border-bottom: 2px #42B983 solid;} + +/* 小章鱼 */ +.github-corner svg{color: #fff; fill: var(--theme-color, #42b983); height: 80px; width: 80px; z-index: 1001 !important;} + /* 手机端不显示广告,和一些其它东西 */ @media (max-width: 576px) {.wwads-cn,.p-none{display:none!important}} diff --git a/sa-token-doc/index.html b/sa-token-doc/index.html index bf0c096f..19d42330 100644 --- a/sa-token-doc/index.html +++ b/sa-token-doc/index.html @@ -16,24 +16,27 @@
    -
    - -
    - - Sa-Token -
    -
    -