├── BlackCubeTheme
├── 404.html
├── README.md
├── _config.yml
├── _includes
│ ├── foot.html
│ ├── head.html
│ ├── wg-contact.html
│ ├── wg-other.html
│ └── wg-project.html
├── _layouts
│ ├── default.html
│ └── post.html
├── _posts
│ ├── .DS_Store
│ └── 2012-04-26-hello-world.md
├── _site
│ ├── 2012
│ │ └── 04
│ │ │ └── 26
│ │ │ └── hello-world.html
│ ├── 404.html
│ ├── archives.html
│ ├── atom.xml
│ ├── contact.html
│ ├── css
│ │ └── style.css
│ ├── font
│ │ ├── JennaSue.eot
│ │ └── JennaSue.ttf
│ ├── images
│ │ ├── bg.png
│ │ ├── bg2.png
│ │ ├── body-bg.jpg
│ │ ├── facebook_32.png
│ │ ├── flickr_32.png
│ │ ├── github_32.png
│ │ ├── google_32.png
│ │ ├── linkedin_32.png
│ │ ├── psb.jpg
│ │ ├── rss_32.png
│ │ ├── twitter_32.png
│ │ └── vimeo_32.png
│ └── index.html
├── archives.html
├── atom.xml
├── contact.html
├── css
│ └── style.css
├── images
│ ├── bg.png
│ ├── bg2.png
│ ├── body-bg.jpg
│ ├── facebook_32.png
│ ├── flickr_32.png
│ ├── github_32.png
│ ├── google_32.png
│ ├── linkedin_32.png
│ ├── psb.jpg
│ ├── rss_32.png
│ ├── twitter_32.png
│ └── vimeo_32.png
└── index.html
├── README.md
├── VioletTheme
├── 404.html
├── ChangeLog.html
├── _config.yml
├── _layouts
│ ├── default.html
│ ├── page.html
│ └── post.html
├── _posts
│ ├── 2010-09-22-Hello-world.md
│ ├── 2011-09-22-create-github-page.md
│ ├── 2011-09-23-markdown.md
│ ├── 2011-09-24-jekyll-more.md
│ ├── 2011-09-28-always-with-me.md
│ ├── 2011-10-05-sky-city.md
│ ├── 2011-10-11-sl-alpha.md
│ ├── 2011-10-2-start-github-on-window.md
│ ├── 2011-11-12-github-notes.md
│ ├── 2011-11-15-use-disqus-for-your-post.md
│ ├── 2011-11-22-mac-git-and-github.md
│ ├── 2011-11-22-mac-macports.md
│ ├── 2011-11-22-mac-wget.md
│ ├── 2011-11-22-xampp-security.md
│ ├── 2011-11-24-hello-node.md
│ ├── 2011-11-24-install-nodejs.md
│ ├── 2011-11-25-DlHighlight-helpers-update.md
│ ├── 2011-11-30-install-jekyll.md
│ └── 2011-12-02-hello-pizn-me.md
├── _site
│ ├── 2010
│ │ └── 09
│ │ │ └── 22
│ │ │ └── Hello-world.html
│ ├── 2011
│ │ └── 09
│ │ │ ├── 22
│ │ │ └── create-github-page.html
│ │ │ └── 23
│ │ │ └── markdown.html
│ ├── css
│ │ └── default.css
│ ├── favicon.ico
│ ├── images
│ │ ├── bg.jpg
│ │ └── prefile.gif
│ └── index.html
├── archives.html
├── atom.xml
├── css
│ ├── cc-knight.css
│ └── default.css
├── favicon.ico
├── images
│ ├── bg.jpg
│ └── prefile.gif
├── index.html
└── js
│ ├── colorcode.js
│ └── html5.js
└── theOneTheme
├── 404.html
├── README.md
├── _config.yml
├── _layouts
├── default.html
└── post.html
├── _posts
└── 2012-11-13-hello-world.md
├── archives.html
├── contact.html
├── css
└── style.css
├── font
├── JennaSue.eot
├── JennaSue.ttf
├── fontawesome-webfont.eot
├── fontawesome-webfont.svg
├── fontawesome-webfont.ttf
└── fontawesome-webfont.woff
├── images
└── yujinxiang.jpeg
├── index.html
└── js
├── html5.js
├── jquery.js
├── jquery.scrollTo.js
└── theOne.js
/BlackCubeTheme/404.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: 404 Page
4 | ---
5 |
6 |
7 |
8 |
Soooooooooorry!
9 |
This is the 404 Page!
10 |
11 |
12 |
--------------------------------------------------------------------------------
/BlackCubeTheme/README.md:
--------------------------------------------------------------------------------
1 | ###主题介绍
2 |
3 | * version : 1.0
4 | * name : Black Cube Theme
5 | * color : black
6 | * create : 2012-04-25
7 | * author : PIZn
8 | * support : index, archives, contact
9 |
10 | ###Other
11 |
12 | 这是一款黑色主题,目前支持 3 个页面,分别是 index.html, archives.html,
13 | contact.html。
14 |
--------------------------------------------------------------------------------
/BlackCubeTheme/_config.yml:
--------------------------------------------------------------------------------
1 | markdown: rdiscount
2 | pygments: true
3 | paginate: 4
4 |
5 | title: Black Cube Theme
6 | url: http://www.pizn.me
7 | feed: /atom.xml
8 | author:
9 | name: PIZn
10 | email: pizner@gmail.com
11 | description: "PIZn's blog theme -- Black Cube Theme 1.0 "
12 |
13 | about: "I am PIZn.I love all kinds of design, attention to the Internet dynamic, dedicated web front development, learn UI and UED."
14 | follow:
15 | github: https://github.com/pizn
16 | twitter: http://www.twitter.com/piznlin
17 | description: "PIZn's blog theme -- Black Cube Theme 1.0 "
18 |
19 |
20 | style: /css/style.css
21 | blogName: PIZn
22 | blogDesc: Phosphorus,Iodine & Zinc.
--------------------------------------------------------------------------------
/BlackCubeTheme/_includes/foot.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/BlackCubeTheme/_includes/head.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/BlackCubeTheme/_includes/wg-contact.html:
--------------------------------------------------------------------------------
1 |
6 | {{ page.title }}
7 | 这里记录着我修改过的一些简单的痕迹,没有相片,只有文字,但确实存在过的一些东西。
8 | 2011-12-02: github 博客添加新域名 www.pizn.me
9 | 2011-11-15: 为文章页面添加 DisQus 评论
10 | 2011-09-25: 修改了 PIZn's GitHub Blog 头部菜单栏,增加 Archives, ChangeLog和 Feed 页面。增加主页分页显示,文章详细页前一页和后一页。
11 | 2011-09-23: 设计 PIZn's GitHub Blog 界面风格。主要是基于 Violet 主题,融入 change 元素。完成简单的页面布局和功能页面搭建。
12 | 2011-09-22: 建立 Blog Repo,创建 PIZn's GitHub Blog 项目。
13 |
14 |
--------------------------------------------------------------------------------
/VioletTheme/_config.yml:
--------------------------------------------------------------------------------
1 | markdown: rdiscount
2 | pygments: true
3 | paginate: 6
4 |
5 | title: PIZn's Blog theme
6 | url: http://pizn.github.com
7 | feed: /blog/atom.xml
8 | author:
9 | name: PIZn
10 | email: pizner@gmail.com
11 | twitter: twitter.com/piznlin
12 | description: "PIZn's blog theme -- violet 1.0 "
13 |
14 | copyright:
15 | - Design by
31 | 接着在本地创建相应的 pages 分支
32 | cd /path/to/fancypants
33 | git symbolic-ref HEAD refs/heads/gh-pages
34 | rm .git/index
35 | git clean -fdx
36 | 紧接着创建 gh-pages 分支并将内容提交到分支上
37 | echo "My GitHub Page" > index.html
38 | git add .
39 | git commit -a -m "First pages commit"
40 | git push origin gh-pages
41 | 因为我们在 github 上系统已经为我们生成了一个好的 index.html,但我们在本地建立了一
42 | 个,所以需要将本地的版本和线上的版本同步起来。
43 | //在本地:
44 | cd test
45 | //查看本地分支情况
46 | git branch
47 | //切换分支
48 | git checkout gh-pages
49 | //当你再次查看分支的时候,*号就会在 gh-pages 前面
50 | //更新本地
51 | git pull origin gh-pages
52 | 更新到本地之后,你就会看到你在 github 上的 index.html 文件
53 | //尝试着编辑,上传,更新看看
54 | vi index.html
55 | ⋯⋯
56 | ###一些其他的内容
57 | ####简单的更新本地代码到 github
58 | git add .
59 | git commit -m 'test'
60 | git push origin gh-pages
61 | ####jekyll 基本目录
62 | test
63 | |--- _layouts/
64 | |--- default.html
65 | |--- post.html
66 | |--- _posts/
67 | |--- 2011-09-22-title1
68 | |--- 2011-09-22-title2
69 | |--- css/
70 | |--- base.css
71 | |--- sytle.css
72 | |--- _config.yml
73 | |--- index.html
74 | ####一些函数数
75 | //页面相关
76 | page.title
77 | page.content
78 | //内容
79 | content
80 | //文章相关
81 | post.title
82 | post.url
83 | post.date
84 | post.id
85 | post.categories
86 | post.tags
87 | post.tags
88 | post.content
89 | ####一些对应的
90 | //一般都要
91 | ---
92 | layout: post
93 | title: Hello world
94 | ---
95 | ###有待补充的
96 | ⋯⋯
97 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-09-23-markdown.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: markdown 语法学习
4 | ---
5 | #{{ page.title }}
6 | @杭州
7 | ###h 标题的写法
8 | #h1
9 | ##h2
10 | ######h6
11 | ### ul 和 li
12 | * testtest
13 | * testtest
14 | * testtest
15 | * testtest
16 | * testtest
17 | * testtest
18 | * testtest
19 | * testtest
20 | * testtest
21 | * testtest
22 | 1. testtest
23 | 2. testtest
24 | 3. testtest
25 | 4. testtest
26 | 5. testtest
27 | 1. testtest
28 | 2. testtest
29 | 3. testtest
30 | 4. testtest
31 | 5. testtest
32 |
33 |
34 |
35 | 格式 |
36 | 用法 |
37 | 示例 |
38 |
39 |
40 |
41 |
42 | h1标签
43 | | #标签 |
44 | #我是h1
45 | =========
46 | ## h2
47 | |
48 |
49 |
50 | ul标签
51 | | * 标签 |
52 | |
53 |
54 |
55 | Markdown 使用 email 形式的區塊引言
56 | 果你很熟悉如何在 email 信件中引言i
57 | 你就知
58 | 道怎麼在 Markdown 文件中建立一個區塊引言,那會看起來像是你強迫斷行,然後在每行的
59 | 最前面加
60 |
61 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-09-24-jekyll-more.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Jekyll 的一些函数和技巧
4 | date: 2011-09-24
5 | category: jekyll
6 | ---
7 | #{{ page.title }}
8 | {{ page.date | date:"%B %d, %Y" }} By PIZn @杭州
9 | ##一些函数
10 | 循环输出 3 篇文章
11 |
12 | for post in site.posts limit:3
13 | endfor
14 |
15 | 循环输出最近 3 篇
16 |
17 | for post in site.posts offset:3 limit:3
18 | endfor
19 |
20 | 日期
21 |
22 | page.date | date:"%B %b, %Y"
23 |
24 | 分页输出
25 |
26 | for post in paginator.posts
27 | content
28 | endfor
29 |
30 | 分页
31 |
32 | if paginator.previous_page
33 | //判断输出前一个分页
34 | //"page" + paginator.previous_page
35 | endif
36 | if paginator.next_page
37 | //判断输出后一个分页
38 | //"page" + paginator.next_page
39 | endif
40 | for page in (1..paginator.total_pages)
41 | if page == paginator.page
42 | //如果是当前分页
43 | //page
44 | else
45 | //不是的话输出其他分页链接号码
46 | //"page" + page
47 | endif
48 | endfor
49 |
50 | 文章页面显示前一篇文章和后一篇文章
51 |
52 | if page.previous
53 | //url: page.previous.url
54 | //title: page.previous.title | truncatewords:5
55 | endif
56 | if page.next
57 | //url: page.next.url
58 | //title: page.next.url | truncatewords:5
59 |
60 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-09-28-always-with-me.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 千与千寻《与你同在》
4 | ---
5 | #{{ page.title }}
6 | {{ page.date | date:"%B %b, %Y"}} @杭州
7 |
8 | 今晚重温了《千与千寻》,这部片看了 N 遍了,有些小感触。在此记下歌词和翻译。
9 |
10 | 呼んでいる 胸のどこか奥で
11 | いつも心踊る 梦を见たい
12 | かなしみは 数えきれないけれど
13 | その向こうできっと あなたに会える
14 | 缲り返すあやまちの そのたび ひとは
15 | ただ青い空の 青さを知る
16 | 果てしなく 道は続いて见えるけれど
17 | この両手は 光を抱ける
18 | 果てしなく 道は続いて见えるけれど
19 | この両手は 光を抱ける
20 | さよならのときの 静かな胸
21 | 生きている不思议 死んでいく不思议
22 | 花も风も街も みんなおなじ
23 | 呼んでいる 胸のどこか奥で
24 | いつも何度でも 梦を描こう
25 | かなしみの数を 言い尽くすより
26 | 同じくちびるで そっとうたおう
27 | 闭じていく思い出の そのなかにいつも
28 | 忘れたくない ささやきを闻く
29 | こなごなに砕かれた 镜の上にも
30 | 新しい景色が 映される
31 | [はじまりの朝 静かな窓
32 | ゼロになるからだ 充たされてゆけ
33 | 海の彼方には もう探さない
34 | 辉くものは いつもここに
35 | わたしのなかに 见つけられたから]
36 |
37 |
38 | ###中文歌词:
39 |
40 | 内心深处在呼唤
41 | 我要走进悸动的梦中
42 | 虽然悲伤总是会重演
43 | 但我一定能在某处与你相逢
44 | 人们总是不停地犯错
45 | 他们只知道蓝天是蓝的
46 | 但他们的双手仍寻找光明
47 | 离别时平静的人
48 | 身体归于虚无时的倾听
49 | 莫名地生存,莫名地死亡
50 | 花,风和城市 都是如此
51 | 内心深处在呼唤
52 | 让我们不停地画出梦的色彩
53 | 比起回忆心中的悲伤
54 | 不如同样的唇轻声歌唱
55 | 即使在封锁的回忆中
56 | 仍然还有无法忘记的呢喃
57 | 即使在粉碎的镜片中
58 | 仍然能映出新的景色
59 | 晨景初照下的宁静窗台
60 | 还有化为虚无的身体
61 | 从此我不会越过大洋去寻找
62 | 闪耀所有都在身边
63 | 我将自己去追寻
64 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-10-05-sky-city.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 天空之城《伴随着你》歌词
4 | ---
5 | #{{ page.title }}
6 | 2011-10-05 @杭州
7 |
8 | 一直很喜欢宫崎骏的动画片,《天空之城》的主题曲--伴随着你,在此记下。
9 |
10 |
11 | 远处闪耀光辉的地平线
12 | 是因为你在后面
13 | 点点灯火令人如此怀念
14 | 是因为你在其中
15 | 来 出发吧 把面包
16 | 小刀和手提灯塞进背包里
17 | 还有爸爸留下的热情
18 | 妈妈眼中的深情
19 | 世界不停转动 你隐藏在其中
20 | 闪烁的瞳孔 闪烁的灯光
21 | 世界不停转动 伴随着你
22 | 伴随我们 直到我们重逢的那天
23 |
24 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-10-11-sl-alpha.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: css 背景透明解决方案
4 | ---
5 | #{{ page.title }}
6 | 2011-10-11 By PIZn @杭州
7 |
8 | 废话一下:
9 | 1. 通常在网上搜索到的 CSS 透明的代码入下:
10 |
11 | .transparent {
12 | filter: alpha(opacity=50);/* IE6 */
13 | -moz-opacity: 0.5; /* firefox */
14 | -khtml-opacity: 0.5; /* safari */
15 | opacity: 0.5; /* normal */
16 | }
17 |
18 | >这段代码可以很轻松地解决透明的问题,只需要更改透明度就好了。
19 |
20 | 2. CSS 中的 opactity 是有继承问题的。例如你的 Dom 结构如下:
21 |
22 | <div class="body">
23 | <div class="cnt">
24 | </div>
25 | </div>
26 |
27 | 假如你为 body 增加了如上 1 的透明样式之后,.body 的确透明了。而这个时候,你会发
28 | 现 .cnt 的块也变得 50% 透明了。假如你想通过重置样式来达到目的,不妨试试,你的
29 | 100% 的不透明,将会基于父节点的 50%的,也就是 50%*100%=50% 。
30 |
31 | 3. 常见的解决方法,就是通过兄弟节点来解决继承的问题,并使用 position 属性来改
32 | 变层次。具体不多说。
33 |
34 | 解决方案:
35 | 原理:使用 CSS3 的 rgb,rgba 来解决现代浏览器中的背景透明问题,使用 ie 中的渐变
36 | 滤镜来解决 ie 中的透明问题。具体代码如下:
37 |
38 | .sl-alpha {
39 | background-color: rgb( 0, 0, 0 );
40 | background-color: rgba( 0, 0, 0, 0.3 );
41 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#88ff0000, endColorstr=#88ff00000);
42 | -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#88ff0000, endColorstr=#88ff00000)";
43 | }
44 |
45 | --- 完 ---
46 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-10-2-start-github-on-window.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: window 下建立 github 连接
4 | ---
5 | #{{ page.title }}
6 | 2011-10-02 By PIZn @杭州
7 |
8 | 在 window 下搭建 github 连接。
9 | ###前提
10 | 这个前提还是比较简单的,你需要有一个 email,然后在 GitHub 上注册一个账户。
11 |
12 | ###工具
13 | 在 window 建立 ssh 连接的工具挺多的。GitHub 也有自己的一个工具来帮助用户建立 Git
14 | 连接--Git。
15 | 哈哈,[这儿下载Git](http://code.google.com/p/msysgit/downloads/list),具体的安装
16 | 方法参考[这里](http://help.github.com/win-set-up-git/)
17 |
18 | ###输入命令,建立连接
19 | 安装好 Git 之后,可别把它丢在一边不理了。这里有一些命令需要你手动输入。
20 | 1. 检查是否含有 SSH keys。(如果有的话,直接跳到第 4 步)不要太急哈,你刚刚才注
21 | 册,怎么会有呢?
22 | $ cd ~/.ssh
23 | 如果你在这里显示 "No such file or dirdectory" 请先跳到第 3 步,然后再跳回第 2 步
24 | ,挺好玩的哈。
25 |
26 | 2. 备份和删除已经存在的 SSH keys
27 | $ ls
28 | //这里大概会显示出你的几个文件,如下:
29 | config id_rsa id_rsa.pub know_hosts
30 | $ mkdir key_backup
31 | //创建一个备份目录
32 | $ cp id_rsa* key_backup
33 | //将 keys 保存到 key_backup, *号表示各种后缀
34 | $ rm id_rsa*
35 | //删除啦
36 |
37 | 3. 新建一个 SSH keys
38 | 输入下面的代码哈。到了需要路径的时候,点击 enter 就好。
39 | $ ssh-keygen -t rsa -C "your_email@yourmail.com"
40 | //引号部分是你的刚刚申请的 github 帐号的邮箱噢,这个时候会输出如下内容:
41 | Generating public/private rsa key pair.
42 | Enter file in which to save the key
43 | //让你输入要保存 key 的路径
44 | (/users/your_user_directory/.ssh/id_rsa):
45 | //你只需要 enter 就好
46 |
47 | 接着还要输入 ssh 密码
48 | Enter passphrase (empty for no passphrase):
49 | //输入密码
50 | Enter same passphrase again:
51 | //再次输入密码
52 |
53 | 紧接着你会看到如下的输出:
54 | Your identification has been saved in
55 | /Users/your_user_directory/.ssh/id_rsa.
56 | Your public key has been saved in
57 | /User/your_user_directory/.ssh/id_rsa.pub.
58 | The key fingerpring is:
59 | 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db user_name@username.com
60 | +--[ RSA 2048]----+
61 | | |
62 | | |
63 | | |
64 | | |
65 | | |
66 | +-----------------+
67 | 注:是不是你没看到下面那个框框呢?只看到一串这样格式的字符01:0f:f4...?这没关系,
68 | 待会你按照下面说的做就好了。
69 |
70 | 4. 把 SSH key 加到你的 GitHub
71 | 嘿嘿,登录 GitHub,然后点击 "Account Setting" > "SSH Public Keys" > "Add another public key"
72 | 然后打开 id_rsa.pub 文件(用 txt 打开就好,或者 vim )。这就是你的公钥。
73 | 注:id_rsa.pub 的路径是 C:\Documents and Settings\Administrator\.ssh\ ,如果你刚
74 | 刚按上面的做的话。
75 |
76 | 5. 测试啦
77 | 现在可以尝试使用 SSH 连接到 GitHub 啦。输入下面命令:
78 | $ ssh -T git@github.com
79 |
80 | 接着会出现这样的代码:
81 | The authenticity of host 'github.com(207.97.227.239)' can not be established.
82 | RSA key fingerprint is 10:10:10:....
83 | //省略后面那一串
84 | Are you sure you want to connitnue connecting(yes/no)?
85 |
86 | 别当心,输入 yes,成功的话,会显示这样:
87 | Hi username! ...
88 |
89 | 如果显示 fail 的话,请检查一下你刚刚在 GitHub 上的公钥,是否少了空格或者换行之类
90 | 的。
91 |
92 | ###后续的工作
93 | 现在你已经可以通过使用 Git 设置 SSH keys 来连接到你的 GitHub 上面了。接下来你可
94 | 以设置你的个人信息,token 或者其他等。这里不列举了。
95 | 万事开头难,加油。
96 |
97 | ###参考文章
98 | [GitHub 上的帮助文档](http://help.github.com/win-set-up-git/)
99 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-12-github-notes.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Git/SVN 常用命令笔记
4 | category: test
5 | ---
6 | # {{ page.title }}
7 | 2011-11-12 By PIZn @杭州
8 |
9 | 很久没有更新 GitHub 了,以至于那些熟悉的命令也忘记了。今天更新一下,最基础的一些
10 | 命令,以备以后翻阅。
11 | 加之最近工作团队需要,经常使用 SVN ,所有将 SVN 的常用命令也记在后面。以备后用。
12 |
13 | ####下载源码
14 | git clone xx@xx:/xxx.git
15 |
16 | ####更新源码
17 | git pull
18 |
19 | ####分支相关
20 | git branch --查看分支
21 | git checkout -b name --创建分支
22 |
23 | ####更新相关
24 | git add . -- 增加新的内容
25 | git commit -m '修改的信息' -- 提交的内容的信息
26 | git push -u origin master -- 将内容提交到主分支
27 |
28 | ####Git状态
29 | git status
30 |
31 | ####查看提交内容的差异
32 | git log -p -1(1是最新的一条)
33 |
34 | ###SVN相关
35 |
36 | ####将文件下载到本地
37 | svn checkout path(服务器上的目录)
38 | //简写 svn co
39 |
40 | ####往版本库添加新文件
41 | svn add file(文件名)
42 |
43 | ####提交文件到版本库
44 | svn commit -m 'logMassage' (文件名)
45 |
46 | ####加锁/解锁
47 | svn lock -m 'lockMessage' (文件名)
48 | svn unlock path
49 |
50 | ####更新到某个版本
51 | svn update -r m path -- m是版本号,path为文件名
52 | //简写 svn up
53 |
54 | ####查看文件或者目录状态
55 | svn status path
56 |
57 | ####删除文件
58 | svn delete path -m 'delete message'
59 | //简写 svn (del, remove, rm)
60 |
61 | ####查看日志
62 | svn log path
63 |
64 | ####比较差异
65 | svn diff 文件名
66 | //简写 svn di
67 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-15-use-disqus-for-your-post.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 为博客添加 DisQus 评论
4 | category: blog
5 | ---
6 | # {{ page.title }}
7 | 2011-11-15 By PIZn @杭州
8 |
9 | 昨晚小试了下 DisQus ,觉得很好用。做下总结。
10 |
11 | ###如何开始
12 |
13 | 首先,你需要有一个 DisQus 的账号,非常简单,有个邮箱就可以了。
14 | 当你注册一个邮箱之后,只有3个步骤,就能完成添加评论的功能。
15 |
16 | ####1,注册你的网站
17 |
18 | 需要填写的地方分别是:Site URL,Site Name,Site Shortname。
19 | 注意:这3个都是必须要填写的,而且,短域名将会在最后的 install 中使用到。
20 |
21 | ####2,一些简单的设置
22 |
23 | 在这里,你需要设置的是你的评论的语言(这里在你生成的代码中,会有一条语言格式的
24 | js请求);如果你有一些社交化工具,例如twitter,也可以填上;还有一些评论重要的选
25 | 项,例如过滤垃圾评论,回调评论等。
26 |
27 | ####3,将 DisQus 安装到你的网站。
28 |
29 | 选择你需要安装的类型。假如你是 wordpress 博客,那你就可以方便地使用一个插件就行
30 | 了。类似的还有其他很多种博客的插件。
31 | 假如没有你需要的,在下面还有一步“Universal Code”来安装。现在我的 GitHub 博客,
32 | 就是直接安装代码来完成的。
33 |
34 | ###如何安装
35 |
36 | 因为我还没试过其他插件式的安装,在这里就先讲一下如何安装源代码吧。说是安装,其实
37 | 也就是将一段 Js 代码嵌入到你的博客源代码里面。但也有很多地方需要注意的。
38 |
39 | ####在你开始之前
40 |
41 | 1, 你需要确定你已经注册了 DisQus
42 | 2, 有权限编辑网站上的代码
43 | 3, 获取你的短域名,就是上面说的那个 Shortname
44 |
45 | ####获取代码
46 |
47 | 很愉快的是,DisQus 已经为我们生成了这样的一段代码:
48 |
49 | <div id="disqus_thread"></div>
50 | <script type="text/javascript">
51 | var disqus_shortname = 'example'; // 注意,这里的 example 要替换为你自己的短域名
52 | /* * * 下面这些不需要改动 * * */
53 | (function() {
54 | var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
55 | dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
56 | (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
57 | })();
58 | </script>
59 | <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
60 | <a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
61 |
62 |
63 | ####嵌入到网页里面去
64 |
65 | 对于一般的博客来说,评论都是放在文章页面的。嗯。你懂的。
66 | 对于 GitHub Page 来说,你可以把上面这段代码,嵌入到你的 layout 里面的 post.html
67 | 里面,放在最后就好了。( 当然,每个人的命名方式不同,post 可以是 article 什么的。)
68 |
69 | ###完成了?
70 |
71 | 嗯,很简单的。基本完成了。
72 | 有些什么你需要关注的呢?
73 |
74 | ####还有其他功能的
75 |
76 | DisQus 还有其他功能的。例如你可以手动配置你的评论;例如你可以将评论计数加到你的
77 | 博客里面去。就如同上面一样,也是添加一段 Js 。
78 |
79 | ####不满意你的评论主题
80 |
81 | 假如你对 DisQus 的显示效果不是很满意的话,好像还有切换主题功能的(我还没看到,等
82 | 研究下)。再没有的话,写 CSS 覆盖掉吧。DisQus 返回的 Js 数据生成的 DOM 结构是不
83 | 变的,你可以像禅意花园一样去设计你喜欢的评论。
84 |
85 | ###我还关注的
86 |
87 | 为什么要使用 DisQus 呢?因为它可以统一管理很多个网站的评论,还可以做一些统计。而
88 | 且对于那些痛恨的 spam ,DisQus 也可以拦截掉,个人感觉很方便,使用起来也是不错的。
89 |
90 | 安装好了 DisQus 之后,虽然功能上实现了,但我觉得 Js 请求数还是稍微多了一些。不下
91 | 10条请求,网络不好的话,要使评论模块渲染出来还是比较久的等待时间。
92 |
93 | 我还想有个功能,就是关闭评论的功能,还没研究有没有。哈哈。
94 |
95 | Ok,今天到这,欢迎留言。
96 |
97 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-22-mac-git-and-github.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 在 mac 上使用 Git 和 GitHub 连接
4 | ---
5 | #{{ page.title }}
6 | 2011-11-22 By PIZn @杭州
7 |
8 | 记得之前写过一篇 win 下面使用 Git 的文章,今天写下一篇在 mac 下面的。
9 |
10 | ###首先,需要在 mac 下安装 git.
11 |
12 | mac git 的地址: http://code.google.com/p/git-osx-installer/ 由于可能这个网址访问
13 | 不了,所以需要使用源码安装。
14 |
15 | ###安装好了 Git 之后,就开始设置 GitHub 连接了。
16 |
17 | #####1, 检查是否存在 ssh keys
18 |
19 | $ cd ~/.ssh
20 |
21 | 如果没有 .ssh 目录,请跳到第 3 步。
22 |
23 | #####2, 如果有 .ssh 目录,请备份好你的 ssh key
24 |
25 | $ ls
26 | $ mkdir key_backup //创建备份文件夹
27 | $ cp id_rsa* key_backup //移动你的 key 文件到备份文件夹
28 | $ mr id_rsa*
29 |
30 |
31 | #####3, 创建一个新的 ssh key
32 |
33 | $ ssh-keygen -t rsa -C "your_email@youremail.com" //记得输入你的github账号的
34 | 邮箱
35 | //会输出下面语句
36 | Generating public/private rsa key pair.
37 | Enter file in which to save the keys
38 | (/Users/your_user_directory/.ssh/id_rsa): //这里需要按下 enter
39 | 键就好
40 |
41 |
42 | 按下 enter 之后,又会出现下面的提示:
43 |
44 | Enter passphrase(empty for no passphrase): //输入一个密
45 | 码
46 | Enter same passphrase again:
47 |
48 |
49 | 随后,你会收到一大串的提示,大概的意思是告诉你创建好了 id_rsa 和 id_rsa.pub 文件。
50 |
51 | #####4, 在 GitHub 上添加你的 ssh key
52 |
53 | 到刚刚的 .ssh 目录下,找到 id_rsa.pub 文件,拷贝里面的内容,输入到你的
54 | GitHub 账户中的 Add key 区域。
55 | 创建成功会有相应的提示。
56 |
57 | #####5, 验证你的 GitHub 连接
58 |
59 | $ ssh -T git@github.com
60 |
61 |
62 | 如果验证成功,会有下面的提示:
63 |
64 | Hi username! You have successfully authenticated, but GitHub does not provide shell access.
65 |
66 |
67 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-22-mac-macports.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: mac 安装 macPorts
4 | ---
5 | #{{ page.title }}
6 |
7 | 这里只介绍通过 Source 来安装的方法
8 |
9 | //下载 MacPorts
10 | wget http://distfiles.macports.org/MacPorts/MacPorts-1.9.2.tar.gz
11 | //解压
12 | tar zxvf MacPorts-1.9.2.tar.gz
13 | //到相应的文件里
14 | cd MacPorts-1.9.2
15 | //这行配置和安装
16 | ./configure && make && sudo make install
17 | //删除安装文件
18 | cd ../
19 | rm -rf MacPorts-1.9.2*
20 |
21 |
22 | ###MacPorts 的使用
23 |
24 | 更新 ports tree 和 MacPorts 版本
25 |
26 | sudo port -v selfupdate
27 |
28 |
29 | 搜索索引中的软件
30 |
31 | port search name //软件名
32 |
33 | 安装新软件
34 |
35 | sudo port install name
36 |
37 | 卸载软件
38 |
39 | sudo port uninstall name
40 |
41 | 查看更新的软件以及版本
42 |
43 | port outdated
44 |
45 | 升级可以更新的软件
46 |
47 | sudo port upgrade outdated
48 |
49 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-22-mac-wget.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: mac 上安装 wget
4 | ---
5 | #{{ page.title }}
6 |
7 | 1, 官网下载 wget, http://ftp.gnu.org/pub/gnu/wget/
8 |
9 | 2, 解压,终端到文件目录下执行 ./configure
10 |
11 | 3, sudo make install 完成
12 |
13 | 注:需要在有 xcode 的前提下。
14 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-22-xampp-security.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: mac 下 xampp 的安全设置
4 | ---
5 | #{{ page.title }}
6 | 2011-11-22 By PIZn @杭州
7 |
8 | 很早之前使用 xampp 是在 win 下面的,很多功能基本都是默认设置好的。今儿在 Mac 下
9 | 安装个 xampp ,随后遇到这样一个问题:
10 |
11 | The MySQL administrator has no password.
12 | The MySQL daemon is accessible via network.
13 |
14 | 默认的 MySQL 是没有设置密码的。恩,这点对于安全性来说很不好。
15 |
16 | 于是寻找解决的方法:
17 |
18 | 在终端下面执行这样的一句话:
19 |
20 | sudo /Applications/XAMPP/xamppfiles/xampp security
21 |
22 | 接着会提示着询问你是否输入密码,进而设置好你的 MySQL 安全性,还有 apache 密码,
23 | ftp 密码等。
24 |
25 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-24-hello-node.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Hello Node.js
4 | ---
5 | #{{ page.title }}
6 | 2011-11-24 By PIZn @杭州
7 |
8 | 在这里记下第一个 node.js
9 |
10 | var http = require('http');
11 | http.createServer(function (req, res) {
12 | res.writeHead(200, {
13 | 'Content-Type' : 'text/plain' });
14 | res.end('Hello Node.js\n');
15 | }).listen(8822, '127.0.0.1');
16 |
17 | console.log('Server running at http://127.0.0.1:8822/');
18 |
19 |
20 | 接着,在终端输入:
21 |
22 | node hello_node.js
23 | server running at http://127.0.0.1:8822/
24 |
25 |
26 | 最后到浏览器输入上面的路径,就可以看到了。恭喜恭喜。
27 |
28 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-24-install-nodejs.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 安装 node.js
4 | ---
5 | #{{ page.title }}
6 | 2011-11-24 By PIZn @杭州
7 |
8 | 今天开始折腾 Node.js. 第一步,如何安装。
9 |
10 | ###Mac 上的安装方法
11 |
12 | 如果你已经安装好了 homebrew ,直接在终端输入这样一个命令: brew install node
13 |
14 | 如果没有,可以采用下面的方法:
15 |
16 | 1. 安装 Xcode (开发者工具,里面有很多需要的软件包,最基础的一些环境等)
17 | 2. 安装 git2. 安装 git (之前已经有文章介绍过)
18 | 3. 在终端输入下面命令:
19 |
20 |
21 | git clone git://github.com/ry/node.git
22 | cd node
23 | ./configure
24 | make
25 | sudo make install
26 |
27 |
28 | 接着就可以通过后面的一个 Hello world 的例子来测试是否运行了。
29 |
30 | ###Ubuntu 上面的安装方法
31 |
32 | 1. 安装一些依赖包
33 |
34 | sudo apt-get install g++ curl libssl-dev apache2-utils
35 | sudo apt-git install git-core
36 |
37 |
38 | 2. 在终端下运行下面命令:
39 |
40 | git clone git://github.com/ry/node.git
41 | cd node
42 | ./configure
43 | make
44 | sudo make install
45 |
46 |
47 | 接着就可以通过后面的一个 Hello world 的例子来测试是否运行了。
48 |
49 | ###Windows 上面的安装方法
50 |
51 | 在 Windows 上,你得使用 cygwin 来安装 node,具体的安装方法如下:
52 |
53 | 1. 安装 cygwin
54 | 2. 点击 cygwin 里面的 setup.exe 来安装如下的包:
55 |
56 | * devel -> openssl
57 | * devel -> g++-gcc
58 | * devel -> make
59 | * python -> python
60 | * devel -> git
61 |
62 | 3. 依照 start -> cygwin -> cygwin bash shell 打开终端
63 | 4. 输入下面命令:
64 |
65 | git clone git://github.com/ry/node.git
66 | cd node
67 | ./configure
68 | make
69 | sudo make install
70 |
71 | 接着就可以通过后面的一个 Hello world 的例子来测试是否运行了。
72 |
73 | PS: 其实在 windows 下,还有其他的安装方法。具体百度一下就有。
74 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-25-DlHighlight-helpers-update.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 为 DlHighlight 的 Helpers 增加行数
4 | ---
5 | #{{ page.title }}
6 | 2011-11-25 By PIZn @杭州
7 |
8 | 今天下午在寻找一些合适的代码高亮 JS 插件,发现有几款挺不错的。于是下了下来看源代
9 | 码,折腾折腾了。
10 |
11 | 找到一个叫DlHighlight 的,目前只提供 XML ,XHTML ,JS ,CSS 4 种
13 | 语法高亮,感觉特别合适我。大爱啊。其生成方式也比较喜欢,通过载入 JS 来修改代码的
14 | 高亮形式。
15 |
16 | 只是, 一来发现其代码高亮的色彩搭配不是很喜欢,二来发现其提供了一个可以直接在
17 | domReady 的时候调用的辅助函数不是很完美,遂修改之。
18 |
19 | 主要修改的地方是让代码的行数显得更佳容易调控。通过置入开关 true 和 false 来实现
20 | ,好简单丫。
21 |
22 | 修改点,为 highlightByName 函数增加 switch 即可;
23 |
24 | highlightByName: function(name, tag, args, switch) {
25 | if(!switch)
26 | switch = false;
27 | if(!args)
28 | args = {};
29 | if(!tag)
30 | tag = "pre";
31 | var a = document.getElementsByTagName(tag);
32 | for (var i = a.length; --i >= 0;) {
33 | var el = a[i];
34 | if (el.getAttribute("name") == name) {
35 | var code = el._msh_text || getText(el);
36 | el._msh_text = code;
37 | args.leng = el.msh_type || el.className;
38 | el._msh_type = args.lang;
39 | args.lineNumbers = switch;
40 | var hl = new DlHighlight(args);
41 | code = hl.doItNow(code);
42 | if(DlHighlight.is_ie) {
43 | var div = document.createElement("div");
44 | div.innerHTML = "<pre>" + code + "</pre>";
45 | while (div.firstChild)
46 | el.appendChild(div.firstChild);
47 | } else
48 | el.innerHTML = code;
49 | el.className = "DlHighlight" + el.className;
50 | }
51 | }
52 | }
53 |
54 |
55 | OK,修改好之后,就可以这样来调用了:
56 |
57 |
58 | window.onload = function() {
59 | //最后一个参数 true 为打开行数,false 为关闭
60 | DlHighlight.HELPERS.highlighting('fooname', 'pre', '', true);
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-11-30-install-jekyll.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: mac 本地按安装 jekyll
4 | ---
5 | #{{ page.title }}
6 | 2011-11-30 By PIZn @杭州
7 |
8 | 本地安装 Jekyll 其实很简单的,继续做笔记。
9 |
10 | 如果你的本地已经安装了 gem ,那么你可以通过下面的方法来安装 jekyll , 在终端输入
11 | :
12 |
13 | gem install jekyll
14 |
15 | 如果你安装遇到问题,可能是本地 ruby 版本的原因,或者是 gem 没有升级。
16 | 安装 ruby 有很多方法:
17 |
18 | //apt-get
19 | sudo apt-get install ruby1.8-dev
20 | //brew
21 | brew install ruby
22 | //macport
23 | port install ruby
24 |
25 | 升级 gem :
26 |
27 | sudo gem update --system
28 |
29 |
30 | Ok, 安装完 jekyll 之后,你还需要安装 RDiscount,为什么需要呢?因为在 RDiscount
31 | 里面包含有 markdown 语法的包。
32 | 安装如下:
33 |
34 | sudo gem install rdiscount
35 |
36 |
37 | -- 完 --
38 |
--------------------------------------------------------------------------------
/VioletTheme/_posts/2011-12-02-hello-pizn-me.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: PIZn Blog 使用独立域名和 Blog Repo 相关事宜
4 | ---
5 | #{{ page.title }}
6 | 2011-12-02 By PIZn @杭州
7 |
8 | ###GitHub Pages 使用独立域名
9 |
10 | 恩,今天为自己的 GitHub 博客更换了新域名 www.pizn.me 更换的方法很简单:
11 |
12 | 1, 在你的 github 项目主目录下创建 CNAME 文件,里面输入你的域名地址:
13 |
14 | 例如: www.pizn.me
15 |
16 |
17 | 2, 管理你的域名 ip 地址:
18 |
19 | GitHub 提供的地址是:207.97.227.245
20 |
21 | ###关于 Blog Repo 的相关事宜
22 |
23 | 由于之前是直接在分支 gh-pages 上直接运行,所以根据 github pages 新建页面的一些路径限制,所以需要在源文件中加入 "/blog",以解决路径读取不到的问题。主要有以下几个地方:
24 |
25 | 1, css 和 js 的链接地址 (_layouts/default.html)
26 |
27 | 2, 主页文章列表和分页 (index.html)
28 |
29 | 3, 文章列表页 (archives.html)
30 |
31 | 4, 配置文件 (_config.yml)
32 |
33 | 因为修改了路径的原因,原先的 pizn.github.com/blog 页面基本是空白的。链接页点不进取。
34 |
35 | 由于新域名的启用,可能给您带来麻烦,多多包含。
36 |
37 | PS: 该 Blog 将换个新的模板主题,如果您很喜欢现在这个主题,请给我留言,我进一步完善她,独立成一个项目。
38 |
--------------------------------------------------------------------------------
/VioletTheme/_site/2010/09/22/Hello-world.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 | Hello world
17 |
18 |
19 |
20 |
21 |
26 |
27 |
28 |
29 | Hello world
30 |
31 | Hello world.
32 |
33 | This is my first md pages.
34 |
35 | « Back Home
36 |
37 |
38 |
39 |
40 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/VioletTheme/_site/2011/09/22/create-github-page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 | 在 github 上建立 pages 的过程
17 |
18 |
19 |
20 |
21 |
26 |
27 |
28 |
29 | 在 github 上建立 pages 的过程
30 |
31 | 2011-09-22 By PIZn @杭州
32 |
33 | 建立项目-Repository
34 |
35 | 首先在 GitHub 上建立自己库,例如一个 test 库;
36 | 接着在本地建立 test 库的连接:
37 |
38 | Global Setup:
39 |
40 | Set up git
41 | git config --global user.name "yourname"
42 | git config --global user.email "yourmail"
43 |
44 |
45 | Next steps:
46 |
47 | mkdir Test
48 | cd Test
49 | git init
50 | touch README
51 | git add README
52 | git commit -m 'first commit'
53 | git remote add origin git@github.com:yourname/Test.git
54 | git push -u origin master
55 |
56 |
57 | 通过在本地建立一个和 github 上相应的库,然后 push 上去,你随后可以在 github 上
58 | 自己的 test 库里面看到你建立了一个 README 文件。这时候你的本地就和 github 连接上
59 | 了。
60 |
61 | 创建页面-pages
62 |
63 | 进入 test 库,点击 Admin 菜单进入设置。这时候你就可以创建一个 page 了。创建的
64 | page 是一个页面,其路径为 http://yourname.github.com/test
65 | pages是怎么样的一个概念,你可以参考 <pages.github.com>
66 | 接着在本地创建相应的 pages 分支
67 |
68 | cd /path/to/fancypants
69 | git symbolic-ref HEAD refs/heads/gh-pages
70 | rm .git/index
71 | git clean -fdx
72 |
73 |
74 | 紧接着创建 gh-pages 分支并将内容提交到分支上
75 |
76 | echo "My GitHub Page" > index.html
77 | git add .
78 | git commit -a -m "First pages commit"
79 | git push origin gh-pages
80 |
81 |
82 | 因为我们在 github 上系统已经为我们生成了一个好的 index.html,但我们在本地建立了一
83 | 个,所以需要将本地的版本和线上的版本同步起来。
84 |
85 | //在本地:
86 | cd test
87 | //查看本地分支情况
88 | git branch
89 | //切换分支
90 | git checkout gh-pages
91 | //当你再次查看分支的时候,*号就会在 gh-pages 前面
92 | //更新本地
93 | git pull origin gh-pages
94 |
95 |
96 | 更新到本地之后,你就会看到你在 github 上的 index.html 文件
97 |
98 | //尝试着编辑,上传,更新看看
99 | vi index.html
100 | ⋯⋯
101 |
102 |
103 | 一些其他的内容
104 |
105 | 简单的更新本地代码到 github
106 |
107 | git add .
108 | git commit -m 'test'
109 | git push origin gh-pages
110 |
111 |
112 | jekyll 基本目录
113 |
114 | test
115 | |--- _layouts/
116 | |--- default.html
117 | |--- post.html
118 | |--- _posts/
119 | |--- 2011-09-22-title1
120 | |--- 2011-09-22-title2
121 | |--- css/
122 | |--- base.css
123 | |--- sytle.css
124 | |--- _config.yml
125 | |--- index.html
126 |
127 |
128 | 一些函数数
129 |
130 | //页面相关
131 | page.title
132 | page.content
133 | //内容
134 | content
135 | //文章相关
136 | post.title
137 | post.url
138 | post.date
139 | post.id
140 | post.categories
141 | post.tags
142 | post.tags
143 | post.content
144 |
145 |
146 | 一些对应的
147 |
148 | //一般都要
149 | ---
150 | layout: post
151 | title: Hello world
152 | ---
153 |
154 |
155 | 有待补充的
156 |
157 | ⋯⋯
158 |
159 | « Back Home
160 |
161 |
162 |
163 |
164 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/VioletTheme/_site/2011/09/23/markdown.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 | markdown 语法学习
17 |
18 |
19 |
20 |
21 |
26 |
27 |
28 |
29 | markdown 语法学习
30 |
31 | @杭州
32 |
33 | h 标题的写法
34 |
35 | #h1
36 | ##h2
37 | ######h6
38 |
39 |
40 | ul 和 li
41 |
42 |
68 |
69 |
70 |
71 |
72 |
73 | 格式 |
74 | 用法 |
75 | 示例 |
76 |
77 |
78 |
79 |
80 | h1标签
81 | | #标签 |
82 | #我是h1
83 | =========
84 | ## h2
85 | |
86 |
87 |
88 | ul标签
89 | | * 标签 |
90 | |
91 |
92 |
93 | Markdown 使用 email 形式的區塊引言
94 | 果你很熟悉如何在 email 信件中引言i
95 | 你就知
96 | 道怎麼在 Markdown 文件中建立一個區塊引言,那會看起來像是你強迫斷行,然後在每行的
97 | 最前面加
98 |
99 |
100 |
101 | « Back Home
102 |
103 |
104 |
105 |
106 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/VioletTheme/_site/css/default.css:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * Author: PIZn
4 | * Contact: pizner@gmail.com
5 | * This style sheet for viloet theme.
6 | *
7 | */
8 |
9 | /* 重置浏览器CSS */
10 | /* 防止用户自定义背景颜色对网页的影响 */
11 | html{
12 | color:#000;background:#fff;
13 | }
14 |
15 | /* 内外边距通常让各个浏览器样式的表现位置不同 */
16 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
17 | margin:0;padding:0;
18 | }
19 |
20 | /* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
21 | article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
22 | display:block;
23 | }
24 |
25 | /* 要注意表单元素并不继续父级 font 的问题 */
26 | body,button,input,select,textarea{
27 | font:12px/1.5 tahoma,arial,\5b8b\4f53;
28 | }
29 | input,select,textarea{
30 | font-size:100%;
31 | }
32 |
33 | /* 去掉各Table cell 的边距并让其边重合 */
34 | table{
35 | border-collapse:collapse;border-spacing:0;
36 | }
37 |
38 | /* IE bug fixed: th 不继承 text-align*/
39 | th{
40 | text-align:inherit;
41 | }
42 |
43 | /* 去除默认边框 */
44 | fieldset,img,a img{
45 | border:0;
46 | }
47 |
48 | /* ie6 7 8(q) bug 显示为行内表现 */
49 | iframe{
50 | display:block;
51 | }
52 |
53 | /* 去掉 firefox 下此元素的边框 */
54 | abbr,acronym{
55 | border:0;font-variant:normal;
56 | }
57 |
58 | /* 一致的 del 样式 */
59 | del {
60 | text-decoration:line-through;
61 | }
62 |
63 | address,caption,cite,code,dfn,em,th,var {
64 | font-style:normal;
65 | font-weight:500;
66 | }
67 |
68 | /* 去掉列表前的标识, li 会继承 */
69 | ol,ul {
70 | list-style:none;
71 | }
72 |
73 | /* 对齐是排版最重要的因素, 别让什么都居中 */
74 | caption,th {
75 | text-align:left;
76 | }
77 |
78 | /* 来自yahoo, 让标题都自定义, 适应多个系统应用 */
79 | h1,h2,h3,h4,h5,h6 {
80 | font-size:100%;
81 | font-weight:500;
82 | }
83 |
84 | q:before,q:after {
85 | content:'';
86 | }
87 |
88 | /* 统一上标和下标 */
89 | sup {
90 | vertical-align:text-top;
91 | }
92 | sub {
93 | vertical-align:text-bottom;
94 | }
95 |
96 | /* 让链接在 hover 状态下显示下划线 */
97 | a:hover {
98 | text-decoration:underline;
99 | }
100 |
101 | /* 默认显示下划线,保持页面简洁 */
102 | ins,a {
103 | text-decoration:none;
104 | }
105 |
106 | /* 清理浮动 */
107 | .fn-clear:after {
108 | visibility:hidden;
109 | display:block;
110 | font-size:0;
111 | content:" ";
112 | clear:both;
113 | height:0;
114 | }
115 | .fn-clear {
116 | zoom:1; /* for IE6 IE7 */
117 | }
118 |
119 | /* 隐藏, 通常用来与 JS 配合 */
120 | body .fn-hide {
121 | display:none;
122 | }
123 |
124 | /* 设置内联, 减少浮动带来的bug */
125 | .fn-left,.fn-right {
126 | display:inline;
127 | }
128 | .fn-left {
129 | float:left;
130 | }
131 | .fn-right {
132 | float:right;
133 | }
134 |
135 | /**
136 | *
137 | * default
138 | *
139 | */
140 | body {
141 | font-family: "Times New Roman", Times, serif;
142 | }
143 | a {
144 | color: #004d8d;
145 | }
146 | a:hover {
147 | color: #fefefe;
148 | background: #800888;
149 | }
150 |
151 | /**
152 | *
153 | * layout
154 | *
155 | */
156 | #head {
157 | width: 100%;
158 | height: 30px;
159 | background: #800888;
160 | background: -moz-linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%);
161 | background: -webkit-gradient(linear, top, top, color-stop(0%,#57025d), color-stop(30%, #800888), color-stop(100%,#800888));
162 | background: -webkit-linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%);
163 | background: -o-linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%);
164 | background: -ms-linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%);
165 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#57025d', endColorstr='#800888',GradientType=2 );
166 | -ms-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#57025d', endColorstr='#800888',GradientType=2 );
167 | background: linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%)
168 | }
169 | #header {
170 | width: 780px;
171 | height: 30px;
172 | margin: 0 auto;
173 | text-align: center;
174 | }
175 | #content {
176 | width: 100%;
177 | min-height: 500px;
178 | height: auto;
179 | background: #fff url(../images/bg.jpg) no-repeat -60px -10px;
180 | }
181 | #contenter {
182 | width: 760px;
183 | padding: 20px 10px;
184 | height: auto;
185 | margin: 0 auto;
186 | text-align: center;
187 | background-color:#fff;
188 | }
189 | #foot {
190 | width: 100%;
191 | height: 120px;
192 | }
193 | #footer {
194 | width: 760px;
195 | padding: 0 10px;
196 | height: 120px;
197 | margin: 0 auto;
198 | text-align: center;
199 | }
200 | /**
201 | *
202 | * header
203 | *
204 | */
205 | #header h1 {
206 | font-size: 16px;
207 | line-height: 30px;
208 | text-align: left;
209 | color: #fff;
210 | }
211 | #header h1 a {
212 | display: inline-block;
213 | padding: 0 15px;
214 | color: #fff;
215 | text-decoration: none;
216 | }
217 | #header h1 a:hover {
218 | text-decoration: none;
219 | background: #ac60b1;
220 | background: -moz-linear-gradient(top, #57025d 0%, #a933b1 30%, #a933b1 100%);
221 | background: -webkit-gradient(linear, top, top, color-stop(0%,#57025d), color-stop(30%, #a933b1), color-stop(100%,#a933b1));
222 | background: -webkit-linear-gradient(top, #57025d 0%, #a933b1 30%, #a933b1 100%);
223 | background: -o-linear-gradient(top, #57025d 0%, #a933b1 30%, #ac60b1 100%);
224 | background: -ms-linear-gradient(top, #57025d 0%, #a933b1 30%, #a933b1 100%);
225 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#57025d', endColorstr='#a933b1',GradientType=2 );
226 | -ms-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#57025d', endColorstr='#a933b1',GradientType=2 );
227 | background: linear-gradient(top, #57025d 0%, #a933b1 30%, #a933b1 100%)
228 | }
229 |
230 | /**
231 | *
232 | * contenter
233 | *
234 | */
235 | #prefile {
236 | height: 200px;
237 | background: url(../images/prefile.gif) no-repeat right 0;
238 | }
239 | #prefile h2 {
240 | float: left;
241 | width: 560px;
242 | font-size: 32px;
243 | color: #353535;
244 | text-align: left;
245 | }
246 | #prefile p {
247 | float: left;
248 | width: 560px;
249 | font-size: 18px;
250 | color: #898989;
251 | text-align: left;
252 | }
253 | #post-list {
254 | width: 560px;
255 | height: auto;
256 | text-align: left;
257 | }
258 | #post-list h3 {
259 | display: inline-block;
260 | margin: 0 0 1.2em 0;
261 | line-height: 32px;
262 | font-size: 22px;
263 | font-weight: 700;
264 | color: #5c9137;
265 | border-bottom: 1px solid #e9e9e9;
266 | }
267 | #post-list li {
268 | margin: 0.8em 0;
269 | line-height: 18px;
270 | }
271 | #post-list li span {
272 | font-family: Monaco,"Courier New",monospace;
273 | color: #686868;
274 | }
275 | #post-list li a {
276 | padding: 1px 5px;
277 | line-height: 16px;
278 | -moz-border-radius: 3px 3px;
279 | -webkit-border-raidus: 3px 3px;
280 | -o-border-radius: 3px 3px;
281 | border-radius: 3px 3px;
282 | font-size: 14px;
283 | }
284 | #post-list li a:hover {
285 | text-decoration: none;
286 | }
287 | #contenter .entry {
288 | text-align: left;
289 | }
290 |
291 | /**
292 | *
293 | * footer
294 | *
295 | */
296 | #footer h4 {
297 | margin: 0 0 1.2em 0;
298 | line-height: 32px;
299 | font-size: 22px;
300 | font-weight: 700;
301 | color: #5c9137;
302 | border-bottom: 1px solid #e9e9e9;
303 | text-align: left;
304 | }
305 | #footer a {
306 | display: block;
307 | float: left;
308 | margin: 0 20px 0 0;
309 | padding: 0 10px;
310 | line-height: 24px;
311 | font-size: 14px;
312 | background: #800888;
313 | color: #fff;
314 | -moz-border-radius: 3px 3px;
315 | -webkit-border-raidus: 3px 3px;
316 | -o-border-radius: 3px 3px;
317 | border-radius: 3px 3px;
318 | }
319 | #footer a:hover {
320 | text-decoration: none;
321 | background: #a933b1;
322 | }
323 |
324 |
325 | /**
326 | *
327 | * entry
328 | *
329 | */
330 | .entry {
331 | font-family: helvetica,arial,freesans,clean,sans-serif;
332 | color: #353535;
333 | }
334 | .entry h1,
335 | .entry h2,
336 | .entry h3,
337 | .entry h4,
338 | .entry h5,
339 | .entry h6 {
340 | margin: 0;
341 | padding: 0;
342 | color: #5c9137;
343 | }
344 | .entry h1 {
345 | font-size: 32px;
346 | line-height: normal;
347 | margin: 30px 0 0;
348 | padding: 10px 0 0;
349 | }
350 | .entry h2 {
351 | border-top: 3px solid #e5e5e5;
352 | font-size: 22px;
353 | line-height: normal;
354 | margin: 22px 0 0;
355 | padding: 7px 0 0;
356 | }
357 | .entry h3 {
358 | font-size: 18px;
359 | line-height: 26px;
360 | padding: 26px 0 0;
361 | }
362 | .entry h4 {
363 | font-size: 16px;
364 | font-weight: bold;
365 | line-height: 26px;
366 | padding: 18px 0 4px;
367 | text-transform: uppercase;
368 | }
369 | .entry h5 {
370 | font-size: 14px;
371 | font-weight: bold;
372 | line-height: 26px;
373 | padding: 14px 0 0;
374 | text-transform: uppercase;
375 | }
376 | .entry h6 {
377 | font-size: 14px;
378 | font-weight: normal;
379 | line-height: 26px;
380 | padding: 18px 0 0;
381 | }
382 | .entry > h2:first-child, .entry > h1:first-child, .entry > h1:first-child + h2 {
383 | border: 0 none;
384 | margin: 12px 0 0;
385 | padding: 10px 0 0;
386 | color: #383838;
387 | }
388 | .entry p {
389 | font-size: 14px;
390 | margin: 1.5em 0;
391 | line-height: 1.8em;
392 | text-indent: 28px;
393 | }
394 | .entry a {
395 | font-family: "Times New Roman", Times, serif;
396 | padding: 1px 5px;
397 | text-decoration: none;
398 | -moz-border-radius: 3px 3px;
399 | -webkit-border-radius: 3px 3px;
400 | -o-border-radius: 3px 3px;
401 | border-radius: 3px 3px;
402 | }
403 | .entry .back-home {
404 | text-indent: 0;
405 | }
406 | .entry > p:first-child {
407 | margin: 1em 0;
408 | text-indent: 0;
409 | }
410 | .entry ul,
411 | .entry ol {
412 | margin-left: 0.5em;
413 | margin-top: 0.5em;
414 | }
415 | .entry ul li,
416 | .entry ol li {
417 | font-size: 14px;
418 | color: #555;
419 | margin: 0.5em 0;
420 | }
421 | .entry ul li {
422 | list-style-type: square;
423 | }
424 | .entry ol li {
425 | list-style-type: decimal;
426 | }
427 | .entry > ul,
428 | .entry > ol {
429 | margin-left: 2.5em;
430 | margin-top: 1.5em;
431 | }
432 | .entry dl {
433 | margin: 0;
434 | padding: 20px 0 0;
435 | }
436 | .entry dl dt {
437 | font-size: 14px;
438 | font-weight: bold;
439 | line-height: normal;
440 | margin: 0;
441 | padding: 20px 0 0;
442 | }
443 | .entry dl dd {
444 | font-size: 14px;
445 | margin: 0;
446 | padding: 3px 0 0;
447 | }
448 | .entry blockquote {
449 | border-left: 4px solid #e5e5e5;
450 | color: #555;
451 | margin: 1em 0;
452 | padding-left: 0.8em;
453 | }
454 | .entry table {
455 | border-collapse: collapse;
456 | margin: 20px 0 0;
457 | padding: 0;
458 | border-top: 2px solid #a5a5a5;
459 | border-bottom: 2px solid #a5a5a5;
460 | }
461 | .entry * tr {
462 | background-color: #fff;
463 | border-top: 1px solid #ccc;
464 | margin: 0;
465 | padding: 0;
466 | }
467 |
468 | .entry * tr:nth-child(2n) {
469 | background: #f8f8f8;
470 | }
471 | .entry * tr th,
472 | .entry * tr td {
473 | border: 1px solid #ccc;
474 | margin: 0;
475 | padding: 5px 12px;
476 | text-align: left;
477 | color: #555;
478 | }
479 | .entry * tr th:first-child,
480 | .entry * tr td:first-child {
481 | border-left: none;
482 | }
483 | .entry * tr th:last-child,
484 | .entry * tr td:last-child {
485 | border-right: none;
486 | }
487 | .entry * tr th {
488 | font-weight: 700;
489 | }
490 | .entry em {
491 | font-size: 14px;
492 | font-style: italic;
493 | color: #555;
494 | }
495 | .entry pre {
496 | background: #f8f8f8;
497 | border: 1px solid #c5c5c5;
498 | -webkit-border-radius: 3px 3px 3px 3px;
499 | -moz-border-radius: 3px 3px 3px 3px;
500 | border-radius: 3px 3px 3px 3px;
501 | font-size: 12px;
502 | line-height: 18px;
503 | overflow: auto;
504 | padding: 6px 10px;
505 | }
506 | .entry > pre {
507 | margin: 20px 0 0;
508 | }
509 | .entry pre code {
510 | background-color: transparent;
511 | border: medium none;
512 | }
513 | .entry .wp-caption {
514 | background: #f8f8f8;
515 | margin-bottom: 1.6em;
516 | padding: 6px 6px;
517 | max-width: 96%;
518 | text-align: center;
519 | }
520 | .entry .alignright {
521 | display: inline;
522 | float: right;
523 | margin-left: 1.6em;
524 | margin-top: 1.6em;
525 | }
526 | .entry .aligncenter {
527 | clear: both;
528 | display: block;
529 | margin-left: auto;
530 | margin-right: auto;
531 | }
532 | .entry .alignleft {
533 | display: inline;
534 | float: left;
535 | margin-right: 1.6em;
536 | }
537 | .entry .wp-caption img {
538 | border: 2px solid #a5a5a5;
539 | display: block;
540 | margin: 0 auto;
541 | max-width: 98%;
542 | }
543 | .entry img[class*="align"],
544 | .entry img[class*="wp-image-"] {
545 | border: 1px solid #c5c5c5;
546 | padding: 2px 2px;
547 | height: auto;
548 | background: #d5d5d5;
549 | }
550 | .entry a:hover img {
551 | border-color: #a5a5a5;
552 | }
553 | .entry .wp-caption-text {
554 | margin-bottom: 0.5em;
555 | font-family: Georgia, serif;
556 | font-size: 12px;
557 | color: #555;
558 | }
559 |
560 |
--------------------------------------------------------------------------------
/VioletTheme/_site/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/VioletTheme/_site/favicon.ico
--------------------------------------------------------------------------------
/VioletTheme/_site/images/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/VioletTheme/_site/images/bg.jpg
--------------------------------------------------------------------------------
/VioletTheme/_site/images/prefile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/VioletTheme/_site/images/prefile.gif
--------------------------------------------------------------------------------
/VioletTheme/_site/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 | index | pizn's github blog
17 |
18 |
19 |
20 |
21 |
26 |
27 |
28 |
32 |
33 | My Github Posts List
34 |
35 |
36 | - 23 Sep 2011 » markdown 语法学习
37 |
38 | - 22 Sep 2011 » 在 github 上建立 pages 的过程
39 |
40 | - 22 Sep 2010 » Hello world
41 |
42 |
43 |
44 |
45 |
46 |
47 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/VioletTheme/archives.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Archives
4 | ---
5 |
6 | {{ page.title }}( {{ site.posts | size }} posts. )
7 |
8 | {% for post in site.posts %}
9 | {% capture month %}
10 | wwwww
11 | {% endcapture %}
12 | - {{ post.date | date_to_string }} » {{ post.title }}
13 | {% endfor %}
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/VioletTheme/atom.xml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: nil
3 | ---
4 |
5 |
6 |
7 | {{ site.title }}
8 |
9 |
10 | {{ site.time | date_to_xmlschema }}
11 | {{ site.url }}
12 |
13 | {{ site.author.name }}
14 | {{ site.author.email }}
15 |
16 |
17 | {% for post in site.posts limit:10 %}
18 |
19 | {{ post.title }}
20 |
21 | {{ post.date | date_to_xmlschema }}
22 | http://pizn.github.com/blog{{ post.id }}
23 | {{ post.content | xml_escape }}
24 |
25 | {% endfor %}
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/VioletTheme/css/cc-knight.css:
--------------------------------------------------------------------------------
1 | /* Generics */
2 | /*
3 | body {
4 | font-family: Monaco,serif;
5 | font-size: 12px;
6 | color: #ababab;
7 | width: 899px;
8 | overflow: auto;
9 |
10 | }*/
11 | .DlHighlight {
12 | width: 100%;
13 | background-color: #1b1d1e;
14 | font: 10pt Monaco,serif;
15 | padding: 4px 0;
16 | overflow: auto;
17 | }
18 |
19 | .DlHighlight pre { margin: 0; padding: 0; }
20 |
21 | .DlHighlight .operand { color: #e8f8f2; }
22 | .DlHighlight .keyword { color: #65d7ed; }
23 |
24 | .DlHighlight .builtin { color: #a19; }
25 |
26 | .DlHighlight .string { color: #f8f0c3; }
27 | .DlHighlight .string .before, .DlHighlight .string .after { color: #ababab; }
28 |
29 | .DlHighlight .regexp { color: #394b56; }
30 | .DlHighlight .regexp .before, .DlHighlight .regexp .after { color: #394b56; font-weight: bold; }
31 |
32 | .DlHighlight .comment { color: #394b56; }
33 | .DlHighlight .comment .before, .DlHighlight .comment .after { color: #394b56; }
34 |
35 | .DlHighlight .hashkey { color: #a6e22e; }
36 |
37 | .DlHighlight .hasharrow { color: #f00; }
38 |
39 | .DlHighlight .paren { color: #fd8b1f;}
40 |
41 | .DlHighlight .operator { color: #e8f8f2; }
42 |
43 | .DlHighlight .error { background-color: #c00; color: #fff; }
44 |
45 | .DlHighlight .defun { color: #e6db70; }
46 |
47 | .DlHighlight .line-numbers {
48 | float: left;
49 | width: 3em;
50 | text-align: center;
51 | color: #bcbcbc;
52 | background: #2f2f2f;
53 | margin-right: 5px;
54 | font: 0.9em Monaco,serif;
55 | padding-top: 0.08em;
56 | }
57 |
58 | /* XML */
59 | .DlHighlight .xml-tag-open, .DlHighlight .xml-tag-close { color: #A6E22E; }
60 | .DlHighlight .xml-tag-close .before { color: #F59320; }
61 | .DlHighlight .xml-tagangle { color: #ABABAB; }
62 | .DlHighlight .xml-attribute { color: #F59320; }
63 |
64 | .DlHighlight .xml-entity { color: #A6E22E; }
65 | .DlHighlight .xml-entity .before, .DlHighlight .xml-entity .after { color: #607; }
66 |
67 | /* CSS */
68 | .DlHighlight .css-element { color: #e9ce6f; }
69 | .DlHighlight .css-class { color: #a6e22e;}
70 | .DlHighlight .css-pseudo-class { color: #777; }
71 | .DlHighlight .css-id { font-weight: bold; }
72 | .DlHighlight .css-color-spec { color: #f8f0c3; }
73 | .DlHighlight .css-length { color: #a19; }
74 | .DlHighlight .css-length .after { font-weight: bold; }
75 | .DlHighlight .css-keyword { color: #f59320; }
76 | .DlHighlight .css-keyword .after { color: #ababab; }
77 | .DlHighlight .css-attribute { color: #60bbca; }
78 | .DlHighlight .css-comma { color: red; }
79 | .DlHighlight .css-url { color: #a6e22e; }
80 | .DlHighlight .css-brack-open { color: #ae81ff; }
81 | .DlHighlight .css-brack-close { color: #ae81ff; }
82 | .DlHighlight .css-end { color: #ababab; }
83 |
--------------------------------------------------------------------------------
/VioletTheme/css/default.css:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * Author: PIZn
4 | * Contact: pizner@gmail.com
5 | * This style sheet for viloet theme.
6 | *
7 | */
8 |
9 | /* 重置浏览器CSS */
10 | /* 防止用户自定义背景颜色对网页的影响 */
11 | html{
12 | color:#000;background:#fff;
13 | }
14 |
15 | /* 内外边距通常让各个浏览器样式的表现位置不同 */
16 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
17 | margin:0;padding:0;
18 | }
19 |
20 | /* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
21 | article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
22 | display:block;
23 | }
24 |
25 | /* 要注意表单元素并不继续父级 font 的问题 */
26 | body,button,input,select,textarea{
27 | font:12px/1.5 tahoma,arial,\5b8b\4f53;
28 | }
29 | input,select,textarea{
30 | font-size:100%;
31 | }
32 |
33 | /* 去掉各Table cell 的边距并让其边重合 */
34 | table{
35 | border-collapse:collapse;border-spacing:0;
36 | }
37 |
38 | /* IE bug fixed: th 不继承 text-align*/
39 | th{
40 | text-align:inherit;
41 | }
42 |
43 | /* 去除默认边框 */
44 | fieldset,img,a img{
45 | border:0;
46 | }
47 |
48 | /* ie6 7 8(q) bug 显示为行内表现 */
49 | iframe{
50 | display:block;
51 | }
52 |
53 | /* 去掉 firefox 下此元素的边框 */
54 | abbr,acronym{
55 | border:0;font-variant:normal;
56 | }
57 |
58 | /* 一致的 del 样式 */
59 | del {
60 | text-decoration:line-through;
61 | }
62 |
63 | address,caption,cite,code,dfn,em,th,var {
64 | font-style:normal;
65 | font-weight:500;
66 | }
67 |
68 | /* 去掉列表前的标识, li 会继承 */
69 | ol,ul {
70 | list-style:none;
71 | }
72 |
73 | /* 对齐是排版最重要的因素, 别让什么都居中 */
74 | caption,th {
75 | text-align:left;
76 | }
77 |
78 | /* 来自yahoo, 让标题都自定义, 适应多个系统应用 */
79 | h1,h2,h3,h4,h5,h6 {
80 | font-size:100%;
81 | font-weight:500;
82 | }
83 |
84 | q:before,q:after {
85 | content:'';
86 | }
87 |
88 | /* 统一上标和下标 */
89 | sup {
90 | vertical-align:text-top;
91 | }
92 | sub {
93 | vertical-align:text-bottom;
94 | }
95 |
96 | /* 让链接在 hover 状态下显示下划线 */
97 | a:hover {
98 | text-decoration:underline;
99 | }
100 |
101 | /* 默认显示下划线,保持页面简洁 */
102 | ins,a {
103 | text-decoration:none;
104 | }
105 |
106 | /* 清理浮动 */
107 | .fn-clear:after {
108 | visibility:hidden;
109 | display:block;
110 | font-size:0;
111 | content:" ";
112 | clear:both;
113 | height:0;
114 | }
115 | .fn-clear {
116 | zoom:1; /* for IE6 IE7 */
117 | }
118 |
119 | /* 隐藏, 通常用来与 JS 配合 */
120 | body .fn-hide {
121 | display:none;
122 | }
123 |
124 | /* 设置内联, 减少浮动带来的bug */
125 | .fn-left,.fn-right {
126 | display:inline;
127 | }
128 | .fn-left {
129 | float:left;
130 | }
131 | .fn-right {
132 | float:right;
133 | }
134 |
135 | /**
136 | *
137 | * default
138 | *
139 | */
140 | body {
141 | font-family: "Times New Roman", Times, serif;
142 | }
143 | a {
144 | color: #004d8d;
145 | }
146 | a:hover {
147 | color: #fefefe;
148 | background: #800888;
149 | }
150 |
151 | /**
152 | *
153 | * layout
154 | *
155 | */
156 | #head {
157 | width: 100%;
158 | height: 30px;
159 | background: #800888;
160 | background: -moz-linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%);
161 | background: -webkit-gradient(linear, top, top, color-stop(0%,#57025d), color-stop(30%, #800888), color-stop(100%,#800888));
162 | background: -webkit-linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%);
163 | background: -o-linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%);
164 | background: -ms-linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%);
165 | background: linear-gradient(top, #57025d 0%, #800888 30%, #800888 100%)
166 | }
167 | #header {
168 | width: 780px;
169 | height: 30px;
170 | margin: 0 auto;
171 | text-align: center;
172 | }
173 | #content {
174 | width: 100%;
175 | min-height: 500px;
176 | height: auto;
177 | background: #fff url(../images/bg.jpg) no-repeat -60px -10px;
178 | }
179 | #contenter {
180 | width: 760px;
181 | padding: 20px 10px;
182 | height: auto;
183 | margin: 0 auto;
184 | text-align: center;
185 | background-color:#fff;
186 | overflow: auto;
187 | }
188 | #foot {
189 | width: 100%;
190 | height: 120px;
191 | }
192 | #footer {
193 | width: 760px;
194 | padding: 0 10px;
195 | height: 120px;
196 | margin: 0 auto;
197 | text-align: center;
198 | }
199 | /**
200 | *
201 | * header
202 | *
203 | */
204 | #header .nav {
205 | float: left;
206 | display: inline-block;
207 | font-size: 16px;
208 | line-height: 30px;
209 | color: #fff;
210 | }
211 | #header a {
212 | display: inline-block;
213 | padding: 0 15px;
214 | color: #fff;
215 | text-decoration: none;
216 | }
217 | #header a:hover {
218 | text-decoration: none;
219 | background: #ac60b1;
220 | background: -moz-linear-gradient(top, #57025d 0%, #a933b1 30%, #a933b1 100%);
221 | background: -webkit-gradient(linear, top, top, color-stop(0%,#57025d), color-stop(30%, #a933b1), color-stop(100%,#a933b1));
222 | background: -webkit-linear-gradient(top, #57025d 0%, #a933b1 30%, #a933b1 100%);
223 | background: -o-linear-gradient(top, #57025d 0%, #a933b1 30%, #ac60b1 100%);
224 | background: -ms-linear-gradient(top, #57025d 0%, #a933b1 30%, #a933b1 100%);
225 | background: linear-gradient(top, #57025d 0%, #a933b1 30%, #a933b1 100%)
226 | }
227 |
228 | /**
229 | *
230 | * contenter
231 | *
232 | */
233 | #prefile {
234 | height: 200px;
235 | background: url(../images/prefile.gif) no-repeat right 0;
236 | }
237 | #prefile h2 {
238 | float: left;
239 | width: 560px;
240 | font-size: 32px;
241 | color: #353535;
242 | text-align: left;
243 | }
244 | #prefile p {
245 | float: left;
246 | width: 560px;
247 | font-size: 18px;
248 | color: #898989;
249 | text-align: left;
250 | }
251 | #post-list {
252 | width: 560px;
253 | height: auto;
254 | text-align: left;
255 | float: left;
256 | }
257 | #post-list h3 {
258 | display: inline-block;
259 | margin: 0 0 1.2em 0;
260 | line-height: 32px;
261 | font-size: 22px;
262 | font-weight: 700;
263 | color: #5c9137;
264 | border-bottom: 1px solid #e9e9e9;
265 | }
266 | #post-list h3 span {
267 | display: inline-block;
268 | padding: 0 10px;
269 | font-size: 14px;
270 | color: #686868;
271 | font-weight: normal;
272 | }
273 | #post-list li {
274 | margin: 0.8em 0;
275 | line-height: 18px;
276 | }
277 | #post-list li span {
278 | font-family: Monaco,"Courier New",monospace;
279 | color: #686868;
280 | }
281 | #post-list li a {
282 | padding: 1px 5px;
283 | line-height: 16px;
284 | -moz-border-radius: 3px 3px;
285 | -webkit-border-raidus: 3px 3px;
286 | -o-border-radius: 3px 3px;
287 | border-radius: 3px 3px;
288 | font-size: 14px;
289 | }
290 | #post-list li a:hover {
291 | text-decoration: none;
292 | }
293 | #post-list p {
294 | margin: 1em 0 0;
295 | padding-left: 5px;
296 | font-family: Monaco,"Courier New",monospace;
297 | font-size: 12px;
298 | line-height: 24px;
299 | color: #383838;
300 | border-left: 3px solid #e8e8e8;
301 | }
302 | #post-list p span {
303 | color: #5c9137;
304 | }
305 | #post-list.change-log {
306 | width: 770px;
307 | }
308 | #pagination {
309 | margin: 15px 0 10px 0;
310 | width: 100%;
311 | padding: 5px 0;
312 | font-family: Monaco, "Courier New", monospace;
313 | border-top: 1px solid #e8e8e8;
314 | overflow: auto;
315 | }
316 | #pagination a {
317 | font-family: Monaco, "Courier New", monospace;
318 | padding: 1px 5px;
319 | -moz-border-radius: 3px 3px;
320 | -webkit-border-raidus: 3px 3px;
321 | -o-border-radius: 3px 3px;
322 | border-radius: 3px 3px;
323 | }
324 | #pagination a:hover {
325 | text-decoration: none;
326 | }
327 | #pagination span.num {
328 | padding: 1px 5px;
329 | -moz-border-radius: 3px 3px;
330 | -webkit-border-raidus: 3px 3px;
331 | -o-border-radius: 3px 3px;
332 | border-radius: 3px 3px;
333 | color: #fefefe;
334 | background: #5c9137;
335 | }
336 | #pagination .pages {
337 | float: left;
338 | color: #686868;
339 | }
340 | #pagination .prev {
341 | display: inline-block;
342 | float: left;
343 | }
344 | #pagination .next {
345 | display: inline-block;
346 | float: right;
347 | }
348 | #pagination .paginator-list {
349 | float: left;
350 | }
351 | #contenter .entry {
352 | text-align: left;
353 | }
354 |
355 | /**
356 | *
357 | * footer
358 | *
359 | */
360 | #footer h4 {
361 | margin: 0 0 1.2em 0;
362 | line-height: 32px;
363 | font-size: 22px;
364 | font-weight: 700;
365 | color: #5c9137;
366 | border-bottom: 1px solid #e9e9e9;
367 | text-align: left;
368 | }
369 | #footer .my-link {
370 | float: left;
371 | margin-top: 10px;
372 | width: 400px;
373 | height: 40px;
374 | }
375 | #footer .my-link a {
376 | display: block;
377 | float: left;
378 | margin: 0 20px 0 0;
379 | padding: 0 10px;
380 | line-height: 24px;
381 | font-size: 14px;
382 | background: #800888;
383 | color: #fff;
384 | -moz-border-radius: 3px 3px;
385 | -webkit-border-raidus: 3px 3px;
386 | -o-border-radius: 3px 3px;
387 | border-radius: 3px 3px;
388 | }
389 | #footer .my-link a:hover {
390 | text-decoration: none;
391 | background: #a933b1;
392 | }
393 | #footer .copyright {
394 | float: right;
395 | width: 300px;
396 | height: 50px;
397 | text-align: right;
398 | }
399 | #footer .copyright p {
400 | font-family: Arial, sans-serif;
401 | line-height: 18px;
402 | font-size: 12px;
403 | color: #a8a8a8;
404 | }
405 | #footer .copyright a {
406 | padding: 1px 5px;
407 | -moz-border-radius: 3px 3px;
408 | -webkit-border-raidus: 3px 3px;
409 | -o-border-radius: 3px 3px;
410 | border-radius: 3px 3px;
411 | }
412 | #footer .copyright a:hover {
413 | text-decoration: none;
414 | }
415 |
416 |
417 | /**
418 | *
419 | * entry
420 | *
421 | */
422 | .entry {
423 | font-family: helvetica,arial,freesans,clean,sans-serif;
424 | color: #353535;
425 | }
426 | .entry h1,
427 | .entry h2,
428 | .entry h3,
429 | .entry h4,
430 | .entry h5,
431 | .entry h6 {
432 | margin: 0;
433 | padding: 0;
434 | color: #5c9137;
435 | }
436 | .entry h1 {
437 | font-size: 32px;
438 | line-height: normal;
439 | margin: 30px 0 0;
440 | padding: 10px 0 0;
441 | }
442 | .entry h2 {
443 | border-top: 3px solid #e5e5e5;
444 | font-size: 22px;
445 | line-height: normal;
446 | margin: 22px 0 0;
447 | padding: 7px 0 0;
448 | }
449 | .entry h3 {
450 | font-size: 18px;
451 | line-height: 26px;
452 | padding: 26px 0 0;
453 | }
454 | .entry h4 {
455 | font-size: 16px;
456 | font-weight: bold;
457 | line-height: 26px;
458 | padding: 18px 0 4px;
459 | text-transform: uppercase;
460 | }
461 | .entry h5 {
462 | font-size: 14px;
463 | font-weight: bold;
464 | line-height: 26px;
465 | padding: 14px 0 0;
466 | text-transform: uppercase;
467 | }
468 | .entry h6 {
469 | font-size: 14px;
470 | font-weight: normal;
471 | line-height: 26px;
472 | padding: 18px 0 0;
473 | }
474 | .entry > h2:first-child, .entry > h1:first-child, .entry > h1:first-child + h2 {
475 | border: 0 none;
476 | margin: 12px 0 0;
477 | padding: 10px 0 0;
478 | color: #383838;
479 | }
480 | .entry p {
481 | font-size: 14px;
482 | margin: 1.5em 0;
483 | line-height: 1.8em;
484 | }
485 | .entry a {
486 | font-family: "Times New Roman", Times, serif;
487 | padding: 1px 5px;
488 | text-decoration: none;
489 | -moz-border-radius: 3px 3px;
490 | -webkit-border-radius: 3px 3px;
491 | -o-border-radius: 3px 3px;
492 | border-radius: 3px 3px;
493 | }
494 | .entry .back-home {
495 | text-indent: 0;
496 | }
497 | .entry > p:first-child {
498 | margin: 1em 0;
499 | text-indent: 0;
500 | }
501 | .entry ul,
502 | .entry ol {
503 | margin-left: 0.5em;
504 | margin-top: 0.5em;
505 | }
506 | .entry ul li,
507 | .entry ol li {
508 | font-size: 14px;
509 | color: #555;
510 | margin: 0.5em 0;
511 | }
512 | .entry ul li {
513 | list-style-type: square;
514 | }
515 | .entry ol li {
516 | list-style-type: decimal;
517 | }
518 | .entry > ul,
519 | .entry > ol {
520 | margin-left: 2.5em;
521 | margin-top: 1.5em;
522 | }
523 | .entry dl {
524 | margin: 0;
525 | padding: 20px 0 0;
526 | }
527 | .entry dl dt {
528 | font-size: 14px;
529 | font-weight: bold;
530 | line-height: normal;
531 | margin: 0;
532 | padding: 20px 0 0;
533 | }
534 | .entry dl dd {
535 | font-size: 14px;
536 | margin: 0;
537 | padding: 3px 0 0;
538 | }
539 | .entry blockquote {
540 | border-left: 4px solid #e5e5e5;
541 | color: #555;
542 | margin: 1em 0;
543 | padding-left: 0.8em;
544 | }
545 | .entry table {
546 | border-collapse: collapse;
547 | margin: 20px 0 0;
548 | padding: 0;
549 | border-top: 2px solid #a5a5a5;
550 | border-bottom: 2px solid #a5a5a5;
551 | }
552 | .entry * tr {
553 | background-color: #fff;
554 | border-top: 1px solid #ccc;
555 | margin: 0;
556 | padding: 0;
557 | }
558 |
559 | .entry * tr:nth-child(2n) {
560 | background: #f8f8f8;
561 | }
562 | .entry * tr th,
563 | .entry * tr td {
564 | border: 1px solid #ccc;
565 | margin: 0;
566 | padding: 5px 12px;
567 | text-align: left;
568 | color: #555;
569 | }
570 | .entry * tr th:first-child,
571 | .entry * tr td:first-child {
572 | border-left: none;
573 | }
574 | .entry * tr th:last-child,
575 | .entry * tr td:last-child {
576 | border-right: none;
577 | }
578 | .entry * tr th {
579 | font-weight: 700;
580 | }
581 | .entry em {
582 | font-size: 14px;
583 | font-style: italic;
584 | color: #555;
585 | }
586 | .entry pre {
587 | font-family: Monaco,serif;
588 | color: #ababab;
589 | overflow: auto;
590 | -webkit-border-radius: 3px 3px 3px 3px;
591 | -moz-border-radius: 3px 3px 3px 3px;
592 | border-radius: 3px 3px 3px 3px;
593 | border: 1px solid #d0d0d0;
594 | _border: none;
595 | }
596 | .entry .wp-caption {
597 | background: #f8f8f8;
598 | margin-bottom: 1.6em;
599 | padding: 6px 6px;
600 | max-width: 96%;
601 | text-align: center;
602 | }
603 | .entry .alignright {
604 | display: inline;
605 | float: right;
606 | margin-left: 1.6em;
607 | margin-top: 1.6em;
608 | }
609 | .entry .aligncenter {
610 | clear: both;
611 | display: block;
612 | margin-left: auto;
613 | margin-right: auto;
614 | }
615 | .entry .alignleft {
616 | display: inline;
617 | float: left;
618 | margin-right: 1.6em;
619 | }
620 | .entry .wp-caption img {
621 | border: 2px solid #a5a5a5;
622 | display: block;
623 | margin: 0 auto;
624 | max-width: 98%;
625 | }
626 | .entry img[class*="align"],
627 | .entry img[class*="wp-image-"] {
628 | border: 1px solid #c5c5c5;
629 | padding: 2px 2px;
630 | height: auto;
631 | background: #d5d5d5;
632 | }
633 | .entry a:hover img {
634 | border-color: #a5a5a5;
635 | }
636 | .entry .wp-caption-text {
637 | margin-bottom: 0.5em;
638 | font-family: Georgia, serif;
639 | font-size: 12px;
640 | color: #555;
641 | }
642 |
643 |
--------------------------------------------------------------------------------
/VioletTheme/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/VioletTheme/favicon.ico
--------------------------------------------------------------------------------
/VioletTheme/images/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/VioletTheme/images/bg.jpg
--------------------------------------------------------------------------------
/VioletTheme/images/prefile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/VioletTheme/images/prefile.gif
--------------------------------------------------------------------------------
/VioletTheme/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | titlef: index
4 | ---
5 |
9 |
10 | My GitHub Posts List
11 |
12 | {% for post in paginator.posts %}
13 | - {{ post.date | date_to_string }} » {{ post.title }}
14 | {% endfor %}
15 |
16 | {% if paginator.total_pages > 1 %}
17 |
29 | {% endif %}
30 |
31 |
--------------------------------------------------------------------------------
/VioletTheme/js/colorcode.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @name: ColorCode
3 | * @descript: 1, base on DlHightlight(Mihai Bazon, http://mihai.bazon.net/blog)
4 | * 2, fix IE bug
5 | * 3, set more for lang-css.js
6 | * 4, change the style
7 | * @author: pizn( zhanxin.lin , http://pizn.net)
8 | * @other: Thanks to Mihai Bazon's DlHghtlight.
9 | **/
10 |
11 | /**
12 | * @name: base DlHighlight
13 | * @author: Mihai Bazon
14 | */
15 | var DlHighlight;
16 |
17 | (function(){
18 |
19 | var H = DlHighlight = function(args) {
20 | var self = this;
21 | this.args = {};
22 | function D(name, val) {
23 | if (name in args)
24 | val = args[name];
25 | self.args[name] = val;
26 | };
27 | D("replaceTabs", null);
28 | D("lineNumbers", false);
29 | D("noTrim", false);
30 | D("showWhitespace", false);
31 | var lang = this.lang = H.LANG[args.lang];
32 | this.tokenParsers = lang.tokens.slice(0).reverse();
33 | if (this.args.replaceTabs != null) {
34 | var tab = " ";
35 | while (--this.args.replaceTabs > 0)
36 | tab += " ";
37 | this.args.replaceTabs = tab;
38 | }
39 | };
40 |
41 | H.is_ie = /MSIE/.test(navigator.userAgent) && !/Gecko|KHTML|Opera/.test(navigator.userAgent);
42 |
43 | // definitions useful for most languages out there
44 | H.BASE = {
45 |
46 | COMMENT_CPP : function(txt) {
47 | if (txt.charAt(0) == "/" && txt.charAt(1) == "/") {
48 | var nl = txt.indexOf("\n");
49 | if (nl == -1)
50 | nl = txt.length;
51 | var c = this.lang.onComment.call(this, this._he(txt.substring(2, nl)));
52 | return {
53 | content : { escaped: c },
54 | style : "comment comment-line",
55 | type : "comment",
56 | index : nl,
57 | before : "//"
58 | };
59 | }
60 | },
61 |
62 | COMMENT_C : function(txt) {
63 | if (txt.charAt(0) == "/" && txt.charAt(1) == "*") {
64 | var nl = txt.indexOf("*/"), c, index = nl;
65 | if (nl == -1)
66 | nl = index = txt.length;
67 | else
68 | index += 2;
69 | c = this.lang.onComment.call(this, this._he(txt.substring(2, nl)));
70 | c = c.replace(/^\s*[*\\|]+/mg, function(s) {
71 | return "" + s + "";
72 | });
73 | return {
74 | content : { escaped: c },
75 | before : "/*",
76 | after : "*/",
77 | index : index,
78 | style : "comment comment-multiline",
79 | type : "comment"
80 | };
81 |
82 | }
83 | },
84 |
85 | STRING : {
86 | regexp : /^(\x22(\\.|[^\x22\\])*\x22|\x27(\\.|[^\x27\\])*\x27)/g,
87 | content : function(m) {
88 | m = m[1];
89 | m = m.substr(1, m.length - 2);
90 | if (this.args.showWhitespace)
91 | m = m.replace(/\x20/g, "_");
92 | return m;
93 | },
94 | before : function(m) { return m[1].charAt(0); },
95 | after : function(m) { return m[1].charAt(0); },
96 | type : "string",
97 | style : "string"
98 | },
99 |
100 | PAREN : {
101 | regexp : /^[\](){}\[]/g,
102 | content : 0,
103 | type : "paren",
104 | style : "paren"
105 | },
106 |
107 | OPERATOR : function(txt) {
108 | var m = /^[<>!+=%&*\x2f|?:-]+/.exec(txt);
109 | if (m && m[0] != "!/") return {
110 | content : m[0],
111 | index : m.lastIndex,
112 | type : "operator",
113 | style : "operator"
114 | };
115 | }
116 |
117 | };
118 |
119 | H.prototype = {
120 |
121 | formatToken : function(tok) {
122 | var cls = tok.style, html = buffer();
123 | if (cls instanceof Array)
124 | cls = cls.join(" ");
125 | html("");
126 | if (tok.before)
127 | html("", this._he(tok.before), "");
128 | html(this._he(tok.content));
129 | if (tok.after)
130 | html("", this._he(tok.after), "");
131 | html("");
132 | return html.get();
133 | },
134 |
135 | formatUnknown : function(txt) {
136 | return this._he(txt);
137 | },
138 |
139 | getLastToken : function(pos) {
140 | return this.tokens[this.tokens.length - (pos || 0) - 1];
141 | },
142 |
143 | lastTokenType : function(re) {
144 | var t = this.getLastToken();
145 | if (t)
146 | return re.test(t.type);
147 | return false;
148 | },
149 |
150 | parseToken : function(test, code) {
151 | var m, tok;
152 | if (test.regexp) {
153 | test.regexp.lastIndex = 0;
154 | m = test.regexp.exec(code);
155 | if (m) {
156 | tok = { type : test.type,
157 | style : test.style,
158 | index : test.regexp.lastIndex
159 | };
160 | reAdd(this, "before", m, test, tok);
161 | reAdd(this, "after", m, test, tok);
162 | reAdd(this, "content", m, test, tok);
163 | }
164 | } else {
165 | tok = test.call(this, code);
166 | }
167 | return tok;
168 | },
169 |
170 | doItNow : function(code) {
171 | this.lang.start.call(this, code);
172 | if (!this.args.noTrim)
173 | code = code.replace(/\s+$/, "");
174 | var formatted = [], T = this.tokenParsers, m, unknown, tok, i, f = 0, tokens;
175 | unknown = "";
176 | tokens = this.tokens = [];
177 | while (code.length > 0) {
178 | // jumping whitespace one character at a time
179 | // might eat a lot of time, let's skip it
180 | // quickly
181 | m = /^\s+/.exec(code);
182 | if (m) {
183 | unknown += m[0];
184 | code = code.substr(m[0].length);
185 | }
186 | for (i = T.length; --i >= 0;) {
187 | tok = this.parseToken(T[i], code);
188 | if (tok)
189 | break;
190 | }
191 | if (tok) {
192 | if (unknown)
193 | formatted[f++] = unknown;
194 | unknown = "";
195 | if (!(tok instanceof Array))
196 | tok = [ tok ];
197 | var index = 0;
198 | tokens.push.apply(tokens, tok);
199 | for (var j = 0; j < tok.length; ++j) {
200 | var t = tok[j];
201 | formatted[f++] = t;
202 | index += getNextIndex(t);
203 | }
204 | code = code.substr(index);
205 | } else {
206 | unknown += code.charAt(0);
207 | code = code.substr(1);
208 | }
209 | }
210 | if (unknown)
211 | formatted[f++] = unknown;
212 | for (i = formatted.length; --i >= 0;) {
213 | f = formatted[i];
214 | if (typeof f == "string")
215 | formatted[i] = this.formatUnknown(f);
216 | else
217 | formatted[i] = this.formatToken(f);
218 | }
219 | var html = formatted.join("");
220 | i = this.args.lineNumbers;
221 | if (i) {
222 | if (typeof i != "number")
223 | i = 0;
224 | html = html.replace(/^/mg, function() {
225 | return "" + (++i) + "";
226 | });
227 | this.args.lineNumbers = i;
228 | }
229 | //html = html.replace(/\n/g, "
");
230 | this.lang.stop.call(this);
231 | return html;
232 | },
233 |
234 | _he : function(str) {
235 | if (str.escaped)
236 | return str.escaped;
237 | str = str.replace(he_re, function(c) {
238 | return he_re_val[c];
239 | });
240 | if (this.args.replaceTabs)
241 | str = str.replace(/\t/g, this.args.replaceTabs);
242 | return str;
243 | }
244 |
245 | };
246 |
247 | var he_re = /[&<>]/g, he_re_val = {
248 | "&" : "&",
249 | "<" : "<",
250 | ">" : ">"
251 | };
252 |
253 | H.LANG = function(id, tokens) {
254 | if (arguments.length > 0) {
255 | H.LANG[id] = this;
256 | this.tokens = tokens;
257 | }
258 | };
259 |
260 | H.registerLang = function(type, tokens) {
261 | f.prototype = new H.LANG;
262 | f.prototype.constructor = f;
263 | function f() { H.LANG.call(this, type, tokens); };
264 | return new f();
265 | };
266 |
267 | var P = H.LANG.prototype;
268 | P.start = P.stop = function(){};
269 |
270 | P.onComment = function(c) {
271 | return makeUrls(c);
272 | };
273 |
274 | function makeUrls(s) {
275 | return s.replace(/\b((https?|ftp):\x2f\x2f[^\s\x22]+)/g, function(url) {
276 | return "" + url + "";
277 | });
278 | };
279 |
280 | function reAdd(self, c, m, test, tok) {
281 | if (test[c] != null) {
282 | if (typeof test[c] == "number") {
283 | tok[c] = m[test[c]];
284 | } else if (typeof test[c] == "function") {
285 | tok[c] = test[c].call(self, m);
286 | } else {
287 | tok[c] = test[c];
288 | }
289 | }
290 | };
291 |
292 | function getNextIndex(tok) {
293 | var index = tok.index || 0;
294 | if (!index) {
295 | // console.log("No index in %s", tok.style);
296 | if (tok.before)
297 | index += tok.before.length;
298 | if (tok.content)
299 | index += tok.content.length;
300 | if (tok.after)
301 | index += tok.after.length;
302 | }
303 | return index;
304 | };
305 |
306 | var buffer = H.is_ie
307 | ? function() {
308 | var a = [], idx = 0, f = function() {
309 | for (var i = 0; i < arguments.length; ++i)
310 | a[idx++] = arguments[i];
311 | };
312 | f.get = function() { return a.join(""); };
313 | return f;
314 | } : function() {
315 | var str = "", f = function() {
316 | str = str.concat.apply(str, arguments);
317 | };
318 | f.get = function() { return str; };
319 | return f;
320 | };
321 |
322 | })();
323 |
324 | /**
325 | * @name: lang-xml
326 | * @author: Mihai Bazon
327 | */
328 |
329 | (function(){
330 |
331 | var H = DlHighlight;
332 |
333 | var T = {
334 |
335 | COMMENT: function(txt) {
336 | if (txt.indexOf("",
343 | content : txt.substring(4, nl),
344 | index : nl + 3,
345 | type : "comment",
346 | style : "comment"
347 | }
348 | }
349 | },
350 |
351 | STRING: function(txt) {
352 | if (this.inXmlTag)
353 | return this.parseToken(H.BASE.STRING, txt);
354 | },
355 |
356 | ATTRIBUTE: function(txt) {
357 | var r = null;
358 | if (this.inXmlTag) {
359 | var m = /^([a-z0-9_-]+)(\s*)=/i.exec(txt);
360 | if (m) {
361 | return [ { content : m[1],
362 | style : "builtin xml-attribute" },
363 | { content : m[2] }, // whitespace
364 | { content : "=",
365 | style : "operator" }
366 | ];
367 | }
368 | }
369 | return r;
370 | },
371 |
372 | ENTITY: {
373 | regexp : /^&(\w+);/g,
374 | before : "&",
375 | after : ";",
376 | content : 1,
377 | type : "builtin",
378 | style : "builtin xml-entity"
379 | },
380 |
381 | START_TAG: function(txt) {
382 | var m = /^<([a-z0-9_-]+)/i.exec(txt);
383 | if (m) {
384 | this.inXmlTag = m[1];
385 | return [ { content : "<",
386 | style : "paren xml-tagangle" },
387 | { content : m[1],
388 | style : "keyword xml-tag xml-tag-open" } ];
389 | }
390 | },
391 |
392 | END_TAG: function(txt) {
393 | var m = /^<\x2f([a-z0-9_-]+)(\s*>)/i.exec(txt);
394 | if (m) {
395 | return [ { content : "",
396 | style : "paren xml-tagangle" },
397 | { content : m[1],
398 | style : "keyword xml-tag xml-tag-close" },
399 | { content : m[2],
400 | style : "paren xml-tagangle" } ];
401 | }
402 | },
403 |
404 | END_ANGLE: function(txt) {
405 | var m = /^\x2f?>/.exec(txt);
406 | if (m) {
407 | this.inXmlTag = false;
408 | return {
409 | content : m[0],
410 | style : "paren xml-tagangle"
411 | };
412 | }
413 | }
414 |
415 | };
416 |
417 | var lang = H.registerLang(
418 | "xml", [ T.COMMENT,
419 | T.STRING,
420 | T.ATTRIBUTE,
421 | T.ENTITY,
422 | T.START_TAG,
423 | T.END_TAG,
424 | T.END_ANGLE ]);
425 |
426 | lang.T = T;
427 |
428 | lang.start = function() {
429 | this.inXmlTag = false;
430 | };
431 |
432 | })();
433 |
434 | /**
435 | * @name: lang-html
436 | * @author: Mihai Bazon
437 | */
438 | (function(){
439 |
440 | var re_get_script = /([^\0]*?)<\x2fscript>/gi;
441 |
442 | var H = DlHighlight, xml = H.LANG.xml;
443 |
444 | function END_ANGLE(txt) {
445 | var m = /^\x2f?>/.exec(txt);
446 | if (m) {
447 | var tag = this.inXmlTag;
448 | this.inXmlTag = false;
449 | var tok = [{ content : m[0],
450 | style : "paren xml-tagangle" }];
451 | if (/^script$/i.test(tag) && !/><\x2fscript>/i.test(txt)) {
452 | re_get_script.lastIndex = 1;
453 | var m = re_get_script.exec(txt);
454 | if (m && m[1] && m.index == 1) {
455 | var code = m[1];
456 | var index = re_get_script.lastIndex - 10;
457 | var js = new H({ lang: "js",
458 | noTrim: true }).doItNow(code);
459 | var jstok = {
460 | content : { escaped: js },
461 | style : "xml-inline-script",
462 | index : index
463 | };
464 | tok.push(jstok);
465 | }
466 | }
467 | return tok;
468 | }
469 | };
470 |
471 | H.registerLang("html", [ xml.T.COMMENT,
472 | xml.T.STRING,
473 | xml.T.ATTRIBUTE,
474 | xml.T.ENTITY,
475 | xml.T.START_TAG,
476 | xml.T.END_TAG,
477 | END_ANGLE
478 | ]);
479 |
480 | })();
481 |
482 | /**
483 | * @name: lang-js
484 | * @author: Mihai Bazon
485 | */
486 |
487 | (function(){
488 |
489 | var builtins = [
490 | "Array",
491 | "Date",
492 | "Function",
493 | "Infinity",
494 | "Math",
495 | "NaN",
496 | "Number",
497 | "Object",
498 | "Packages",
499 | "RegExp",
500 | "String",
501 | "alert",
502 | "decodeURI",
503 | "decodeURIComponent",
504 | "document",
505 | "encodeURI",
506 | "encodeURIComponent",
507 | "eval",
508 | "isFinite",
509 | "isNaN",
510 | "parseFloat",
511 | "parseInt",
512 | "undefined",
513 | "window"
514 | ];
515 |
516 | var BUILTINS = {};
517 | for (var i = builtins.length; --i >= 0;)
518 | BUILTINS[builtins[i]] = true;
519 |
520 | var keywords = [
521 | "abstract",
522 | "boolean",
523 | "break",
524 | "byte",
525 | "case",
526 | "catch",
527 | "char",
528 | "class",
529 | "const",
530 | "continue",
531 | "debugger",
532 | "default",
533 | "delete",
534 | "do",
535 | "double",
536 | "else",
537 | "enum",
538 | "export",
539 | "extends",
540 | "false",
541 | "final",
542 | "finally",
543 | "float",
544 | "for",
545 | "function",
546 | "goto",
547 | "if",
548 | "implements",
549 | "import",
550 | "in",
551 | "instanceof",
552 | "int",
553 | "interface",
554 | "long",
555 | "native",
556 | "new",
557 | "null",
558 | "package",
559 | "private",
560 | "protected",
561 | "public",
562 | "return",
563 | "short",
564 | "static",
565 | "super",
566 | "switch",
567 | "synchronized",
568 | "this",
569 | "throw",
570 | "throws",
571 | "transient",
572 | "true",
573 | "try",
574 | "typeof",
575 | "var",
576 | "void",
577 | "volatile",
578 | "while",
579 | "with"
580 | ];
581 |
582 | var KEYWORDS = {};
583 | for (var i = keywords.length; --i >= 0;)
584 | KEYWORDS[keywords[i]] = true;
585 |
586 | var end_q_mark = {
587 | ";" : true,
588 | "{" : true,
589 | "}" : true,
590 | "(" : true,
591 | ")" : true,
592 | "," : true
593 | };
594 |
595 | var T = {
596 |
597 | WORD : function(txt) {
598 | var m = /^(\$?\w+)/.exec(txt);
599 | if (m) {
600 | var style = "operand";
601 | var tok = this.getLastToken();
602 | if (tok && tok.content == "function")
603 | style += " defun";
604 | var id = m[1];
605 | if (id in KEYWORDS) {
606 | style += " keyword";
607 | if (id == "function") {
608 | if (tok) {
609 | if (tok.type == "operator" && tok.content == "=" ||
610 | tok.type == "hasharrow")
611 | tok = this.getLastToken(1);
612 | if (tok && tok.type == "operand")
613 | tok.style += " defun";
614 | }
615 | }
616 | } else if (id in BUILTINS) {
617 | style += " builtin";
618 | }
619 | return {
620 | content : id,
621 | index : m[0].length,
622 | type : "operand",
623 | style : style
624 | };
625 | }
626 | },
627 |
628 | REGEXP : function(txt) {
629 | if (!this.lastTokenType(/^operand$/)) {
630 | var m = /^\x2f((\\.|[^\x2f\\\n])+)\x2f([gim]+)?/.exec(txt);
631 | if (m) return {
632 | before : "/",
633 | content : m[1],
634 | after : m[3] ? "/" + m[3] : "/",
635 | style : "regexp",
636 | type : "regexp",
637 | index : m[0].length
638 | };
639 | }
640 | },
641 |
642 | // catch some common errors
643 | ERRORS : {
644 | regexp : /^[,+*=-]\s*[\)\}\]]/g,
645 | content : 0,
646 | style : "error",
647 | type : "error"
648 | },
649 |
650 | QUESTIONMARK : function(txt) {
651 | if (txt.charAt(0) == "?")
652 | this.jsQuestionMark++;
653 | },
654 |
655 | ENDQMARK : function(txt) {
656 | if (txt.charAt(0) in end_q_mark && this.jsQuestionMark > 0)
657 | this.jsQuestionMark--;
658 | },
659 |
660 | COMMA : function(txt) {
661 | if (txt.charAt(0) == ',') return {
662 | content : ",",
663 | style : "comma",
664 | type : "comma",
665 | index : 1
666 | };
667 | },
668 |
669 | COLON : function(txt) {
670 | if (!this.jsQuestionMark && txt.charAt(0) == ":") {
671 | var tok = this.getLastToken();
672 | if (tok && /string|operand/.test(tok.type)) {
673 | tok.style += " hashkey";
674 | return {
675 | content : ":",
676 | style : "hasharrow",
677 | type : "hasharrow",
678 | index : 1
679 | };
680 | }
681 | }
682 | }
683 |
684 | };
685 |
686 | var H = DlHighlight;
687 | var lang = H.registerLang("js", [ H.BASE.COMMENT_CPP,
688 | H.BASE.COMMENT_C,
689 | H.BASE.STRING,
690 | T.WORD,
691 | T.REGEXP,
692 | T.ERRORS,
693 | T.QUESTIONMARK,
694 | T.ENDQMARK,
695 | T.COMMA,
696 | T.COLON,
697 | H.BASE.OPERATOR,
698 | H.BASE.PAREN
699 | ]);
700 |
701 | lang.T = T;
702 |
703 | lang.start = function() {
704 | this.jsQuestionMark = 0;
705 | };
706 |
707 | })();
708 |
709 |
710 | /**
711 | * @name: lang-css
712 | * @author: Mihai Bazon
713 | * @change: pizn
714 | */
715 | (function(){
716 |
717 | var outblock_stuff = {
718 | "." : "css-class",
719 | "#" : "css-id",
720 | ":" : "css-pseudo-class"
721 | };
722 |
723 | var T = {
724 |
725 | AT_RULE : {
726 | regexp : /^@([a-z0-9_-]+)/gi,
727 | before : "@",
728 | content : 1,
729 | style : "keyword css-at-rule"
730 | },
731 |
732 | COMMENT_CPP : function(txt) {
733 | if (txt.charAt(0) == "/" && txt.charAt(1) == "/") {
734 | var nl = txt.indexOf("\n");
735 | if (nl == -1)
736 | nl = txt.length;
737 | var c = this.lang.onComment.call(this, this._he(txt.substring(2, nl)));
738 |
739 | // when "//" has ")" and ";" don't be c style
740 | var d = c.indexOf(";"), e = c.indexOf(")");
741 | if (d == -1 || e == -1) {
742 | return {
743 | content : { escaped: c },
744 | style : "comment comment-line",
745 | type : "comment",
746 | index : nl,
747 | before : "//"
748 | };
749 | }
750 | }
751 | },
752 |
753 | OUTBLOCK_STUFF : function(txt) {
754 | if (!this.cssBlock) {
755 | // for id and clss
756 | var m = /^([.#:])([a-z0-9_-]+)/i.exec(txt);
757 | if (m) return {
758 | before : m[1],
759 | content : m[2],
760 | index : m[0].length,
761 | style : outblock_stuff[m[1]]
762 | };
763 |
764 | // for element
765 | var m = /^([a-z0-9]+)(\s*)/i.exec(txt);
766 | //console.log(m);
767 | if (m) return {
768 | content : m[1],
769 | index : m[0].length,
770 | style : 'css-element'
771 | };
772 |
773 | // for ","
774 | if (txt.charAt(0) == ",") return {
775 | content : ",",
776 | index : 1,
777 | style : "css-comma"
778 | };
779 | }
780 | },
781 |
782 | INBLOCK_STUFF : function(txt) {
783 | if (this.cssBlock) {
784 | // declaration
785 | var m = /^([a-z0-9_-]+)(\s*:)/i.exec(txt);
786 | if (m) return {
787 | content : m[1],
788 | after : m[2],
789 | style : "css-keyword",
790 | index : m[0].length
791 | };
792 |
793 | // color
794 | m = /^#(([a-f0-9][a-f0-9][a-f0-9]){1,2})/i.exec(txt);
795 | if (m) return {
796 | content : m[1],
797 | before : "#",
798 | style : "css-color-spec",
799 | index : m[0].length
800 | };
801 |
802 | // length
803 | m = /^(-?[0-9]?\.?[0-9]+)(px|pt|em|ex|%|\b)/i.exec(txt);
804 | if (m) return {
805 | content : m[1],
806 | after : m[2],
807 | style : "css-length",
808 | index : m[0].length
809 | };
810 |
811 | // word
812 | var n = /^([a-z0-9_-]+)(\s*\b)/i.exec(txt);
813 | if (n) return {
814 | content : n[1],
815 | style : "css-attribute",
816 | index : n[0].lenght
817 | };
818 |
819 | // ","
820 | var d = /^(\,)/i.exec(txt);
821 | if (d) return {
822 | content : d[0],
823 | style : "css-length",
824 | index : d[0].length
825 | }
826 |
827 | // the end
828 | m = /^\;/i.exec(txt);
829 | if (m) return {
830 | content : m[0],
831 | style : "css-end",
832 | index : m[0].length
833 | };
834 | }
835 | },
836 |
837 | URL: function(txt) {
838 |
839 | // "url"
840 | var u = /^url/i.exec(txt);
841 | if (u) return {
842 | content : u[0],
843 | style : "css-url",
844 | index : u[0].length
845 | };
846 |
847 | // "../" "./" "."
848 | if(this.cssBrack) {
849 | var t = /^([\.\.]|[\.\.\/]|[\.\/]|[\.]+)(\s*)/i.exec(txt);
850 | if (t) return {
851 | content : t[0],
852 | style : "css-url",
853 | index : t[0].length
854 | };
855 | }
856 | },
857 |
858 |
859 | BEGIN_BRACK : function(txt) {
860 | if (/^\(/.test(txt)) {
861 | this.cssBrack++;
862 | return {
863 | content : "(",
864 | style : "css-brack-open",
865 | index : 1
866 | };
867 | }
868 | },
869 |
870 | END_BRACK : function(txt) {
871 | if (/^\)/.test(txt)) {
872 | this.cssBrack--;
873 | return {
874 | content : ")",
875 | style : "css-brack-close",
876 | index : 1
877 | };
878 | }
879 | },
880 |
881 | BEGIN_BLOCK : function(txt) {
882 | if (/^\{/.test(txt)) {
883 | this.cssBlock++;
884 | return {
885 | content : "{",
886 | style : "paren css-block-open",
887 | index : 1
888 | };
889 | }
890 | },
891 |
892 | END_BLOCK : function(txt) {
893 | if (/^\}/.test(txt)) {
894 | this.cssBlock--;
895 | return {
896 | content : "}",
897 | style : "paren css-block-close",
898 | index : 1
899 | };
900 | }
901 | },
902 |
903 | PAREN : DlHighlight.BASE.PAREN
904 |
905 | };
906 |
907 | var H = DlHighlight;
908 | var lang = H.registerLang(
909 | "css", [ H.BASE.COMMENT_C,
910 | H.BASE.STRING,
911 | T.COMMENT_CPP,
912 | T.AT_RULE,
913 | T.OUTBLOCK_STUFF,
914 | T.INBLOCK_STUFF,
915 | T.URL,
916 | T.BEGIN_BLOCK,
917 | T.END_BLOCK,
918 | T.BEGIN_BRACK,
919 | T.END_BRACK
920 | ]);
921 |
922 | lang.start = function() {
923 | this.cssBlock = 0;
924 | this.cssBrack = 0;
925 | };
926 |
927 | })();
928 |
929 | /**
930 | * @name: helpers
931 | * @author: Mihai Bazon
932 | * @change: pizn
933 | */
934 | (function(){
935 |
936 | function getText(el) {
937 | if (el.innerText != null)
938 | return el.innerText;
939 | if (el.textContent != null)
940 | return el.textContent;
941 | if (el.nodeType == 1 /* ELEMENT */) {
942 | var txt = [], i = el.firstChild;
943 | while (i) {
944 | txt.push(getText(i));
945 | i = i.nextSibling;
946 | }
947 | return txt.join("");
948 | } else if (el.nodeType == 3 /* TEXT */) {
949 | return el.data;
950 | }
951 | return "";
952 | };
953 |
954 | DlHighlight.HELPERS = {
955 |
956 | highlightByName : function(name, tag, args, bubbles) {
957 | if (!bubbles)
958 | bubbles = false;
959 | if (!args)
960 | args = {};
961 | if (!tag)
962 | tag = "pre";
963 | var a = document.getElementsByTagName(tag);
964 | for (var i = a.length; --i >= 0;) {
965 | var el = a[i];
966 | if (el.getAttribute("name") == name) {
967 |
968 | var code = el._msh_text || getText(el);
969 | el._msh_text = code;
970 | args.lang = el._msh_type || el.className;
971 |
972 | el._msh_type = args.lang;
973 |
974 | // 解决 IE 下的 bug
975 | if (!DlHighlight.is_ie) {
976 | args.lineNumbers = bubbles;
977 | }
978 |
979 | var hl = new DlHighlight(args);
980 |
981 | code = hl.doItNow(code);
982 | if (DlHighlight.is_ie) {
983 | // kills whitespace
984 | var div = document.createElement("div");
985 | div.innerHTML = "" + code + "
";
986 | while (div.firstChild) {
987 | // remove the code
988 | el.removeChild(el.firstChild);
989 | // append the new style code
990 | el.appendChild(div.firstChild);
991 | }
992 |
993 | } else {
994 | el.innerHTML = code;
995 | }
996 | el.className = "DlHighlight " + el.className;
997 | }
998 | }
999 | }
1000 |
1001 | };
1002 |
1003 |
1004 | })();
--------------------------------------------------------------------------------
/VioletTheme/js/html5.js:
--------------------------------------------------------------------------------
1 | // html5shiv MIT @rem remysharp.com/html5-enabling-script
2 | // iepp v1.6.2 MIT @jon_neal iecss.com/print-protector
3 | /*@cc_on(function(a,b){function r(a){var b=-1;while(++b";return a.childNodes.length!==1}())){a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=l.firstChild,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){if(a+""===undefined)return"";var d=-1,e=a.length,f,g=[];while(++d
6 | 404 Page!
7 | 网页未找到!
8 |
9 |
--------------------------------------------------------------------------------
/theOneTheme/README.md:
--------------------------------------------------------------------------------
1 | ###主题介绍
2 |
3 | Jekyll 博客主题 theOne
4 |
--------------------------------------------------------------------------------
/theOneTheme/_config.yml:
--------------------------------------------------------------------------------
1 | markdown: rdiscount
2 | pygments: true
3 | paginate: 4
4 |
5 | title: The One Theme
6 | url: http://pizn.github.com/blogTheme
7 | feed: /atom.xml
8 | author:
9 | name: PIZn
10 | email: pizner@gmail.com
11 | description: "The one theme is another web theme design by PIZn."
12 |
13 | about: "I am PIZn.I love all kinds of design, attention to the Internet dynamic, dedicated web front development, learn UI and UED."
14 | follow:
15 | email: pizner@gmail.com
16 | github: https://github.com/pizn
17 | twitter: http://www.twitter.com/piznlin
18 | google: https://plus.google.com/107483619032085919305
19 | facebook: http://facebook.com/zhanxinlin
20 | description: Just another blog theme -- the One
21 |
22 | indexContent: true
23 | imageLink: http://www.pizn.net/static/images/20121109Monutain.jpg
24 |
25 |
26 | style: /css/style.css
27 | blogName: theOne
28 | blogDesc: Just another theme
29 | favicon: /favicon.ico
30 | theme: default
31 |
32 | disqus: piznblog
33 |
34 | copyright: Copyright © 2011-2012 PIZn All rights reserved.
35 | test: ok
36 |
--------------------------------------------------------------------------------
/theOneTheme/_layouts/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 | {% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
45 |
46 |
47 | {{ page.date }}
48 |
49 | {{ content }}
50 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/theOneTheme/_layouts/post.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 | {{ page.title }}
6 | {{ content }}
7 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/theOneTheme/_posts/2012-11-13-hello-world.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: Jekyll Blog 主题 theOne 1.0
4 | description: 基于简单而又有轻量的理念,PIZn 设计并编写了这个主题。下面介绍文章页的一些标签使用方法。
5 | keyword: pizn theme, Black Cube
6 | ---
7 |
8 | ###"IMG"标签:
9 |
10 |
11 | ###"BLACKQUERY"标签:
12 |
13 | > Your time is limited, so don't waste it living someone else's life.…Don't let the noise of others' opinions drown out your own inner voice.
14 |
15 | ###"H"标签:
16 |
17 | #如何创建漂亮的 Jekyll 模板(h1)
18 |
19 | ##如何创建漂亮的 Jekyll 模板(h2)
20 |
21 | ###如何创建漂亮的 Jekyll 模板(h3)
22 |
23 | ####如何创建漂亮的 Jekyll 模板(h4)
24 |
25 | #####如何创建漂亮的 Jekyll 模板(h5)
26 |
27 | #####如何创建漂亮的 Jekyll 模板(h6)
28 |
29 | ###"P"标签:
30 |
31 | 基于简单而又有质感的理念,PIZn 设计并编写了这个主题。下面介绍文章页的一些标签使用方法
32 |
33 | ###"LI"标签:
34 |
35 | * 基于简单而又有质感的理念,PIZn 设计并编写了这个主题。下面介绍文章页的一些标签使用方法
36 | * 基于简单而又有质感的理念,PIZn 设计并编写了这个主题。下面介绍文章页的一些标签使用方法
37 | * 基于简单而又有质感的理念,PIZn 设计并编写了这个主题。下面介绍文章页的一些标签使用方法
38 | * 基于简单而又有质感的理念,PIZn 设计并编写了这个主题。下面介绍文章页的一些标签使用方法
39 |
40 | ###"CODE" 和 "PRE":
41 |
42 | 代码实例如下:
43 |
44 |
45 | .head {
46 | border: 1px solid #fefefe;
47 | color: #F00;
48 | background: #000;
49 | text-align: center;
50 | }
51 |
52 |
53 |
54 | ###"TABLE"标签:
55 |
56 |
57 |
58 |
59 | 命令 |
60 | 作用(解释) |
61 |
62 |
63 |
64 | :w
65 | |
66 | 保存 |
67 |
68 |
69 |
70 | :wq ,
71 | :x
72 | |
73 | 保存并关闭 |
74 |
75 |
76 |
77 | :q
78 | |
79 | 关闭(已保存) |
80 |
81 |
82 |
83 | :q!
84 | |
85 | 强制关闭 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/theOneTheme/archives.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Archives
4 | date: All posts is here.
5 | ---
6 |
7 | {% capture post_year1 %}{{ 'now' | date: '%Y' }}{% endcapture %}
8 | {{ post_year1 }}
9 |
10 | {% for post in site.posts %}
11 | {% capture post_year2 %}{{ post.date | date: '%Y' }}{% endcapture %}
12 | {% if post_year1 != post_year2 %}
13 | {% assign post_year1 = post_year2 %}
14 |
15 | {{ post_year1 }}
16 |
21 |
22 |
--------------------------------------------------------------------------------
/theOneTheme/contact.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Contact
4 | date: Contact Me.
5 | ---
6 |
7 | About Me
8 |
9 | {{ site.about }}
10 | Contact Me
11 |
17 |
18 |
--------------------------------------------------------------------------------
/theOneTheme/font/JennaSue.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/theOneTheme/font/JennaSue.eot
--------------------------------------------------------------------------------
/theOneTheme/font/JennaSue.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/theOneTheme/font/JennaSue.ttf
--------------------------------------------------------------------------------
/theOneTheme/font/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/theOneTheme/font/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/theOneTheme/font/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/theOneTheme/font/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/theOneTheme/font/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/theOneTheme/font/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/theOneTheme/images/yujinxiang.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pizn/blogTheme/5478db035c9a86e3f8d961e2b8f20ce6a2ffa059/theOneTheme/images/yujinxiang.jpeg
--------------------------------------------------------------------------------
/theOneTheme/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | date: Index
4 | ---
5 | {% for rpost in paginator.posts %}
6 |
7 |
8 |
9 | {% if site.indexContent == true %}
10 | {{ rpost.content }}
11 | {% else %}
12 | {{ rpost.description }}
13 | {% endif %}
14 |
15 | {% endfor %}
16 | {% if paginator.total_pages > 1 %}
17 |
28 | {% endif %}
29 |
--------------------------------------------------------------------------------
/theOneTheme/js/html5.js:
--------------------------------------------------------------------------------
1 | // html5shiv MIT @rem remysharp.com/html5-enabling-script
2 | // iepp v1.6.2 MIT @jon_neal iecss.com/print-protector
3 | /*@cc_on(function(a,b){function r(a){var b=-1;while(++b";return a.childNodes.length!==1}())){a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=l.firstChild,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){if(a+""===undefined)return"";var d=-1,e=a.length,f,g=[];while(++d= 1.3 ? 0 : 1,
64 | limit:true
65 | };
66 |
67 | // Returns the element that needs to be animated to scroll the window.
68 | // Kept for backwards compatibility (specially for localScroll & serialScroll)
69 | $scrollTo.window = function( scope ){
70 | return $(window)._scrollable();
71 | };
72 |
73 | // Hack, hack, hack :)
74 | // Returns the real elements to scroll (supports window/iframes, documents and regular nodes)
75 | $.fn._scrollable = function(){
76 | return this.map(function(){
77 | var elem = this,
78 | isWin = !elem.nodeName || $.inArray( elem.nodeName.toLowerCase(), ['iframe','#document','html','body'] ) != -1;
79 |
80 | if( !isWin )
81 | return elem;
82 |
83 | var doc = (elem.contentWindow || elem).document || elem.ownerDocument || elem;
84 |
85 | return /webkit/i.test(navigator.userAgent) || doc.compatMode == 'BackCompat' ?
86 | doc.body :
87 | doc.documentElement;
88 | });
89 | };
90 |
91 | $.fn.scrollTo = function( target, duration, settings ){
92 | if( typeof duration == 'object' ){
93 | settings = duration;
94 | duration = 0;
95 | }
96 | if( typeof settings == 'function' )
97 | settings = { onAfter:settings };
98 |
99 | if( target == 'max' )
100 | target = 9e9;
101 |
102 | settings = $.extend( {}, $scrollTo.defaults, settings );
103 | // Speed is still recognized for backwards compatibility
104 | duration = duration || settings.duration;
105 | // Make sure the settings are given right
106 | settings.queue = settings.queue && settings.axis.length > 1;
107 |
108 | if( settings.queue )
109 | // Let's keep the overall duration
110 | duration /= 2;
111 | settings.offset = both( settings.offset );
112 | settings.over = both( settings.over );
113 |
114 | return this._scrollable().each(function(){
115 | // Null target yields nothing, just like jQuery does
116 | if (target == null) return;
117 |
118 | var elem = this,
119 | $elem = $(elem),
120 | targ = target, toff, attr = {},
121 | win = $elem.is('html,body');
122 |
123 | switch( typeof targ ){
124 | // A number will pass the regex
125 | case 'number':
126 | case 'string':
127 | if( /^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ) ){
128 | targ = both( targ );
129 | // We are done
130 | break;
131 | }
132 | // Relative selector, no break!
133 | targ = $(targ,this);
134 | if (!targ.length) return;
135 | case 'object':
136 | // DOMElement / jQuery
137 | if( targ.is || targ.style )
138 | // Get the real position of the target
139 | toff = (targ = $(targ)).offset();
140 | }
141 | $.each( settings.axis.split(''), function( i, axis ){
142 | var Pos = axis == 'x' ? 'Left' : 'Top',
143 | pos = Pos.toLowerCase(),
144 | key = 'scroll' + Pos,
145 | old = elem[key],
146 | max = $scrollTo.max(elem, axis);
147 |
148 | if( toff ){// jQuery / DOMElement
149 | attr[key] = toff[pos] + ( win ? 0 : old - $elem.offset()[pos] );
150 |
151 | // If it's a dom element, reduce the margin
152 | if( settings.margin ){
153 | attr[key] -= parseInt(targ.css('margin'+Pos)) || 0;
154 | attr[key] -= parseInt(targ.css('border'+Pos+'Width')) || 0;
155 | }
156 |
157 | attr[key] += settings.offset[pos] || 0;
158 |
159 | if( settings.over[pos] )
160 | // Scroll to a fraction of its width/height
161 | attr[key] += targ[axis=='x'?'width':'height']() * settings.over[pos];
162 | }else{
163 | var val = targ[pos];
164 | // Handle percentage values
165 | attr[key] = val.slice && val.slice(-1) == '%' ?
166 | parseFloat(val) / 100 * max
167 | : val;
168 | }
169 |
170 | // Number or 'number'
171 | if( settings.limit && /^\d+$/.test(attr[key]) )
172 | // Check the limits
173 | attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max );
174 |
175 | // Queueing axes
176 | if( !i && settings.queue ){
177 | // Don't waste time animating, if there's no need.
178 | if( old != attr[key] )
179 | // Intermediate animation
180 | animate( settings.onAfterFirst );
181 | // Don't animate this axis again in the next iteration.
182 | delete attr[key];
183 | }
184 | });
185 |
186 | animate( settings.onAfter );
187 |
188 | function animate( callback ){
189 | $elem.animate( attr, duration, settings.easing, callback && function(){
190 | callback.call(this, target, settings);
191 | });
192 | };
193 |
194 | }).end();
195 | };
196 |
197 | // Max scrolling position, works on quirks mode
198 | // It only fails (not too badly) on IE, quirks mode.
199 | $scrollTo.max = function( elem, axis ){
200 | var Dim = axis == 'x' ? 'Width' : 'Height',
201 | scroll = 'scroll'+Dim;
202 |
203 | if( !$(elem).is('html,body') )
204 | return elem[scroll] - $(elem)[Dim.toLowerCase()]();
205 |
206 | var size = 'client' + Dim,
207 | html = elem.ownerDocument.documentElement,
208 | body = elem.ownerDocument.body;
209 |
210 | return Math.max( html[scroll], body[scroll] )
211 | - Math.min( html[size] , body[size] );
212 | };
213 |
214 | function both( val ){
215 | return typeof val == 'object' ? val : { top:val, left:val };
216 | };
217 |
218 | })( jQuery );
--------------------------------------------------------------------------------
/theOneTheme/js/theOne.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @name: theOne
3 | * @author: zhanxin lin
4 | * @authorLink: http://www.pizn.net
5 | */
6 | $(document).ready(function() {
7 |
8 | /** hightlight Menu **/
9 | var navs, url, cur, i;
10 | navs = $("#nav li a");
11 | for(i = 1 ; i < navs.length; i++ ){
12 | url = navs[i].href;
13 | cur = window.location.href;
14 | if(cur.indexOf(url) !=-1) {
15 | navs[i].className = "action";
16 | navs[0].className = "";
17 | }
18 | if(cur != navs[0].href) {
19 | navs[0].className = "";
20 | }
21 | }
22 | /** scroll To **/
23 | var scrollTo = {
24 | nodeName: "J-backTop",
25 | scrollHeight: "100",
26 | linkBottom: "200px",
27 | linkRight: "20px",
28 | _scrollTop: function() {
29 | if(jQuery.scrollTo) {
30 | jQuery.scrollTo(0, 800, {queue:true});
31 | }
32 | },
33 | _scrollScreen: function() {
34 | var that = this, topLink = $('#' + that.nodeName);
35 | if(jQuery(document).scrollTop() <= that.scrollHeight) {
36 | topLink.hide();
37 | return true;
38 | } else {
39 | topLink.fadeIn();
40 | }
41 | },
42 | _resizeWindow: function() {
43 | var that = this, topLink = $('#' + that.nodeName);
44 | topLink.css({
45 | 'right' : that.linkRight,
46 | 'bottom': that.linkBottom
47 | });
48 | },
49 | run: function() {
50 | var that = this, topLink = $('');
51 | topLink.appendTo($('body'));
52 | topLink.css({
53 | 'display': 'none',
54 | 'position': 'fixed',
55 | 'right': that.linkRight,
56 | 'bottom': that.linkBottom
57 | });
58 | if(jQuery.scrollTo) {
59 | topLink.click(function() {
60 | that._scrollTop();
61 | return false;
62 | });
63 | }
64 | jQuery(window).resize(function() {
65 | that._scrollScreen();
66 | });
67 | jQuery(window).scroll(function() {
68 | that._scrollScreen();
69 | });
70 | }
71 | }
72 | scrollTo.run();
73 |
74 | })
75 |
--------------------------------------------------------------------------------