-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
201 lines (143 loc) · 4.93 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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Gridea</title>
<meta name="description" content="温故而知新" />
<link rel="shortcut icon" href="https://elisir516.github.io/favicon.ico?v=1568768469701">
<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://elisir516.github.io/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://elisir516.github.io">
<img class="avatar" src="https://elisir516.github.io/images/avatar.png?v=1568768469701" alt="">
</a>
<h1 class="site-title">
Gridea
</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">
</div>
</div>
<div class="post-container">
<article class="post">
<a href="https://elisir516.github.io/post/di-er-ge-ce-shi">
<h2 class="post-title">第二个测试</h2>
</a>
<div class="post-info">
<span>
2019-09-18
</span>
<span>
1 min read
</span>
</div>
<div class="post-abstract">
</di>
</article>
<article class="post">
<a href="https://elisir516.github.io/post/test">
<h2 class="post-title">test</h2>
</a>
<div class="post-info">
<span>
2019-09-18
</span>
<span>
1 min read
</span>
</div>
<div class="post-abstract">
</di>
</article>
<article class="post">
<a href="https://elisir516.github.io/post/hello-gridea">
<h2 class="post-title">Hello Gridea</h2>
</a>
<div class="post-info">
<span>
2018-12-12
</span>
<span>
1 min read
</span>
<a href="https://elisir516.github.io/tag/kc8LWqSQN" class="post-tag">
# Gridea
</a>
</div>
<a href="https://elisir516.github.io/post/hello-gridea" class="post-feature-image" style="background-image: url('https://elisir516.github.io/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://github.com/getgridea/gridea" target="_blank">Gridea</a> |
<a class="rss" href="https://elisir516.github.io/atom.xml" target="_blank">RSS</a>
</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>