-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
157 lines (155 loc) · 4.49 KB
/
Copy pathindex.html
File metadata and controls
157 lines (155 loc) · 4.49 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!doctype html>
<html>
<head>
<meta
http-equiv="X-UA-Compatible"
content="IE=edge,chrome=1"
/>
<meta
name="viewport"
content="width=device-width,initial-scale=1"
/>
<meta charset="UTF-8" />
<title>BlockCode Playgrounds</title>
<link
rel="stylesheet"
href="//unpkg.com/docsify/themes/vue.css"
/>
<link
rel="stylesheet"
href="//unpkg.com/@docisfy/vite-coverpage/vite-coverpage.css"
/>
</head>
<body>
<style>
:root {
--theme-color: #4c97ff;
}
.cover .mask {
background: #e9f1fc;
}
.cover .cover-main img:first-child {
transform: perspective(100px) translate(-60%, -50%) rotateY(-2deg) !important;
width: 500px !important;
max-height: unset !important;
}
.app-name img {
width: 80%;
}
.markdown-section {
max-width: 960px;
}
.docsify-pagination-container {
padding: 10px 20px;
height: auto;
}
.pagination-item-title {
font-size: 1em;
}
</style>
<div id="app"></div>
<script>
window.$docsify = {
repo: 'BlockCodeLab/playgrounds-app',
logo: '/_media/bar.png',
name: 'BlockCode Playgrounds',
nameLink: {
'/en/': '#/en/README',
'/zh-hans/': '#/zh-hans/README',
'/zh-hant/': '#/zh-hant/README',
},
coverpage: ['/en/', '/zh-hans/', '/zh-hant/'],
loadNavbar: true,
loadSidebar: true,
subMaxLevel: 4,
autoHeader: true,
auto2top: true,
search: {
maxAge: 86400000,
paths: 'auto',
placeholder: {
'/en/': 'Type to search',
'/zh-hans/': '搜索',
'/zh-hant/': '搜索',
},
noData: {
'/en/': 'No Results',
'/zh-hans/': '找不到结果',
'/zh-hant/': '找不到結果',
},
depth: 2,
hideOtherSidebarContent: false,
},
copyCode: {
buttonText: {
'/en/': 'Copy to clipboard',
'/zh-hans/': '点击复制',
'/zh-hant/': '點擊複製',
},
errorText: {
'/en/': 'Error',
'/zh-hans/': '错误',
'/zh-hant/': '錯誤',
},
successText: {
'/en/': 'Copied',
'/zh-hans/': '复制',
'/zh-hant/': '複製',
},
},
pagination: {
previousText: {
'/en/': 'PREVIOUS',
'/zh-hans/': '上一篇',
'/zh-hant/': '上一篇',
},
nextText: {
'/en/': 'NEXT',
'/zh-hans/': '下一篇',
'/zh-hant/': '下一篇',
},
crossChapter: true,
crossChapterText: true,
},
select: {
sync: true,
theme: 'classic',
selected: {
硬件选择: 'Arduino',
},
},
plugins: [
(hook, vm) => {
// 自动切换语言
hook.mounted(() => {
if (vm.route.path === '/') {
const langs = navigator.languages || [navigator.language];
for (let raw of langs) {
const lang = raw.toLowerCase();
if (!lang.startsWith('zh')) continue;
if (lang.includes('hant') || lang.includes('tw') || lang.includes('hk') || lang.includes('mo')) {
location.href = '#/zh-hant/';
return;
}
location.href = '#/zh-hans/';
return;
}
// 没有中文
location.href = '#/en/';
}
});
// 应用 pangu.js
hook.doneEach(() => pangu && pangu.spacingNode(document.getElementById('main')));
},
],
};
</script>
<script src="//unpkg.com/pangu/dist/browser/pangu.umd.js"></script>
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
<script src="//unpkg.com/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
<script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="//unpkg.com/docsify-select/dist/docsify-select.min.js"></script>
</body>
</html>