Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
tianqi.tian committed Oct 7, 2017
1 parent 2f8e111 commit 0d537bc
Show file tree
Hide file tree
Showing 108 changed files with 7,616 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*~
Thumbs.db
_site
Gemfile.lock
.sass-cache
.jekyll-metadata
2 changes: 2 additions & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# put your domain here
# e.g. tianqi.name
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'http://gems.ruby-china.org/'
gem 'github-pages', '104', group: :jekyll_plugins
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# kitian616.github.io
my home page

visit at [www.thomastian.com](http://www.thomastian.com)
69 changes: 69 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.

## Base settings ##
# hostname: The site's hostname e.g. https://blog.someone.com
baseurl: "/"
title: Someone's blog
description: Someone's Blog
nav_lists:
- title: About
url: /about.html

## GitHub repository (if the site is hosted by GitHub) ##
# github_repo: e.g. kitian616.github.io
# github_repo_tree: e.g. master

## Language & timezone ##
lang: zh # the language of your site
timezone: Asia/Shanghai

## Author & social ##
author: Someone
# email: your Email address e.g. [email protected]
# facebook_username: your Facebook username
# twitter_username: your Twitter username
# github_username: your GitHub username
# googleplus_username: your Google+ username
# weibo_username: your Weibo username
# douban_username: your Douban username
# linkedin_username: your Linkedin username

## Comment system (Disqus) ##
# disqus_shortname: the Disqus shortname for the site

## Google Analytics ##
# ga_tracking_id: Google analytics id for the site

## Reading quantity (LeanCloud) ##
# app_id: LeanCloud App id
# app_key: LeanCloud App key
# app_class: LeanCloud App class

## Paginate ##
paginate: 7
paginate_path: /blog/page:num

## Post excerpts ##
excerpt_separator: <!--more-->

## Build ##
markdown: kramdown
highlighter: rouge
permalink: date

## Plugins ##
gems:
- jekyll-sitemap
- jekyll-feed
- jekyll-paginate

## Server ##
server_url: "0.0.0.0"

## Development ##
isdebug: false
39 changes: 39 additions & 0 deletions _includes/blog/article-data.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div class="m-article-data clearfix">
{% if page %}
<meta itemprop="author" itemscope itemtype="https://schema.org/Person">
{% if page.author %}
<meta itemprop="name" content="{{ page.author }}"/>
{% elsif site.author %}
<meta itemprop="name" content="{{ site.author }}"/>
{% endif %}
</meta>
{% endif %}

{% if post %}
{% assign cur_page = post %}
{% elsif page %}
{% assign cur_page = page %}
{% endif %}
{% if cur_page.tags[0] %}
<div class="tag-wrapper">
{% for tag in cur_page.tags %}
<a class="article-tag round-rect-button" href="{{ "/all.html?tag=" | prepend: site.blog.baseurl | prepend: site.baseurl | append: tag | replace: '//', '/' }}"> {{ tag }} </a>
{% endfor %}
</div>
{% endif %}
<div class="other-wrapper">
<div class="view-wrapper clearfix">
<span class="article-view" id="post-key-{{ cur_page.key }}">0</span>
views |
</div>
<div class="date-wrapper">
{% if post %}
<span class="article-meta">{{ post.date | date: "%b %d, %Y" }}</span>
{% elsif page %}
<time class="article-meta" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{{ page.date | date: "%b %-d, %Y" }}
</time>
{% endif %}
</div>
</div>
</div>
19 changes: 19 additions & 0 deletions _includes/blog/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="m-page-footer js-page-footer">
<div class="main">
<aside class="follow-me">
{% include info/follow-me.html %}
</aside>
<footer class="site-info">
<p>© {{ site.title }} 2015 - 2017</p>
<p>Powered by <a href="https://pages.github.com/">GitHub Pages</a> & <a href="http://jekyllrb.com/">Jekyll</a>.</p>
<p>Theme by <a href="{{ site.baseurl | append: '/' | replace: '//', '/' }}">{{ site.author }}</a>.
{% if site.github_username and site.github_repo %}
<iframe
style="display: inline-block;vertical-align: text-top;"
src="https://ghbtns.com/github-btn.html?user={{ site.github_username }}&repo={{ site.github_repo }}&type=star&count=true" frameborder="0" scrolling="0" width="91px" height="20px" >
</iframe>
{% endif %}
</p>
</footer>
</div>
</div>
18 changes: 18 additions & 0 deletions _includes/blog/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<header class="m-page-header main clearfix">
<a class="site-title" title="{% if site.blog.description %}{{ site.blog.description }}{% else %}{{ site.description }}{% endif %}"
href="{{ site.blog.baseurl | prepend: site.baseurl | replace: '//', '/' }}">{% if site.blog.title %}{{ site.blog.title }}{% else %}{{ site.title }}{% endif %}
</a>
<div class="site-logo">
{% include logo/logo.svg %}
</div>
<nav class="site-nav">
<ul class="clearfix">
<li><a href="{{ "/" | prepend: site.baseurl | replace: '//', '/' }}">Home</a></li>
<li><a href="{{ "/all.html" | prepend: site.blog.baseurl | prepend: site.baseurl | append: "?tag=" | replace: '//', '/'}}">All</a></li>
{% for list in site.nav_lists %}
<li><a href="{{ list.url }}"> {{ list.title }} </a></li>
{% endfor %}
<li><a type="application/rss+xml" href="{{ "/feed.xml" | prepend: site.baseurl | replace: '//', '/'}}">RSS</a></li>
</ul>
</nav>
</header>
15 changes: 15 additions & 0 deletions _includes/blog/license.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="m-license">
<div class="clearfix">
{% if site.github_username and site.github_repo and site.github_repo_tree %}
<a class="octocat" href="https://github.com/{{ site.github_username }}/{{ site.github_repo }}/tree/{{ site.github_repo_tree }}/{{ page.path }}">
<img alt="View on Github" src="{{ "/statics/images/octocat.jpg" | prepend: site.baseurl | replace: '//', '/'}}" />
</a>
<p><a href="https://github.com/{{ site.github_username }}/{{ site.github_repo }}/tree/{{ site.github_repo_tree }}/{{ page.path }}">View this POST on Github</a>.</P>
{% endif %}
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">CC BY-NC 4.0</a> license.</p>
<a class="cc-license" rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License"src="{{ "/statics/images/license-cc4.png" | prepend: site.baseurl | replace: '//', '/'}}" /></a>
<p>欢迎转载,转载需注明出处:<a class="url" href="{% include snippets/page-url.html %}">
{% include snippets/page-url.html %}
</a>,且禁止用于商业目的。</p>
</div>
</div>
55 changes: 55 additions & 0 deletions _includes/blog/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{% assign max_size = 1 %}
{% assign min_size = 1 %}
{% assign cur_size = 1 %}
{% for tag in site.tags %}
{% assign cur_size = tag[1].size %}
{% if cur_size > max_size%}
{% assign max_size = cur_size %}
{% endif %}
{% if cur_size < min_size %}
{% assign min_size = cur_size %}
{% endif %}
{% endfor %}
{% assign gap_size = max_size | minus: min_size | plus: 1 | divided_by: 4 %}
{% if gap_size < 1 %}
{% assign gap_size = 1 %}
{% endif %}
<div class="m-tags">
{% if page.title == "All Posts"%}
<button type="button" class="article-tag tag-show-all round-rect-button" onclick="tagSelect('')">
Show All<div class="tag-count"> {{ site.posts | size }} </div>
</button>
{% endif %}
{% for tag in site.tags %}
{% assign cur_size = tag[1].size %}
{% assign m1 = min_size %}
{% assign n1 = m1 | plus: gap_size %}
{% assign m2 = n1 %}
{% assign n2 = m2 | plus: gap_size %}
{% assign m3 = n2 %}
{% assign n3 = m3 | plus: gap_size %}
{% assign m4 = n3 %}
{% assign n4 = m4 | plus: gap_size %}
{% if cur_size >= m1 and cur_size < n1 %}
{% assign c_index = 1 %}
{% elsif cur_size >= m2 and cur_size < n2 %}
{% assign c_index = 2 %}
{% elsif cur_size >= m3 and cur_size < n3 %}
{% assign c_index = 3 %}
{% elsif cur_size >= m4 and cur_size < n4 %}
{% assign c_index = 4 %}
{% else %}
{% assign c_index = 4 %}
{% endif %}

{% if page.title == "All Posts"%}
<button type="button" class="article-tag tag-{{ tag[0] }} tag-{{ c_index }} tag-other round-rect-button" onclick="tagSelect('{{ tag[0] }}')">
{{ tag[0] | rstrip }}<div class="tag-count">{{ tag[1].size }}</div>
</button>
{% else %}
<a class="article-tag tag-{{ tag[0] }} tag-{{ c_index }} tag-other round-rect-button" href="{{ "/all.html?tag=" | prepend: site.blog.baseurl | append: tag[0] | replace: '//', '/' }}">
{{ tag[0] | rstrip}}<div class="tag-count">{{ tag[1].size }}</div>
</a>
{% endif %}
{% endfor %}
</div>
7 changes: 7 additions & 0 deletions _includes/common-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="canonical" href="{% include snippets/page-url.html %}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{% include snippets/rss-url.html %}">
28 changes: 28 additions & 0 deletions _includes/head-icons-rel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
for Safari on iOS
https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/
-->

<link rel="apple-touch-icon" sizes="180x180" href="/statics/images/logo/icon-180x180.png">
<link rel="apple-touch-icon" sizes="167x167" href="/statics/images/logo/icon-167x167.png">
<link rel="apple-touch-icon" sizes="152x152" href="/statics/images/logo/icon-152x152.png">
<link rel="apple-touch-icon" sizes="120x120" href="/statics/images/logo/icon-120x120.png">
<link rel="shortcut icon" href="/statics/images/logo/icon-120x120.png">

<!--
for Chrome on Android
https://developer.chrome.com/multidevice/android/installtohomescreen
-->
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="/statics/images/logo/icon-192x192.png">

<!--
for Edge on Windows 8 & Windows 10
https://msdn.microsoft.com/en-us/library/dn255024(v=vs.85).aspx
-->
<meta name="msapplication-TileImage" content="/statics/images/logo/icon-144x144.png">
<meta name="msapplication-square310x310logo" content="/statics/images/icon-310x310.png">
<meta name="msapplication-wide310x150logo" content="/statics/images/icon-310x150.png">
<meta name="msapplication-square150x150logo" content="/statics/images/icon-150x150.png">
<meta name="msapplication-square70x70logo" content="/statics/images/icon-70x70.png">
<meta name="msapplication-TileColor" content="#eeeeee">
6 changes: 6 additions & 0 deletions _includes/icon/mail.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _includes/icon/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _includes/icon/next.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _includes/icon/previous.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _includes/icon/social/behance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions _includes/icon/social/douban.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _includes/icon/social/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions _includes/icon/social/flicker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _includes/icon/social/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _includes/icon/social/googleplus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0d537bc

Please sign in to comment.