Skip to content
Permalink
Browse files
pjax and more
  • Loading branch information
DIYgod committed Nov 25, 2017
1 parent d5052f8 commit df8cc74ea2e134af0606e20b6470ae6e6fa53afc
Showing 50 changed files with 684 additions and 1,066 deletions.
@@ -67,7 +67,7 @@ menu:
home: / || home
archives: /archives/ || archive
投喂: /donate/ || cutlery
后宫: /links/ || mars
后宫: /friends/ || mars
留言板: /message/ || pencil
about: /about/ || rocket

@@ -99,7 +99,7 @@ scheme: Pisces
social:
GitHub: https://github.com/DIYgod || github
Twitter: https://twitter.com/DIYgod || twitter
QQ 群: https://diygod.b0.upaiyun.com/qq-g.jpg || qq
QQ 群: /images/qq-g.jpg || qq || qq
Telegram Channel: https://t.me/awesomeDIYgod || telegram
更多: https://www.anotherhome.net/3163 || more

@@ -270,7 +270,7 @@ font:

# Global font settings used on <body> element.
global:
external: true
external: false
family: Lato
size:

@@ -300,6 +300,9 @@ font:
family:
size:

title:
external: true
family: Sigmar One

# ---------------------------------------------------------------
# Third Party Services Settings
@@ -326,7 +329,7 @@ han: false
# Disqus
disqus:
enable: true
shortname: DIYgod
shortname: diygod-me
count: false

# Hypercomments
@@ -761,10 +764,7 @@ css: css
js: js
images: images

# Theme version
version: 0.0.1

header_bg: https://diygod.b0.upaiyun.com/header-sagiri.jpg
header_bg: /images/header-sagiri.jpg

card:
avatar: /images/card.jpg
@@ -794,4 +794,9 @@ footer:
# Any custom text can be defined here.
custom_text: custom text
sitemap: /sitemap.xml
beian: 鲁ICP备xxxx号
beian: xxxx

online_api:

# Theme version
version: 0.0.4
@@ -72,7 +72,6 @@

<script type="text/javascript" src="{{ url_for(theme.js) }}/sagiri.min.js?v={{ theme.version }}"></script>

{% include '_third-party/comments/index.swig' %}
{% include '_third-party/search/index.swig' %}
{% include '_third-party/seo/baidu-push.swig' %}
{% include '_third-party/needsharebutton.swig' %}
@@ -114,7 +114,7 @@
{% if theme.creative_commons in cc %}
<div class="cc-license motion-element" itemprop="license">
<a href="https://creativecommons.org/{% if theme.creative_commons === 'zero' %}publicdomain/zero/1.0{% else %}licenses/{{ theme.creative_commons }}/4.0{% endif %}/" class="cc-opacity" target="_blank">
<img src="{{ url_for(theme.images) }}/cc-{{ theme.creative_commons }}.svg" alt="Creative Commons" />
<img src="{{ url_for(theme.images) }}/cc-{{ theme.creative_commons }}.png" alt="Creative Commons" />
</a>
</div>
{% endif %}
@@ -29,10 +29,6 @@
<strong>Disqus 加载中...</strong>
<p>如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理</p>
</div>
<noscript>
Please enable JavaScript to view the
<a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
</div>
</div>

@@ -73,3 +69,4 @@
{% endif %}

{% endif %}
{% include '../_third-party/comments/index.swig' %}
@@ -140,6 +140,7 @@
tabs: {{ theme.tabs.enable }},
motion: {{ theme.motion | json_encode }},
since: '{{ theme.footer.since }}',
onlineAPI: '{{ theme.online_api }}',
site: {
title: '{{ theme.title }}',
subtitle: '{{ theme.subtitle }}',
@@ -42,6 +42,14 @@
{% set font_families += font_config.codes.family + font_styles %}
{% endif %}

{% if font_config.title.family and font_config.title.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}

{% set font_families += font_config.title.family + font_styles %}
{% endif %}

{% if font_families !== '' %}
{% set font_families += '&subset=latin,latin-ext' %}
{% set font_host = font_config.host | default('//fonts.googleapis.com') %}
@@ -29,6 +29,13 @@
</a>
</li>
{% endif %}
<li class="menu-item search">
<form class="search-form">
<input name="keyword" type="text" class="search-input" placeholder="站内搜索">
<button type="submit" class="search-submit"><i class="fa fa-search"></i></button>
</form>
</li>
<li class="menu-item online"><span id="online-count">?</span>人在线</li>
</ul>
{% endif %}

@@ -53,7 +60,18 @@
<div class="custom-logo-site-title">
<div class="brand">
<span class="logo-line-before"><i></i></span>
<span class="site-title"></span>
<div class="site-title">
<div id="animate" class="animate">
{% for letter in config.title %}{#
#}<span>{{ letter }}</span>{#
#}{% endfor %}
</div>
<div id="guide" class="guide">
{% for letter in config.title %}{#
#}<span>{{ letter }}</span>{#
#}{% endfor %}
</div>
</div>
<span class="logo-line-after"><i></i></span>
</div>
</div>
@@ -3,15 +3,35 @@

{% if page.comments %}
<script type="text/javascript">
var disqus_config = function () {
this.page.url = '{{ page.permalink }}';
this.page.identifier = '{{ page.path }}';
this.page.title = '{{ page.title| addslashes }}';
};
var d = document, s = d.createElement('script');
s.src = 'https://{{theme.disqus.shortname}}.disqus.com/embed.js';
s.setAttribute('data-timestamp', '' + +new Date());
(d.head || d.body).appendChild(s);
if (disqus_config) {
var disqus_config = function () {
this.page.url = '{{ page.permalink }}';
this.page.identifier = '{{ page.path }}';
this.page.title = '{{ page.title| addslashes }}';
};
if (window.DISQUS) {
$('.disqus-loading').remove();
window.DISQUS.reset({
reload: true,
config: function () {
this.page.url = '{{ page.permalink }}';
this.page.identifier = '{{ page.path }}';
this.page.title = '{{ page.title| addslashes }}';
}
});
}
}
else {
var disqus_config = function () {
this.page.url = '{{ page.permalink }}';
this.page.identifier = '{{ page.path }}';
this.page.title = '{{ page.title| addslashes }}';
};
var d = document, s = d.createElement('script');
s.src = 'https://{{theme.disqus.shortname}}.disqus.com/embed.js';
s.setAttribute('data-timestamp', '' + +new Date());
(d.head || d.body).appendChild(s);
}
</script>
{% endif %}

@@ -9,7 +9,7 @@
{######################}
{### CATEGORY BLOCK ###}
{######################}
<div class="post-block category">
<div class="post-block category post">

<div id="posts" class="posts-collapse">
<div class="collection-title">
@@ -47,9 +47,12 @@
"corner-notie": "1.2.1",
"fancybox": "3.0.0",
"fastclick": "1.0.6",
"gsap": "1.20.3",
"headroom.js": "0.9.4",
"jquery-pjax": "2.0.1",
"lazyload": "2.0.0-beta.2",
"leancloud-storage": "3.3.1",
"nprogress": "0.2.0",
"social-share.js": "1.0.16",
"typed.js": "2.0.6",
"velocity-animate": "1.5.0"
@@ -14,9 +14,9 @@
&:hover { color: $sidebar-nav-hover-color; }
}

.page-post-detail .sidebar-nav-toc { padding: 0 5px; }
.sidebar-nav-toc { padding: 0 5px; }

.page-post-detail .sidebar-nav-overview { margin-left: 10px; }
.sidebar-nav-overview { margin-left: 10px; }

.sidebar-nav .sidebar-nav-active {
color: $sidebar-highlight;
@@ -14,7 +14,7 @@

.post .group-picture-column { float: left; }

.page-post-detail .post-body .group-picture-column {
.post-body .group-picture-column {
float: none;
margin-top: 10px;
width: auto !important;
@@ -8,4 +8,3 @@
@import "algolia-search" if hexo-config('algolia_search.enable');
@import "needsharebutton" if hexo-config('needmoreshare2.enable');
@import "headroom";
@import "balloon";
@@ -47,7 +47,7 @@ desktop() {
}

desktop-large() {
@media (min-width: 1600px) {
@media (max-width: 0px) {
{block}
}
}
@@ -1,4 +1,5 @@
.archive {
.archive,
.category {
.posts-collapse {
z-index: 0;
}
@@ -12,3 +13,7 @@
background: none;
}
}

.category .collection-title {
margin-top: 30px;
}
@@ -22,12 +22,12 @@
position: relative;
top: 180px;
font-size: 68px;
font-weight: 700;
text-align: center;
text-shadow: 0 1px 1px #47456d;
margin-bottom: 130px;
z-index: 1;
font-family: Optima, "PingFang SC", "Microsoft YaHei", Lato, sans-serif;
font-family: $font-family-title;
display: block;

+mobile() {
font-size: 7.8vw;
@@ -44,3 +44,15 @@
}

.site-search form { display: none; }

.site-title {
.guide {
visibility: hidden;
pointer-events: none;
}

.animate span {
position: absolute;
opacity: 0;
}
}
@@ -40,6 +40,7 @@
position: relative;
text-align: left;
margin: 0 20px 0 0;
color: #fff;

+mobile() {
flex: 1;
@@ -82,6 +83,53 @@
}

br { display: none; }

&.online {
float: right;
font-size: 12px;
margin: 0;

+mobile() {
display: none;
}
}

&.search {
float: right;
margin: 0 0 0 20px;

&:hover {
.search-input {
padding: 3px 7px;
width: 100px;
}
}

.search-input {
border: none;
border-radius: 2px;
color: #555;
font-size: 12px;
outline: none;
width: 0;
padding: 3px 0;
transition: all 0.5s ease-in-out;
}

.search-submit {
cursor: pointer;
margin-left: 5px;
background: none;
padding: 0;
border: none;
outline: none;

i {
font-size: 17px;
margin: 0;
}
}
}
}

.btn-bar {
@@ -78,6 +78,8 @@ $font-family-posts = get_font_family('posts'), $font-family-base if get_f
$font-family-monospace = consolas, Menlo, $font-family-chinese, monospace
$font-family-monospace = get_font_family('codes'), consolas, Menlo, $font-family-chinese, monospace if get_font_family('codes')

$font-family-title = get_font_family('title')

$font-family-icons = 'FontAwesome'


@@ -43,3 +43,11 @@ for $mixin in $mixins
// Custom Layer
// --------------------------------------------------
@import "_custom/custom";

@import "../../node_modules/nprogress/nprogress.css"

#nprogress .bar {
background: #97dffd;
}

@import "../../node_modules/balloon-css/balloon.css"
BIN -45.7 KB (56%) source/images/card.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit df8cc74

Please sign in to comment.