-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
240 lines (175 loc) · 7.66 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Tech Notebook</title>
<meta name="description" content="AI & Digital Frontier" />
<link rel="shortcut icon" href="https://huia711.GitHub.io/favicon.ico?v=1730290531677">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.3.0/fonts/remixicon.css" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Serif:400,700">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<link rel="stylesheet" href="https://huia711.GitHub.io/styles/main.css">
</head>
<body>
<div class="main px-4 flex flex-col lg:flex-row">
<div id="sidebar" class="sidebar-wrapper lg:static lg:w-1/4">
<div class="lg:sticky top-0">
<div class="sidebar-content">
<div class="flex lg:block p-4 lg:px-0 items-center fixed lg:static lg:block top-0 right-0 left-0 bg-white z-50">
<i class="ri-menu-2-line lg:mt-4 text-2xl cursor-pointer animated fadeIn" onclick="openMenu()"></i>
<a href="https://huia711.GitHub.io">
<img class="animated fadeInLeft avatar rounded-lg mx-4 lg:mt-32 lg:mx-0 mt-0 lg:w-24 lg:h-24 w-12 w-12" src="https://huia711.GitHub.io/images/avatar.png?v=1730290531677" alt="">
</a>
<h1 class="animated fadeInLeft lg:text-4xl font-extrabold lg:mt-8 mt-0 text-xl" style="animation-delay: 0.2s">Tech Notebook</h1>
</div>
<div class="animated fadeInLeft" style="animation-delay: 0.4s">
<p class="my-4 text-gray-600 font-light hidden lg:block">
AI & Digital Frontier
</p>
<div class="animated fadeInLeft social-container hidden lg:block" style="animation-delay: 0.6s">
<a href="https://github.com/huia711" target="_blank" class="mr-4 text-xl text-gray-400 font-light hover:text-gray-900">
<i class="ri-github-line"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="menu-container">
<i class="ri-arrow-left-line text-2xl cursor-pointer animated fadeIn close-menu-btn" onclick="closeMenu()"></i>
<div>
<a href="/" class="menu" style="animation-delay: 0s">
首页
</a>
<a href="/archives" class="menu" style="animation-delay: 0.2s">
归档
</a>
<a href="/tags" class="menu" style="animation-delay: 0.4s">
标签
</a>
<a href="/about" class="menu" style="animation-delay: 0.6000000000000001s">
关于
</a>
</div>
<div class="site-footer">
<div class="py-4 text-gray-700">Powered by <a href="https://github.com/huia711" target="_blank">Github</a></div>
<a class="rss" href="https://huia711.GitHub.io/atom.xml" target="_blank">RSS</a>
</div>
</div>
<div class="mask" onclick="closeMenu()">
</div>
<div class="content-wrapper py-32 lg:p-8 lg:w-3/4">
<h2 class="latest-article text-lg text-gray-700 mb-8">
<i class="ri-article-line"></i>
最新文章
</h2>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${0 * 0.2}s` }">
<a href="https://huia711.GitHub.io/post/Real-time-Semantic-Segmentation/" class="feature-image-wrapper bg-gray-100 rounded-lg flex-shrink-0 mr-8 w-full h-56 h-32 md:w-56 md:h-40">
<div class="post-feature-image lazy w-full h-56 h-32 md:w-56 md:h-40" data-bg="'https://huia711.GitHub.io/post-images/Real-time-Semantic-Segmentation.gif'">
</div>
</a>
<div class="content">
<a href="https://huia711.GitHub.io/post/Real-time-Semantic-Segmentation/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">从图像分割到实时语义分割</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2023-12-06 / 28 min read</div>
</div>
</section>
<div class="read-more">
</div>
<div class="index-page">
<div class="pagination-container animated fadeIn">
</div>
</div>
</div>
</div>
<script src="https://huia711.GitHub.io/media/prism.js"></script>
<script>
Prism.highlightAll()
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));
}
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");
}
});
});
document.addEventListener("DOMContentLoaded", function() {
var lazyImages = [].slice.call(document.querySelectorAll(".post-feature-image.lazy"));
if ("IntersectionObserver" in window) {
let lazyImageObserver = new IntersectionObserver(function(entries, observer) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
let lazyImage = entry.target
lazyImage.style.backgroundImage = `url(${lazyImage.dataset.bg})`
lazyImage.classList.remove("lazy")
lazyImageObserver.unobserve(lazyImage)
}
});
});
lazyImages.forEach(function(lazyImage) {
lazyImageObserver.observe(lazyImage)
})
} else {
// Possibly fall back to a more compatible method here
}
});
const menuContainer = document.querySelector('.menu-container')
const menus = document.querySelectorAll('.menu-container .menu')
const mask = document.querySelector('.mask')
const contentWrapper = document.querySelector('.content-wrapper')
const latestArticle = document.querySelector('.latest-article')
const readMore = document.querySelector('.read-more')
const indexPage = document.querySelector('.index-page')
const isHome = location.pathname === '/'
if (latestArticle) {
latestArticle.style.display = isHome ? 'block' : 'none'
readMore.style.display = isHome ? 'block' : 'none'
indexPage.style.display = isHome ? 'none' : 'block'
}
const openMenu = () => {
menuContainer.classList.add('open')
menus.forEach(menu => {
menu.classList.add('animated', 'fadeInLeft')
})
mask.classList.add('open')
contentWrapper.classList.add('is-second')
}
const closeMenu = () => {
menuContainer.classList.remove('open')
menus.forEach(menu => {
menu.classList.remove('animated', 'fadeInLeft')
})
mask.classList.remove('open')
contentWrapper.classList.remove('is-second')
}
</script>
</body>
</html>