Permalink
Browse files

Create initial Jekyll layout.

  • Loading branch information...
1 parent 6b3a0bd commit e2dc63c153fc0083f7b91c6361697b2e47476ca3 江宏 committed Jul 27, 2011
Showing with 311 additions and 63 deletions.
  1. +3 −0 .gitignore
  2. +51 −0 Rakefile
  3. +5 −0 _config.yml
  4. +35 −0 _layouts/page.html
  5. +11 −0 _layouts/post.html
  6. +1 −0 css/style.css
  7. +0 −63 index.html
  8. +18 −0 index.markdown
  9. +4 −0 js/modernizr.js
  10. +183 −0 less/style.less
View
@@ -0,0 +1,3 @@
+/css/*.fat
+/bin/
+/_site/
View
@@ -0,0 +1,51 @@
+yuic = 'yuicompressor-2.4.6'
+yuicjar = "#{yuic}.jar"
+
+def compress_css(source, target)
+ sh "java -jar 'bin/yuicompressor-2.4.6.jar' --type css " +
+ "--charset utf-8 -o #{target} \"#{source}\""
+end
+
+task :default => :site
+
+directory 'bin'
+
+file "bin/#{yuicjar}" => 'bin' do
+ sh "cd /tmp && wget http://yui.zenfs.com/releases/yuicompressor/#{yuic}.zip"
+ sh "cd /tmp && unzip #{yuic}.zip"
+ rm "/tmp/#{yuic}.zip"
+ mv "/tmp/#{yuic}/build/#{yuicjar}", "bin/"
+end
+
+directory 'css'
+
+less = FileList['less/**/*.less'].exclude('less/**/*.inc.less')
+
+less.each do |source|
+ target = source.sub(/less$/, 'css.fat').sub(/^less/, 'css')
+ file target => (['css'] + FileList['less/**/*.less']) do
+ sh "lessc #{source} #{target}"
+ end
+end
+
+css = less.map {|f| f.sub(/less$/, 'css').sub(/^less/, 'css')}
+css.each do |c|
+ file c => ["#{c}.fat", "bin/#{yuicjar}"] do |t|
+ compress_css "#{t.name}.fat", "#{t.name}"
+ end
+end
+
+"Generate CSS files from LESS source."
+task :less => css
+
+task :site => :less do
+ sh 'jekyll'
+end
+
+task :watch do
+ sh 'while inotifywait -r .; do rake; done'
+end
+
+task :deploy => :site do
+ sh 'bin/deploy'
+end
View
@@ -0,0 +1,5 @@
+safe: true
+lsi: false
+pygments: true
+exclude: less bin deploy Rakefile
+url: http://cnlojure
View
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>
+ {% if page.title %}
+ China Clojure Users Group &raquo; {{ page.title }}
+ {% else %}
+ China Clojure Users Group
+ {% endif %}
+ </title>
+ <meta name="keywords" content="Clojure, China, Chinese, user group">
+ <meta name="description" content="China Clojure users community.">
+ <link href="/css/style.css" rel="stylesheet" type="text/css" />
+ <!--[if lt IE 9]>
+ <script src="/js/modernizr.js"></script>
+ <![endif]-->
+</head>
+<body>
+ <header>
+ <ul id="top-nav">
+ {% if page.nav_item == 'home' %}
+ <li class="selected">
+ {% else %}
+ <li>
+ {% endif %}
+ <a href="/">Home</a></li>
+ </ul>
+ <a href="/"><h1>(clojure :chinese-users)</h1></a>
+ </header>
+ <div id="page-container">
+ {{ content }}
+ </div>
+ <footer>&copy;2011, <a href="http://cnlojure.org">cnlojure.org</a>. All Rights Reserved.</footer>
+<body>
View
@@ -0,0 +1,11 @@
+---
+layout: page
+nav_item: blog
+---
+<div class="post">
+ <a href="{{page.url}}"><h2>{{page.title}}</h2></a>
+ <div class="date">{{page.date | date_to_long_string}}</div>
+ <div>
+ {{content}}
+ </div>
+</div>
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,63 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>
- China Clojure User Group
- </title>
- <style type="text/css">
- body {
- overflow-y: scroll;
- font-size: 100%;
- font-family: "楷体"
- color: #404040;
- margin: 0 auto;
- padding: 0;
- text-align:left;
- line-height: 1.5em;
- }
-
- body#Home {
- width: 400px;
- }
- a {
- color: #26a;
- text-decoration: none;
- margin: 0 1px;
- }
-
- a:hover,
- a:visited:hover {
- text-decoration: underline;
- }
- a[target="_blank"]:hover {
- background:#CCF2FF;
- }
-
- a[target="_blank"]:active {
- }
- </style>
-
- </head>
- <body>
- <a href="http://cnlojure.org"><img src="clojure-icon.gif"/></a>
- <ul>
- <li><a href="http://www.cnlojure.org">CN-clojure</a>
- <p>CN-clojure是一个虚拟组织,致力于促进Clojure中文社区的交流,让所有cn clojurer有一个共同的家园。</p>
- </li>
- <li>
- <a href="http://groups.google.com/group/cn-clojure" target="_blank">邮件列表</a>
- <p>cn-clojure google group是我们发起讨论的主要地方,欢迎任何对clojure或者其他函数式语言感兴趣的朋友加入</p>
- </li>
- <li>
- <a href="http://clojure.org" target="_blank">Clojure.org</a>
- <p>Clojure语言是基于JVM平台的Lisp方言</p>
- </li>
- <li>
- 事件
- <ul>
- <li>我们计划在长三角地区组织一次cn-clojure的线下聚会,非常希望感兴趣的朋友参加,如果能提供帮助更好。这是一张<a href="http://www.diaochapai.com/survey548296">调查表</a>,我们希望了解有多少人愿意参加,并确定地点和方式,请帮助填写,谢谢</li>
- </ul>
- </li>
- </ul>
- </body>
-</html>
View
@@ -0,0 +1,18 @@
+---
+layout: page
+title: Home
+nav_item: home
+---
+<a href="http://cnlojure.org"><img src="clojure-icon.gif"
+ id="clj-logo" /></a>
+
+[Clojure](http://clojure.org)是基于JVM平台的Lisp语言,在CLR和JavaScript平台上也有各自的实现。
+
+`cn-clojure`是由中国Clojure用户自发创立的社区,致力于促进Clojure中文社区的交流,让所有中文Clojure用户有一个共同的家园。
+
+## 近期活动
+我们计划在长三角地区组织一次cn-clojure的线下聚会并发展成为周期性的技术交流活动,非常希望感兴趣的朋友参加,如果能提供帮助则更好。由于是第一次活动,我们需要了解大致有多少人会参加,以及大家对地点的偏好。如果你有意参加,请填写<a href="http://www.diaochapai.com/survey548296">这份在线调查表</a>。谢谢。
+
+## Google Group
+[cn-clojure google group](http://groups.google.com/group/cn-clojure)
+是我们发起讨论的主要地方,欢迎对clojure、函数式语言或相关技术感兴趣的朋友加入。
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -0,0 +1,183 @@
+@bg-color: #dcdccc;
+@text-color: #3f3f3f;
+@light-text-color: #5f5f5f;
+@image-border-color: #8f8f8f;
+@nav-selected-bg-color: #2d6ebe;
+@page-width: 900px;
+@link-color: #0f4d92;
+@visited-link-color: #336699;
+@code-bg-color: #d8deec;
+@code-color: #299bb2;
+@pyg-p-color: #4c7073;
+@pyg-k-color: #f0dfaf;
+@pyg-nv-color: #dcdccc;
+@pyg-nf-color: #8cd0d3;
+
+// css3 border-radius ---- rouned corners
+.css3-border-radius (@radius: 5px) {
+ -moz-border-radius: @radius; // Firefox
+ -webkit-border-radius: @radius; // Webkit
+ -o-border-radius: @radius; // Opera
+ border-radius: @radius; //standard
+}
+
+//css3 box-shadow
+.css3-box-shadow (@params: 10px 10px 5px #888) {
+ -moz-box-shadow: @params;
+ -webkit-box-shadow: @params;
+ box-shadow: @params;
+}
+
+body {
+ margin: 0px;
+ padding: 0px;
+ font: normal 11pt Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;
+ line-height: 1.4em;
+ background: @bg-color;
+ color: @text-color;
+
+ > header {
+ margin: 0px;
+ padding: 0 6px;
+ background: @text-color;
+ color: @bg-color;
+ .css3-box-shadow(0 0 15px #333);
+ line-height: 26pt;
+
+ a, a:active, a:hover, a:visited {
+ color: @bg-color;
+ text-decoration: none;
+ }
+
+ h1 {
+ margin: 0px;
+ padding: 0px;
+ font-size: 18pt;
+ font-family: monospace;
+ font-weight: normal;
+ }
+ }
+
+ > footer {
+ margin: 20px 0;
+ text-align: center;
+ color: @light-text-color;
+ font-size: small;
+ }
+}
+
+#page-container {
+ width: @page-width;
+ margin-left: auto;
+ margin-right: auto;
+ .css3-border-radius(0px 0px 6px 6px);
+ background: #fff;
+ .css3-box-shadow(0 0 15px #333);
+ padding: 1em;
+
+ h2 {
+ font-size: 15pt;
+ }
+
+ h3 {
+ font-size: 14pt;
+ }
+
+ h4 {
+ font-size: 13pt;
+ }
+
+ h5 {
+ font-size: 12pt;
+ }
+
+ h6 {
+ font-size: 11pt;
+ }
+
+ p {
+ padding: 0px;
+ margin-top: 1em;
+ margin-bottom: 1em;
+ }
+
+ img {
+ border: 1px solid @light-text-color;
+ padding: 2px;
+ display: block;
+ margin: 0 auto;
+ }
+}
+
+ul#top-nav {
+ list-style: none;
+ font-size: 14pt;
+ text-shadow: 0 -1px 0 #333;
+ float: right;
+ margin: 0px;
+
+ li {
+ display: inline;
+ padding: 0;
+ margin: 0;
+ }
+
+ a {
+ text-decoration: none;
+ color: @bg-color;
+ padding: 5pt 0.8em;
+ &:hover,&:active {
+ background: @light-text-color;
+ text-decoration: none;
+ }
+ }
+
+ .selected a { background: @light-text-color; }
+}
+
+ul#posts {
+ list-style: none;
+ padding-left: 0;
+
+ li {
+ padding: 0.5em;
+
+ h2 {
+ margin: 0;
+ padding: 0.5em 0;
+ }
+ }
+}
+
+a{
+ color: @link-color;
+ text-decoration: none;
+ &:hover,&:active {
+ color: @link-color;
+ text-decoration: underline;
+ }
+ &:visited {
+ color: @visited-link-color;
+ }
+}
+
+pre {
+ background-color: #3f3f3f;
+ color: #dcdccc;
+ padding: 0.5em 0.6em;
+ .css3-border-radius(4px);
+}
+
+code {
+ font-size: 10pt;
+ .p { color: @pyg-p-color}
+ .k { color: @pyg-k-color}
+ .nv { color: @pyg-nv-color}
+ .nf { color: @pyg-nf-color}
+}
+
+img#clj-logo {
+ border: 0px none;
+ display: block;
+ float: right;
+}

0 comments on commit e2dc63c

Please sign in to comment.