Skip to content

Commit

Permalink
merge v1.7.1-sw
Browse files Browse the repository at this point in the history
  • Loading branch information
Huxpro committed Jul 3, 2017
2 parents a865221 + d9336dd commit e97ea15
Show file tree
Hide file tree
Showing 11 changed files with 661 additions and 108 deletions.
6 changes: 0 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ disqus_username: hux
# Netease setttings
netease_comment: false

# Duoshuo settings
duoshuo_username: huxblog
# Share component is depend on Comment so we can NOT use share only.
duoshuo_share: true # set to false if you want to use Comment without Sharing




# Analytics settings
Expand Down
30 changes: 11 additions & 19 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,25 +98,18 @@
<script src="{{ "/js/jquery.min.js " | prepend: site.baseurl }}"></script>

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

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

<!-- Service Worker -->
{% if site.service-worker %}
<script type="text/javascript">
if(navigator.serviceWorker){
// 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.
navigator.serviceWorker
.register('/sw.js')
.then((registration) => {console.log('Service Worker Registered. ', registration)})
.catch((error) => {console.log('ServiceWorker registration failed: ', error)})
}
</script>
<script src="{{ "/js/snackbar.js " | prepend: site.baseurl }}"></script>
<script src="{{ "/js/sw-registration.js " | prepend: site.baseurl }}"></script>
{% endif %}


<!-- async load function -->
<script>
function async(u, c) {
Expand All @@ -129,15 +122,15 @@
}
</script>

<!--
Because of the native support for backtick-style fenced code blocks
right within the Markdown is landed in Github Pages,
From V1.6, There is no need for Highlight.js,
<!--
Because of the native support for backtick-style fenced code blocks
right within the Markdown is landed in Github Pages,
From V1.6, There is no need for Highlight.js,
so Huxblog drops it officially.
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
- https://github.com/jneen/rouge/wiki/list-of-supported-languages-and-lexers
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
- https://github.com/jneen/rouge/wiki/list-of-supported-languages-and-lexers
-->
<!--
<script>
Expand Down Expand Up @@ -224,7 +217,7 @@
l = $('<li class="'+n+'_nav"></li>').append(c);
$(selector).append(l);
});
return true;
return true;
}

generateCatalog(".catalog-body");
Expand Down Expand Up @@ -256,4 +249,3 @@
});
</script>
{% endif %}

38 changes: 0 additions & 38 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,44 +64,6 @@
</script>



{% if site.duoshuo_username %}
<!-- 多说评论框 start -->
<div class="comment">
<!-- This id is used for indexing my loss comments forcedly -->
<div class="ds-thread"
{% if site.duoshuo_username == "huxblog" %}
data-thread-id="1187623191091085319"
{% else %}
<!-- U can just use this key generated to index comments at page about -->
data-thread-key="{{site.duoshuo_username}}/about"
{% endif %}

data-title="{{page.title}}"
data-url="{{site.url}}/about/"></div>
</div>
<!-- 多说评论框 end -->

<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
// dynamic User hacking by Hux
var _user = '{{site.duoshuo_username}}';

// duoshuo comment query.
var duoshuoQuery = {short_name: _user };
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<!-- 多说公共JS代码 end -->
{% endif %}


{% if site.disqus_username %}
<!-- disqus 评论框 start -->
<div class="comment">
Expand Down
189 changes: 177 additions & 12 deletions css/hux-blog.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*!
* Hux Blog v1.7.0 (http://huxpro.github.io)
* Copyright 2017 Hux <[email protected]>
*/

@media (min-width: 1200px) {
.post-container,
.sidebar-container {
Expand All @@ -19,11 +14,11 @@
font-size: 14px;
}
.sidebar-container h5 {
color: #808080;
color: #cccccc;
padding-bottom: 1em;
}
.sidebar-container h5 a {
color: #808080 !important;
color: #cccccc !important;
text-decoration: none;
}
.sidebar-container a {
Expand Down Expand Up @@ -134,6 +129,176 @@
display: none;
}
}
/*
Please note this CSS is currently in prototype form. We'll implement a cleaned up version in Web Starter Kit.
*/
.paper-snackbar {
transition-property: opacity, bottom, left, right, width, margin, border-radius;
transition-duration: 0.5s;
transition-timing-function: ease;
/*font-family: RobotoDraft;*/
font-size: 14px;
min-height: 14px;
background-color: #323232;
background-color: #0085a1;
position: fixed;
display: flex;
justify-content: space-between;
align-items: center;
color: white;
line-height: 22px;
padding: 18px 24px;
bottom: 0px;
opacity: 0;
}
@media (min-width: 640px) {
.paper-snackbar {
/*
Desktop:
Single-line snackbar height: 48 dp tall
Minimum width: 288 dp
Maximum width: 568 dp
2 dp rounded corner
Text: Roboto Regular 14 sp
Action button: Roboto Medium 14 sp, all-caps text
Default background fill: #323232 100%
*/
min-width: 288px;
max-width: 568px;
display: inline-flex;
border-radius: 2px;
margin: 24px;
bottom: -100px;
}
}
@media (max-width: 640px) {
.paper-snackbar {
/*
Mobile:
Single-line snackbar height: 48 dp
Multi-line snackbar height: 80 dp
Text: Roboto Regular 14 sp
Action button: Roboto Medium 14 sp, all-caps text
Default background fill: #323232 100%
*/
left: 0px;
right: 0px;
}
}
.paper-snackbar .action {
background: inherit;
display: inline-block;
border: none;
font-size: inherit;
text-transform: uppercase;
color: #ffeb3b;
margin: 0px 0px 0px 24px;
padding: 0px;
min-width: min-content;
outline: 0px;
}
/* Everything from here down is actually just for the demo - the material buttons and card, and various other pieces of styling */
/* Variables */
/* Buttons */
.paper-button {
position: relative;
padding: 4px 0;
margin: 1em;
width: 160px;
overflow: hidden;
user-select: none;
color: #000000;
text-transform: uppercase;
border-radius: 3px;
outline-color: #cccccc;
}
.paper-button:hover {
cursor: pointer;
}
.paper-button button,
.paper-button input[type="submit"] {
background: inherit;
border: none;
display: block;
width: 100%;
height: 100%;
/*font-family: 'Roboto';*/
font-size: 1em;
color: #000000;
text-transform: uppercase;
}
.paper-button.colored,
.paper-button.colored button {
color: #4285f4;
}
.paper-button.raised-button.colored {
background-color: #4285f4;
}
.paper-button .raised-button {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}
.paper-button.raised-button.colored {
background: #4285f4;
color: #fff;
}
.paper-button[disabled] {
background-color: #EAEAEA !important;
color: #A8A8A8 !important;
cursor: auto;
}
.paper-button:hover {
background-color: #EAEAEA;
}
.paper-button.raised-button.colored:hover {
background-color: #3367d6;
}
button.paper-button {
border: 0;
/*font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;*/
font-size: 1em;
line-height: 25px;
background-color: #ffffff;
}
.paper-button input[type="submit"] {
outline-color: #cccccc;
}
.paper-button.colored.raised-button input[type="submit"] {
color: #ffffff;
}
/** Shadows **/
.paper-shadow-animated.paper-shadow {
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.paper-shadow-top-z-1 {
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16);
}
.paper-shadow-bottom-z-1 {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}
.paper-shadow-top-z-2 {
box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.paper-shadow-bottom-z-2 {
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2);
}
.paper-shadow-top-z-3 {
box-shadow: 0 17px 50px 0 rgba(0, 0, 0, 0.19);
}
.paper-shadow-bottom-z-3 {
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24);
}
.paper-shadow-top-z-4 {
box-shadow: 0 25px 55px 0 rgba(0, 0, 0, 0.21);
}
/** Card **/
.card {
background: white;
width: 300px;
height: 300px;
position: relative;
margin: 16px;
border-radius: 2px;
}
body {
/* Hux learn from
* TypeIsBeautiful,
Expand Down Expand Up @@ -181,7 +346,7 @@ article {
overflow-x: hidden;
}
blockquote {
color: #808080;
color: #cccccc;
font-style: italic;
font-size: 0.95em;
margin: 20px 0 20px;
Expand Down Expand Up @@ -315,7 +480,7 @@ pre code {
width: 100%;
}
.post-container .pager li > a > span {
color: #808080;
color: #cccccc;
font-weight: normal;
letter-spacing: 0.5px;
}
Expand Down Expand Up @@ -503,7 +668,7 @@ pre code {
}
.intro-header {
background: no-repeat center center;
background-color: #808080;
background-color: #cccccc;
background-attachment: scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
Expand Down Expand Up @@ -633,7 +798,7 @@ pre code {
}
.post-preview > .post-meta {
font-family: 'Lora', 'Times New Roman', serif;
color: #808080;
color: #cccccc;
font-size: 16px;
font-style: italic;
margin-top: 0;
Expand Down Expand Up @@ -826,7 +991,7 @@ form .row:first-child .floating-label-form-group {
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
color: #808080;
color: #cccccc;
background-color: #404040;
cursor: not-allowed;
}
Expand Down
7 changes: 1 addition & 6 deletions css/hux-blog.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit e97ea15

Please sign in to comment.