-
Notifications
You must be signed in to change notification settings - Fork 4
/
404.html
286 lines (267 loc) · 11.1 KB
/
404.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!doctype html>
<!--
Minimal Mistakes Jekyll Theme 4.26.2 by Michael Rose
Copyright 2013-2024 Michael Rose - mademistakes.com | @mmistakes
Free for personal and commercial use under the MIT license
https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE
-->
<html lang="en-US" class="no-js">
<head>
<meta charset="utf-8">
<!-- begin _includes/seo.html -->
<title>iBug - iBug</title>
<meta name="description" content="The little personal site for iBug">
<meta name="author" content="iBug">
<meta property="og:type" content="website">
<meta property="og:locale" content="en_US">
<meta property="og:site_name" content="iBug">
<meta property="og:title" content="iBug">
<meta property="og:url" content="https://ibug.io/404.html">
<meta property="og:description" content="The little personal site for iBug">
<meta property="og:image" content="https://ibug.io/image/og.jpg">
<link rel="canonical" href="https://ibug.io/404.html">
<meta name="google-site-verification" content="5_jn7a-vZslUtLJO-BkY-cPDGgah5JP49RGgeOBmYSk" />
<!-- end _includes/seo.html -->
<link href="/feed.xml" type="application/atom+xml" rel="alternate" title="iBug Feed">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
</script>
<!-- For all browsers -->
<link rel="stylesheet" href="/assets/css/main.css?v=ab4f329">
<link rel="stylesheet" href="https://static.ibugone.com/fontawesome/6/css/all.min.css" media="none" onload="if(media!='all')media='all'">
<link rel="shortcut icon" type="image/png" href="/assets/favicon.png">
<meta name="theme-color" content="#EDEDED">
<script>
const funcOnPageLoad = function() { document.body.classList.add("loaded"); };
document.addEventListener('DOMContentLoaded', funcOnPageLoad);
</script>
</head>
<body class="layout--single">
<nav class="skip-links">
<ul>
<li><a href="#site-nav" class="screen-reader-shortcut">Skip to primary navigation</a></li>
<li><a href="#main" class="screen-reader-shortcut">Skip to content</a></li>
<li><a href="#footer" class="screen-reader-shortcut">Skip to footer</a></li>
</ul>
</nav>
<div class="masthead">
<div class="masthead__inner-wrap">
<div class="masthead__menu">
<nav id="site-nav" class="greedy-nav">
<a class="site-logo" href="/"><img src="/assets/favicon.png" alt="iBug"></a>
<a class="site-title" href="/">
iBug
</a>
<ul class="visible-links">
<li class="masthead__menu-item">
<a
href="/about/"
>About</a>
</li>
<li class="masthead__menu-item">
<a
href="/blog/"
>Blog</a>
</li>
<li class="masthead__menu-item">
<a
href="/projects/"
>Projects</a>
</li>
<li class="masthead__menu-item">
<a
href="/friends/"
>Friends</a>
</li>
<li class="masthead__menu-item">
<a
href="/cn/"
>中文内容</a>
</li>
</ul>
<button class="search__toggle" type="button">
<span class="visually-hidden">Toggle search</span>
<i class="fas fa-search"></i>
</button>
<button class="greedy-nav__toggle hidden" type="button">
<span class="visually-hidden">Toggle menu</span>
<div class="navicon"></div>
</button>
<ul class="hidden-links hidden"></ul>
</nav>
</div>
</div>
</div>
<div class="initial-content">
<div class="page__hero--overlay"
style=" background-image: url('/image/header/mountain-1.jpg');"
>
<div class="wrapper">
<h1 id="page-title" class="page__title" itemprop="headline">
iBug
</h1>
</div>
</div>
<div id="main" role="main">
<div class="sidebar sticky">
<nav class="nav__list">
<input id="ac-toc" name="accordion-toc" type="checkbox" />
<label for="ac-toc">Toggle menu</label>
<ul class="nav__items">
<li>
<span class="nav__sub-title">iBug on the Web</span>
<ul>
<li><a href="/"><i class="fas fa-fw fa-home"></i> Home</a></li>
<li><a href="/about/"><i class="fas fa-fw fa-grin-alt"></i> About iBug</a></li>
<li><a href="/blog/"><i class="fas fa-fw fa-book"></i> Blog</a></li>
<li><a href="/skills/"><i class="fas fa-fw fa-wrench"></i> Skills</a></li>
<li><a href="/open-source/"><i class="fas fa-fw fa-box-open"></i> Open Source</a></li>
<li><a href="/projects/"><i class="fas fa-fw fa-puzzle-piece"></i> Projects</a></li>
<li><a href="https://notes.ibug.io/"><i class="fas fa-fw fa-sticky-note"></i> Notes</a></li>
<li><a href="/bookmarks/"><i class="fas fa-fw fa-bookmark"></i> Bookmarks</a></li>
<li><a href="/friends/"><i class="fas fa-fw fa-user-friends"></i> Friends</a></li>
<li><a href="/cn/"><i class="fas fa-fw fa-yin-yang"></i> Chinese Content</a></li>
</ul>
</li>
</ul>
</nav>
</div>
<article class="page" itemscope itemtype="https://schema.org/CreativeWork">
<meta itemprop="dateModified" content="2021-01-06T02:49:32+00:00">
<div class="page__inner-wrap">
<section class="page__content" itemprop="text">
<h1 id="-404"><i class="fas fa-frown"></i> 404</h1>
<p>Oops, it seems you’re trying to visit something that’s lost somewhere. You should totally drop that and try jQuery. It’s great and does all the things.</p>
<h2 id="-what-about-giving-away-a-second"><i class="fas fa-frog"></i> What about giving away a second?</h2>
<script>
const url = window.location.href;
const path = url.split(/[?#]/, 1)[0];
if (path.endsWith(".html")) {
// Redirect to strip off bad suffix
let newpath = path.slice(0, -5) + url.slice(path.length, url.length);
window.location.replace(newpath);
window.location.href = newpath;
}
</script>
</section>
<footer class="page__meta">
<p class="page__date"><strong><i class="fas fa-fw fa-calendar-alt" aria-hidden="true"></i> Updated:</strong> <time class="dt-published" datetime="2021-01-06">Jan 6, 2021</time></p>
</footer>
</div>
</article>
</div>
</div>
<div class="search-content">
<div class="search-content__inner-wrap">
<div class="search-searchbar"></div>
<div class="search-hits"></div>
</div>
</div>
<div id="footer" class="page__footer">
<footer>
<!-- start custom footer snippets -->
<!-- end custom footer snippets -->
<div class="page__footer-follow">
<ul class="social-icons">
<li><strong>Follow:</strong></li>
<li><a href="https://github.com/iBug" rel="nofollow noopener noreferrer"><i class="fab fa-fw fa-github" aria-hidden="true"></i> GitHub</a></li>
<li><a href="https://stackoverflow.com/users/5958455/ibug" rel="nofollow noopener noreferrer"><i class="fab fa-fw fa-stack-overflow" aria-hidden="true"></i> Stack Overflow</a></li>
<li><a href="/feed.xml"><i class="fas fa-fw fa-rss-square" aria-hidden="true"></i> Feed</a></li>
</ul>
</div>
<div class="page__footer-copyright">
<p>© 2024 iBug. Powered by <a href="https://jekyllrb.com" rel="nofollow">Jekyll</a> & <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</p>
<p>Except when otherwise noted, content on this site is licensed under the <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0 License</a>.</p>
<p><a href="/privacy-policy">Privacy Policy</a> | <a href="/sitemap.xml">Sitemap (XML)</a></p>
<p>
Site version <a href="/status" class="version-text">G-904</a>
</p>
</div>
</footer>
</div>
<script src="/assets/js/main.min.js"></script>
<script>
// Including InstantSearch.js library and styling
const loadSearch = function() {
const loadCSS = function(src) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = src;
link.media = 'all';
document.head.appendChild(link);
};
var script = document.createElement('script');
script.setAttribute("type", "text/javascript");
script.setAttribute("src", "https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.js");
script.addEventListener("load", function() {
// Instantiating InstantSearch.js with Algolia credentials
const search = instantsearch({
appId: '14DZKASAEJ',
apiKey: 'a0d8cb9da2d6ad0d17dcd40c58c72a56',
indexName: 'iBug_website',
searchParameters: {
restrictSearchableAttributes: ['title', 'content']
}
});
const hitTemplate = function(hit) {
const url = hit.url;
const hightlight = hit._highlightResult;
const title = hightlight.title && hightlight.title.value || "";
const content = hightlight.html && hightlight.html.value || "";
return `
<div class="list__item">
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
<h2 class="archive__item-title" itemprop="headline"><a href="${url}">${title}</a></h2>
<div class="archive__item-excerpt" itemprop="description">${content}</div>
</article>
</div>
`;
}
// Adding searchbar and results widgets
search.addWidget(
instantsearch.widgets.searchBox({
container: '.search-searchbar',
poweredBy: true,
placeholder: 'Enter your search term...'
})
);
search.addWidget(
instantsearch.widgets.hits({
container: '.search-hits',
templates: {
item: hitTemplate,
empty: 'No results',
}
})
);
if (!search.started) {
search.start();
}
});
document.body.appendChild(script);
loadCSS("https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.css");
loadCSS("https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch-theme-algolia.min.css");
};
// Starting the search only when toggle is clicked
$(document).ready(function() {
var scriptLoaded = false;
$(".search__toggle").on("click", function() {
if (!scriptLoaded) {
loadSearch();
scriptLoaded = true;
}
});
});
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-V93196TX91"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-V93196TX91', { 'anonymize_ip': false});
</script>
</body>
</html>