Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kkninjae committed Mar 5, 2017
0 parents commit 1c7d29b
Show file tree
Hide file tree
Showing 25 changed files with 1,235 additions and 0 deletions.
68 changes: 68 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Page Not Found
permalink: /404.html
---
<!DOCTYPE html>
<html lang="en">
<head>

{% include head.html %}

<style type="text/css">
a {
color: #6699cc;
transition: color .3s;
text-decoration: none;
}

a:hover {
color: #000;
}

#container {
margin: 0 auto;
max-width: 960px;
}

#tangram {
height: 0;
width: 40%;
padding-top: 38%;
position: relative;
margin: 0 auto;
margin-top: 10%;
}

svg {
position: absolute;
top: 0;
left: 0;
}

#description {
margin-top: 10%;
text-align: center;
}
</style>
</head>
<body>
<div id="container">
<div id="tangram">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300" xmlns:xlink="http://www.w3.org/1999/xlink">
<path style="fill: #5862e4" d="M0 0 L0 300 L150 150 Z" />
<path style="fill: #d67756" d="M0 0 L300 0 L150 150 Z" />
<path style="fill: #973a34" d="M0 300 L150 300 L75 225 Z" />
<path style="fill: #c93a8a" d="M150 300 L75 225 L150 150 L225 225 Z" />
<path style="fill: #494c8f" d="M150 150 L225 75 L225 225 Z" />
<path style="fill: #80ac53" d="M225 75 L300 0 L300 150 L225 225 Z" />
<path style="fill: #ffef54" d="M150 300 L300 150 L300 300 Z" />
</svg>
</div>

<div id="description">
<p>Ooops, this page doesn't exist. Go <a href="{{ site.url }}">somewhere</a> else? :)</p>
<p>&copy; <script type="text/javascript">document.write(new Date().getFullYear());</script> <a href="/about/">{{ site.title }}</a></p>
</div>
</div>
</body>
</html>
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Lang Liu

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Book
====

Book is a simple Jekyll theme like a real book. [Demo]()

### Screenshots

![](./assets/img/index.jpg)

### Features

* Responsive layout and mobile first
* Customized [404]() page
* Timeline style for post archive

### Get started

1. fork the [repo](https://github.com/kkninjae/book/fork).
2. clone `git clone https://github.com/username/book`
3. run `jekyll serve -w`

[http://localhost:4000](http://localhost:4000) should be ready.

Customization
-------------

### _config.yml file

* title: site name
* description: site description
* url: site url
* avatar: absolute path of avatar which is a picture (140px * 140px) on the index page.
* favicon: absolute path of site favicon
* google_analytics: id for google analystics
* disqus_shortname: shortname of disque comment system
* about: content on the about page.
you can write more than one paragraph but the format should be like the original one.
the special word `?link?` will be replaced by one of the links which are listed under links.

### warning

Please do not delete the first two lines of style.css file.

Open Sources
------------

* [Google Fonts](https://www.google.com/fonts)
* [jQuery](https://jquery.com/)
* [highlight.js](https://highlightjs.org/)

License
-------

[MIT](./LICENSE)
20 changes: 20 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title: Lang Liu
description: Programmer & Traveler.
url: http://kkninjae.com
avatar: /assets/img/avatar.jpg
favicon: /assets/img/favicon.ico
google_analytics: UA-62396585-1
disqus_shortname: kkninjae

about:
- paragraph: ?link?, a simple Jekyll theme. Built by ?link?
text_align: center
links:
- name: Book
url: https://github.com/kkninjae/book
external: true
- name: Lang Liu
url: http://kkninjae.com/about/
external: false


10 changes: 10 additions & 0 deletions _includes/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ site.disqus_shortname }}';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
5 changes: 5 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div id="footer">
<p>&copy; <script type="text/javascript">document.write(new Date().getFullYear());</script> <a class="link-1" href="/">{{ site.title }}</a></p>

<p>Powered by <a class="link-1" href="http://jekyllrb.com/">Jekyll</a> with <a class="link-1" href="https://github.com/kkninjae/book">Book</a> theme.</p>
</div>
9 changes: 9 additions & 0 deletions _includes/google-analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<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','//www.google-analytics.com/analytics.js','ga');

ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
11 changes: 11 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>

<!-- favicon -->
<link rel="shortcut icon" type="image/x-icon" href="{{ site.favicon }}" />
<link rel="icon" type="image/x-icon" href="{{ site.favicon }}" />

<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="/feed.xml" />
30 changes: 30 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<!-- head -->
{% include head.html %}

<!-- fonts -->
<link href='http://fonts.googleapis.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'>

<!-- stylesheet -->
<link rel="stylesheet" href="/assets/css/solarized_dark.css" />
<link rel="stylesheet" href="/assets/css/style.css" />

<!-- script -->
<script src="/assets/js/jquery-1.11.3.min.js"></script>
<script src="/assets/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="/assets/js/script.js"></script>

{% if site.google_analytics %}
<!-- Google Analytics -->
{% include google-analytics.html %}
{% endif %}
</head>
<body>

{{ content }}

</body>
</html>
15 changes: 15 additions & 0 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: default
---
<div class="clear-footer wrapper">

<div class="container">

{{ content }}

</div>

<!-- footer -->
{% include footer.html %}

</div>
74 changes: 74 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
layout: default
---
<div class="clear-footer post-wrapper">

<!-- post archive trigger -->
<div class="post-archive-trigger">
<div class="post-archive-icon"></div>
</div>

<!-- post archive -->
<div class="post-archive">
{% if site.posts %}
<ul>
{% for post in site.posts %}
{% if page.url == post.url %}
{% assign status = 'checked' %}
{% else %}
{% assign status = '' %}
{% endif %}
<li>
<div class="post-archive-iterm">
<span class="post-archive-date">{{ post.date | date: "%Y-%m-%d" }}</span>
<a class="link-1 post-archive-title {{ status }}" href="{{ post.url }}">{{ post.title }}</a>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>

<!-- post header -->
<div class="post-header">
<h1>{{ page.title }}</h1>
<span>{{ page.date | date: "%Y-%m-%d" }}</span>
</div>

<!-- post content -->
{% if page.tags contains 'chinese' %}
{% assign type = 'chinese' %}
{% else %}
{% assign type = 'english' %}
{% endif %}

<div class="post-content {{ type }}">
{{ content }}
</div>

<!-- post navigator -->
<div class="post-nav">
{% if page.previous %}
<a class="post-nav-previous"href="{{ page.previous.url }}">{{ page.previous.title }}</a>
{% endif %}

{% if page.previous and page.next %}
<div class="post-nav-sep"></div>
{% endif %}

{% if page.next %}
<a class="post-nav-next" href="{{ page.next.url }}">{{ page.next.title }}</a>
{% endif %}
</div>

<!-- disqus comment system -->
{% if site.disqus_shortname != '' %}
<div class="post-comment">
{% include disqus.html %}
</div>
{% endif %}

<!-- footer -->
{% include footer.html %}

</div>
43 changes: 43 additions & 0 deletions _posts/2015-08-28-book-style-doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
layout: post
title: Simple Style
date: 2015-08-28
tags: english
category: blog
---

Three Colors for Heading 2
==========================

rabbit
------

cat
---

dog
---

lion
----

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.

Blockquote
==========

> I am a blockquote.
In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet.

Python Code
===========

def foo():
return "foo"

def main():
foo()

if __name__ == '__main__':
main()
Loading

0 comments on commit 1c7d29b

Please sign in to comment.