Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
SPARON committed Jun 20, 2017
1 parent d31b2e7 commit 0b0203a
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 78 deletions.
8 changes: 5 additions & 3 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
<!-- kill the Facebook and Weibo -->
<!--
<li>
<a href="{{ "/feed.xml" | prepend: site.baseurl }}">
<span class="fa-stack fa-lg">
Expand All @@ -23,7 +24,7 @@
</a>
</li>
{% endif %}

{% if site.github_username %}
<li>
<a href="https://github.com/{{ site.github_username }}">
Expand All @@ -34,7 +35,7 @@
</a>
</li>
{% endif %}

-->
<!--
{% if site.douban_username %}
<li>
Expand All @@ -60,7 +61,7 @@
</li>
{% endif %}
-->

<!--
{% if site.zhihu_username %}
<li>
<a target="_blank" href="https://www.zhihu.com/people/{{ site.zhihu_username }}">
Expand All @@ -71,6 +72,7 @@
</a>
</li>
{% endif %}
-->
<!--
{% if site.weibo_username %}
<li>
Expand Down
12 changes: 11 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,15 @@
<!-- Bootstrap Core JavaScript -->
<script src="{{ "/js/bootstrap.min.js " | prepend: site.baseurl }}"></script>


<!-- async load function -->
<script>
function async(u, c) {
var d = document, t = 'script',
o = d.createElement(t),
s = d.getElementsByTagName(t)[0];
o.src = u;
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
s.parentNode.insertBefore(o, s);
}
</script>
</head>
10 changes: 10 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@

{% include footer.html %}


<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-80884545-1', 'auto');
ga('send', 'pageview');
</script>
</body>

</html>
6 changes: 6 additions & 0 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
---

<!-- Page Header -->
<style type="text/css">
header.intro-header{
background-color: '{% if page.header-color %}{{ page.header-color }}{% else %}{{ site.header-color }}{% endif %}';
/*background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')*/
}
</style>
<header class="intro-header" style="background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')">
<div class="container">
<div class="row">
Expand Down
104 changes: 30 additions & 74 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@
<!-- Post Header -->
<style type="text/css">
header.intro-header{
/*background-color: '{% if page.header-color %}{{ page.header-color }}{% else %}{{ site.header-color }}{% endif %}';*/
background-color: '{% if page.header-color %}{{ page.header-color }}{% else %}{{ site.header-color }}{% endif %}';
/*background-image: url('{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}')*/
}
</style>
<header class="intro-header" >
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="col-lg-7 col-lg-offset-3 col-md-8 col-md-offset-2">
<div class="post-heading">
<div class="Tags">
{% for tag in page.tags %}
<a class="tag" href="/Tags/#{{ tag }}" title="{{ tag }}">{{ tag }}</a>
<a class="tag" href="/tags/#{{ tag }}" title="{{ tag }}">{{ tag }}</a>
{% endfor %}
</div>
<h1>{{ page.title }}</h1>
{% if page.subtitle %}
<h2 class="subheading">{{ page.subtitle }}</h2>
{% endif %}
<span class="meta">Posted by {% if page.author %}{{ page.author }}{% else %}{{ site.title }}{% endif %} on {{ page.date | date: "%B %-d, %Y" }}</span>
<span class="meta">Posted on {{ page.date | date: "%y-%d-%m" }}</span>
</div>
</div>
</div>
Expand All @@ -37,7 +37,7 @@ <h2 class="subheading">{{ page.subtitle }}</h2>
<article>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 post-container">
<div class="col-lg-7 col-lg-offset-3 col-md-8 col-md-offset-2 post-container">

{{ content }}

Expand All @@ -56,77 +56,33 @@ <h2 class="subheading">{{ page.subtitle }}</h2>
{% endif %}
</ul>

<!-- Duoshuo Share start -->
<style>
.ds-share{
text-align: right;
}

@media only screen and (max-width: 700px) {
.ds-share {
<!-- disqus start -->

}
}
</style>

<div class="ds-share"
data-thread-key="{{page.id}}" data-title="{{page.title}}"
data-images="{{ site.url }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}"
data-content="{{ content | strip_html | truncate:80 }} | Microdust:Azeril's blog"
data-url="{{site.url}}{{page.url}}">
<div class="ds-share-inline">
<ul class="ds-share-icons-16">

<li data-toggle="ds-share-icons-more"><a class="ds-more" href="#">分享到:</a></li>
<li><a class="ds-wechat flat" href="javascript:void(0);" data-service="wechat">微信</a></li>
<li><a class="ds-weibo flat" href="javascript:void(0);" data-service="weibo">微博</a></li>
<li><a class="ds-douban flat" href="javascript:void(0);" data-service="douban">豆瓣</a></li>
</ul>
<div class="ds-share-icons-more">
</div>
</div>
<hr>
</div>
<!-- Duoshuo Share end-->


<!-- 多说评论框 start -->
<div class="comment">
<div class="ds-thread" data-thread-key="{{page.id}}" data-title="{{page.title}}" data-url="{{site.url}}{{page.url}}"></div>
</div>
<!-- 多说评论框 end -->
</div>
</div>
</div>
</article>



<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
var duoshuoQuery = {short_name:"cnfeat"};
(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);
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
*/
/*
var disqus_config = function () {
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
};
*/
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');

s.src = '//cnfeat.disqus.com/embed.js';

s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<!-- 多说公共JS代码 end -->
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

<!-- async load function -->
<script>
function async(u, c) {
var d = document, t = 'script',
o = d.createElement(t),
s = d.getElementsByTagName(t)[0];
o.src = u;
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
s.parentNode.insertBefore(o, s);
}
</script>

<!-- disqus end -->

<!-- anchor-js, Doc:http://bryanbraun.github.io/anchorjs/ -->
<script>
Expand All @@ -143,8 +99,8 @@ <h2 class="subheading">{{ page.subtitle }}</h2>
/* place left on bigger screen */
@media all and (min-width: 800px) {
.anchorjs-link{
position: absolute;
left: -0.75em;
position: relative;
/*left: -0.75em;*/
font-size: 1.1em;
margin-top : -0.1em;
}
Expand Down

0 comments on commit 0b0203a

Please sign in to comment.