Skip to content

Commit b9ec0f0

Browse files
author
Jun Liu
committed
blog framework
1 parent d70a754 commit b9ec0f0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5352
-1
lines changed

404.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
<div id="not-found" class="container">
5+
<h1>抱歉,文章不存在</h1>
6+
<p>欢迎阅读其他文章</p>
7+
</div>

CNAME

Whitespace-only changes.

LICENSE.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2016 Jun Liu - Released under The MIT License.
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

_config.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Site settings
2+
title: "Thoughts & ideas..."
3+
4+
description: > # this means to ignore newlines until "baseurl:"
5+
"My Tech Blog"
6+
baseurl: "" # the subpath of your site, e.g. /blog/
7+
url: "https://ericmm.github.io/" # the base hostname & protocol for your site
8+
rss_url: /pages/feed.xml
9+
author: Jun
10+
#twitter:
11+
# username:
12+
13+
# Sidebar filter
14+
# Choose 'tag' or 'category' as filter in sidebar.
15+
filter: 'category'
16+
17+
# Social account
18+
# twitter:
19+
# weibo: ID
20+
github: ericmm
21+
# codepen: username
22+
# dribbble: username
23+
24+
# avatar and Favicon
25+
avatar: /assets/img/site-avatar.png
26+
favicon: /assets/icon/site-favicon.ico
27+
28+
# disqus config
29+
#disqus:
30+
# shortname: ericmm
31+
32+
# google analytics config
33+
#ga:
34+
# id:
35+
# url:
36+
37+
# Build settings
38+
permalink: /:year/:month/:day/:title.html
39+
markdown: kramdown
40+
highlighter: rouge
41+
sass:
42+
style: compressed
43+
44+
# Jekyll Plugin
45+
# https://help.github.com/articles/adding-jekyll-plugins-to-a-github-pages-site/
46+
gems:
47+
- jekyll-sitemap
48+
- jekyll-seo-tag
49+
- jekyll-feed
50+

_includes/googleanalytics.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script>
2+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
6+
ga('create', '{{ site.ga.id }}', '{{ site.ga.url }}');
7+
ga('send', 'pageview');
8+
</script>

_includes/head.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<head>
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
5+
<!--[if lte IE 9]><meta http-equiv="refresh" content="0;url={{ "/ie.html" | prepend: site.baseurl }}"><![endif]-->
6+
7+
<meta name="author" content="{{ site.author }}">
8+
{% if page.keywords %}
9+
<meta name="keywords" content="{{ page.keywords }}">
10+
{% endif %}
11+
12+
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,600|Droid+Sans+Mono' rel='stylesheet' type='text/css'>
13+
<link rel="shortcut icon" href="{{ site.favicon }}" />
14+
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
15+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
16+
{% seo %}
17+
{% feed_meta %}
18+
19+
<script src="{{ "/assets/js/prefixfree.js" | prepend: site.baseurl }}"></script>
20+
</head>

_includes/scripts.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script src="{{ "/assets/js/jquery-2.1.3.min.js" | prepend: site.baseurl }}"></script>
2+
<script src="{{ "/assets/js/jquery.pjax.js" | prepend: site.baseurl }}"></script>
3+
<script src="{{ "/assets/js/nprogress.js" | prepend: site.baseurl }}"></script>
4+
<script src="{{ "/assets/js/main.js" | prepend: site.baseurl }}"></script>
5+
6+
{% if site.google_analytics %}
7+
<script>
8+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
9+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
10+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
11+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
12+
13+
ga('create', '{{ site.google_analytics }}', 'auto');
14+
ga('send', 'pageview');
15+
</script>
16+
{% endif %}

_includes/sidebar.html

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<aside id="sidebar">
2+
<div id="sidebar-left">
3+
<a id="sidebar-avatar" href="{{ "/" | prepend: site.baseurl }}">
4+
<img id="sidebar-avatar-img" alt="{{ site.tittle }}" src="{{ site.avatar | prepend: site.baseurl }}"/>
5+
</a>
6+
7+
<div id="sidebar-social">
8+
<a href="{{ site.rss_url | prepend: site.baseurl }}" class="sidebar-social-icon feed"></a>
9+
<a href="mailto:{{ site.email }}" class="sidebar-social-icon email"></a>
10+
{% include social.html %}
11+
</div>
12+
13+
<ul id="sidebar-tags">
14+
<li class="sidebar-tag active" data-filter="all">All Posts</li>
15+
{% if site.filter == 'category' %}
16+
{% for category in site.categories %}
17+
<li class="sidebar-tag" data-filter="{{ category | first }}">{{ category | first }}</li>
18+
{% endfor %}
19+
{% elsif site.filter == 'tag' %}
20+
{% for tag in site.tags %}
21+
<li class="sidebar-tag" data-filter="{{ tag | first }}">{{ tag | first }}</li>
22+
{% endfor %}
23+
{% endif %}
24+
</ul>
25+
</div>
26+
27+
<div id="sidebar-right">
28+
<div id="search-box">
29+
<input id="search-input" type="text" placeholder="Search" />
30+
</div>
31+
32+
<nav id="toc">
33+
{% if site.filter == 'category' %}
34+
{% for post in site.posts %}
35+
<a class="toc-link" data-tags="{{ post.categories | join: ' ' }}" href="{{ post.url }}">
36+
{{ post.title }}
37+
</a>
38+
{% endfor %}
39+
{% elsif site.filter == 'tag' %}
40+
{% for post in site.posts %}
41+
<a class="toc-link" data-tags="{{ post.tags | join: ' ' }}" href="{{ post.url }}">
42+
{{ post.title }}
43+
</a>
44+
{% endfor %}
45+
{% endif %}
46+
</nav>
47+
</div>
48+
</aside>

_includes/social.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{% if site.twitter %}
2+
<a href="https://twitter.com/{{ site.twitter }}" class="sidebar-social-icon twitter" target="_blank"></a>
3+
{% endif %}
4+
5+
{% if site.weibo %}
6+
<a href="http://www.weibo.com/{{ site.weibo }}" class="sidebar-social-icon weibo" target="_blank"></a>
7+
{% endif %}
8+
9+
{% if site.github %}
10+
<a href="https://github.com/{{ site.github }}" class="sidebar-social-icon github" target="_blank"></a>
11+
{% endif %}
12+
13+
{% if site.codepen %}
14+
<a href="http://codepen.io/{{ site.codepen }}" class="sidebar-social-icon codepen" target="_blank"></a>
15+
{% endif %}
16+
17+
{% if site.dribbble %}
18+
<a href="https://dribbble.com/{{ site.dribbble }}" class="sidebar-social-icon dribbble" target="_blank"></a>
19+
{% endif %}

_layouts/compress.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
#
3+
# Jekyll layout that compresses HTML
4+
# v1.1.1
5+
# http://jch.penibelst.de/
6+
# © 2015 Anatol Broder
7+
# MIT License
8+
#
9+
---
10+
11+
{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if site.compress_html.comments.size == 2 %}{% assign _comment_befores = _content | split: site.compress_html.comments.first %}{% for _comment_before in _comment_befores %}{% assign _comment_content = _comment_before | split: site.compress_html.comments.last | first %}{% if _comment_content %}{% capture _comment %}{{ site.compress_html.comments.first }}{{ _comment_content }}{{ site.compress_html.comments.last }}{% endcapture %}{% assign _content = _content | remove: _comment %}{% endif %}{% endfor %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% case _pres.size %}{% when 2 %}{% capture _content %}{{ _content }}<pre{{ _pres.first }}</pre>{{ _pres.last | split: " " | join: " " }}{% endcapture %}{% when 1 %}{% capture _content %}{{ _content }}{{ _pres.last | split: " " | join: " " }}{% endcapture %}{% endcase %}{% endfor %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{{ _content }}{% endif %}

_layouts/default.html

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: compress
3+
---
4+
<!DOCTYPE html>
5+
<html>
6+
{% include head.html %}
7+
<body>
8+
{% include sidebar.html %}
9+
10+
<main id="main">
11+
{{ content }}
12+
13+
<div class="footer">
14+
<div class="container">
15+
<p class="footer-entry">All content is licensed under <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA</a></p>
16+
<p class="footer-entry">Buit with <a href="http://jekyllrb.com/" target="_blank">Jekyll</a> and <a href="https://github.com/P233/3-Jekyll" target="_blank">3-Jekyll theme</a> • Hosted on <a href="https://pages.github.com/" target="_blank">Github</a></p>
17+
</div>
18+
</div>
19+
</main>
20+
21+
<button id="menu">
22+
<span id="menu-icons"></span>
23+
</button>
24+
25+
{% include scripts.html %}
26+
{% include googleanalytics.html %}
27+
</body>
28+
</html>

_layouts/post.html

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: default
3+
---
4+
<article class="post container">
5+
<div class="post-meta">
6+
<span class="post-meta-span date">{{ page.date | date:"%Y %B %d" }}</span>
7+
{% if page.tags.size > 0 %}
8+
<span class="post-meta-span tag">{{ page.tags | join: ', ' }}</span>
9+
{% endif %}
10+
</div>
11+
12+
<h1 class="post-title">{{ page.title }}</h1>
13+
{{ content }}
14+
</article>
15+
16+
<div class="post-share">
17+
<div class="container">
18+
<a href="https://twitter.com/share?url={{ page.url | prepend: site.baseurl | prepend: site.url }}&text={{ page.title }}" target="_blank" class="post-share-icon twitter"></a>
19+
<a href="https://www.evernote.com/clip.action?url={{ page.url | prepend: site.baseurl | prepend: site.url }}&title={{ page.title }}" target="_blank" class="post-share-icon evernote"></a>
20+
<a href="http://service.weibo.com/share/share.php?url={{ page.url | prepend: site.baseurl | prepend: site.url }}&title={{ page.title }}" target="_blank" class="post-share-icon weibo"></a>
21+
</div>
22+
</div>
23+
24+
{% if site.disqus.shortname %}
25+
<div class="comment container">
26+
<div id="disqus_thread">
27+
<a href=""></a>
28+
</div>
29+
</div>
30+
{% endif %}

_sass/1-animation.sass

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
@keyframes fadeIn
3+
from
4+
transform: translateX(35px)
5+
opacity: 0
6+
to
7+
transform: transformX(0)
8+
opacity: 1
9+
10+
@keyframes joggle
11+
0%, 50%, 100%
12+
transform: translateX(0)
13+
25%, 75%
14+
transform: translateX(3px)

_sass/2-icon.scss

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
@font-face {
2+
font-family: 'icomoon';
3+
src:url('../assets/icon/icomoon.eot?-oxan25');
4+
src:url('../assets/icon/icomoon.eot?#iefix-oxan25') format('embedded-opentype'),
5+
url('../assets/icon/icomoon.woff?-oxan25') format('woff'),
6+
url('../assets/icon/icomoon.ttf?-oxan25') format('truetype'),
7+
url('../assets/icon/icomoon.svg?-oxan25#icomoon') format('svg');
8+
font-weight: normal;
9+
font-style: normal;
10+
}
11+
12+
13+
%icon {
14+
font-family: 'icomoon';
15+
speak: none;
16+
font-style: normal;
17+
font-weight: normal;
18+
font-variant: normal;
19+
text-transform: none;
20+
line-height: 1;
21+
-webkit-font-smoothing: antialiased;
22+
-moz-osx-font-smoothing: grayscale;
23+
}
24+
25+
26+
// icons
27+
28+
%icon-bullet {
29+
content: "\e600";
30+
}
31+
32+
%icon-quote {
33+
content: "\e601";
34+
}
35+
36+
%icon-weibo {
37+
content: "\e602";
38+
}
39+
40+
%icon-evernote {
41+
content: "\e603";
42+
}
43+
44+
%icon-date {
45+
content: "\e014";
46+
}
47+
48+
%icon-search {
49+
content: "\e036";
50+
}
51+
52+
%icon-comment {
53+
content: "\e076";
54+
}
55+
56+
%icon-tag {
57+
content: "\e085";
58+
}
59+
60+
%icon-left {
61+
content: "\e094";
62+
}
63+
64+
%icon-right {
65+
content: "\e095";
66+
}
67+
68+
%icon-mail {
69+
content: "\ea86";
70+
}
71+
72+
%icon-twitter-share {
73+
content: "\ea91";
74+
}
75+
76+
%icon-twitter {
77+
content: "\ea93";
78+
}
79+
80+
%icon-feed {
81+
content: "\ea96";
82+
}
83+
84+
%icon-dribbble {
85+
content: "\eaa8";
86+
}
87+
88+
%icon-github {
89+
content: "\eab1";
90+
}
91+
92+
%icon-codepen {
93+
content: "\eae4";
94+
}

0 commit comments

Comments
 (0)