Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create initial Jekyll layout.

  • Loading branch information...
commit e2dc63c153fc0083f7b91c6361697b2e47476ca3 1 parent 6b3a0bd
江宏 authored
View
3  .gitignore
@@ -0,0 +1,3 @@
+/css/*.fat
+/bin/
+/_site/
View
51 Rakefile
@@ -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
5 _config.yml
@@ -0,0 +1,5 @@
+safe: true
+lsi: false
+pygments: true
+exclude: less bin deploy Rakefile
+url: http://cnlojure
View
35 _layouts/page.html
@@ -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
11 _layouts/post.html
@@ -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
1  css/style.css
@@ -0,0 +1 @@
+body{margin:0;padding:0;font:normal 11pt Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;line-height:1.4em;background:#dcdccc;color:#3f3f3f}body>header{margin:0;padding:0 6px;background:#3f3f3f;color:#dcdccc;-moz-box-shadow:0 0 15px #333;-webkit-box-shadow:0 0 15px #333;box-shadow:0 0 15px #333;line-height:26pt}body>header a,body>header a:active,body>header a:hover,body>header a:visited{color:#dcdccc;text-decoration:none}body>header h1{margin:0;padding:0;font-size:18pt;font-family:monospace;font-weight:normal}body>footer{margin:20px 0;text-align:center;color:#5f5f5f;font-size:small}#page-container{width:900px;margin-left:auto;margin-right:auto;-moz-border-radius:0 0 6px 6px;-webkit-border-radius:0 0 6px 6px;-o-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;background:#fff;-moz-box-shadow:0 0 15px #333;-webkit-box-shadow:0 0 15px #333;box-shadow:0 0 15px #333;padding:1em}#page-container h2{font-size:15pt}#page-container h3{font-size:14pt}#page-container h4{font-size:13pt}#page-container h5{font-size:12pt}#page-container h6{font-size:11pt}#page-container p{padding:0;margin-top:1em;margin-bottom:1em}#page-container img{border:1px solid #5f5f5f;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:0}ul#top-nav li{display:inline;padding:0;margin:0}ul#top-nav a{text-decoration:none;color:#dcdccc;padding:5pt .8em}ul#top-nav a:hover,ul#top-nav a:active{background:#5f5f5f;text-decoration:none}ul#top-nav .selected a{background:#5f5f5f}ul#posts{list-style:none;padding-left:0}ul#posts li{padding:.5em}ul#posts li h2{margin:0;padding:.5em 0}a{color:#0f4d92;text-decoration:none}a:hover,a:active{color:#0f4d92;text-decoration:underline}a:visited{color:#369}pre{background-color:#3f3f3f;color:#dcdccc;padding:.5em .6em;-moz-border-radius:4px;-webkit-border-radius:4px;-o-border-radius:4px;border-radius:4px}code{font-size:10pt}code .p{color:#4c7073}code .k{color:#f0dfaf}code .nv{color:#dcdccc}code .nf{color:#8cd0d3}img#clj-logo{border:0 none;display:block;float:right}
View
63 index.html
@@ -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
18 index.markdown
@@ -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
4 js/modernizr.js
@@ -0,0 +1,4 @@
+/* Modernizr 2.0.4 (Custom Build) | MIT & BSD
+ * Contains: iepp | hasevent
+ */
+;window.Modernizr=function(a,b,c){function x(a,b){return!!~(""+a).indexOf(b)}function w(a,b){return typeof a===b}function v(a,b){return u(prefixes.join(a+";")+(b||""))}function u(a){j.cssText=a}var d="2.0.4",e={},f=b.documentElement,g=b.head||b.getElementsByTagName("head")[0],h="modernizr",i=b.createElement(h),j=i.style,k,l=Object.prototype.toString,m={},n={},o={},p=[],q=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=w(e[d],"function"),w(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),r,s={}.hasOwnProperty,t;!w(s,c)&&!w(s.call,c)?t=function(a,b){return s.call(a,b)}:t=function(a,b){return b in a&&w(a.constructor.prototype[b],c)};for(var y in m)t(m,y)&&(r=y.toLowerCase(),e[r]=m[y](),p.push((e[r]?"":"no-")+r));u(""),i=k=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,e.hasEvent=q;return e}(this,this.document);
View
183 less/style.less
@@ -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;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.