Flying Swing Layout
-diff --git a/README-zh-cn.md b/README-zh-cn.md
deleted file mode 100644
index dc90a5b7c73..00000000000
--- a/README-zh-cn.md
+++ /dev/null
@@ -1,409 +0,0 @@
-# 关于这个简洁明快的博客主题 🤘🤘🤘
-
-[![GitHub stars](https://img.shields.io/github/stars/Gaohaoyang/gaohaoyang.github.io.svg)](https://github.com/Gaohaoyang/gaohaoyang.github.io/stargazers)
-[![GitHub forks](https://img.shields.io/github/forks/Gaohaoyang/gaohaoyang.github.io.svg)](https://github.com/Gaohaoyang/gaohaoyang.github.io/network)
-[![GitHub issues](https://img.shields.io/github/issues/Gaohaoyang/gaohaoyang.github.io.svg)](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues)
-[![GitHub release](https://img.shields.io/github/release/Gaohaoyang/gaohaoyang.github.io.svg)](https://github.com/Gaohaoyang/gaohaoyang.github.io/releases)
-[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Gaohaoyang/gaohaoyang.github.io/master/LICENSE)
-
-随着 jekyll 的版本升级,同时我也想重构我的旧版博客主题,因此在这个月对博客进行了重构加改版,这个仓库存放我的新博客,并且我也会一直使用这个主题。目前基本改版完成,后续可能还会有些细节上的修补。
-
-**博客访问地址:[http://gaohaoyang.github.io/](http://gaohaoyang.github.io/)**。若您喜欢这个新的博客主题,请给我个star以示鼓励吧,欢迎大家使用。
-
-## 目录
-
-* [预览图](#预览图)
-* [各部分详情](#各部分详情)
- * [主页 Home](#主页-home)
- * [归档页 Archives](#归档页-archives)
- * [分类页 Categories](#分类页-categories)
- * [标签页 Tags](#标签页-tags)
- * [收藏页 Collections](#收藏页-collections)
- * [展示页 Demo](#展示页-demo)
- * [关于页 About](#关于页-about)
- * [评论](#评论)
- * [目录 Contents](#目录-contents)
- * [代码高亮](#代码高亮)
- * [灯泡效果](#灯泡效果)
- * [移动端适配](#移动端适配)
- * [Footer](#footer)
- * [统计](#统计)
-* [博客主题使用方法](#博客主题使用方法)
- * [1. 安装 ruby 和 jekyll 环境](#1-安装-ruby-和-jekyll-环境)
- * [2. 复制博客主题代码](#2-复制博客主题代码)
- * [3. 修改参数](#3-修改参数)
- * [基本信息](#基本信息)
- * [链接信息](#链接信息)
- * [评论信息](#评论信息)
- * [统计信息](#统计信息)
- * [4. 写文章](#4-写文章)
- * [5. 本地运行](#5-本地运行)
- * [6. 发布到 GitHub](#6-发布到-github)
-* [捐助 donate](#捐助-donate)
-* [Update Log](#update-log)
-* [License](#license)
-
-## 预览图
-
-先上预览图:
-
-主页
-![index](http://ww3.sinaimg.cn/large/7011d6cfjw1f3bdli86awj211k0oyqen.jpg)
-
-文章页
-![post](http://ww4.sinaimg.cn/large/7011d6cfjw1f3bdmzb9v6j210p0j7gwn.jpg)
-
-## 各部分详情
-
-### 主页 Home
-
-主页默认展示5篇文章的摘要部分,用户点击标题或阅读全文后进入文章页。右侧为近期文章、分类和标签3块区域,用户可以继续在这部分添加区域,只需修改`index.html`即可。
-
-### 归档页 Archives
-
-按照年份归档文章。
-
-### 分类页 Categories
-
-按照文章的分类,显示文章。
-
-### 标签页 Tags
-
-按照文章的标签显示文章。
-
-### 收藏页 Collections
-
-本页是用`markdown`写的,用户可以收藏自己喜欢的文章链接。
-
-### 展示页 Demo
-
-使用 [Masonry](http://masonry.desandro.com/) 重写了瀑布流布局,响应式布局,更好的交互体验。
-
-### 关于页 About
-
-对个人和对本站的介绍,使用`markdown`写的。
-
-### 评论
-
-支持 [多说评论](http://duoshuo.com/) 和 [disqus](https://disqus.com/) 评论。
-
-只需要在 `_config.yml` 修改相应的配置`short_name`即可,如下:
-
-```yml
-# comments
-# two ways to comment, only choose one, and use your own short name
-# 两种评论插件,选一个就好了,使用自己的 short_name
-duoshuo_shortname: #xxx
-disqus_shortname: xxx
-```
-
-### 目录 Contents
-
-页面滚动时目录固定在屏幕右侧,若目录高度超出屏幕高度,目录产生滚动条。
-
-### 代码高亮
-
-随着 jekyll 的升级,目前代码高亮使用风格与 github 上的 markdown 写法一致。
-
-### 灯泡效果
-
-![light](http://ww3.sinaimg.cn/large/7011d6cfjw1f3be6y4vp3j209i02rweg.jpg)
-
-可以看到导航按钮高亮时,下面的阴影效果,我把这个称为灯泡效果。
-
-### 移动端适配
-
-完美适配移动端。
-
-![mobile](http://ww4.sinaimg.cn/large/7011d6cfjw1f3bebnzxkpj20ah0fzgp4.jpg)
-
-### Footer
-
-**欢迎使用这个主题,使用时请保留 footer 上的模板主题来源。** Theme designed by [HyG](https://github.com/gaohaoyang).
-![footer](http://ww3.sinaimg.cn/large/7011d6cfjw1f3bepd8002j20hl02ct95.jpg)
-
-### 统计
-
-博客支持百度统计和 Google Analytics,只需在`_config.yml`中配置响应的id即可,代码如下。
-
-```yml
-# statistic analysis 统计代码
-# 百度统计 id,将统计代码替换为自己的百度统计id,即
-# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";
-# xxxxx字符串
-baidu_tongji_id: xxxxxxxxxxxx
-google_analytics_id: UA-xxxxxxxx # google 分析追踪id
-```
-
-## 博客主题使用方法
-
-欢迎使用这个主题,以下简单说一下使用方法。
-
-### 1. 安装 ruby 和 jekyll 环境
-
-这一步和第5步主要是为了让博客系统在本地跑起来,如果不想在本地运行,可以无视这两步,但我还是强烈建议试着先在本地跑起来,没有什么问题后再推送的 GitHub 上。
-
-Windows 用户可以直接使用 [RubyInstaller](http://rubyinstaller.org/) 安装 ruby 环境。后续的操作中可能还会提示安装 DevKit,根据提示操作即可。
-
-建议使用 [RubyGems 镜像- Ruby China](https://gems.ruby-china.org/) 安装 jekyll。
-
-安装 jekyll 命令如下
-
-```
-gem install jekyll
-```
-
-详情可以查看 jekyll 官网。[https://jekyllrb.com/](https://jekyllrb.com/) 或 中文翻译版 jekyll 官网[http://jekyllcn.com/](http://jekyllcn.com/) (中文文档翻译落后于英文官网,有兴趣有时间的小伙伴可以参与翻译,为开源世界贡献一份力哦~)
-
-在 mac OS X El Capitan 系统下安装可能会出现问题,解决方案详情见 jekyll 官网: [ https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011]( https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011)
-
-对 jekyll 本身感兴趣的同学可以看看 jekyll 源码: [https://github.com/jekyll/jekyll](https://github.com/jekyll/jekyll)
-
-![jekyll logo](http://jekyllcn.com/img/logo-2x.png)
-
-### 2. 复制博客主题代码
-
-可以直接 clone 、下载 或 fork 这个仓库的代码即可
-
-### 3. 修改参数
-
-主要修改 `_config.yml` 中的参数和自己的网站小图`favicon.ico`
-
-`_config.yml`文件中
-
-#### 基本信息
-
-主要用于网站头部header。
-
-```yml
-# Site settings
-title: HyG
-brief-intro: Front-end Dev Engineer
-baseurl: "" # the subpath of your site, e.g. /blog
-url: "http://gaohaoyang.github.io" # the base hostname & protocol for your site
-```
-
-#### 链接信息
-
-主要用于网站底部footer。
-
-```yml
-# other links
-twitter_username: gaohaoyang126
-facebook_username: gaohaoyang.water
-github_username: Gaohaoyang
-email: gaohaoyang126@126.com
-weibo_username: 3115521wh
-zhihu_username: gaohaoyang
-linkedIn_username: gaohaoyang
-dribbble_username:
-
-description_footer: 本站记录我前端之旅的沿途风景!
-```
-
-#### 评论信息
-
-获取`short_name`的方法:
-
-访问 https://disqus.com/ 或 http://duoshuo.com/ 根据提示操作即可。
-
-```yml
-# comments
-# two ways to comment, only choose one, and use your own short name
-# 两种评论插件,选一个就好了,使用自己的 short_name
-duoshuo_shortname: #hygblog
-disqus_shortname: gaohaoyang
-```
-
-运行成功后,可以在 disqus 或 多说 的后台管理页看到相关信息。
-
-#### 统计信息
-
-获取 百度统计id 或 Google Analytics id 的方法:
-
-访问 http://tongji.baidu.com/ 或 https://www.google.com/analytics/ 根据提示操作即可。当然,如果不想添加统计信息,这两个参数可以不填。
-
-```yml
-# statistic analysis 统计代码
-# 百度统计 id,将统计代码替换为自己的百度统计id,即
-# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";
-# xxxxx字符串
-baidu_tongji_id: cf8506e0ef223e57ff6239944e5d46a4
-google_analytics_id: UA-72449510-4 # google 分析追踪id
-```
-
-成功后,进入自己的百度统计或 Google Analytics 后台管理,即可看到网站的访问量、访客等相关信息。
-
-### 4. 写文章
-
-`_posts`目录下存放文章信息,文章头部注明 layout(布局)、title、date、categories、tags、author(可选)、mathjax(可选,点击[这里](https://www.mathjax.org/)查看更多关于`Mathjax`),如下:
-
-```
----
-layout: post
-title: "对这个 jekyll 博客主题的改版和重构"
-date: 2016-03-12 11:40:18 +0800
-categories: jekyll
-tags: jekyll 端口 markdown Foxit RubyGems HTML CSS
-author: Haoyang Gao
-mathjax: true
----
-```
-
-下面这两行代码为产生目录时使用
-```
-* content
-{:toc}
-```
-
-文章中存在的4次换行为摘要分割符,换行前的内容会以摘要的形式显示在主页Home上,进入文章页不影响。
-
-换行符的设置见配置文件`_config.yml`的 excerpt,如下:
-
-```yml
-# excerpt
-excerpt_separator: "\n\n\n\n"
-```
-
-使用 markdown 语法写文章。
-
-代码风格与 GitHub 上 README 或 issue 中的一致。使用3个\`\`\`的方式。
-
-### 5. 本地运行
-
-本地执行
-
-```
-jekyll s
-```
-
-显示
-
-```
-Configuration file: E:/GitWorkSpace/blog/_config.yml
- Source: E:/GitWorkSpace/blog
- Destination: E:/GitWorkSpace/blog/_site
- Incremental build: disabled. Enable with --incremental
- Generating...
- done in 6.33 seconds.
- Please add the following to your Gemfile to avoid polling for changes:
- gem 'wdm', '>= 0.1.0' if Gem.win_platform?
- Auto-regeneration: enabled for 'E:/GitWorkSpace/blog'
-Configuration file: E:/GitWorkSpace/blog/_config.yml
- Server address: http://127.0.0.1:4000/
- Server running... press ctrl-c to stop.
-```
-
-在本地访问 localhost:4000 即可看到博客主页。
-
-若安装了 Foxit 福昕pdf阅读器可能会占用4000端口,关闭 Foxit服务 或切换 jekyll 端口即可解决。详情见文章:[对这个 jekyll 博客主题的改版和重构](http://gaohaoyang.github.io/2016/03/12/jekyll-theme-version-2.0/)
-
-若正在使用全局代理,可能会报错502,关闭全局代理即可。
-
-### 6. 发布到 GitHub
-
-没什么问题,推送到自己的博客仓库即可。
-
-## 捐助 donate
-
-您也可以捐助我喝杯咖啡!感谢!
-
-
-
-| 支付宝 | 微信支付 | PayPal |
-|:---------------------------------------------------------------------------:|:---------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------:|
-| ![alipay](http://ww2.sinaimg.cn/large/7011d6cfjw1f3bk8ikzoij20740743z5.jpg) | ![wechat](http://ww2.sinaimg.cn/large/7011d6cfjw1f3bkdw3bslj206z06q3z6.jpg) | [![PayPal](https://www.paypalobjects.com/webstatic/paypalme/images/pp_logo_small.png)
Donate via PayPal ](https://www.paypal.me/gaohaoyang) |
-
-感谢捐赠的小伙伴!!!
-
-* 2017.07.02 收到 微信用户 ¥9.99
-* 2017.06.20 收到 微信用户 ¥2.22
-* 2017.06.19 收到 微信用户 ¥6.66
-* 2017.05.25 收到 微信用户 ¥1.00
-* 2017.05.19 收到 风之筝 ¥6.66
-* 2017.05.16 收到 张驰 ¥6.00
-* 2017.05.03 收到 希成 ¥6.66
-* 2017.04.24 收到 deezer ¥10.00
-* 2017.04.13 收到 Abraham Xiao ¥30.00
-* 2017.04.11 收到 微信用户 ¥4.00
-* 2017.04.01 收到 Elvin Zeng ¥6.66
-* 2017.03.13 收到 微信用户 ¥6.66
-* 2017.03.04 收到 史莱姆 ¥9.90
-* 2017.03.02 收到 梦想小熊 ¥6.66
-* 2017.02.27 收到 夏友杰 ¥6.66
-* 2017.02.26 收到 兰缘小妖 ¥10.00
-* 2017.02.25 收到 微信用户 ¥6.66
-* 2017.02.22 收到 微信用户 ¥6.66
-* 2017.02.15 收到 微信用户 ¥10.00
-* 2017.02.06 收到 Light ¥10.24
-* 2017.01.15 收到 微信用户 ¥6.66
-* 2016.12.17 收到 HitNoah ¥12.00
-* 2016.12.09 收到 情融 ¥6.60
-* 2016.11.16 收到 微信用户 ¥6.66
-* 2016.11.16 收到 微信用户 ¥1.00
-* 2016.10.24 收到 奇峰 ¥6.66
-* 2016.10.21 收到 旭廷 ¥10.00
-* 2016.09.24 收到 鑫 ¥6.66
-* 2016.08.25 收到 Erlend Aakre $2.50
-* 2016.08.10 收到 微信用户 ¥4.40
-* 2016.07.25 收到 邓炳初 ¥6.66
-* 2016.07.11 收到 彦风 ¥6.66
-* 2016.07.07 收到 Klci ¥2.50
-* 2016.05.08 收到 1057 ¥10.57
-* 2016.05.07 收到 吴林 ¥2
-* 2016.04.29 收到 北归 ¥10
-* 2016.04.28 收到 魏楚阳_Brian ¥2
-* 2016.04.28 收到 薛彬 ¥8.8
-
-## Update Log
-
-### 2017.2.28
-
-- `[^]` 修复目录滚动 bug [#22](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/22), [#48](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/48)
-
-### 2016.6.20
-
-* `[+]` 在文章页中添加上一篇和下一篇文章链接。
-* `[^]` 修改 font-family 顺序,避免微软雅黑将单引号解析为全角。
-* `[^]` 修复标签云算法中被除数为零的 bug。[#26](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/26), [#28](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/28), [#30](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/30)
-
-### 2016.5.11 v2.0.1
-
-* `[^]` 优化代码,将页面中的大段评论相关代码抽离出来,放入`comments.html`
-* `[+]` 添加百度统计和Google分析代码,在`_config.yml`中配置相关参数即可
-* `[+]` 更新文档,添加博客主题使用方法,便于上手
-* `[+]` 添加了`favicon.ico`
-* `[^]` 修复 bug,目录太长时,滚动到最底部时隐藏到footer下面。修复后长目录在滚动到底部时使用`position:absolute`
-* `[^]` 修改目录区的滚动条样式(仅针对`webkit`内核浏览器)
-* `[^]` 修改 demo 页中 disqus 评论区 a 标签的颜色 bug,修改 blockqoute 中 p 标签的 margin
-* `[+]` 添加不蒜子计数功能,在footer上显示访问量
-* `[+]` 添加回到顶部功能
-
-### 2016.4.27 v2.0.0
-
-* `[^]` 基于 jekyll 3.1.2 重构了所有代码
-* `[+]` 主页添加了摘要,在正文中使用4个换行符来分割,可在`_config.yml`中修改
-* `[+]` 主页添加了近期文章、分类列表和标签云
-* `[+]` 主页导航区做了视觉优化,阴影效果
-* `[+]` 增加了归档、标签和分类页面
-* `[+]` 增加了收藏页面
-* `[+]` 评论插件可以选择 disqus 或 多说,直接在`_config.yml`中修改
-* `[+]` 适配移动端
-* `[+]` 页面滚动时,文章目录固定在右侧
-* `[+]` 页面内容较少时,固定 footer 在页面底部
-* `[^]` 使用 GitHub 风格的代码高亮写法,即\`\`\`的写法,去除`highlight.js`代码高亮插件的使用
-* `[^]` 使用 Masonry 重写了 Demo 页中的瀑布流布局,响应式交互体验更好
-* `[-]` 去除了 jQuery 和 BootStrap,使得加载速度更快
-
-关于旧版博客,我不再维护,同时我把代码转移到了另一个仓库,见 [Gaohaoyang/old-blog](https://github.com/Gaohaoyang/old-blog)。
-
-## License
-
-[MIT License](https://github.com/Gaohaoyang/gaohaoyang.github.io/blob/master/LICENSE.md)
diff --git a/README.md b/README.md
index bf8fe500881..0fde184e2e8 100644
--- a/README.md
+++ b/README.md
@@ -1,399 +1,3 @@
-# About this Cool Concise Jekyll Blog Theme 🤘🤘🤘
+# my personal blog
-[![GitHub stars](https://img.shields.io/github/stars/Gaohaoyang/gaohaoyang.github.io.svg)](https://github.com/Gaohaoyang/gaohaoyang.github.io/stargazers)
-[![GitHub forks](https://img.shields.io/github/forks/Gaohaoyang/gaohaoyang.github.io.svg)](https://github.com/Gaohaoyang/gaohaoyang.github.io/network)
-[![GitHub issues](https://img.shields.io/github/issues/Gaohaoyang/gaohaoyang.github.io.svg)](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues)
-[![GitHub release](https://img.shields.io/github/release/Gaohaoyang/gaohaoyang.github.io.svg)](https://github.com/Gaohaoyang/gaohaoyang.github.io/releases)
-[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Gaohaoyang/gaohaoyang.github.io/master/LICENSE)
-**[中文版 Chinese README 请点击这里 🇨🇳](https://github.com/Gaohaoyang/gaohaoyang.github.io/blob/master/README-zh-cn.md)**
-
-With the escalation of jekyll version, but I also want to reconstruct my older blog theme, so I did reconstruction and added some features recently. My new blog theme will still be stored in this repository. I will also use this theme in the future. Now I have done basically, then I will focus on issues that users opend to make theme better.
-
-**My Blog Url: [http://gaohaoyang.github.io/](http://gaohaoyang.github.io/)**. If you like this theme, you can give me a star to encourage me. Welcome everyone to use it.
-
-## Content
-
-* [Preview](#preview)
-* [Page Details](#page-details)
- * [Home](#home)
- * [Archives](#archives)
- * [Categories](#categories)
- * [Tags](#tags)
- * [Collections](#collections)
- * [Demo](#demo)
- * [About](#about)
- * [Comments](#comments)
- * [Post Contents](#post-contents)
- * [Code Highlight](#code-highlight)
- * [Light Shadow](#light-shadow)
- * [Mobile Adaptation](#mobile-adaptation)
- * [Footer](#footer)
- * [Statistical Analysis](#statistical-analysis)
-* [Usage](#usage)
- * [1. Install ruby and jekyll environment](#1-install-ruby-and-jekyll-environment)
- * [2. Copy theme code](#2-copy-theme-code)
- * [3. Change parameter](#3-change-parameter)
- * [Basic info](#basic-info)
- * [Link info](#link-info)
- * [Comments info](#comments-info)
- * [Statistical analysis info](#statistical-analysis-info)
- * [4. Write post](#4-write-post)
- * [5. Local launch](#5-local-launch)
- * [6. Push to GitHub](#6-push-to-github)
-* [Donate](#donate)
-* [Update Log](#update-log)
-* [License](#license)
-
-## Preview
-
-First of all, let's see previews.
-
-Index Page
-![index](http://ww3.sinaimg.cn/large/7011d6cfjw1f3bdli86awj211k0oyqen.jpg)
-
-Post Page
-![post](http://ww4.sinaimg.cn/large/7011d6cfjw1f3bdmzb9v6j210p0j7gwn.jpg)
-
-## Page Details
-
-### Home
-
-Index page show 5 posts excerpt as a default. Readers can click article title or read more button to see full post. There are recent posts area, categories area and tags area at the right part of the index page. You can also add an area at this part, if you change the file `index.html`.
-
-### Archives
-
-Archive post according to the year.
-
-### Categories
-
-Show posts according to the category.
-
-### Tags
-
-Show posts according to the tags.
-
-### Collections
-
-The user can collect their favorite article links with `markdown` syntax.
-
-### Demo
-
-I use *[Masonry](http://masonry.desandro.com/)* to rewrite the waterfall responsive layout. Better interactive experience.
-
-### About
-
-The user can write some introduction about theirselves and their site with `markdown` syntax.
-
-### Comments
-
-This theme supports both [disqus](https://disqus.com/) and [多说评论 duoshuo comments](http://duoshuo.com/). It's very easy to config your comments module.
-
-The only thing you need do is to change the `short_name` in the file `_config.yml`. As follows.
-
-```yml
-# comments
-# two ways to comment, only choose one, and use your own short name
-duoshuo_shortname: #xxx
-disqus_shortname: xxx
-```
-
-### Post Contents
-
-The post contents is fixed at the right side while page is scrolling. There will be a scroll bar on contents while it is outside the window height.
-
-### Code Highlight
-
-While the jekyll is update to 3.x.x, you can use github flavored markdown to write code.
-
-More info to see [syntax-highlighter-changed](https://jekyllrb.com/docs/upgrading/2-to-3/#syntax-highlighter-changed).
-
-### Light Shadow
-
-![light](http://ww3.sinaimg.cn/large/7011d6cfjw1f3be6y4vp3j209i02rweg.jpg)
-
-You can see the white shadow on the current item in the navbar. I call this light shadow.
-
-### Mobile Adaptation
-
-Of course, I have done a very good mobile adaptation.
-
-![mobile](http://ww4.sinaimg.cn/large/7011d6cfjw1f3bebnzxkpj20ah0fzgp4.jpg)
-
-### Footer
-
-**Welcome to use this blog theme, but please keep the theme author info at footer.** Theme designed by [HyG](https://github.com/gaohaoyang).
-
-![footer](http://ww3.sinaimg.cn/large/7011d6cfjw1f3bepd8002j20hl02ct95.jpg)
-
-### Statistical Analysis
-
-This theme supports Google Analytics and Baidu Statistics, you can just config the id in the file `_config.yml`, as follows.
-
-```yml
-# statistic analysis 统计代码
-# 百度统计 id,将统计代码替换为自己的百度统计id,即
-# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";
-# xxxxx字符串
-baidu_tongji_id: xxxxxxxxxxxx
-google_analytics_id: UA-xxxxxxxx # google 分析追踪id
-```
-
-## Usage
-
-Welcome everyone to use this theme, this part shows introduction to use.
-
-### 1. Install ruby and jekyll environment
-
-This step and Step 5 mainly talk to you how to launch blog at local. If you don't want to launch at local, you can ignore these 2 steps. But I still strongly suggest to do this. Ensure there is nothing wrong before pushing to the github.
-
-The Windows users can directly use [RubyInstaller](http://rubyinstaller.org/) to install ruby environment. Follow the prompts while installing.
-
-Install jekyll commands:
-
-```
-gem install jekyll
-```
-
-For more details, you can view the jekyll official website. [https://jekyllrb.com/](https://jekyllrb.com/)
-
-There may be something wrong at mac OS X El Capitan, you can see the solution at [https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011]( https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011).
-
-If you are interesting in jekyll, you can see the jekyll source code at [https://github.com/jekyll/jekyll](https://github.com/jekyll/jekyll).
-
-![jekyll logo](http://jekyllcn.com/img/logo-2x.png)
-
-### 2. Copy theme code
-
-You can clone, download or fork this repo.
-
-### 3. Change parameter
-
-Mainly change the parameters at file `_config.yml` and use your own `favicon.ico`.
-
-#### Basic info
-
-Shows at site header part.
-
-```yml
-# Site settings
-title: HyG
-brief-intro: Front-end Dev Engineer
-baseurl: "" # the subpath of your site, e.g. /blog
-url: "http://gaohaoyang.github.io" # the base hostname & protocol for your site
-```
-
-#### Link info
-
-Mainly shows at the footer of the site.
-
-```yml
-# other links
-twitter_username: gaohaoyang126
-facebook_username: gaohaoyang.water
-github_username: Gaohaoyang
-email: gaohaoyang126@126.com
-weibo_username: 3115521wh
-zhihu_username: gaohaoyang
-linkedIn_username: gaohaoyang
-dribbble_username:
-
-description_footer: 本站记录我前端之旅的沿途风景!
-```
-
-#### Comments info
-
-Get your own `short_name`:
-
-Visit https://disqus.com/ or http://duoshuo.com/. And follow the prompts at the site.
-
-```yml
-# comments
-# two ways to comment, only choose one, and use your own short name
-duoshuo_shortname: #hygblog
-disqus_shortname: xxxx
-```
-
-When you done, you can also see the comments info at disqus or duoshuo admin console.
-
-#### Statistical analysis info
-
-Get Google Analytics id or Baidu Statistics id:
-
-Visit https://www.google.com/analytics/ or http://tongji.baidu.com/. And follow the prompts at the site.
-
-Of course, if you don't want any statistical and analysis info, you can type nothing at id position.
-
-```yml
-# statistic analysis 统计代码
-# 百度统计 id,将统计代码替换为自己的百度统计id,即
-# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";
-# xxxxx字符串
-baidu_tongji_id: cf850xxxxxxxxxxxxxxxx
-google_analytics_id: UA-7xxxxxx-4 # google 分析追踪id
-```
-
-When you done, you can see UV, PV, location etc. info at your own Google Analytics or Baidu Statistic console.
-
-### 4. Write post
-
-You can write posts at folder `_posts`. At the beginning of the post, you should declare layout、title、date、categories、tags、author(optional) info、mathjax(optional,click [here](https://www.mathjax.org/) for more detail about `Mathjax`).
-
-```
----
-layout: post
-title: "对这个 jekyll 博客主题的改版和重构"
-date: 2016-03-12 11:40:18 +0800
-categories: jekyll
-tags: jekyll 端口 markdown Foxit RubyGems HTML CSS
-author: Haoyang Gao
-mathjax: true
----
-```
-
-These follow code is for making contents.
-```
-* content
-{:toc}
-```
-
-You can use 4 wraps as a excerpt separator. The words before separator as excerpt show in the index page. When you enter the post page, you can read full article.
-
-The wraps config is in the file `_config.yml`, as follows:
-
-```yml
-# excerpt
-excerpt_separator: "\n\n\n\n"
-```
-
-You should use markdown syntax to write article, just like write readme in github.
-
-You can use 3 \`\`\` to write code block.
-
-### 5. Local launch
-
-use command:
-
-```
-jekyll s
-```
-
-Terminal shows:
-
-```
-Configuration file: E:/GitWorkSpace/blog/_config.yml
- Source: E:/GitWorkSpace/blog
- Destination: E:/GitWorkSpace/blog/_site
- Incremental build: disabled. Enable with --incremental
- Generating...
- done in 6.33 seconds.
- Please add the following to your Gemfile to avoid polling for changes:
- gem 'wdm', '>= 0.1.0' if Gem.win_platform?
- Auto-regeneration: enabled for 'E:/GitWorkSpace/blog'
-Configuration file: E:/GitWorkSpace/blog/_config.yml
- Server address: http://127.0.0.1:4000/
- Server running... press ctrl-c to stop.
-```
-
-Visit localhost:4000 to see your blog!!!
-
-### 6. Push to GitHub
-
-If there is nothing wrong, push code to your github!
-
-## Donate
-
-You can also donate me for a coffee, and I'll do better. Thanks.
-
-| PayPal | Wechat Pay | Alipay |
-|:----------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------:|:---------------------------------------------------------------------------:|
-| [![PayPal](https://www.paypalobjects.com/webstatic/paypalme/images/pp_logo_small.png)
Donate via PayPal ](https://www.paypal.me/gaohaoyang) | ![wechat](http://ww2.sinaimg.cn/large/7011d6cfjw1f3bkdw3bslj206z06q3z6.jpg) | ![alipay](http://ww2.sinaimg.cn/large/7011d6cfjw1f3bk8ikzoij20740743z5.jpg) |
-
-
-Thanks these friends!!!
-
-* 2017.07.02 received Wechat user ¥9.99
-* 2017.06.20 received Wechat user ¥2.22
-* 2017.06.19 received Wechat user ¥6.66
-* 2017.05.25 received Wechat user ¥1.00
-* 2017.05.19 received 风之筝 ¥6.66
-* 2017.05.16 received 张驰 ¥6.00
-* 2017.05.03 received 希成 ¥6.66
-* 2017.04.24 received deezer ¥10.00
-* 2017.04.13 received Abraham Xiao ¥30.00
-* 2017.04.11 received Wechat user ¥4.00
-* 2017.04.01 received Elvin Zeng ¥6.66
-* 2017.03.13 received Wechat user ¥6.66
-* 2017.03.04 received 史莱姆 ¥9.90
-* 2017.03.02 received 梦想小熊 ¥6.66
-* 2017.02.27 received 夏友杰 ¥6.66
-* 2017.02.26 received 兰缘小妖 ¥10.00
-* 2017.02.25 received Wechat user ¥6.66
-* 2017.02.22 received Wechat user ¥6.66
-* 2017.02.15 received Wechat user ¥10.00
-* 2017.02.06 received Light ¥10.24
-* 2017.01.15 received Wechat user ¥6.66
-* 2016.12.17 received HitNoah ¥12.00
-* 2016.12.09 received 情融 ¥6.60
-* 2016.11.25 received Wechat user ¥6.66
-* 2016.11.16 received Wechat user ¥1.00
-* 2016.10.24 received 奇峰 ¥6.66
-* 2016.10.21 received 旭廷 ¥10.00
-* 2016.09.25 received 鑫 ¥6.66
-* 2016.08.25 received Erlend Aakre $2.50
-* 2016.08.10 received Wechat user ¥4.40
-* 2016.07.25 received 邓炳初 ¥6.66
-* 2016.07.11 received 彦风 ¥6.66
-* 2016.07.07 received Klci ¥2.50
-* 2016.05.08 received 1057 ¥10.57
-* 2016.05.07 received 吴林 ¥2
-* 2016.04.29 received 北归 ¥10
-* 2016.04.28 received 魏楚阳_Brian ¥2
-* 2016.04.28 received 薛彬 ¥8.8
-
-
-## Update Log
-
-### 2017.2.28
-
-- `[^]` fix smoothScroll bug in Tencent webview like wechat and qq. [#22](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/22), [#48](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/48)
-
-### 2016.6.20
-
-* `[+]` Add next post and previous post link in post page.
-* `[^]` Change the sort of font-family to avoid full-width half-width characters mistake.
-* `[^]` Fix bug in tags cloud when division by zero. [#26](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/26), [#28](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/28), [#30](https://github.com/Gaohaoyang/gaohaoyang.github.io/issues/30)
-
-### 2016.5.11 v2.0.1
-
-* `[^]` Optimized code, Extracting common code to `comments.html`
-* `[+]` Add Google Analysis and Baidu Statistics
-* `[+]` Update README, add usage
-* `[+]` Add `favicon.ico`
-* `[^]` Fix bug at contents
-* `[^]` Change the content scroll bar CSS style(Only for `webkit` browser kernel)
-* `[^]` Change tag a color at demo page
-* `[+]` Add busuanzi counter, show the views count at footer
-* `[+]` Add back to top button
-
-### 2016.4.27 v2.0.0
-
-* `[^]` Rewrite all codes based on jekyll 3.1.2
-* `[+]` Add excerpt at index page
-* `[+]` Add recently post, categories and tags cloud at index page
-* `[+]` Add light shadow at navbar
-* `[+]` Add archives, categories, tags page
-* `[+]` Add collections page
-* `[+]` Add comments plugin with disqus or duoshuo
-* `[+]` Mobile Adaptation
-* `[+]` Fix post contents to the right side while scrolling page
-* `[+]` Fix footer at the bottom when page height is smaller than window height
-* `[^]` Use github flavored markdown to write code block(Fenced code blocks)
-* `[^]` Rewrite the demo page with Masonry
-* `[-]` Remove jQuery and BootStrap
-
-About my old blog theme, I won't maintain any more. And I put the code at [Gaohaoyang/old-blog](https://github.com/Gaohaoyang/old-blog).
-
-## License
-
-[MIT License](https://github.com/Gaohaoyang/gaohaoyang.github.io/blob/master/LICENSE.md)
diff --git a/_config.yml b/_config.yml
index 365d819ba6a..0a930089e99 100644
--- a/_config.yml
+++ b/_config.yml
@@ -6,37 +6,37 @@
# 'jekyll serve'. If you change this file, please restart the server process.
# Site settings
-title: HyG
-brief-intro: Front-end Dev Engineer
-baseurl: "" # the subpath of your site, e.g. /blog
-url: "https://gaohaoyang.github.io" # the base hostname & protocol for your site
+title: Minseon
+brief-intro: developer
+baseurl: "https://github.com/MinseonKim1107/MinseonKim1107.github.io" # the subpath of your site, e.g. /blog
+url: "https://minseonkim1107.github.io/" # the base hostname & protocol for your site
permalink: /:year/:month/:day/:title/
# other links
-twitter_username: gaohaoyang126
-facebook_username: gaohaoyang.water
-github_username: Gaohaoyang
-email: gaohaoyang126@126.com
-weibo_username: 3115521wh
-zhihu_username: gaohaoyang
-linkedIn_username: gaohaoyang
+twitter_username:
+facebook_username:
+github_username: Minseon1107
+email: cheerupsmile@naver.com
+weibo_username:
+zhihu_username:
+linkedIn_username:
dribbble_username:
-description_footer: 本站记录我前端之旅的沿途风景!
+description_footer:
# comments
# two ways to comment, only choose one, and use your own short name
# 两种评论插件,选一个就好了,使用自己的 short_name
duoshuo_shortname: #hygblog
-disqus_shortname: gaohaoyang
+disqus_shortname: minseon
# statistic analysis 统计代码
# 百度统计 id,将统计代码替换为自己的百度统计id,即
# hm.src = "//hm.baidu.com/hm.js?xxxxxxxxxxxx";
# xxxxx字符串
-baidu_tongji_id: cf8506e0ef223e57ff6239944e5d46a4
-google_analytics_id: UA-72449510-4 # google 分析追踪id
+baidu_tongji_id:
+google_analytics_id:
# Build settings
markdown: kramdown
diff --git a/_includes/footer.html b/_includes/footer.html
index 2a2ce79e599..a031a2555a9 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -10,24 +10,9 @@
Contact me at: {% if site.github_username %}
{% endif %} {% if site.email %}
{% endif %} {% if site.weibo_username %}
- {% endif %} {% if site.zhihu_username %}
- {% endif %} {% if site.twitter_username %}
- {% endif %} {% if site.facebook_username %}
- {% endif %} {% if site.linkedIn_username %}
- {% endif %} {% if site.dribbble_username %}
- {% endif %}
-
- 本站总访问量次,本站访客数人次,本文总阅读量次 -
-- - Site powered by Jekyll & Github Pages. - - - Theme designed by HyG. - +
+ diff --git a/_posts/2015-02-10-welcome-to-jekyll.markdown b/_posts/2015-02-10-welcome-to-jekyll.markdown deleted file mode 100644 index 783692c48d3..00000000000 --- a/_posts/2015-02-10-welcome-to-jekyll.markdown +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: post -title: "hello jekyll!" -date: 2015-02-10 15:14:54 -categories: jekyll -tags: jekyll -excerpt: 当年创建 jekyll 时默认的一篇文章,没什么意义,我也一直没删除,留个纪念吧。 -mathjax: true ---- - -You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. - -To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. - -Jekyll also offers powerful support for code snippets: - -```ruby -def print_hi(name) - puts "Hi, #{name}" -end -print_hi('Tom') -#=> prints 'Hi, Tom' to STDOUT. -``` - -Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll’s dedicated Help repository][jekyll-help]. - -[jekyll]: http://jekyllrb.com -[jekyll-gh]: https://github.com/jekyll/jekyll -[jekyll-help]: https://github.com/jekyll/jekyll-help - -Block Mathjax - -$$ -f(x) = ax + b -$$ - -Inline Mathjax $a \neq b$ - diff --git a/_posts/2015-02-12-create-my-blog-with-jekyll.md b/_posts/2015-02-12-create-my-blog-with-jekyll.md deleted file mode 100644 index ef555311f89..00000000000 --- a/_posts/2015-02-12-create-my-blog-with-jekyll.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -layout: post -title: "Jekyll 搭建静态博客" -date: 2015-02-15 22:14:54 -categories: jekyll -tags: jekyll RubyGems ---- - -* content -{:toc} - -一直以来都想搭建一个自己的博客,但是近半年做项目太忙,再加上教研室的网络很坑爹,所以也一直没顾得上。之前用过 WordPress 托管在免费的京东云擎上,但是速度太慢。在知乎上看到一些相关的内容,于是选择了在github上用jekyll搭建博客。 - - - - - -## 搭建过程 - -在jekyll的官网上 [http://jekyllrb.com/](http://jekyllrb.com/) 其实已经说得比较明白了,我在这里还是简单的说一下吧。我用的是Windows系统。 -主要环节有:安装Ruby,安装RubyGems,安装jekyll,安装代码高亮插件,安装node.js - -### 安装Ruby - -ruby官网下载安装:[https://www.ruby-lang.org/en/downloads/](https://www.ruby-lang.org/en/downloads/) - -安装完成后配置环境变量 - -在命令提示符中,得到ruby版本号,如下图,即安装成功 - -![](http://ww4.sinaimg.cn/large/7011d6cfjw1f2ue0e393vj20cu00t748.jpg) - -### 安装RubyGems - -官网下载 [http://rubygems.org/pages/download](http://rubygems.org/pages/download) rubygems-2.4.5.zip - -cd到RubyGems目录 - -![](http://ww1.sinaimg.cn/large/7011d6cfjw1f2ue1l2yscj20gk02amxj.jpg) - -执行安装 - -![](http://ww1.sinaimg.cn/large/7011d6cfjw1f2ue1w8eqnj20bx00hglg.jpg) - -### 用RubyGems安装Jekyll - -执行下面的语句安装 - -![](http://ww4.sinaimg.cn/large/7011d6cfjw1f2ue2g2p3uj207x00ft8j.jpg) - -安装结束画面 - -![](http://ww4.sinaimg.cn/large/7011d6cfjw1f2ue32drwhj20hv09xq5m.jpg) - -至此jekyll就已经安装完毕了,后续就是个性化的自己设定了。 - -### 创建博客 - -在d盘新建一个工作区jekyllWorkspace - -cd到jekyllWorkspace - -执行jekyll new name创建新的工作区 - -![](http://ww3.sinaimg.cn/large/7011d6cfjw1f2ue3lt31nj20cj02nt8u.jpg) - -文件结构如下: - -![](http://ww1.sinaimg.cn/large/7011d6cfjw1f2ue3ujsybj20ek06wabh.jpg) - -cd到博客文件夹,开启服务器 - -![](http://ww1.sinaimg.cn/large/7011d6cfjw1f2ue47y9lgj20ao00f0sl.jpg) - -watch为了检测文件夹内的变化,即修改后不需要重新启动jekyll - -我的环境下启动报错(你的可能没有),再安装yajl-ruby和rouge - -![](http://ww4.sinaimg.cn/large/7011d6cfjw1f2ue4nelnxj20dd077q49.jpg) - -再次启动服务器成功 - -![](http://ww4.sinaimg.cn/large/7011d6cfjw1f2ue4v42koj20g505bdgy.jpg) - -访问 http://localhost:4000/ - -![](http://ww1.sinaimg.cn/large/7011d6cfjw1f2ue56ckwoj20je0eumz3.jpg) - -详细文章页面 - -![](http://ww2.sinaimg.cn/large/7011d6cfjw1f2ue5f3j9cj20je0gyq7a.jpg) - -## 后续 - -* 整个安装过程参考了jekyll官网,注意jekyll还有一个简体中文官网,不过比较坑(我就被坑了),有些内容没有翻译过来,有可能会走弯路,建议如果想看中文的相关资料,也要中英对照着阅读。[jekyll中文网 http://jekyllcn.com](http://jekyllcn.com), [jekyll英文网 http://jekyllrb.com](http://jekyllrb.com) -* jekyll中的css是用sass写的,当然直接在`_sass/_layout.scss`中添加css也是可以的。 -* 本文是用Markdown格式来写的,相关语法可参考: [Markdown 语法说明 (简体中文版) http://wowubuntu.com/markdown/](http://wowubuntu.com/markdown/) -* 按照本文的说明搭建完博客后,用`github Pages`托管就可以看到了。注意,在github上面好像不支持rouge,所以要push到github上时,我将配置文件_config.yml中的代码高亮改变为`highlighter: pygments`就可以了 -* 博客默认是没有评论系统的,本文的评论系统使用了多说,详细安装办法可访问[多说官网 http://duoshuo.com/](http://duoshuo.com/),当然也可以使用[搜狐畅言 http://changyan.sohu.com/](http://changyan.sohu.com/)作为评论系统。 -* 也可以绑定自己的域名,如果没有域名,可以在[godaddy http://www.godaddy.com/](http://www.godaddy.com/)上将域名放入购物车等待降价,买之。 -* 祝各位新年快乐! - ---- - -## 可能出现的问题 - -### `hitimes/hitimes (LoadError)` - -**错误代码:** - -``` -C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- hitimes/hitimes (LoadError) -``` - -**解决方法:** - -在stackoverflow上又一个很好的解决方法。[hitimes require error when running jekyll serve on windows 8.1](http://stackoverflow.com/questions/28985481/hitimes-require-error-when-running-jekyll-serve-on-windows-8-1) 虽然上面的题主问的是 win 8.1 系统下的情况,但是同样适用于 win7。下面我简单翻译一下错误原因和解决方法。 - -> 可能是 Ruby 2.2 和 hitimes-1.2.2-x86-mingw32 中有一些 ABI 变化,少了一些相关的类库。 -> -> 所以卸载 hitimes 并通过 `--platform ruby` 重装即可。代码如下: - -``` -gem uni hitimes -**Remove ALL versions** -gem ins hitimes -v 1.2.1 --platform ruby -``` - -> 然后将自动重新编译 hitimes 并适用于 Ruby 2.2 - -下面是我自己的卸载和安装过程: - -``` -E:\GitWorkSpace\gaohaoyang.github.io>gem uni hitimes - -You have requested to uninstall the gem: - hitimes-1.2.2-x86-mingw32 - -timers-4.0.1 depends on hitimes (>= 0) -If you remove this gem, these dependencies will not be met. -Continue with Uninstall? [yN] y -Successfully uninstalled hitimes-1.2.2-x86-mingw32 - -E:\GitWorkSpace\gaohaoyang.github.io>gem ins hitimes -v 1.2.1 --platform ruby -Fetching: hitimes-1.2.1.gem (100%) -Temporarily enhancing PATH to include DevKit... -Building native extensions. This could take a while... -Successfully installed hitimes-1.2.1 -Parsing documentation for hitimes-1.2.1 -Installing ri documentation for hitimes-1.2.1 -Done installing documentation for hitimes after 1 seconds -1 gem installed -``` - - -关于,[hitimes](https://rubygems.org/gems/hitimes/versions/1.2.2) 是一个快速的高效的定时器解决方案库,详情可以去官网查看。 diff --git a/_posts/2015-03-21-teach-girlfriend-html-css.md b/_posts/2015-03-21-teach-girlfriend-html-css.md deleted file mode 100644 index 662eeb6c8a4..00000000000 --- a/_posts/2015-03-21-teach-girlfriend-html-css.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: post -title: "Teach Girlfriend to make a Web Pages like Zhihu" -date: 2015-03-21 15:14:54 -categories: Bootstrap -tags: BootStrap HTML CSS Zhihu ---- - -* content -{:toc} - -My girlfriend is learning html and css recently. I told her to follow the video. Here, I recommend a video in Chinese that suite for fresh learners. The name of course is Getting HTML web pages dev in 8 hours ( 8小时学会HTML网页开发 ) . I watched this video at very first time. The teacher named Eighteen Swallows ( 燕十八 ) . He teached very clear even himself being on screen to show what is float or box-model. - - - - - - -Here is the site of the free online video. -[http://study.163.com/course/courseMain.htm?courseId=432008](http://study.163.com/course/courseMain.htm?courseId=432008) - -I did the detailed note about this course. You can read here: [http://wenku.baidu.com/view/aa136099f90f76c660371a35](http://wenku.baidu.com/view/aa136099f90f76c660371a35) - -Now I'll tell something happend today. She has watched the video above, and knows a little on BootStrap. So she wants to do some pages with BootStrap. - -We determined to copy the pages on [Zhihu](http://zhihu.com) -Like this: -![知乎zhihu](http://7q5cdt.com1.z0.glb.clouddn.com/teach-girlfriend-html-zhihu.jpg) - -I teached her [Boostrap](http://www.bootcss.com/) this afternoon. She has already got to read the docs and can code simple statics pages. - -She seems to enjoy Web Pages Design. Though she used to be a Graphic Designer. And now, she really works hard. - -At last I'll show the works that we did together in 2 hours. It's unfinished. I guess she will do it later. It's a nice weekend, isn't it? - -[to see Copy Zhihu, click here](http://gaohaoyang.github.io/test/bootstrap-zhihu/) - -screenshot of copy Zhihu: -![Copy Zhihu](http://7q5cdt.com1.z0.glb.clouddn.com/teach-girlfriend-html-CopyZhihu.jpg) diff --git a/_posts/2015-03-26-sublimeLinter.md b/_posts/2015-03-26-sublimeLinter.md deleted file mode 100644 index 64f46d818d2..00000000000 --- a/_posts/2015-03-26-sublimeLinter.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -layout: post -title: "代码校验工具 SublimeLinter 的安装与使用" -date: 2015-03-26 15:14:54 -categories: Sublime -tags: Sublime jshint csslint ---- - -* content -{:toc} - -本文我将讲述一下 SublimeLinter 的安装过程。其组件 jshint 的安装与使用。其组件 csslint 的安装与使用。我将基于 [Sublime Text 3](http://sublimetext.com/3) 来安装。使用 Sublime Text 2 的用户阅读本文是没有帮助的。 - -SublimeLinter 是 Sublime 的插件,它的作用是检查代码语法是否有错误,并提示。习惯了 IDE 下写代码的人一定需要一款在 Sublime 上类似的语法检查工具。下面我们开始。 - - - - - -## 安装 SublimeLinter - -如同其他插件一样使用 Package Control 来安装。 - -1. 按下 `Ctrl+Shift+p` 进入 Command Palette -2. 输入`install`进入 Package Control: Install Package -3. 输入`SublimeLinter`。进行安装. - -![SublimeLinter](http://7q5cdt.com1.z0.glb.clouddn.com/SublimeLinter-sublimeLinter.jpg) - -安装完成后可以看到这样一段话: - -``` -Welcome to SublimeLinter, a linter framework for Sublime Text 3. - - * * * IMPORTANT! * * * - - SublimeLinter 3 is NOT a drop-in replacement for - earlier versions. - - Linters *NOT* included with SublimeLinter 3, - they must be installed separately. - - The settings are different. - - * * * READ THE DOCS! * * * - - Otherwise you will never know how to install linters, nor will - you know about all of the great new features in SublimeLinter 3. - - For complete documentation on how to install and use SublimeLinter, - please see: - - http://www.sublimelinter.com -``` - -可以看到具体的 Linters 组件**不**被包含在 SublimeLinter 3 中,所以我们要额外独立安装组件。 -可以针对不同的语言安装不同的组件。 - -## JavaScript 语法检查 - -SublimeLinter-jshint 是基于 nodeJS 下的 jshint 的插件,实际上 SublimeLinter-jshint 调用了 nodeJS 中 jshint 的接口来进行语法检查的。 - ---- - -### 安装 SublimeLinter-jshint - -为了让 JavaScript 代码有语法检查,我们安装 SublimeLinter-jshint -同样的方法,我们安装 SublimeLinter-jshint - -1. 按下 `Ctrl+Shift+p` 进入 Command Palette -2. 输入`install`进入 Package Control: Install Package -3. 输入`SublimeLinter-jshint`。进行安装. - -如下图 - -![SublimeLinter-jshint](http://7q5cdt.com1.z0.glb.clouddn.com/SublimeLinter-jshint.jpg) - -安装完成后我们可以看到下面的一段话 - -``` -SublimeLinter-jshint - ------------------------------- - This linter plugin for SublimeLinter provides an interface to jshint. - - ** IMPORTANT! ** - - Before this plugin will activate, you *must* - follow the installation instructions here: - - https://github.com/SublimeLinter/SublimeLinter-jshint -``` - -### 安装 nodeJS 和 jshint - -在插件开始工作之前,我们必须再看一下上述插件的[安装说明](https://github.com/SublimeLinter/SublimeLinter-jshint) -通过 [SublimeLinter-jshint 的说明](https://github.com/SublimeLinter/SublimeLinter-jshint) 我们可以看到,这个组件依赖于 nodeJS 下的 jshint,所以我们安装 nodeJS 环境和 nodeJS 下的 jshint。 - -1. 安装 [Node.js](https://nodejs.org/) -2. 通过 npm 安装`jshint` - -在命令行下输入如下代码,完成安装 - - npm install -g jshint - -安装完成后命令行中出现如下的信息 - -``` -C:\Users\Administrator\AppData\Roaming\npm\jshint -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\jshint\bin\jshint -jshint@2.6.3 C:\Users\Administrator\AppData\Roaming\npm\node_modules\jshint -├── strip-json-comments@1.0.2 -├── underscore@1.6.0 -├── exit@0.1.2 -├── shelljs@0.3.0 -├── console-browserify@1.1.0 (date-now@0.1.4) -├── htmlparser2@3.8.2 (domelementtype@1.3.0, entities@1.0.0, domhandler@2.3.0, readable-stream@1.1.13, domutils@1.5.1) -├── minimatch@1.0.0 (sigmund@1.0.0, lru-cache@2.5.0) -└── cli@0.6.6 (glob@3.2.11) -``` - -可以查看 jshint 版本,已确认安装完成。 - -``` -C:\Users\Administrator>jshint -v -jshint v2.6.3 -``` - -现在,恭喜你,我们使用 Sublime 编辑 JavaScript 文件,就会有语法检查了! - -在编辑过程中,会有如下提示 - -![SublimeLinter-jshint-test](http://7q5cdt.com1.z0.glb.clouddn.com/SublimeLinter-jshint-test.jpg) - -点击提示点后,Sublime 状态栏也会有相应的说明 - -![SublimeLinter-jshint-test2](http://7q5cdt.com1.z0.glb.clouddn.com/SublimeLinter-jshint-test2.jpg) - -## css 语法检查 - -与 jshint 同理,SublimeLinter-csslint 也是基于 nodeJS 下的 csslint 的插件,实际上 SublimeLinter-csslint 调用了 nodeJS 中 csslint 的接口来进行语法检查的。 - ---- - -### 安装 SublimeLinter-csslint - -同样的方法。 - -1. 按下 `Ctrl+Shift+p` 进入 Command Palette -2. 输入`install`进入 Package Control: Install Package -3. 输入`SublimeLinter-csslint`。进行安装. - -如下图 - -![SublimeLinter-csslint](http://7q5cdt.com1.z0.glb.clouddn.com/SublimeLinter-csslint.jpg) - -安装完成后我们可以看到下面的一段话 - -``` -SublimeLinter-csslint -------------------------------- -This linter plugin for SublimeLinter provides an interface to csslint. - -** IMPORTANT! ** - -Before this plugin will activate, you *must* -follow the installation instructions here: - -https://github.com/SublimeLinter/SublimeLinter-csslint -``` - -在使用插件之前,必须遵循上述网址中的[安装说明](https://github.com/SublimeLinter/SublimeLinter-csslint) - -### 在 nodeJS 下安装 csslint - -进入上述的 GitHub 地址,csslint 的说明页。我们知道了和 jshint 一样,csslint 也是基于 nodeJS 下的 csslint 来使用的。 - -这里安装 nodeJS 过程省略。 -只需用 npm 安装 csslint 即可。 - -在命令行中输入 - -``` -npm install -g csslint -``` - -安装完成后命令行中出现如下的信息 - -``` -C:\Users\Administrator\AppData\Roaming\npm\csslint -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\csslint\cli.js -csslint@0.10.0 C:\Users\Administrator\AppData\Roaming\npm\node_modules\csslint -└── parserlib@0.2.5 -``` - -可以查看 csslint 版本,已确认安装完成。 - -``` -C:\Users\Administrator>csslint --version -v0.10.0 -``` - -现在,恭喜你,我们使用 Sublime 编辑 css 文件,就会有语法检查了! - -在编辑过程中,会有如下提示 - -![SublimeLinter-csslint-test](http://7q5cdt.com1.z0.glb.clouddn.com/SublimeLinter-csslint-test.jpg) - -点击提示点后,Sublime 状态栏也会有相应的说明 - -![SublimeLinter-csslint-test2](http://7q5cdt.com1.z0.glb.clouddn.com/SublimeLinter-csslint-test2.jpg) diff --git a/_posts/2015-04-06-arrays-similar.md b/_posts/2015-04-06-arrays-similar.md deleted file mode 100644 index dd1757199f5..00000000000 --- a/_posts/2015-04-06-arrays-similar.md +++ /dev/null @@ -1,287 +0,0 @@ ---- -layout: post -title: "判断两个数组是否相似 (arraysSimilar)" -date: 2015-04-06 15:14:54 -categories: JavaScript -tags: JavaScript Array 算法 慕课网 ---- - -* content -{:toc} - -## 题目 - -题目来自 [慕课网 JavaScript 深入浅出 1-6 编程练习](http://imooc.com/code/5760) - -请在 index.html 文件中,编写 arraysSimilar 函数,实现判断传入的两个数组是否相似。具体需求: - -1. 数组中的成员类型相同,顺序可以不同。例如 [1, true] 与 [false, 2] 是相似的。 -2. 数组的长度一致。 -3. 类型的判断范围,需要区分: String, Boolean, Number, undefined, null, 函数, 日期, window. - - - - - -当以上全部满足,则返回**"判定结果:通过"**,否则返回**"判定结果:不通过"**。 - -题目给出了 index.html 如下: - -```html - - - - -` 标签。 -nowrap |文本不会换行,文本会在在同一行上继续,直到遇到 `
` 标签为止。 -pre-wrap |保留空白符序列,但是正常地进行换行。 -pre-line |合并空白符序列,但是保留换行符。 -inherit |规定应该从父元素继承 white-space 属性的值。 - - -### `@font-face` - -**CSS3 @font-face 规则** -在 CSS3 之前,web 设计师必须使用已在用户计算机上安装好的字体。 -通过 CSS3,web 设计师可以使用他们喜欢的任意字体。 -当您您找到或购买到希望使用的字体时,可将该字体文件存放到 web 服务器上,它会在需要时被自动下载到用户的计算机上。 -您“自己的”的字体是在 CSS3 @font-face 规则中定义的。 - -注释:Internet Explorer 8 以及更早的版本不支持新的 @font-face 规则。Internet Explorer 9+ 支持新的 @font-face 规则,但是仅支持 .eot 类型的字体 (Embedded OpenType)。 - -**使用您需要的字体** -在新的 @font-face 规则中,您必须首先定义字体的名称(比如 myFirstFont),然后指向该字体文件。 -如需为 HTML 元素使用字体,请通过 font-family 属性来引用字体的名称 (myFirstFont): - -**实例** - -```css -@font-face { - font-family: myFirstFont; - src: url('Sansation_Light.ttf'), - url('Sansation_Light.eot'); /* IE9+ */ -} -div { - font-family: myFirstFont; -} -``` - -**CSS3 字体描述符** - -下面的表格列出了能够在 @font-face 规则中定义的所有字体描述符: - -描述符 |值 |描述 -font-family |name |必需。规定字体的名称。 -src |URL |必需。定义字体文件的 URL。 -font-stretch |normal
condensed
ultra-condensed
extra-condensed
semi-condensed
expanded
semi-expanded
extra-expanded
ultra-expanded|可选。定义如何拉伸字体。默认是 "normal"。 -font-style|ormal
italic
oblique|可选。定义字体的样式。默认是 "normal"。 -font-weight|normal
bold
100
200
300
400
500
600
700
800
900|选。定义字体的粗细。默认是 "normal"。 -unicode-range |unicode-range |可选。定义字体支持的 UNICODE 字符范围。默认是 "U+0-10FFFF"。 - - -## 深入了解行高属性 - -[参考:深入了解css的行高Line Height属性](http://www.cnblogs.com/fengzheng126/archive/2012/05/18/2507632.html) - -一般来说,设置行高为`值:纯数字`是最理想的方式,因为其会随着对应的 `font-size` 而缩放。 - - -## 盒模型及定位 - -### 已知宽度的div居中 - -* 用两种方法来实现一个背景色为红色、宽度为960px的在浏览器中居中 - -我的方法一: - -使用 `margin:0 auto;` - -html文件 - -```html - - - - -Document - - - -aaa- - -``` - -css文件 - -```css -.center { - width: 960px; - margin: 0 auto; - background-color: red; -} -``` - -方法二: - -绝对定位,左边距离 body 50%,`margin-left: -480px` - -```css -.center { - width: 960px; - background-color: red; - position: absolute; - left: 50%; - margin-left: -480px; -} -``` - -[Demo](http://gaohaoyang.github.io/baidu-ife-practice/task0001/task0001-2.html) - -#### 对于居中的补充 - -参考自 [学习CSS布局](http://zh.learnlayout.com/)。 - -像下面这样写css代码,使用 `max-width` 替代 `width` 可以使浏览器更好地处理小窗口的情况。这点在移动设备上显得尤为重要。 - -有效的避免了如下问题: -当浏览器窗口比元素的宽度还要窄时,浏览器会显示一个水平滚动条来容纳页面。 - -```css -#main { - max-width: 600px; - margin: 0 auto; -} -``` - -* [CSS布局奇淫技巧之--各种居中](http://www.cnblogs.com/2050/p/3392803.html) - - -### 早期css滑动门 - -* 有的圆角矩形是复杂图案,无法直接用border-radius,请在不使用 border-radius 的情况下实现一个可复用的高度和宽度都自适应的圆角矩形 -示例 ![圆角矩形](http://7q5cdt.com1.z0.glb.clouddn.com/Baidu-Front-end-task0001_7.png) - -这道题我一开始不会做,查阅了资料,发现这就是所谓的 css 滑动门的应用。[妙味云课堂之css:滑动门、圆角、css精灵](http://www.bkjia.com/webzh/759711.html) -使用三层嵌套,或者四层嵌套的 `div`,通过背景图定位等方式可以实现。 - - -### 左侧固定右侧自适应宽度的两列布局 - -* 用两种不同的方法来实现一个两列布局,其中左侧部分宽度固定、右侧部分宽度随浏览器宽度的变化而自适应变化 ![pic](http://7q5cdt.com1.z0.glb.clouddn.com/Baidu-Front-end-task0001_3.jpg) - -我的方法一: - -不使用浮动,使用绝对定位,将左上角的块放好位置,右边的块设置`margin-left` - -html 文件: - -```html - - - - -layout - - - ---DIV-A-DIV-B-DIV-C- - -``` - -css 文件: - -```css -.row { - position: relative; -} -.left { - width: 100px; - height: 100px; - background-color: red; - position: absolute; - top: 0; - left: 0; -} -.right { - height: 100px; - background-color: blue; - margin-left: 100px; -} -.bottom { - height: 100px; - background-color: yellow; -} -``` - -方法二: - -使用浮动,左边的块使用浮动,右边的块使用`margin-left` - -```css -.left { - width: 100px; - height: 100px; - background-color: red; - float: left; -} -.right { - height: 100px; - background-color: blue; - margin-left: 100px; -} -.bottom { - height: 100px; - background-color: yellow; -} -``` - -[Demo](http://gaohaoyang.github.io/baidu-ife-practice/task0001/task0001-6-3.html) - - -**补充:** - -看完了后面的 BFC 之后,本题和下一题都可以用另一种方法了 -总之我已经震惊了!太爽了!有没有! - -html - -```html - - - - -使用 BFC 进行两列布局 - - - -DIV-A-DIV-B-DIV-C- - -``` - -css - -```css -.left{ - width: 100px; - height: 100px; - background-color: blue; - float: left; -} -.right{ - height: 100px; - background-color: yellow; - overflow: hidden; -} -.bottom{ - height: 100px; - background-color: red; -} -``` - -[Demo](http://gaohaoyang.github.io/baidu-ife-practice/task0001/two-col-layout-with-BFC.html) - - -### 双飞翼布局 - -* 用两种不同的方式来实现一个三列布局,其中左侧和右侧的部分宽度固定,中间部分宽度随浏览器宽度的变化而自适应变化 - -原题中参考资料 [双飞翼布局](http://www.imooc.com/wenda/detail/254035) - -```html - - - - -Flying Swing Layout - - - --- - -``` - -css - -```css -.bd { - - /*padding: 0 190px;*/ -} -.main { - float: left; - width: 100%; - background-color: #aaa; -} -.main-wrap { - margin: 0 190px; -} -.sub { - float: left; - width: 190px; - margin-left: -100%; - background-color: blue; - /*position: relative; - left: -190px;*/ -} -.extra { - float: left; - width: 190px; - margin-left: -190px; - background-color: yellow; - /*position: relative; - right: -190px;*/ -} -``` - -[Demo](http://gaohaoyang.github.io/baidu-ife-practice/task0001/task0001-6-4.html) - - -**补充:** - -使用 BFC 的另一种方法,我再一次震惊! - -代码超级简单! - -html - -```html - - - - -----Flying Swing Layout
---Flying Swing Layout
- left ---Flying Swing Layout
- right -flying-Swing-BFC - - - -left-right-- flying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.htmlflying-Swing-BFC.html -- - - -``` - -css - -```css -.left{ - width: 100px; - background-color: red; - float: left; -} -.right{ - width: 200px; - background-color: blue; - float: right; -} -.main{ - background-color: #eee; - overflow: hidden; -} -``` -[Demo](http://gaohaoyang.github.io/baidu-ife-practice/task0001/flying-Swing-BFC.html) - - -### 浮动布局 - -* 实现一个浮动布局,红色容器中每一行的蓝色容器数量随着浏览器宽度的变化而变化 ![pic](http://7q5cdt.com1.z0.glb.clouddn.com/Baidu-Front-end-task0001_4.jpg)![pic](http://7q5cdt.com1.z0.glb.clouddn.com/Baidu-Front-end-task0001_5.jpg) - -这个题我觉的直接将每一个块浮动起来就好了,不知我理解的对不对。 - -html文件 - -```html - - - - -Document - - - - - - - - - - - - - - -``` - -css文件 - -```css -body { - background-color: red; -} -div { - width: 150px; - height: 100px; - margin: 10px; - float: left; - background-color: blue; -} -``` - -[Demo](file:///E:/GitWorkSpace/baidu-ife-practice/task0001/task0001-6-5.html) - - -### 清除浮动/闭合浮动 - -参考自 [那些年我们一起清除过的浮动 by 一丝冰凉](http://www.iyunlu.com/view/css-xhtml/55.html) - -1. 清除浮动:清除对应的单词是 clear,对应CSS中的属性是 clear:left \| right \| both \| none; -2. 闭合浮动:更确切的含义是使浮动元素闭合,从而减少浮动带来的影响。 - -我们想要达到的效果更确切地说是闭合浮动,而不是单纯的清除浮动,设置clear:both清除浮动并不能解决warp高度塌陷的问题。 - -正是因为浮动的这种特性,导致本属于普通流中的元素浮动之后,包含框内部由于不存在其他普通流元素了,也就表现出高度为0(**高度塌陷**)。在实际布局中,往往这并不是我们所希望的,所以需要闭合浮动元素,使其包含框表现出正常的高度。 - -最后一丝姐给了两个精益求精方案,我觉得方案一更易于理解,这里实践一下: - -[闭合浮动的Demo](http://gaohaoyang.github.io/baidu-ife-practice/task0001/close-float.html) - -下面是源码 - -html - -```html - - - - -Document - - - -----left
-Content or Something-right-Row2- - -``` - -css - -```css -.row { - border: 1px solid red; -} -.clearfix:after { - content: "\200B"; - display: block; - height: 0; - clear: both; -} -.clearfix { - *zoom: 1; -} -.left { - width: 200px; - float: left; - background-color: #eee; -} -.right { - width: 200px; - float: right; - background-color: #eee; -} -.row2 { - width: 600px; - height: 50px; - background-color: #aaa; -} -``` - -其中`*zoom: 1`是为了触发`hasLayout` - - -还有另一种解决方案! - -参考自:[清除浮动(clearfix hack)](http://zh.learnlayout.com/clearfix.html) - -直接使用,如下代码即可 - -```css -.clearfix{ - overflow: auto; - zoom: 1; -} -``` - -[Demo](http://gaohaoyang.github.io/baidu-ife-practice/task0001/close-float-2.html) - -(实际上,我看完后面的资料,再翻到这里就明白了!正是使用了BFC原理!!!!!!!) - - -**但是今天遇到一个坑!** - -如果使用了 `over-flow`,在后面如果有元素要绝对布局在父元素的外面的,意思就是出现 `top`, `bottom`, `left`, `right` 的值为负值时,就会出现看不到,或者滚动条的问题! - -若是有这种要求,我觉得还是用一丝姐姐的解决方案比较好。 - -**参考** - -* [清除浮动的几种方法](http://zfengqi.me/?p=87) - - -### `box-sizing` - -当你设置一个元素为 `box-sizing: border-box;` 时,此元素的内边距和边框不再会增加它的宽度。 - -他们的内边距和边框都是向内的挤压的。支持IE8+,需要加浏览器内核。 - -```css -.simple { - width: 500px; - margin: 20px auto; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -``` - - -### 响应式布局 - -媒体查询 - -* [MDN CSS媒体查询](https://developer.mozilla.org/zh-CN/docs/Web/Guide/CSS/Media_queries) -* [媒体查询-学习CSS布局](http://zh.learnlayout.com/media-queries.html) - - `@media screen and (min-width: 500px) and (max-width: 800px) { ... }` - -* [An Introduction to Meta Viewport and @viewport](https://dev.opera.com/articles/an-introduction-to-meta-viewport-and-viewport/) - - -### 多列布局 - -* [column](http://zh.learnlayout.com/column.html) - - -### BFC 和 IE 的 hasLayout - -* [BFC和IE的hasLayout](http://www.cnblogs.com/pigtail/archive/2013/01/23/2871627.html) -* [Block Formatting Context 的几大用处](http://outofmemory.cn/wr/?u=http%3A%2F%2Fkkeys.me%2Fpost%2F68547473290) - -看完这个资料后我震惊了!竟然可以这么玩儿! -我将本文之前提到的两列布局,双飞翼布局又重新写了一遍!太爽了!代码超级简洁! - -**Block Formatting Context 的几大用处:** - -1. 防止 margin 折叠 -1. 清除float -1. 不会环绕float元素 - -相关资料 - -* [视觉格式化模型(visual formatting model)](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Visual_formatting_model) -* [块格式化上下文(block formatting context)](https://developer.mozilla.org/zh-CN/docs/Web/CSS/Block_formatting_context) - - -### `div` 三列等高 - -[纯CSS实现三列DIV等高布局](http://show.sysu.edu.cn/?action-blogdetail-uid-2383-id-5040) - -最关键的地方有3句: - -最外层div设置一个溢出隐藏 - -```css -#wrap { - overflow:hidden; -} -``` - -每一个子块设置 padding 和 margin - -```css -#left,#center,#right{ - margin-bottom:-10000px; - padding-bottom:10000px; -} -``` - -overflow:hidden; '隐藏溢出。如果内容溢出wrap层,则不显示。 - -margin-bottom:-10000px; '底部边距-10000px。 -padding-bottom:10000px; '底部填充10000px。 -上面这两句能够实现的效果就是,产生10000px的填充,然后用负的边距把它给抵销掉。 - - -### 去除inline-block元素间间距 - -一开始我不知道是因为使用了 `display: inline-block` 会有间距。后来查找资料找到了相关的方案。 - -* [去除inline-block元素间间距的N种方法](http://www.zhangxinxu.com/wordpress/2012/04/inline-block-space-remove-%E5%8E%BB%E9%99%A4%E9%97%B4%E8%B7%9D/) -* [Fighting the Space Between Inline Block Elements](https://css-tricks.com/fighting-the-space-between-inline-block-elements/) - -真正意义上的inline-block水平呈现的元素间,换行显示或空格分隔的情况下会有间距。 -这种表现是符合规范的应该有的表现。 - -解决方法有很多,上述博文中提到的有: - -1. 移除空格 -2. 使用 `margin` 负值 -3. 取消闭合标签 -4. 使用 `font-size: 0` -5. 使用 `letter-spacing` -6. 使用 `word-spacing` -7. 其他 - -我觉得使用 4 `font-size: 0` 比较好,对别的元素影响最小。代码如下:在 `a` 的外层将字体尺寸设为 0,载对内层的 `a` 重新设置字体大小,即可。 - -```css -nav { - font-size: 0; -} -nav a { - font-size: 16px; -} -``` - - -## 最终作品 - -* [在线Demo](http://gaohaoyang.github.io/ife/task/task0001/work/Gaohaoyang/index.html) -* [源代码](https://github.com/Gaohaoyang/ife/tree/master/task/task0001/work/Gaohaoyang) - - -## 参考资料 - -* [HTML、CSS的代码规范](https://github.com/ecomfe/spec) 自己要试着改变一些代码风格了,规范化! -* [顾轶灵:Web语义化](http://www.zhihu.com/question/20455165) -我看他回答最后的举例的Sildes做的非常好,可以经常看看。[Semantic HTML](http://justineo.github.io/slideshows/semantic-html/)。他的其他Slides也做的非常好,很喜欢这种风格! -* [CSS命名规范@W3C Funs](http://www.w3cfuns.com/blog-5445898-5398950.html) 起名不再困难! -* [点击阅读: CSS浏览器兼容性列表-维基百科](点击阅读: CSS浏览器兼容性列表) 类似的我想到了 [Can I Use](http://caniuse.com/),Can I Use 包含的更多,包括 HTML5, CSS SVG, JS API 等。 - - -* [学习CSS布局](http://zh.learnlayout.com/) -* [Media Queries](http://mediaqueri.es/) -* [使用CSS渐变](https://developer.mozilla.org/zh-CN/docs/Web/Guide/CSS/Using_CSS_gradients) -* [CSS3 Gradient](http://www.w3cplus.com/content/css3-gradient) -* [CSS渐变生成器](http://www.colorzilla.com/gradient-editor/) diff --git a/_posts/2015-04-22-baidu-ife-2-javascript.md b/_posts/2015-04-22-baidu-ife-2-javascript.md deleted file mode 100644 index 5f50a9826eb..00000000000 --- a/_posts/2015-04-22-baidu-ife-2-javascript.md +++ /dev/null @@ -1,1586 +0,0 @@ ---- -layout: post -title: "百度Web前端技术学院(2)-JavaScript 基础" -date: 2015-04-22 19:06:05 -categories: JavaScript -tags: Baidu ife JavaScript 正则 Regular ---- - -* content -{:toc} - -百度前端学院的第二次任务笔记,JavaScript 基础。主要有JavaScript的定义,数据类型,对象,数组,字符串,正则表达式,DOM,事件,BOM,Ajax 等知识。 - - - - - -## 任务 - -掌握JavaScript基础知识,能够使用JavaScript编写一些复杂度不大的交互功能。 - -**任务:** [JavaScript基础](https://github.com/Gaohaoyang/ife/tree/master/task/task0002) - -做完任务一的时候深深地感觉到自己的基础非常的薄弱,在这里再次感谢一下百度前端技术学院,做任务的时候深刻理解了自己平时掌握不牢固的内容,比如浮动、BFC、等高布局等。继续加油吧! - - -像上一篇文章一样,写些东西记录一下。 - - -## 第一个页面交互 - -按照任务中的代码,在IE8下提示:`对象不支持“addEventListener”属性或方法` -我猜是IE8浏览器没有这个方法吧。 - -参考资料:[JavaScript 指南-MDN](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide) - -### 了解JavaScript是什么 - -[来自MDN的解释](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/JavaScript_Overview#What_is_JavaScript.3F) - -> JavaScript 是一种跨平台,面向对象的脚本语言。作为一种小巧且轻量级的语言,JavaScript 无意于独立运行,而是被设计为可以轻易嵌入到其它的产品和应用中,比如 Web 浏览器。在宿主环境中,JavaScript 可以被连接到环境中的对象之上,以提供对其的编程控制。 -> -> 核心的 JavaScript 中包含有一组核心的对象,包括 Array,Date 和 Math,以及一组核心的语言要素,包括操作符,控制结构和语句。出于多种目的,可以通过为其增补附加的对象,对核心 JavaScript 加以扩展;例如: -> -> * 客户端 JavaScript 提供了用于控制浏览器(Navigator 或者其它浏览器)以及其中的文档对象模型(DOM)的对象,从而扩展了核心 JavaScript。例如,客户端扩展允许应用程序在 HTML 的表单中加入元素,以便响应用户事件,比如鼠标点击,表单输入和页面导航。 -> * 服务器端 JavaScript 提供了服务于在服务器上运行 JavaScript 的对象,从而扩展了核心 JavaScript。例如,服务器端扩展可以允许应用程序访问关系型数据库,在应用程序的不同调用间提供信息的连续性,甚至于处理服务器之上的文件。 -> ->借由 JavaScript 的 LiveConnect 功能,您可以让 Java 和 JavaScript 间实现通讯。从 JavaScript 中,您可以创建 Java 对象并访问它们的公共方法和域。从 Java 中,也可以访问 JavaScript 的对象,属性和方法。 -> ->Netscape 发明了 JavaScript 并将 JavaScript 首先用于 Netscape 浏览器中。 - - -### 如何在 HTML 页面加载 JavaScript 代码 - -使用 ` - - -