mirror of
https://gitee.com/dromara/easy-es.git
synced 2025-12-06 17:18:57 +08:00
146 lines
6.2 KiB
HTML
146 lines
6.2 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>Easy-Es</title>
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||
<meta name="description" content="Description">
|
||
<meta name="viewport"
|
||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||
<!-- 设置浏览器图标 -->
|
||
<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
|
||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||
<!-- 默认主题 -->
|
||
<link rel="stylesheet" href="./lib/index.css">
|
||
<link rel="stylesheet" href="./lib/vue.css">
|
||
</head>
|
||
|
||
<body>
|
||
<!-- 定义加载时候的动作 -->
|
||
<div id="app"></div>
|
||
<script>
|
||
window.$docsify = {
|
||
// 项目名称
|
||
name: 'Easy-Es',
|
||
// 名称链接
|
||
nameLink: '/',
|
||
// 仓库地址,点击右上角的Github章鱼猫头像会跳转到此地址
|
||
repo: 'https://gitee.com/dromara/easy-es',
|
||
// 侧边栏支持,默认加载的是项目根目录下的_sidebar.md文件
|
||
loadSidebar: true,
|
||
// // 导航栏支持,默认加载的是项目根目录下的_navbar.md文件
|
||
loadNavbar: true,
|
||
// 封面支持,默认加载的是项目根目录下的_coverpage.md文件
|
||
coverpage: ['/', '/en/'],
|
||
// 最大支持渲染的标题层级
|
||
maxLevel: 5,
|
||
// 自定义侧边栏后默认不会再生成目录,设置生成目录的最大层级(建议配置为2-4)
|
||
subMaxLevel: 4,
|
||
// 小屏设备下合并导航栏到侧边栏
|
||
mergeNavbar: true,
|
||
// onlyCover: false,
|
||
// 切换页面后自动到页顶
|
||
auto2top: true,
|
||
//返回顶部
|
||
plugins: [
|
||
function (hook, vm) {
|
||
var CONFIG = {
|
||
auto: true,
|
||
text: 'Top',
|
||
right: 15,
|
||
bottom: 140,
|
||
offset: 500
|
||
}
|
||
var opts = vm.config.scrollToTop || CONFIG;
|
||
CONFIG.auto = opts.auto && typeof opts.auto === "boolean" ? opts.auto : CONFIG.auto;
|
||
CONFIG.text = opts.text && typeof opts.text === "string" ? opts.text : CONFIG.text;
|
||
CONFIG.right = opts.right && typeof opts.right === "number" ? opts.right : CONFIG.right;
|
||
CONFIG.bottom = opts.bottom && typeof opts.bottom === "number" ? opts.bottom : CONFIG.bottom;
|
||
CONFIG.offset = opts.offset && typeof opts.offset === "number" ? opts.offset : CONFIG.offset;
|
||
var onScroll = function (e) {
|
||
if (!CONFIG.auto) {
|
||
return
|
||
}
|
||
var offset = window.document.documentElement.scrollTop;
|
||
var $scrollBtn = Docsify.dom.find("span.scroll-to-top");
|
||
$scrollBtn.style.display = offset >= CONFIG.offset ? "block" : "none"
|
||
};
|
||
hook.mounted(function () {
|
||
var scrollBtn = document.createElement("span");
|
||
scrollBtn.className = "scroll-to-top";
|
||
scrollBtn.style.display = CONFIG.auto ? "none" : "block";
|
||
scrollBtn.style.overflow = "hidden";
|
||
scrollBtn.style.position = "fixed";
|
||
scrollBtn.style.right = CONFIG.right + "px";
|
||
scrollBtn.style.bottom = CONFIG.bottom + "px";
|
||
scrollBtn.style.width = "50px";
|
||
scrollBtn.style.height = "50px";
|
||
scrollBtn.style.background = "white";
|
||
scrollBtn.style.color = "#666";
|
||
scrollBtn.style.border = "1px solid #ddd";
|
||
scrollBtn.style.borderRadius = "4px";
|
||
scrollBtn.style.lineHeight = "42px";
|
||
scrollBtn.style.fontSize = "16px";
|
||
scrollBtn.style.textAlign = "center";
|
||
scrollBtn.style.boxShadow = "0px 0px 6px #eee";
|
||
scrollBtn.style.cursor = "pointer";
|
||
var textNode = document.createTextNode(CONFIG.text);
|
||
scrollBtn.appendChild(textNode);
|
||
document.body.appendChild(scrollBtn);
|
||
window.addEventListener("scroll", onScroll);
|
||
scrollBtn.onclick = function (e) {
|
||
e.stopPropagation();
|
||
var step = window.scrollY / 15;
|
||
var scroll = function () {
|
||
window.scrollTo(0, window.scrollY - step);
|
||
if (window.scrollY > 0) {
|
||
setTimeout(scroll, 15)
|
||
}
|
||
};
|
||
scroll()
|
||
}
|
||
})
|
||
}
|
||
]
|
||
|
||
}
|
||
</script>
|
||
<script>
|
||
// 搜索配置(url:https://docsify.js.org/#/zh-cn/plugins?id=%e5%85%a8%e6%96%87%e6%90%9c%e7%b4%a2-search)
|
||
window.$docsify = {
|
||
search: {
|
||
paths: ['/','/en/'],
|
||
noData: {
|
||
'/': '未匹配到结果!',
|
||
'/en/': 'No results!',
|
||
},
|
||
paths: 'auto',
|
||
placeholder: {
|
||
'/': '搜索',
|
||
'/en/': 'Search',
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<!-- docsify的js依赖 -->
|
||
<script src="https://unpkg.zhimg.com/docsify@4.9.4/lib/docsify.min.js"></script>
|
||
<!-- emoji表情支持 -->
|
||
<!--<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.min.js"></script>-->
|
||
<!-- 图片放大缩小支持 -->
|
||
<script src="lib/zoom-image.min.js"></script>
|
||
<!-- 搜索功能支持 -->
|
||
<script src="lib/search.min.js"></script>
|
||
<!--在所有的代码块上添加一个简单的Click to copy按钮来允许用户从你的文档中轻易地复制代码-->
|
||
<script src="https://unpkg.zhimg.com/docsify-copy-code@2.1.0/dist/docsify-copy-code.min.js"></script>
|
||
<!-- 侧边栏折叠支持 -->
|
||
<!--<script src="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js"></script>-->
|
||
<script src="lib/docsify-tabs.min.js"></script>
|
||
<!--多种编程语言支持-->
|
||
<script src="lib/prism-java.min.js"></script>
|
||
<!--<script src="//cdn.jsdelivr.net/npm/prismjs@1.27.0/components/prism-yaml.min.js"></script>-->
|
||
|
||
</body>
|
||
|
||
</html>
|