Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tweak site

  • Loading branch information...
commit 86ae669cb20a96cf4d91425f2385f2e40117febb 1 parent a9a4b80
@yihui authored
Showing with 25 additions and 8 deletions.
  1. +1 −0  _config.yml
  2. +4 −8 _layouts/default.html
  3. +20 −0 _layouts/post.html
View
1  _config.yml
@@ -2,4 +2,5 @@ markdown: rdiscount
permalink: /:year/:month/:title/
url: http://yihui.name/cn
author: 谢益辉
+pygments: true
View
12 _layouts/default.html
@@ -7,11 +7,8 @@
<link rel="shortcut icon" href="/favicon.ico">
<link href="{{ site.url }}/feed/" rel="alternate" title="{{ site.author }}" type="application/atom+xml" />
<link rel="stylesheet" href="/media/css/style.css">
- <link rel="stylesheet" href="/media/css/github.css">
- <script type="text/javascript" src="/media/js/highlight.pack.js"></script>
- <script type="text/javascript">
- hljs.initHighlightingOnLoad();
- </script>
+ <link rel="stylesheet" href="/media/css/highlight.css">
+ <script type="text/javascript" src="/media/js/jquery-1.7.1.min.js"></script>
</head>
<body>
<div id="container">
@@ -21,17 +18,16 @@
</header>
<nav>
<span><a title="home page" class="" href="{{ site.url }}/">home</a></span>
- <span><a title="about" class="" href="{{ site.url }}/about/">about me</a></span>
+ <span><a title="about" class="" href="{{ site.url }}/about/">about</a></span>
<span><a title="publication" class="" href="{{ site.url }}/publication/">publication</a></span>
<span><a title="guestbook" class="" href="{{ site.url }}/guestbook/">guestbook</a></span>
<span><a title="vitae" class="" href="{{ site.url }}/vitae/">vitae</a></span>
<span><a title="categories" class="" href="{{ site.url }}/categories/">categories</a></span>
<span><a title="tags" class="" href="{{ site.url }}/tags/">tags</a></span>
<span><a title="links" class="" href="{{ site.url }}/links/">links</a></span>
- <span><a title="subscribe me" class="" href="{{ site.url }}/feed/">feed</a></span>
+ <span><a title="subscribe by RSS" class="" href="{{ site.url }}/feed/">subscribe</a></span>
</nav>
<article class="content">
- <blockquote>THIS SITE IS STILL UNDER CONSTRUCTION. PLEASE COME BACK AFTER THIS NOTICE IS REMOVED. THANKS!</blockquote>
{{ content }}
</article>
</div>
View
20 _layouts/post.html
@@ -35,4 +35,24 @@
{% endif %}
</section>
{% include comments.md %}
+<script type="text/javascript">
+$(function(){
+ $(document).keydown(function(e) {
+ var url = false;
+ if (e.which == 37 || e.which == 74) { // Left arrow and J
+ {% if page.previous %}
+ url = '{{page.previous.url}}';
+ {% endif %}
+ }
+ else if (e.which == 39 || e.which == 75) { // Right arrow and K
+ {% if page.next %}
+ url = '{{page.next.url}}';
+ {% endif %}
+ }
+ if (url) {
+ window.location = url;
+ }
+ });
+})
+</script>
Please sign in to comment.
Something went wrong with that request. Please try again.