-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhome_page.html
More file actions
132 lines (119 loc) · 5.1 KB
/
home_page.html
File metadata and controls
132 lines (119 loc) · 5.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8' />
<title>RoCS</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="icon" href="_media/favicon.ico" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/vue.css" />
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/themes/pure.css" disabled />
<link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css" disabled />
<!-- <link rel="stylesheet" href="//unpkg.com./docsify-sidebar-collapse/dist/sidebar.min.css" /> -->
<!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar.min.css" /> -->
<link rel="stylesheet" href="./style/markdown.css" />
</head>
<body>
<div id='app'>Loading ...</div>
<script>
const lang = location.hash.match(/#\/(de-de|es|ru-ru|zh-cn)\//);
if (lang) {
document.documentElement.setAttribute('lang', lang[1]);
}
window.$docsify = {
name: '', // RoCS
repo: '',
homepage: 'README.md',
auto2top: true,
coverpage: false,
executeScript: true,
loadSidebar: true,
// loadNavbar: true,
subMaxLevel: 4,
themeColor: '#0086d1',
sidebarDisplayLevel: -1,
routerMode: 'hash', // hash ,history
nameLink: {
'/es/': '#/es/',
'/de-de/': '#/de-de/',
'/ru-ru/': '#/ru-ru/',
'/zh-cn/': '#/zh-cn/',
'/': '#/'
},
pagination: {
previousText: 'Previous',
nextText: 'Next',
crossChapter: false,
crossChapterText: false,
},
search: {
noData: {
'/es/': '¡No hay resultados!',
'/de-de/': 'Keine Ergebnisse!',
'/ru-ru/': 'Никаких результатов!',
'/zh-cn/': '没有结果!',
'/': 'No results!'
},
paths: 'auto',
placeholder: {
'/es/': 'Buscar',
'/de-de/': 'Suche',
'/ru-ru/': 'Поиск',
'/zh-cn/': '搜索',
'/': 'Search'
},
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn']
},
plugins: [
function (hook, vm) {
hook.beforeEach(html => {
console.log(vm)
console.log(vm.route.file)
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
.replace(/\/master/, '/blob/master');
} else if (/jsdelivr\.net/.test(vm.route.file)) {
url = vm.route.file
.replace('cdn.jsdelivr.net/gh', 'github.com')
.replace('@master', '/blob/master');
} else {
url =
'https://github.com/FFTAI/fftai.github.io/blob/main/docs/' +
vm.route.file;
}
const editHtml = '[:memo: Edit Document](' + url + ')\n';
return (
// editHtml +
html +
'\n\n----\n\n' +
'<a href="https://robots.fourierintelligence.com/" target="_blank" style="color: #008fd5; font-weight: normal; text-decoration: none;">By Fourier Intelligence</a>'
);
});
}
],
routes: {
// 其他自定义路由配置
}
};
</script>
<script src='//cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js'></script>
<script src='//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js'></script>
<script src="//unpkg.com/docsify-router@latest"></script>
<script src="//unpkg.com/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.js"></script>
<script src="./style/pagination.js"></script>
<script>
document.querySelectorAll('.sidebar-nav a').forEach(function (link) {
link.addEventListener('click', function () {
// Remove 'active' class from all sibling <li> elements
this.closest('.sidebar-nav').querySelectorAll('li.active').forEach(function (activeLi) {
activeLi.classList.remove('active');
});
// Add 'active' class to this link's parent <li>
this.parentElement.classList.add('active');
});
});
</script>
</body>
</html>