mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
优化文档样式
This commit is contained in:
@@ -203,38 +203,5 @@
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script src="https://www.layuicdn.com/layer-v3.1.1/layer.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
// 弹出提示
|
||||
function show() {
|
||||
var not_alert_time = localStorage.getItem('not_alert_time');
|
||||
if (not_alert_time != null && not_alert_time != '') {
|
||||
not_alert_time = parseInt(not_alert_time);
|
||||
// var t = 1000 * 60 * 60 * 24 * 30;
|
||||
var t = 1000 * 60 * 60 * 24;
|
||||
// var t = 1000 * 5;
|
||||
if (new Date().getTime() < not_alert_time + t) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 弹出
|
||||
var str = '<p style="color: #000;">《2021年度OSC中国最佳开源项目评选》<b style="color:red;">第二轮投票</b> 开始了(第一轮投票已清空),希望大家可以为 <b style="color:red;">Sa-Token</b> 投上一票,感谢! ❤️❤️❤️' +
|
||||
'<br><a href="https://www.oschina.net/project/top_cn_2021/?id=520" target="_blank">https://www.oschina.net/project/top_cn_2021/?id=520</a>' +
|
||||
'<br><br>PS:点击 确定/取消 后近期不再弹出此信息</p>';
|
||||
layer.confirm(str, {btn: ['好的!', '残忍拒绝'], title: '支持 Sa-Token '}, function() {
|
||||
console.log('点击了确定');
|
||||
localStorage.setItem('not_alert_time', new Date().getTime() + '');
|
||||
window.open('https://www.oschina.net/project/top_cn_2021/?id=520');
|
||||
layer.closeAll();
|
||||
}, function() {
|
||||
console.log('点击了取消');
|
||||
layer.closeAll();
|
||||
localStorage.setItem('not_alert_time', new Date().getTime() + '');
|
||||
});
|
||||
}
|
||||
show();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -7,7 +7,7 @@ body{font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu
|
||||
#main h2 {font-size: 1.6rem;}
|
||||
#main h3 {font-size: 1.25rem;}
|
||||
|
||||
.main-box .markdown-section{ padding: 30px 20px; max-width: 75%; margin-left: 10%;}
|
||||
.main-box .markdown-section{ padding: 30px 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;}
|
||||
@@ -51,11 +51,18 @@ body{font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu
|
||||
/* ============== 代码样式优化 ================ */
|
||||
|
||||
/* 背景变黑 */
|
||||
.main-box [data-lang]{padding: 0px !important; border-radius: 4px;overflow-x: auto; overflow-y: hidden;}
|
||||
.main-box [v-pre] code{border: 0px red solid; border-radius: 0px; /* background-color: #282828; */ background-color: #111; color: #FFF;}
|
||||
.main-box [data-lang]{padding: 0px !important; border-radius: 2px;overflow-x: auto; overflow-y: hidden;}
|
||||
.main-box [v-pre] code{border: 0px red solid; border-radius: 0px; /* background-color: #282828; */ background-color: #191919; color: #FFF;}
|
||||
.main-box [v-pre] code{padding: 1.5em 1.3em; margin-left: 40px !important;}
|
||||
/* .main-box h2{margin-top: 70px;} */
|
||||
|
||||
/* 代码行号盒子样式 */
|
||||
.code-line-box {list-style-type: none; border-right: 1px solid #000; position: absolute; top: 0; left: 0; width: 40px; user-select: none;}
|
||||
.code-line-box {padding: calc(1.5em + 1px) 0px !important; padding-bottom: calc(1.5em + 20px) !important; margin: 0px !important;}
|
||||
.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,12 +106,6 @@ body{font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu
|
||||
#main table tr th{min-width: 150px;}
|
||||
}
|
||||
|
||||
/* 代码行号盒子样式 */
|
||||
.code-line-box {list-style-type: none; border-right: 1px solid #000; position: absolute; top: 0; left: 0; width: 40px; user-select: none;}
|
||||
.code-line-box {padding: calc(1.5em + 1px) 0px !important; padding-bottom: calc(1.5em + 20px) !important; margin: 0px !important;}
|
||||
.code-line-box {line-height: inherit !important; background-color: #111; 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;}
|
||||
|
||||
/* 提示框加上灰色背景 */
|
||||
.main-box .markdown-section blockquote{padding: 1px 24px 1px 30px; background-color: #f8f8f8;}
|
||||
|
||||
|
||||
@@ -492,37 +492,5 @@
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// 弹出提示
|
||||
function show() {
|
||||
var not_alert_time = localStorage.getItem('not_alert_time');
|
||||
if (not_alert_time != null && not_alert_time != '') {
|
||||
not_alert_time = parseInt(not_alert_time);
|
||||
// var t = 1000 * 60 * 60 * 24 * 30;
|
||||
var t = 1000 * 60 * 60 * 24;
|
||||
// var t = 1000 * 5;
|
||||
if (new Date().getTime() < not_alert_time + t) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 弹出
|
||||
var str = '<p style="color: #000;">《2021年度OSC中国最佳开源项目评选》<b style="color:red;">第二轮投票</b> 开始了(第一轮投票已清空),希望大家可以为 <b style="color:red;">Sa-Token</b> 投上一票,感谢! ❤️❤️❤️' +
|
||||
'<br><a href="https://www.oschina.net/project/top_cn_2021/?id=520" target="_blank">https://www.oschina.net/project/top_cn_2021/?id=520</a>' +
|
||||
'<br><br>PS:点击 确定/取消 后近期不再弹出此信息</p>';
|
||||
layer.confirm(str, {btn: ['好的!', '残忍拒绝'], title: '支持 Sa-Token '}, function() {
|
||||
console.log('点击了确定');
|
||||
localStorage.setItem('not_alert_time', new Date().getTime() + '');
|
||||
window.open('https://www.oschina.net/project/top_cn_2021/?id=520');
|
||||
layer.closeAll();
|
||||
}, function() {
|
||||
console.log('点击了取消');
|
||||
layer.closeAll();
|
||||
localStorage.setItem('not_alert_time', new Date().getTime() + '');
|
||||
});
|
||||
}
|
||||
show();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user