-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
173 lines (119 loc) · 4.81 KB
/
index.html
File metadata and controls
173 lines (119 loc) · 4.81 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>房木可</title>
<meta name="description" content="" />
<link rel="shortcut icon" href="https://www.fangmuke.cn/favicon.ico?v=1582306833705">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link rel="stylesheet" href="https://www.fangmuke.cn/styles/main.css">
<script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Serif:400,700">
</head>
<body>
<div class="main">
<div class="main-content">
<div class="site-header">
<a href="https://www.fangmuke.cn">
<img class="avatar" src="https://www.fangmuke.cn/images/avatar.png?v=1582306833705" alt="">
</a>
<h1 class="site-title">
房木可
</h1>
<p class="site-description">
</p>
<div class="menu-container">
<a href="/" class="menu">
首页
</a>
<a href="/archives" class="menu">
归档
</a>
<a href="/tags" class="menu">
标签
</a>
<a href="/post/about" class="menu">
关于
</a>
</div>
<div class="social-container">
<a href="https://github.com/fangmuke" target="_blank">
<i class="fab fa-github"></i>
</a>
<a href="https://weibo.com/5393402191" target="_blank">
<i class="fab fa-weibo"></i>
</a>
</div>
</div>
<div class="post-container">
<article class="post">
<a href="https://www.fangmuke.cn/post/hello-gridea/">
<h2 class="post-title">Hello Gridea</h2>
</a>
<div class="post-info">
<span>
2018-12-12
</span>
<span>
2 min read
</span>
<a href="https://www.fangmuke.cn/tag/E3PsXH47r/" class="post-tag">
# Gridea
</a>
</div>
<a href="https://www.fangmuke.cn/post/hello-gridea/" class="post-feature-image" style="background-image: url('https://www.fangmuke.cn/post-images/hello-gridea.png')">
</a>
<div class="post-abstract">
<p>👏 欢迎使用 <strong>Gridea</strong> !<br>
✍️ <strong>Gridea</strong> 一个静态博客写作客户端。你可以用它来记录你的生活、心情、知识、笔记、创意... ...</p>
</di>
</article>
</div>
<div class="pagination-container">
</div>
<div class="site-footer">
Powered by <a href="https://fangmuke.cn" target="_blank">房木可</a> | <a href="http://www.beian.miit.gov.cn" target="_blank" rel="nofollow noopener">豫ICP备20004008号</a> |
<a class="rss" href="https://www.fangmuke.cn/atom.xml" target="_blank">RSS</a> |
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1277854542'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D1277854542%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
</div>
<script>
hljs.initHighlightingOnLoad()
let mainNavLinks = document.querySelectorAll(".markdownIt-TOC a");
// This should probably be throttled.
// Especially because it triggers during smooth scrolling.
// https://lodash.com/docs/4.17.10#throttle
// You could do like...
// window.addEventListener("scroll", () => {
// _.throttle(doThatStuff, 100);
// });
// Only not doing it here to keep this Pen dependency-free.
window.addEventListener("scroll", event => {
let fromTop = window.scrollY;
mainNavLinks.forEach((link, index) => {
let section = document.getElementById(decodeURI(link.hash).substring(1));
let nextSection = null
if (mainNavLinks[index + 1]) {
nextSection = document.getElementById(decodeURI(mainNavLinks[index + 1].hash).substring(1));
}
console.log('section.offsetHeight', section.offsetHeight);
if (section.offsetTop <= fromTop) {
if (nextSection) {
if (nextSection.offsetTop > fromTop) {
link.classList.add("current");
} else {
link.classList.remove("current");
}
} else {
link.classList.add("current");
}
} else {
link.classList.remove("current");
}
});
});
</script>
</div>
</div>
</body>
</html>