├── .gitignore
├── README.md
├── _config.yml
├── package.json
├── scaffolds
├── draft.md
├── page.md
└── post.md
├── source
├── 404.md
├── _posts
│ ├── hello-2015.markdown
│ ├── hello-2015
│ │ └── post-bg-2015.jpg
│ ├── js-module-7day.markdown
│ ├── js-module-loader.markdown
│ ├── js-module-loader
│ │ └── post-bg-js-module.jpg
│ ├── js-version.markdown
│ ├── js-version
│ │ ├── javascript-java.jpg
│ │ ├── keep-calm-and-learn-javascript.png
│ │ └── post-bg-js-version.jpg
│ ├── unix-linux-note.markdown
│ └── unix-linux-note
│ │ └── post-bg-unix-linux.jpg
├── about
│ └── index.md
├── archives
│ └── index.md
├── img
│ ├── 404-bg.jpg
│ ├── about-bg.jpg
│ ├── avatar.jpg
│ ├── contact-bg.jpg
│ ├── favicon.ico
│ ├── home-bg-o.jpg
│ ├── home-bg.jpg
│ ├── icon_wechat.png
│ └── tag-bg.jpg
└── tags
│ └── index.md
└── themes
└── huxblog
├── LICENSE
├── README.md
├── _config.yml
├── languages_to_be_added
├── de.yml
├── default.yml
├── en.yml
├── es.yml
├── no.yml
├── pl.yml
├── ru.yml
├── zh-CN.yml
└── zh-TW.yml
├── layout
├── 404.ejs
├── _partial
│ ├── footer.ejs
│ ├── head.ejs
│ ├── nav.ejs
│ └── pagination.ejs
├── about.ejs
├── archive.ejs
├── index.ejs
├── keynote.ejs
├── layout.ejs
├── page.ejs
├── post.ejs
└── tag.ejs
└── source
├── css
├── bootstrap.css
├── bootstrap.min.css
├── highlight.styl
├── hux-blog.css
└── hux-blog.min.css
├── fonts
├── glyphicons-halflings-regular.eot
├── glyphicons-halflings-regular.svg
├── glyphicons-halflings-regular.ttf
├── glyphicons-halflings-regular.woff
└── glyphicons-halflings-regular.woff2
└── js
├── bootstrap.js
├── bootstrap.min.js
├── hux-blog.js
├── hux-blog.min.js
├── jquery.js
├── jquery.min.js
├── jquery.nav.js
└── jquery.tagcloud.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | Thumbs.db
3 | db.json
4 | *.log
5 | node_modules/
6 | public/
7 | .deploy*/
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hexo-Theme-Huxblog
2 |
3 | > Ported Theme of [Hux Blog](https://github.com/Huxpro/huxpro.github.io), Thank [Huxpro](https://github.com/Huxpro) for designing such a flawless theme.
4 |
5 | ### [Demo →](http://kaijun.github.io/hexo-theme-huxblog)
6 |
7 |
8 | 
9 |
10 | ## Usage
11 |
12 | I didn't publish it as a single theme folder because a few of the pages are added and modified manually, so you should manually create some extra folders in `source` for the new pages and modify the `_config.yml` if you only have the single theme folder.
13 |
14 | So i just pushed the whole hexo project for your convenience, all pre settings and boilerplates are included, have a look and go ahead customizing your own blog!
15 |
16 | ##### 1.Init
17 |
18 | ```
19 | git clone https://github.com/Kaijun/hexo-theme-huxblog.git
20 | cd hexo-theme-huxblog
21 | npm install
22 | ```
23 |
24 | ##### 2.Modify
25 | Modify `_config.yml` file with your own info.
26 | Especially the section:
27 |
28 | ```
29 | deploy:
30 | type: git
31 | repo: https://github.com/Kaijun/hexo-theme-huxblog
32 | branch: gh-pages
33 | ```
34 | Replace with your own repo!
35 |
36 | ##### 3.Writting/Serve/Deploy
37 |
38 | ```
39 | hexo new post IMAPOST
40 | hexo serve // run hexo in local environment
41 | hexo clean && hexo deploy // hexo will push the static files automatically into the specific branch(gh-pages) of your repo!
42 | ```
43 |
44 | ##### 4.Enjoy!
45 | Please [**Star**](https://github.com/kaijun/hexo-theme-huxblog/stargazers) this Project if you like it! [**Following**](https://github.com/Kaijun) would also be appreciated!
46 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | # Hexo Configuration
2 | ## Docs: https://hexo.io/docs/configuration.html
3 | ## Source: https://github.com/hexojs/hexo/
4 |
5 | # Site
6 | title: Kaijun's Blog
7 | subtitle: To Be A Lean Developer!
8 | author: Kaijun Chen
9 | language:
10 | timezone:
11 |
12 | # URL
13 | ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
14 | url: http://kaijun.rocks/hexo-theme-huxblog
15 | root: /hexo-theme-huxblog/
16 | permalink: :year/:month/:day/:title/
17 | permalink_defaults:
18 |
19 | #Custom Setting Start
20 |
21 | # Site settings
22 | SEOTitle: Kaijun的博客 | Kaijun's Blog
23 | header-img: img/home-bg.jpg
24 | email: Kaijun.cn@gmail.com
25 | description: ""
26 | keyword: ""
27 |
28 |
29 | # SNS settings
30 | # RSS: false
31 | weibo_username: Demonbane
32 | zhihu_username: Demonbane
33 | github_username: Kaijun
34 | twitter_username: Demonbane_x
35 | facebook_username: demonbane.cn
36 | linkedin_username: kaijun-chen-42089354
37 |
38 | # Build settings
39 | anchorjs: true # if you want to customize anchor. check out line:181 of `post.html`
40 |
41 |
42 | # Disqus settings
43 | disqus_username: hexo-theme-huxblog
44 |
45 | # Duoshuo settings
46 | # duoshuo_username: kaijun
47 | # Share component is depend on Comment so we can NOT use share only.
48 | duoshuo_share: true # set to false if you want to use Comment without Sharing
49 |
50 |
51 | # Analytics settings
52 | # Baidu Analytics
53 | ba_track_id: 4cc1f2d8f3067386cc5cdb626a202900
54 | # Google Analytics
55 | ga_track_id: 'UA-49627206-1' # Format: UA-xxxxxx-xx
56 | ga_domain: huangxuan.me
57 |
58 |
59 | # Sidebar settings
60 | sidebar: true # whether or not using Sidebar.
61 | sidebar-about-description: "我要成为魔法师!"
62 | sidebar-avatar: /img/avatar.jpg # use absolute URL, seeing it's used in both `/` and `/about/`
63 |
64 |
65 | # Featured Tags
66 | featured-tags: true # whether or not using Feature-Tags
67 | featured-condition-size: 1 # A tag will be featured if the size of it is more than this condition value
68 |
69 |
70 | # Friends
71 | friends: [
72 | {
73 | title: "Kaijun's Blog",
74 | href: "http://blog.kaijun.rocks"
75 | },{
76 | title: "Hux Blog",
77 | href: "http://huangxuan.me"
78 | },{
79 | title: "Foo",
80 | href: "#"
81 | },{
82 | title: "Bar",
83 | href: "#"
84 | },{
85 | title: "Example Friends",
86 | href: "#"
87 | },{
88 | title: "It helps SEO",
89 | href: "#"
90 | }
91 | ]
92 |
93 |
94 | #Custom Setting End
95 |
96 |
97 |
98 | # Directory
99 | source_dir: source
100 | public_dir: public
101 | tag_dir: tags
102 | archive_dir: i_dont_wanna_use_default_archives
103 | category_dir: categories
104 | code_dir: downloads/code
105 | i18n_dir: :lang
106 | skip_render:
107 |
108 | # Writing
109 | new_post_name: :title.md # File name of new posts
110 | default_layout: post
111 | titlecase: false # Transform title into titlecase
112 | external_link: true # Open external links in new tab
113 | filename_case: 0
114 | render_drafts: false
115 | post_asset_folder: true
116 | relative_link: false
117 | future: true
118 | highlight:
119 | enable: true
120 | line_number: true
121 | auto_detect: true
122 | tab_replace:
123 |
124 | # Category & Tag
125 | default_category: uncategorized
126 | category_map:
127 | tag_map:
128 |
129 | # Date / Time format
130 | ## Hexo uses Moment.js to parse and display date
131 | ## You can customize the date format as defined in
132 | ## http://momentjs.com/docs/#/displaying/format/
133 | date_format: YYYY-MM-DD
134 | time_format: HH:mm:ss
135 |
136 | # Pagination
137 | ## Set per_page to 0 to disable pagination
138 | per_page: 10
139 | pagination_dir: page
140 |
141 | # Extensions
142 | ## Plugins: https://hexo.io/plugins/
143 | ## Themes: https://hexo.io/themes/
144 | theme: huxblog
145 |
146 | # Deployment
147 | ## Docs: https://hexo.io/docs/deployment.html
148 | deploy:
149 | type: git
150 | repo: https://github.com/Kaijun/hexo-theme-huxblog
151 | branch: gh-pages
152 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hexo-site",
3 | "version": "0.0.0",
4 | "private": true,
5 | "hexo": {
6 | "version": "3.2.2"
7 | },
8 | "dependencies": {
9 | "hexo": "^3.2.0",
10 | "hexo-deployer-git": "^0.1.0",
11 | "hexo-generator-archive": "^0.1.4",
12 | "hexo-generator-category": "^0.1.3",
13 | "hexo-generator-index": "^0.2.0",
14 | "hexo-generator-tag": "^0.2.0",
15 | "hexo-renderer-ejs": "^0.2.0",
16 | "hexo-renderer-marked": "^0.2.10",
17 | "hexo-renderer-stylus": "^0.3.1",
18 | "hexo-server": "^0.2.0"
19 | }
20 | }
--------------------------------------------------------------------------------
/scaffolds/draft.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: {{ title }}
3 | tags:
4 | ---
5 |
--------------------------------------------------------------------------------
/scaffolds/page.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: {{ title }}
3 | date: {{ date }}
4 | ---
5 |
--------------------------------------------------------------------------------
/scaffolds/post.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: {{ title }}
3 | date: {{ date }}
4 | tags:
5 | ---
6 |
--------------------------------------------------------------------------------
/source/404.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: 404
3 | description: "你来到了没有知识的荒原 :("
4 | header-img: "img/404-bg.jpg"
5 | ---
6 |
--------------------------------------------------------------------------------
/source/_posts/hello-2015.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Welcome to Hux Blog"
4 | subtitle: " \"Hello World, Hello Blog\""
5 | date: 2014-01-29 12:00:00
6 | author: "Hux"
7 | header-img: "post-bg-2015.jpg"
8 | tags:
9 | - 生活
10 | ---
11 |
12 | > “Yeah It's on. ”
13 |
14 |
15 | ## 前言
16 |
17 | Hux 的 Blog 就这么开通了。
18 |
19 | [跳过废话,直接看技术实现 ](#build)
20 |
21 |
22 |
23 | 2015 年,Hux 总算有个地方可以好好写点东西了。
24 |
25 |
26 | 作为一个程序员, Blog 这种轮子要是挂在大众博客程序上就太没意思了。一是觉得大部分 Blog 服务都太丑,二是觉得不能随便定制不好玩。之前因为太懒没有折腾,结果就一直连个写 Blog 的地儿都没有。
27 |
28 | 在玩了一段时间知乎之后,答题的快感又激起了我开博客的冲动。之前的[个人网站](http://huangxuan.me/portfolio)是作品集形式的(现在集成进来了),并不适合用来写博文,一不做二不休,花一天搞一个吧!
29 |
30 |
31 |
32 | ---
33 |
34 | ## 正文
35 |
36 | 接下来说说搭建这个博客的技术细节。
37 |
38 | 正好之前就有关注过 [GitHub Pages](https://pages.github.com/) + [Jekyll](http://jekyllrb.com/) 快速 Building Blog 的技术方案,非常轻松时尚。
39 |
40 | 其优点非常明显:
41 |
42 | * **Markdown** 带来的优雅写作体验
43 | * 非常熟悉的 Git workflow ,**Git Commit 即 Blog Post**
44 | * 利用 GitHub Pages 的域名和免费无限空间,不用自己折腾主机
45 | * 如果需要自定义域名,也只需要简单改改 DNS 加个 CNAME 就好了
46 | * Jekyll 的自定制非常容易,基本就是个模版引擎
47 |
48 |
49 | 本来觉得最大的缺点可能是 GitHub 在国内访问起来太慢,所以第二天一起床就到 GitCafe(Chinese GitHub Copy) 迁移了一个[镜像](http://huxpro.gitcafe.io)出来,结果还是巨慢。
50 |
51 | 哥哥可是个前端好嘛! 果断开 Chrome DevTool 查了下网络请求,原来是 **pending 在了 Google Fonts** 上,页面渲染一直被阻塞到请求超时为止,难怪这么慢。
52 | 忍痛割爱,只好把 Web Fonts 去了(反正超时看到的也只能是 fallback ),果然一下就正常了,而且 GitHub 和 GitCafe 对比并没有感受到明显的速度差异,虽然 github 的 ping 值明显要高一些,达到了 300ms,于是用 DNSPOD 优化了一下速度。
53 |
54 |
55 |
56 | ---
57 |
58 | 配置的过程中也没遇到什么坑,基本就是 Git 的流程,相当顺手
59 |
60 | 大的 Jekyll 主题上直接 fork 了 Clean Blog(这个主题也相当有名,就不多赘述了。唯一的缺点大概就是没有标签支持,于是我给它补上了。)
61 |
62 | 本地调试环境需要 `gem install jekyll`,结果 rubygem 的源居然被墙了……后来手动改成了我大淘宝的镜像源才成功
63 |
64 | Theme 的 CSS 是基于 Bootstrap 定制的,看得不爽的地方直接在 Less 里改就好了(平时更习惯 SCSS 些),**不过其实我一直觉得 Bootstrap 在移动端的体验做得相当一般,比我在淘宝参与的团队 CSS 框架差多了……**所以为了体验,也补了不少 CSS 进去
65 |
66 | 最后就进入了耗时反而最长的**做图、写字**阶段,也算是进入了**写博客**的正轨,因为是类似 Hack Day 的方式去搭这个站的,所以折腾折腾着大半夜就过去了。
67 |
68 | 第二天考虑中文字体的渲染,fork 了 [Type is Beautiful](http://www.typeisbeautiful.com/) 的 `font` CSS,调整了字号,适配了 Win 的渣渲染,中英文混排效果好多了。
69 |
70 |
71 | ## 后记
72 |
73 | 回顾这个博客的诞生,纯粹是出于个人兴趣。在知乎相关问题上回答并获得一定的 star 后,我决定把这个博客主题当作一个小小的开源项目来维护。
74 |
75 | 在经历 v1.0 - v1.5 的蜕变后,这个博客主题愈发完整,不但增加了诸多 UI 层的优化(opinionated);在代码层面,更加丰富的配置项也使得这个主题拥有了更好的灵活性与可拓展性。而作为一个开源项目,我也积极的为其完善文档与解决 issue。
76 |
77 | 如果你恰好逛到了这里,希望你也能喜欢这个博客主题。
78 |
79 | —— Hux 后记于 2015.10
80 |
--------------------------------------------------------------------------------
/source/_posts/hello-2015/post-bg-2015.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/_posts/hello-2015/post-bg-2015.jpg
--------------------------------------------------------------------------------
/source/_posts/js-module-7day.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: keynote
3 | title: "Example Post using Keynote Layout"
4 | subtitle: "Keynote: JavaScript Modularization Journey"
5 | iframe: "http://huangxuan.me/js-module-7day/"
6 | date: 2015-07-09
7 | author: "Hux"
8 | header-img: "post-bg-js-version.jpg"
9 | tags:
10 | - 前端开发
11 | - JavaScript
12 | ---
13 |
14 |
15 | > 下滑这里查看更多内容
16 |
17 | 7月9日,我在公司内部进行了名为「JavaScript 模块化七日谈」分享,并将该 Slides 分享到了微博上。出乎意料地,这篇微博先后被 @JS小组 @尤小右 @寸志 等近 200 人转发,阅读达到 10w,获得了还不错的评价。
18 |
19 | 于是,我决定将它重新发到我的博客上,并为它专门制作了适用于 Keynote 展示文稿的新布局。它能自动根据屏幕大小/旋转以一定比例填充屏幕,你也可以直接点击下方链接在新页面打开,来获得更好的、沉浸式的全屏体验
20 |
21 |
22 | ### [Watch Slides →](http://huangxuan.me/js-module-7day)
23 |
24 |
25 |
26 | 你也可以通过扫描二维码在手机上观看
27 |
28 |
29 | 这个 Web Slides 开源在[我的 Github 上](https://github.com/Huxpro/js-module-7day),欢迎你帮助我完善这个展示文稿,你可以给我提 issue,可以 fork & pull request。如果它能帮助到你了,希望你还能不吝啬 star 一下这个项目
30 |
31 |
32 | ### Catalog
33 |
34 | - 第一日 上古时期 ***Module?*** 从设计模式说起
35 | - 第二日 石器时代 ***Script Loader*** 只有封装性可不够,我们还需要加载
36 | - 第三日 蒸汽朋克 ***Module Loader*** 模块化架构的工业革命
37 | - 第四日 号角吹响 ***CommonJS*** 征服世界的第一步是跳出浏览器
38 | - 第五日 双塔奇兵 ***AMD/CMD*** 浏览器环境模块化方案
39 | - 第六日 精灵宝钻 ***Browserify/Webpack*** 大势所趋,去掉这层包裹!
40 | - 第七日 王者归来 ***ES6 Module*** 最后的战役
41 |
42 | ### Thanks
43 |
44 | [Reveal.js](http://lab.hakim.se/reveal-js)
45 |
--------------------------------------------------------------------------------
/source/_posts/js-module-loader.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Example Post with Code Highlight"
4 | subtitle: "CommonJS,RequireJS,SeaJS 归纳笔记"
5 | date: 2013-05-25
6 | author: "Hux"
7 | catalog: true
8 | header-img: "post-bg-js-module.jpg"
9 | tags:
10 | - 前端开发
11 | - JavaScript
12 | ---
13 |
14 |
15 |
16 | ## Foreword
17 |
18 | > Here comes Module!
19 |
20 | 随着网站逐渐变成「互联网应用程序」,嵌入网页的 JavaScript 代码越来越庞大,越来越复杂。网页越来越像桌面程序,需要一个团队分工协作、进度管理、单元测试……我们不得不使用软件工程的方法,来管理网页的业务逻辑。
21 |
22 | 于是,JavaScript 的模块化成为迫切需求。在 ES6 Module 来临之前,JavaScript 社区提供了强大支持,尝试在现有的运行环境下,实现模块的效果。
23 |
24 |
25 | ---
26 |
27 | ## Catalog
28 |
29 |
30 | 1. [CommonJS & Node](#commonjs--node)
31 | 3. [History](#history)
32 | 4. [RequireJS & AMD](#requirejs--amd)
33 | 5. [SeaJS & CMD](#seajs--cmd)
34 | 6. [AMD vs CMD](#amd-vs-cmd)
35 | 7. [WebPack](#webpack)
36 |
37 |
38 |
39 | ```
40 | function autoDetect(){
41 | console.log('ye, it is written in JavaScript!')
42 | }
43 | ```
44 |
45 | ## CommonJS & Node
46 |
47 | > Javascript: not just for browsers any more! —— CommonJS Slogen
48 |
49 | 前端模块化的事实标准之一,2009 年 8 月,[CommonJS](http://wiki.commonjs.org/wiki/CommonJS) 诞生。
50 |
51 | CommonJS 本质上只是一套规范(API 定义),而 Node.js 采用并实现了部分规范,CommonJS Module 的写法也因此广泛流行。
52 |
53 |
54 | 让我们看看 Node 中的实现:
55 | {% codeblock lang:js %}
56 | // 由于 Node 原生支持模块的作用域,并不需要额外的 wrapper
57 | // "as though the module was wrapped in a function"
58 |
59 | var a = require('./a') // 加载模块(同步加载)
60 | a.doSomething() // 等上一句执行完才会执行
61 |
62 | exports.b = function(){ // 暴露 b 函数接口
63 | // do something
64 | }
65 | {% endcodeblock %}
66 |
67 |
68 | `exports`是一个内置对象,就像`require`是一个内置加载函数一样。如果你希望直接赋值一个完整的对象或者构造函数,覆写`module.exports`就可以了。
69 |
70 | CommonJS 前身叫 ServerJS ,**后来希望能更加 COMMON,成为通吃各种环境的模块规范,改名为 CommonJS** 。CommonJS 最初只专注于 Server-side 而非浏览器环境,因此它采用了同步加载的机制,这对服务器环境(硬盘 I/O 速度)不是问题,而对浏览器环境(网速)来说并不合适。
71 |
72 |
73 | 因此,各种适用于浏览器环境的模块框架与标准逐个诞生,他们的共同点是:
74 |
75 | * 采用异步加载(预先加载所有依赖的模块后回调执行,符合浏览器的网络环境)
76 | * 虽然代码风格不同,但其实都可以看作 CommonJS Modules 语法的变体。
77 | * 都在向着 **COMMON** 的方向进化:**兼容不同风格,兼容浏览器和服务器两种环境**
78 |
79 | 本文接下来要讨论的典例是:
80 |
81 | * RequireJS & AMD(异步加载,预执行,依赖前置。默认推荐 AMD 写法)
82 | * SeaJS & CMD(异步加载,懒执行,依赖就近,默认推荐 CommonJS 写法)
83 |
84 |
85 |
86 |
87 |
88 | ## History
89 |
90 |
91 |
92 | > 此段落参考自玉伯的 [前端模块化开发那点历史](https://github.com/seajs/seajs/issues/588)
93 |
94 | 09-10 年间,CommonJS(那时还叫 ServerJS) 社区推出 [Modules/1.0](http://wiki.commonjs.org/wiki/Modules) 规范,并且在 Node.js 等环境下取得了很不错的实践。
95 |
96 | 09年下半年这帮充满干劲的小伙子们想把 ServerJS 的成功经验进一步推广到浏览器端,于是将社区改名叫 CommonJS,同时激烈争论 Modules 的下一版规范。分歧和冲突由此诞生,逐步形成了三大流派:
97 |
98 |
99 | 1. **Modules/1.x** 流派。这个观点觉得 1.x 规范已经够用,只要移植到浏览器端就好。要做的是新增 [Modules/Transport](http://wiki.commonjs.org/wiki/Modules/Transport) 规范,即在浏览器上运行前,先通过转换工具将模块转换为符合 Transport 规范的代码。主流代表是服务端的开发人员。现在值得关注的有两个实现:越来越火的 component 和走在前沿的 es6 module transpiler。
100 | 2. **Modules/Async** 流派。这个观点觉得浏览器有自身的特征,不应该直接用 Modules/1.x 规范。这个观点下的典型代表是 [AMD](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition) 规范及其实现 [RequireJS](http://requirejs.org/)。这个稍后再细说。
101 | 3. **Modules/2.0** 流派。这个观点觉得浏览器有自身的特征,不应该直接用 Modules/1.x 规范,但应该尽可能与 Modules/1.x 规范保持一致。这个观点下的典型代表是 BravoJS 和 FlyScript 的作者。BravoJS 作者对 CommonJS 的社区的贡献很大,这份 Modules/2.0-draft 规范花了很多心思。FlyScript 的作者提出了 Modules/Wrappings 规范,这规范是 CMD 规范的前身。可惜的是 BravoJS 太学院派,FlyScript 后来做了自我阉割,将整个网站(flyscript.org)下线了。这个观点在本文中的典型代表就是 SeaJS 和 CMD 了
102 |
103 |
104 | 补一嘴:阿里 KISSY 的 KMD 其实跟 AMD 非常类似,只是用 `add`和`use` 两个源自于 YUI Modules 的函数名替换了 `define` 和 `require` ,但其原理更接近 RequireJS ,与 YUI Modules 的 `Y` 沙箱 Attach 机制并不相同
105 |
106 |
107 | ## RequireJS & AMD
108 |
109 | [AMD (Async Module Definition)](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition) 是 RequireJS 在推广过程中对模块定义的规范化产出。
110 |
111 | > RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments
112 |
113 | RequireJS 主要解决的还是 CommonJS 同步加载脚本不适合浏览器 这个问题:
114 |
115 | {% gist 65481dbbf6d16e831a6cc89c3e37e6e5 display-emails-from-database.php %}
116 |
117 |
118 | > As the comment indicates above, if require() is async, this code will not work. However, loading scripts synchronously in the browser kills performance. So, what to do?
119 |
120 | 所以我们需要 **Function Wrapping** 来获取依赖并且提前通过 script tag 提前加载进来
121 |
122 |
123 | {% jsfiddle shorttag [tabs] [skin] [width] [height] %}
124 |
125 |
126 | 当依赖模块非常多时,这种**依赖前置**的写法会显得有点奇怪,所以 AMD 给了一个语法糖, **simplified CommonJS wrapping**,借鉴了 CommonJS 的 require 就近风格,也更方便对 CommonJS 模块的兼容:
127 |
128 | ```js
129 | define(function (require) {
130 | var dependency1 = require('dependency1'),
131 | dependency2 = require('dependency2');
132 |
133 | return function () {};
134 | });
135 | ```
136 | The AMD loader will parse out the `require('')` calls by using `Function.prototype.toString()`, then internally convert the above define call into this:
137 |
138 | ```js
139 | define(['require', 'dependency1', 'dependency2'], function (require) {
140 | var dependency1 = require('dependency1'),
141 | dependency2 = require('dependency2');
142 |
143 | return function () {};
144 | });
145 | ```
146 |
147 | 出于`Function.prototype.toString()`兼容性和性能的考虑,最好的做法还是做一次 **optimized build**
148 |
149 |
150 |
151 | AMD 和 CommonJS 的核心争议如下:
152 |
153 | ### 1. **执行时机**
154 |
155 | Modules/1.0:
156 |
157 | ```js
158 | var a = require("./a") // 执行到此时,a.js 才同步下载并执行
159 | ```
160 |
161 | AMD: (使用 require 的语法糖时)
162 |
163 | ```js
164 | define(["require"],function(require)){
165 | // 在这里,a.js 已经下载并且执行好了
166 | // 使用 require() 并不是 AMD 的推荐写法
167 | var a = require("./a") // 此处仅仅是取模块 a 的 exports
168 | })
169 | ```
170 |
171 | AMD 里提前下载 a.js 是出于对浏览器环境的考虑,只能采取异步下载,这个社区都认可(Sea.js 也是这么做的)
172 |
173 | 但是 AMD 的执行是 Early Executing,而 Modules/1.0 是第一次 require 时才执行。这个差异很多人不能接受,包括持 Modules/2.0 观点的人也不能接受。
174 |
175 | ### 2. **书写风格**
176 |
177 | AMD 推荐的风格并不使用`require`,而是通过参数传入,破坏了**依赖就近**:
178 |
179 | ```js
180 | define(["a", "b", "c"],function(a, b, c){
181 | // 提前申明了并初始化了所有模块
182 |
183 | true || b.foo(); //即便根本没用到模块 b,但 b 还是提前执行了。
184 | })
185 | ```
186 |
187 | 不过,在笔者看来,风格喜好因人而异,主要还是**预执行**和**懒执行**的差异。
188 |
189 | 另外,require 2.0 也开始思考异步处理**软依赖**(区别于一定需要的**硬依赖**)的问题,提出了这样的方案:
190 |
191 | ```js
192 | // 函数体内:
193 | if(status){
194 | async(['a'],function(a){
195 | a.doSomething()
196 | })
197 | }
198 | ```
199 |
200 | ## SeaJS & CMD
201 |
202 | CMD (Common Module Definition) 是 [SeaJS](http://seajs.org/docs/) 在推广过程中对模块定义的规范化产出,是 Modules/2.0 流派的支持者,因此 SeaJS 的模块写法尽可能与 Modules/1.x 规范保持一致。
203 |
204 | 不过目前国外的该流派都死得差不多了,RequireJS 目前成为浏览器端模块的事实标准,国内最有名气的就是玉伯的 Sea.js ,不过对国际的推广力度不够。
205 |
206 | * CMD Specification
207 | * [English (CMDJS-repo)](https://github.com/cmdjs/specification/blob/master/draft/module.md)
208 | * [Chinese (SeaJS-repo)](https://github.com/seajs/seajs/issues/242)
209 |
210 |
211 | CMD 主要有 define, factory, require, export 这么几个东西
212 |
213 | * define `define(id?, deps?, factory)`
214 | * factory `factory(require, exports, module)`
215 | * require `require(id)`
216 | * exports `Object`
217 |
218 |
219 | CMD 推荐的 Code Style 是使用 CommonJS 风格的 `require`:
220 |
221 | * 这个 require 实际上是一个全局函数,用于加载模块,这里实际就是传入而已
222 |
223 | ```js
224 | define(function(require, exports) {
225 |
226 | // 获取模块 a 的接口
227 | var a = require('./a');
228 | // 调用模块 a 的方法
229 | a.doSomething();
230 |
231 | // 对外提供 foo 属性
232 | exports.foo = 'bar';
233 | // 对外提供 doSomething 方法
234 | exports.doSomething = function() {};
235 |
236 | });
237 | ```
238 |
239 | 但是你也可以使用 AMD 风格,或者使用 return 来进行模块暴露
240 |
241 | ```js
242 | define('hello', ['jquery'], function(require, exports, module) {
243 |
244 | // 模块代码...
245 |
246 | // 直接通过 return 暴露接口
247 | return {
248 | foo: 'bar',
249 | doSomething: function() {}
250 | };
251 |
252 | });
253 | ```
254 |
255 |
256 |
257 | Sea.js 借鉴了 RequireJS 的不少东西,比如将 FlyScript 中的 module.declare 改名为 define 等。Sea.js 更多地来自 Modules/2.0 的观点,但尽可能去掉了学院派的东西,加入了不少实战派的理念。
258 |
259 |
260 |
261 | ## AMD vs CMD
262 |
263 | **虽然两者目前都兼容各种风格,但其底层原理并不相同,从其分别推荐的写法就可以看出两者背后原理的不同:**
264 |
265 | 1. 对于依赖的模块,AMD 是**提前执行**,CMD 是**懒执行**。(都是先加载)
266 | * CMD 推崇**依赖就近**,AMD 推崇**依赖前置**。
267 |
268 | 看代码:
269 |
270 | ```js
271 | // AMD 默认推荐
272 |
273 | define(['./a', './b'], function(a, b) { // 依赖前置,提前执行
274 |
275 | a.doSomething()
276 | b.doSomething()
277 |
278 | })
279 |
280 | ```
281 |
282 | ```js
283 | // CMD
284 |
285 | define(function(require, exports, module) {
286 |
287 | var a = require('./a')
288 | a.doSomething()
289 |
290 | var b = require('./b') // 依赖就近,延迟执行
291 | b.doSomething()
292 | })
293 | ```
294 |
295 |
296 |
297 |
298 |
299 |
300 | ## WebPack
301 |
302 | > working...
303 |
--------------------------------------------------------------------------------
/source/_posts/js-module-loader/post-bg-js-module.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/_posts/js-module-loader/post-bg-js-module.jpg
--------------------------------------------------------------------------------
/source/_posts/js-version.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Example Post"
4 | date: 2014-09-22
5 | author: "Hux"
6 | header-img: "post-bg-js-version.jpg"
7 | tags:
8 | - 前端开发
9 | - JavaScript
10 | - 翻译
11 | ---
12 |
13 |
14 | JavaScript 有着很奇怪的命名史。
15 |
16 | 1995 年,它作为网景浏览器(Netscape Navigator)的一部分首次发布,网景给这个新语言命名为 LiveScript。一年后,为了搭上当时媒体热炒 Java 的顺风车,临时改名为了 JavaScript *(当然,Java 和 JavaScript 的关系,就和雷锋和雷锋塔一样 —— 并没有什么关系)*
17 |
18 | 
19 | 歪果仁的笑话怎么一点都不好笑
20 |
21 | > 译者注:[wikipedia 的 JavaScript 词条](https://en.wikipedia.org/wiki/JavaScript#History) 更详细的叙述了这段历史
22 |
23 | 1996 年,网景将 JavaScript 提交给 [ECMA International(欧洲计算机制造商协会)](http://www.ecma-international.org/) 进行标准化,并最终确定出新的语言标准,它就是 ECMAScript。自此,ECMAScript 成为所有 JavaScript 实现的基础,不过,由于 JavaScript 名字的历史原因和市场原因(很显然 ECMAScript 这个名字并不令人喜欢……),现实中我们只用 ECMAScript 称呼标准,平时都还是使用 JavaScript 来称呼这个语言。
24 |
25 |
26 | > 术语(译者注):
27 | >
28 | > * *标准(Standard)*: 用于定义与其他事物区别的一套规则
29 | > * *实现(Implementation)*: 某个标准的具体实施/真实实践
30 |
31 |
32 | 不过,JavaScript 开发者们并不怎么在乎这些,因为在诞生之后的 15 年里,ECMAScript 并没有多少变化,而且现实中的很多实现都已经和标准大相径庭。其实在第一版的 ECMAScript 发布后,很快又跟进发布了两个版本,但是自从 1999 年 ECMAScript 3 发布后,十年内都没有任何改动被成功添加到官方规范里。取而代之的,是各大浏览器厂商们争先进行自己的语言拓展,web 开发者们别无选择只能去尝试并且支持这些 API。即使是在 2009 年 ECMAScript 5 发布之后,仍然用了数年这些新规范才得到了浏览器的广泛支持,可是大部分开发者还是写着 ECMAScript 3 风格的代码,并不觉得有必要去了解这些规范。
33 |
34 | > 译者注:[ECMAScript 第四版草案](https://en.wikipedia.org/wiki/ECMAScript#4th_Edition_.28abandoned.29)由于太过激进而被抛弃,Adobe 的 [ActionScript 3.0](https://en.wikipedia.org/wiki/ActionScript) 是 ECMAScript edition 4 的唯一实现( Flash 差点就统一 Web 了)
35 |
36 | 到了 2012 年,事情突然开始有了转变。大家开始推动停止对旧版本 IE 浏览器的支持,用 ECMAScript 5 (ES5) 风格来编写代码也变得更加可行。与此同时,一个新的 ECMAScript 规范也开始启动。到了这时,大家开始逐渐习惯以对 ECMAScript 规范的版本支持程度来形容各种 JavaScript 实现。在正式被指名为 ECMAScript 第 6 版 (ES6) 之前,这个新的标准原本被称为 ES.Harmony(和谐)。2015 年,负责制定 ECMAScript 规范草案的委员会 TC39 决定将定义新标准的制度改为一年一次,这意味着每个新特性一旦被批准就可以添加,而不像以往一样,规范只有在整个草案完成,所有特性都没问题后才能被定稿。因此,ECMAScript 第 6 版在六月份公布之前,又被重命名为了 ECMAScript 2015(ES2015)
37 |
38 | 目前,仍然有很多新的 JavaScript 特性或语法正在提议中,包括 [decorators(装饰者)](https://github.com/wycats/javascript-decorators),[async-await(async-await 异步编程模型)](https://github.com/lukehoban/ecmascript-asyncawait) 和 [static class properties(静态类属性)](https://github.com/jeffmo/es-class-properties)。它们通常被称为 ES7,ES2016 或者 ES.Next 的特性,不过实际上它们只能被称作提案或者说可能性,毕竟 ES2016 的规范还没有完成,有可能全部都会引入,也有可能一个都没有。TC39 把一个提案分为 4 个阶段,你可以在 [Babel 的官网](https://babeljs.io/docs/usage/experimental/) 上查看各个提案目前都在哪个阶段了。
39 |
40 | 所以,我们该如何使用这一大堆术语呢?下面的列表或许能帮助到你:
41 |
42 | * **ECMAScript**:一个由 ECMA International 进行标准化,TC39 委员会进行监督的语言。通常用于指代标准本身。
43 | * **JavaScript**:ECMAScript 标准的各种实现的最常用称呼。这个术语并不局限于某个特定版本的 ECMAScript 规范,并且可能被用于任何不同程度的任意版本的 ECMAScript 的实现。
44 | * **ECMAScript 5 (ES5)**:ECMAScript 的第五版修订,于 2009 年完成标准化。这个规范在所有现代浏览器中都相当完全的实现了。
45 | * **ECMAScript 6 (ES6) / ECMAScript 2015 (ES2015)**:ECMAScript 的第六版修订,于 2015 年完成标准化。这个标准被部分实现于大部分现代浏览器。可以查阅[这张兼容性表](http://kangax.github.io/compat-table/es6/)来查看不同浏览器和工具的实现情况。
46 | * **ECMAScript 2016**:预计的第七版 ECMAScript 修订,计划于明年夏季发布。这份规范具体将包含哪些特性还没有最终确定
47 | * **ECMAScript Proposals**:被考虑加入未来版本 ECMAScript 标准的特性与语法提案,他们需要经历五个阶段:Strawman(稻草人),Proposal(提议),Draft(草案),Candidate(候选)以及 Finished (完成)。
48 |
49 | 在这整个 Blog 中,我将把目前的 ECMAScript 版本称作 ES6(因为这是大部分开发者最习以为常的),把明年的规范称作 ES2016(因为,与 ES6/ES2015 不同,这个名字将在整个标准化过程中沿用)并且将那些还没有成为 ECMAScript 定稿或草案的未来语言概念称为 ECMAScript 提案或者 JavaScript 提案。我将尽我所能在任何可能引起困惑的场合沿用这篇文章。
50 |
51 | #### 一些资源
52 |
53 |
54 |
55 | * TC39 的 [Github 仓库](https://github.com/tc39/ecma262)上可以看到所有目前公开的提案
56 | * 如果你还不熟悉 ES6,Babel 有一个[很不错的特性概览](https://babeljs.io/docs/learn-es2015/)
57 | * 如果你希望深入 ES6,这里有两本很不错的书: Axel Rauschmayer 的 [Exploring ES6](http://exploringjs.com/)和 Nicholas Zakas 的 [Understanding ECMAScript 6](https://leanpub.com/understandinges6)。Axel 的博客 [2ality](http://www.2ality.com/) 也是很不错的 ES6 资源
58 |
59 |
60 | 来学 JavaScript 吧!
61 |
62 | #### 著作权声明
63 |
64 | 本文译自 [ES5, ES6, ES2016, ES.Next: What's going on with JavaScript versioning?](http://benmccormick.org/2015/09/14/es5-es6-es2016-es-next-whats-going-on-with-javascript-versioning/)
65 | 译者 [黄玄](http://weibo.com/huxpro),首次发布于 [Hux Blog](http://huangxuan.me),转载请保留以上链接
66 |
--------------------------------------------------------------------------------
/source/_posts/js-version/javascript-java.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/_posts/js-version/javascript-java.jpg
--------------------------------------------------------------------------------
/source/_posts/js-version/keep-calm-and-learn-javascript.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/_posts/js-version/keep-calm-and-learn-javascript.png
--------------------------------------------------------------------------------
/source/_posts/js-version/post-bg-js-version.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/_posts/js-version/post-bg-js-version.jpg
--------------------------------------------------------------------------------
/source/_posts/unix-linux-note.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Example Post With Default Header Image"
4 | subtitle: "不适合人类阅读,非常水的自我笔记"
5 | date: 2015-04-14
6 | author: "Hux"
7 | # header-img: "post-bg-unix-linux.jpg"
8 | tags:
9 | - OS
10 | - Unix
11 | - Linux
12 | ---
13 |
14 | > This document is not completed and will be updated anytime.
15 |
16 |
17 | ## Catagory
18 |
19 | 1. [Unix](#unix)
20 | 1. [Bell Labs](#bell-labs)
21 | 2. [Xenix](#xenix)
22 | 3. [BSD](#bsd)
23 | 4. [FreeBSD & Apple](#freebsd--apple)
24 | 5. [NeXTStep](#nextstep)
25 | 6. [Darwin](#darwin)
26 | 7. [POSIX](#posix)
27 | 2. [Unix-like](#unix-like)
28 | 1. [Single Unix Specification](#single-unix-specification)
29 | 2. [Apple iOS](#apple-ios)
30 | 3. [XNU Kernel](#xnu-kernel)
31 | 3. [Linux](#linux)
32 | 1. [Linux Kernel](#linux-kernel)
33 | 2. [GNU Project](#gnu-project)
34 | 3. [Android](#android)
35 | 4. [Android Kernel](#android-kernel)
36 | 5. [Android ROM](#android-rom)
37 | 6. [Chrome OS](#chrome-os)
38 | 7. [Chromium OS](#chromium-os)
39 |
40 | ---
41 |
42 | ## Unix
43 |
44 |
45 | > Unix is a **family** of multitasking, multiuser computer OS.
46 |
47 |
48 | Derive from the original **AT&T Unix**, Developed in the 1970s at **Bell Labs** (贝尔实验室), initially intended for use inside the **Bell System**.
49 |
50 | - #### Bell Labs
51 | Bell 和 AT&A 在那时已经是一家了,可以看到那时的通信公司真是一线 IT 公司呢。
52 | **C 语言也是 Bell Labs 的产物**,从一开始就是为了用于 Unix 而设计出来的。所以 Unix (在 73 年用 C 重写)在高校流行后,C 语言也获得了广泛支持。
53 |
54 |
55 |
56 | AT&T licensed Unix to outside parties(第三方) from the late 1970s, leading to a variety of both **academic** (最有有名的 BSD ) and **commercial** (Microsoft Xenix, IBM AIX, SunOS Solaris)
57 |
58 | - #### Xenix
59 | 微软 1979 年从 AT&A 授权来的 Unix OS,配合着 x86 成为当时最受欢迎的 Unix 发行版。后来 M$ 和 IBM 合作开发 OS/2 操作系统后放弃,后来最终转向 **Windows NT**。
60 |
61 | - #### BSD
62 | **Barkeley Software Distribution**, also called Berkeley Unix. Today the term "BSD" is used to refer to any of the BSD descendants(后代) which together form a branch of the family of Unix-like OS.(共同组成了一个分支)
63 | - **BSD 最大的贡献是在 BSD 中率先增加了虚拟存储器和 Internet 协议**,其 TCP/IP(IPv4 only) 代码仍然在现代 OS 上使用( Microsoft Windows and most of the foundation of Apple's OS X and iOS )
64 | - BSD 后来发展出了众多开源后代,包括 FreeBSD, OpenBSD, NetBSD 等等……很多闭源的 vendor Unix 也都从 BSD 衍生而来。
65 |
66 | - #### FreeBSD & Apple
67 | FreeBSD 不但是 Open Source BSD 中占有率最高的,还直接影响了 Apple Inc : NeXT Computer 的团队在 FreeBSD 上衍生出了 NeXTSTEP 操作系统,这货后来在 Apple 时期演化成了 **Darwin** ,这个“达尔文”居然还是个开源系统,而且是 the Core of **Mac OS X** and **iOS**.
68 |
69 | - #### NeXTSTEP
70 | An **object-oriented**, multitasking OS. Low-level C but High-level OC language and runtime the first time, combined with an **OO aplication layer** and including several "kits".
71 | 大家都知道 NeXT 是 Steve Jobs 被 forced out of Apple 后和 a few of his coworkers 创办的,所以 **NeXTSTEP 绝对是证明 Jobs 实力的作品。**
72 |
73 | - #### Darwin
74 | [Darwin](http://en.wikipedia.org/wiki/Darwin_(operating_system\)), the core set of components upon which Mac OS X and iOS based, mostly POSIX compatible, but has never, by itself, been certified as being compatible with any version of **POSIX**. (OS X, since Leopard, has been certified as compatible with the Single UNIX Specification version 3)
75 | **所以说 Mac OS X 算是很正统 Unix 的了**
76 |
77 | - #### POSIX
78 | 可移植操作系统接口, Portable Operating System Interface, is a family of standards specified by the IEEE from maintaining compatibility between OS, defines the API along with Command Line Shells and utility interfaces, for software comaptibility with variants of Unix and other OS.
79 | - Fully POSIX compliant:
80 | - OS X
81 | - QNX OS (BlackBerry)
82 | - Mostly complicant:
83 | - Linux
84 | - OpenBSD/FreeBSD
85 | - Darwin (Core of **iOS** & OS X)
86 | - **Android**
87 | - Complicant via compatibility feature (通过兼容功能实现兼容)
88 | - Windows NT Kernel
89 | - Windows Server 2000, 2003, 2008, 2008 R2, 2012
90 | - Symbian OS (with PIPS)
91 | - Symbian was a closed-source OS.
92 |
93 |
94 | ---
95 |
96 | ## Unix-like
97 |
98 | > A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the **Single UNIX Specification**.
99 |
100 | There is no standard for defining the term.
101 | 其实 Unix-like 是个相对模糊的概念:
102 |
103 | * 最狭义的 Unix 单指 Bell Labs's Unix
104 | * 稍广义的 Unix 指代所有 Licensed Unix, 即通过了 SUS 的 Unix-like ,比如 OS X
105 | * 最广义的 Unix 即所有 Unix-like 系统,无论它是否通过过任何 SUS,包括 Linux,BSD Family 等
106 |
107 | #### Single UNIX Specification
108 | The Single UNIX Specification (SUS) is the collective name of a family of standards for computer OS, compliance with which is required to **qualify for the name "Unix"**, like **POSIX**.
109 |
110 | #### Apple iOS
111 | iOS is a **Unix-like OS based on Darwin(BSD)** and OS X, which share some frameworks including Core Foundation, Founadtion and the Darwin foundation with OS X, but, Unix-like shell access is not avaliable for users and restricted for apps, **making iOS not fully Unix-compatible either.**
112 |
113 | The iOS kernal is **XNU**, the kernal of Darwin.
114 |
115 | #### XNU Kernel
116 | XNU, the acronym(首字母缩写) for ***X is Not Unix***, which is the **Computer OS Kernel** developed at Apple Inc since Dec 1996 for use in the Mac OS X and released as free open source software as part of Darwin.
117 |
118 |
119 | ---
120 |
121 | ## Linux
122 |
123 |
124 | > Linux is a Unix-like and mostly POSIX-compliant computer OS.
125 |
126 |
127 | 
128 |
129 |
130 | #### Linux Kernel
131 |
132 | 严格来讲,术语 Linux 只表示 [Linux Kernel](http://en.wikipedia.org/wiki/Linux_kernel) 操作系统内核本身,比如说 Android is Based on Linux (Kernel). Linus 编写的也只是这一部分,一个免费的 Unix-like Kernel,并不属于 GNU Project 的一部分。
133 |
134 | 但通常把 Linux 作为 Linux Kernel 与大量配合使用的 GNU Project Software Kit (包括 Bash, Lib, Compiler, 以及后期的 GUI etc) 所组合成的 OS 的统称。(包括各类 Distribution 发行版)
135 |
136 | 这类操作系统也被称为 **GNU/Linux**
137 |
138 |
139 | #### GNU Project
140 |
141 | The GNU Project is a **free software, mass collaboration** project, which based on the following freedom rights:
142 |
143 | * Users are free to run the software, share (copy, distribute), study and modify it.
144 | * GNU software guarantees these freedom-rights legally (via its license).
145 | * So it is not only FREE but, more important, FREEDOM.
146 |
147 | In order to ensure that the *entire* software of a computer grants its users all freedom rights (use, share, study, modify), even the most fundamental and important part, **the operating system**, needed to be written.
148 |
149 | This OS is decided to called **GNU (a recursive acronym meaning "GNU is not Unix")**. By 1992, the GNU Project had completed all of the major OS components except for their kernel, *GNU Hurd*.
150 |
151 | With the release of the third-party **Linux Kernel**, started independently by *Linus Torvalds* in 1991 and released under the GPLv0.12 in 1992, for the first time it was possible to run an OS **composed completely of free software**.
152 |
153 | Though the Linux kernel is not part of the GNU project, it was developed using GCC and other GNU programming tools and was released as free software under the GPL.
154 |
155 | Anyway, there eventually comes to the **GNU/Linux**
156 |
157 |
158 | * **GPL**: GNU General Public License
159 | * **GCC**: GNU Compiler Collection
160 |
161 | 其他与 GPL 相关的自由/开源软件公共许可证:
162 |
163 | * [Mozilla Public License](http://en.wikipedia.org/wiki/Mozilla_Public_License)
164 | * [MIT License](http://en.wikipedia.org/wiki/MIT_License)
165 | * [BSD Public License](http://en.wikipedia.org/wiki/BSD_licenses)
166 | * GPL 强制后续版本必须是自由软件,而 BSD 的后续可以选择继续开源或者封闭
167 | * [Apache License](http://en.wikipedia.org/wiki/Apache_License)
168 |
169 | 
170 |
171 | #### Android
172 |
173 | Android is a mobile OS based on **Linux Kernel**, so it's definitely **Unix-like**.
174 |
175 | **Linux is under GPL so Android has to be open source**.
176 | Android's source code is released by Google under open source licenses, although most Android devices ultimately ship with a combination of open source and proprietary software, including proprietary software developed and licensed by Google *(GMS are all proprietary)*
177 |
178 | #### Android Kernel
179 |
180 | Android's kernel is based on one of the Linux kernel's long-term support (LTS) branches.
181 |
182 | **Android's variant of the Linux kernel** has further architectural changes that are implemented by Google outside the typical Linux kernel development cycle, and, certain features that Google contributed back to the Linux kernel. Google maintains a public code repo that contains their experimental work to re-base Android off the latest stable Linux versions.
183 |
184 | Android Kernel 大概是 Linux Kernel 最得意的分支了,Android 也是 Linux 最流行的发行版。不过,也有一些 Google 工程师认为 Android is not Linux in the traditional Unix-like Linux distribution sense. 总之这类东西就算有各种协议也还是很难说清楚,在我理解里 Android Kernel 大概就是 fork Linux Kernel 之后改动和定制比较深的例子。
185 |
186 |
187 | #### Android ROM
188 |
189 | 既然提到 Android 就不得不提提 Android ROM
190 |
191 | ROM 的本义实际上是只读内存:
192 |
193 | **Read-only memory** (ROM) is a class of storage medium used in computers and other electronic devices. Data stored in ROM can only be modified slowly, with difficulty, or not at all, so it is **mainly used to distribute firmware (固件)** (software that is very closely tied to specific hardware, and unlikely to need frequent updates).
194 |
195 | ROM 在发展的过程中不断进化,从只读演变成了可编程可擦除,并最终演化成了 Flash
196 |
197 | * PROM (Programmable read-only memory)
198 | * EPROM (Erasable programmable read-only memory)
199 | * EEPROM (Electrically erasable programmable read-only memory)
200 | * Flash memory (闪存)
201 |
202 | Flash 的出现是历史性的,它不但可以作为 ROM 使用,又因其极高的读写速度和稳定性,先后发展成为U盘(USB flash drives)、移动设备主要内置存储,和虐机械硬盘几条街的固态硬盘(SSD),可以说这货基本统一了高端存储市场的技术规格。
203 |
204 | 所以我们平时习惯说的 ROM 其实还是来源于老单片机时代,那时的 ROM 真的是写了就很难(需要上电复位)、甚至无法修改,所以那时往 ROM 里烧下去的程序就被称作 firmware ,固件。久而久之,虽然技术发展了,固件仍然指代那些不常需要更新的软件,而 ROM 这个词也就这么沿用下来了。
205 |
206 | 所以在 wiki 里是没有 Android ROM 这个词条的,只有 [List of custom Android firmwares](http://en.wikipedia.org/wiki/List_of_custom_Android_firmwares)
207 |
208 | > A custom firmware, also known as a custom ROM, ROM, or custom OS, is an aftermarket distribution of the Android operating system. They are based on the Android Open Source Project (AOSP), hence most are open-sourced releases, unlike proprietary modifications by device manufacturers.
209 |
210 | 各类 Android ROM 在 Android 词类下也都是属于 **Forks and distributions** 一类的。
211 |
212 | 所以我说,其实各类 Android ROM 也好,fork Android 之流的 YunOS、FireOS 也好,改了多少东西,碰到多深的 codebase ……**其实 ROM 和 Distribution OS 的界限是很模糊的**,为什么 Android 就不可以是移动时代的 Linux ,为什么 Devlik/ART 就不能是移动时代的 GCC 呢?
213 |
214 | #### Chrome OS
215 |
216 | Chrome OS is an operating system based on the **Linux kernel** and designed by Google to work with web applications and installed applications.
217 |
218 | 虽然目前只是个 Web Thin Client OS ,但是 RoadMap 非常酷……
219 |
220 | * **Chrome Packaged Application** (Support working offline and installed)
221 | * **Android App Runtime** (run Android applications natively...fxxking awesome)
222 |
223 | 平复一下激动的心情,还是回到正题来:
224 |
225 | #### Chromium OS
226 |
227 | Chrome OS is based on Chromium OS, which is the open-source development version of Chrome OS, which is a **Linux distribution** designed by Google.
228 |
229 | For Detail, Chromium OS based on [Gentoo Linux](http://en.wikipedia.org/wiki/Gentoo_Linux), emm...
230 |
--------------------------------------------------------------------------------
/source/_posts/unix-linux-note/post-bg-unix-linux.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/_posts/unix-linux-note/post-bg-unix-linux.jpg
--------------------------------------------------------------------------------
/source/about/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: "about"
3 | title: "About"
4 | date: 2016-04-21 04:48:33
5 | description: "Hey, this is Kaijun."
6 | header-img: "img/about-bg.jpg"
7 | comments: true
8 | ---
9 |
10 |
11 | >写写代码,做做设计,看看产品。
12 | >世界那么大,多玩玩看看。
13 |
14 | 9月21日上午,阳光明媚,鲜花斗艳。帕洛阿尔托苹果店里欢声笑语,人头攒动。苹果公司首席执行官蒂姆·库克先生在店长欧阳猛南陪同下,不远千米,深入到一线店面,为那里的员工带去节曰的问候和良好的祝愿。 “果粉们,你们辛苦了,我代表某果公司,祝你们身体健康,生活幸福,工作成功!”库克亲切慰问广大员工和顾客,并就iOS7、iPhone 5S和iPhone 5C的销售状况进行调研。 “您现在每月工资有多少?肾5S拿到了吗?”在店里,库克关切地向果粉们问起这一问题。当听说果粉们排到了5S,库克满意地连连点头。接着他指出,近年来苹果事业发展取得巨大成就,特别是iPhone影响剧增,老百姓对iOS满意度逐步提高,在这个转变过程中,果粉的辛勤工作功不可没。 库克看到一个中国小朋友在排队买iPhone 5S,亲切的问:“5288元一台能承受不?”小朋友回答到:“能!”当得知这位小朋友卖了一个肾来买iPhone 5S时,库克叮嘱道:“在支持苹果的同时,也要爱护身体。” 库克与购买苹果手机的果粉们兴致勃勃地参观了苹果专卖店,和员工们拉了拉家常,并饶有兴趣地玩了四盘切西瓜游戏,与普通员工同乐。 在交谈中,库克多次关心地强调:“有了iPhone 5C,就不卖iPhone 5了。”并对顾客说:“好好休息,身体是革命的本钱嘛!”会谈始终在亲切友好的气氛中进行。 顾客们就库克的讲话达成了广泛的共识,并承认世界上只有iOS最流畅,要紧紧的团结在以库克先生为首席执行官的苹果公司集体周围,一心一意抓学习,聚精会神谋发展。
15 | 帕洛阿尔托苹果专卖店当日原则通过《蒂姆·库克首席执行官在加州新苹果店的讲话纪要》,并下发各分店认真学习、研讨。
16 |
17 |
18 | —— 李书航 - 什么是「共产中文腔调」?
19 |
--------------------------------------------------------------------------------
/source/archives/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: "archives"
3 | title: "Archives"
4 | description: "Hey, this is Archives."
5 | header-img: "img/tag-bg.jpg"
6 | ---
7 |
--------------------------------------------------------------------------------
/source/img/404-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/404-bg.jpg
--------------------------------------------------------------------------------
/source/img/about-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/about-bg.jpg
--------------------------------------------------------------------------------
/source/img/avatar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/avatar.jpg
--------------------------------------------------------------------------------
/source/img/contact-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/contact-bg.jpg
--------------------------------------------------------------------------------
/source/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/favicon.ico
--------------------------------------------------------------------------------
/source/img/home-bg-o.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/home-bg-o.jpg
--------------------------------------------------------------------------------
/source/img/home-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/home-bg.jpg
--------------------------------------------------------------------------------
/source/img/icon_wechat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/icon_wechat.png
--------------------------------------------------------------------------------
/source/img/tag-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/source/img/tag-bg.jpg
--------------------------------------------------------------------------------
/source/tags/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: "tags"
3 | title: "Tags"
4 | description: "Hey, this is Tags."
5 | header-img: "img/tag-bg.jpg"
6 | ---
7 |
--------------------------------------------------------------------------------
/themes/huxblog/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2013-2015 Iron Summit Media Strategies, LLC
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/themes/huxblog/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/themes/huxblog/README.md
--------------------------------------------------------------------------------
/themes/huxblog/_config.yml:
--------------------------------------------------------------------------------
1 |
2 | # Code Highlight theme
3 | # Available value:
4 | # normal | night | night yilia | night eighties | night blue | night bright
5 | # https://github.com/chriskempson/tomorrow-theme
6 | # night yilia - https://github.com/litten/hexo-theme-yilia
7 | highlight_theme: normal
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/de.yml:
--------------------------------------------------------------------------------
1 | prev: Vorherige Seite
2 | next: Nächste Seite
3 | comment: Kommentare
4 | archive_a: Archiv
5 | archive_b: "Archiv: %s"
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/default.yml:
--------------------------------------------------------------------------------
1 | prev: Older Posts
2 | next: Newer Posts
3 | comment: Comments
4 | archive_a: Archives
5 | archive_b: "Archives: %s"
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/en.yml:
--------------------------------------------------------------------------------
1 | prev: Older Posts
2 | next: Newer Posts
3 | comment: Comments
4 | archive_a: Archives
5 | archive_b: "Archives: %s"
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/es.yml:
--------------------------------------------------------------------------------
1 | prev: Anterior
2 | next: Siguiente
3 | comment: Comentarios
4 | archive_a: Archivo
5 | archive_b: "Archivo: %s"
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/no.yml:
--------------------------------------------------------------------------------
1 | prev: Forrige
2 | next: Neste
3 | comment: Kommentarer
4 | archive_a: Arkiv
5 | archive_b: "Arkiv: %s"
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/pl.yml:
--------------------------------------------------------------------------------
1 | prev: Poprzednia
2 | next: Następna
3 | comment: Komentarze
4 | archive_a: Archiwa
5 | archive_b: "Archiwa: %s"
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/ru.yml:
--------------------------------------------------------------------------------
1 | prev: Назад
2 | next: Вперед
3 | comment: Комментарии
4 | archive_a: Архив
5 | archive_b: "Архив: %s"
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/zh-CN.yml:
--------------------------------------------------------------------------------
1 | prev: 上一页
2 | next: 下一页
3 | comment: 留言
4 | archive_a: 归档
5 | archive_b: 归档:%s
6 |
--------------------------------------------------------------------------------
/themes/huxblog/languages_to_be_added/zh-TW.yml:
--------------------------------------------------------------------------------
1 | prev: 上一頁
2 | next: 下一頁
3 | comment: 留言
4 | archive_a: 彙整
5 | archive_b: 彙整:%s
--------------------------------------------------------------------------------
/themes/huxblog/layout/404.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout
3 | ---
4 |
5 |
6 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/_partial/footer.ejs:
--------------------------------------------------------------------------------
1 |
2 |
101 |
102 |
103 | <%- js('js/jquery.min.js') %>
104 |
105 |
106 | <%- js('js/bootstrap.min.js') %>
107 |
108 |
109 | <%- js('js/hux-blog.min.js') %>
110 |
111 |
112 |
113 |
123 |
124 |
133 |
141 |
142 |
143 |
144 |
156 |
157 |
158 |
164 |
165 |
166 |
167 |
168 | <% if (config.ga_track_id) { %>
169 |
183 |
184 | <% } %>
185 |
186 |
187 |
188 | <% if (config.ba_track_id) { %>
189 |
202 | <% } %>
203 |
204 |
205 | <% if (page.catalog) { %>
206 |
249 | <% } %>
250 |
251 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/_partial/head.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | <% if (page.title) { %>
12 | <%= page.title + ' - ' + config.SEOTitle %>
13 | <% } else{%>
14 | <%= config.SEOTitle %>
15 | <% } %>
16 |
17 |
18 |
19 |
20 |
21 | <%- css('css/bootstrap.min.css') %>
22 |
23 |
24 | <%- css('css/hux-blog.min.css') %>
25 |
26 |
27 | <%- css('css/highlight') %>
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
43 |
44 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/_partial/nav.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
16 |
21 |
22 |
23 |
24 |
25 | Home
26 |
27 |
28 | <% site.pages.forEach(function(page){ %>
29 |
30 | <% if(page.title){ %>
31 |
32 | <%= page.title %>
33 |
34 | <% } %>
35 | <% }); %>
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
72 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/_partial/pagination.ejs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/about.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | ---
4 |
5 |
6 |
7 |
8 | <%- page.content %>
9 |
10 |
11 |
12 |
13 |
14 | <% if(config['duoshuo_username']) { %>
15 |
16 |
17 |
24 |
25 |
40 |
41 | <% } %>
42 |
43 |
44 | <% if(config['disqus_username']) { %>
45 |
50 |
51 |
63 |
64 | <% } %>
65 |
66 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/archive.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout
3 | ---
4 |
5 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | <%
26 | var years = {};
27 | site.posts.sort('date').reverse().forEach(function(post){
28 | var year = post.date.year()
29 | if(years[year]===undefined){
30 | years[year] = [];
31 | }
32 | years[year].push(post);
33 | });
34 | %>
35 |
36 |
37 |
38 |
39 |
40 | <% Object.keys(years).reverse().forEach(function(year){ %>
41 |
42 |
43 | <%= year %>
44 |
45 |
64 |
65 | <% }) %>
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/index.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | ---
4 |
5 |
6 | <% page.posts.each(function(post){ %>
7 |
26 |
27 | <% }); %>
28 |
29 |
30 |
31 |
32 |
44 |
45 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/keynote.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout
3 | ---
4 |
5 |
6 |
7 |
8 |
9 |
10 |
22 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
58 |
59 | <%- page.content %>
60 |
61 |
62 |
63 | <% if(config['duoshuo_share'] && config['duoshuo_username']) { %>
64 |
65 |
66 |
"
72 | data-content="<%- truncate(strip_html(page.content), {length: 50, omission: '...'}) %> | <%= config.SEOTitle %> " >
73 |
83 |
84 |
85 |
86 | <% } %>
87 |
88 |
100 |
101 | <% if(config['duoshuo_username']) { %>
102 |
103 |
110 |
111 | <% } %>
112 |
113 | <% if(config['disqus_username']) { %>
114 |
115 |
118 |
119 | <% } %>
120 |
121 |
122 |
123 |
124 |
125 |
153 |
154 |
155 |
156 |
157 |
158 | <% if(config['duoshuo_username']) { %>
159 |
160 |
175 |
176 | <% } %>
177 |
178 | <% if(config['disqus_username']) { %>
179 |
180 |
192 |
193 | <% } %>
194 |
195 |
196 | <% if(config['anchorjs']) { %>
197 |
198 |
208 |
209 |
219 |
230 | <% } %>
231 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/layout.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | <%- partial('_partial/head') %>
6 |
7 |
8 |
9 |
10 | <%- partial('_partial/nav') %>
11 |
12 |
13 | <%- body %>
14 |
15 |
16 | <%- partial('_partial/footer') %>
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/page.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout
3 | ---
4 |
5 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | <% if(config.sidebar == false) { %>
25 |
26 |
27 |
28 | <%- page.content || body %>
29 |
30 |
31 |
64 | <%} else{ %>
65 |
66 |
67 |
68 |
75 |
76 | <%- page.content || body %>
77 |
78 |
79 | <% if(page.comments) { %>
80 |
81 |
82 | <% if(config['duoshuo_username']) { %>
83 |
84 |
91 |
92 | <% } %>
93 |
94 | <% if(config['disqus_username']) { %>
95 |
96 |
99 |
100 | <% } %>
101 |
102 |
103 | <% if(config['duoshuo_username']) { %>
104 |
105 |
120 |
121 | <% } %>
122 |
123 | <% if(config['disqus_username']) { %>
124 |
125 |
139 |
140 | <% } %>
141 |
142 |
143 |
144 | <% } %>
145 |
146 |
147 |
148 |
276 | <%} %>
277 |
278 |
279 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/post.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout
3 | ---
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
47 |
48 | <%- page.content %>
49 |
50 |
51 |
52 | <% if(config['duoshuo_share'] && config['duoshuo_username']) { %>
53 |
54 |
55 |
"
61 | data-content="<%- truncate(strip_html(page.content), {length: 50, omission: '...'}) %> | <%= config.SEOTitle %> " >
62 |
72 |
73 |
74 |
75 | <% } %>
76 |
77 |
89 |
90 | <% if(config['duoshuo_username']) { %>
91 |
92 |
99 |
100 | <% } %>
101 |
102 | <% if(config['disqus_username']) { %>
103 |
104 |
107 |
108 | <% } %>
109 |
110 |
111 |
112 | <% if (page.catalog) { %>
113 |
126 | <% } %>
127 |
128 |
129 |
130 |
160 |
161 |
162 |
163 |
164 |
165 | <% if(config['duoshuo_username']) { %>
166 |
167 |
182 |
183 | <% } %>
184 |
185 | <% if(config['disqus_username']) { %>
186 |
187 |
199 |
200 | <% } %>
201 |
202 |
203 | <% if(config['anchorjs']) { %>
204 |
205 |
215 |
216 |
226 |
237 | <% } %>
238 |
--------------------------------------------------------------------------------
/themes/huxblog/layout/tag.ejs:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout
3 | ---
4 |
5 |
6 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 | <% site.tags.map(function(tag){ %>
34 |
35 |
36 | <%= tag.name %>
37 |
38 | <% tag.posts.map(function(post){ %>
39 |
43 |
56 |
57 | <% }) %>
58 |
59 | <% }) %>
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/themes/huxblog/source/css/highlight.styl:
--------------------------------------------------------------------------------
1 | /*https://github.com/chriskempson/tomorrow-theme*/
2 |
3 | $highlight_theme = hexo-config("highlight_theme") || "normal"
4 |
5 |
6 | if $highlight_theme == "normal"
7 | $highlight-background = #f7f7f7
8 | $highlight-current-line = #efefef
9 | $highlight-selection = #d6d6d6
10 | $highlight-foreground = #4d4d4c
11 | $highlight-comment = #8e908c
12 | $highlight-red = #c82829
13 | $highlight-orange = #f5871f
14 | $highlight-yellow = #eab700
15 | $highlight-green = #718c00
16 | $highlight-aqua = #3e999f
17 | $highlight-blue = #4271ae
18 | $highlight-purple = #8959a8
19 |
20 | if $highlight_theme == "night"
21 | $highlight-background = #1d1f21
22 | $highlight-current-line = #282a2e
23 | $highlight-selection = #373b41
24 | $highlight-foreground = #c5c8c6
25 | $highlight-comment = #969896
26 | $highlight-red = #cc6666
27 | $highlight-orange = #de935f
28 | $highlight-yellow = #f0c674
29 | $highlight-green = #b5bd68
30 | $highlight-aqua = #8abeb7
31 | $highlight-blue = #81a2be
32 | $highlight-purple = #b294bb
33 |
34 | if $highlight_theme == "night yilia"
35 | $highlight-background = #4d4d4d
36 | $highlight-current-line = #393939
37 | $highlight-selection = #515151
38 | $highlight-foreground = #FFFFFF
39 | $highlight-comment = #75715E
40 | $highlight-red = #FD971F
41 | $highlight-orange = #f99157
42 | $highlight-yellow = #ffcc66
43 | $highlight-green = #E6DB74
44 | $highlight-aqua = #66cccc
45 | $highlight-blue = #A6E22E
46 | $highlight-purple = #F92672
47 |
48 | if $highlight_theme == "night eighties"
49 | $highlight-background = #2d2d2d
50 | $highlight-current-line = #393939
51 | $highlight-selection = #515151
52 | $highlight-foreground = #cccccc
53 | $highlight-comment = #999999
54 | $highlight-red = #f2777a
55 | $highlight-orange = #f99157
56 | $highlight-yellow = #ffcc66
57 | $highlight-green = #99cc99
58 | $highlight-aqua = #66cccc
59 | $highlight-blue = #6699cc
60 | $highlight-purple = #cc99cc
61 |
62 | if $highlight_theme == "night blue"
63 | $highlight-background = #002451
64 | $highlight-current-line = #00346e
65 | $highlight-selection = #003f8e
66 | $highlight-foreground = #ffffff
67 | $highlight-comment = #7285b7
68 | $highlight-red = #ff9da4
69 | $highlight-orange = #ffc58f
70 | $highlight-yellow = #ffeead
71 | $highlight-green = #d1f1a9
72 | $highlight-aqua = #99ffff
73 | $highlight-blue = #bbdaff
74 | $highlight-purple = #ebbbff
75 |
76 | if $highlight_theme == "night bright"
77 | $highlight-background = #000000
78 | $highlight-current-line = #2a2a2a
79 | $highlight-selection = #424242
80 | $highlight-foreground = #eaeaea
81 | $highlight-comment = #969896
82 | $highlight-red = #d54e53
83 | $highlight-orange = #e78c45
84 | $highlight-yellow = #e7c547
85 | $highlight-green = #b9ca4a
86 | $highlight-aqua = #70c0b1
87 | $highlight-blue = #7aa6da
88 | $highlight-purple = #c397d8
89 |
90 |
91 | clearfix()
92 | &:before
93 | &:after
94 | content: ""
95 | display: table
96 | &:after
97 | clear: both
98 | zoom: 1 if support-for-ie
99 |
100 | line-height = 1.6em
101 | font-size = 14px
102 | article-padding = 20px
103 | color-border = #ddd
104 |
105 |
106 | $code-font-size = 13px
107 | $code-background = #eee
108 | $code-foreground = #555
109 | $code-border-radius = 4px
110 |
111 |
112 | // Placeholder: $code-block
113 | $code-block {
114 | overflow: auto;
115 | margin: 20px 0;
116 | padding: 15px;
117 | font-size $code-font-size;
118 | color: $highlight-foreground;
119 | background: $highlight-background;
120 | line-height: $line-height-code-block;
121 | }
122 |
123 | /*pre, code {
124 | font-family: $code-font-family;
125 | }*/
126 |
127 | /*
128 | .post-container code {
129 | padding: 2px 4px;
130 | word-break: break-all;
131 | color: $code-foreground;
132 | background: $code-background;
133 | border-radius: $code-border-radius;
134 | font-size $code-font-size;
135 | }*/
136 |
137 | .post-container pre {
138 | @extend $code-block;
139 |
140 | code {
141 | padding: 0;
142 | color: $highlight-foreground;
143 | background: none;
144 | text-shadow: none;
145 | }
146 | }
147 |
148 | .post-container .highlight {
149 | @extend $code-block;
150 |
151 | pre {
152 | border: none;
153 | margin: 0;
154 | padding: 1px;
155 | }
156 |
157 | table {
158 | margin: 0;
159 | width: auto;
160 | border: none;
161 | }
162 |
163 | td {
164 | border: none !important;
165 | padding: 0;
166 | }
167 |
168 | figcaption {
169 | clearfix();
170 | font-size: 1em;
171 | color: $highlight-foreground;
172 | line-height: 1em;
173 | margin-bottom: 1em;
174 |
175 | a {
176 | float: right;
177 | color: $highlight-foreground;
178 |
179 | &:hover { border-bottom-color: $highlight-foreground; }
180 | }
181 | }
182 |
183 | .gutter pre {
184 | color: #666;
185 | text-align: right;
186 | padding-right: 20px;
187 | }
188 |
189 | .line { height: 20px; }
190 | }
191 |
192 |
193 | .post-container .gist table {
194 | width: auto;
195 |
196 | td { border: none; }
197 | }
198 |
199 | .post-container pre {
200 |
201 | .comment { color: $highlight-comment; }
202 |
203 | .variable
204 | .attribute
205 | .tag
206 | .regexp
207 | .ruby .constant
208 | .xml .tag .title
209 | .xml .pi
210 | .xml .doctype
211 | .html .doctype
212 | .css .id
213 | .css .class
214 | .css .pseudo {
215 | color: $highlight-red;
216 | }
217 |
218 | .number
219 | .preprocessor
220 | .built_in
221 | .literal
222 | .params
223 | .constant
224 | .command {
225 | color: $highlight-orange;
226 | }
227 |
228 | .ruby .class .title
229 | .css .rules .attribute
230 | .string
231 | .value
232 | .inheritance
233 | .header
234 | .ruby .symbol
235 | .xml .cdata
236 | .special
237 | .number
238 | .formula {
239 | color: $highlight-green;
240 | }
241 |
242 | .title
243 | .css .hexcolor {
244 | color: $highlight-aqua;
245 | }
246 |
247 | .function
248 | .python .decorator
249 | .python .title
250 | .ruby .function .title
251 | .ruby .title .keyword
252 | .perl .sub
253 | .javascript .title
254 | .coffeescript .title {
255 | color: $highlight-blue;
256 | }
257 |
258 | .keyword
259 | .javascript .function {
260 | color: $highlight-purple;
261 | }
262 |
263 | }
--------------------------------------------------------------------------------
/themes/huxblog/source/css/hux-blog.css:
--------------------------------------------------------------------------------
1 | @media (min-width: 1200px) {
2 | .post-container,
3 | .sidebar-container {
4 | padding-right: 5%;
5 | }
6 | }
7 | @media (min-width: 768px) {
8 | .post-container {
9 | padding-right: 5%;
10 | }
11 | }
12 | .sidebar-container {
13 | color: #bfbfbf;
14 | font-size: 14px;
15 | }
16 | .sidebar-container h5 {
17 | color: #808080;
18 | padding-bottom: 1em;
19 | }
20 | .sidebar-container h5 a {
21 | color: #808080 !important;
22 | text-decoration: none;
23 | }
24 | .sidebar-container a {
25 | color: #bfbfbf !important;
26 | }
27 | .sidebar-container a:hover,
28 | .sidebar-container a:active {
29 | color: #0085a1 !important;
30 | }
31 | .sidebar-container .tags a {
32 | border-color: #bfbfbf;
33 | }
34 | .sidebar-container .tags a:hover,
35 | .sidebar-container .tags a:active {
36 | border-color: #0085a1;
37 | }
38 | .sidebar-container .short-about img {
39 | width: 80%;
40 | display: block;
41 | border-radius: 5px;
42 | margin-bottom: 20px;
43 | }
44 | .sidebar-container .short-about p {
45 | margin-top: 0px;
46 | margin-bottom: 20px;
47 | }
48 | .sidebar-container .short-about .list-inline > li {
49 | padding-left: 0px;
50 | }
51 | body {
52 | /* Hux learn from
53 | * TypeIsBeautiful,
54 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc.
55 | */
56 | font-family: -apple-system, "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
57 | line-height: 1.7;
58 | font-size: 16px;
59 | color: #404040;
60 | overflow-x: hidden;
61 | }
62 | p {
63 | margin: 30px 0;
64 | }
65 | h1,
66 | h2,
67 | h3,
68 | h4,
69 | h5,
70 | h6 {
71 | /* Hux learn from
72 | * TypeIsBeautiful,
73 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc.
74 | */
75 | font-family: -apple-system, "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
76 | line-height: 1.7;
77 | line-height: 1.1;
78 | font-weight: bold;
79 | }
80 | h4 {
81 | font-size: 21px;
82 | }
83 | a {
84 | color: #404040;
85 | }
86 | a:hover,
87 | a:focus {
88 | color: #0085a1;
89 | }
90 | a img:hover,
91 | a img:focus {
92 | cursor: zoom-in;
93 | }
94 | article {
95 | overflow-x: hidden;
96 | }
97 | blockquote {
98 | color: #808080;
99 | font-style: italic;
100 | font-size: 0.95em;
101 | margin: 20px 0 20px;
102 | }
103 | blockquote p {
104 | margin: 0;
105 | }
106 | small.img-hint {
107 | display: block;
108 | margin-top: -20px;
109 | text-align: center;
110 | }
111 | br + small.img-hint {
112 | margin-top: -40px;
113 | }
114 | img.shadow {
115 | box-shadow: rgba(0, 0, 0, 0.258824) 0px 2px 5px 0px;
116 | }
117 | @media screen and (max-width: 768px) {
118 | select {
119 | -webkit-appearance: none;
120 | margin-top: 15px;
121 | color: #337ab7;
122 | border-color: #337ab7;
123 | padding: 0em 0.4em;
124 | background: white;
125 | }
126 | }
127 | .table th,
128 | .table td {
129 | border: 1px solid #eee !important;
130 | }
131 | hr.small {
132 | max-width: 100px;
133 | margin: 15px auto;
134 | border-width: 4px;
135 | border-color: white;
136 | }
137 | pre,
138 | .table-responsive {
139 | -webkit-overflow-scrolling: touch;
140 | }
141 | pre code {
142 | display: block;
143 | width: auto;
144 | white-space: pre;
145 | word-wrap: normal;
146 | }
147 | .post-container a {
148 | color: #337ab7;
149 | }
150 | .post-container a:hover,
151 | .post-container a:focus {
152 | color: #0085a1;
153 | }
154 | .post-container h1,
155 | .post-container h2,
156 | .post-container h3,
157 | .post-container h4,
158 | .post-container h5,
159 | .post-container h6 {
160 | margin: 30px 0 10px;
161 | }
162 | .post-container h5 {
163 | font-size: 19px;
164 | font-weight: 600;
165 | color: gray;
166 | }
167 | .post-container h5 + p {
168 | margin-top: 5px;
169 | }
170 | .post-container h6 {
171 | font-size: 16px;
172 | font-weight: 600;
173 | color: gray;
174 | }
175 | .post-container h6 + p {
176 | margin-top: 5px;
177 | }
178 | .post-container ul,
179 | .post-container ol {
180 | margin-bottom: 40px;
181 | }
182 | @media screen and (max-width: 768px) {
183 | .post-container ul,
184 | .post-container ol {
185 | padding-left: 30px;
186 | }
187 | }
188 | @media screen and (max-width: 500px) {
189 | .post-container ul,
190 | .post-container ol {
191 | padding-left: 20px;
192 | }
193 | }
194 | .post-container ol ol,
195 | .post-container ol ul,
196 | .post-container ul ol,
197 | .post-container ul ul {
198 | margin-bottom: 5px;
199 | }
200 | .post-container li p {
201 | margin: 0;
202 | margin-bottom: 5px;
203 | }
204 | .post-container li h1,
205 | .post-container li h2,
206 | .post-container li h3,
207 | .post-container li h4,
208 | .post-container li h5,
209 | .post-container li h6 {
210 | line-height: 2;
211 | margin-top: 20px;
212 | }
213 | @media only screen and (max-width: 767px) {
214 | .navbar-default .navbar-collapse {
215 | border: none;
216 | background: white;
217 | box-shadow: 0px 5px 10px 2px rgba(0, 0, 0, 0.2);
218 | box-shadow: rgba(0, 0, 0, 0.117647) 0px 1px 6px, rgba(0, 0, 0, 0.239216) 0px 1px 4px;
219 | border-radius: 2px;
220 | width: 170px;
221 | float: right;
222 | margin: 0px;
223 | }
224 | #huxblog_navbar {
225 | opacity: 0;
226 | transform: scaleX(0);
227 | transform-origin: top right;
228 | transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
229 | -webkit-transform: scaleX(0);
230 | -webkit-transform-origin: top right;
231 | -webkit-transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
232 | }
233 | #huxblog_navbar a {
234 | font-size: 13px;
235 | line-height: 28px;
236 | }
237 | #huxblog_navbar .navbar-collapse {
238 | height: 0px;
239 | transform: scaleY(0);
240 | transform-origin: top right;
241 | transition: transform 500ms cubic-bezier(0.23, 1, 0.32, 1);
242 | -webkit-transform: scaleY(0);
243 | -webkit-transform-origin: top right;
244 | -webkit-transition: -webkit-transform 500ms cubic-bezier(0.23, 1, 0.32, 1);
245 | }
246 | #huxblog_navbar li {
247 | opacity: 0;
248 | transition: opacity 450ms cubic-bezier(0.23, 1, 0.32, 1) 205ms;
249 | -webkit-transition: opacity 450ms cubic-bezier(0.23, 1, 0.32, 1) 205ms;
250 | }
251 | #huxblog_navbar.in {
252 | transform: scaleX(1);
253 | -webkit-transform: scaleX(1);
254 | opacity: 1;
255 | }
256 | #huxblog_navbar.in .navbar-collapse {
257 | transform: scaleY(1);
258 | -webkit-transform: scaleY(1);
259 | }
260 | #huxblog_navbar.in li {
261 | opacity: 1;
262 | }
263 | }
264 | .navbar-custom {
265 | background: none;
266 | border: none;
267 | position: absolute;
268 | top: 0;
269 | left: 0;
270 | width: 100%;
271 | z-index: 3;
272 | /* Hux learn from
273 | * TypeIsBeautiful,
274 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc.
275 | */
276 | font-family: -apple-system, "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
277 | line-height: 1.7;
278 | }
279 | .navbar-custom .navbar-brand {
280 | font-weight: 800;
281 | color: white;
282 | height: 56px;
283 | line-height: 25px;
284 | }
285 | .navbar-custom .navbar-brand:hover {
286 | color: rgba(255, 255, 255, 0.8);
287 | }
288 | .navbar-custom .nav li a {
289 | text-transform: uppercase;
290 | font-size: 12px;
291 | line-height: 20px;
292 | font-weight: 800;
293 | letter-spacing: 1px;
294 | }
295 | .navbar-custom .nav li a:active {
296 | background: rgba(0, 0, 0, 0.12);
297 | }
298 | @media only screen and (min-width: 768px) {
299 | .navbar-custom {
300 | background: transparent;
301 | border-bottom: 1px solid transparent;
302 | }
303 | .navbar-custom body {
304 | font-size: 20px;
305 | }
306 | .navbar-custom .navbar-brand {
307 | color: white;
308 | padding: 20px;
309 | line-height: 20px;
310 | }
311 | .navbar-custom .navbar-brand:hover,
312 | .navbar-custom .navbar-brand:focus {
313 | color: rgba(255, 255, 255, 0.8);
314 | }
315 | .navbar-custom .nav li a {
316 | color: white;
317 | padding: 20px;
318 | }
319 | .navbar-custom .nav li a:hover,
320 | .navbar-custom .nav li a:focus {
321 | color: rgba(255, 255, 255, 0.8);
322 | }
323 | .navbar-custom .nav li a:active {
324 | background: none;
325 | }
326 | }
327 | @media only screen and (min-width: 1170px) {
328 | .navbar-custom {
329 | -webkit-transition: background-color 0.3s;
330 | -moz-transition: background-color 0.3s;
331 | transition: background-color 0.3s;
332 | /* Force Hardware Acceleration in WebKit */
333 | -webkit-transform: translate3d(0, 0, 0);
334 | -moz-transform: translate3d(0, 0, 0);
335 | -ms-transform: translate3d(0, 0, 0);
336 | -o-transform: translate3d(0, 0, 0);
337 | transform: translate3d(0, 0, 0);
338 | -webkit-backface-visibility: hidden;
339 | backface-visibility: hidden;
340 | }
341 | .navbar-custom.is-fixed {
342 | /* when the user scrolls down, we hide the header right above the viewport */
343 | position: fixed;
344 | top: -61px;
345 | background-color: rgba(255, 255, 255, 0.9);
346 | border-bottom: 1px solid #f2f2f2;
347 | -webkit-transition: -webkit-transform 0.3s;
348 | -moz-transition: -moz-transform 0.3s;
349 | transition: transform 0.3s;
350 | }
351 | .navbar-custom.is-fixed .navbar-brand {
352 | color: #404040;
353 | }
354 | .navbar-custom.is-fixed .navbar-brand:hover,
355 | .navbar-custom.is-fixed .navbar-brand:focus {
356 | color: #0085a1;
357 | }
358 | .navbar-custom.is-fixed .nav li a {
359 | color: #404040;
360 | }
361 | .navbar-custom.is-fixed .nav li a:hover,
362 | .navbar-custom.is-fixed .nav li a:focus {
363 | color: #0085a1;
364 | }
365 | .navbar-custom.is-visible {
366 | /* if the user changes the scrolling direction, we show the header */
367 | -webkit-transform: translate3d(0, 100%, 0);
368 | -moz-transform: translate3d(0, 100%, 0);
369 | -ms-transform: translate3d(0, 100%, 0);
370 | -o-transform: translate3d(0, 100%, 0);
371 | transform: translate3d(0, 100%, 0);
372 | }
373 | }
374 | .intro-header {
375 | background: no-repeat center center;
376 | background-color: #808080;
377 | background-attachment: scroll;
378 | -webkit-background-size: cover;
379 | -moz-background-size: cover;
380 | background-size: cover;
381 | -o-background-size: cover;
382 | margin-bottom: 0px;
383 | /* 0 on mobile, modify by Hux */
384 | }
385 | @media only screen and (min-width: 768px) {
386 | .intro-header {
387 | margin-bottom: 20px;
388 | /* response on desktop */
389 | }
390 | }
391 | .intro-header .site-heading,
392 | .intro-header .post-heading,
393 | .intro-header .page-heading {
394 | padding: 85px 0 55px;
395 | color: white;
396 | }
397 | @media only screen and (min-width: 768px) {
398 | .intro-header .site-heading,
399 | .intro-header .post-heading,
400 | .intro-header .page-heading {
401 | padding: 150px 0;
402 | }
403 | }
404 | .intro-header .site-heading {
405 | padding: 95px 0 70px;
406 | }
407 | @media only screen and (min-width: 768px) {
408 | .intro-header .site-heading {
409 | padding: 150px 0;
410 | }
411 | }
412 | .intro-header .site-heading,
413 | .intro-header .page-heading {
414 | text-align: center;
415 | }
416 | .intro-header .site-heading h1,
417 | .intro-header .page-heading h1 {
418 | margin-top: 0;
419 | font-size: 50px;
420 | }
421 | .intro-header .site-heading .subheading,
422 | .intro-header .page-heading .subheading {
423 | /* Hux learn from
424 | * TypeIsBeautiful,
425 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc.
426 | */
427 | font-family: -apple-system, "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
428 | line-height: 1.7;
429 | font-size: 18px;
430 | line-height: 1.1;
431 | display: block;
432 | font-weight: 300;
433 | margin: 10px 0 0;
434 | }
435 | @media only screen and (min-width: 768px) {
436 | .intro-header .site-heading h1,
437 | .intro-header .page-heading h1 {
438 | font-size: 80px;
439 | }
440 | }
441 | .intro-header .post-heading h1 {
442 | font-size: 30px;
443 | margin-bottom: 24px;
444 | }
445 | .intro-header .post-heading .subheading,
446 | .intro-header .post-heading .meta {
447 | line-height: 1.1;
448 | display: block;
449 | }
450 | .intro-header .post-heading .subheading {
451 | /* Hux learn from
452 | * TypeIsBeautiful,
453 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc.
454 | */
455 | font-family: -apple-system, "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
456 | line-height: 1.7;
457 | font-size: 17px;
458 | line-height: 1.4;
459 | font-weight: normal;
460 | margin: 10px 0 30px;
461 | margin-top: -5px;
462 | }
463 | .intro-header .post-heading .meta {
464 | font-family: 'Lora', 'Times New Roman', serif;
465 | font-style: italic;
466 | font-weight: 300;
467 | font-size: 18px;
468 | }
469 | .intro-header .post-heading .meta a {
470 | color: white;
471 | }
472 | @media only screen and (min-width: 768px) {
473 | .intro-header .post-heading h1 {
474 | font-size: 55px;
475 | }
476 | .intro-header .post-heading .subheading {
477 | font-size: 30px;
478 | }
479 | .intro-header .post-heading .meta {
480 | font-size: 20px;
481 | }
482 | }
483 | .post-preview > a {
484 | color: #404040;
485 | }
486 | .post-preview > a:hover,
487 | .post-preview > a:focus {
488 | text-decoration: none;
489 | color: #0085a1;
490 | }
491 | .post-preview > a > .post-title {
492 | font-size: 21px;
493 | line-height: 1.3;
494 | margin-top: 30px;
495 | margin-bottom: 8px;
496 | }
497 | .post-preview > a > .post-subtitle {
498 | font-size: 15px;
499 | line-height: 1.3;
500 | margin: 0;
501 | font-weight: 300;
502 | margin-bottom: 10px;
503 | }
504 | .post-preview > .post-meta {
505 | font-family: 'Lora', 'Times New Roman', serif;
506 | color: #808080;
507 | font-size: 16px;
508 | font-style: italic;
509 | margin-top: 0;
510 | }
511 | .post-preview > .post-meta > a {
512 | text-decoration: none;
513 | color: #404040;
514 | }
515 | .post-preview > .post-meta > a:hover,
516 | .post-preview > .post-meta > a:focus {
517 | color: #0085a1;
518 | text-decoration: underline;
519 | }
520 | @media only screen and (min-width: 768px) {
521 | .post-preview > a > .post-title {
522 | font-size: 26px;
523 | line-height: 1.3;
524 | margin-bottom: 10px;
525 | }
526 | .post-preview > a > .post-subtitle {
527 | font-size: 16px;
528 | }
529 | .post-preview .post-meta {
530 | font-size: 18px;
531 | }
532 | }
533 | .post-content-preview {
534 | font-size: 13px;
535 | font-style: italic;
536 | color: #a3a3a3;
537 | }
538 | .post-content-preview:hover {
539 | color: #0085a1;
540 | }
541 | @media only screen and (min-width: 768px) {
542 | .post-content-preview {
543 | font-size: 14px;
544 | }
545 | }
546 | .section-heading {
547 | font-size: 36px;
548 | margin-top: 60px;
549 | font-weight: 700;
550 | }
551 | .caption {
552 | text-align: center;
553 | font-size: 14px;
554 | padding: 10px;
555 | font-style: italic;
556 | margin: 0;
557 | display: block;
558 | border-bottom-right-radius: 5px;
559 | border-bottom-left-radius: 5px;
560 | }
561 | footer {
562 | font-size: 20px;
563 | padding: 50px 0 65px;
564 | }
565 | footer .list-inline {
566 | margin: 0;
567 | padding: 0;
568 | }
569 | footer .copyright {
570 | font-size: 14px;
571 | text-align: center;
572 | margin-bottom: 0;
573 | }
574 | footer .copyright a {
575 | color: #337ab7;
576 | }
577 | footer .copyright a:hover,
578 | footer .copyright a:focus {
579 | color: #0085a1;
580 | }
581 | .floating-label-form-group {
582 | font-size: 14px;
583 | position: relative;
584 | margin-bottom: 0;
585 | padding-bottom: 0.5em;
586 | border-bottom: 1px solid #eeeeee;
587 | }
588 | .floating-label-form-group input,
589 | .floating-label-form-group textarea {
590 | z-index: 1;
591 | position: relative;
592 | padding-right: 0;
593 | padding-left: 0;
594 | border: none;
595 | border-radius: 0;
596 | font-size: 1.5em;
597 | background: none;
598 | box-shadow: none !important;
599 | resize: none;
600 | }
601 | .floating-label-form-group label {
602 | display: block;
603 | z-index: 0;
604 | position: relative;
605 | top: 2em;
606 | margin: 0;
607 | font-size: 0.85em;
608 | line-height: 1.764705882em;
609 | vertical-align: middle;
610 | vertical-align: baseline;
611 | opacity: 0;
612 | -webkit-transition: top 0.3s ease,opacity 0.3s ease;
613 | -moz-transition: top 0.3s ease,opacity 0.3s ease;
614 | -ms-transition: top 0.3s ease,opacity 0.3s ease;
615 | transition: top 0.3s ease,opacity 0.3s ease;
616 | }
617 | .floating-label-form-group::not(:first-child) {
618 | padding-left: 14px;
619 | border-left: 1px solid #eeeeee;
620 | }
621 | .floating-label-form-group-with-value label {
622 | top: 0;
623 | opacity: 1;
624 | }
625 | .floating-label-form-group-with-focus label {
626 | color: #0085a1;
627 | }
628 | form .row:first-child .floating-label-form-group {
629 | border-top: 1px solid #eeeeee;
630 | }
631 | .btn {
632 | /* Hux learn from
633 | * TypeIsBeautiful,
634 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc.
635 | */
636 | font-family: -apple-system, "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
637 | line-height: 1.7;
638 | text-transform: uppercase;
639 | font-size: 14px;
640 | font-weight: 800;
641 | letter-spacing: 1px;
642 | border-radius: 0;
643 | padding: 15px 25px;
644 | }
645 | .btn-lg {
646 | font-size: 16px;
647 | padding: 25px 35px;
648 | }
649 | .btn-default:hover,
650 | .btn-default:focus {
651 | background-color: #0085a1;
652 | border: 1px solid #0085a1;
653 | color: white;
654 | }
655 | .pager {
656 | margin: 20px 0 0 !important;
657 | padding: 0px !important;
658 | }
659 | .pager li > a,
660 | .pager li > span {
661 | /* Hux learn from
662 | * TypeIsBeautiful,
663 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc.
664 | */
665 | font-family: -apple-system, "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
666 | line-height: 1.7;
667 | text-transform: uppercase;
668 | font-size: 13px;
669 | font-weight: 800;
670 | letter-spacing: 1px;
671 | padding: 10px;
672 | background-color: white;
673 | border-radius: 0;
674 | }
675 | @media only screen and (min-width: 768px) {
676 | .pager li > a,
677 | .pager li > span {
678 | font-size: 14px;
679 | padding: 15px 25px;
680 | }
681 | }
682 | .pager li > a {
683 | color: #404040;
684 | }
685 | .pager li > a:hover,
686 | .pager li > a:focus {
687 | color: white;
688 | background-color: #0085a1;
689 | border: 1px solid #0085a1;
690 | }
691 | .pager .disabled > a,
692 | .pager .disabled > a:hover,
693 | .pager .disabled > a:focus,
694 | .pager .disabled > span {
695 | color: #808080;
696 | background-color: #404040;
697 | cursor: not-allowed;
698 | }
699 | ::-moz-selection {
700 | color: white;
701 | text-shadow: none;
702 | background: #0085a1;
703 | }
704 | ::selection {
705 | color: white;
706 | text-shadow: none;
707 | background: #0085a1;
708 | }
709 | img::selection {
710 | color: white;
711 | background: transparent;
712 | }
713 | img::-moz-selection {
714 | color: white;
715 | background: transparent;
716 | }
717 | body {
718 | webkit-tap-highlight-color: #0085a1;
719 | }
720 | /* Hux add tags support */
721 | .tags {
722 | margin-bottom: -5px;
723 | }
724 | .tags a,
725 | .tags .tag {
726 | display: inline-block;
727 | border: 1px solid rgba(255, 255, 255, 0.8);
728 | border-radius: 999em;
729 | padding: 0 10px;
730 | color: #ffffff;
731 | line-height: 24px;
732 | font-size: 12px;
733 | text-decoration: none;
734 | margin: 0 1px;
735 | margin-bottom: 6px;
736 | }
737 | .tags a:hover,
738 | .tags .tag:hover,
739 | .tags a:active,
740 | .tags .tag:active {
741 | color: white;
742 | border-color: white;
743 | background-color: rgba(255, 255, 255, 0.4);
744 | text-decoration: none;
745 | }
746 | @media only screen and (min-width: 768px) {
747 | .tags a,
748 | .tags .tag {
749 | margin-right: 5px;
750 | }
751 | }
752 | #tag-heading {
753 | padding: 70px 0 60px;
754 | }
755 | @media only screen and (min-width: 768px) {
756 | #tag-heading {
757 | padding: 55px 0;
758 | }
759 | }
760 | #tag_cloud {
761 | margin: 20px 0 15px 0;
762 | }
763 | #tag_cloud a,
764 | #tag_cloud .tag {
765 | font-size: 14px;
766 | border: none;
767 | line-height: 28px;
768 | margin: 0 2px;
769 | margin-bottom: 8px;
770 | background: #D6D6D6;
771 | }
772 | #tag_cloud a:hover,
773 | #tag_cloud .tag:hover,
774 | #tag_cloud a:active,
775 | #tag_cloud .tag:active {
776 | background-color: #0085a1 !important;
777 | }
778 | @media only screen and (min-width: 768px) {
779 | #tag_cloud {
780 | margin-bottom: 25px;
781 | }
782 | }
783 | .tag-comments {
784 | font-size: 12px;
785 | }
786 | @media only screen and (min-width: 768px) {
787 | .tag-comments {
788 | font-size: 14px;
789 | }
790 | }
791 | .t:first-child {
792 | margin-top: 0px;
793 | }
794 | .listing-seperator {
795 | color: #0085a1;
796 | font-size: 21px !important;
797 | }
798 | .listing-seperator::before {
799 | margin-right: 5px;
800 | }
801 | @media only screen and (min-width: 768px) {
802 | .listing-seperator {
803 | font-size: 20px !important;
804 | line-height: 2 !important;
805 | }
806 | }
807 | .one-tag-list .tag-text {
808 | font-weight: 200;
809 | /* Hux learn from
810 | * TypeIsBeautiful,
811 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc.
812 | */
813 | font-family: -apple-system, "Helvetica Neue", "Arial", "PingFang SC", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "WenQuanYi Micro Hei", SimSun, sans-serif;
814 | line-height: 1.7;
815 | }
816 | .one-tag-list .post-preview {
817 | position: relative;
818 | }
819 | .one-tag-list .post-preview > a .post-title {
820 | font-size: 16px;
821 | font-weight: 500;
822 | margin-top: 20px;
823 | }
824 | .one-tag-list .post-preview > a .post-subtitle {
825 | font-size: 12px;
826 | }
827 | .one-tag-list .post-preview > .post-meta {
828 | position: absolute;
829 | right: 5px;
830 | bottom: 0px;
831 | margin: 0px;
832 | font-size: 12px;
833 | line-height: 12px;
834 | }
835 | @media only screen and (min-width: 768px) {
836 | .one-tag-list .post-preview {
837 | margin-left: 20px;
838 | }
839 | .one-tag-list .post-preview > a > .post-title {
840 | font-size: 18px;
841 | line-height: 1.3;
842 | }
843 | .one-tag-list .post-preview > a > .post-subtitle {
844 | font-size: 14px;
845 | }
846 | .one-tag-list .post-preview .post-meta {
847 | font-size: 18px;
848 | }
849 | }
850 | /* Tags support End*/
851 | /* Hux make all img responsible in post-container */
852 | .post-container img {
853 | display: block;
854 | max-width: 100%;
855 | height: auto;
856 | margin: 1.5em auto 1.6em auto;
857 | }
858 | /* Hux Optimize UserExperience */
859 | .navbar-default .navbar-toggle:focus,
860 | .navbar-default .navbar-toggle:hover {
861 | background-color: inherit;
862 | }
863 | .navbar-default .navbar-toggle:active {
864 | background-color: rgba(255, 255, 255, 0.25);
865 | }
866 | /* Hux customize Style for navBar button */
867 | .navbar-default .navbar-toggle {
868 | border-color: transparent;
869 | padding: 19px 16px;
870 | margin-top: 2px;
871 | margin-right: 2px;
872 | margin-bottom: 2px;
873 | border-radius: 50%;
874 | }
875 | .navbar-default .navbar-toggle .icon-bar {
876 | width: 18px;
877 | border-radius: 0px;
878 | background-color: white;
879 | }
880 | .navbar-default .navbar-toggle .icon-bar + .icon-bar {
881 | margin-top: 3px;
882 | }
883 | /* Hux customize Style for Duoshuo */
884 | .comment {
885 | margin-top: 20px;
886 | }
887 | .comment #ds-thread #ds-reset a.ds-like-thread-button {
888 | border: 1px solid #ddd;
889 | border-radius: 0px;
890 | background: white;
891 | box-shadow: none;
892 | text-shadow: none;
893 | }
894 | .comment #ds-thread #ds-reset li.ds-tab a.ds-current {
895 | border: 1px solid #ddd;
896 | border-radius: 0px;
897 | background: white;
898 | box-shadow: none;
899 | text-shadow: none;
900 | }
901 | .comment #ds-thread #ds-reset .ds-textarea-wrapper {
902 | background: none;
903 | }
904 | .comment #ds-thread #ds-reset .ds-gradient-bg {
905 | background: none;
906 | }
907 | #ds-smilies-tooltip ul.ds-smilies-tabs li a {
908 | background: white !important;
909 | }
910 | .page-fullscreen .intro-header {
911 | position: fixed;
912 | left: 0;
913 | top: 0;
914 | width: 100%;
915 | height: 100%;
916 | }
917 | .page-fullscreen #tag-heading {
918 | position: fixed;
919 | left: 0;
920 | top: 0;
921 | padding-bottom: 150px;
922 | width: 100%;
923 | height: 100%;
924 | display: -webkit-box;
925 | -webkit-box-orient: vertical;
926 | -webkit-box-pack: center;
927 | -webkit-box-align: center;
928 | display: -webkit-flex;
929 | -webkit-align-items: center;
930 | -webkit-justify-content: center;
931 | -webkit-flex-direction: column;
932 | display: flex;
933 | align-items: center;
934 | justify-content: center;
935 | flex-direction: column;
936 | }
937 | .page-fullscreen footer {
938 | position: absolute;
939 | width: 100%;
940 | bottom: 0;
941 | padding-bottom: 20px;
942 | opacity: 0.6;
943 | color: #fff;
944 | }
945 | .page-fullscreen footer .copyright {
946 | color: #fff;
947 | }
948 | .page-fullscreen footer .copyright a {
949 | color: #fff;
950 | }
951 | .page-fullscreen footer .copyright a:hover {
952 | color: #ddd;
953 | }
954 |
--------------------------------------------------------------------------------
/themes/huxblog/source/css/hux-blog.min.css:
--------------------------------------------------------------------------------
1 | @media (min-width:1200px){.post-container,.sidebar-container{padding-right:5%}}@media (min-width:768px){.post-container{padding-right:5%}}.sidebar-container{color:#bfbfbf;font-size:14px}.sidebar-container h5{color:gray;padding-bottom:1em}.sidebar-container h5 a{color:gray!important;text-decoration:none}.sidebar-container a{color:#bfbfbf!important}.sidebar-container a:hover,.sidebar-container a:active{color:#0085a1!important}.sidebar-container .tags a{border-color:#bfbfbf}.sidebar-container .tags a:hover,.sidebar-container .tags a:active{border-color:#0085a1}.sidebar-container .short-about img{width:80%;display:block;border-radius:5px;margin-bottom:20px}.sidebar-container .short-about p{margin-top:0;margin-bottom:20px}.sidebar-container .short-about .list-inline>li{padding-left:0}body{font-family:-apple-system,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei","Microsoft JhengHei","Source Han Sans SC","Noto Sans CJK SC","Source Han Sans CN","Noto Sans SC","Source Han Sans TC","Noto Sans CJK TC","WenQuanYi Micro Hei",SimSun,sans-serif;line-height:1.7;font-size:16px;color:#404040;overflow-x:hidden}p{margin:30px 0}h1,h2,h3,h4,h5,h6{font-family:-apple-system,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei","Microsoft JhengHei","Source Han Sans SC","Noto Sans CJK SC","Source Han Sans CN","Noto Sans SC","Source Han Sans TC","Noto Sans CJK TC","WenQuanYi Micro Hei",SimSun,sans-serif;line-height:1.7;line-height:1.1;font-weight:700}h4{font-size:21px}a{color:#404040}a:hover,a:focus{color:#0085a1}a img:hover,a img:focus{cursor:zoom-in}article{overflow-x:hidden}blockquote{color:gray;font-style:italic;font-size:.95em;margin:20px 0 20px}blockquote p{margin:0}small.img-hint{display:block;margin-top:-20px;text-align:center}br+small.img-hint{margin-top:-40px}img.shadow{box-shadow:rgba(0,0,0,.258824) 0 2px 5px 0}@media screen and (max-width:768px){select{-webkit-appearance:none;margin-top:15px;color:#337ab7;border-color:#337ab7;padding:0 .4em;background:#fff}}.table th,.table td{border:1px solid #eee!important}hr.small{max-width:100px;margin:15px auto;border-width:4px;border-color:#fff}pre,.table-responsive{-webkit-overflow-scrolling:touch}pre code{display:block;width:auto;white-space:pre;word-wrap:normal}.post-container a{color:#337ab7}.post-container a:hover,.post-container a:focus{color:#0085a1}.post-container h1,.post-container h2,.post-container h3,.post-container h4,.post-container h5,.post-container h6{margin:30px 0 10px}.post-container h5{font-size:19px;font-weight:600;color:gray}.post-container h5+p{margin-top:5px}.post-container h6{font-size:16px;font-weight:600;color:gray}.post-container h6+p{margin-top:5px}.post-container ul,.post-container ol{margin-bottom:40px}@media screen and (max-width:768px){.post-container ul,.post-container ol{padding-left:30px}}@media screen and (max-width:500px){.post-container ul,.post-container ol{padding-left:20px}}.post-container ol ol,.post-container ol ul,.post-container ul ol,.post-container ul ul{margin-bottom:5px}.post-container li p{margin:0;margin-bottom:5px}.post-container li h1,.post-container li h2,.post-container li h3,.post-container li h4,.post-container li h5,.post-container li h6{line-height:2;margin-top:20px}@media only screen and (max-width:767px){.navbar-default .navbar-collapse{border:none;background:#fff;box-shadow:0 5px 10px 2px rgba(0,0,0,.2);box-shadow:rgba(0,0,0,.117647) 0 1px 6px,rgba(0,0,0,.239216) 0 1px 4px;border-radius:2px;width:170px;float:right;margin:0}#huxblog_navbar{opacity:0;transform:scaleX(0);transform-origin:top right;transition:all .25s cubic-bezier(0.23,1,.32,1);-webkit-transform:scaleX(0);-webkit-transform-origin:top right;-webkit-transition:all .25s cubic-bezier(0.23,1,.32,1)}#huxblog_navbar a{font-size:13px;line-height:28px}#huxblog_navbar .navbar-collapse{height:0;transform:scaleY(0);transform-origin:top right;transition:transform 500ms cubic-bezier(0.23,1,.32,1);-webkit-transform:scaleY(0);-webkit-transform-origin:top right;-webkit-transition:-webkit-transform 500ms cubic-bezier(0.23,1,.32,1)}#huxblog_navbar li{opacity:0;transition:opacity 450ms cubic-bezier(0.23,1,.32,1) 205ms;-webkit-transition:opacity 450ms cubic-bezier(0.23,1,.32,1) 205ms}#huxblog_navbar.in{transform:scaleX(1);-webkit-transform:scaleX(1);opacity:1}#huxblog_navbar.in .navbar-collapse{transform:scaleY(1);-webkit-transform:scaleY(1)}#huxblog_navbar.in li{opacity:1}}.navbar-custom{background:0 0;border:none;position:absolute;top:0;left:0;width:100%;z-index:3;font-family:-apple-system,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei","Microsoft JhengHei","Source Han Sans SC","Noto Sans CJK SC","Source Han Sans CN","Noto Sans SC","Source Han Sans TC","Noto Sans CJK TC","WenQuanYi Micro Hei",SimSun,sans-serif;line-height:1.7}.navbar-custom .navbar-brand{font-weight:800;color:#fff;height:56px;line-height:25px}.navbar-custom .navbar-brand:hover{color:rgba(255,255,255,.8)}.navbar-custom .nav li a{text-transform:uppercase;font-size:12px;line-height:20px;font-weight:800;letter-spacing:1px}.navbar-custom .nav li a:active{background:rgba(0,0,0,.12)}@media only screen and (min-width:768px){.navbar-custom{background:0 0;border-bottom:1px solid transparent}.navbar-custom body{font-size:20px}.navbar-custom .navbar-brand{color:#fff;padding:20px;line-height:20px}.navbar-custom .navbar-brand:hover,.navbar-custom .navbar-brand:focus{color:rgba(255,255,255,.8)}.navbar-custom .nav li a{color:#fff;padding:20px}.navbar-custom .nav li a:hover,.navbar-custom .nav li a:focus{color:rgba(255,255,255,.8)}.navbar-custom .nav li a:active{background:0 0}}@media only screen and (min-width:1170px){.navbar-custom{-webkit-transition:background-color .3s;-moz-transition:background-color .3s;transition:background-color .3s;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.navbar-custom.is-fixed{position:fixed;top:-61px;background-color:rgba(255,255,255,.9);border-bottom:1px solid #f2f2f2;-webkit-transition:-webkit-transform .3s;-moz-transition:-moz-transform .3s;transition:transform .3s}.navbar-custom.is-fixed .navbar-brand{color:#404040}.navbar-custom.is-fixed .navbar-brand:hover,.navbar-custom.is-fixed .navbar-brand:focus{color:#0085a1}.navbar-custom.is-fixed .nav li a{color:#404040}.navbar-custom.is-fixed .nav li a:hover,.navbar-custom.is-fixed .nav li a:focus{color:#0085a1}.navbar-custom.is-visible{-webkit-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0);-ms-transform:translate3d(0,100%,0);-o-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.intro-header{background:no-repeat center center;background-color:gray;background-attachment:scroll;-webkit-background-size:cover;-moz-background-size:cover;background-size:cover;-o-background-size:cover;margin-bottom:0}@media only screen and (min-width:768px){.intro-header{margin-bottom:20px}}.intro-header .site-heading,.intro-header .post-heading,.intro-header .page-heading{padding:85px 0 55px;color:#fff}@media only screen and (min-width:768px){.intro-header .site-heading,.intro-header .post-heading,.intro-header .page-heading{padding:150px 0}}.intro-header .site-heading{padding:95px 0 70px}@media only screen and (min-width:768px){.intro-header .site-heading{padding:150px 0}}.intro-header .site-heading,.intro-header .page-heading{text-align:center}.intro-header .site-heading h1,.intro-header .page-heading h1{margin-top:0;font-size:50px}.intro-header .site-heading .subheading,.intro-header .page-heading .subheading{font-family:-apple-system,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei","Microsoft JhengHei","Source Han Sans SC","Noto Sans CJK SC","Source Han Sans CN","Noto Sans SC","Source Han Sans TC","Noto Sans CJK TC","WenQuanYi Micro Hei",SimSun,sans-serif;line-height:1.7;font-size:18px;line-height:1.1;display:block;font-weight:300;margin:10px 0 0}@media only screen and (min-width:768px){.intro-header .site-heading h1,.intro-header .page-heading h1{font-size:80px}}.intro-header .post-heading h1{font-size:30px;margin-bottom:24px}.intro-header .post-heading .subheading,.intro-header .post-heading .meta{line-height:1.1;display:block}.intro-header .post-heading .subheading{font-family:-apple-system,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei","Microsoft JhengHei","Source Han Sans SC","Noto Sans CJK SC","Source Han Sans CN","Noto Sans SC","Source Han Sans TC","Noto Sans CJK TC","WenQuanYi Micro Hei",SimSun,sans-serif;line-height:1.7;font-size:17px;line-height:1.4;font-weight:400;margin:10px 0 30px;margin-top:-5px}.intro-header .post-heading .meta{font-family:Lora,'Times New Roman',serif;font-style:italic;font-weight:300;font-size:18px}.intro-header .post-heading .meta a{color:#fff}@media only screen and (min-width:768px){.intro-header .post-heading h1{font-size:55px}.intro-header .post-heading .subheading{font-size:30px}.intro-header .post-heading .meta{font-size:20px}}.post-preview>a{color:#404040}.post-preview>a:hover,.post-preview>a:focus{text-decoration:none;color:#0085a1}.post-preview>a>.post-title{font-size:21px;line-height:1.3;margin-top:30px;margin-bottom:8px}.post-preview>a>.post-subtitle{font-size:15px;line-height:1.3;margin:0;font-weight:300;margin-bottom:10px}.post-preview>.post-meta{font-family:Lora,'Times New Roman',serif;color:gray;font-size:16px;font-style:italic;margin-top:0}.post-preview>.post-meta>a{text-decoration:none;color:#404040}.post-preview>.post-meta>a:hover,.post-preview>.post-meta>a:focus{color:#0085a1;text-decoration:underline}@media only screen and (min-width:768px){.post-preview>a>.post-title{font-size:26px;line-height:1.3;margin-bottom:10px}.post-preview>a>.post-subtitle{font-size:16px}.post-preview .post-meta{font-size:18px}}.post-content-preview{font-size:13px;font-style:italic;color:#a3a3a3}.post-content-preview:hover{color:#0085a1}@media only screen and (min-width:768px){.post-content-preview{font-size:14px}}.section-heading{font-size:36px;margin-top:60px;font-weight:700}.caption{text-align:center;font-size:14px;padding:10px;font-style:italic;margin:0;display:block;border-bottom-right-radius:5px;border-bottom-left-radius:5px}footer{font-size:20px;padding:50px 0 65px}footer .list-inline{margin:0;padding:0}footer .copyright{font-size:14px;text-align:center;margin-bottom:0}footer .copyright a{color:#337ab7}footer .copyright a:hover,footer .copyright a:focus{color:#0085a1}.floating-label-form-group{font-size:14px;position:relative;margin-bottom:0;padding-bottom:.5em;border-bottom:1px solid #eee}.floating-label-form-group input,.floating-label-form-group textarea{z-index:1;position:relative;padding-right:0;padding-left:0;border:none;border-radius:0;font-size:1.5em;background:0 0;box-shadow:none!important;resize:none}.floating-label-form-group label{display:block;z-index:0;position:relative;top:2em;margin:0;font-size:.85em;line-height:1.764705882em;vertical-align:middle;vertical-align:baseline;opacity:0;-webkit-transition:top .3s ease,opacity .3s ease;-moz-transition:top .3s ease,opacity .3s ease;-ms-transition:top .3s ease,opacity .3s ease;transition:top .3s ease,opacity .3s ease}.floating-label-form-group::not(:first-child){padding-left:14px;border-left:1px solid #eee}.floating-label-form-group-with-value label{top:0;opacity:1}.floating-label-form-group-with-focus label{color:#0085a1}form .row:first-child .floating-label-form-group{border-top:1px solid #eee}.btn{font-family:-apple-system,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei","Microsoft JhengHei","Source Han Sans SC","Noto Sans CJK SC","Source Han Sans CN","Noto Sans SC","Source Han Sans TC","Noto Sans CJK TC","WenQuanYi Micro Hei",SimSun,sans-serif;line-height:1.7;text-transform:uppercase;font-size:14px;font-weight:800;letter-spacing:1px;border-radius:0;padding:15px 25px}.btn-lg{font-size:16px;padding:25px 35px}.btn-default:hover,.btn-default:focus{background-color:#0085a1;border:1px solid #0085a1;color:#fff}.pager{margin:20px 0 0!important;padding:0!important}.pager li>a,.pager li>span{font-family:-apple-system,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei","Microsoft JhengHei","Source Han Sans SC","Noto Sans CJK SC","Source Han Sans CN","Noto Sans SC","Source Han Sans TC","Noto Sans CJK TC","WenQuanYi Micro Hei",SimSun,sans-serif;line-height:1.7;text-transform:uppercase;font-size:13px;font-weight:800;letter-spacing:1px;padding:10px;background-color:#fff;border-radius:0}@media only screen and (min-width:768px){.pager li>a,.pager li>span{font-size:14px;padding:15px 25px}}.pager li>a{color:#404040}.pager li>a:hover,.pager li>a:focus{color:#fff;background-color:#0085a1;border:1px solid #0085a1}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:gray;background-color:#404040;cursor:not-allowed}::-moz-selection{color:#fff;text-shadow:none;background:#0085a1}::selection{color:#fff;text-shadow:none;background:#0085a1}img::selection{color:#fff;background:0 0}img::-moz-selection{color:#fff;background:0 0}body{webkit-tap-highlight-color:#0085a1}.tags{margin-bottom:-5px}.tags a,.tags .tag{display:inline-block;border:1px solid rgba(255,255,255,.8);border-radius:999em;padding:0 10px;color:#fff;line-height:24px;font-size:12px;text-decoration:none;margin:0 1px;margin-bottom:6px}.tags a:hover,.tags .tag:hover,.tags a:active,.tags .tag:active{color:#fff;border-color:#fff;background-color:rgba(255,255,255,.4);text-decoration:none}@media only screen and (min-width:768px){.tags a,.tags .tag{margin-right:5px}}#tag-heading{padding:70px 0 60px}@media only screen and (min-width:768px){#tag-heading{padding:55px 0}}#tag_cloud{margin:20px 0 15px 0}#tag_cloud a,#tag_cloud .tag{font-size:14px;border:none;line-height:28px;margin:0 2px;margin-bottom:8px;background:#D6D6D6}#tag_cloud a:hover,#tag_cloud .tag:hover,#tag_cloud a:active,#tag_cloud .tag:active{background-color:#0085a1!important}@media only screen and (min-width:768px){#tag_cloud{margin-bottom:25px}}.tag-comments{font-size:12px}@media only screen and (min-width:768px){.tag-comments{font-size:14px}}.t:first-child{margin-top:0}.listing-seperator{color:#0085a1;font-size:21px!important}.listing-seperator::before{margin-right:5px}@media only screen and (min-width:768px){.listing-seperator{font-size:20px!important;line-height:2!important}}.one-tag-list .tag-text{font-weight:200;font-family:-apple-system,"Helvetica Neue",Arial,"PingFang SC","Hiragino Sans GB",STHeiti,"Microsoft YaHei","Microsoft JhengHei","Source Han Sans SC","Noto Sans CJK SC","Source Han Sans CN","Noto Sans SC","Source Han Sans TC","Noto Sans CJK TC","WenQuanYi Micro Hei",SimSun,sans-serif;line-height:1.7}.one-tag-list .post-preview{position:relative}.one-tag-list .post-preview>a .post-title{font-size:16px;font-weight:500;margin-top:20px}.one-tag-list .post-preview>a .post-subtitle{font-size:12px}.one-tag-list .post-preview>.post-meta{position:absolute;right:5px;bottom:0;margin:0;font-size:12px;line-height:12px}@media only screen and (min-width:768px){.one-tag-list .post-preview{margin-left:20px}.one-tag-list .post-preview>a>.post-title{font-size:18px;line-height:1.3}.one-tag-list .post-preview>a>.post-subtitle{font-size:14px}.one-tag-list .post-preview .post-meta{font-size:18px}}.post-container img{display:block;max-width:100%;height:auto;margin:1.5em auto 1.6em auto}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:inherit}.navbar-default .navbar-toggle:active{background-color:rgba(255,255,255,.25)}.navbar-default .navbar-toggle{border-color:transparent;padding:19px 16px;margin-top:2px;margin-right:2px;margin-bottom:2px;border-radius:50%}.navbar-default .navbar-toggle .icon-bar{width:18px;border-radius:0;background-color:#fff}.navbar-default .navbar-toggle .icon-bar+.icon-bar{margin-top:3px}.comment{margin-top:20px}.comment #ds-thread #ds-reset a.ds-like-thread-button{border:1px solid #ddd;border-radius:0;background:#fff;box-shadow:none;text-shadow:none}.comment #ds-thread #ds-reset li.ds-tab a.ds-current{border:1px solid #ddd;border-radius:0;background:#fff;box-shadow:none;text-shadow:none}.comment #ds-thread #ds-reset .ds-textarea-wrapper{background:0 0}.comment #ds-thread #ds-reset .ds-gradient-bg{background:0 0}#ds-smilies-tooltip ul.ds-smilies-tabs li a{background:#fff!important}.page-fullscreen .intro-header{position:fixed;left:0;top:0;width:100%;height:100%}.page-fullscreen #tag-heading{position:fixed;left:0;top:0;padding-bottom:150px;width:100%;height:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-pack:center;-webkit-box-align:center;display:-webkit-flex;-webkit-align-items:center;-webkit-justify-content:center;-webkit-flex-direction:column;display:flex;align-items:center;justify-content:center;flex-direction:column}.page-fullscreen footer{position:absolute;width:100%;bottom:0;padding-bottom:20px;opacity:.6;color:#fff}.page-fullscreen footer .copyright{color:#fff}.page-fullscreen footer .copyright a{color:#fff}.page-fullscreen footer .copyright a:hover{color:#ddd}
--------------------------------------------------------------------------------
/themes/huxblog/source/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/themes/huxblog/source/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/themes/huxblog/source/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/themes/huxblog/source/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/themes/huxblog/source/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/themes/huxblog/source/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/themes/huxblog/source/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kaijun/hexo-theme-huxblog/34e1314a9cd397f497847be173750ee9305708d8/themes/huxblog/source/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/themes/huxblog/source/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.2 (http://getbootstrap.com)
3 | * Copyright 2011-2015 Twitter, Inc.
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | */
6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.2",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.2",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.2",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a(this.options.trigger).filter('[href="#'+b.id+'"], [data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.2",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0,trigger:'[data-toggle="collapse"]'},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":a.extend({},e.data(),{trigger:this});c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.2",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('
').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j ').prependTo(this.$element).on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.options.backdrop&&this.adjustBackdrop(),this.adjustDialog()},c.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.3.2",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-mp.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.2",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.2",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.2",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()
7 | }var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.2",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a("body").height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
--------------------------------------------------------------------------------
/themes/huxblog/source/js/hux-blog.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Clean Blog v1.0.0 (http://startbootstrap.com)
3 | * Copyright 2015 Start Bootstrap
4 | * Licensed under Apache 2.0 (https://github.com/IronSummitMedia/startbootstrap/blob/gh-pages/LICENSE)
5 | */
6 |
7 | // Tooltip Init
8 | $(function() {
9 | $("[data-toggle='tooltip']").tooltip();
10 | });
11 |
12 |
13 | // make all images responsive
14 | /*
15 | * Unuse by Hux
16 | * actually only Portfolio-Pages can't use it and only post-img need it.
17 | * so I modify the _layout/post and CSS to make post-img responsive!
18 | */
19 | // $(function() {
20 | // $("img").addClass("img-responsive");
21 | // });
22 |
23 | // responsive tables
24 | $(document).ready(function() {
25 | $("table").wrap("
");
26 | $("table").addClass("table");
27 | });
28 |
29 | // responsive embed videos
30 | $(document).ready(function () {
31 | $('iframe[src*="youtube.com"]').wrap('
');
32 | $('iframe[src*="youtube.com"]').addClass('embed-responsive-item');
33 | $('iframe[src*="vimeo.com"]').wrap('
');
34 | $('iframe[src*="vimeo.com"]').addClass('embed-responsive-item');
35 | });
36 |
37 | // Navigation Scripts to Show Header on Scroll-Up
38 | jQuery(document).ready(function($) {
39 | var MQL = 1170;
40 |
41 | //primary navigation slide-in effect
42 | if ($(window).width() > MQL) {
43 | var headerHeight = $('.navbar-custom').height();
44 | $(window).on('scroll', {
45 | previousTop: 0
46 | },
47 | function() {
48 | var currentTop = $(window).scrollTop();
49 | //check if user is scrolling up
50 | if (currentTop < this.previousTop) {
51 | //if scrolling up...
52 | if (currentTop > 0 && $('.navbar-custom').hasClass('is-fixed')) {
53 | $('.navbar-custom').addClass('is-visible');
54 | } else {
55 | $('.navbar-custom').removeClass('is-visible is-fixed');
56 | }
57 | } else {
58 | //if scrolling down...
59 | $('.navbar-custom').removeClass('is-visible');
60 | if (currentTop > headerHeight && !$('.navbar-custom').hasClass('is-fixed')) $('.navbar-custom').addClass('is-fixed');
61 | }
62 | this.previousTop = currentTop;
63 | });
64 | }
65 | });
66 |
--------------------------------------------------------------------------------
/themes/huxblog/source/js/hux-blog.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Hux Blog v1.0.0 (http://huxpro.github.io)
3 | * Copyright 2015 Hux
4 | */
5 |
6 | $(function(){$("[data-toggle='tooltip']").tooltip()}),$(document).ready(function(){$("table").wrap("
"),$("table").addClass("table")}),$(document).ready(function(){$('iframe[src*="youtube.com"]').wrap('
'),$('iframe[src*="youtube.com"]').addClass("embed-responsive-item"),$('iframe[src*="vimeo.com"]').wrap('
'),$('iframe[src*="vimeo.com"]').addClass("embed-responsive-item")}),jQuery(document).ready(function(a){var b=1170;if(a(window).width()>b){var c=a(".navbar-custom").height();a(window).on("scroll",{previousTop:0},function(){var b=a(window).scrollTop();b0&&a(".navbar-custom").hasClass("is-fixed")?a(".navbar-custom").addClass("is-visible"):a(".navbar-custom").removeClass("is-visible is-fixed"):(a(".navbar-custom").removeClass("is-visible"),b>c&&!a(".navbar-custom").hasClass("is-fixed")&&a(".navbar-custom").addClass("is-fixed")),this.previousTop=b})}});
--------------------------------------------------------------------------------
/themes/huxblog/source/js/jquery.nav.js:
--------------------------------------------------------------------------------
1 | /*
2 | * jQuery One Page Nav Plugin
3 | * http://github.com/davist11/jQuery-One-Page-Nav
4 | *
5 | * Copyright (c) 2010 Trevor Davis (http://trevordavis.net)
6 | * Dual licensed under the MIT and GPL licenses.
7 | * Uses the same license as jQuery, see:
8 | * http://jquery.org/license
9 | *
10 | * @version 3.0.0
11 | *
12 | * Example usage:
13 | * $('#nav').onePageNav({
14 | * currentClass: 'current',
15 | * changeHash: false,
16 | * scrollSpeed: 750
17 | * });
18 | */
19 |
20 | ;(function($, window, document, undefined){
21 |
22 | // our plugin constructor
23 | var OnePageNav = function(elem, options){
24 | this.elem = elem;
25 | this.$elem = $(elem);
26 | this.options = options;
27 | this.metadata = this.$elem.data('plugin-options');
28 | this.$win = $(window);
29 | this.sections = {};
30 | this.didScroll = false;
31 | this.$doc = $(document);
32 | this.docHeight = this.$doc.height();
33 | };
34 |
35 | // the plugin prototype
36 | OnePageNav.prototype = {
37 | defaults: {
38 | navItems: 'a',
39 | currentClass: 'current',
40 | changeHash: false,
41 | easing: 'swing',
42 | filter: '',
43 | scrollSpeed: 750,
44 | scrollThreshold: 0.5,
45 | begin: false,
46 | end: false,
47 | scrollChange: false,
48 | padding: 0
49 | },
50 |
51 | init: function() {
52 | // Introduce defaults that can be extended either
53 | // globally or using an object literal.
54 | this.config = $.extend({}, this.defaults, this.options, this.metadata);
55 |
56 | this.$nav = this.$elem.find(this.config.navItems);
57 |
58 | //Filter any links out of the nav
59 | if(this.config.filter !== '') {
60 | this.$nav = this.$nav.filter(this.config.filter);
61 | }
62 |
63 | //Handle clicks on the nav
64 | this.$nav.on('click.onePageNav', $.proxy(this.handleClick, this));
65 |
66 | //Get the section positions
67 | this.getPositions();
68 |
69 | //Handle scroll changes
70 | this.bindInterval();
71 |
72 | //Update the positions on resize too
73 | this.$win.on('resize.onePageNav', $.proxy(this.getPositions, this));
74 |
75 | return this;
76 | },
77 |
78 | adjustNav: function(self, $parent) {
79 | self.$elem.find('.' + self.config.currentClass).removeClass(self.config.currentClass);
80 | $parent.addClass(self.config.currentClass);
81 | },
82 |
83 | bindInterval: function() {
84 | var self = this;
85 | var docHeight;
86 |
87 | self.$win.on('scroll.onePageNav', function() {
88 | self.didScroll = true;
89 | });
90 |
91 | self.t = setInterval(function() {
92 | docHeight = self.$doc.height();
93 |
94 | //If it was scrolled
95 | if(self.didScroll) {
96 | self.didScroll = false;
97 | self.scrollChange();
98 | }
99 |
100 | //If the document height changes
101 | if(docHeight !== self.docHeight) {
102 | self.docHeight = docHeight;
103 | self.getPositions();
104 | }
105 | }, 250);
106 | },
107 |
108 | getHash: function($link) {
109 | return $link.attr('href').split('#')[1];
110 | },
111 |
112 | getPositions: function() {
113 | var self = this;
114 | var linkHref;
115 | var topPos;
116 | var $target;
117 |
118 | self.$nav.each(function() {
119 | linkHref = self.getHash($(this));
120 | $target = $('#' + linkHref);
121 |
122 | if($target.length) {
123 | topPos = $target.offset().top;
124 | self.sections[linkHref] = Math.round(topPos);
125 | }
126 | });
127 | },
128 |
129 | getSection: function(windowPos) {
130 | var returnValue = null;
131 | var windowHeight = Math.round(this.$win.height() * this.config.scrollThreshold);
132 |
133 | for(var section in this.sections) {
134 | if((this.sections[section] - windowHeight) < windowPos) {
135 | returnValue = section;
136 | }
137 | }
138 |
139 | return returnValue;
140 | },
141 |
142 | handleClick: function(e) {
143 | var self = this;
144 | var $link = $(e.currentTarget);
145 | var $parent = $link.parent();
146 | var newLoc = '#' + self.getHash($link);
147 |
148 | if(!$parent.hasClass(self.config.currentClass)) {
149 | //Start callback
150 | if(self.config.begin) {
151 | self.config.begin();
152 | }
153 |
154 | //Change the highlighted nav item
155 | self.adjustNav(self, $parent);
156 |
157 | //Removing the auto-adjust on scroll
158 | self.unbindInterval();
159 |
160 | //Scroll to the correct position
161 | self.scrollTo(newLoc, function() {
162 | //Do we need to change the hash?
163 | if(self.config.changeHash) {
164 | window.location.hash = newLoc;
165 | }
166 |
167 | //Add the auto-adjust on scroll back in
168 | self.bindInterval();
169 |
170 | //End callback
171 | if(self.config.end) {
172 | self.config.end();
173 | }
174 | });
175 | }
176 |
177 | e.preventDefault();
178 | },
179 |
180 | scrollChange: function() {
181 | var windowTop = this.$win.scrollTop();
182 | var position = this.getSection(windowTop);
183 | var $parent;
184 |
185 | //If the position is set
186 | if(position !== null) {
187 | $parent = this.$elem.find('a[href$="#' + position + '"]').parent();
188 |
189 | //If it's not already the current section
190 | if(!$parent.hasClass(this.config.currentClass)) {
191 | //Change the highlighted nav item
192 | this.adjustNav(this, $parent);
193 |
194 | //If there is a scrollChange callback
195 | if(this.config.scrollChange) {
196 | this.config.scrollChange($parent);
197 | }
198 | }
199 | }
200 | },
201 |
202 | scrollTo: function(target, callback) {
203 | var offset = $(target).offset().top - this.config.padding;
204 |
205 | $('html, body').animate({
206 | scrollTop: offset
207 | }, this.config.scrollSpeed, this.config.easing, callback);
208 | },
209 |
210 | unbindInterval: function() {
211 | clearInterval(this.t);
212 | this.$win.unbind('scroll.onePageNav');
213 | }
214 | };
215 |
216 | OnePageNav.defaults = OnePageNav.prototype.defaults;
217 |
218 | $.fn.onePageNav = function(options) {
219 | return this.each(function() {
220 | new OnePageNav(this, options).init();
221 | });
222 | };
223 |
224 | })( jQuery, window , document );
--------------------------------------------------------------------------------
/themes/huxblog/source/js/jquery.tagcloud.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 |
3 | $.fn.tagcloud = function(options) {
4 | var opts = $.extend({}, $.fn.tagcloud.defaults, options);
5 | tagWeights = this.map(function(){
6 | return $(this).attr("rel");
7 | });
8 | tagWeights = jQuery.makeArray(tagWeights).sort(compareWeights);
9 | lowest = tagWeights[0];
10 | highest = tagWeights.pop();
11 | range = highest - lowest;
12 | if(range === 0) {range = 1;}
13 | // Sizes
14 | if (opts.size) {
15 | fontIncr = (opts.size.end - opts.size.start)/range;
16 | }
17 | // Colors
18 | if (opts.color) {
19 | colorIncr = colorIncrement (opts.color, range);
20 | }
21 | return this.each(function() {
22 | weighting = $(this).attr("rel") - lowest;
23 | if (opts.size) {
24 | $(this).css({"font-size": opts.size.start + (weighting * fontIncr) + opts.size.unit});
25 | }
26 | if (opts.color) {
27 | // change color to background-color
28 | $(this).css({"backgroundColor": tagColor(opts.color, colorIncr, weighting)});
29 | }
30 | });
31 | };
32 |
33 | $.fn.tagcloud.defaults = {
34 | size: {start: 14, end: 18, unit: "pt"}
35 | };
36 |
37 | // Converts hex to an RGB array
38 | function toRGB (code) {
39 | if (code.length == 4) {
40 | code = jQuery.map(/\w+/.exec(code), function(el) {return el + el; }).join("");
41 | }
42 | hex = /(\w{2})(\w{2})(\w{2})/.exec(code);
43 | return [parseInt(hex[1], 16), parseInt(hex[2], 16), parseInt(hex[3], 16)];
44 | }
45 |
46 | // Converts an RGB array to hex
47 | function toHex (ary) {
48 | return "#" + jQuery.map(ary, function(i) {
49 | hex = i.toString(16);
50 | hex = (hex.length == 1) ? "0" + hex : hex;
51 | return hex;
52 | }).join("");
53 | }
54 |
55 | function colorIncrement (color, range) {
56 | return jQuery.map(toRGB(color.end), function(n, i) {
57 | return (n - toRGB(color.start)[i])/range;
58 | });
59 | }
60 |
61 | function tagColor (color, increment, weighting) {
62 | rgb = jQuery.map(toRGB(color.start), function(n, i) {
63 | ref = Math.round(n + (increment[i] * weighting));
64 | if (ref > 255) {
65 | ref = 255;
66 | } else {
67 | if (ref < 0) {
68 | ref = 0;
69 | }
70 | }
71 | return ref;
72 | });
73 | return toHex(rgb);
74 | }
75 |
76 | function compareWeights(a, b)
77 | {
78 | return a - b;
79 | }
80 |
81 | })(jQuery);
82 |
--------------------------------------------------------------------------------