Skip to content

Commit 5c3be9b

Browse files
committed
Use local assets instead of CDN to avoid collapsed menu not unfolding when CDN cannot be connneted (mostly within mainland China).
1 parent 8d764e4 commit 5c3be9b

14 files changed

+580
-13
lines changed

_includes/head.html

+6-11
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
<meta name="MobileOptimized" content="320">
4545
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
4646

47+
<!-- Custom Fonts -->
48+
<link rel="stylesheet" href="{{ site.url }}/assets/css/fonts.css">
49+
4750
<!-- For all browsers -->
4851
<!-- Bootstrap 3.3.7 -->
4952
<link rel="stylesheet" href="{{ site.url }}/assets/css/bootstrap.min.css">
@@ -64,17 +67,9 @@
6467
<!-- Load Modernizr -->
6568
<script src="{{ site.url }}/assets/js/vendor/modernizr-2.6.2.custom.min.js"></script>
6669

67-
<!-- Custom Fonts -->
68-
<!-- For headings -->
69-
<link href="//fonts.googleapis.com/css?family=Lato:700&display=swap" rel="stylesheet" type="text/css">
70-
<!-- <link href='//fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'> -->
71-
<!-- <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'> -->
72-
<!-- <link href="https://fonts.googleapis.com/css?family=Noto+Serif:400,400i,700&display=swap" rel="stylesheet"> -->
73-
<!-- For site logo -->
74-
<link href='//fonts.googleapis.com/css?family=Viga|Ubuntu:700' rel='stylesheet' type='text/css'>
7570
<!-- For codes -->
7671
<!-- <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,400i&display=swap" rel="stylesheet"> -->
77-
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
72+
<link href="{{ site.url }}/assets/css/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css">
7873

7974
<!-- Icons -->
8075
<!-- 16x16 -->
@@ -102,6 +97,6 @@
10297
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
10398
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
10499
<!--[if lt IE 9]>
105-
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
106-
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
100+
<script src="{{ site.url }}/assets/js/html5shiv.js"></script>
101+
<script src="{{ site.url }}/assets/js/respond.min.js"></script>
107102
<![endif]-->

_includes/scripts.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!-- JQuery JavaScript -->
2-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
3-
<script>window.jQuery || document.write('<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
2+
<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"></script>
43

54
<!-- Bootstrap Core JavaScript -->
65
<script src="{{ site.url }}/assets/js/vendor/bootstrap.min.js"></script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@font-face {
2+
font-family: 'FontAwesome';
3+
src: url('../fonts/font-awesome/fontawesome-webfont.eot?v=4.7.0');
4+
src: url('../fonts/font-awesome/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),
5+
url('../fonts/font-awesome/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),
6+
url('../fonts/font-awesome/fontawesome-webfont.woff?v=4.7.0') format('woff'),
7+
url('../fonts/font-awesome/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),
8+
url('../fonts/font-awesome/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
9+
font-weight: normal;
10+
font-style: normal;
11+
}
12+
/* Rest of the minified CSS content */
13+
.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
14+
/* ... rest of the minified CSS ... */

assets/css/fonts.css

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@font-face {
2+
font-family: 'Lato';
3+
font-style: normal;
4+
font-weight: 700;
5+
src: url('../fonts/lato-v24-latin-700.woff2') format('woff2');
6+
}
7+
8+
@font-face {
9+
font-family: 'Viga';
10+
font-style: normal;
11+
font-weight: 400;
12+
src: url('../fonts/viga-v14-latin-regular.woff2') format('woff2');
13+
}
14+
15+
@font-face {
16+
font-family: 'Ubuntu';
17+
font-style: normal;
18+
font-weight: 700;
19+
src: url('../fonts/ubuntu-v20-latin-700.woff2') format('woff2');
20+
}
Binary file not shown.

assets/css/fonts/font-awesome/fontawesome-webfont.svg

+504
Loading
Binary file not shown.
Binary file not shown.

assets/css/fonts/font-awesome/fontawesome-webfont.woff2

Whitespace-only changes.

assets/fonts/lato-v24-latin-700.woff2

22.5 KB
Binary file not shown.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang=en>
3+
<meta charset=utf-8>
4+
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
5+
<title>Error 404 (Not Found)!!1</title>
6+
<style>
7+
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
8+
</style>
9+
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
10+
<p><b>404.</b> <ins>That’s an error.</ins>
11+
<p>The requested URL <code>/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjsGyI.woff2</code> was not found on this server. <ins>That’s all we know.</ins>
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang=en>
3+
<meta charset=utf-8>
4+
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
5+
<title>Error 404 (Not Found)!!1</title>
6+
<style>
7+
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
8+
</style>
9+
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
10+
<p><b>404.</b> <ins>That’s an error.</ins>
11+
<p>The requested URL <code>/s/viga/v14/xMQbuFFdSaiXzQspDq2.woff2</code> was not found on this server. <ins>That’s all we know.</ins>

assets/js/html5shiv.js

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/respond.min.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)