Skip to content

Commit e97ea15

Browse files
committed
merge v1.7.1-sw
2 parents a865221 + d9336dd commit e97ea15

File tree

11 files changed

+661
-108
lines changed

11 files changed

+661
-108
lines changed

_config.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ disqus_username: hux
5353
# Netease setttings
5454
netease_comment: false
5555

56-
# Duoshuo settings
57-
duoshuo_username: huxblog
58-
# Share component is depend on Comment so we can NOT use share only.
59-
duoshuo_share: true # set to false if you want to use Comment without Sharing
60-
61-
6256

6357

6458
# Analytics settings

_includes/footer.html

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,25 +98,18 @@
9898
<script src="{{ "/js/jquery.min.js " | prepend: site.baseurl }}"></script>
9999

100100
<!-- Bootstrap Core JavaScript -->
101+
<!-- Currently, only navbar scroll-down effect at desktop still depends on this -->
101102
<script src="{{ "/js/bootstrap.min.js " | prepend: site.baseurl }}"></script>
102103

103104
<!-- Custom Theme JavaScript -->
104105
<script src="{{ "/js/hux-blog.min.js " | prepend: site.baseurl }}"></script>
105106

106107
<!-- Service Worker -->
107108
{% if site.service-worker %}
108-
<script type="text/javascript">
109-
if(navigator.serviceWorker){
110-
// For security reasons, a service worker can only control the pages that are in the same directory level or below it. That's why we put sw.js at ROOT level.
111-
navigator.serviceWorker
112-
.register('/sw.js')
113-
.then((registration) => {console.log('Service Worker Registered. ', registration)})
114-
.catch((error) => {console.log('ServiceWorker registration failed: ', error)})
115-
}
116-
</script>
109+
<script src="{{ "/js/snackbar.js " | prepend: site.baseurl }}"></script>
110+
<script src="{{ "/js/sw-registration.js " | prepend: site.baseurl }}"></script>
117111
{% endif %}
118112

119-
120113
<!-- async load function -->
121114
<script>
122115
function async(u, c) {
@@ -129,15 +122,15 @@
129122
}
130123
</script>
131124

132-
<!--
133-
Because of the native support for backtick-style fenced code blocks
134-
right within the Markdown is landed in Github Pages,
135-
From V1.6, There is no need for Highlight.js,
125+
<!--
126+
Because of the native support for backtick-style fenced code blocks
127+
right within the Markdown is landed in Github Pages,
128+
From V1.6, There is no need for Highlight.js,
136129
so Huxblog drops it officially.
137130
138-
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
139-
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
140-
- https://github.com/jneen/rouge/wiki/list-of-supported-languages-and-lexers
131+
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
132+
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
133+
- https://github.com/jneen/rouge/wiki/list-of-supported-languages-and-lexers
141134
-->
142135
<!--
143136
<script>
@@ -224,7 +217,7 @@
224217
l = $('<li class="'+n+'_nav"></li>').append(c);
225218
$(selector).append(l);
226219
});
227-
return true;
220+
return true;
228221
}
229222

230223
generateCatalog(".catalog-body");
@@ -256,4 +249,3 @@
256249
});
257250
</script>
258251
{% endif %}
259-

about.html

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -64,44 +64,6 @@
6464
</script>
6565

6666

67-
68-
{% if site.duoshuo_username %}
69-
<!-- 多说评论框 start -->
70-
<div class="comment">
71-
<!-- This id is used for indexing my loss comments forcedly -->
72-
<div class="ds-thread"
73-
{% if site.duoshuo_username == "huxblog" %}
74-
data-thread-id="1187623191091085319"
75-
{% else %}
76-
<!-- U can just use this key generated to index comments at page about -->
77-
data-thread-key="{{site.duoshuo_username}}/about"
78-
{% endif %}
79-
80-
data-title="{{page.title}}"
81-
data-url="{{site.url}}/about/"></div>
82-
</div>
83-
<!-- 多说评论框 end -->
84-
85-
<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
86-
<script type="text/javascript">
87-
// dynamic User hacking by Hux
88-
var _user = '{{site.duoshuo_username}}';
89-
90-
// duoshuo comment query.
91-
var duoshuoQuery = {short_name: _user };
92-
(function() {
93-
var ds = document.createElement('script');
94-
ds.type = 'text/javascript';ds.async = true;
95-
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
96-
ds.charset = 'UTF-8';
97-
(document.getElementsByTagName('head')[0]
98-
|| document.getElementsByTagName('body')[0]).appendChild(ds);
99-
})();
100-
</script>
101-
<!-- 多说公共JS代码 end -->
102-
{% endif %}
103-
104-
10567
{% if site.disqus_username %}
10668
<!-- disqus 评论框 start -->
10769
<div class="comment">

css/hux-blog.css

Lines changed: 177 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/*!
2-
* Hux Blog v1.7.0 (http://huxpro.github.io)
3-
* Copyright 2017 Hux <[email protected]>
4-
*/
5-
61
@media (min-width: 1200px) {
72
.post-container,
83
.sidebar-container {
@@ -19,11 +14,11 @@
1914
font-size: 14px;
2015
}
2116
.sidebar-container h5 {
22-
color: #808080;
17+
color: #cccccc;
2318
padding-bottom: 1em;
2419
}
2520
.sidebar-container h5 a {
26-
color: #808080 !important;
21+
color: #cccccc !important;
2722
text-decoration: none;
2823
}
2924
.sidebar-container a {
@@ -134,6 +129,176 @@
134129
display: none;
135130
}
136131
}
132+
/*
133+
Please note this CSS is currently in prototype form. We'll implement a cleaned up version in Web Starter Kit.
134+
*/
135+
.paper-snackbar {
136+
transition-property: opacity, bottom, left, right, width, margin, border-radius;
137+
transition-duration: 0.5s;
138+
transition-timing-function: ease;
139+
/*font-family: RobotoDraft;*/
140+
font-size: 14px;
141+
min-height: 14px;
142+
background-color: #323232;
143+
background-color: #0085a1;
144+
position: fixed;
145+
display: flex;
146+
justify-content: space-between;
147+
align-items: center;
148+
color: white;
149+
line-height: 22px;
150+
padding: 18px 24px;
151+
bottom: 0px;
152+
opacity: 0;
153+
}
154+
@media (min-width: 640px) {
155+
.paper-snackbar {
156+
/*
157+
Desktop:
158+
Single-line snackbar height: 48 dp tall
159+
Minimum width: 288 dp
160+
Maximum width: 568 dp
161+
2 dp rounded corner
162+
Text: Roboto Regular 14 sp
163+
Action button: Roboto Medium 14 sp, all-caps text
164+
Default background fill: #323232 100%
165+
*/
166+
min-width: 288px;
167+
max-width: 568px;
168+
display: inline-flex;
169+
border-radius: 2px;
170+
margin: 24px;
171+
bottom: -100px;
172+
}
173+
}
174+
@media (max-width: 640px) {
175+
.paper-snackbar {
176+
/*
177+
Mobile:
178+
Single-line snackbar height: 48 dp
179+
Multi-line snackbar height: 80 dp
180+
Text: Roboto Regular 14 sp
181+
Action button: Roboto Medium 14 sp, all-caps text
182+
Default background fill: #323232 100%
183+
*/
184+
left: 0px;
185+
right: 0px;
186+
}
187+
}
188+
.paper-snackbar .action {
189+
background: inherit;
190+
display: inline-block;
191+
border: none;
192+
font-size: inherit;
193+
text-transform: uppercase;
194+
color: #ffeb3b;
195+
margin: 0px 0px 0px 24px;
196+
padding: 0px;
197+
min-width: min-content;
198+
outline: 0px;
199+
}
200+
/* Everything from here down is actually just for the demo - the material buttons and card, and various other pieces of styling */
201+
/* Variables */
202+
/* Buttons */
203+
.paper-button {
204+
position: relative;
205+
padding: 4px 0;
206+
margin: 1em;
207+
width: 160px;
208+
overflow: hidden;
209+
user-select: none;
210+
color: #000000;
211+
text-transform: uppercase;
212+
border-radius: 3px;
213+
outline-color: #cccccc;
214+
}
215+
.paper-button:hover {
216+
cursor: pointer;
217+
}
218+
.paper-button button,
219+
.paper-button input[type="submit"] {
220+
background: inherit;
221+
border: none;
222+
display: block;
223+
width: 100%;
224+
height: 100%;
225+
/*font-family: 'Roboto';*/
226+
font-size: 1em;
227+
color: #000000;
228+
text-transform: uppercase;
229+
}
230+
.paper-button.colored,
231+
.paper-button.colored button {
232+
color: #4285f4;
233+
}
234+
.paper-button.raised-button.colored {
235+
background-color: #4285f4;
236+
}
237+
.paper-button .raised-button {
238+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
239+
}
240+
.paper-button.raised-button.colored {
241+
background: #4285f4;
242+
color: #fff;
243+
}
244+
.paper-button[disabled] {
245+
background-color: #EAEAEA !important;
246+
color: #A8A8A8 !important;
247+
cursor: auto;
248+
}
249+
.paper-button:hover {
250+
background-color: #EAEAEA;
251+
}
252+
.paper-button.raised-button.colored:hover {
253+
background-color: #3367d6;
254+
}
255+
button.paper-button {
256+
border: 0;
257+
/*font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;*/
258+
font-size: 1em;
259+
line-height: 25px;
260+
background-color: #ffffff;
261+
}
262+
.paper-button input[type="submit"] {
263+
outline-color: #cccccc;
264+
}
265+
.paper-button.colored.raised-button input[type="submit"] {
266+
color: #ffffff;
267+
}
268+
/** Shadows **/
269+
.paper-shadow-animated.paper-shadow {
270+
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
271+
}
272+
.paper-shadow-top-z-1 {
273+
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16);
274+
}
275+
.paper-shadow-bottom-z-1 {
276+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
277+
}
278+
.paper-shadow-top-z-2 {
279+
box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19);
280+
}
281+
.paper-shadow-bottom-z-2 {
282+
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
283+
}
284+
.paper-shadow-top-z-3 {
285+
box-shadow: 0 17px 50px 0 rgba(0, 0, 0, 0.19);
286+
}
287+
.paper-shadow-bottom-z-3 {
288+
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24);
289+
}
290+
.paper-shadow-top-z-4 {
291+
box-shadow: 0 25px 55px 0 rgba(0, 0, 0, 0.21);
292+
}
293+
/** Card **/
294+
.card {
295+
background: white;
296+
width: 300px;
297+
height: 300px;
298+
position: relative;
299+
margin: 16px;
300+
border-radius: 2px;
301+
}
137302
body {
138303
/* Hux learn from
139304
* TypeIsBeautiful,
@@ -181,7 +346,7 @@ article {
181346
overflow-x: hidden;
182347
}
183348
blockquote {
184-
color: #808080;
349+
color: #cccccc;
185350
font-style: italic;
186351
font-size: 0.95em;
187352
margin: 20px 0 20px;
@@ -315,7 +480,7 @@ pre code {
315480
width: 100%;
316481
}
317482
.post-container .pager li > a > span {
318-
color: #808080;
483+
color: #cccccc;
319484
font-weight: normal;
320485
letter-spacing: 0.5px;
321486
}
@@ -503,7 +668,7 @@ pre code {
503668
}
504669
.intro-header {
505670
background: no-repeat center center;
506-
background-color: #808080;
671+
background-color: #cccccc;
507672
background-attachment: scroll;
508673
-webkit-background-size: cover;
509674
-moz-background-size: cover;
@@ -633,7 +798,7 @@ pre code {
633798
}
634799
.post-preview > .post-meta {
635800
font-family: 'Lora', 'Times New Roman', serif;
636-
color: #808080;
801+
color: #cccccc;
637802
font-size: 16px;
638803
font-style: italic;
639804
margin-top: 0;
@@ -826,7 +991,7 @@ form .row:first-child .floating-label-form-group {
826991
.pager .disabled > a:hover,
827992
.pager .disabled > a:focus,
828993
.pager .disabled > span {
829-
color: #808080;
994+
color: #cccccc;
830995
background-color: #404040;
831996
cursor: not-allowed;
832997
}

css/hux-blog.min.css

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)