-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.html
68 lines (67 loc) · 2.77 KB
/
index.html
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
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quick Markdown</title>
<link rel="stylesheet" href="./statics/md.base.css">
</head>
<body>
<header id="header"></header>
<main id="main">
<article id="article"></article>
<aside id="aside"></aside>
</main>
<footer id="footer">
<div id="footer-buttons" style="display: none;">
<a class="footer-link" onclick="window.history.go(-1); return false" href="#">返回上一页</a>
<a id="footer-link" class="footer-link" href=".">返回首页</a>
</div>
<p id="footer-text"><span id="customed-footer-text"></span> Powered by <a href="https://github.com/mengrru/quick-markdown">quick-markdown</a></p>
</footer>
<script src="./config.js"></script>
<script>
if (inIE()) {
document.getElementById('header').innerHTML = '<p style="text-align: center; padding-top: 20px;">你的浏览器版本太老了!推荐你使用 <a href="https://www.google.cn/chrome/">Chrome 浏览器</a>'
}
const themeInfo =
window.location.search
.slice(1).split('&')
.slice(1).map(e => e.split('='))
.filter(e => e[0] === 'theme')
[0]
const themeName = themeInfo && themeInfo[1]
loadCSS(
(themeName && 'themes/' + themeName + '/index.css')
|| (Config.theme && 'themes/' + Config.theme + '/index.css')
)
function inIE () {
var userAgent = window.navigator.userAgent.toLowerCase()
return userAgent.indexOf('trident') !== -1
}
function loadCSS (url) {
if (!url) {
document.getElementsByTagName('html')[0].style.display = 'block'
return
}
const head = document.getElementsByTagName('head')[0]
const link = document.createElement('link')
link.type = 'text/css'
link.rel = 'stylesheet'
link.href = url
head.appendChild(link)
document.getElementsByTagName('html')[0].style.display = 'block'
return link
}
</script>
<script src="./statics/markdown-it.js"></script>
<script src="./statics/markdown-it-mark.js"></script>
<script src="./statics/markdown-it-container.js"></script>
<script src="./statics/markdown-it-anchor.js"></script>
<script src="./statics/markdown-it-toc-done-right.js"></script>
<script src="./statics/highlight.min.js"></script>
<script src="./statics/qm.js"></script>
<script src="./plugins/files-list/ui.js"></script>
</body>
</html>