Repository: iissnan/hexo-theme-next Branch: master Commit: 9c8cea69bf0d Files: 273 Total size: 919.8 KB Directory structure: gitextract_e71ipyj3/ ├── .bowerrc ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── CONTRIBUTING.md │ ├── ISSUE_TEMPLATE.md │ └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .hound.yml ├── .javascript_ignore ├── .jshintrc ├── .stylintrc ├── .travis.yml ├── LICENSE ├── README.cn.md ├── README.md ├── _config.yml ├── bower.json ├── gulpfile.coffee ├── languages/ │ ├── de.yml │ ├── default.yml │ ├── en.yml │ ├── fr-FR.yml │ ├── id.yml │ ├── it.yml │ ├── ja.yml │ ├── ko.yml │ ├── nl-NL.yml │ ├── pt-BR.yml │ ├── pt.yml │ ├── ru.yml │ ├── vi.yml │ ├── zh-Hans.yml │ ├── zh-hk.yml │ └── zh-tw.yml ├── layout/ │ ├── _custom/ │ │ ├── header.swig │ │ └── sidebar.swig │ ├── _layout.swig │ ├── _macro/ │ │ ├── post-collapse.swig │ │ ├── post-copyright.swig │ │ ├── post.swig │ │ ├── reward.swig │ │ ├── sidebar.swig │ │ └── wechat-subscriber.swig │ ├── _partials/ │ │ ├── comments.swig │ │ ├── footer.swig │ │ ├── head/ │ │ │ ├── custom-head.swig │ │ │ └── external-fonts.swig │ │ ├── head.swig │ │ ├── header.swig │ │ ├── page-header.swig │ │ ├── pagination.swig │ │ ├── search/ │ │ │ ├── localsearch.swig │ │ │ ├── swiftype.swig │ │ │ └── tinysou.swig │ │ ├── search.swig │ │ └── share/ │ │ ├── add-this.swig │ │ ├── baidushare.swig │ │ ├── duoshuo_share.swig │ │ └── jiathis.swig │ ├── _scripts/ │ │ ├── boostrap.swig │ │ ├── commons.swig │ │ ├── pages/ │ │ │ └── post-details.swig │ │ ├── schemes/ │ │ │ ├── gemini.swig │ │ │ ├── mist.swig │ │ │ ├── muse.swig │ │ │ └── pisces.swig │ │ └── vendors.swig │ ├── _third-party/ │ │ ├── analytics/ │ │ │ ├── analytics-with-widget.swig │ │ │ ├── application-insights.swig │ │ │ ├── baidu-analytics.swig │ │ │ ├── busuanzi-counter.swig │ │ │ ├── cnzz-analytics.swig │ │ │ ├── facebook-sdk.swig │ │ │ ├── firestore.swig │ │ │ ├── google-analytics.swig │ │ │ ├── index.swig │ │ │ ├── lean-analytics.swig │ │ │ ├── tencent-analytics.swig │ │ │ ├── tencent-mta.swig │ │ │ └── vkontakte-api.swig │ │ ├── comments/ │ │ │ ├── changyan.swig │ │ │ ├── disqus.swig │ │ │ ├── duoshuo.swig │ │ │ ├── gitment.swig │ │ │ ├── hypercomments.swig │ │ │ ├── index.swig │ │ │ ├── livere.swig │ │ │ ├── valine.swig │ │ │ └── youyan.swig │ │ ├── duoshuo-hot-articles.swig │ │ ├── exturl.swig │ │ ├── mathjax.swig │ │ ├── needsharebutton.swig │ │ ├── rating.swig │ │ ├── schedule.swig │ │ ├── scroll-cookie.swig │ │ ├── search/ │ │ │ ├── algolia-search/ │ │ │ │ ├── assets.swig │ │ │ │ └── dom.swig │ │ │ ├── index.swig │ │ │ ├── localsearch.swig │ │ │ └── tinysou.swig │ │ └── seo/ │ │ └── baidu-push.swig │ ├── archive.swig │ ├── category.swig │ ├── index.swig │ ├── page.swig │ ├── post.swig │ ├── schedule.swig │ └── tag.swig ├── package.json ├── scripts/ │ ├── merge-configs.js │ ├── merge.js │ └── tags/ │ ├── button.js │ ├── center-quote.js │ ├── exturl.js │ ├── full-image.js │ ├── group-pictures.js │ ├── label.js │ ├── lazy-image.js │ ├── note.js │ └── tabs.js ├── source/ │ ├── css/ │ │ ├── _common/ │ │ │ ├── components/ │ │ │ │ ├── back-to-top-sidebar.styl │ │ │ │ ├── back-to-top.styl │ │ │ │ ├── buttons.styl │ │ │ │ ├── comments.styl │ │ │ │ ├── components.styl │ │ │ │ ├── footer/ │ │ │ │ │ └── footer.styl │ │ │ │ ├── header/ │ │ │ │ │ ├── header.styl │ │ │ │ │ ├── headerband.styl │ │ │ │ │ ├── menu.styl │ │ │ │ │ ├── site-meta.styl │ │ │ │ │ └── site-nav.styl │ │ │ │ ├── highlight/ │ │ │ │ │ ├── diff.styl │ │ │ │ │ ├── highlight.styl │ │ │ │ │ └── theme.styl │ │ │ │ ├── pages/ │ │ │ │ │ ├── archive.styl │ │ │ │ │ ├── categories.styl │ │ │ │ │ ├── pages.styl │ │ │ │ │ ├── post-detail.styl │ │ │ │ │ └── schedule.styl │ │ │ │ ├── pagination.styl │ │ │ │ ├── post/ │ │ │ │ │ ├── post-button.styl │ │ │ │ │ ├── post-collapse.styl │ │ │ │ │ ├── post-copyright.styl │ │ │ │ │ ├── post-eof.styl │ │ │ │ │ ├── post-expand.styl │ │ │ │ │ ├── post-gallery.styl │ │ │ │ │ ├── post-meta.styl │ │ │ │ │ ├── post-nav.styl │ │ │ │ │ ├── post-reward.styl │ │ │ │ │ ├── post-rtl.styl │ │ │ │ │ ├── post-tags.styl │ │ │ │ │ ├── post-title.styl │ │ │ │ │ ├── post-type.styl │ │ │ │ │ ├── post-widgets.styl │ │ │ │ │ └── post.styl │ │ │ │ ├── sidebar/ │ │ │ │ │ ├── sidebar-author-links.styl │ │ │ │ │ ├── sidebar-author.styl │ │ │ │ │ ├── sidebar-blogroll.styl │ │ │ │ │ ├── sidebar-dimmer.styl │ │ │ │ │ ├── sidebar-feed-link.styl │ │ │ │ │ ├── sidebar-nav.styl │ │ │ │ │ ├── sidebar-toc.styl │ │ │ │ │ ├── sidebar-toggle.styl │ │ │ │ │ ├── sidebar.styl │ │ │ │ │ └── site-state.styl │ │ │ │ ├── tag-cloud.styl │ │ │ │ ├── tags/ │ │ │ │ │ ├── blockquote-center.styl │ │ │ │ │ ├── exturl.styl │ │ │ │ │ ├── full-image.styl │ │ │ │ │ ├── group-pictures.styl │ │ │ │ │ ├── label.styl │ │ │ │ │ ├── note-modern.styl │ │ │ │ │ ├── note.styl │ │ │ │ │ ├── tabs.styl │ │ │ │ │ └── tags.styl │ │ │ │ └── third-party/ │ │ │ │ ├── algolia-search.styl │ │ │ │ ├── baidushare.styl │ │ │ │ ├── busuanzi-counter.styl │ │ │ │ ├── duoshuo.styl │ │ │ │ ├── gitment.styl │ │ │ │ ├── han.styl │ │ │ │ ├── jiathis.styl │ │ │ │ ├── localsearch.styl │ │ │ │ ├── needsharebutton.styl │ │ │ │ └── third-party.styl │ │ │ ├── outline/ │ │ │ │ └── outline.styl │ │ │ └── scaffolding/ │ │ │ ├── base.styl │ │ │ ├── helpers.styl │ │ │ ├── mobile.styl │ │ │ ├── normalize.styl │ │ │ ├── scaffolding.styl │ │ │ └── tables.styl │ │ ├── _custom/ │ │ │ └── custom.styl │ │ ├── _mixins/ │ │ │ ├── Gemini.styl │ │ │ ├── Mist.styl │ │ │ ├── Muse.styl │ │ │ ├── Pisces.styl │ │ │ ├── base.styl │ │ │ └── custom.styl │ │ ├── _schemes/ │ │ │ ├── Gemini/ │ │ │ │ └── index.styl │ │ │ ├── Mist/ │ │ │ │ ├── _base.styl │ │ │ │ ├── _header.styl │ │ │ │ ├── _logo.styl │ │ │ │ ├── _menu.styl │ │ │ │ ├── _posts-expanded.styl │ │ │ │ ├── _search.styl │ │ │ │ ├── index.styl │ │ │ │ ├── outline/ │ │ │ │ │ └── outline.styl │ │ │ │ └── sidebar/ │ │ │ │ └── sidebar-blogroll.styl │ │ │ ├── Muse/ │ │ │ │ ├── _layout.styl │ │ │ │ ├── _logo.styl │ │ │ │ ├── _menu.styl │ │ │ │ ├── _search.styl │ │ │ │ ├── index.styl │ │ │ │ └── sidebar/ │ │ │ │ └── sidebar-blogroll.styl │ │ │ └── Pisces/ │ │ │ ├── _brand.styl │ │ │ ├── _layout.styl │ │ │ ├── _menu.styl │ │ │ ├── _posts.styl │ │ │ ├── _sidebar.styl │ │ │ └── index.styl │ │ ├── _variables/ │ │ │ ├── Gemini.styl │ │ │ ├── Mist.styl │ │ │ ├── Muse.styl │ │ │ ├── Pisces.styl │ │ │ ├── base.styl │ │ │ └── custom.styl │ │ └── main.styl │ ├── fonts/ │ │ └── .gitkeep │ ├── js/ │ │ └── src/ │ │ ├── affix.js │ │ ├── algolia-search.js │ │ ├── bootstrap.js │ │ ├── exturl.js │ │ ├── hook-duoshuo.js │ │ ├── js.cookie.js │ │ ├── motion.js │ │ ├── post-details.js │ │ ├── schemes/ │ │ │ └── pisces.js │ │ ├── scroll-cookie.js │ │ ├── scrollspy.js │ │ └── utils.js │ └── lib/ │ ├── canvas-ribbon/ │ │ └── canvas-ribbon.js │ ├── fastclick/ │ │ ├── .bower.json │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bower.json │ │ └── lib/ │ │ └── fastclick.js │ ├── font-awesome/ │ │ ├── .bower.json │ │ ├── .gitignore │ │ ├── .npmignore │ │ ├── HELP-US-OUT.txt │ │ ├── bower.json │ │ ├── css/ │ │ │ └── font-awesome.css │ │ └── fonts/ │ │ └── FontAwesome.otf │ ├── jquery/ │ │ ├── .bower.json │ │ └── index.js │ ├── jquery_lazyload/ │ │ ├── .bower.json │ │ ├── CONTRIBUTING.md │ │ ├── README.md │ │ ├── bower.json │ │ ├── jquery.lazyload.js │ │ └── jquery.scrollstop.js │ ├── needsharebutton/ │ │ ├── font-embedded.css │ │ ├── needsharebutton.css │ │ └── needsharebutton.js │ └── velocity/ │ ├── .bower.json │ ├── bower.json │ ├── velocity.js │ └── velocity.ui.js └── test/ ├── .jshintrc ├── helpers.js └── intern.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .bowerrc ================================================ { "directory": "source/lib" } ================================================ FILE: .editorconfig ================================================ # editorconfig.org root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = space indent_size = 2 [*.py] indent_size = 4 ================================================ FILE: .gitattributes ================================================ source/lib/* linguist-vendored scripts/merge.js linguist-vendored ================================================ FILE: .github/CONTRIBUTING.md ================================================ Before submitting an issue, please search for the issue [here](https://github.com/iissnan/hexo-theme-next/issues?utf8=%E2%9C%93&q=) to find if the issue is already reported. Also, you can search for answers on the [NexT Documentation Site](http://theme-next.iissnan.com/): - [常见问题 - 中文文档](http://theme-next.iissnan.com/faqs.html) - FAQs (Work in progress) ================================================ FILE: .github/ISSUE_TEMPLATE.md ================================================ THIS REPO IS NOT SUPPORTED ANYMORE! DON'T NEED CREATE ISSUE HERE! NEXT MOVED HERE: https://github.com/theme-next/hexo-theme-next NexT is rebased into organization repo https://github.com/theme-next If you want new feature, fix, or support, create new issue in NexT v6.x repo (desirable in English). There is instructions on English: https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md or Chinese: https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/UPDATE-FROM-5.1.X.md how to update from v5.1.x to v 6.x You also may read this for details: https://github.com/iissnan/hexo-theme-next/issues/2061 *** 该工程已不再提供任何支持与维护! 请大家不要再在这里创建issue了! NexT主题仓库已移动到此处: https://github.com/theme-next/hexo-theme-next NexT已经rebase到theme-next组织(https://github.com/theme-next) 的repo中. 如果你想要求新的特性,bug修复或其他支持,请在新的v6.x的仓库下创建新issue(最好用英文,谢谢) 英文文档: (https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md) 或中文文档: (https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/UPDATE-FROM-5.1.X.md) 如何从 v5.1.x 更新到 v 6.x 相关细节参考这里: https://github.com/iissnan/hexo-theme-next/issues/2061 ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ## PR Checklist **Please check if your PR fulfills the following requirements:** - [ ] The commit message follows [our guidelines](https://github.com/iissnan/hexo-theme-next/blob/master/.github/CONTRIBUTING.md). - [ ] Tests for the changes have been added (for bug fixes / features). - [ ] Muse | Mist have been tested. - [ ] Pisces | Gemini have been tested. - [ ] Docs have been added / updated (for bug fixes / features). ## PR Type **What kind of change does this PR introduce?** - [ ] Bugfix. - [ ] Feature. - [ ] Code style update (formatting, local variables). - [ ] Refactoring (no functional changes, no api changes). - [ ] Build related changes. - [ ] CI related changes. - [ ] Documentation content changes. - [ ] Other... Please describe: ## What is the current behavior? Issue Number(s): N/A ## What is the new behavior? Description about this pull, in several words... * Screens with this changes: N/A * Link to demo site with this changes: N/A ### How to use? In NexT `_config.yml`: ```yml ... ``` ## Does this PR introduce a breaking change? - [ ] Yes. - [ ] No. ================================================ FILE: .gitignore ================================================ .DS_Store .idea/ *.log *.iml yarn.lock package-lock.json node_modules/ # Ignore unused verdors' files source/lib/fancybox/* !source/lib/fancybox/source/ source/lib/font-awesome/less/ source/lib/font-awesome/scss/ source/lib/ua-parser-js/* !source/lib/ua-parser-js/dist/ source/lib/Han/* !source/lib/Han/dist/ ================================================ FILE: .hound.yml ================================================ javascript: enabled: true config_file: .jshintrc ignore_file: .javascript_ignore ================================================ FILE: .javascript_ignore ================================================ source/vendors/* source/lib/* source/js/src/affix.js source/js/src/scrollspy.js source/js/src/js.cookie.js ================================================ FILE: .jshintrc ================================================ { "asi": false, "bitwise": true, "browser": true, "camelcase": true, "curly": true, "forin": true, "immed": true, "latedef": "nofunc", "maxlen": 120, "newcap": true, "noarg": true, "noempty": true, "nonew": true, "predef": [ "$", "jQuery", "NexT", "CONFIG" ], "quotmark": true, "trailing": true, "undef": true, "unused": true, "expr": true } ================================================ FILE: .stylintrc ================================================ { "blocks": false, "brackets": "always", "colons": "always", "colors": "always", "commaSpace": "always", "commentSpace": "always", "cssLiteral": "never", "customProperties": [], "depthLimit": false, "duplicates": true, "efficient": "always", "exclude": [], "extendPref": false, "globalDupe": false, "groupOutputByFile": true, "indentPref": false, "leadingZero": "never", "maxErrors": false, "maxWarnings": false, "mixed": false, "mixins": [], "namingConvention": "lowercase-dash", "namingConventionStrict": false, "none": "never", "noImportant": true, "parenSpace": false, "placeholders": "always", "prefixVarsWithDollar": "always", "quotePref": false, "reporterOptions": { "columns": ["lineData", "severity", "description", "rule"], "columnSplitter": " ", "showHeaders": false, "truncate": true }, "semicolons": "always", "sortOrder": "grouped", "stackedProperties": false, "trailingWhitespace": "never", "universal": false, "valid": true, "zeroUnits": "never", "zIndexNormalize": false } ================================================ FILE: .travis.yml ================================================ language: node_js node_js: node cache: directories: - node_modules install: npm install before_script: - npm install -g gulp addons: browserstack: username: "ivannginx1" access_key: secure: "NutOhdgtUdBUXMPZhy8X1F1Jq+tan1LeNOV0FArBt15SNlxtNArqhiyTi4XnG9MPruX4306aGF2RBrKso+OiGNRdGtRGngH613Q0GWNtlC/boMqnI7fHqLIyCs6S12y2uA8PK4Ifxg9bZ0VtCTYYbMy+p1KvBM//L12vmtfdnby8z5Qvex3tB3dLoPOR50CKkINHJVDLm+iVRFrdz4/83oDsulZSRRGIaxu5taDWPIcp3fYZtre2Nc+RXcsyFDyjN7U0Hvr5tKBbloJxXEQEBv2xLkMOtp85nmCPD06s1Il8Wus1ux3raVsfUyaW5FpNX37Jeb5e00RQUM1wgU5m75H6qiGwDvQswbugJG0i/a2nNfsgVmbrSZdMnkHcx2Uxmrw4ejyEP5NSrJSBi05Ck1fQ4UsZ4Qkdf1fd04SI0LpLWt43eoNO/7rHKsQoP4LCX9gxKUuC075NEBLODyJ529RYfA6dKKwwH6o0ZbOgASmCoAWaM65g4+FHRnJcKL/Kj9ZWklQtRa7/ynlHaA65jefFS2lB8Ut6d3rXDDBih9mIrwV1uUaEH96xgAN42bgU/vY6FGzNkDOYZqj4YfsepDM0wbOsslFie7JZq7iFjsYvrXqLvYUMk37AZwQ2Sb6uH4tIT4Qw/4oZfDzA1En3/8HdZJ28nKW/lzjwMSqheIY=" ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2014-2017 iissnan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.cn.md ================================================
NexT 是一个高质量并且优雅的Hexo 主题。这是精心制作做出来的 hexo 主题。
[](https://gitter.im/iissnan/hexo-theme-next?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![mnt-image]][commits-url] [![travis-image]][travis-url] [![rel-image]][releases-url] [![hexo-image]][hexo-url] [![lic-image]](LICENSE) * NexT 使用文档 | [English Documentation](README.md) ## 实时预览 Live Preview * :heart_decoration: Muse 方案: [LEAFERx](https://leaferx.online) | [XiaMo](https://notes.wanghao.work) | [OAwan](https://oawan.me) * :six_pointed_star: Mist 方案: [Jeff](https://blog.zzbd.org) | [uchuhimo](http://uchuhimo.me) | [xirong](http://www.ixirong.com) * :pisces: Pisces 方案: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com) * :gemini: Gemini 方案: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me) 更多 NexT 例子点击 [这里](https://github.com/iissnan/hexo-theme-next/issues/119). ## 安装 Installation **1.** 在终端切换到**hexo 根**目录. 在hexo目录下一定有 `node_modules`, `source`, `themes` 和其他文件夹: ```sh $ cd hexo $ ls _config.yml node_modules package.json public scaffolds source themes ``` **2.** 从 github 上获取主题 。这里有几种方式来获取主题: ### 下载[最新发布的版本][releases-latest-url] Download tagged release version 在大多数情况下 **稳定**。 推荐用户下载这个。 [![curl-tar-wget-image]][curl-tar-wget-url] ```sh $ mkdir themes/next $ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1 ``` ### 下载[标签发布版本][releases-url] Download tagged release version 您必须定义版本。从[标签列表][tags-url]里选择版本替换`v5.1.2`。 [![curl-tar-image]][curl-tar-url] ```sh $ mkdir themes/next $ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1 ``` [![git-image]][git-url] ```sh $ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next ``` ### 下载[最新的 master 分支][download-latest-url] Download latest master branch 可能会 **不稳定**, 但是包含最新的特色,推荐开发者下载. [![curl-tar-image]][curl-tar-url] ```sh $ mkdir themes/next $ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1 ``` [![git-image]][git-url] ```sh $ git clone https://github.com/iissnan/hexo-theme-next themes/next ``` 使用克隆命令,你将得到**整个存储库**。而且在任何时候你都可以切换到任何标签发布版本。 获取标签列表: ```sh $ cd themes/next $ git tag -l … v5.0.0 v5.0.1 v5.1.0 v5.1.1 v5.1.2 ``` 例如, 你想要切换到`v5.1.0` [标签发布版本][tags-url]. 输入以下命令: ```sh $ git checkout tags/v5.1.0 Note: checking out 'tags/v5.1.0'. … HEAD now on 1f72f68... CSS: Remove global list-style setting of ul ``` 如果你想切换回 [master 分支][commits-url]的话, 输入这个命令: ```sh $ git checkout master ``` **3.** 在 **hexo 根目录下** 的配置文件`_config.yml`里设置主题: theme: next ### Bugs 对于那些遇到 **Error: Cannot find module 'hexo-util'** [问题](https://github.com/iissnan/hexo-theme-next/issues/1490)的人, 请检查你的NPM 版本. - `版本 > 3`: 如果仍然不行的话,请移除 `node_modules` 文件 然后重新安装,使用 `npm install`命令。 - `版本 < 3`: 请通过`npm install --save-dev hexo-util`命令添加`hexo-util`到你的站点包依赖里 ## 更新 Update ```sh $ cd themes/next $ git pull ``` ### Bugs > 提交您的更改或存储它们,然后才能合并。 您必须提交,存储或放弃本地更改. 看 [here](https://stackoverflow.com/a/15745424/5861495) 是如何做的。 ### 使用Hexo data files([#328](https://github.com/iissnan/hexo-theme-next/issues/328))配置主题 Theme configurations using Hexo data files #328 目前升级 NexT 主题的时候并不是非常的流畅。若使用 `git pull` 的方式,很多时候可能会产生冲突;而下载新版本覆盖安装的方式又需要手动合并主题的 `_config.yml` 文件。 在此修改之前, NexT 建议将配置分离,一部分在 站点的配置文件中,另外一部分在主题的配置文件中。将需要自定的选项放置在 站点配置文件中,从而脱离避免更新主题时可能遇到的麻烦。这种方式是可行,但是有一些缺点: 1. 配置分离成了两个部分 2. 用户可能会疑惑一些选项该放置在哪里比较合适 为了解决这个问题, NexT 将会使用 Hexo 的 [Data Files](https://hexo.io/docs/data-files.html) 。然而由于 Data Files 是在 Hexo 3 版本时引进的,所以要使用这个特性,需要 Hexo 的版本不低于 3。 若你比较喜欢 Hexo 2.x 版本,可以继续使用原先的配置方式。 NexT 保持着向下兼容。 #### 特性 Benefits 通过这个特性,你可以将所有的主题配置放置在站点的 `source/_data/next.yml` 文件中。原先放置在 站点配置文件 中的选项可以迁移到新的位置,同时,主题配置文件可以不用做任何修改。若后续版本有配置相关的改动时,你仅需在 `next.yml` 中做相应调整即可 #### 如何使用这个特性 How to use this feature 1. 请先确保你所使用的 Hexo 版本在 3 以上 2. 在站点的 `source/_data` 目录下新建 `next.yml` 文件(`_data`目录可能需要新建) 3. 迁移站点配置文件和主题配置文件中的配置到 `next.yml` 中 4. 使用 `--config source/_data/next.yml` 参数启动服务器, 生成或者部署。\ 例如: `hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml`。 ## 特色 Features ### 支持多国语言, 包括: :cn: 简体中文 & 繁体中文NexT is a high quality elegant Hexo theme. It is crafted from scratch, with love.
[![gitter-image]][gitter-url] [![mnt-image]](https://github.com/theme-next/hexo-theme-next) [![travis-image]][travis-url] [![rel-image]][releases-url] [![hexo-image]][hexo-url] [![lic-image]](LICENSE) * [Chinese Documentation](README.cn.md) ## Live Preview * :heart_decoration: Muse scheme: [LEAFERx](https://leaferx.online) | [XiaMo](https://notes.wanghao.work) | [OAwan](https://oawan.me) * :six_pointed_star: Mist scheme: [Jeff](https://blog.zzbd.org) | [uchuhimo](http://uchuhimo.me) | [xirong](http://www.ixirong.com) * :pisces: Pisces scheme: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com) * :gemini: Gemini scheme: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me) More NexT examples [here](https://github.com/iissnan/hexo-theme-next/issues/119). ## Installation **1.** Change dir to **hexo root** directory. There must be `node_modules`, `source`, `themes` and other directories: ```sh $ cd hexo $ ls _config.yml node_modules package.json public scaffolds source themes ``` **2.** Get theme from GitHub. There are several variants to do it: ### Download [latest release version][releases-latest-url]. At most cases **stable**. Recommended for most users. [![curl-tar-wget-image]][curl-tar-wget-url] ```sh $ mkdir themes/next $ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1 ``` ### Download [tagged release version][releases-url]. You must define version. Replace `v5.1.2` with any version from [tags list][tags-url]. [![curl-tar-image]][curl-tar-url] ```sh $ mkdir themes/next $ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1 ``` [![git-image]][git-url] ```sh $ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next ``` ### Download [latest master branch][download-latest-url]. May be **unstable**, but includes latest features. Recommended for developers. [![curl-tar-image]][curl-tar-url] ```sh $ mkdir themes/next $ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1 ``` [![git-image]][git-url] ```sh $ git clone https://github.com/iissnan/hexo-theme-next themes/next ``` Clone command will give you the **whole repository**. And in any time you can switch to any tagged release.\ Get tags list: ```sh $ cd themes/next $ git tag -l … v5.0.0 v5.0.1 v5.1.0 v5.1.1 v5.1.2 ``` For example, you want to switch on `v5.1.0` [tagged release version][tags-url]. Input the following command: ```sh $ git checkout tags/v5.1.0 Note: checking out 'tags/v5.1.0'. … HEAD now on 1f72f68... CSS: Remove global list-style setting of ul ``` And if you want to switch back on [master branch][commits-url], input this command: ```sh $ git checkout master ``` **3.** Set theme in main **hexo root config** `_config.yml` file: theme: next ### Bugs For those who also encounter **Error: Cannot find module 'hexo-util'** [issue](https://github.com/iissnan/hexo-theme-next/issues/1490), please check your NPM version. - `> 3`: Still not work. Please remove `node_modules` directory and reinstall using `npm install`. - `< 3`: Please add `hexo-util` explicitly via `npm install --save-dev hexo-util` to you site package deps. ## Update ```sh $ cd themes/next $ git pull ``` ### Bugs > Commit your changes or stash them before you can merge You must Commit, Stash or Discard local changes. See [here](https://stackoverflow.com/a/15745424/5861495) how to do it. ### Theme configurations using Hexo data files ([#328](https://github.com/iissnan/hexo-theme-next/issues/328)) Currently, it is not smooth to update NexT theme from pulling or downloading new releases. It is quite often running into conflict status when updating NexT theme via `git pull`, or need to merge configurations manually when upgrading to new releases. At present, NexT encourages users to store some options in site's `_config.yml` and other options in theme's `_config.yml`. This approach is applicable, but has some drawbacks: 1. Configurations are splited into two pieces 2. Users maybe confuse which place should be for options In order to resolve this issue, NexT will take advantage of Hexo [Data files](https://hexo.io/docs/data-files.html). Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature. If you prefer Hexo 2.x, you can still use the old approach for configurations. NexT is still compatible with Hexo 2.x. #### Benefits With this feature, now you can put all your configurations into one place (`source/_data/next.yml`), you don't need to touch `next/_config.yml`. If there are any new options in new releases, you just need to copy those options from `next/_config.yml`, paste into `_data/next.yml` and set their values to whatever you want. #### How to use this feature 1. Please ensure you are using Hexo 3 (or above) 2. Create an file named `next.yml` in site's `source/_data` directory (create `_data` directory if it did not exist) 3. Copy NexT theme options both in site's `_config.yml` and theme's `_config.yml` into `next.yml`. 4. Use `--config source/_data/next.yml` parameter to start server, generate or deploy.\ For example: `hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml`. ## Features ### Multiple languages support, including: :cn: Simplified Chinese & Traditional Chinese. and code blocks.
codes:
external: true
family:
size:
# ---------------------------------------------------------------
# Third Party Services Settings
# ---------------------------------------------------------------
# MathJax Support
mathjax:
enable: false
per_page: false
cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
# Han Support docs: https://hanzi.pro/
han: false
# Swiftype Search API Key
#swiftype_key:
# Baidu Analytics ID
#baidu_analytics:
# Duoshuo ShortName
#duoshuo_shortname:
# Disqus
disqus:
enable: false
shortname:
count: true
# Hypercomments
#hypercomments_id:
# changyan
changyan:
enable: false
appid:
appkey:
# Valine.
# You can get your appid and appkey from https://leancloud.cn
# more info please open https://valine.js.org
valine:
enable: false
appid: # your leancloud application appid
appkey: # your leancloud application appkey
notify: false # mail notifier , https://github.com/xCss/Valine/wiki
verify: false # Verification code
placeholder: Just go go # comment box placeholder
avatar: mm # gravatar style
guest_info: nick,mail,link # custom comment header
pageSize: 10 # pagination size
# Support for youyan comments system.
# You can get your uid from http://www.uyan.cc
#youyan_uid: your uid
# Support for LiveRe comments system.
# You can get your uid from https://livere.com/insight/myCode (General web site)
#livere_uid: your uid
# Gitment
# Introduction: https://imsun.net/posts/gitment-introduction/
# You can get your Github ID from https://api.github.com/users/
gitment:
enable: false
mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway
count: true # Show comments count in post meta area
lazy: false # Comments lazy loading with a button
cleanly: false # Hide 'Powered by ...' on footer, and more
language: # Force language, or auto switch by theme
github_user: # MUST HAVE, Your Github ID
github_repo: # MUST HAVE, The repo you use to store Gitment comments
client_id: # MUST HAVE, Github client id for the Gitment
client_secret: # EITHER this or proxy_gateway, Github access secret token for the Gitment
proxy_gateway: # Address of api proxy, See: https://github.com/aimingoo/intersect
redirect_protocol: # Protocol of redirect_uri with force_redirect_protocol when mint enabled
# Baidu Share
# Available value:
# button | slide
# Warning: Baidu Share does not support https.
#baidushare:
## type: button
# Share
# This plugin is more useful in China, make sure you known how to use it.
# And you can find the use guide at official webiste: http://www.jiathis.com/.
# Warning: JiaThis does not support https.
#jiathis:
##uid: Get this uid from http://www.jiathis.com/
#add_this_id:
# Share
#duoshuo_share: true
# NeedMoreShare2
# This plugin is a pure javascript sharing lib which is useful in China.
# See: https://github.com/revir/need-more-share2
# Also see: https://github.com/DzmVasileusky/needShareButton
# iconStyle: default | box
# boxForm: horizontal | vertical
# position: top / middle / bottom + Left / Center / Right
# networks: Weibo,Wechat,Douban,QQZone,Twitter,Linkedin,Mailto,Reddit,
# Delicious,StumbleUpon,Pinterest,Facebook,GooglePlus,Slashdot,
# Technorati,Posterous,Tumblr,GoogleBookmarks,Newsvine,
# Evernote,Friendfeed,Vkontakte,Odnoklassniki,Mailru
needmoreshare2:
enable: false
postbottom:
enable: false
options:
iconStyle: box
boxForm: horizontal
position: bottomCenter
networks: Weibo,Wechat,Douban,QQZone,Twitter,Facebook
float:
enable: false
options:
iconStyle: box
boxForm: horizontal
position: middleRight
networks: Weibo,Wechat,Douban,QQZone,Twitter,Facebook
# Google Webmaster tools verification setting
# See: https://www.google.com/webmasters/
#google_site_verification:
# Google Analytics
#google_analytics:
# Bing Webmaster tools verification setting
# See: https://www.bing.com/webmaster/
#bing_site_verification:
# Yandex Webmaster tools verification setting
# See: https://webmaster.yandex.ru/
#yandex_site_verification:
# CNZZ count
#cnzz_siteid:
# Application Insights
# See https://azure.microsoft.com/en-us/services/application-insights/
# application_insights:
# Make duoshuo show UA
# user_id must NOT be null when admin_enable is true!
# you can visit http://dev.duoshuo.com get duoshuo user id.
duoshuo_info:
ua_enable: true
admin_enable: false
user_id: 0
#admin_nickname: Author
# Post widgets & FB/VK comments settings.
# ---------------------------------------------------------------
# Facebook SDK Support.
# https://github.com/iissnan/hexo-theme-next/pull/410
facebook_sdk:
enable: false
app_id: #
fb_admin: #
like_button: #true
webmaster: #true
# Facebook comments plugin
# This plugin depends on Facebook SDK.
# If facebook_sdk.enable is false, Facebook comments plugin is unavailable.
facebook_comments_plugin:
enable: false
num_of_posts: 10 # min posts num is 1
width: 100% # default width is 550px
scheme: light # default scheme is light (light or dark)
# VKontakte API Support.
# To get your AppID visit https://vk.com/editapp?act=create
vkontakte_api:
enable: false
app_id: #
like: true
comments: true
num_of_posts: 10
# Star rating support to each article.
# To get your ID visit https://widgetpack.com
rating:
enable: false
id: #
color: fc6423
# ---------------------------------------------------------------
# Show number of visitors to each article.
# You can visit https://leancloud.cn get AppID and AppKey.
leancloud_visitors:
enable: false
app_id: #
app_key: #
# Another tool to show number of visitors to each article.
# visit https://console.firebase.google.com/u/0/ to get apiKey and projectId
# visit https://firebase.google.com/docs/firestore/ to get more information about firestore
firestore:
enable: false
collection: articles #required, a string collection name to access firestore database
apiKey: #required
projectId: #required
bluebird: false #enable this if you want to include bluebird 3.5.1(core version) Promise polyfill
# Show PV/UV of the website/page with busuanzi.
# Get more information on http://ibruce.info/2015/04/04/busuanzi/
busuanzi_count:
# count values only if the other configs are false
enable: false
# custom uv span for the whole site
site_uv: true
site_uv_header:
site_uv_footer:
# custom pv span for the whole site
site_pv: true
site_pv_header:
site_pv_footer:
# custom pv span for one page only
page_pv: true
page_pv_header:
page_pv_footer:
# Tencent analytics ID
# tencent_analytics:
# Tencent MTA ID
# tencent_mta:
# Enable baidu push so that the blog will push the url to baidu automatically which is very helpful for SEO
baidu_push: false
# Google Calendar
# Share your recent schedule to others via calendar page
#
# API Documentation:
# https://developers.google.com/google-apps/calendar/v3/reference/events/list
calendar:
enable: false
calendar_id:
api_key:
orderBy: startTime
offsetMax: 24
offsetMin: 4
timeZone:
showDeleted: false
singleEvents: true
maxResults: 250
# Algolia Search
algolia_search:
enable: false
hits:
per_page: 10
labels:
input_placeholder: Search for Posts
hits_empty: "We didn't find any results for the search: ${query}"
hits_stats: "${hits} results found in ${time} ms"
# Local search
# Dependencies: https://github.com/flashlab/hexo-generator-search
local_search:
enable: false
# if auto, trigger search by changing input
# if manual, trigger search by pressing enter key or search button
trigger: auto
# show top n results per article, show all results by setting to -1
top_n_per_article: 1
# ---------------------------------------------------------------
# Tags Settings
# ---------------------------------------------------------------
# External URL with BASE64 encrypt & decrypt.
# Usage: {% exturl text url "title" %}
# Alias: {% extlink text url "title" %}
exturl: false
# Note tag (bs-callout).
note:
# Note tag style values:
# - simple bs-callout old alert style. Default.
# - modern bs-callout new (v2-v3) alert style.
# - flat flat callout style with background, like on Mozilla or StackOverflow.
# - disabled disable all CSS styles import of note tag.
style: simple
icons: false
border_radius: 3
# Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6).
# Offset also applied to label tag variables. This option can work with disabled note tag.
light_bg_offset: 0
# Label tag.
label: true
# Tabs tag.
tabs:
enable: true
transition:
tabs: false
labels: true
border_radius: 0
#! ---------------------------------------------------------------
#! DO NOT EDIT THE FOLLOWING SETTINGS
#! UNLESS YOU KNOW WHAT YOU ARE DOING
#! ---------------------------------------------------------------
# Use velocity to animate everything.
motion:
enable: true
async: false
transition:
# Transition variants:
# fadeIn | fadeOut | flipXIn | flipXOut | flipYIn | flipYOut | flipBounceXIn | flipBounceXOut | flipBounceYIn | flipBounceYOut
# swoopIn | swoopOut | whirlIn | whirlOut | shrinkIn | shrinkOut | expandIn | expandOut
# bounceIn | bounceOut | bounceUpIn | bounceUpOut | bounceDownIn | bounceDownOut | bounceLeftIn | bounceLeftOut | bounceRightIn | bounceRightOut
# slideUpIn | slideUpOut | slideDownIn | slideDownOut | slideLeftIn | slideLeftOut | slideRightIn | slideRightOut
# slideUpBigIn | slideUpBigOut | slideDownBigIn | slideDownBigOut | slideLeftBigIn | slideLeftBigOut | slideRightBigIn | slideRightBigOut
# perspectiveUpIn | perspectiveUpOut | perspectiveDownIn | perspectiveDownOut | perspectiveLeftIn | perspectiveLeftOut | perspectiveRightIn | perspectiveRightOut
post_block: fadeIn
post_header: slideDownIn
post_body: slideDownIn
coll_header: slideLeftIn
# Only for Pisces | Gemini.
sidebar: slideUpIn
# Fancybox
fancybox: true
# Progress bar in the top during page loading.
pace: false
# Themes list:
#pace-theme-big-counter
#pace-theme-bounce
#pace-theme-barber-shop
#pace-theme-center-atom
#pace-theme-center-circle
#pace-theme-center-radar
#pace-theme-center-simple
#pace-theme-corner-indicator
#pace-theme-fill-left
#pace-theme-flash
#pace-theme-loading-bar
#pace-theme-mac-osx
#pace-theme-minimal
# For example
# pace_theme: pace-theme-center-simple
pace_theme: pace-theme-minimal
# Canvas-nest
canvas_nest: false
# three_waves
three_waves: false
# canvas_lines
canvas_lines: false
# canvas_sphere
canvas_sphere: false
# Only fit scheme Pisces
# Canvas-ribbon
# size: The width of the ribbon.
# alpha: The transparency of the ribbon.
# zIndex: The display level of the ribbon.
canvas_ribbon:
enable: false
size: 300
alpha: 0.6
zIndex: -1
# Script Vendors.
# Set a CDN address for the vendor you want to customize.
# For example
# jquery: https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js
# Be aware that you should use the same version as internal ones to avoid potential problems.
# Please use the https protocol of CDN files when you enable https on your site.
vendors:
# Internal path prefix. Please do not edit it.
_internal: lib
# Internal version: 2.1.3
jquery:
# Internal version: 2.1.5
# See: http://fancyapps.com/fancybox/
fancybox:
fancybox_css:
# Internal version: 1.0.6
# See: https://github.com/ftlabs/fastclick
fastclick:
# Internal version: 1.9.7
# See: https://github.com/tuupola/jquery_lazyload
lazyload:
# Internal version: 1.2.1
# See: http://VelocityJS.org
velocity:
# Internal version: 1.2.1
# See: http://VelocityJS.org
velocity_ui:
# Internal version: 0.7.9
# See: https://faisalman.github.io/ua-parser-js/
ua_parser:
# Internal version: 4.6.2
# See: http://fontawesome.io/
fontawesome:
# Internal version: 1
# https://www.algolia.com
algolia_instant_js:
algolia_instant_css:
# Internal version: 1.0.2
# See: https://github.com/HubSpot/pace
# Or use direct links below:
# pace: //cdn.bootcss.com/pace/1.0.2/pace.min.js
# pace_css: //cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css
pace:
pace_css:
# Internal version: 1.0.0
# https://github.com/hustcc/canvas-nest.js
canvas_nest:
# three
three:
# three_waves
# https://github.com/jjandxa/three_waves
three_waves:
# three_waves
# https://github.com/jjandxa/canvas_lines
canvas_lines:
# three_waves
# https://github.com/jjandxa/canvas_sphere
canvas_sphere:
# Internal version: 1.0.0
# https://github.com/zproo/canvas-ribbon
canvas_ribbon:
# Internal version: 3.3.0
# https://github.com/ethantw/Han
han:
# needMoreShare2
# https://github.com/revir/need-more-share2
needMoreShare2:
# Assets
css: css
js: js
images: images
# Theme version
version: 5.1.4
================================================
FILE: bower.json
================================================
{
"name": "isn-next",
"version": "5.1.4",
"homepage": "https://github.com/iissnan/hexo-theme-next",
"authors": [
"iissnan "
],
"description": "Elegant theme for Hexo",
"repository": "https://github.com/iissnan/hexo-theme-next",
"keywords": [
"hexo",
"notes",
"theme",
"iissnan",
"NexT"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"source/lib",
"test",
"tests",
"screenshots"
],
"dependencies": {
"fancybox": "~2.1.5",
"velocity": "~1.2.1",
"jquery": "http://code.jquery.com/jquery-2.1.3.min.js",
"fastclick": "~1.0.6",
"font-awesome": "fontawesome#*",
"jquery_lazyload": "jquery.lazyload#~1.9.7",
"ua-parser-js": "~0.7.9",
"Han": "^3.3.0"
}
}
================================================
FILE: gulpfile.coffee
================================================
fs = require('fs')
path = require('path')
gulp = require('gulp')
jshint = require('gulp-jshint')
stylish = require('jshint-stylish')
shell = require('gulp-shell')
yaml = require('js-yaml')
gulp.task 'lint', ->
return gulp.src([
'./source/js/src/utils.js',
'./source/js/src/motion.js',
'./source/js/src/hook-duoshuo.js',
'./source/js/src/algolia-search.js',
'./source/js/src/bootstrap.js',
'./source/js/src/post-details.js',
'./source/js/src/schemes/pisces.js'
]).pipe jshint()
.pipe jshint.reporter(stylish)
gulp.task 'lint:stylus', shell.task [
'"./node_modules/.bin/stylint" ./source/css/'
]
gulp.task 'validate:config', (cb) ->
themeConfig = fs.readFileSync path.join(__dirname, '_config.yml')
try
yaml.safeLoad(themeConfig)
cb()
catch error
cb new Error(error)
gulp.task 'validate:languages', (cb) ->
languagesPath = path.join __dirname, 'languages'
languages = fs.readdirSync languagesPath
errors = []
for lang in languages
languagePath = path.join languagesPath, lang
try
yaml.safeLoad fs.readFileSync(languagePath), {
filename: path.relative(__dirname, languagePath)
}
catch error
errors.push error
if errors.length == 0
cb()
else
cb(errors)
gulp.task 'default', ['lint', 'validate:config', 'validate:languages']
================================================
FILE: languages/de.yml
================================================
title:
archive: Archiv
category: Kategorie
tag: Tag
author: Author
menu:
home: Startseite
archives: Archiv
categories: Kategorien
tags: Tags
about: Über
feed: RSS
search: Suche
sidebar:
overview: Übersicht
toc: Inhaltsverzeichnis
post:
created: Post created
sticky: Sticky
posted: Veröffentlicht am
modified: Updated at
in: in
read_more: Weiterlesen
untitled: Unbenannt
toc_empty: Dieser Artikel hat kein Inhaltsverzeichnis
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: Gesamt
tags: tags
footer:
powered: "Erstellt mit %s"
theme: Theme
counter:
tag_cloud:
zero: Keine Tags
one: Insgesamt ein Tag
other: "Insgesamt %d Tags"
categories:
zero: Keine Kategorien
one: Insgesamt eine Kategorie
other: "Insgesamt %d Kategorien"
archive_posts:
zero: Keine Artikel vorhanden.
one: Ein Artikel.
other: "Insgesamt %d Artikel."
state:
posts: Artikel
pages: Seiten
tags: Tags
categories: Kategorien
cheers:
um: Öhm..
ok: OK
nice: Schön
good: Gut
great: Wunderbar
excellent: Exzellent
keep_on: Bleib dran.
symbol:
comma: '. '
period: ', '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/default.yml
================================================
title:
archive: Archive
category: Category
tag: Tag
schedule: Schedule
author: Author
menu:
home: Home
archives: Archives
categories: Categories
tags: Tags
about: About
search: Search
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Overview
toc: Table of Contents
post:
created: Post created
modified: Post modified
sticky: Sticky
posted: Posted on
in: In
more: more
read_more: Read more
untitled: Untitled
toc_empty: This post does not have a Table of Contents
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: Totally
tags: tags
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: No tags
one: 1 tag in total
other: "%d tags in total"
categories:
zero: No categories
one: 1 category in total
other: "%d categories in total"
archive_posts:
zero: No posts.
one: 1 post.
other: "%d posts in total."
state:
posts: posts
pages: pages
tags: tags
categories: categories
search:
placeholder: Searching...
cheers:
um: Um..
ok: OK
nice: Nice
good: Good
great: Great
excellent: Excellent
keep_on: Keep on posting.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/en.yml
================================================
title:
archive: Archive
category: Category
tag: Tag
schedule: Schedule
author: Author
menu:
home: Home
archives: Archives
categories: Categories
tags: Tags
about: About
search: Search
schedule: Schedule
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Overview
toc: Table of Contents
post:
created: Post created
modified: Post modified
sticky: Sticky
posted: Posted on
in: In
more: more
read_more: Read more
untitled: Untitled
toc_empty: This post does not have a Table of Contents
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: Totally
tags: tags
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: No tags
one: 1 tag in total
other: "%d tags in total"
categories:
zero: No categories
one: 1 category in total
other: "%d categories in total"
archive_posts:
zero: No posts.
one: 1 post.
other: "%d posts in total."
state:
posts: posts
pages: pages
tags: tags
categories: categories
search:
placeholder: Searching...
cheers:
um: Um..
ok: OK
nice: Nice
good: Good
great: Great
excellent: Excellent
keep_on: Keep on posting.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
gitmentbutton: Show comments from Gitment
================================================
FILE: languages/fr-FR.yml
================================================
title:
archive: Archive
category: Catégorie
tag: Tag
author: Author
menu:
home: Accueil
archives: Archives
categories: Categories
tags: Tags
about: A propos
search: recherche
sidebar:
overview: Ensemble
toc: Table Des Matières
post:
sticky: Sticky
posted: Posté le
modified: Updated at
in: In
read_more: Lire la suite
untitled: Non titré
toc_empty: This post does not have a Table of Contents
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: Total
tags: tags
footer:
powered: "Powered by %s"
theme: Thème
counter:
tag_cloud:
zero: Aucun tags
one: 1 tag au total
other: "%d tags au total"
categories:
zero: Aucun categories
one: 1 category au total
other: "%d categories au total"
archive_posts:
zero: Aucun article.
one: 1 article.
other: "%d articles au total."
state:
posts: articles
pages: pages
tags: tags
categories: categories
cheers:
um: Um..
ok: OK
nice: Jolie
good: Bien
great: Super
excellent: Excellent
keep_on: Et ca ne fait que commencer.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/id.yml
================================================
title:
archive: Arsip
category: Kategori
tag: Tag
author: Penulis
menu:
home: Beranda
archives: Arsip
categories: Kategori
tags: Tags
about: Tentang
search: Pencarian
sidebar:
overview: Ikhtisar
toc: Daftar Isi
post:
sticky: Sticky
posted: Diposting di
modified: Updated at
in: Di
read_more: Baca lebih
untitled: Tidak ada title
toc_empty: Posting ini tidak memiliki Daftar Isi
visitors: Pengunjung
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: Total
tags: tags
footer:
powered: "Powered by %s"
theme: Tema
counter:
tag_cloud:
zero: Tidak ada tags
one: 1 total tag
other: "%d total tags"
categories:
zero: Tidak ada kategori
one: 1 total categori
other: "%d total kategori"
archive_posts:
zero: Tidak ada posting.
one: 1 posting.
other: "%d total posting."
state:
posts: posting
pages: halaman
tags: tags
categories: kategori
cheers:
um: Um..
ok: OK
nice: Bagus
good: Bagus
great: Besar
excellent: Baik
keep_on: Terus Posting.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/it.yml
================================================
title:
archive: Archivio
category: Categoria
tag: Tag
schedule: Programma
author: Autore
menu:
home: Home
archives: Archivi
categories: Categorie
tags: Tags
about: Informazioni su
search: Cerca
schedule: Programma
sitemap: Sitemap
commonweal: Commonweal 404
sidebar:
overview: Panoramica
toc: Indice
post:
created: Post creato
modified: Post modificato
sticky: Sticky
posted: Scritto il
in: In
more: espandi
read_more: Leggi di più
untitled: Senza titolo
toc_empty: Questo post non ha un indice
visitors: Visitatori
wordcount: Numero di parole nell'articolo
min2read: Tempo di lettura
totalcount: Numero totale di parole
copyright:
author: Autore
link: Link
license_title: Copyright
license_content: 'Tutti gli articoli in questo sito sono sotto licenza
%s salvo disposizione contraria.'
page:
totally: Totale
tags: tags
footer:
powered: "Powered by %s"
theme: Tema
counter:
tag_cloud:
zero: Nessun tag
one: 1 tag in totale
other: "%d tags in totale."
categories:
zero: Nessuna categoria
one: 1 categoria in totale
other: "%d categorie in totale."
archive_posts:
zero: Nessun post.
one: 1 post.
other: "%d posts in totale."
state:
posts: posts
pages: pagine
tags: tags
categories: categorie
search:
placeholder: Cerca...
cheers:
um: Mh..
ok: OK
nice: Bello
good: Buono
great: Ottimo
excellent: Eccellente
keep_on: Continua così.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Dona
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/ja.yml
================================================
title:
archive: アーカイブ
category: カテゴリ
tag: タグ
author: Author
menu:
home: ホーム
archives: アーカイブ
categories: カテゴリ
tags: タグ
about: About
search: 検索
sidebar:
overview: 概要
toc: 見出し
post:
sticky: 固定
posted: 投稿日
modified: Updated at
in: In
read_more: 続きを読む
untitled: 無題
toc_empty: 見出しがありません
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: 全ページ
tags: タグ
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: タグなし
one: "全 1 タグ"
other: "全 %d タグ"
categories:
zero: カテゴリなし
one: "全 1 カテゴリ"
other: "全 %d カテゴリ"
archive_posts:
zero: ポストなし
one: "全 1 ポスト"
other: "全 %d ポスト"
state:
posts: ポスト
pages: ページ
tags: タグ
categories: カテゴリ
cheers:
um: うーん
ok: OK
nice: まあまあ
good: いいね
great: すごい
excellent: 最高
keep_on: もっと書こう!
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/ko.yml
================================================
title:
archive: 아카이브
category: 카테고리
tag: 태그
author: 작성자
menu:
home: 홈
archives: 아카이브
categories: 카테고리
tags: 태그
about: About
search: 검색
sidebar:
overview: 흝어보기
toc: 목차
post:
sticky: 고정
posted: 작성일
modified: Updated at
in: In
read_more: 더 읽어보기
untitled: 제목 없음
toc_empty: 목차 없음
visitors: 방문객
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: 모두
tags: 태그
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: 태그 없음
one: 1개의 태그
other: "총 %d개의 태그"
categories:
zero: 카테고리 없음
one: 1개의 카테고리
other: "총 %d개의 카테고리"
archive_posts:
zero: 포스트 없음
one: 1개의 포스트
other: "총 %d개의 포스트"
state:
posts: 포스트
pages: 페이지
tags: 태그
categories: 카테고리
cheers:
um: 음..
ok: OK
nice: 잘했어요
good: 좋아요
great: 훌륭해요
excellent: 완벽해요
keep_on: 포스트를 마저 작성하세요
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/nl-NL.yml
================================================
title:
archive: Archief
category: Categorie
tag: Label
schedule: Rooster
author: Auteur
menu:
home: Home
archives: Archieven
categories: Categorieën
tags: Labels
about: Over
search: Zoeken
schedule: Rooster
sitemap: Sitemap
commonweal: Gezond verstand 404
sidebar:
overview: Overzicht
toc: Inhoudsopgave
post:
created: Post aangemaakt
modified: Post aangepast
sticky: Sticky
posted: Geplaatst op
in: In
more: meer
read_more: Lees meer
untitled: Naamloos
toc_empty: Deze post heeft geen inhoudsopgave
visitors: Bezoekers
wordcount: Aantal woorden in artikel
min2read: Leestijd
totalcount: Aantal woorden in site
copyright:
author: Post auteur
link: Post link
license_title: Copyright melding
license_content: 'Alle artikelen op deze blog zijn gelicenseerd onder
%s, mits niet anders aangegeven.'
page:
totally: Totaal
tags: labels
footer:
powered: "Mede mogelijk gemaakt door %s"
theme: Thema
counter:
tag_cloud:
zero: Geen labels
one: 1 label in totaal
other: "%d labels in totaal"
categories:
zero: Geen categorieën
one: 1 categorie in totaal
other: "%d categorieën in totaal"
archive_posts:
zero: Geen posts.
one: 1 post.
other: "%d posts in totaal."
state:
posts: posts
pages: pagina's
tags: labels
categories: categorieën
search:
placeholder: Zoeken...
cheers:
um: Um..
ok: Oké
nice: Leuk
good: Goed
great: Geweldig
excellent: Uitstekend
keep_on: Blijf posten.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Doneer
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/pt-BR.yml
================================================
title:
archive: Arquivo
category: Categoria
tag: Tag
author: Autor
menu:
home: Home
archives: Arquivos
categories: Categorias
tags: Tags
about: Sobre
search: Pesquisar
sidebar:
overview: Visão geral
toc: Tabela de conteúdo
post:
sticky: Sticky
posted: Postado em
modified: Updated at
in: Em
read_more: Leia mais
untitled: Sem título
toc_empty: Este post não possui tabela de conteúdo
visitors: Visitantes
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: Totalmente
tags: tags
footer:
powered: "Feito com %s"
theme: Tema
counter:
tag_cloud:
zero: Sem tags
one: 1 tag no total de
other: "%d tags no total de"
categories:
zero: Sem categoria
one: 1 categoria no total de
other: "%d categoria no total de"
archive_posts:
zero: Sem posts.
one: 1 post.
other: "%d posts no total."
state:
posts: Posts
pages: Páginas
tags: Tags
categories: Categorias
cheers:
um: Uhmmmm...
ok: OK
nice: Bom
good: Muito Bom
great: Ótimo
excellent: Excelente
keep_on: Continuar no post.
symbol:
comma: '. '
period: ', '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/pt.yml
================================================
title:
archive: Arquivo
category: Categoria
tag: Tag
author: Author
menu:
home: Home
archives: Arquivos
categories: Categorias
tags: Tags
about: Sobre
search: Pesquisa
sidebar:
overview: Visão Geral
toc: Tabela de Conteúdo
post:
sticky: Sticky
posted: Postado em
modified: Updated at
in: Em
read_more: Ler mais
untitled: Sem título
toc_empty: Esta publicação não possui uma tabela de conteúdo
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: Totalmente
tags: tags
footer:
powered: "Desenvolvido com amor com %s"
theme: Tema
counter:
tag_cloud:
zero: Sem tags
one: 1 tag no total
other: "%d tags no total"
categories:
zero: Sem categorias
one: 1 categoria no total
other: "%d categorias no total"
archive_posts:
zero: Sem publicações.
one: 1 post.
other: "%d publicações no total."
state:
posts: publicações
pages: páginas
tags: tags
categories: categorias
cheers:
um: Um..
ok: OK
nice: Legal
good: Bom
great: Grandioso
excellent: Excelente
keep_on: Mantenha-se publicando!
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Donate
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/ru.yml
================================================
title:
archive: Архив
category: Категория
tag: Тэг
schedule: Календарь
author: Автор
menu:
home: Главная
archives: Архив
categories: Категории
tags: Тэги
about: О сайте
search: Поиск
schedule: Календарь
sitemap: Карта сайта
sidebar:
overview: Обзор
toc: Содержание
post:
created: Дата создания записи
modified: Дата обновления записи
sticky: Ссылка
posted: Размещено
in: в категории
more: далее
read_more: Читать полностью
untitled: Без имени
toc_empty: Эта запись без оглавления
visitors: Просмотров
wordcount: Кол-во слов в статье
min2read: Время чтения в минутах
totalcount: Общее кол-во слов в записях
copyright:
author: Автор записи
link: Ссылка на запись
license_title: Информация об авторских правах
license_content: 'Все записи на этом сайте защищены лицензией
%s если не указано дополнительно.'
page:
totally: Всего
tags: тэги
footer:
powered: "Powered by %s"
theme: Theme
counter:
tag_cloud:
zero: Нет тэгов.
one: 1 тэг.
two: "%d тэга всего."
three: "%d тэга всего."
four: "%d тэга всего."
other: "%d тэгов всего."
categories:
zero: Нет категорий.
one: 1 категория.
two: "%d категории всего."
three: "%d категории всего."
four: "%d категории всего."
other: "%d категорий всего."
archive_posts:
zero: Нет записей.
one: 1 запись.
two: "%d записи всего."
three: "%d записи всего."
four: "%d записи всего."
other: "%d записей всего."
state:
posts: Архив
pages: Страницы
tags: Тэги
categories: Категории
search:
placeholder: Поиск...
cheers:
um: Эм..
ok: OK
nice: Неплохо
good: Хорошо
great: Замечательно
excellent: Великолепно
keep_on: Продолжаю писать.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Донат
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
================================================
FILE: languages/vi.yml
================================================
title:
archive: Lưu Trữ
category: Phân Loại
tag: Thẻ
schedule: Danh Mục
author: Tác giả
menu:
home: Trang Chủ
archives: Lưu Trữ
categories: Đầu Mục
tags: Thẻ
about: Giới Thiệu
search: Tìm Kiếm
schedule: Danh Mục
sitemap: Bản đồ trang
commonweal: Commonweal 404
sidebar:
overview: Tổng Quan
toc: Mục Lục
post:
created: Được tạo
modified: Được thay đổi
sticky: Đính
posted: Tạo lúc
in: Trong
more: thêm
read_more: Đọc tiếp
untitled: Không có tiêu đề
toc_empty: Bài viết này không có mục lục
visitors: Người xem
wordcount: Số từ trong bài viết
min2read: Thời gian đọc
totalcount: Số từ trong trang
copyright:
author: Người viết
link: Liên kết bài viết
license_title: Chú ý bản quyền
license_content: 'Tất cả bài viết trong blog này được đăng ký bởi
%s trừ khi có thông báo bổ sung.'
page:
totally: Toàn bộ
tags: thẻ
footer:
powered: "Cung cấp bởi %s"
theme: Giao Diện
counter:
tag_cloud:
zero: Không có thẻ nào
one: có 1 thẻ tất cả
other: "có %d thẻ tất cả"
categories:
zero: Không có trong mục nào
one: có 1 mục tất cả
other: "có %d mục tất cả"
archive_posts:
zero: Không có bài viết.
one: 1 bài viết.
other: "tổng số %d bài viết."
state:
posts: bài viết
pages: trang
tags: thẻ
categories: mục
search:
placeholder: Đang tìm...
cheers:
um: Um..
ok: Đồng Ý
nice: Hay
good: Tốt
great: Tuyệt vời
excellent: Tuyệt cú mèo
keep_on: Giữ tiến độ nha.
symbol:
comma: ', '
period: '. '
colon: ':'
reward:
donate: Tài trợ
wechatpay: WeChat Pay
alipay: Alipay
bitcoin: Bitcoin
gitmentbutton: Hiển thị bình luận từ Gitment
================================================
FILE: languages/zh-Hans.yml
================================================
title:
archive: 归档
category: 分类
tag: 标签
schedule: 日程表
author: 博主
menu:
home: 首页
archives: 归档
categories: 分类
tags: 标签
about: 关于
search: 搜索
schedule: 日程表
sitemap: 站点地图
commonweal: 公益404
sidebar:
overview: 站点概览
toc: 文章目录
post:
created: 创建于
modified: 更新于
sticky: 置顶
posted: 发表于
in: 分类于
read_more: 阅读全文
untitled: 未命名
toc_empty: 此文章未包含目录
visitors: 阅读次数
wordcount: 字数统计
min2read: 阅读时长
totalcount: Site words total count
copyright:
author: 本文作者
link: 本文链接
license_title: 版权声明
license_content: '本博客所有文章除特别声明外,均采用
%s 许可协议。转载请注明出处!'
page:
totally: 共有
tags: 标签
footer:
powered: "由 %s 强力驱动"
theme: 主题
counter:
tag_cloud:
zero: 暂无标签
one: 目前共计 1 个标签
other: "目前共计 %d 个标签"
categories:
zero: 暂无分类
one: 目前共计 1 个分类
other: "目前共计 %d 个分类"
archive_posts:
zero: 暂无日志。
one: 目前共计 1 篇日志。
other: "目前共计 %d 篇日志。"
state:
posts: 日志
pages: 页面
tags: 标签
categories: 分类
search:
placeholder: 搜索...
cheers:
um: 嗯..
ok: OK
nice: 好
good: 很好
great: 非常好
excellent: 太棒了
keep_on: 继续努力。
symbol:
comma: ', '
period: '。 '
colon: ':'
reward:
donate: 打赏
wechatpay: 微信支付
alipay: 支付宝
bitcoin: 比特币
gitmentbutton: 显示 Gitment 评论
================================================
FILE: languages/zh-hk.yml
================================================
title:
archive: 歸檔
category: 分類
tag: 標籤
schedule: 日程表
author: 博主
menu:
home: 首頁
archives: 歸檔
categories: 分類
tags: 標籤
about: 關於
search: 檢索
schedule: 日程表
sitemap: 站點地圖
commonweal: 公益404
sidebar:
overview: 本站概覽
toc: 文章目錄
post:
created: 創建於
modified: 更新於
sticky: 置頂
posted: 發表於
in: 分類於
read_more: 閱讀全文
untitled: 未命名
toc_empty: 此文章未包含目錄
visitors: 閱讀次數
wordcount: 字數統計
min2read: 閱讀時長
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: 共有
tags: 標籤
footer:
powered: "由 %s 強力驅動"
theme: 主題
counter:
tag_cloud:
zero: 暫無標籤
one: 目前共有 1 個標籤
other: "目前共有 %d 個標籤"
categories:
zero: 暫無分類
one: 目前共有 1 個分類
other: "目前共有 %d 個分類"
archive_posts:
zero: 暫無文章。
one: 目前共有 1 篇文章。
other: "目前共有 %d 篇文章。"
state:
posts: 文章
pages: 頁面
tags: 標籤
categories: 分類
search:
placeholder: 搜索...
cheers:
um: 嗯..
ok: OK
nice: 好
good: 很好
great: 非常好
excellent: 激爆好
keep_on: 繼續努力。
symbol:
comma: ', '
period: '。 '
colon: ':'
reward:
donate: 打賞
wechatpay: 微信支付
alipay: 支付寶
bitcoin: 比特幣
gitmentbutton: 顯示 Gitment 評論
================================================
FILE: languages/zh-tw.yml
================================================
title:
archive: 歸檔
category: 分類
tag: 標籤
schedule: 日程表
author: 博主
menu:
home: 首頁
archives: 歸檔
categories: 分類
tags: 標籤
about: 關於
search: 檢索
schedule: 日程表
sitemap: 站點地圖
commonweal: 公益404
sidebar:
overview: 本站概覽
toc: 文章目錄
post:
created: 創建於
modified: 更新於
sticky: 置頂
posted: 發表於
in: 分類於
read_more: 閱讀全文
untitled: 未命名
toc_empty: 此文章未包含目錄
visitors: 閱讀次數
wordcount: 字數統計
min2read: 閱讀時長
totalcount: Site words total count
copyright:
author: Post author
link: Post link
license_title: Copyright Notice
license_content: 'All articles in this blog are licensed under
%s unless stating additionally.'
page:
totally: 共有
tags: 標籤
footer:
powered: "由 %s 強力驅動"
theme: 主題
counter:
tag_cloud:
zero: 暫無標籤
one: 目前共計 1 個標籤
other: "目前共計 %d 個標籤"
categories:
zero: 暫無分類
one: 目前共計 1 個分類
other: "目前共計 %d 個分類"
archive_posts:
zero: 暫無文章。
one: 目前共計 1 篇文章。
other: "目前共計 %d 篇文章。"
state:
posts: 文章
pages: 頁面
tags: 標籤
categories: 分類
search:
placeholder: 搜索...
cheers:
um: 嗯..
ok: OK
nice: 好
good: 很好
great: 非常好
excellent: 非常屌
keep_on: 繼續努力。
symbol:
comma: ', '
period: '。 '
colon: ':'
reward:
donate: 打賞
wechatpay: 微信支付
alipay: 支付寶
bitcoin: 比特幣
gitmentbutton: 顯示 Gitment 評論
================================================
FILE: layout/_custom/header.swig
================================================
================================================
FILE: layout/_custom/sidebar.swig
================================================
================================================
FILE: layout/_layout.swig
================================================
{% set html_class = 'theme-next ' + theme.scheme %}
{% if theme.motion.enable %}
{% set html_class = html_class + ' use-motion' %}
{% endif %}
{% include '_partials/head.swig' %}
{% block title %}{% endblock %}
{% include '_third-party/analytics/index.swig' %}
{% set container_class = "container " %}
{% if theme.sidebar.position %}
{% set container_class = container_class + 'sidebar-position-' + theme.sidebar.position %}
{% endif %}
{%- include '_partials/header.swig' %}
{% block content %}{% endblock %}
{% include '_third-party/duoshuo-hot-articles.swig' %}
{% include '_partials/comments.swig' %}
{% if theme.sidebar.display !== 'remove' %}
{% block sidebar %}{% endblock %}
{% endif %}
{% if not theme.sidebar.b2t %}
{% if theme.sidebar.scrollpercent %}
0%
{% endif %}
{% endif %}
{% if theme.needmoreshare2.enable and theme.needmoreshare2.float.enable %}
{% endif %}
{% include '_scripts/vendors.swig' %}
{% include '_scripts/commons.swig' %}
{% set scheme_script = '_scripts/schemes/' + theme.scheme | lower + '.swig' %}
{% include scheme_script %}
{% block script_extra %}{% endblock %}
{% include '_scripts/boostrap.swig' %}
{% include '_third-party/comments/index.swig' %}
{% include '_third-party/search/index.swig' %}
{% include '_third-party/analytics/lean-analytics.swig' %}
{% include '_third-party/analytics/firestore.swig' %}
{% include '_third-party/seo/baidu-push.swig' %}
{% include '_third-party/needsharebutton.swig' %}
{% include '_third-party/rating.swig' %}
{% include '_third-party/mathjax.swig' %}
{% include '_third-party/scroll-cookie.swig' %}
{% include '_third-party/exturl.swig' %}
================================================
FILE: layout/_macro/post-collapse.swig
================================================
{% macro render(post) %}
<{% if theme.seo %}h3{% else %}h2{% endif %} class="post-title">
{% if post.link %}{# Link posts #}
{{ post.title or post.link }}
{% else %}
{% if post.type === 'picture' %}
{{ post.content }}
{% else %}
{{ post.title | default(__('post.untitled')) }}
{% endif %}
{% endif %}
{% if theme.seo %}h3{% else %}h2{% endif %}>
{% endmacro %}
================================================
FILE: layout/_macro/post-copyright.swig
================================================
-
{{ __('post.copyright.link') + __('symbol.colon') }}
{{ post.url | default(post.permalink) }}
-
{{ __('post.copyright.license_title') + __('symbol.colon') }}
{{ __('post.copyright.license_content', theme.post_copyright.license_url, theme.post_copyright.license) }}
================================================
FILE: layout/_macro/post.swig
================================================
{% macro render(post, is_index, post_extra_class) %}
{% set headlessPost = Array.prototype.indexOf.call(['quote', 'picture'], post.type) > -1 %}
{% set post_class = 'post post-type-' + post.type | default('normal') %}
{% if post_extra_class > 0 %}
{% set post_class = post_class + ' ' + post_extra_class | default('') %}
{% endif %}
{% if post.sticky > 0 %}
{% set post_class = post_class + ' ' + 'post-sticky' %}
{% endif %}
{##################}
{### POST BLOCK ###}
{##################}
{% if not headlessPost %}
{# Not to show title for quote posts that do not have a title #}
{% if not (is_index and post.type === 'quote' and not post.title) %}
<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title{% if post.direction && post.direction.toLowerCase() === 'rtl' %} rtl{% endif %}" itemprop="name headline">{#
#}{# Link posts #}{#
#}{% if post.link %}
{% if post.sticky > 0 %}
{{ post.sticky }}
{% endif %}
{{ post.title or post.link }}
{% else %}{#
#}{% if is_index %}
{% if post.sticky > 0 %}
{% endif %}
{#
#}{{ post.title | default(__('post.untitled'))}}{#
#}{#
#}{% else %}{{ post.title }}{% endif %}{#
#}{% endif %}{#
#}{% if theme.seo %}h2{% else %}h1{% endif %}>
{% endif %}
{% endif %}
{#################}
{### POST BODY ###}
{#################}
{# Gallery support #}
{% if post.photos and post.photos.length %}
{% set COLUMN_NUMBER = 3 %}
{% for photo in post.photos %}
{% if loop.index0 % COLUMN_NUMBER === 0 %}{% endif %}
{% endfor %}
{# Append end tag for `post-gallery-row` when (photos size mod COLUMN_NUMBER) is less than COLUMN_NUMBER #}
{% if post.photos.length % COLUMN_NUMBER > 0 %}{% endif %}
{% endif %}
{% if is_index %}
{% if post.description and theme.excerpt_description %}
{{ post.description }}
{% elif post.excerpt %}
{{ post.excerpt }}
{% elif theme.auto_excerpt.enable %}
{% set content = post.content | striptags %}
{{ content.substring(0, theme.auto_excerpt.length) }}
{% if content.length > theme.auto_excerpt.length %}...{% endif %}
{% else %}
{% if post.type === 'picture' %}
{{ post.content }}
{% else %}
{{ post.content }}
{% endif %}
{% endif %}
{% else %}
{{ post.content }}
{% endif %}
{#####################}
{### END POST BODY ###}
{#####################}
{% if theme.wechat_subscriber.enabled and not is_index %}
{% include 'wechat-subscriber.swig' %}
{% endif %}
{% if (theme.alipay or theme.wechatpay or theme.bitcoin) and not is_index %}
{% include 'reward.swig' %}
{% endif %}
{% if theme.post_copyright.enable and not is_index %}
{% include 'post-copyright.swig' with { post: post } %}
{% endif %}
{######################}
{### END POST BLOCK ###}
{######################}
{% endmacro %}
================================================
FILE: layout/_macro/reward.swig
================================================
{{ theme.reward_comment }}
================================================
FILE: layout/_macro/sidebar.swig
================================================
{% macro render(is_post) %}
{% endmacro %}
================================================
FILE: layout/_macro/wechat-subscriber.swig
================================================
{{ theme.wechat_subscriber.description }}
================================================
FILE: layout/_partials/comments.swig
================================================
{% if page.comments %}
{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %}
{% elseif theme.facebook_sdk.enable and theme.facebook_comments_plugin.enable %}
{% elseif theme.vkontakte_api.enable and theme.vkontakte_api.comments %}
{% elseif theme.disqus.enable %}
{% elseif theme.hypercomments_id %}
{% elseif theme.youyan_uid %}
{% elseif theme.livere_uid %}
{% elseif theme.changyan.appid and theme.changyan.appkey %}
{% elseif theme.gitment.enable %}
{% if theme.gitment.lazy %}
{% else %}
{% endif %}
{% elseif theme.valine.appid and theme.valine.appkey %}
{% endif %}
{% endif %}
================================================
FILE: layout/_partials/footer.swig
================================================
{#
#}{% set current = date(Date.now(), "YYYY") %}{#
#}© {% if theme.footer.since and theme.footer.since != current %}{{ theme.footer.since }} — {% endif %}{#
#}{{ current }}
{% if theme.post_wordcount.totalcount %}
{% if theme.post_wordcount.item_text %}
{% endif %}
{#
#}{{ totalcount(site, '0,0.0a') }}{#
#}
{% endif %}
{% if theme.footer.powered %}
{#
#}{{ __('footer.powered', 'Hexo') }}{#
#}
{% endif %}
{% if theme.footer.powered and theme.footer.theme.enable %}
{% endif %}
{% if theme.footer.theme.enable %}
{#
#}{{ __('footer.theme') }} — {#
#}{#
#}NexT.{{ theme.scheme }}{#
#}{% if theme.footer.theme.version %} v{{ theme.version }}{% endif %}{#
#}
{% endif %}
{% if theme.footer.custom_text %}
{% endif %}
================================================
FILE: layout/_partials/head/custom-head.swig
================================================
{#
Custom head.
#}
================================================
FILE: layout/_partials/head/external-fonts.swig
================================================
{% if theme.font.enable %}
{% set font_config = theme.font %}
{% set font_families = '' %}
{% set font_styles = ':300,300italic,400,400italic,700,700italic' %}
{% set font_found = false %}
{% if font_config.global.family and font_config.global.external %}
{% set font_families += font_config.global.family + font_styles %}
{% set font_found = true %}
{% endif %}
{% if font_config.headings.family and font_config.headings.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}
{% set font_families += font_config.headings.family + font_styles %}
{% endif %}
{% if font_config.posts.family and font_config.posts.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}
{% set font_families += font_config.posts.family + font_styles %}
{% endif %}
{% if font_config.logo.family and font_config.logo.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}
{% set font_families += font_config.logo.family + font_styles %}
{% endif %}
{% if font_config.codes.family and font_config.codes.external %}
{% if font_found %}
{% set font_families += '|' %}
{% endif %}
{% set font_families += font_config.codes.family + font_styles %}
{% endif %}
{% if font_families !== '' %}
{% set font_families += '&subset=latin,latin-ext' %}
{% set font_host = font_config.host | default('//fonts.googleapis.com') %}
{% endif %}
{% endif %}
================================================
FILE: layout/_partials/head.swig
================================================
{% if theme.pace %}
{% set pace_css_uri = url_for(theme.vendors._internal + '/pace/'+ theme.pace_theme +'.min.css?v=1.0.2') %}
{% set pace_js_uri = url_for(theme.vendors._internal + '/pace/pace.min.js?v=1.0.2') %}
{% if theme.vendors.pace %}
{% set pace_js_uri = theme.vendors.pace %}
{% endif %}
{% if theme.vendors.pace_css %}
{% set pace_css_uri = theme.vendors.pace_css %}
{% endif %}
{% endif %}
{% if theme.han %}
{% set Han_uri = url_for(theme.vendors._internal + '/Han/dist/han.min.css?v=3.3') %}
{% if theme.vendors.Han %}
{% set Han_uri = theme.vendors.Han %}
{% endif %}
{% endif %}
{# #238, Disable Baidu tranformation #}
{% if theme.google_site_verification %}
{% endif %}
{% if theme.bing_site_verification %}
{% endif %}
{% if theme.yandex_site_verification %}
{% endif %}
{% if theme.baidu_site_verification %}
{% endif %}
{% if theme.qihu_site_verification %}
{% endif %}
{% if theme.fancybox %}
{% set fancybox_css_uri = url_for(theme.vendors._internal + '/fancybox/source/jquery.fancybox.css?v=2.1.5') %}
{% if theme.vendors.fancybox_css %}
{% set fancybox_css_uri = theme.vendors.fancybox_css %}
{% endif %}
{% endif %}
{% include "./head/external-fonts.swig" %}
{% set font_awesome_uri = url_for(theme.vendors._internal + '/font-awesome/css/font-awesome.min.css?v=4.6.2') %}
{% if theme.vendors.fontawesome %}
{% set font_awesome_uri = theme.vendors.fontawesome %}
{% endif %}
{% if theme.favicon.apple_touch_icon %}
{% endif %}
{% if theme.favicon.medium %}
{% endif %}
{% if theme.favicon.small %}
{% endif %}
{% if theme.favicon.safari_pinned_tab %}
{% endif %}
{% if theme.favicon.android_manifest %}
{% endif %}
{% if theme.favicon.ms_browserconfig %}
{% endif %}
{% if page.keywords %}
{% elif page.tags and page.tags.length %}
{% elif theme.keywords %}
{% endif %}
{% if theme.rss === '' and config.feed and config.feed.path %}
{% set theme.rss = config.feed.path %}
{% endif %}
{% if theme.rss %}
{% endif %}
{% if theme.facebook_sdk.enable and theme.facebook_sdk.webmaster %}
{% endif %}
{{
open_graph({
twitter_id: theme.twitter,
google_plus: theme.google_plus,
fb_admins: theme.fb_admins,
fb_app_id: theme.fb_app_id
})
}}
{# Export some HEXO Configurations to Front-End #}
{# Canonical, good for google search engine (SEO) : https://support.google.com/webmasters/answer/139066 #}
{% if theme.canonical %}
{% endif %}
{% include 'head/custom-head.swig' %}
================================================
FILE: layout/_partials/header.swig
================================================
{% include '../_custom/header.swig' %}
================================================
FILE: layout/_partials/page-header.swig
================================================
<{% if theme.seo %}h2{% else %}h1{% endif %} class="post-title" itemprop="name headline">{{ page.title }}{% if theme.seo %}h2{% else %}h1{% endif %}>
{% if page.description %}
{% endif %}
================================================
FILE: layout/_partials/pagination.swig
================================================
{% if page.prev or page.next %}
{% endif %}
================================================
FILE: layout/_partials/search/localsearch.swig
================================================
================================================
FILE: layout/_partials/search/swiftype.swig
================================================
================================================
FILE: layout/_partials/search/tinysou.swig
================================================
================================================
FILE: layout/_partials/search.swig
================================================
{% if theme.algolia_search.enable %}
{% include '../_third-party/search/algolia-search/dom.swig' %}
{% elseif theme.swiftype_key %}
{% include 'search/swiftype.swig' %}
{% elseif theme.tinysou_Key %}
{% include 'search/tinysou.swig' %}
{% elseif theme.local_search.enable %}
{% include 'search/localsearch.swig' %}
{% endif %}
================================================
FILE: layout/_partials/share/add-this.swig
================================================
================================================
FILE: layout/_partials/share/baidushare.swig
================================================
{% if theme.baidushare.type === "button" %}
{% elseif theme.baidushare.type === "slide" %}
{% endif %}
================================================
FILE: layout/_partials/share/duoshuo_share.swig
================================================
================================================
FILE: layout/_partials/share/jiathis.swig
================================================
================================================
FILE: layout/_scripts/boostrap.swig
================================================
{%
set boot_scripts = [
'src/bootstrap.js'
]
%}
{% for bs in boot_scripts %}
{% endfor %}
================================================
FILE: layout/_scripts/commons.swig
================================================
{%
set js_commons = [
'src/utils.js',
'src/motion.js'
]
%}
{% for common in js_commons %}
{% endfor %}
================================================
FILE: layout/_scripts/pages/post-details.swig
================================================
================================================
FILE: layout/_scripts/schemes/gemini.swig
================================================
{%
set scripts = [
'src/affix.js',
'src/schemes/pisces.js'
]
%}
{% for script in scripts %}
{% endfor %}
================================================
FILE: layout/_scripts/schemes/mist.swig
================================================
================================================
FILE: layout/_scripts/schemes/muse.swig
================================================
================================================
FILE: layout/_scripts/schemes/pisces.swig
================================================
{%
set scripts = [
'src/affix.js',
'src/schemes/pisces.js'
]
%}
{% for script in scripts %}
{% endfor %}
================================================
FILE: layout/_scripts/vendors.swig
================================================
{# Reset `window.Promise` when it was not a function. #}
{# IE refers the element whose id is `Promise` as `window.Promise`, this causes Velocity throwing an exception #}
{% set js_vendors = {} %}
{% set js_vendors.jquery = 'jquery/index.js?v=2.1.3' %}
{% set js_vendors.fastclick = 'fastclick/lib/fastclick.min.js?v=1.0.6' %}
{% set js_vendors.lazyload = 'jquery_lazyload/jquery.lazyload.js?v=1.9.7' %}
{% set js_vendors.velocity = 'velocity/velocity.min.js?v=1.2.1' %}
{% set js_vendors.velocity_ui = 'velocity/velocity.ui.min.js?v=1.2.1' %}
{% if theme.fancybox %}
{% set js_vendors.fancybox = 'fancybox/source/jquery.fancybox.pack.js?v=2.1.5' %}
{% endif %}
{% if theme.canvas_nest %}
{% set js_vendors.canvas_nest = 'canvas-nest/canvas-nest.min.js' %}
{% endif %}
{% if theme.three_waves %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.three_waves = 'three/three-waves.min.js' %}
{% endif %}
{% if theme.canvas_lines %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.canvas_lines = 'three/canvas_lines.min.js' %}
{% endif %}
{% if theme.canvas_sphere %}
{% set js_vendors.three = 'three/three.min.js' %}
{% set js_vendors.canvas_sphere = 'three/canvas_sphere.min.js' %}
{% endif %}
{% if theme.canvas_ribbon.enable and theme.scheme === 'Pisces'%}
{% set js_vendors.canvas_ribbon = 'canvas-ribbon/canvas-ribbon.js' %}
{% endif %}
{% for name, internal in js_vendors %}
{% set internal_script = url_for(theme.vendors._internal) + '/' + internal %}
{% if name == 'canvas_ribbon' %}
{% else %}
{% endif %}
{% endfor %}
================================================
FILE: layout/_third-party/analytics/analytics-with-widget.swig
================================================
{% include 'busuanzi-counter.swig' %}
{% include 'tencent-mta.swig' %}
{% include 'tencent-analytics.swig' %}
{% include 'cnzz-analytics.swig' %}
================================================
FILE: layout/_third-party/analytics/application-insights.swig
================================================
{% if theme.application_insights %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/baidu-analytics.swig
================================================
{% if theme.baidu_analytics %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/busuanzi-counter.swig
================================================
{% if theme.busuanzi_count.enable %}
{% if theme.busuanzi_count.site_uv %}
{{ theme.busuanzi_count.site_uv_header }}
{{ theme.busuanzi_count.site_uv_footer }}
{% endif %}
{% if theme.busuanzi_count.site_pv %}
{{ theme.busuanzi_count.site_pv_header }}
{{ theme.busuanzi_count.site_pv_footer }}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/cnzz-analytics.swig
================================================
{% if theme.cnzz_siteid %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/facebook-sdk.swig
================================================
{% if theme.facebook_sdk.enable %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/firestore.swig
================================================
{% if theme.firestore.enable %}
{% if theme.firestore.bluebird %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/google-analytics.swig
================================================
{% if theme.google_analytics %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/index.swig
================================================
{% include 'facebook-sdk.swig' %}
{% include 'vkontakte-api.swig' %}
{% include 'google-analytics.swig' %}
{% include 'baidu-analytics.swig' %}
{% include 'application-insights.swig' %}
================================================
FILE: layout/_third-party/analytics/lean-analytics.swig
================================================
{% if theme.leancloud_visitors.enable %}
{# custom analytics part create by xiamo #}
{% endif %}
================================================
FILE: layout/_third-party/analytics/tencent-analytics.swig
================================================
{% if theme.tencent_analytics %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/tencent-mta.swig
================================================
{% if theme.tencent_mta %}
{% endif %}
================================================
FILE: layout/_third-party/analytics/vkontakte-api.swig
================================================
{% if theme.vkontakte_api.enable %}
{% endif %}
================================================
FILE: layout/_third-party/comments/changyan.swig
================================================
{% if theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %}
{% if is_home() %}
{% else %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/comments/disqus.swig
================================================
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname %}
{% if theme.disqus.enable %}
{% if theme.disqus.count %}
{% endif %}
{% if page.comments %}
{% endif %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/comments/duoshuo.swig
================================================
{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %}
{% if theme.duoshuo %}
{% set duoshuo_shortname = theme.duoshuo.shortname %}
{% else %}
{% set duoshuo_shortname = theme.duoshuo_shortname %}
{% endif %}
{% if theme.duoshuo_info.ua_enable %}
{% if theme.duoshuo_info.admin_enable %}
{% set ua_parser_internal = url_for(theme.vendors._internal) + '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' %}
{% endif %}
{% set ua_parser_internal = url_for(theme.vendors._internal) + '/ua-parser-js/dist/ua-parser.min.js?v=0.7.9' %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/comments/gitment.swig
================================================
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname %}
{% if theme.gitment.enable and theme.gitment.client_id %}
{% if theme.gitment.mint %}
{% set CommentsClass = "Gitmint" %}
{% else %}
{% set CommentsClass = "Gitment" %}
{% endif %}
{% if theme.gitment.cleanly %}
{% endif %}
{% if page.comments %}
{% endif %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/comments/hypercomments.swig
================================================
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not theme.disqus_shortname %}
{% if theme.hypercomments_id %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/comments/index.swig
================================================
{% include 'duoshuo.swig' %}
{% include 'disqus.swig' %}
{% include 'hypercomments.swig' %}
{% include 'youyan.swig' %}
{% include 'livere.swig' %}
{% include 'changyan.swig' %}
{% include 'gitment.swig' %}
{% include 'valine.swig' %}
================================================
FILE: layout/_third-party/comments/livere.swig
================================================
{% if not (theme.duoshuo and theme.duoshuo.shortname) and not theme.duoshuo_shortname and not (theme.disqus.enable and theme.disqus.shortname) and not theme.hypercomments_id %}
{% if page.comments and theme.livere_uid %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/comments/valine.swig
================================================
{% if theme.valine.enable and theme.valine.appid and theme.valine.appkey %}
{% endif %}
================================================
FILE: layout/_third-party/comments/youyan.swig
================================================
{% if not (theme.duoshuo and theme.duoshuo.shortname)
and not theme.duoshuo_shortname
and not theme.disqus_shortname
and not theme.hypercomments_id %}
{% if theme.youyan_uid %}
{% set uid = theme.youyan_uid %}
{% if page.comments %}
{% endif %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/duoshuo-hot-articles.swig
================================================
{# 多说热评文章 #}
{% if (theme.duoshuo_hotartical and page.title) %}
热评文章
{% endif %}
================================================
FILE: layout/_third-party/exturl.swig
================================================
{% if theme.exturl %}
{% endif %}
================================================
FILE: layout/_third-party/mathjax.swig
================================================
{% if theme.mathjax.enable %}
{% if not theme.mathjax.per_page or (page.total or page.mathjax) %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/needsharebutton.swig
================================================
{% if theme.needmoreshare2.enable %}
{% set needmoreshare2_css = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.css') %}
{% if theme.vendors.needmoreshare2 %}
{% set needmoreshare2_css = theme.vendors.needmoreshare2_css %}
{% endif %}
{% set needmoreshare2_js = url_for(theme.vendors._internal + '/needsharebutton/needsharebutton.js') %}
{% if theme.vendors.needmoreshare2_js %}
{% set needmoreshare2_js = theme.vendors.needmoreshare2_js %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/rating.swig
================================================
{% if theme.rating.enable and (not is_home() and is_post()) %}
{% endif %}
================================================
FILE: layout/_third-party/schedule.swig
================================================
{% if theme.calendar.enable %}
{% if page.type == 'schedule' %}
{% endif %}
{% endif %}
================================================
FILE: layout/_third-party/scroll-cookie.swig
================================================
{% if theme.save_scroll %}
{% endif %}
================================================
FILE: layout/_third-party/search/algolia-search/assets.swig
================================================
{% if theme.algolia_search.enable %}
{# S: Include Algolia instantsearch.js library #}
{% set algolia_instant_css = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.css') %}
{% if theme.vendors.algolia_instant_css %}
{% set algolia_instant_css = theme.vendors.algolia_instant_css %}
{% endif %}
{% set algolia_instant_js = url_for(theme.vendors._internal + '/algolia-instant-search/instantsearch.min.js') %}
{% if theme.vendors.algolia_instant_js %}
{% set algolia_instant_js = theme.vendors.algolia_instant_js %}
{% endif %}
{# E: Include Algolia instantsearch.js library #}
{% endif %}
================================================
FILE: layout/_third-party/search/algolia-search/dom.swig
================================================
{% if theme.algolia_search.enable %}
{% endif %}
================================================
FILE: layout/_third-party/search/index.swig
================================================
{% include 'tinysou.swig' %}
{% include 'localsearch.swig' %}
{% include 'algolia-search/assets.swig' %}
================================================
FILE: layout/_third-party/search/localsearch.swig
================================================
{% if theme.local_search.enable %}
{% endif %}
================================================
FILE: layout/_third-party/search/tinysou.swig
================================================
{% if config.tinysou_Key %}
{% endif %}
================================================
FILE: layout/_third-party/seo/baidu-push.swig
================================================
{% if theme.baidu_push %}
{% endif %}
================================================
FILE: layout/archive.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/post-collapse.swig' as post_template %}
{% import '_macro/sidebar.swig' as sidebar_template %}
{% block title %}{{ __('title.archive') }} | {{ config.title }}{% endblock %}
{% block page_class %}page-archive{% endblock %}
{% block content %}
{#####################}
{### ARCHIVE BLOCK ###}
{#####################}
{% set cheers %}
{% set posts_length = site.posts.length %}
{% if posts_length > 210 %} {% set cheers = 'excellent' %}
{% elif posts_length > 130 %} {% set cheers = 'great' %}
{% elif posts_length > 80 %} {% set cheers = 'good' %}
{% elif posts_length > 50 %} {% set cheers = 'nice' %}
{% elif posts_length > 30 %} {% set cheers = 'ok' %}
{% else %}
{% set cheers = 'um' %}
{% endif %}
{{ __('cheers.' + cheers) }}! {{ _p("counter.archive_posts", site.posts.length) }} {{ __('keep_on') }}
{% for post in page.posts %}
{# Show year #}
{% set year %}
{% set post.year = date(post.date, 'YYYY') %}
{% if post.year !== year %}
{% set year = post.year %}
<{% if theme.seo %}h2{% else %}h1{% endif %} class="archive-year" id="archive-year-{{ year }}">{{ year }}{% if theme.seo %}h2{% else %}h1{% endif %}>
{% endif %}
{# endshow #}
{{ post_template.render(post) }}
{% endfor %}
{#########################}
{### END ARCHIVE BLOCK ###}
{#########################}
{% include '_partials/pagination.swig' %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: layout/category.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/post-collapse.swig' as post_template %}
{% import '_macro/sidebar.swig' as sidebar_template %}
{% block title %}{{ __('title.category') }}: {{ page.category }} | {{ config.title }}{% endblock %}
{% block content %}
{######################}
{### CATEGORY BLOCK ###}
{######################}
<{% if theme.seo %}h2{% else %}h1{% endif %}>{#
#}{{ page.category }}{#
#}{{ __('title.category') }}
{% if theme.seo %}h2{% else %}h1{% endif %}>
{% for post in page.posts %}
{{ post_template.render(post) }}
{% endfor %}
{##########################}
{### END CATEGORY BLOCK ###}
{##########################}
{% include '_partials/pagination.swig' %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: layout/index.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/post.swig' as post_template %}
{% import '_macro/sidebar.swig' as sidebar_template %}
{% block title %}{{ config.title }}{% if theme.index_with_subtitle and config.subtitle %} - {{config.subtitle }}{% endif %}{% endblock %}
{% block page_class %}
{% if is_home() %}page-home{% endif -%}
{% endblock %}
{% block content %}
{% include '_partials/pagination.swig' %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: layout/page.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/sidebar.swig' as sidebar_template %}
{% block title %}{#
#}{% set page_title_suffix = ' | ' + config.title %}{#
#}{% if page.type === "categories" and not page.title %}{#
#}{{ __('title.category') + page_title_suffix }}{#
#}{% elif page.type === "tags" and not page.title %}{#
#}{{ __('title.tag') + page_title_suffix }}{#
#}{% else %}{#
#}{{ page.title + page_title_suffix }}{#
#}{% endif %}{#
#}{% endblock %}
{% block page_class %}page-post-detail{% endblock %}
{% block content %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
{% block script_extra %}
{% include '_scripts/pages/post-details.swig' %}
{% endblock %}
================================================
FILE: layout/post.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/post.swig' as post_template %}
{% import '_macro/sidebar.swig' as sidebar_template %}
{% block title %}{{ page.title }} | {{ config.title }}{% endblock %}
{% block page_class %}page-post-detail{% endblock %}
{% block content %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(true) }}
{% endblock %}
{% block script_extra %}
{% include '_scripts/pages/post-details.swig' %}
{% endblock %}
================================================
FILE: layout/schedule.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/sidebar.swig' as sidebar_template %}
{% block title %}{{ __('title.schedule') }} | {{ config.title }}{% endblock %}
{% block page_class %}page-post-detail page-calendar{% endblock %}
{% block content %}
{######################}
{### SCHEDULE BLOCK ###}
{######################}
{##########################}
{### END SCHEDULE BLOCK ###}
{##########################}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: layout/tag.swig
================================================
{% extends '_layout.swig' %}
{% import '_macro/post-collapse.swig' as post_template %}
{% import '_macro/sidebar.swig' as sidebar_template %}
{% block title %}{{ __('title.tag') }}: {{ page.tag }} | {{ config.title }}{% endblock %}
{% block content %}
{#################}
{### TAG BLOCK ###}
{#################}
<{% if theme.seo %}h2{% else %}h1{% endif %}>{#
#}{{ page.tag }}{#
#}{{ __('title.tag') }}
{% if theme.seo %}h2{% else %}h1{% endif %}>
{% for post in page.posts %}
{{ post_template.render(post) }}
{% endfor %}
{#####################}
{### END TAG BLOCK ###}
{#####################}
{% include '_partials/pagination.swig' %}
{% endblock %}
{% block sidebar %}
{{ sidebar_template.render(false) }}
{% endblock %}
================================================
FILE: package.json
================================================
{
"name": "hexo-theme-next",
"version": "5.1.4",
"description": "Elegant theme for Hexo",
"main": "index.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "gulp"
},
"repository": {
"type": "git",
"url": "git+https://github.com/iissnan/hexo-theme-next.git"
},
"keywords": [
"NexT",
"Hexo"
],
"author": "iissnan ",
"maintainers": [
"Ivan Nginx (https://almostover.ru)"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/iissnan/hexo-theme-next/issues"
},
"homepage": "https://theme-next.iissnan.com",
"devDependencies": {
"coffee-script": "^1.10.0",
"gulp": "^3.9.0",
"gulp-jshint": "^1.12.0",
"gulp-shell": "^0.6.1",
"js-yaml": "^3.8.1",
"jshint-stylish": "^2.1.0",
"stylint": "^1.5.9"
}
}
================================================
FILE: scripts/merge-configs.js
================================================
/* global hexo */
var merge = require('./merge');
/**
* Merge configs in _data/next.yml into hexo.theme.config.
* Note: configs in _data/next.yml will override configs in hexo.theme.config.
*/
hexo.on('generateBefore', function () {
if (hexo.locals.get) {
var data = hexo.locals.get('data');
if ( data && data.next ) {
if ( data.next.override ) {
hexo.theme.config = data.next;
} else {
merge(hexo.theme.config, data.next);
}
}
}
});
hexo.on('generateAfter', function () {
hexo.log.warn("===============================================================");
hexo.log.warn("========================= ATTENTION! ==========================");
hexo.log.warn("===============================================================");
hexo.log.warn(" NexT repository is moving here: https://github.com/theme-next ");
hexo.log.warn("===============================================================");
hexo.log.warn(" It's rebase to v6.0.0 and future maintenance will resume there");
hexo.log.warn("===============================================================");
});
================================================
FILE: scripts/merge.js
================================================
/**
* lodash (Custom Build)
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors
* Released under MIT license
* Based on Underscore.js 1.8.3
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] =
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
cloneableTags[boolTag] = cloneableTags[dateTag] =
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
cloneableTags[int32Tag] = cloneableTags[mapTag] =
cloneableTags[numberTag] = cloneableTags[objectTag] =
cloneableTags[regexpTag] = cloneableTags[setTag] =
cloneableTags[stringTag] = cloneableTags[symbolTag] =
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[weakMapTag] = false;
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function () {
try {
return freeProcess && freeProcess.binding('util');
} catch (e) {
}
}());
/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
* Adds the key-value `pair` to `map`.
*
* @private
* @param {Object} map The map to modify.
* @param {Array} pair The key-value pair to add.
* @returns {Object} Returns `map`.
*/
function addMapEntry(map, pair) {
// Don't return `map.set` because it's not chainable in IE 11.
map.set(pair[0], pair[1]);
return map;
}
/**
* Adds `value` to `set`.
*
* @private
* @param {Object} set The set to modify.
* @param {*} value The value to add.
* @returns {Object} Returns `set`.
*/
function addSetEntry(set, value) {
// Don't return `set.add` because it's not chainable in IE 11.
set.add(value);
return set;
}
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array ? array.length : 0;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
/**
* A specialized version of `_.reduce` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array ? array.length : 0;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function (value) {
return func(value);
};
}
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
/**
* Checks if `value` is a host object in IE < 9.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
*/
function isHostObject(value) {
// Many host objects are `Object` objects that can coerce to strings
// despite having improperly defined `toString` methods.
var result = false;
if (value != null && typeof value.toString != 'function') {
try {
result = !!(value + '');
} catch (e) {
}
}
return result;
}
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function (value, key) {
result[++index] = [key, value];
});
return result;
}
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function (arg) {
return func(transform(arg));
};
}
/**
* Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function (value) {
result[++index] = value;
});
return result;
}
/** Used for built-in method references. */
var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function () {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/** Built-in value references. */
var Buffer = moduleExports ? root.Buffer : undefined,
Symbol = root.Symbol,
Uint8Array = root.Uint8Array,
getPrototype = overArg(Object.getPrototypeOf, Object),
objectCreate = Object.create,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
splice = arrayProto.splice;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols,
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
nativeKeys = overArg(Object.keys, Object),
nativeMax = Math.max;
/* Built-in method references that are verified to be native. */
var DataView = getNative(root, 'DataView'),
Map = getNative(root, 'Map'),
Promise = getNative(root, 'Promise'),
Set = getNative(root, 'Set'),
WeakMap = getNative(root, 'WeakMap'),
nativeCreate = getNative(Object, 'create');
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
}
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
}
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
return getMapData(this, key)['delete'](key);
}
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
getMapData(this, key).set(key, value);
return this;
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
this.__data__ = new ListCache(entries);
}
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new ListCache;
}
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
return this.__data__['delete'](key);
}
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var cache = this.__data__;
if (cache instanceof ListCache) {
var pairs = cache.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
return this;
}
cache = this.__data__ = new MapCache(pairs);
}
cache.set(key, value);
return this;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
/**
* Creates an array of the enumerable property names of the array-like `value`.
*
* @private
* @param {*} value The value to query.
* @param {boolean} inherited Specify returning inherited property names.
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
// Safari 9 makes `arguments.length` enumerable in strict mode.
var result = (isArray(value) || isArguments(value))
? baseTimes(value.length, String)
: [];
var length = result.length,
skipIndexes = !!length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
/**
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq(object[key], value)) ||
(typeof key == 'number' && value === undefined && !(key in object))) {
object[key] = value;
}
}
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
object[key] = value;
}
}
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
/**
* The base implementation of `_.assign` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
*
* @private
* @param {*} value The value to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @param {boolean} [isFull] Specify a clone including symbols.
* @param {Function} [customizer] The function to customize cloning.
* @param {string} [key] The key of `value`.
* @param {Object} [object] The parent object of `value`.
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
* @returns {*} Returns the cloned value.
*/
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
var result;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result);
}
} else {
var tag = getTag(value),
isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
if (isHostObject(value)) {
return object ? value : {};
}
result = initCloneObject(isFunc ? {} : value);
if (!isDeep) {
return copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, baseClone, isDeep);
}
}
// Check for circular references and return its corresponding clone.
stack || (stack = new Stack);
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
if (!isArr) {
var props = isFull ? getAllKeys(value) : keys(value);
}
arrayEach(props || value, function (subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
// Recursively populate clone (susceptible to call stack limits).
assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
});
return result;
}
/**
* The base implementation of `_.create` without support for assigning
* properties to the created object.
*
* @private
* @param {Object} prototype The object to inherit from.
* @returns {Object} Returns the new object.
*/
function baseCreate(proto) {
return isObject(proto) ? objectCreate(proto) : {};
}
/**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Function} keysFunc The function to get the keys of `object`.
* @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
/**
* The base implementation of `getTag`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
return objectToString.call(value);
}
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}
/**
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
/**
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
/**
* The base implementation of `_.merge` without support for multiple sources.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {number} srcIndex The index of `source`.
* @param {Function} [customizer] The function to customize merged values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
if (!(isArray(source) || isTypedArray(source))) {
var props = baseKeysIn(source);
}
arrayEach(props || source, function (srcValue, key) {
if (props) {
key = srcValue;
srcValue = source[key];
}
if (isObject(srcValue)) {
stack || (stack = new Stack);
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
}
else {
var newValue = customizer
? customizer(object[key], srcValue, (key + ''), object, source, stack)
: undefined;
if (newValue === undefined) {
newValue = srcValue;
}
assignMergeValue(object, key, newValue);
}
});
}
/**
* A specialized version of `baseMerge` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {string} key The key of the value to merge.
* @param {number} srcIndex The index of `source`.
* @param {Function} mergeFunc The function to merge values.
* @param {Function} [customizer] The function to customize assigned values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = object[key],
srcValue = source[key],
stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer
? customizer(objValue, srcValue, (key + ''), object, source, stack)
: undefined;
var isCommon = newValue === undefined;
if (isCommon) {
newValue = srcValue;
if (isArray(srcValue) || isTypedArray(srcValue)) {
if (isArray(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
}
else {
isCommon = false;
newValue = baseClone(srcValue, true);
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
isCommon = false;
newValue = baseClone(srcValue, true);
}
else {
newValue = objValue;
}
}
else {
isCommon = false;
}
}
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack['delete'](srcValue);
}
assignMergeValue(object, key, newValue);
}
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
return function () {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = array;
return apply(func, this, otherArgs);
};
}
/**
* Creates a clone of `buffer`.
*
* @private
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var result = new buffer.constructor(buffer.length);
buffer.copy(result);
return result;
}
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
/**
* Creates a clone of `dataView`.
*
* @private
* @param {Object} dataView The data view to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned data view.
*/
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
/**
* Creates a clone of `map`.
*
* @private
* @param {Object} map The map to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned map.
*/
function cloneMap(map, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
return arrayReduce(array, addMapEntry, new map.constructor);
}
/**
* Creates a clone of `regexp`.
*
* @private
* @param {Object} regexp The regexp to clone.
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
/**
* Creates a clone of `set`.
*
* @private
* @param {Object} set The set to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned set.
*/
function cloneSet(set, isDeep, cloneFunc) {
var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
return arrayReduce(array, addSetEntry, new set.constructor);
}
/**
* Creates a clone of the `symbol` object.
*
* @private
* @param {Object} symbol The symbol object to clone.
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
/**
* Creates a clone of `typedArray`.
*
* @private
* @param {Object} typedArray The typed array to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: undefined;
assignValue(object, key, newValue === undefined ? source[key] : newValue);
}
return object;
}
/**
* Copies own symbol properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
/**
* Creates a function like `_.assign`.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return baseRest(function (object, sources) {
var index = -1,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
customizer = (assigner.length > 3 && typeof customizer == 'function')
? (length--, customizer)
: undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
/**
* Creates an array of own enumerable property names and symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
/**
* Creates an array of the own enumerable symbol properties of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11,
// for data views in Edge < 14, and promises in Node.js.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function (value) {
var result = objectToString.call(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : undefined;
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result;
};
}
/**
* Initializes an array clone.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the initialized clone.
*/
function initCloneArray(array) {
var length = array.length,
result = array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototype(object))
: {};
}
/**
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
* @param {Function} cloneFunc The function to clone values.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, cloneFunc, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag:
case float64Tag:
case int8Tag:
case int16Tag:
case int32Tag:
case uint8Tag:
case uint8ClampedTag:
case uint16Tag:
case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return cloneMap(object, isDeep, cloneFunc);
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return cloneSet(object, isDeep, cloneFunc);
case symbolTag:
return cloneSymbol(object);
}
}
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(typeof value == 'number' || reIsUint.test(value)) &&
(value > -1 && value % 1 == 0 && value < length);
}
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);
}
return false;
}
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
/**
* This function is like
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* except that it includes inherited enumerable properties.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to process.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return (func + '');
} catch (e) {
}
}
return '';
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
function isArguments(value) {
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
}
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse;
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 8-9 which returns 'object' for typed array and other constructors.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) ||
objectToString.call(value) != objectTag || isHostObject(value)) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return (typeof Ctor == 'function' &&
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
}
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
/**
* Converts `value` to a plain object flattening inherited enumerable string
* keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function (object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/**
* This method returns a new empty array.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {Array} Returns the new empty array.
* @example
*
* var arrays = _.times(2, _.stubArray);
*
* console.log(arrays);
* // => [[], []]
*
* console.log(arrays[0] === arrays[1]);
* // => false
*/
function stubArray() {
return [];
}
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
module.exports = merge;
================================================
FILE: scripts/tags/button.js
================================================
/* global hexo */
// Usage: {% button /path/to/url/, text, icon [class], title %}
// Alias: {% btn /path/to/url/, text, icon [class], title %}
function postButton(args) {
args = args.join(' ').split(',');
var url = args[0];
var text = args[1] || '';
var icon = args[2] || '';
var title = args[3] || '';
if (!url) {
hexo.log.warn('URL can NOT be empty');
}
text = text.trim();
icon = icon.trim();
title = title.trim();
var result = [' 0 && result.push(' title="' + title + '"');
result.push('>');
icon.length > 0 && result.push('');
text.length > 0 && result.push(text);
result.push('');
return result.join('');
}
hexo.extend.tag.register('button', postButton);
hexo.extend.tag.register('btn', postButton);
================================================
FILE: scripts/tags/center-quote.js
================================================
/* global hexo */
// Usage: {% centerquote %} Something {% endcenterquote %}
// Alias: {% cq %} Something {% endcq %}
function centerQuote (args, content) {
return '' +
hexo.render.renderSync({text: content, engine: 'markdown'}) +
'
';
}
hexo.extend.tag.register('centerquote', centerQuote, {ends: true});
hexo.extend.tag.register('cq', centerQuote, {ends: true});
================================================
FILE: scripts/tags/exturl.js
================================================
/* global hexo */
// Usage: {% exturl text url "title" %}
// Alias: {% extlink text url "title" %}
'use strict';
/*jshint camelcase: false */
var util = require('hexo-util');
/*jshint camelcase: true */
var htmlTag = util.htmlTag;
var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/;
// Create Base64 Object
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}};
function extURL(args, content) {
var exturl = 'exturl';
var url = '';
var text = [''];
var title = '';
var item = '';
var i = 0;
var len = args.length;
// Find link URL and text
for (; i < len; i++) {
item = args[i];
if (rUrl.test(item)) {
url = Base64.encode(item);
break;
} else {
text.push(item);
}
}
// Delete link URL and text from arguments
args = args.slice(i + 1);
// Check if the link should be open in a new window
// and collect the last text as the link title
if (args.length) {
var shift = args[0];
title = args.join(' ');
}
var attrs = {
class: exturl,
'data-url': url,
title: title
};
return htmlTag('span', attrs, text.join(' '));
}
hexo.extend.tag.register('exturl', extURL, {ends: false});
hexo.extend.tag.register('extlink', extURL, {ends: false});
================================================
FILE: scripts/tags/full-image.js
================================================
/* global hexo */
// Usage: {% fullimage /path/to/image, alt, title %}
// Alias: {% fi /path/to/image, alt, title %}
function fullImage(args) {
args = args.join(' ').split(',');
var src = args[0];
var alt = args[1] || '';
var title = args[2] || '';
if (!src) {
hexo.log.warn('Image src can NOT be empty');
}
alt = alt.trim();
title = title.trim();
var image = ['
0 && image.push('alt="' + alt + '"');
title.length > 0 && image.push('title="' + title + '"');
image.push('/>');
return image.join(' ');
}
hexo.extend.tag.register('fullimage', fullImage);
hexo.extend.tag.register('fi', fullImage);
================================================
FILE: scripts/tags/group-pictures.js
================================================
/* global hexo */
// Usage: {% grouppicture group-layout %}{% endgrouppicture %}
// Alias: {% gp group-layout %}{% endgp %}
function groupPicture(args, content) {
args = args[0].split('-');
var group = parseInt(args[0]);
var layout = parseInt(args[1]);
content = hexo.render.renderSync({text: content, engine: 'markdown'});
var pictures = content.match(/
/g);
return '' +
templates.dispatch(pictures, group, layout) +
'';
}
var templates = {
dispatch: function (pictures, group, layout) {
var fn = 'group' + group + 'Layout' + layout;
fn = templates[fn] || templates.defaults;
return fn.call(templates, pictures);
},
/**
* 2-1
*
* □
* □
*
* @param pictures
* @returns {string}
*/
group2Layout1: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1)
]);
},
/**
* 2-2
*
* □ □
*
* @param pictures
*/
group2Layout2: function (pictures) {
return this.getHTML(pictures);
},
/**
* 3-1
*
* □ □ □
*
* @param pictures
*/
group3Layout1: function (pictures) {
return this.getHTML(pictures);
},
/**
* 3-2
*
* □
* □ □
*
* @param pictures
*/
group3Layout2: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1)
]);
},
/**
* 3-3
*
* □ □
* □
*
* @param pictures
*/
group3Layout3: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2)
]);
},
/**
* 4-1
*
* □
* □ □
* □
*
* @param pictures
*/
group4Layout1: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 3),
pictures.slice(3)
]);
},
/**
* 4-2
*
* □
* □ □ □
*
* @param pictures
*/
group4Layout2: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1)
]);
},
/**
* 4-3
*
* □ □
* □ □
*
* @param pictures
*/
group4Layout3: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2)
]);
},
/**
* 4-4
*
* □ □ □
* □
*
* @param pictures
*/
group4Layout4: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3)
]);
},
/**
* 5-1
*
* □
* □ □
* □ □
*
* @param pictures
*/
group5Layout1: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 3),
pictures.slice(3)
]);
},
/**
* 5-2
*
* □ □
* □
* □ □
*
* @param pictures
*/
group5Layout2: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 3),
pictures.slice(3)
]);
},
/**
* 5-3
*
* □ □
* □ □ □
*
* @param pictures
*/
group5Layout3: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2)
]);
},
/**
* 5-4
*
* □ □ □
* □ □
*
* @param pictures
*/
group5Layout4: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3)
]);
},
/**
* 6-1
*
* □
* □ □
* □ □ □
*
* @param pictures
*/
group6Layout1: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 3),
pictures.slice(3)
]);
},
/**
* 6-2
*
* □
* □ □ □
* □ □
*
* @param pictures
*/
group6Layout2: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 4),
pictures.slice(4)
]);
},
/**
* 6-3
*
* □ □
* □
* □ □ □
*
* @param pictures
*/
group6Layout3: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 3),
pictures.slice(3)
]);
},
/**
* 6-4
*
* □ □
* □ □
* □ □
*
* @param pictures
*/
group6Layout4: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 4),
pictures.slice(4)
]);
},
/**
* 6-5
*
* □ □ □
* □ □ □
*
* @param pictures
*/
group6Layout5: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3)
]);
},
/**
* 7-1
*
* □
* □ □
* □ □
* □ □
*
* @param pictures
*/
group7Layout1: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 3),
pictures.slice(3, 5),
pictures.slice(5)
]);
},
/**
* 7-2
*
* □
* □ □ □
* □ □ □
*
* @param pictures
*/
group7Layout2: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 4),
pictures.slice(4)
]);
},
/**
* 7-3
*
* □ □
* □ □
* □ □ □
*
* @param pictures
*/
group7Layout3: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 4),
pictures.slice(4)
]);
},
/**
* 7-4
*
* □ □
* □ □ □
* □ □
*
* @param pictures
*/
group7Layout4: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 5),
pictures.slice(5)
]);
},
/**
* 7-5
*
* □ □ □
* □ □
* □ □
*
* @param pictures
*/
group7Layout5: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3, 5),
pictures.slice(5)
]);
},
/**
* 8-1
*
* □
* □ □
* □ □
* □ □ □
*
* @param pictures
*/
group8Layout1: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 3),
pictures.slice(3, 5),
pictures.slice(5)
]);
},
/**
* 8-2
*
* □
* □ □
* □ □ □
* □ □
*
* @param pictures
*/
group8Layout2: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 3),
pictures.slice(3, 6),
pictures.slice(6)
]);
},
/**
* 8-3
*
* □
* □ □ □
* □ □
* □ □
* @param pictures
*/
group8Layout3: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 4),
pictures.slice(4, 6),
pictures.slice(6)
]);
},
/**
* 8-4
*
* □ □
* □ □
* □ □
* □ □
*
* @param pictures
*/
group8Layout4: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 4),
pictures.slice(4, 6),
pictures.slice(6)
]);
},
/**
* 8-5
*
* □ □
* □ □ □
* □ □ □
*
* @param pictures
*/
group8Layout5: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 5),
pictures.slice(5)
]);
},
/**
* 8-6
*
* □ □ □
* □ □
* □ □ □
*
* @param pictures
*/
group8Layout6: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3, 5),
pictures.slice(5)
]);
},
/**
* 8-7
*
* □ □ □
* □ □ □
* □ □
*
* @param pictures
*/
group8Layout7: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3, 6),
pictures.slice(6)
]);
},
/**
* 9-1
*
* □
* □ □
* □ □ □
* □ □ □
*
* @param pictures
*/
group9Layout1: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 3),
pictures.slice(3, 6),
pictures.slice(6)
]);
},
/**
* 9-2
*
* □
* □ □ □
* □ □
* □ □ □
*
* @param pictures
*/
group9Layout2: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 4),
pictures.slice(4, 6),
pictures.slice(6)
]);
},
/**
* 9-3
*
* □ □
* □ □
* □ □
* □ □ □
*
* @param pictures
*/
group9Layout3: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 4),
pictures.slice(4, 6),
pictures.slice(6)
]);
},
/**
* 9-4
*
* □ □
* □ □
* □ □ □
* □ □
*
* @param pictures
*/
group9Layout4: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 4),
pictures.slice(4, 7),
pictures.slice(7)
]);
},
/**
* 9-5
*
* □ □
* □ □ □
* □ □
* □ □
*
* @param pictures
*/
group9Layout5: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 5),
pictures.slice(5, 7),
pictures.slice(7)
]);
},
/**
* 9-6
*
* □ □ □
* □ □
* □ □
* □ □
*
* @param pictures
*/
group9Layout6: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3, 5),
pictures.slice(5, 7),
pictures.slice(7)
]);
},
/**
* 9-7
*
* □ □ □
* □ □ □
* □ □ □
*
* @param pictures
*/
group9Layout7: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3, 6),
pictures.slice(6)
]);
},
/**
* 10-1
*
* □
* □ □ □
* □ □ □
* □ □ □
*
* @param pictures
*/
group10Layout1: function (pictures) {
return this.getHTML([
pictures.slice(0, 1),
pictures.slice(1, 4),
pictures.slice(4, 7),
pictures.slice(7)
]);
},
/**
* 10-2
*
* □ □
* □ □
* □ □ □
* □ □ □
*
* @param pictures
*/
group10Layout2: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 4),
pictures.slice(4, 7),
pictures.slice(7)
]);
},
/**
* 10-3
*
* □ □
* □ □ □
* □ □
* □ □ □
*
* @param pictures
*/
group10Layout3: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 5),
pictures.slice(5, 7),
pictures.slice(7)
]);
},
/**
* 10-4
*
* □ □
* □ □ □
* □ □ □
* □ □
*
* @param pictures
*/
group10Layout4: function (pictures) {
return this.getHTML([
pictures.slice(0, 2),
pictures.slice(2, 5),
pictures.slice(5, 8),
pictures.slice(8)
]);
},
/**
* 10-5
*
* □ □ □
* □ □
* □ □
* □ □ □
*
* @param pictures
*/
group10Layout5: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3, 5),
pictures.slice(5, 7),
pictures.slice(7)
]);
},
/**
* 10-6
*
* □ □ □
* □ □
* □ □ □
* □ □
*
* @param pictures
*/
group10Layout6: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3, 5),
pictures.slice(5, 8),
pictures.slice(8)
]);
},
/**
* 10-7
*
* □ □ □
* □ □ □
* □ □
* □ □
*
* @param pictures
*/
group10Layout7: function (pictures) {
return this.getHTML([
pictures.slice(0, 3),
pictures.slice(3, 6),
pictures.slice(6, 8),
pictures.slice(8)
]);
},
/**
* Defaults Layout
*
* □ □ □
* □ □ □
* ...
*
* @param pictures
*/
defaults: function (pictures) {
var ROW_SIZE = 3;
var rows = pictures.length / ROW_SIZE + 1;
var pictureArr = [];
for (var i = 0; i < rows; i++) {
pictureArr.push(pictures.slice(i * ROW_SIZE, (i + 1) * ROW_SIZE));
}
return this.getHTML(pictureArr);
},
getHTML: function (rows) {
var rowHTML = '';
for (var i = 0; i < rows.length; i++) {
rowHTML += this.getRowHTML(rows[i]);
}
return '' + rowHTML + '';
},
getRowHTML: function (pictures) {
return (
'' +
this.getColumnHTML(pictures) +
''
);
},
getColumnHTML: function (pictures) {
var columns = [];
var columnWidth = 100 / pictures.length;
var columnStyle = ' style="width: ' + columnWidth + '%;"';
for (var i = 0; i < pictures.length; i++) {
columns.push('' + pictures[i] + '');
}
return columns.join('');
}
};
hexo.extend.tag.register('grouppicture', groupPicture, {ends: true});
hexo.extend.tag.register('gp', groupPicture, {ends: true});
================================================
FILE: scripts/tags/label.js
================================================
/**
* label.js | global hexo script.
*
* Usage:
*
* {% label [class]@Text %}
*
* [class] : default | primary | success | info | warning | danger.
* If not defined, default class will be selected.
*/
function postLabel (args) {
args = args.join(' ').split('@');
var classes = args[0] || 'default';
var text = args[1] || '';
classes = classes.trim();
!text && hexo.log.warn('Label text must be defined!');
return '' + text + '';
}
hexo.extend.tag.register('label', postLabel, { ends: false });
================================================
FILE: scripts/tags/lazy-image.js
================================================
/* global hexo */
// Usage: {% lazyimage /path/to/image, alt, title %}
// Alias: {% li /path/to/image, alt, title %}
function lazyImage(args) {
args = args.join(' ').split(',');
var src = args[0];
var alt = args[1] || '';
var title = args[2] || '';
if (!src) {
hexo.log.warn('Image src can NOT be empty');
}
alt = alt.trim();
title = title.trim();
var image = ['
0 && image.push('alt="' + alt + '"');
title.length > 0 && image.push('title="' + title + '"');
image.push('/>');
return image.join(' ');
}
hexo.extend.tag.register('lazyimage', lazyImage);
hexo.extend.tag.register('li', lazyImage);
================================================
FILE: scripts/tags/note.js
================================================
/**
* note.js | global hexo script.
*
* ATTENTION! No need to write this tag in 1 line if u don't want see probally bugs.
*
* Usage:
*
* {% note [class] %}
* Any content (support inline tags too).
* {% endnote %}
*
* [class] : default | primary | success | info | warning | danger.
* May be not defined.
*/
function bscallOut (args, content) {
return '' + hexo.render.renderSync({text: content, engine: 'markdown'}).trim() + '';
}
hexo.extend.tag.register('note', bscallOut, {ends: true});
================================================
FILE: scripts/tags/tabs.js
================================================
/**
* tabs.js | global hexo script.
*
* Usage:
*
* {% tabs [Unique name], [index] %}
*
* Any content (support inline tags too).
*
* {% endtabs %}
*
* [Unique name] : Unique name of tabs block tag without comma.
* Will be used in #id's as prefix for each tab with their index numbers.
* If there are whitespaces in name, for generate #id all whitespaces will replaced by dashes.
* Only for current url of post/page must be unique!
* [index] : Index number of active tab.
* If not defined, first tab (1) will be selected.
* If index is -1, no tab will be selected. It's will be something like spoiler.
* May be not defined.
* [Tab caption] : Caption of current tab.
* If not caption specified, unique name with tab index suffix will be used as caption of tab.
* If not caption specified, but specified icon, caption will empty.
* May be not defined.
* [icon] : Font awesome icon.
* May be not defined.
*/
'use strict';
function postTabs (args, content) {
var tabBlock = /\n([\w\W\s\S]*?)/g;
var args = args.join(' ').split(',');
var tabName = args[0];
var tabActive = args[1] || '';
var matches = [];
var match;
var tabId = 0;
var tabNav = '';
var tabContent = '';
!tabName && hexo.log.warn('Tabs block must have unique name!');
while (match = tabBlock.exec(content)) {
matches.push(match[1]);
matches.push(match[2]);
}
for (var i = 0; i < matches.length; i += 2) {
var tabParameters = matches[i].split('@');
var postContent = matches[i + 1];
var tabCaption = tabParameters[0] || '';
var tabIcon = tabParameters[1] || '';
var tabHref = '';
postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'});
tabId += 1;
tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');
((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId);
var isOnlyicon = (tabIcon.length > 0 && tabCaption.length === 0) ? 'style="text-align: center;' : '';
tabIcon.length > 0 && (tabIcon = '');
var isActive = ((tabActive.length > 0 && tabActive == tabId) || (tabActive.length === 0 && tabId == 1)) ? ' active' : '';
tabNav += '' + tabIcon + tabCaption + ' ';
tabContent += '' + postContent + '';
}
tabNav = '';
tabContent = '' + tabContent + '';
return '' + tabNav + tabContent + '';
}
hexo.extend.tag.register('tabs', postTabs, {ends: true});
================================================
FILE: source/css/_common/components/back-to-top-sidebar.styl
================================================
.back-to-top {
display: none;
margin: 20px -10px -20px;
background: $body-bg-color;
font-size: $b2t-font-size;
opacity: $b2t-opacity;
cursor: pointer;
text-align: center;
-webkit-transform: translateZ(0);
the-transition();
&:hover { opacity: 0.8; }
+tablet() {
fixbutton() if hexo-config('sidebar.onmobile');
hide() if not hexo-config('sidebar.onmobile');
}
+mobile() {
fixbutton() if hexo-config('sidebar.onmobile');
hide() if not hexo-config('sidebar.onmobile');
}
&.back-to-top-on {
display: block;
}
}
================================================
FILE: source/css/_common/components/back-to-top.styl
================================================
.back-to-top {
box-sizing: border-box;
position: fixed;
bottom: $b2t-position-bottom;
right: $b2t-position-right;
z-index: $zindex-5;
padding: 0 6px;
width: hexo-config('sidebar.scrollpercent') ? initial : 24px;
background: $b2t-bg-color;
font-size: $b2t-font-size;
opacity: $b2t-opacity;
color: $b2t-color;
cursor: pointer;
text-align: center;
-webkit-transform: translateZ(0);
transition-property: bottom;
the-transition();
+tablet() {
fixbutton() if hexo-config('sidebar.onmobile');
hide() if not hexo-config('sidebar.onmobile');
}
+mobile() {
fixbutton() if hexo-config('sidebar.onmobile');
hide() if not hexo-config('sidebar.onmobile');
}
&.back-to-top-on {
bottom: $b2t-position-bottom-on;
}
}
================================================
FILE: source/css/_common/components/buttons.styl
================================================
.btn {
display: inline-block;
padding: 0 20px;
font-size: $btn-default-font-size;
color: $btn-default-color;
background: $btn-default-bg;
border: $btn-default-border-width solid $btn-default-border-color;
text-decoration: none;
border-radius: $btn-default-radius;
transition-property: background-color;
the-transition();
line-height: 2;
&:hover {
border-color: $btn-default-hover-border-color;
color: $btn-default-hover-color;
background: $btn-default-hover-bg;
}
+.btn {
margin: 0 0 8px 8px;
}
.fa-fw {
width: (18em / 14);
text-align: left;
}
}
.btn-bar {
display: block;
width: 22px;
height: 2px;
background: $text-color;
border-radius: 1px;
&+.btn-bar { margin-top: 4px; }
}
================================================
FILE: source/css/_common/components/comments.styl
================================================
.comments { margin: 60px 20px 0; }
================================================
FILE: source/css/_common/components/components.styl
================================================
@import "highlight";
@import "tags";
@import "buttons";
@import "pagination";
@import "comments";
@import "tag-cloud";
@import hexo-config('sidebar.b2t') ? "back-to-top-sidebar" : "back-to-top";
@import "header";
@import "post";
@import "sidebar";
@import "footer";
@import "third-party";
@import "pages";
================================================
FILE: source/css/_common/components/footer/footer.styl
================================================
.footer {
font-size: 14px;
color: $grey-dark;
img { border: none; }
}
.footer-inner { text-align: center; }
.with-love {
display: inline-block;
margin: 0 5px;
}
.powered-by,
.theme-info { display: inline-block; }
.cc-license {
margin-top: 10px;
text-align: center;
.cc-opacity {
opacity: 0.7;
border-bottom: none;
&:hover { opacity: 0.9; }
}
img { display: inline-block; }
}
================================================
FILE: source/css/_common/components/header/header.styl
================================================
.header { background: $head-bg; }
.header-inner { position: relative; }
@import "headerband";
@import "site-meta";
@import "site-nav";
@import "menu";
================================================
FILE: source/css/_common/components/header/headerband.styl
================================================
.headband {
height: $headband-height;
background: $headband-bg;
}
================================================
FILE: source/css/_common/components/header/menu.styl
================================================
// Menu
// --------------------------------------------------
.menu {
margin-top: 20px;
padding-left: 0;
text-align: center;
}
.menu .menu-item {
display: inline-block;
margin: 0 10px;
list-style: none;
@media screen and (max-width: 767px) {
margin-top: 10px;
}
a {
display: block;
font-size: 13px;
line-height: inherit;
border-bottom: 1px solid $menu-link-border;
transition-property: border-color;
the-transition();
&:hover { border-bottom-color: $menu-link-hover-border; }
}
.fa { margin-right: 5px; }
}
.use-motion .menu-item { opacity: 0; }
================================================
FILE: source/css/_common/components/header/site-meta.styl
================================================
.site-meta {
margin: 0;
text-align: $site-meta-text-align;
+mobile() { text-align: center; }
}
.brand {
position: relative;
display: inline-block;
padding: 0 40px;
color: $brand-color;
background: $brand-bg;
border-bottom: none;
&:hover { color: $brand-hover-color; }
}
.logo {
display: inline-block;
margin-right: 5px;
line-height: 36px;
vertical-align: top;
}
.site-title {
display: inline-block;
vertical-align: top;
line-height: 36px;
font-size: $logo-font-size;
font-weight: normal;
font-family: $font-family-logo;
}
.site-subtitle {
margin-top: 10px;
font-size: $subtitle-font-size;
color: $subtitle-color;
}
.use-motion {
.brand { opacity: 0; }
.logo, .site-title, .site-subtitle {
opacity: 0;
position: relative;
top: -10px;
}
}
================================================
FILE: source/css/_common/components/header/site-nav.styl
================================================
.site-nav-toggle {
display: none;
position: absolute;
top: 10px;
left: 10px;
+mobile() {
display: block;
}
button {
margin-top: 2px;
padding: 9px 10px;
background: transparent;
border: none;
}
}
.site-nav {
+mobile() {
display: none;
margin: 0 -10px;
padding: 0 10px;
clear: both;
border-top: 1px solid $gray-lighter;
}
+tablet() { display: block !important; }
+desktop() { display: block !important; }
}
================================================
FILE: source/css/_common/components/highlight/diff.styl
================================================
$highlight_theme = hexo-config("highlight_theme")
if $highlight_theme == "normal"
$highlight-deletion = #fdd
$highlight-addition = #dfd
else
$highlight-deletion = #008000
$highlight-addition = #800000
================================================
FILE: source/css/_common/components/highlight/highlight.styl
================================================
// https://github.com/chriskempson/tomorrow-theme
@require "theme"
@require "diff"
// Placeholder: $code-block
$code-block {
overflow: auto;
margin: 20px 0;
padding: 0;
font-size $code-font-size;
color: $highlight-foreground;
background: $highlight-background;
line-height: $line-height-code-block;
}
pre, code { font-family: $code-font-family; }
code {
padding: 2px 4px;
word-wrap: break-word;
color: $code-foreground;
background: $code-background;
border-radius: $code-border-radius;
font-size $code-font-size;
}
pre {
@extend $code-block;
padding: 10px;
code {
padding: 0;
color: $highlight-foreground;
background: none;
text-shadow: none;
}
}
.highlight {
@extend $code-block;
border-radius: 1px
pre {
border: none;
margin: 0;
padding: 10px 0;
}
table {
margin: 0;
width: auto;
border: none;
}
td {
border: none;
padding: 0;
}
figcaption {
clearfix();
font-size: 1em;
color: $highlight-foreground;
line-height: 1em;
margin-bottom: 1em;
a {
float: right;
color: $highlight-foreground;
&:hover { border-bottom-color: $highlight-foreground; }
}
}
.gutter pre {
padding-left: 10px
padding-right: 10px
color: $highlight-gutter.color
text-align: right
background-color: $highlight-gutter.bg-color
}
.code pre {
width: 100%
padding-left: 10px
padding-right: 10px
background-color: $highlight-background
}
.line { height: 20px; }
}
.gutter {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.gist table {
width: auto;
td { border: none; }
}
// For diff highlight
pre .deletion { background: $highlight-deletion; }
pre .addition { background: $highlight-addition; }
pre .meta { color: $highlight-purple; }
pre {
.comment { color: $highlight-comment; }
.variable
.attribute
.tag
.regexp
.ruby .constant
.xml .tag .title
.xml .pi
.xml .doctype
.html .doctype
.css .id
.css .class
.css .pseudo {
color: $highlight-red;
}
.number
.preprocessor
.built_in
.literal
.params
.constant
.command {
color: $highlight-orange;
}
.ruby .class .title
.css .rules .attribute
.string
.value
.inheritance
.header
.ruby .symbol
.xml .cdata
.special
.number
.formula {
color: $highlight-green;
}
.title
.css .hexcolor {
color: $highlight-aqua;
}
.function
.python .decorator
.python .title
.ruby .function .title
.ruby .title .keyword
.perl .sub
.javascript .title
.coffeescript .title {
color: $highlight-blue;
}
.keyword
.javascript .function {
color: $highlight-purple;
}
}
================================================
FILE: source/css/_common/components/highlight/theme.styl
================================================
$highlight_theme = hexo-config("highlight_theme")
if $highlight_theme == "normal"
$highlight-background = #f7f7f7
$highlight-current-line = #efefef
$highlight-selection = #d6d6d6
$highlight-foreground = #4d4d4c
$highlight-comment = #8e908c
$highlight-red = #c82829
$highlight-orange = #f5871f
$highlight-yellow = #eab700
$highlight-green = #718c00
$highlight-aqua = #3e999f
$highlight-blue = #4271ae
$highlight-purple = #8959a8
$highlight-gutter = {
color: #869194,
bg-color: #eff2f3
}
if $highlight_theme == "night"
$highlight-background = #1d1f21
$highlight-current-line = #282a2e
$highlight-selection = #373b41
$highlight-foreground = #c5c8c6
$highlight-comment = #969896
$highlight-red = #cc6666
$highlight-orange = #de935f
$highlight-yellow = #f0c674
$highlight-green = #b5bd68
$highlight-aqua = #8abeb7
$highlight-blue = #81a2be
$highlight-purple = #b294bb
$highlight-gutter = {
color: lighten($highlight-background, 50%),
bg-color: darken($highlight-background, 100%)
}
if $highlight_theme == "night eighties"
$highlight-background = #2d2d2d
$highlight-current-line = #393939
$highlight-selection = #515151
$highlight-foreground = #cccccc
$highlight-comment = #999999
$highlight-red = #f2777a
$highlight-orange = #f99157
$highlight-yellow = #ffcc66
$highlight-green = #99cc99
$highlight-aqua = #66cccc
$highlight-blue = #6699cc
$highlight-purple = #cc99cc
$highlight-gutter = {
color: $highlight-comment,
bg-color: darken($highlight-background, 40%)
}
if $highlight_theme == "night blue"
$highlight-background = #002451
$highlight-current-line = #00346e
$highlight-selection = #003f8e
$highlight-foreground = #ffffff
$highlight-comment = #7285b7
$highlight-red = #ff9da4
$highlight-orange = #ffc58f
$highlight-yellow = #ffeead
$highlight-green = #d1f1a9
$highlight-aqua = #99ffff
$highlight-blue = #bbdaff
$highlight-purple = #ebbbff
$highlight-gutter = {
color: $highlight-comment,
bg-color: darken($highlight-background, 60%)
}
if $highlight_theme == "night bright"
$highlight-background = #000000
$highlight-current-line = #2a2a2a
$highlight-selection = #424242
$highlight-foreground = #eaeaea
$highlight-comment = #969896
$highlight-red = #d54e53
$highlight-orange = #e78c45
$highlight-yellow = #e7c547
$highlight-green = #b9ca4a
$highlight-aqua = #70c0b1
$highlight-blue = #7aa6da
$highlight-purple = #c397d8
$highlight-gutter = {
color: lighten($highlight-background, 40%),
bg-color: lighten($highlight-background, 16%)
}
================================================
FILE: source/css/_common/components/pages/archive.styl
================================================
.page-archive {
.archive-page-counter {
position: relative;
top: 3px;
left: 20px;
+mobile() {
top: 5px;
}
}
.posts-collapse {
.archive-move-on {
position: absolute;
top: 11px;
left: 0;
margin-left: -6px;
width: 10px;
height: 10px;
opacity: 0.5;
background: $black-light;
border: 1px solid white;
circle();
}
}
}
================================================
FILE: source/css/_common/components/pages/categories.styl
================================================
.category-all-page {
.category-all-title { text-align: center; }
.category-all { margin-top: 20px; }
.category-list {
margin: 0;
padding: 0;
list-style: none;
}
.category-list-item { margin: 5px 10px; }
.category-list-count {
color: $grey;
&:before {
display: inline;
content: " ("
}
&:after {
display: inline;
content: ") "
}
}
.category-list-child { padding-left: 10px; }
}
================================================
FILE: source/css/_common/components/pages/pages.styl
================================================
// Page specific styles
@import "archive";
@import "categories";
@import "schedule";
@import "post-detail";
================================================
FILE: source/css/_common/components/pages/post-detail.styl
================================================
.page-post-detail {
.sidebar-toggle-line { background: $sidebar-highlight; }
.comments { overflow: hidden; }
}
================================================
FILE: source/css/_common/components/pages/schedule.styl
================================================
@keyframes dot-flash {
from {opacity: 1; transform:scale(1.1);}
to {opacity: 0; transform:scale(1);}
}
#schedule {
ul#event-list {
padding-left: 30px
hr {
margin: 20px 0 45px 0!important
background: #222
&:after {
display: inline-block
content: 'NOW'
background: #222
color: #FFF
font-weight:bold
text-align: right
padding: 0 5px
}
}
li.event {
margin: 20px 0px
background: #F9F9F9
padding-left: 10px
min-height: 40px
h2.event-summary {
margin: 0
padding-bottom: 3px
&:before {
display: inline-block
font-family: FontAwesome
font-size: 8px
content: '\f111'
vertical-align: middle
margin-right: 25px
color: #bbb
}
}
span.event-relative-time {
display: inline-block
font-size: 12px
font-weight: 400
padding-left: 12px
color: #bbb
}
span.event-details {
display: block
color: #bbb
margin-left: 56px
padding-top: 3px
padding-bottom: 6px
text-indent: -24px
line-height: 18px
&:before {
text-indent: 0
display: inline-block
width: 14px
font-family: FontAwesome
text-align: center
margin-right: 9px
color: #bbb
}
&.event-location:before {
content: '\f041'
}
&.event-duration:before {
content: '\f017'
}
}
}
li.event-past {
background: #FCFCFC
& > * {
opacity: .6
}
h2.event-summary {
color: #bbb
&:before {
color: #DFDFDF
}
}
}
li.event-now {
background: #222
color: #FFF
padding: 15px 0 15px 10px
h2.event-summary {
&:before {
transform: scale(1.2)
color: #FFF
animation: dot-flash 1s alternate infinite ease-in-out;
}
}
* {
color: #FFF!important
}
}
}
}
================================================
FILE: source/css/_common/components/pagination.styl
================================================
.pagination {
margin: 120px 0 40px;
text-align: center;
border-top: 1px solid $pagination-border;
}
.page-number-basic {
display: inline-block;
position: relative;
top: -1px;
margin: 0 10px;
padding: 0 11px;
+mobile() { margin: 0 5px; }
}
.pagination {
.prev, .next, .page-number {
@extend .page-number-basic;
border-bottom: 0;
border-top: 1px solid $pagination-link-border;
transition-property: border-color;
the-transition();
&:hover { border-top-color: $pagination-link-hover-border; }
}
.space {
@extend .page-number-basic;
padding: 0;
margin: 0;
}
.prev { margin-left: 0; }
.next { margin-right: 0; }
.page-number.current {
color: $pagination-active-color;
background: $pagination-active-bg;
border-top-color: $pagination-active-border;
}
}
@media (max-width: 767px)
.pagination { border-top: none; }
.pagination {
.prev, .next, .page-number {
margin-bottom: 10px;
border-top: 0;
border-bottom: 1px solid $pagination-link-border;
padding: 0 10px;
&:hover { border-bottom-color: $pagination-link-hover-border; }
}
}
================================================
FILE: source/css/_common/components/post/post-button.styl
================================================
.post-button {
margin-top: 40px;
}
================================================
FILE: source/css/_common/components/post/post-collapse.styl
================================================
// TODO: Refactor.
@media (max-width: 767px) {
.posts-collapse {
margin: 0 20px;
.post-title, .post-meta {
display: block;
width: auto;
text-align: left;
}
}
}
.posts-collapse {
position: relative;
z-index: $zindex-1;
&::after {
content: " ";
position: absolute;
top: 20px;
left: 0;
margin-left: -2px;
width: 4px;
height: 100%;
background: $whitesmoke;
z-index: $zindex-bottom;
}
margin-left: $posts-collapse-left;
+mobile() { margin: 0 20px; }
.collection-title {
position: relative;
margin: 60px 0;
h1, h2 { margin-left: 20px; }
small { color: $grey; margin-left: 5px; }
&::before {
content: " ";
position: absolute;
left: 0;
top: 50%;
margin-left: -4px;
margin-top: -4px;
width: 8px;
height: 8px;
background: $grey;
circle();
}
}
.post { margin: 30px 0; }
.post-header {
position: relative;
the-transition();
transition-property: border;
border-bottom: 1px dashed $grey-light;
&::before {
content: " ";
position: absolute;
left: 0;
top: 12px;
width: 6px;
height: 6px;
margin-left: -4px;
background: $grey;
circle();
border: 1px solid white;
the-transition();
transition-property: background;
}
}
.post-header:hover {
border-bottom-color: $grey-dim;
&::before { background: $black-deep; }
}
.post-meta {
position: absolute;
font-size: 12px;
left: 20px;
top: 5px;
}
.post-comments-count { display: none; }
.post-title {
margin-left: 60px;
font-size: 16px;
font-weight: normal;
line-height: inherit;
&::after {
margin-left: 3px;
opacity: 0.6;
}
a {
color: $grey-dim;
border-bottom: none;
}
}
}
================================================
FILE: source/css/_common/components/post/post-copyright.styl
================================================
.post-copyright {
margin: $post-copyright.margin;
padding: $post-copyright.padding;
border-left: $post-copyright.border.width $post-copyright.border.style $post-copyright.border.color;
background-color: $post-copyright.bg;
list-style: none;
}
================================================
FILE: source/css/_common/components/post/post-eof.styl
================================================
.posts-expand {
.post-eof {
display: block;
margin: $post-eof-margin-top auto $post-eof-margin-bottom;
width: 8%;
height: 1px;
background: $grey-light;
text-align: center;
}
}
.post:last-child {
.post-eof.post-eof.post-eof {
display: none;
}
}
================================================
FILE: source/css/_common/components/post/post-expand.styl
================================================
// TODO: Refactor.
.posts-expand {
padding-top: 40px;
}
@media (max-width: 767px) {
.posts-expand {
margin: 0 20px;
}
.post-body {
pre {
.gutter pre {
padding-right: 10px;
}
}
.highlight {
margin-left: 0px;
margin-right: 0px;
padding: 0;
.gutter pre {
padding-right: 10px;
}
}
}
}
.posts-expand .post-body {
+desktop() { text-align: justify; }
h2, h3, h4, h5, h6 {
padding-top: 10px;
.header-anchor{
float: right;
margin-left: 10px;
color: $grey-light;
border-bottom-style: none;
visibility: hidden;
&:hover{
color: inherit;
}
}
&:hover .header-anchor{
visibility: visible;
}
}
ul li { list-style: circle; }
img {
box-sizing: border-box;
margin: auto;
padding: 3px;
border: 1px solid $gray-lighter;
}
}
.posts-expand .post-body .fancybox img { margin: 0 auto 25px; }
================================================
FILE: source/css/_common/components/post/post-gallery.styl
================================================
.post-gallery {
display: table;
table-layout: fixed;
width: 100%;
border-collapse: separate;
}
.post-gallery-row { display: table-row; }
.post-gallery .post-gallery-img {
display: table-cell;
text-align: center;
vertical-align: middle;
border: none;
}
.post-gallery .post-gallery-img img {
max-width: 100%;
max-height: 100%;
border: none;
}
.fancybox-close, .fancybox-close:hover { border: none; }
================================================
FILE: source/css/_common/components/post/post-meta.styl
================================================
.posts-expand .post-meta {
margin: 3px 0 60px 0;
color: $grey-dark;
font-family: $font-family-posts;
font-size: 12px;
text-align: center;
.post-category-list {
display: inline-block;
margin: 0;
padding: 3px;
}
.post-category-list-link { color: $grey-dark; }
.post-description {
font-size: 14px;
margin-top: 2px;
}
}
.post-wordcount {
if !hexo-config('post_wordcount.separated_meta') { display: inline-block; }
}
.post-meta-divider {
margin: 0 .5em;
}
.post-meta-item-icon {
margin-right: 3px;
+tablet() {
display: inline-block;
}
+mobile() {
display: inline-block;
}
}
.post-meta-item-text {
+tablet() {
display: none;
}
+mobile() {
display: none;
}
}
.posts-expand .post-comments-count {
+mobile() { display: none; }
}
================================================
FILE: source/css/_common/components/post/post-nav.styl
================================================
.post-nav {
display: table;
margin-top: 15px;
width: 100%;
border-top: 1px solid $gainsboro;
}
.post-nav-divider {
display: table-cell;
width: 10%;
}
.post-nav-item {
display: table-cell;
padding: 10px 0 0 0;
width: 45%;
vertical-align: top;
a {
position: relative;
display: block;
line-height: 25px;
font-size: 14px;
color: $link-color;
border-bottom: none;
&:hover {
color: $link-hover-color;
border-bottom: none;
}
&:active { top: 2px; }
}
.fa {
position: absolute;
top: 8px;
left: 0;
font-size: 12px;
}
}
.post-nav-next {
a { padding-left: 15px; }
}
.post-nav-prev {
text-align: right;
a { padding-right: 15px; }
.fa {
right: 0;
left: auto;
}
}
================================================
FILE: source/css/_common/components/post/post-reward.styl
================================================
#rewardButton {
cursor: pointer;
border: 0;
outline: 0;
border-radius: 5px;
padding: 0;
margin: 0;
letter-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
}
#rewardButton span {
display: inline-block;
width: 80px;
height: 35px;
border-radius: 5px;
color: #fff;
font-weight: 400;
font-style: normal;
font-variant: normal;
font-stretch: normal;
font-size: 18px;
font-family: "Microsoft Yahei";
background: #F44336;
}
#rewardButton span:hover{
background: #F7877F;
}
#QR{
padding-top:20px;
}
#QR a{
border:0;
}
#QR img{
width: 180px;
max-width: 100%;
display: inline-block;
margin: 0.8em 2em 0 2em;
}
#wechat:hover p{
animation: roll 0.1s infinite linear;
-webkit-animation: roll 0.1s infinite linear;
-moz-animation: roll 0.1s infinite linear;
}
#alipay:hover p{
animation: roll 0.1s infinite linear;
-webkit-animation: roll 0.1s infinite linear;
-moz-animation: roll 0.1s infinite linear;
}
#bitcoin:hover p {
animation: roll 0.1s infinite linear;
-webkit-animation: roll 0.1s infinite linear;
-moz-animation: roll 0.1s infinite linear;
}
@keyframes roll {
from {
transform(rotateZ(30deg));
}
to {
transform(rotateZ(-30deg));
}
}
================================================
FILE: source/css/_common/components/post/post-rtl.styl
================================================
.rtl {
&.post-body {
p, a, h1, h2, h3, h4, h5, h6, li, ul, ol {
direction: rtl;
font-family: UKIJ Ekran;
}
}
&.post-title {
font-family: UKIJ Ekran;
}
}
================================================
FILE: source/css/_common/components/post/post-tags.styl
================================================
.posts-expand .post-tags {
margin-top: 40px;
text-align: center;
a {
display: inline-block;
margin-right: 10px;
font-size: 13px;
}
}
================================================
FILE: source/css/_common/components/post/post-title.styl
================================================
.posts-expand .post-title {
text-align: center;
word-break: break-word;
font-weight: $posts-expand-title-font-weight
}
.posts-expand .post-title-link {
display: inline-block;
position: relative;
color: $black-light;
border-bottom: none;
line-height: 1.2;
vertical-align: top;
&::before {
content: "";
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #000;
visibility: hidden;
transform: scaleX(0);
the-transition();
}
&:hover::before {
visibility: visible;
transform: scaleX(1);
}
.fa { font-size: 16px; }
}
================================================
FILE: source/css/_common/components/post/post-type.styl
================================================
// TODO: Refactor.
.page-home, .page-post-detail {
.post-type-quote {
.post-header,
.post-tags {
display: none;
}
blockquote {
@extend .blockquote-center
}
}
}
================================================
FILE: source/css/_common/components/post/post-widgets.styl
================================================
.post-widgets {
border-top: 1px solid #eee;
padding-top: 9px;
margin-top: 45px;
display: flex;
justify-content: center;
flex-wrap: wrap;
align-items: center;
.post-meta-divider {
height: 28px;
color: $grey-dark;
}
}
.wp_rating {
height: 20px;
margin-right: 10px;
text-align: center;
line-height: 20px;
padding-top: 6px;
}
.social-like {
font-size: 14px;
text-align: center;
display: flex;
justify-content: center;
}
.vk_like {
width: 85px;
height: 21px;
padding-top: 7px;
align-self: center;
}
.fb_like {
height: 30px;
align-self: center;
}
================================================
FILE: source/css/_common/components/post/post.styl
================================================
.post-body {
font-family: $font-family-posts;
+mobile() {
word-break: break-word;
}
}
.post-body .fancybox img {
display: block !important;
margin: 0 auto;
cursor: pointer;
cursor: zoom-in;
cursor: -webkit-zoom-in;
}
.post-body .image-caption {
margin: -20px auto 15px;
text-align: center;
font-size: $font-size-base;
color: $grey-dark;
font-weight: bold;
line-height: 1;
}
.post-body .figure .caption {
@extend .post-body .image-caption;
}
.post-sticky-flag {
display: inline-block;
font-size: 16px;
-ms-transform: rotate(30deg);
transform: rotate(30deg);
}
.use-motion {
if hexo-config('motion.transition.post_block') {
.post-block,
.pagination,
.comments { opacity: 0; }
}
if hexo-config('motion.transition.post_header') { .post-header { opacity: 0; } }
if hexo-config('motion.transition.post_body') { .post-body { opacity: 0; } }
if hexo-config('motion.transition.coll_header') { .collection-title { opacity: 0; } }
}
@import "post-expand";
@import "post-collapse";
@import "post-type";
@import "post-title";
@import "post-meta";
@import "post-button";
@import "post-tags";
@import "post-nav";
@import "post-eof";
@import "post-gallery";
@import "post-reward" if hexo-config('alipay') or hexo-config('wechatpay') or hexo-config('bitcoin');
@import "post-copyright" if hexo-config('post_copyright.enable');
@import "post-widgets" if (hexo-config('facebook_sdk.enable') and hexo-config('facebook_sdk.like_button')) or (hexo-config('vkontakte_api.enable') and hexo-config('vkontakte_api.like')) or hexo-config('rating.enable') or (hexo-config('needmoreshare2.enable') and hexo-config('needmoreshare2.postbottom.enable'));
@import "post-rtl";
================================================
FILE: source/css/_common/components/sidebar/sidebar-author-links.styl
================================================
.links-of-author {
margin-top: 20px;
}
.links-of-author a {
display: inline-block;
vertical-align: middle;
margin-right: 10px;
margin-bottom: 10px;
border-bottom-color: $black-light;
font-size: 13px;
&:before {
display: inline-block;
vertical-align: middle;
margin-right: 3px;
content: " ";
width: 4px;
height: 4px;
border-radius: 50%;
background: rgb(random-color(0, 255) - 50%, random-color(0, 255) - 50%, random-color(0, 255) - 50%);
}
}
================================================
FILE: source/css/_common/components/sidebar/sidebar-author.styl
================================================
.site-author-image {
display: block;
margin: 0 auto;
padding: $site-author-image-padding;
max-width: $site-author-image-width;
height: $site-author-image-height;
border: $site-author-image-border-width solid $site-author-image-border-color;
}
.site-author-name {
margin: $site-author-name-margin;
text-align: $site-author-name-align;
color: $site-author-name-color;
font-weight: $site-author-name-weight;
}
.site-description {
margin-top: $site-description-margin-top;
text-align: $site-description-align;
font-size: $site-description-font-size;
color: $site-description-color;
}
================================================
FILE: source/css/_common/components/sidebar/sidebar-blogroll.styl
================================================
.links-of-blogroll { font-size: 13px; }
.links-of-blogroll-title {
margin-top: 20px;
font-size: 14px;
font-weight: $font-weight-bold;
}
.links-of-blogroll-list {
margin: 0;
padding: 0;
list-style: none;
}
.links-of-blogroll-item {
padding: 2px 10px;
a {
max-width: 280px;
box-sizing: border-box;
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
================================================
FILE: source/css/_common/components/sidebar/sidebar-dimmer.styl
================================================
.sidebar-active #sidebar-dimmer {
opacity: .7;
-webkit-transform: translateX(-150%);
transform: translateX(-150%);
transition: opacity .2s;
}
#sidebar-dimmer {
display: none;
position: absolute;
top: 0;
left: 100%;
width: 200%;
height: 100%;
background: #000;
opacity: 0;
transition: opacity .2s,transform 0s .2s;
+mobile() {
display: block;
}
}
================================================
FILE: source/css/_common/components/sidebar/sidebar-feed-link.styl
================================================
.feed-link {
margin-top: 20px;
a {
display: inline-block;
padding: 0 15px;
color: rgb(252, 100, 35);
border: 1px solid rgb(252, 100, 35);
border-radius: 4px;
i {
color: rgb(252, 100, 35);
font-size: 14px;
}
&:hover {
color:white;
background: rgb(252, 100, 35);
i { color: white; }
}
}
}
================================================
FILE: source/css/_common/components/sidebar/sidebar-nav.styl
================================================
// Sidebar Navigation
.sidebar-nav {
margin: 0 0 20px;
padding-left: 0;
}
.sidebar-nav li {
display: inline-block;
cursor: pointer;
border-bottom: 1px solid transparent;
font-size: 14px;
color: $sidebar-nav-color;
&:hover { color: $sidebar-nav-hover-color; }
}
.page-post-detail .sidebar-nav-toc { padding: 0 5px; }
.page-post-detail .sidebar-nav-overview { margin-left: 10px; }
.sidebar-nav .sidebar-nav-active {
color: $sidebar-highlight;
border-bottom-color: $sidebar-highlight;
&:hover { color: $sidebar-highlight; }
}
.sidebar-panel { display: none; }
.sidebar-panel-active { display: block; }
================================================
FILE: source/css/_common/components/sidebar/sidebar-toc.styl
================================================
.post-toc-empty {
font-size: 14px;
color: $grey-dim;
}
.post-toc-wrap { overflow: hidden; }
.post-toc { overflow: auto; }
.post-toc ol {
margin: 0;
padding: 0 2px 5px 10px;
text-align: left;
list-style: none;
font-size: 14px;
& > ol { padding-left: 0; }
a {
the-transition();
transition-property: all;
color: $toc-link-color;
border-bottom-color: $toc-link-border-color;
&:hover {
color: $toc-link-hover-color;
border-bottom-color: $toc-link-hover-border-color;
}
}
}
.post-toc .nav-item {
overflow: hidden;
text-overflow: ellipsis;
text-align: justify;
white-space: nowrap if !hexo-config('toc.wrap');
line-height: 1.8;
}
.post-toc .nav .nav-child { display: none; }
.post-toc .nav .active > .nav-child { display: block; }
.post-toc .nav .active-current > .nav-child {
display: block;
& > .nav-item { display: block; }
}
.post-toc .nav .active > a {
color: $toc-link-active-color;
border-bottom-color: $toc-link-active-border-color;
}
.post-toc .nav .active-current > a {
color: $toc-link-active-current-color;
&:hover {
color: $toc-link-active-current-border-color;
}
}
================================================
FILE: source/css/_common/components/sidebar/sidebar-toggle.styl
================================================
.sidebar-toggle {
position: fixed;
right: $b2t-position-right;
bottom: 45px;
width: 14px;
height: 14px;
padding: 5px;
background: $black-deep;
line-height: 0;
z-index: $zindex-5;
cursor: pointer;
-webkit-transform: translateZ(0);
+tablet() {
fixbutton() if hexo-config('sidebar.onmobile');
hide() if not hexo-config('sidebar.onmobile');
}
+mobile() {
fixbutton() if hexo-config('sidebar.onmobile');
hide() if not hexo-config('sidebar.onmobile');
}
}
.sidebar-toggle-line {
position: relative;
display: inline-block;
vertical-align: top;
height: 2px;
width: 100%;
background: white;
margin-top: 3px;
&:first-child { margin-top: 0; }
}
================================================
FILE: source/css/_common/components/sidebar/sidebar.styl
================================================
.sidebar {
position: fixed;
right: 0;
top: 0;
bottom: 0;
width: 0;
z-index: $zindex-4;
box-shadow: inset 0 2px 6px black;
background: $black-deep;
-webkit-transform: translateZ(0); // http://stackoverflow.com/questions/17079857/position-fixed-broken-in-chrome-with-flash-behind
a {
color: $grey-dark;
border-bottom-color: $black-light;
&:hover { color: $gainsboro; }
}
+tablet() {
hide() if not hexo-config('sidebar.onmobile');
}
+mobile() {
hide() if not hexo-config('sidebar.onmobile');
}
}
.sidebar-inner {
position: relative;
padding: 20px 10px;
color: $grey-dark;
text-align: center;
}
.site-overview-wrap {
overflow: hidden;
}
.site-overview {
overflow-y: auto;
overflow-x: hidden;
}
@import "sidebar-toggle";
@import "sidebar-author";
@import "site-state";
@import "sidebar-feed-link";
@import "sidebar-author-links";
@import "sidebar-blogroll";
@import "sidebar-nav";
@import "sidebar-toc";
@import "sidebar-dimmer" if hexo-config('sidebar.onmobile');
================================================
FILE: source/css/_common/components/sidebar/site-state.styl
================================================
.site-state {
overflow: hidden;
line-height: 1.4;
white-space: nowrap;
text-align: $site-state-align;
}
.site-state-item {
display: inline-block;
padding: 0 15px;
border-left: 1px solid $site-state-item-border-color;
&:first-child { border-left: none; }
a { border-bottom: none; }
}
.site-state-item-count {
display: block;
text-align: center;
color: $site-state-item-count-color;
font-weight: $font-weight-bold;
font-size: $site-state-item-count-font-size;
}
.site-state-item-name {
font-size: $site-state-item-name-font-size;
color: $site-state-item-name-color;
}
================================================
FILE: source/css/_common/components/tag-cloud.styl
================================================
.tag-cloud {
text-align: center;
a {
display: inline-block;
margin: 10px;
}
}
================================================
FILE: source/css/_common/components/tags/blockquote-center.styl
================================================
// Blockquote with all children centered.
.blockquote-center {
position: relative;
margin: 40px 0;
padding: 0;
border-left: none;
text-align: center;
&::before, &::after {
position: absolute;
content: ' ';
display: block;
width: 100%;
height: 24px;
opacity: 0.2;
background-repeat: no-repeat;
background-position: 0 -6px;
background-size: 22px 22px;
}
&::before {
top: -20px;
background-image: url($center-quote-left);
border-top: 1px solid $grey-light;
}
&::after {
bottom: -20px;
background-image: url($center-quote-right);
border-bottom: 1px solid $grey-light;
background-position: 100% 8px;
}
p, div { text-align: center; }
}
================================================
FILE: source/css/_common/components/tags/exturl.styl
================================================
.exturl {
// Remove the gray background color from active links in IE 10.
background-color: transparent;
cursor: pointer;
border-bottom: 1px solid #999;
.fa {
font-size: 14px;
}
}
// Improve readability when focused and also mouse hovered in all browsers.
.exturl:active, .exturl:hover {
outline: 0;
color: $black-deep;
border-bottom-color: $black-deep;
}
================================================
FILE: source/css/_common/components/tags/full-image.styl
================================================
// Expand image to 126% with nagative margin-left/right on Desktop.
.full-image.full-image.full-image.full-image {
border: none;
max-width: 100%;
width: auto;
margin: 20px auto 25px;
+desktop() {
max-width: none;
width: $full-image-width;
margin: $full-image-margin-vertical $full-image-margin-horizontal;
}
}
================================================
FILE: source/css/_common/components/tags/group-pictures.styl
================================================
.post .post-body .group-picture {
img {
box-sizing: border-box;
padding: 0 3px;
border: none;
}
}
.post .group-picture-row {
overflow: hidden;
margin-top: 6px;
&:first-child { margin-top: 0; }
}
.post .group-picture-column { float: left; }
.page-post-detail .post-body .group-picture-column {
float: none;
margin-top: 10px;
width: auto !important;
img { margin: 0 auto; }
}
.page-archive {
.group-picture-container { overflow: hidden; }
.group-picture-row {
float: left;
&:first-child { margin-top: 6px; }
}
.group-picture-column {
max-width: 150px;
max-height: 150px;
}
}
================================================
FILE: source/css/_common/components/tags/label.styl
================================================
.post-body .label {
display: inline;
padding: 0 2px;
white-space: nowrap;
&.default { background-color: $label-default; }
&.primary { background-color: $label-primary; }
&.info { background-color: $label-info; }
&.success { background-color: $label-success; }
&.warning { background-color: $label-warning; }
&.danger { background-color: $label-danger; }
}
================================================
FILE: source/css/_common/components/tags/note-modern.styl
================================================
.post-body .note {
note_icons = hexo-config('note.icons');
position: relative;
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
background-color: $whitesmoke;
border-radius: unit(hexo-config('note.border_radius'), px) if hexo-config('note.border_radius') is a 'unit';
h2, h3, h4, h5, h6 {
if note_icons {
margin-top: 3px;
} else {
margin-top: 0;
}
margin-bottom: 0;
border-bottom: initial;
padding-top: 0 !important;
}
p, ul, ol, table, pre, blockquote {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
if note_icons {
&:not(.no-icon) {
padding-left: 45px;
&:before {
position: absolute;
font-family: 'FontAwesome';
font-size: larger;
top: 13px;
left: 15px;
}
}
}
&.default {
background-color: $note-modern-default-bg;
border-color: $note-modern-default-border;
color: $note-modern-default-text;
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-default-icon;
}
}
}
a {
&:not(.btn) {
color: $note-modern-default-text;
border-bottom: 1px solid $note-modern-default-text;
&:hover {
color: $note-modern-default-hover;
border-bottom: 1px solid $note-modern-default-hover;
}
}
}
}
&.primary {
background-color: $note-modern-primary-bg;
border-color: $note-modern-primary-border;
color: $note-modern-primary-text;
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-primary-icon;
}
}
}
a {
&:not(.btn) {
color: $note-modern-primary-text;
border-bottom: 1px solid $note-modern-primary-text;
&:hover {
color: $note-modern-primary-hover;
border-bottom: 1px solid $note-modern-primary-hover;
}
}
}
}
&.info {
background-color: $note-modern-info-bg;
border-color: $note-modern-info-border;
color: $note-modern-info-text;
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-info-icon;
}
}
}
a {
&:not(.btn) {
color: $note-modern-info-text;
border-bottom: 1px solid $note-modern-info-text;
&:hover {
color: $note-modern-info-hover;
border-bottom: 1px solid $note-modern-info-hover;
}
}
}
}
&.success {
background-color: $note-modern-success-bg;
border-color: $note-modern-success-border;
color: $note-modern-success-text;
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-success-icon;
}
}
}
a {
&:not(.btn) {
color: $note-modern-success-text;
border-bottom: 1px solid $note-modern-success-text;
&:hover {
color: $note-modern-success-hover;
border-bottom: 1px solid $note-modern-success-hover;
}
}
}
}
&.warning {
background-color: $note-modern-warning-bg;
border-color: $note-modern-warning-border;
color: $note-modern-warning-text;
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-warning-icon;
}
}
}
a {
&:not(.btn) {
color: $note-modern-warning-text;
border-bottom: 1px solid $note-modern-warning-text;
&:hover {
color: $note-modern-warning-hover;
border-bottom: 1px solid $note-modern-warning-hover;
}
}
}
}
&.danger {
background-color: $note-modern-danger-bg;
border-color: $note-modern-danger-border;
color: $note-modern-danger-text;
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-danger-icon;
}
}
}
a {
&:not(.btn) {
color: $note-modern-danger-text;
border-bottom: 1px solid $note-modern-danger-text;
&:hover {
color: $note-modern-danger-hover;
border-bottom: 1px solid $note-modern-danger-hover;
}
}
}
}
}
================================================
FILE: source/css/_common/components/tags/note.styl
================================================
.post-body .note {
note_style = hexo-config('note.style');
note_icons = hexo-config('note.icons');
position: relative;
padding: 15px;
margin-bottom: 20px;
if note_style == 'simple' {
border: 1px solid $gainsboro;
border-left-width: 5px;
}
if note_style == 'flat' {
border: initial;
border-left: 3px solid $gainsboro;
background-color: lighten($gainsboro, 65%);
}
border-radius: unit(hexo-config('note.border_radius'), px) if hexo-config('note.border_radius') is a 'unit';
h2, h3, h4, h5, h6 {
if note_icons {
margin-top: 3px;
} else {
margin-top: 0;
}
margin-bottom: 0;
border-bottom: initial;
padding-top: 0 !important;
}
p, ul, ol, table, pre, blockquote {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
if note_icons {
&:not(.no-icon) {
padding-left: 45px;
&:before {
position: absolute;
font-family: 'FontAwesome';
font-size: larger;
top: 13px;
left: 15px;
}
}
}
&.default {
if note_style == 'flat' {
background-color: $note-default-bg;
}
border-left-color: $note-default-border;
h2, h3, h4, h5, h6 {
color: $note-default-text;
}
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-default-icon;
color : $note-default-text;
}
}
}
}
&.primary {
if note_style == 'flat' {
background-color: $note-primary-bg;
}
border-left-color: $note-primary-border;
h2, h3, h4, h5, h6 {
color: $note-primary-text;
}
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-primary-icon;
color : $note-primary-text;
}
}
}
}
&.info {
if note_style == 'flat' {
background-color: $note-info-bg;
}
border-left-color: $note-info-border;
h2, h3, h4, h5, h6 {
color: $note-info-text;
}
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-info-icon;
color : $note-info-text;
}
}
}
}
&.success {
if note_style == 'flat' {
background-color: $note-success-bg;
}
border-left-color: $note-success-border;
h2, h3, h4, h5, h6 {
color: $note-success-text;
}
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-success-icon;
color : $note-success-text;
}
}
}
}
&.warning {
if note_style == 'flat' {
background-color: $note-warning-bg;
}
border-left-color: $note-warning-border;
h2, h3, h4, h5, h6 {
color: $note-warning-text;
}
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-warning-icon;
color : $note-warning-text;
}
}
}
}
&.danger {
if note_style == 'flat' {
background-color: $note-danger-bg;
}
border-left-color: $note-danger-border;
h2, h3, h4, h5, h6 {
color: $note-danger-text;
}
if note_icons {
&:not(.no-icon) {
&:before {
content: $note-danger-icon;
color : $note-danger-text;
}
}
}
}
}
================================================
FILE: source/css/_common/components/tags/tabs.styl
================================================
.post-body .tabs {
position: relative;
display: block;
margin-bottom: 20px;
padding-top: 10px;
// Read tabs border_radius from NexT config and set in "tbr px" to use it as string variable in this CSS section.
hexo-config('tabs.border_radius') is a 'unit' ? (tbr = unit(hexo-config('tabs.border_radius'), px)) : (tbr = 0)
ul.nav-tabs {
margin: 0;
padding: 0;
display: flex;
margin-bottom: -1px;
+mobile-smallest() {
display: block;
margin-bottom: 5px;
}
li.tab {
list-style-type: none !important;
margin: 0 .25em 0 0;
border-top: 3px solid transparent;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
+mobile-smallest() {
margin: initial;
border-top: 1px solid transparent;
border-left: 3px solid transparent;
border-right: 1px solid transparent;
border-bottom: 1px solid transparent;
}
if tbr > 0 {
border-radius: tbr tbr 0 0;
+mobile-smallest() { border-radius: tbr; }
}
if hexo-config('tabs.transition.tabs') { the-transition-ease-out(); }
& a {
outline: 0;
border-bottom: initial;
display: block;
line-height: 1.8em;
padding: .25em .75em;
& i { width: (18em / 14); }
if hexo-config('tabs.transition.labels') { the-transition-ease-out(); }
}
&.active {
border-top: 3px solid $orange;
border-left: 1px solid $table-border-color;
border-right: 1px solid $table-border-color;
background-color: #fff;
+mobile-smallest() {
border-top: 1px solid $table-border-color;
border-left: 3px solid $orange;
border-right: 1px solid $table-border-color;
border-bottom: 1px solid $table-border-color;
}
& a {
cursor: default;
color: $link-color;
}
}
}
}
.tab-content {
background-color: #fff;
.tab-pane {
border: 1px solid $table-border-color;
padding: 20px 20px 0 20px;
if tbr > 0 { border-radius: tbr; }
&:not(.active) {
hide();
}
&.active {
show();
if tbr > 0 {
&:nth-of-type(1) {
border-radius: 0 tbr tbr tbr;
+mobile-smallest() { border-radius: tbr; }
}
}
}
}
}
}
================================================
FILE: source/css/_common/components/tags/tags.styl
================================================
@import "full-image";
@import "blockquote-center";
@import "group-pictures";
@import "exturl" if hexo-config('exturl');
@import "note" if hexo-config('note.style') == 'simple' || hexo-config('note.style') == 'flat';
@import "note-modern" if hexo-config('note.style') == 'modern';
@import "label" if hexo-config('label');
@import "tabs" if hexo-config('tabs.enable');
================================================
FILE: source/css/_common/components/third-party/algolia-search.styl
================================================
.algolia-pop-overlay
position: fixed
width: 100%
height: 100%
top: 0
left: 0
z-index: 2080
background-color: rgba(0, 0, 0, 0.3)
.algolia-popup
overflow: hidden
padding: 0
display: none
position: fixed
top: 10%
left: 50%
width: 700px
height: 80%
margin-left: -350px
background: #fff
color: #333
z-index: 9999
border-radius: 5px
+mobile()
padding: 0
top: 0
left: 0
margin: 0
width: 100%
height: 100%
border-radius: 0
.popup-btn-close
position: absolute
right: 14px
color: #4EBD79
font-size: 14px
font-weight: bold
text-transform: uppercase
cursor: pointer
padding-left: 15px
border-left: 1px solid #eee
top: 10px
.fa
color: $grey-dark
font-size: 18px
&:hover .fa
color: $black-deep
.algolia-search
padding: 10px 15px 5px
max-height: 50px
border-bottom: 1px solid #ccc
background: $whitesmoke
border-top-left-radius: 5px
border-top-right-radius: 5px
.algolia-search-input-icon
display: inline-block
width: 20px
.fa
font-size: 18px
.algolia-search-input
display: inline-block
width: calc(90% - 20px)
input
padding: 5px 0
width: 100%
outline: none
border: none
background: transparent
.algolia-powered
float: right
img
display: inline-block
height: 18px
vertical-align: middle
.algolia-results
position: relative
overflow: auto
padding: 10px 30px
height: calc(100% - 50px)
hr
margin: 10px 0
.highlight
font-style: normal
margin: 0
padding: 0 2px
font-size: inherit
color: red
.algolia-hits
margin-top: 20px
.algolia-hit-item
margin: 15px 0
.algolia-hit-item-link
display: block
border-bottom: 1px dashed #ccc
the-transition()
.algolia-pagination
.pagination
margin-top: 40px
border-top: none
padding: 0
.pagination-item
display: inline-block
.page-number
border-top: none
&:hover
border-bottom: 1px solid $black-deep
.current .page-number
@extend .pagination .page-number.current
.disabled-item
visibility: hidden
================================================
FILE: source/css/_common/components/third-party/baidushare.styl
================================================
.post-spread {
margin-top: 20px;
text-align: center;
}
.bdshare-slide-button-box a { border: none; }
.bdsharebuttonbox {
display: inline-block;
a { border: none; }
}
================================================
FILE: source/css/_common/components/third-party/busuanzi-counter.styl
================================================
if hexo-config("scheme") == Pisces
.busuanzi-count {
+tablet() {
width: auto;
}
+mobile() {
width: auto;
}
}
.site-uv,
.site-pv,
.page-pv {
display: inline-block;
.busuanzi-value {
margin: 0 5px;
}
}
if hexo-config("busuanzi_count.site_pv") and hexo-config("busuanzi_count.site_uv")
.site-uv
{
margin-right: 10px;
&::after {
content: "|";
padding-left: 10px;
}
}
================================================
FILE: source/css/_common/components/third-party/duoshuo.styl
================================================
.theme-next {
$duoshuoBaseBorderColor = #c7d4e1;
$duoshuoBaseBgColor = #f6f8fa;
#ds-thread #ds-reset {
color: #555;
}
#ds-thread #ds-reset .ds-replybox {
margin-bottom: 30px;
}
#ds-thread #ds-reset .ds-replybox .ds-avatar, #ds-reset .ds-avatar img {
box-shadow: none;
}
#ds-thread #ds-reset .ds-textarea-wrapper {
border-color: $duoshuoBaseBorderColor;
background: none;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
}
#ds-thread #ds-reset .ds-textarea-wrapper textarea {
height: 60px;
}
#ds-reset .ds-rounded-top {
border-radius: 0;
}
#ds-thread #ds-reset .ds-post-toolbar {
box-sizing: border-box;
border: 1px solid $duoshuoBaseBorderColor;
background: $duoshuoBaseBgColor;
}
#ds-thread #ds-reset .ds-post-options {
height: 40px;
border: none;
background: none;
}
#ds-thread #ds-reset .ds-toolbar-buttons {
top: 11px;
}
#ds-thread #ds-reset .ds-sync {
top: 5px;
}
#ds-thread #ds-reset .ds-post-button {
top: 4px;
right: 5px;
width: 90px;
height: 30px;
border: 1px solid #c5ced7;
border-radius: 3px;
background-image: linear-gradient(#fbfbfc, #f5f7f9);
color: #60676d;
}
#ds-thread #ds-reset .ds-post-button:hover {
background-position: 0 -30px;
color: #60676d;
}
#ds-thread #ds-reset .ds-comments-info {
padding: 10px 0;
}
#ds-thread #ds-reset .ds-sort {
display: none;
}
#ds-thread #ds-reset li.ds-tab a.ds-current {
border: none;
background: $duoshuoBaseBgColor;
color: #60676d;
&:hover {
background-color: #e9f0f7;
color: #60676d;
}
}
#ds-thread #ds-reset li.ds-tab a {
border-radius: 2px;
padding: 5px;
}
#ds-thread #ds-reset .ds-login-buttons p {
color: #999;
line-height: 36px;
}
#ds-thread #ds-reset .ds-login-buttons .ds-service-list li {
height: 28px;
}
#ds-thread #ds-reset .ds-service-list a {
background: none;
padding: 5px;
border: 1px solid;
border-radius: 3px;
text-align: center;
&:hover {
color: #fff;
background: #666;
}
}
#ds-thread #ds-reset .ds-service-list .ds-weibo {
color: #fc9b00;
border-color: #fc9b00;
&:hover {
background: #fc9b00;
}
}
#ds-thread #ds-reset .ds-service-list .ds-qq {
color: #60a3ec;
border-color: #60a3ec;
&:hover {
background: #60a3ec;
}
}
#ds-thread #ds-reset .ds-service-list .ds-renren {
color: #2e7ac4;
border-color: #2e7ac4;
&:hover {
background: #2e7ac4;
}
}
#ds-thread #ds-reset .ds-service-list .ds-douban {
color: #37994c;
border-color: #37994c;
&:hover {
background: #37994c;
}
}
#ds-thread #ds-reset .ds-service-list .ds-kaixin {
color: #fef20d;
border-color: #fef20d;
&:hover {
background: #fef20d;
}
}
#ds-thread #ds-reset .ds-service-list .ds-netease {
color: #f00;
border-color: #f00;
&:hover {
background: #f00;
}
}
#ds-thread #ds-reset .ds-service-list .ds-sohu {
color: #ffcb05;
border-color: #ffcb05;
&:hover {
background: #ffcb05;
}
}
#ds-thread #ds-reset .ds-service-list .ds-baidu {
color: #2831e0;
border-color: #2831e0;
&:hover {
background: #2831e0;
}
}
#ds-thread #ds-reset .ds-service-list .ds-google {
color: #166bec;
border-color: #166bec;
&:hover {
background: #166bec;
}
}
#ds-thread #ds-reset .ds-service-list .ds-weixin {
color: #00CE0D;
border-color: #00CE0D;
&:hover {
background: #00CE0D;
}
}
#ds-thread #ds-reset .ds-service-list .ds-more-services {
border: none;
&:hover {
background: none;
}
}
/*duoshuo UA style begin*/
#ds-reset .duoshuo-ua-admin {
display: inline-block;
color: red;
}
#ds-reset .duoshuo-ua-platform,
#ds-reset .duoshuo-ua-browser {
color: #ccc;
.fa {
display: inline-block;
margin-right: 3px;
}
}
#ds-reset .duoshuo-ua-separator {
display: inline-block;
margin-left: 5px;
}
.this_ua {
background-color: #ccc !important;
border-radius: 4px;
padding: 0 5px !important;
margin: 1px 1px !important;
border: 1px solid #BBB !important;
color: #fff;
display: inline-block !important;
}
.this_ua.admin {
background-color: #d9534f !important;
border-color: #d9534f !important;
}
.this_ua.platform.iOS, .this_ua.platform.Mac, .this_ua.platform.Windows {
background-color: #39b3d7 !important;
border-color: #46b8da !important;
}
.this_ua.platform.Linux {
background-color: #3A3A3A !important;
border-color: #1F1F1F !important;
}
.this_ua.platform.Android {
background-color: #00C47D !important;
border-color: #01B171 !important;
}
.this_ua.browser.Mobile, .this_ua.browser.Chrome {
background-color: #5cb85c !important;
border-color: #4cae4c !important;
}
.this_ua.browser.Firefox {
background-color: #f0ad4e !important;
border-color: #eea236 !important;
}
.this_ua.browser.Maxthon, .this_ua.browser.IE {
background-color: #428bca !important;
border-color: #357ebd !important;
}
.this_ua.browser.baidu, .this_ua.browser.UCBrowser, .this_ua.browser.Opera {
background-color: #d9534f !important;
border-color: #d43f3a !important;
}
.this_ua.browser.Android, .this_ua.browser.QQBrowser {
background-color: #78ACE9 !important;
border-color: #4cae4c !important;
}
/*duoshuo UA style end*/
}
================================================
FILE: source/css/_common/components/third-party/gitment.styl
================================================
#gitment-display-button{
display: inline-block;
padding: 0 15px;
color: #0a9caf;
cursor: pointer;
font-size: 14px;
border: 1px solid #0a9caf;
border-radius: 4px;
}
#gitment-display-button:hover{
color: #fff;
background: #0a9caf;
}
================================================
FILE: source/css/_common/components/third-party/han.styl
================================================
.fa {
font-family: FontAwesome!important;
}
================================================
FILE: source/css/_common/components/third-party/jiathis.styl
================================================
.post-spread {
margin-top: 20px;
text-align: center;
}
.jiathis_style {
display: inline-block;
a { border: none; }
}
================================================
FILE: source/css/_common/components/third-party/localsearch.styl
================================================
.local-search-pop-overlay
position: fixed
width: 100%
height: 100%
top: 0
left: 0
z-index: 2080
background-color: rgba(0, 0, 0, 0.3)
.local-search-popup
display: none
position: fixed
top: 10%
left: 50%
margin-left: -350px
width: 700px
height: 80%
padding: 0
background: #fff
color: #333
z-index: 9999
border-radius: 5px
+mobile()
padding: 0
top: 0
left: 0
margin: 0
width: 100%
height: 100%
border-radius: 0
ul.search-result-list
padding: 0
margin: 0 5px
p.search-result
border-bottom: 1px dashed #ccc
padding: 5px 0
a.search-result-title
font-weight: bold
font-size: 16px
.search-keyword
border-bottom: 1px dashed #f00
font-weight: bold
color: #f00
.local-search-header
padding: 5px
height: 36px
background: #f5f5f5
border-top-left-radius: 5px
border-top-right-radius: 5px
#local-search-result
overflow: auto
position: relative
padding: 5px 25px
height: calc(100% - 55px)
.local-search-input-wrapper
display: inline-block
width: calc(100% - 90px)
height: 36px
line-height: 36px
padding: 0 5px
.local-search-input-wrapper input
padding: 8px 0
height: 20px
display: block
width: 100%
outline: none
border: none
background: transparent
vertical-align: middle
.search-icon, .popup-btn-close
display: inline-block
font-size: 18px
color: #999
height: 36px
width: 18px
padding-left: 10px
padding-right: 10px
.search-icon
float: left
.popup-btn-close
border-left: 1px solid #eee
float: right
cursor: pointer
#no-result
position: absolute
left: 50%
top: 50%
-webkit-transform: translate(-50%, -50%)
transform: translate(-50%, -50%)
color: #ccc
================================================
FILE: source/css/_common/components/third-party/needsharebutton.styl
================================================
#needsharebutton-postbottom {
position: relative;
cursor: pointer;
height: 26px;
.btn {
display: initial;
padding: 1px 4px;
border: 1px solid $btn-default-border-color;
border-radius: 3px;
}
}
#needsharebutton-float {
position: fixed;
bottom: 38px;
left: -8px;
z-index: 9999;
cursor: pointer;
.btn {
//display: initial;
padding: 0 10px 0 14px
border: 1px solid $btn-default-border-color;
border-radius: 4px;
}
}
================================================
FILE: source/css/_common/components/third-party/third-party.styl
================================================
@import "duoshuo";
@import "gitment" if hexo-config('gitment.enable');
@import "jiathis";
@import "han";
@import "baidushare";
@import "localsearch";
@import "busuanzi-counter";
@import "algolia-search" if hexo-config('algolia_search.enable');
@import "needsharebutton" if hexo-config('needmoreshare2.enable');
================================================
FILE: source/css/_common/outline/outline.styl
================================================
//
// Layout
// Note: Must name this file "outline" instead of "layout"
// Or Hexo will use it as template layout.
// =================================================
html, body { height: 100%; }
.container {
position: relative;
min-height: 100%;
}
// Header Section
// --------------------------------------------------
.header-inner {
margin: 0 auto;
padding: 100px 0 70px;
width: $content-desktop;
+desktop-large() {
.container & { width: $content-desktop-large; }
}
}
// Main Section
// --------------------------------------------------
.main { padding-bottom: $footer-height + $gap-between-main-and-footer; }
.main-inner {
margin: 0 auto;
width: $content-desktop;
+desktop-large() {
.container & { width: $content-desktop-large; }
}
}
// Footer Section
// --------------------------------------------------
.footer {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
min-height: $footer-height;
}
.footer-inner {
box-sizing: border-box;
margin: 20px auto;
width: $content-desktop;
+desktop-large() {
.container & { width: $content-desktop-large; }
}
}
================================================
FILE: source/css/_common/scaffolding/base.styl
================================================
::selection {
background: $selection-bg;
color: $selection-color;
}
body {
position: relative; // Required by scrollspy
font-family: $font-family-base;
font-size: $font-size-base;
line-height: $line-height-base;
color: $text-color;
background: $body-bg-color;
+mobile() { padding-right: 0 !important; }
+tablet() { padding-right: 0 !important; }
+desktop-large() { font-size: $font-size-large; }
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
padding: 0;
font-weight: bold;
line-height: 1.5;
font-family: $font-family-headings;
}
h2, h3, h4, h5, h6 { margin: 20px 0 15px; }
for headline in (1..6) {
h{headline} {
font-size: $font-size-headings-base - $font-size-headings-step * headline;
}
+mobile() {
h{headline} {
font-size: $font-size-headings-base - $font-size-headings-step * headline - 4px;
}
}
}
p { margin: 0 0 20px 0; }
a {
color: $link-color;
text-decoration: none;
outline: none;
border-bottom: 1px solid $grey-dark;
word-wrap: break-word;
&:hover {
color: $link-hover-color;
border-bottom-color: $link-decoration-hover-color;
}
}
blockquote {
margin: 0;
padding: 0;
}
img {
display: block;
margin: auto;
max-width: 100%;
height: auto;
}
hr {
margin: 40px 0;
height: 3px;
border: none;
background-color: $gray-lighter;
background-image: repeating-linear-gradient(
-45deg,
white,
white 4px,
transparent 4px,
transparent 8px
);
}
blockquote {
padding: 0 15px;
color: $grey-dim;
border-left: 4px solid $gray-lighter;
cite::before {
content: "-";
padding: 0 5px;
}
}
dt { font-weight: $font-weight-bolder; }
dd {
margin: 0;
padding: 0;
}
kbd {
border: 1px solid $grey-light;
border-radius: 0.2em;
box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1);
background-color: #f9f9f9;
font-family: inherit;
background-image: -webkit-linear-gradient(top, #eee, white, #eee);
padding: 0.1em 0.3em;
white-space: nowrap;
}
================================================
FILE: source/css/_common/scaffolding/helpers.styl
================================================
//
// Helpers
// =================================================
// Alignment
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }
.text-nowrap { white-space: nowrap; }
// Transformation
.text-lowercase { text-transform: lowercase; }
.text-uppercase { text-transform: uppercase; }
.text-capitalize { text-transform: capitalize; }
// Center-align a block level element.
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
// Clearfix. http://nicolasgallagher.com/micro-clearfix-hack/
.clearfix {
clearfix();
}
.pullquote {
width: 45%;
&.left {
float: left;
margin-left: 5px;
margin-right: 10px;
}
&.right {
float: right;
margin-left: 10px;
margin-right: 5px;
}
}
.affix.affix.affix { position: fixed; }
.translation {
margin-top: -20px;
font-size: 14px;
color: $grey-dark;
}
// https://davidwalsh.name/detect-scrollbar-width
.scrollbar-measure {
width: 100px;
height: 100px;
overflow: scroll;
position: absolute;
top: -9999px;
}
.use-motion .motion-element { opacity: 0; }
================================================
FILE: source/css/_common/scaffolding/mobile.styl
================================================
/*
// > 1600px
+desktop-large() {
}
// > 992px
+desktop() {
}
// > 768px & < 991px
+tablet() {
}
// < 767px
+mobile() {
}
*/
// < 567px
+mobile-small() {
// For Muse & Mist schemes only vertical economy.
.header-inner {
margin-bottom: initial !important;
}
.main-inner {
margin-top: initial !important;
}
// For Pisces & Gemini schemes only wider width (remove main blocks in Gemini).
.content-wrap {
padding: initial !important;
}
// For all schemes wider width.
.posts-expand {
padding-top: $content-mobile-padding !important;
// For Muse & Mist & Pisces schemes only wider width.
margin: initial !important;
.post-header {
padding: 0 18px;
}
.post-meta {
margin: 3px 0 10px 0 !important;
}
}
.post-block {
// Inside posts blocks content padding (default 40px).
padding: $content-mobile-padding 0 !important;
}
.post-body {
// For headers narrow width.
h2, h3, h4, h5, h6 {
margin: 10px 18px 8px;
}
// Rewrite paddings & margins inside tags.
.note, .tabs .tab-content .tab-pane {
h2, h3, h4, h5, h6 {
margin: 0 5px;
}
}
// For paragraphs narrow width.
p {
margin: 0 0 10px 0;
padding: 0 18px;
}
// Rewrite paddings & margins inside tags.
.note > p, .tabs .tab-content .tab-pane > p {
padding: 0 5px;
}
.video-container .fluid-vids {
margin-bottom: 10px !important;
}
.note {
padding: 10px !important;
margin-bottom: 10px !important;
if hexo-config('note.icons') {
&:not(.no-icon) {
padding-left: 35px !important;
&:before {
top: 8px !important;
left: 12px !important;
}
}
}
}
.tabs .tab-content .tab-pane {
padding: 10px 10px 0 10px !important;
}
}
// Need to refactor into flex.
.post-nav {
padding-bottom: 2px;
//padding: 2px 8px;
}
}
/*
// < 413px
+mobile-smallest() {
}
*/
================================================
FILE: source/css/_common/scaffolding/normalize.styl
================================================
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
================================================
FILE: source/css/_common/scaffolding/scaffolding.styl
================================================
//
// Scaffolding
// =================================================
@import "normalize";
@import "base";
@import "helpers";
@import "tables";
@import "mobile" if hexo-config('mobile_layout_economy');
================================================
FILE: source/css/_common/scaffolding/tables.styl
================================================
table {
margin: 20px 0;
width: $table-width;
border-collapse: collapse;
border-spacing: 0;
border: 1px solid $table-border-color;
font-size: $table-font-size;
table-layout: fixed;
word-wrap: break-all;
}
table>tbody>tr {
&:nth-of-type(odd) { background-color: $table-row-odd-bg-color; }
&:hover { background-color: $table-row-hover-bg-color; }
}
caption, th, td {
padding: $table-cell-padding;
text-align: $table-content-alignment;
vertical-align: $table-content-vertical;
font-weight: normal;
}
th, td {
border-bottom: 3px solid $table-cell-border-bottom-color;
border-right: 1px solid $table-cell-border-right-color;
}
th {
padding-bottom: 10px;
font-weight: $table-th-font-weight;
}
td { border-bottom-width: 1px; }
================================================
FILE: source/css/_custom/custom.styl
================================================
// Custom styles.
================================================
FILE: source/css/_mixins/Gemini.styl
================================================
@import "Pisces.styl";
================================================
FILE: source/css/_mixins/Mist.styl
================================================
================================================
FILE: source/css/_mixins/Muse.styl
================================================
================================================
FILE: source/css/_mixins/Pisces.styl
================================================
sidebar-inline-links-item() {
margin: 5px 0 0;
if !hexo-config('social_icons.icons_only') { width: 50%; }
& a {
max-width: 216px;
box-sizing: border-box;
display: inline-block;
margin-right: 0;
margin-bottom: 0;
padding: 0 5px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
if hexo-config('social_icons.transition') { the-transition(); }
}
}
================================================
FILE: source/css/_mixins/base.styl
================================================
the-transition() {
transition-duration: 0.2s;
transition-timing-function: ease-in-out;
transition-delay: 0s;
}
the-transition-ease-in() {
transition-duration: 0.2s;
transition-timing-function: ease-in;
transition-delay: 0s;
}
the-transition-ease-out() {
transition-duration: 0.2s;
transition-timing-function: ease-out;
transition-delay: 0s;
}
mobile-smallest() {
@media (max-width: 413px) {
{block}
}
}
mobile-small() {
@media (max-width: 567px) {
{block}
}
}
mobile() {
@media (max-width: 767px) {
{block}
}
}
tablet() {
@media (min-width: 768px) and (max-width: 991px) {
{block}
}
}
desktop() {
@media (min-width: 992px) {
{block}
}
}
desktop-large() {
@media (min-width: 1600px) {
{block}
}
}
circle() {
border-radius: 50%;
}
transform() {
-webkit-transform: arguments
-moz-transform: arguments
-ms-transform: arguments
-o-transform: arguments
transform: arguments
}
hide() {
display: none !important;
}
show() {
display: block !important;
}
fixbutton() {
right: 20px;
opacity: 0.8;
}
random-color($min, $max) {
return floor(math(0, 'random') * ($max - $min + 1) + $min);
}
// Clearfix. http://nicolasgallagher.com/micro-clearfix-hack/
clearfix() {
&:before,
&:after {
content: " ";
display: table;
}
&:after { clear: both; }
}
================================================
FILE: source/css/_mixins/custom.styl
================================================
================================================
FILE: source/css/_schemes/Gemini/index.styl
================================================
@import "../Pisces/_layout";
@import "../Pisces/_brand";
@import "../Pisces/_menu";
@import "../Pisces/_sidebar";
// Import _posts if want to justify text-align on mobile.
//@import "../Pisces/_posts";
// =================================================
// Rewrite _layout.styl
// =================================================
// Sidebar padding used as main desktop content padding for sidebar padding and post blocks padding too.
// In main NexT config set `sidebar: offset: 12` option as main padding.
// In `source/css/_variables/Gemini.styl` there are variables for other resolutions:
// $content-tablet-paddin = 10px;
// $content-mobile-padding = 8px;
// P.S. If u want to change this paddings u may set this variables into `source/css/_variables/custom.styl`.
// So, it will 12px in Desktop, 10px in Tablets and 8px in Mobiles for all possible paddings.
// =================================================
// Read values from NexT config and set they as local variables to use as string variables (in any CSS section).
hexo-config('sidebar.offset') is a 'unit' ? (sboffset = unit(hexo-config('sidebar.offset'), px)) : (sboffset = 0)
use_seo = hexo-config('seo');
// =================================================
// Desktop layout styles.
// =================================================
// Post blocks.
.content-wrap {
padding: initial;
background: initial;
box-shadow: initial;
border-radius: initial;
}
// Post & Comments blocks.
.post-block {
padding: $content-desktop-padding;
background: white;
box-shadow: $box-shadow-inner;
border-radius: $border-radius-inner;
}
// When blocks are siblings (homepage).
#posts > article + article {
.post-block {
margin-top: sboffset;
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
border-radius: $border-radius;
}
}
// Comments blocks.
.comments {
padding: $content-desktop-padding;
margin: initial;
margin-top: sboffset;
background: white;
box-shadow: $box-shadow;
border-radius: $border-radius;
}
// Top main padding from header to posts (default 40px).
.posts-expand {
padding-top: initial;
}
// Post navigation items.
.post-nav-divider {
width: 4%;
}
.post-nav-item {
width: 48%;
}
// Post delimiters.
.post-eof,
.post-spread {
hide();
}
// Pagination.
.pagination {
.prev, .next, .page-number {
margin-bottom: initial;
top: initial;
}
margin: sboffset 0 0;
border-top: initial;
background: white;
box-shadow: $box-shadow;
border-radius: $border-radius;
padding: 10px 0 10px;
}
// Footer alignment.
.main {
padding-bottom: initial;
}
.footer {
bottom: auto;
}
// =================================================
// Headers.
// =================================================
// No need anymore?
.post-header {
h1, h2 {
margin: initial;
}
}
.posts-expand .post-title-link {
line-height: inherit;
}
.posts-expand .post-title {
font-size: 1.7em;
}
.post-body {
h1 {
font-size: 1.6em;
border-bottom: 1px solid $body-bg-color;
}
h2 {
font-size: 1.45em;
border-bottom: 1px solid $body-bg-color;
}
h3 {
font-size: 1.3em;
if use_seo {
border-bottom: 1px solid $body-bg-color;
} else {
border-bottom: 1px dotted $body-bg-color;
}
}
h4 {
font-size: 1.2em;
if use_seo {
border-bottom: 1px dotted $body-bg-color;
}
}
h5 {
font-size: 1.07em;
}
h6 {
font-size: 1.03em;
}
}
// =================================================
// > 768px & < 991px
// =================================================
+tablet() {
// Posts in blocks.
.content-wrap {
padding: $content-tablet-padding;
}
.posts-expand {
margin: initial;
// Components inside Posts.
.post-button {
margin-top: ($content-tablet-padding * 2);
}
}
.post-block {
// Inside posts blocks content padding (default 40px).
padding: ($content-tablet-padding * 2);
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
border-radius: $border-radius;
}
// Only if blocks are siblings need bottom margin (homepage).
#posts > article + article {
.post-block {
margin-top: $content-tablet-padding;
}
}
.comments {
margin-top: $content-tablet-padding;
padding: $content-tablet-padding ($content-tablet-padding * 2);
//padding: initial;
//padding-top: $content-tablet-padding;
}
.pagination {
margin: $content-tablet-padding 0 0;
}
}
// =================================================
// < 767px
// =================================================
+mobile() {
// Posts in blocks.
.content-wrap {
padding: $content-mobile-padding;
}
.posts-expand {
margin: initial;
// Components inside Posts.
.post-button {
margin-top: sboffset;
//padding-bottom : 15px;
}
img {
padding: initial !important;
}
}
.post-block {
// Inside posts blocks content padding (default 40px).
padding: sboffset;
min-height: auto;
// Rewrite shadows & borders because all blocks have offsets.
box-shadow: $box-shadow;
border-radius: $border-radius;
}
// Only if blocks are siblings need bottom margin (homepage).
#posts > article + article {
.post-block {
margin-top: $content-mobile-padding;
}
}
.comments {
margin-top: $content-mobile-padding;
padding: 0 sboffset;
}
.pagination {
margin: $content-mobile-padding 0 0;
}
}
================================================
FILE: source/css/_schemes/Mist/_base.styl
================================================
// Tags
// --------------------------------------------------
h1, h2, h3, h4, h5, h6 { margin: 20px 0 10px; }
p { margin: 0 0 25px 0; }
a { border-bottom-color: $grey-light; }
hr {
margin: 20px 0;
height: 2px;
}
================================================
FILE: source/css/_schemes/Mist/_header.styl
================================================
// Header
// --------------------------------------------------
.header { background: $whitesmoke; }
.header-inner {
padding: 25px 0 20px;
clearfix();
+mobile() {
width: auto;
margin-bottom: 50px;
padding: 10px;
}
}
.site-meta {
float: left;
margin-left: -20px;
line-height: normal;
+mobile() {
margin-left: 10px;
}
.brand {
padding: 2px 1px;
background: none;
+mobile() { display: block; }
}
.logo { display: none; }
.site-title {
font-size: 22px;
font-weight: bolder;
+mobile() { line-height: 34px; }
}
}
.logo-line-before,
.logo-line-after {
display: block;
overflow: hidden;
margin: 0 auto;
width: 75%;
+mobile() { display: none; }
i {
position: relative;
display: block;
height: 2px;
background: $black-deep;
+mobile() { height: 3px; }
}
}
.use-motion {
.logo-line-before i { left: -100%; }
.logo-line-after i { right: -100%; }
}
================================================
FILE: source/css/_schemes/Mist/_logo.styl
================================================
.site-subtitle { display: none; }
================================================
FILE: source/css/_schemes/Mist/_menu.styl
================================================
// Menu
// --------------------------------------------------
.site-nav-toggle {
position: static;
float: right;
}
.menu {
float: right;
margin: 8px 0 0 0;
+mobile() {
margin: 20px 0 0 0;
padding: 0;
}
br { display: none; }
.menu-item {
margin: 0;
+mobile() { display: block; }
}
.menu-item a {
padding: 0 10px;
background: none;
border: none;
border-radius: 2px;
transition-property: background;
+mobile() {
text-align: left;
}
&:hover { background: #e1e1e1; }
}
a::before {
display: none;
+mobile() { display: block; }
}
+mobile() { float: none; }
}
================================================
FILE: source/css/_schemes/Mist/_posts-expanded.styl
================================================
// Post Expanded
// --------------------------------------------------
.posts-expand {
padding-top: 0;
.post-title,
.post-meta {
text-align: $site-meta-text-align;
+mobile() { text-align: center; }
}
.post-eof { display: none; }
.post { margin-top: 120px; }
.post:first-child { margin-top: 0; }
.post-meta {
margin-top: 5px;
margin-bottom: 20px;
}
.post-title {
position: relative;
font-size: $font-size-headings-base;
font-weight: 400;
+mobile() { font-size: $font-size-headings-small; }
+desktop-large() { font-size: $font-size-headings-large; }
}
.post-title:hover:before { background: $black-deep; }
.post-body {
+mobile() { font-size: $font-size-small; }
}
.post-body img { margin: 0; }
.post-tags {
text-align: left;
a {
padding: 1px 5px;
background: $whitesmoke;
border-bottom: none;
}
a:hover { background: $grey-light; }
}
.post-nav { margin-top: 40px; }
}
.post-button {
margin-top: 20px;
text-align: left;
a {
padding: 0;
font-size: $font-size-base;
//color: $grey-dim;
background: none;
border: none;
border-bottom: 2px solid $grey-dim;
transition-property: border;
+mobile() { font-size: $font-size-small; }
+desktop-large() { font-size: $font-size-large; }
&:hover { border-bottom-color: $black-deep; }
}
}
================================================
FILE: source/css/_schemes/Mist/_search.styl
================================================
// Search
// --------------------------------------------------
.site-search form {
display: none;
}
================================================
FILE: source/css/_schemes/Mist/index.styl
================================================
//
// Mist scheme
// =================================================
@import "_base";
@import "outline/outline";
@import "_header";
@import "_logo";
@import "_menu";
@import "_search.styl";
@import "_posts-expanded";
@import "sidebar/sidebar-blogroll";
// Components
// --------------------------------------------------
.btn {
padding: 0 10px;
border-width: 2px;
border-radius: 0;
}
.headband { display: none; }
// Search
// --------------------------------------------------
.site-search {
position: relative;
float: right;
margin-top: 5px;
padding-top: 3px;
+mobile() {
float: none;
padding: 0 10px;
}
}
// Page - Container
// --------------------------------------------------
.container .main-inner {
+mobile() { width: auto; }
}
// Page - Post details
// --------------------------------------------------
.page-post-detail {
.post-title,
.post-meta { text-align: center; }
.post-title:before { display: none; }
.post-meta { margin-bottom: 60px; }
}
// Pagination
// --------------------------------------------------
.pagination {
margin: 120px 0 0;
text-align: left;
+mobile() {
margin: 80px 10px 0;
text-align: center;
}
}
// Footer
// --------------------------------------------------
.footer {
margin-top: 80px;
padding: 10px 0;
background: $whitesmoke;
color: $grey-dim;
}
.footer-inner {
margin: 0 auto;
text-align: left;
+mobile() {
width: auto;
text-align: center;
}
}
// Helpers
// --------------------------------------------------
================================================
FILE: source/css/_schemes/Mist/outline/outline.styl
================================================
.main-inner { margin-top: 80px; }
================================================
FILE: source/css/_schemes/Mist/sidebar/sidebar-blogroll.styl
================================================
.links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; }
================================================
FILE: source/css/_schemes/Muse/_layout.styl
================================================
.header-inner, .container .main-inner, .footer-inner {
+mobile() { width: auto; }
}
// embed tag
embed {
display: block;
margin: 0px auto 25px auto;
}
================================================
FILE: source/css/_schemes/Muse/_logo.styl
================================================
.custom-logo {
.site-meta-headline { text-align: center; }
.brand { background: none; }
.site-title {
margin: 10px auto 0;
font-size: 24px;
color: $black-deep;
a { border: none; }
}
}
.custom-logo-image {
margin: 0 auto;
padding: 5px;
max-width: 150px;
background: white;
}
================================================
FILE: source/css/_schemes/Muse/_menu.styl
================================================
.site-nav {
+mobile() {
position: absolute;
left: 0;
top: 52px;
margin: 0;
width: 100%;
padding: 0;
background: white;
border-bottom: 1px solid $gray-lighter;
z-index: $zindex-3;
}
}
.menu {
+mobile() { text-align: left; }
}
.menu .menu-item {
+mobile() {
display: block;
margin: 0 10px;
vertical-align: top;
}
br {
+mobile() { display: none; }
}
a {
+mobile() { padding: 5px 10px; }
}
.fa { margin-right: 0; }
}
================================================
FILE: source/css/_schemes/Muse/_search.styl
================================================
// Search
// --------------------------------------------------
.site-search form {
display: none;
}
================================================
FILE: source/css/_schemes/Muse/index.styl
================================================
@import "_layout.styl";
@import "_logo.styl";
@import "_menu.styl";
@import "_search.styl";
@import "sidebar/sidebar-blogroll";
================================================
FILE: source/css/_schemes/Muse/sidebar/sidebar-blogroll.styl
================================================
.links-of-blogroll-inline .links-of-blogroll-item { display: inline-block; }
================================================
FILE: source/css/_schemes/Pisces/_brand.styl
================================================
.site-brand-wrapper {
position: relative;
}
.site-meta {
padding: 20px 0;
color: white;
background: $black-deep;
+tablet() {
box-shadow: 0 0 16px rgba(0,0,0,0.5);
}
+mobile() {
box-shadow: 0 0 16px rgba(0,0,0,0.5);
}
}
.brand {
padding: 0;
background: none;
&:hover { color: white; }
}
.site-subtitle {
margin: 10px 10px 0;
font-weight: initial;
}
.site-search form { display: none; }
================================================
FILE: source/css/_schemes/Pisces/_layout.styl
================================================
.header {
position: relative;
margin: 0 auto;
width: $main-desktop;
+tablet() {
width: auto;
}
+mobile() {
width: auto;
}
}
.header-inner {
position: absolute;
top: 0;
overflow: hidden;
padding: 0;
width: 240px;
background: white;
box-shadow: $box-shadow-inner;
border-radius: $border-radius-inner;
+desktop-large() {
.container & { width: 240px; }
}
+tablet() {
position: relative;
width: auto;
border-radius: initial;
}
+mobile() {
position: relative;
width: auto;
border-radius: initial;
}
}
.main {
clearfix();
+tablet() {
padding-bottom: 100px;
}
+mobile() {
padding-bottom: 100px;
}
}
.container .main-inner {
width: $main-desktop;
+tablet() {
width: auto;
}
+mobile() {
width: auto;
}
}
.content-wrap {
float: right;
box-sizing: border-box;
padding: $content-desktop-padding;
width: $content-desktop;
background: white;
min-height: 700px;
box-shadow: $box-shadow-inner;
border-radius: $border-radius-inner;
+tablet() {
width: 100%;
padding: 20px;
border-radius: initial;
}
+mobile() {
width: 100%;
padding: 20px;
min-height: auto;
border-radius: initial;
}
}
.sidebar {
position: static;
float: left;
margin-top: 300px;
width: $sidebar-desktop;
background: $body-bg-color;
box-shadow: none;
+tablet() {
display: none;
}
+mobile() {
display: none;
}
}
.sidebar-toggle { display: none; }
.footer-inner {
width: $main-desktop;
padding-left: 260px;
+tablet() {
width: auto;
padding-left: 0 !important;
padding-right: 0 !important;
}
+mobile() {
width: auto;
padding-left: 0 !important;
padding-right: 0 !important;
}
}
.sidebar-position-right {
.header-inner { right: 0; }
.content-wrap { float: left; }
.sidebar { float: right; }
.footer-inner {
padding-left: 0;
padding-right: 260px;
}
}
================================================
FILE: source/css/_schemes/Pisces/_menu.styl
================================================
.site-nav {
border-top: none;
+tablet() {
display: none !important;
}
}
.site-nav-on {
+tablet() {
display: block !important;
}
}
.menu .menu-item {
display: block;
margin: 0;
a {
position: relative;
box-sizing: border-box;
padding: 5px 20px;
text-align: left;
line-height: inherit;
transition-property: background-color;
the-transition();
&:hover {
background: #f9f9f9;
border-bottom-color: white;
}
}
br { display: none; }
}
.menu-item-active a {
@extend .menu .menu-item a:hover;
&:after {
content: " ";
position: absolute;
top: 50%;
margin-top: -3px;
right: 15px;
width: 6px;
height: 6px;
border-radius: 50%;
background-color: $grey;
}
}
.btn-bar {
background-color: white;
}
.site-nav-toggle {
left: 20px;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
+tablet() {
display: block;
}
}
================================================
FILE: source/css/_schemes/Pisces/_posts.styl
================================================
.post-body {
+mobile() {
text-align: justify;
}
}
================================================
FILE: source/css/_schemes/Pisces/_sidebar.styl
================================================
.use-motion .sidebar .motion-element { opacity: 1; }
.sidebar {
margin-left: -100%;
right: auto;
bottom: auto;
// Do NOT delete this line
// or Affix (position: fixed) will not work in Google Chrome.
-webkit-transform: none;
}
.sidebar-inner {
//padding: 20px 10px 0;
box-sizing: border-box;
width: 240px;
color: $text-color;
background: white;
box-shadow: $box-shadow;
border-radius: $border-radius;
if (hexo-config('motion.enable') and hexo-config('motion.transition.sidebar')) { opacity: 0; }
&.affix {
position: fixed;
top: $sidebar-offset;
}
&.affix-bottom {
position: absolute;
}
}
.site-overview {
//margin: 0 2px;
text-align: left;
}
.site-author {
clearfix();
}
.sidebar a {
color: $black-light;
&:hover { color: $black-deep; }
}
.site-state-item {
padding: 0 10px;
}
.links-of-author-item {
a:before { display: none; }
a {
border-bottom: none;
text-decoration: underline;
}
}
.feed-link {
border-top: 1px dotted $grey-light;
border-bottom: 1px dotted $grey-light;
text-align: center;
}
.feed-link a {
display: block;
color: $orange;
border: none;
&:hover {
background: none;
color: darken($orange, 20%);
i { color: darken($orange, 20%); }
}
}
.links-of-author {
//clearfix();
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.links-of-author-item {
sidebar-inline-links-item();
a {
display: block;
text-decoration: none;
&:hover {
border-radius: 4px;
background: $gainsboro;
}
}
.fa {
margin-right: 2px;
font-size: 16px;
}
.fa-globe { font-size: 15px; }
}
.links-of-blogroll {
text-align: center;
margin-top: 20px;
padding: 3px 0 0;
border-top: 1px dotted $grey-light;
}
.links-of-blogroll-title { margin-top: 0; }
.links-of-blogroll-item { padding: 0; }
.links-of-blogroll-inline {
clearfix();
.links-of-blogroll-item {
sidebar-inline-links-item();
display: inline-block;
if !hexo-config('social_icons.icons_only') { width: unset; }
}
}
================================================
FILE: source/css/_schemes/Pisces/index.styl
================================================
@import "_layout";
@import "_brand";
@import "_menu";
@import "_sidebar";
@import "_posts";
================================================
FILE: source/css/_variables/Gemini.styl
================================================
// Variables of Gemini scheme
// =================================================
@import "Pisces.styl";
// Settings for some of the most global styles.
// --------------------------------------------------
$body-bg-color = #eee
$main-desktop = 75%
$sidebar-desktop = 240px
$content-desktop = calc(100% - 252px)
// Borders.
// --------------------------------------------------
$box-shadow-inner = 0 2px 2px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.06), 0 1px 5px 0 rgba(0,0,0,.12)
$box-shadow = 0 2px 2px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.06), 0 1px 5px 0 rgba(0,0,0,.12), 0 -1px .5px 0 rgba(0,0,0,.09)
$border-radius-inner = initial
$border-radius = initial
//$border-radius-inner = 0 0 3px 3px;
//$border-radius = 3px;
================================================
FILE: source/css/_variables/Mist.styl
================================================
// Variables of Mist scheme
// =================================================
$font-size-headings-base = 26px
$brand-color = $black-deep
$brand-hover-color = $brand-color
$site-meta-text-align = left
$posts-collapse-left = 0
$btn-default-color = $link-color
$btn-default-bg = transparent
================================================
FILE: source/css/_variables/Muse.styl
================================================
================================================
FILE: source/css/_variables/Pisces.styl
================================================
// Variables of Pisces scheme
// =================================================
// Settings for some of the most global styles.
// --------------------------------------------------
$body-bg-color = #f5f7f9
// Borders
// --------------------------------------------------
$box-shadow-inner = initial;
$box-shadow = initial;
$border-radius-inner = initial;
$border-radius = initial;
// Header
// --------------------------------------------------
$subtitle-color = $gray-lighter
// Sidebar
// --------------------------------------------------
$sidebar-offset = unit(hexo-config('sidebar.offset'), px) if hexo-config('sidebar.offset') is a 'unit'
$sidebar-nav-hover-color = $orange
$sidebar-highlight = $orange
$site-author-image-width = 120px
$site-author-image-border-width = 1px
$site-author-image-border-color = $gainsboro
$site-author-name-margin = 0
$site-author-name-color = $black-deep
$site-author-name-align = center
$site-author-name-weight = $font-weight-bold
$site-description-font-size = 13px
$site-description-color = $grey-dark
$site-description-margin-top = 0
$site-description-align = center
$site-state-item-count-font-size = 16px
$site-state-item-name-font-size = 13px
$site-state-item-name-color = $grey-dark
$site-state-item-border-color = $gainsboro
$toc-link-color = $grey-dim
$toc-link-border-color = $grey-light
$toc-link-hover-color = black
$toc-link-hover-border-color = black
$toc-link-active-color = $sidebar-highlight
$toc-link-active-border-color = $sidebar-highlight
$toc-link-active-current-color = $sidebar-highlight
$toc-link-active-current-border-color = $sidebar-highlight
// Components
// --------------------------------------------------
// Button
$btn-default-radius = 2px
$btn-default-bg = white
$btn-default-color = $text-color
$btn-default-border-color = $text-color
$btn-default-hover-color = white
$btn-default-hover-bg = $black-deep
// Full Image Tag
$full-image-width = 118%
$full-image-margin-horizontal = -9%
$full-image-margin-vertical = 0
// Back to top
$b2t-opacity = .6
$b2t-position-bottom = -100px
$b2t-position-bottom-on = 30px
================================================
FILE: source/css/_variables/base.styl
================================================
//
// Variables
// =================================================
// Colors
// colors for use across theme.
// --------------------------------------------------
$whitesmoke = #f5f5f5
$gainsboro = #eee
$gray-lighter = #ddd
$grey-light = #ccc
$grey = #bbb
$grey-dark = #999
$grey-dim = #666
$black-light = #555
$black-dim = #333
$black-deep = #222
$red = #ff2a2a
$blue-bright = #87daff
$blue = #0684bd
$blue-deep = #262a30
$orange = #fc6423
// Scaffolding
// Settings for some of the most global styles.
// --------------------------------------------------
// Global text color on
$text-color = $black-light
// Global link color.
$link-color = $black-light
$link-hover-color = $black-deep
$link-decoration-color = $grey-light
$link-decoration-hover-color = $black-deep
// Global border color.
$border-color = $grey-light
// Background color for
$body-bg-color = white
// Selection
$selection-bg = $blue-deep
$selection-color = white
// Typography
// Font, line-height, and elements colors.
// --------------------------------------------------
get_font_family(config) {
custom_family = hexo-config('font.' + config + '.family')
return custom_family is a 'string' ? custom_family : null
}
// Font families.
$font-family-chinese = "PingFang SC", "Microsoft YaHei"
$font-family-base = $font-family-chinese, sans-serif
$font-family-base = get_font_family('global'), $font-family-chinese, sans-serif if get_font_family('global')
$font-family-logo = $font-family-base
$font-family-logo = get_font_family('logo'), $font-family-base if get_font_family('logo')
$font-family-headings = $font-family-base
$font-family-headings = get_font_family('headings'), $font-family-base if get_font_family('headings')
$font-family-posts = $font-family-base
$font-family-posts = get_font_family('posts'), $font-family-base if get_font_family('posts')
$font-family-monospace = consolas, Menlo, $font-family-chinese, monospace
$font-family-monospace = get_font_family('codes'), consolas, Menlo, $font-family-chinese, monospace if get_font_family('codes')
$font-family-icons = 'FontAwesome'
// Font Weight
$font-weight-lighter = 200
$font-weight-light = 300
$font-weight-normal = 400
$font-weight-bold = 600
$font-weight-bolder = 700
// Font size
$font-size-base = 14px
$font-size-base = unit(hexo-config('font.global.size'), px) if hexo-config('font.global.size') is a 'unit'
$font-size-small = $font-size-base - 2px
$font-size-smaller = $font-size-base - 4px
$font-size-large = $font-size-base + 2px
$font-size-larger = $font-size-base + 4px
// Headings font size
$font-size-headings-step = 2px
$font-size-headings-base = 24px
$font-size-headings-base = unit(hexo-config('font.headings.size'), px) if hexo-config('font.headings.size') is a 'unit'
$font-size-headings-small = $font-size-headings-base - $font-size-headings-step
$font-size-headings-smaller = $font-size-headings-small - $font-size-headings-step
$font-size-headings-large = $font-size-headings-base + $font-size-headings-step
$font-size-headings-larger = $font-size-headings-large + $font-size-headings-step
// Global line height
$line-height-base = 2
$line-height-code-block = 1.6 // Can't be less than 1.3
// Z-index master list
// --------------------------------------------------
$zindex-bottom = -1
$zindex-1 = 1010
$zindex-2 = 1020
$zindex-3 = 1030
$zindex-4 = 1040
$zindex-5 = 1050
// Table
// --------------------------------------------------
$table-width = 100%
$table-border-color = $gray-lighter
$table-font-size = 14px
$table-content-alignment = left
$table-content-vertical = middle
$table-th-font-weight = 700
$table-cell-padding = 8px
$table-cell-border-right-color = $gainsboro
$table-cell-border-bottom-color = $gray-lighter
$table-row-odd-bg-color = #f9f9f9
$table-row-hover-bg-color = $whitesmoke
// Code & Code Blocks
// --------------------------------------------------
$code-font-family = $font-family-monospace
$code-font-size = 13px
$code-font-size = unit(hexo-config('font.codes.size'), px) if hexo-config('font.codes.size') is a 'unit'
$code-border-radius = 3px
$code-foreground = $black-light
$code-background = $gainsboro
// Buttons
// --------------------------------------------------
$btn-font-weight = normal
$btn-default-radius = 0
$btn-default-bg = $black-deep
$btn-default-color = white
$btn-default-font-size = 14px
$btn-default-border-width = 2px
$btn-default-border-color = $black-deep
$btn-default-hover-bg = white
$btn-default-hover-color = $black-deep
$btn-default-hover-border-color = $black-deep
// Pagination
// --------------------------------------------------
$pagination-border = $gainsboro
$pagination-link-bg = transparent
$pagination-link-color = $link-color
$pagination-link-border = $gainsboro
$pagination-link-hover-bg = transparent
$pagination-link-hover-color = $link-color
$pagination-link-hover-border = $black-deep
$pagination-active-bg = $grey-light
$pagination-active-color = white
$pagination-active-border = $grey-light
// Layout sizes
// --------------------------------------------------
$main-desktop = 960px
$main-desktop-large = 1200px
$content-desktop = 700px
$content-desktop-large = 900px
$content-desktop-padding = 40px
$content-tablet-padding = 10px
$content-mobile-padding = 8px
$sidebar-desktop = 240px
$footer-height = 50px
$gap-between-main-and-footer = 100px
// Headband
// --------------------------------------------------
$headband-height = 3px
$headband-bg = $black-deep
// Section Header
// Variables for header section elements.
// --------------------------------------------------
$head-bg = transparent
// Site Meta
$site-meta-text-align = center
$brand-color = white
$brand-hover-color = white
$brand-bg = $black-deep
$logo-font-size = 20px
$logo-font-size = unit(hexo-config('font.logo.size'), px) if hexo-config('font.logo.size') is a 'unit'
$site-subtitle-color = $grey-dark
$subtitle-font-size = 13px
$subtitle-color = $grey-dark
// Menu
$menu-link-border = transparent
$menu-link-hover-border = $black-deep
// Posts Expand
// --------------------------------------------------
$posts-expand-title-font-weight = $font-weight-normal
$post-copyright = {
margin: 2em 0 0,
padding: .5em 1em,
bg: #f9f9f9,
border: {
width: 3px,
style: solid,
color: #ff1700
}
}
// Posts Collpase
// --------------------------------------------------
$posts-collapse-left = 55px
$posts-collapse-left-mobile = 5px
// Sidebar
// Variables for sidebar section elements.
// --------------------------------------------------
$sidebar-nav-color = $black-light
$sidebar-nav-hover-color = $whitesmoke
$sidebar-highlight = $blue-bright
$site-author-image-padding = 2px
$site-author-image-width = 96px
$site-author-image-height = auto
$site-author-image-border-width = 2px
$site-author-image-border-color = $black-dim
$site-author-name-margin = 5px 0 0
$site-author-name-color = $whitesmoke
$site-author-name-align = center
$site-author-name-weight = normal
$site-description-font-size = 14px
$site-description-color = $grey-dark
$site-description-margin-top = 5px
$site-description-align = center
$site-state-align = center
$site-state-item-count-font-size = 18px
$site-state-item-count-color = inherit
$site-state-item-name-font-size = 13px
$site-state-item-name-color = inherit
$site-state-item-border-color = $black-dim
$toc-link-color = $grey-dark
$toc-link-border-color = $black-light
$toc-link-hover-color = $grey-light
$toc-link-hover-border-color = $grey-light
$toc-link-active-color = $sidebar-highlight
$toc-link-active-border-color = $sidebar-highlight
$toc-link-active-current-color = $sidebar-highlight
$toc-link-active-current-border-color = $sidebar-highlight
// Components
// --------------------------------------------------
// Back to top
$b2t-opacity = 1
$b2t-position-bottom = -100px
$b2t-position-bottom-on = 19px
$b2t-position-right = 30px
$b2t-font-size = 12px
$b2t-color = white
$b2t-bg-color = $black-deep
// full-image
$full-image-width = 110%
$full-image-margin-horizontal = -5%
$full-image-margin-vertical = 25px
// .post-expand .post-eof
// In Muse scheme, margin above and below the post separator
$post-eof-margin-top = 80px // or 160px for more white space
$post-eof-margin-bottom = 60px // or 120px for less white space
// Iconography
// Icons SVG Base64
// --------------------------------------------------
// blockquote-center icon
$center-quote-left = '../images/quote-l.svg'
$center-quote-right = '../images/quote-r.svg'
// Note colors
// --------------------------------------------------
// Read note light_bg_offset from NexT config and set in "lbg%" to use it as string variable.
hexo-config('note.light_bg_offset') is a 'unit' ? (lbg = unit(hexo-config('note.light_bg_offset'),"%")) : (lbg = 0)
// Default
$note-default-border = #777
$note-default-bg = lighten(spin($note-default-border, 0), 94% + lbg)
$note-default-text = $note-default-border
$note-default-icon = "\f0a9"
$note-modern-default-border = #e1e1e1
$note-modern-default-bg = lighten(spin($note-modern-default-border, 10), 60% + (lbg * 4))
$note-modern-default-text = $grey-dim
$note-modern-default-hover = darken(spin($note-modern-default-text, -10), 32%)
// Primary
$note-primary-border = #6f42c1
$note-primary-bg = lighten(spin($note-primary-border, 10), 92% + lbg)
$note-primary-text = $note-primary-border
$note-primary-icon = "\f055"
$note-modern-primary-border = #e1c2ff
$note-modern-primary-bg = lighten(spin($note-modern-primary-border, 10), 40% + (lbg * 4))
$note-modern-primary-text = #6f42c1
$note-modern-primary-hover = darken(spin($note-modern-primary-text, -10), 22%)
// Info
$note-info-border = #428bca
$note-info-bg = lighten(spin($note-info-border, -10), 91% + lbg)
$note-info-text = $note-info-border
$note-info-icon = "\f05a"
$note-modern-info-border = #b3e5ef
$note-modern-info-bg = lighten(spin($note-modern-info-border, 10), 50% + (lbg * 4))
$note-modern-info-text = #31708f
$note-modern-info-hover = darken(spin($note-modern-info-text, -10), 32%)
// Success
$note-success-border = #5cb85c
$note-success-bg = lighten(spin($note-success-border, 10), 90% + lbg)
$note-success-text = $note-success-border
$note-success-icon = "\f058"
$note-modern-success-border = #d0e6be
$note-modern-success-bg = lighten(spin($note-modern-success-border, 10), 40% + (lbg * 4))
$note-modern-success-text = #3c763d
$note-modern-success-hover = darken(spin($note-modern-success-text, -10), 27%)
// Warning
$note-warning-border = #f0ad4e
$note-warning-bg = lighten(spin($note-warning-border, 10), 88% + lbg)
$note-warning-text = $note-warning-border
$note-warning-icon = "\f06a"
$note-modern-warning-border = #fae4cd
$note-modern-warning-bg = lighten(spin($note-modern-warning-border, 10), 43% + (lbg * 4))
$note-modern-warning-text = #8a6d3b
$note-modern-warning-hover = darken(spin($note-modern-warning-text, -10), 18%)
// Danger
$note-danger-border = #d9534f
$note-danger-bg = lighten(spin($note-danger-border, -10), 92% + lbg)
$note-danger-text = $note-danger-border
$note-danger-icon = "\f056"
$note-modern-danger-border = #ebcdd2
$note-modern-danger-bg = lighten(spin($note-modern-danger-border, 10), 35% + (lbg * 4))
$note-modern-danger-text = #a94442
$note-modern-danger-hover = darken(spin($note-modern-danger-text, -10), 22%)
// Label colors
// --------------------------------------------------
$label-default = lighten(spin($note-default-border, 0), 89% + lbg)
$label-primary = lighten(spin($note-primary-border, 10), 87% + lbg)
$label-info = lighten(spin($note-info-border, -10), 86% + lbg)
$label-success = lighten(spin($note-success-border, 10), 85% + lbg)
$label-warning = lighten(spin($note-warning-border, 10), 83% + lbg)
$label-danger = lighten(spin($note-danger-border, -10), 87% + lbg)
================================================
FILE: source/css/_variables/custom.styl
================================================
================================================
FILE: source/css/main.styl
================================================
// CSS Style Guide: http://codeguide.co/#css
$scheme = hexo-config('scheme') ? hexo-config('scheme') : 'Muse';
$variables = base $scheme custom;
$mixins = base $scheme custom;
// Variables Layer
// --------------------------------------------------
for $variable in $variables
@import "_variables/" + $variable
// Mixins Layer
// --------------------------------------------------
for $mixin in $mixins
@import "_mixins/" + $mixin;
// Common Layer
// --------------------------------------------------
// Scaffolding
@import "_common/scaffolding";
// Layout
@import "_common/outline";
// Components
@import "_common/components";
// Schemes Layer
// --------------------------------------------------
@import "_schemes/" + $scheme;
// Custom Layer
// --------------------------------------------------
@import "_custom/custom";
================================================
FILE: source/fonts/.gitkeep
================================================
================================================
FILE: source/js/src/affix.js
================================================
/* ========================================================================
* Bootstrap: affix.js v3.3.5
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// AFFIX CLASS DEFINITION
// ======================
var Affix = function (element, options) {
this.options = $.extend({}, Affix.DEFAULTS, options)
this.$target = $(this.options.target)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
this.$element = $(element)
this.affixed = null
this.unpin = null
this.pinnedOffset = null
this.checkPosition()
}
Affix.VERSION = '3.3.5'
Affix.RESET = 'affix affix-top affix-bottom'
Affix.DEFAULTS = {
offset: 0,
target: window
}
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
var targetHeight = this.$target.height()
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
if (this.affixed == 'bottom') {
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
}
var initializing = this.affixed == null
var colliderTop = initializing ? scrollTop : position.top
var colliderHeight = initializing ? targetHeight : height
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
return false
}
Affix.prototype.getPinnedOffset = function () {
if (this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop = this.$target.scrollTop()
var position = this.$element.offset()
return (this.pinnedOffset = position.top - scrollTop)
}
Affix.prototype.checkPositionWithEventLoop = function () {
setTimeout($.proxy(this.checkPosition, this), 1)
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var height = this.$element.height()
var offset = this.options.offset
var offsetTop = offset.top
var offsetBottom = offset.bottom
var scrollHeight = Math.max($(document).height(), $(document.body).height())
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
if (this.affixed != affix) {
if (this.unpin != null) this.$element.css('top', '')
var affixType = 'affix' + (affix ? '-' + affix : '')
var e = $.Event(affixType + '.bs.affix')
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
this.affixed = affix
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
this.$element
.removeClass(Affix.RESET)
.addClass(affixType)
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
}
if (affix == 'bottom') {
this.$element.offset({
top: scrollHeight - height - offsetBottom
})
}
}
// AFFIX PLUGIN DEFINITION
// =======================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.affix')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.affix
$.fn.affix = Plugin
$.fn.affix.Constructor = Affix
// AFFIX NO CONFLICT
// =================
$.fn.affix.noConflict = function () {
$.fn.affix = old
return this
}
// AFFIX DATA-API
// ==============
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
var data = $spy.data()
data.offset = data.offset || {}
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
if (data.offsetTop != null) data.offset.top = data.offsetTop
Plugin.call($spy, data)
})
})
}(jQuery);
================================================
FILE: source/js/src/algolia-search.js
================================================
/* global instantsearch: true */
/*jshint camelcase: false */
$(document).ready(function () {
var algoliaSettings = CONFIG.algolia;
var isAlgoliaSettingsValid = algoliaSettings.applicationID &&
algoliaSettings.apiKey &&
algoliaSettings.indexName;
if (!isAlgoliaSettingsValid) {
window.console.error('Algolia Settings are invalid.');
return;
}
var search = instantsearch({
appId: algoliaSettings.applicationID,
apiKey: algoliaSettings.apiKey,
indexName: algoliaSettings.indexName,
searchFunction: function (helper) {
var searchInput = $('#algolia-search-input').find('input');
if (searchInput.val()) {
helper.search();
}
}
});
// Registering Widgets
[
instantsearch.widgets.searchBox({
container: '#algolia-search-input',
placeholder: algoliaSettings.labels.input_placeholder
}),
instantsearch.widgets.hits({
container: '#algolia-hits',
hitsPerPage: algoliaSettings.hits.per_page || 10,
templates: {
item: function (data) {
var link = data.permalink ? data.permalink : (CONFIG.root + data.path);
return (
'' +
data._highlightResult.title.value +
''
);
},
empty: function (data) {
return (
'' +
algoliaSettings.labels.hits_empty.replace(/\$\{query}/, data.query) +
''
);
}
},
cssClasses: {
item: 'algolia-hit-item'
}
}),
instantsearch.widgets.stats({
container: '#algolia-stats',
templates: {
body: function (data) {
var stats = algoliaSettings.labels.hits_stats
.replace(/\$\{hits}/, data.nbHits)
.replace(/\$\{time}/, data.processingTimeMS);
return (
stats +
'' +
'
' +
'' +
'
'
);
}
}
}),
instantsearch.widgets.pagination({
container: '#algolia-pagination',
scrollTo: false,
showFirstLast: false,
labels: {
first: '',
last: '',
previous: '',
next: ''
},
cssClasses: {
root: 'pagination',
item: 'pagination-item',
link: 'page-number',
active: 'current',
disabled: 'disabled-item'
}
})
].forEach(search.addWidget, search);
search.start();
$('.popup-trigger').on('click', function(e) {
e.stopPropagation();
$('body')
.append('')
.css('overflow', 'hidden');
$('.popup').toggle();
$('#algolia-search-input').find('input').focus();
});
$('.popup-btn-close').click(function(){
$('.popup').hide();
$('.algolia-pop-overlay').remove();
$('body').css('overflow', '');
});
});
================================================
FILE: source/js/src/bootstrap.js
================================================
/* global NexT: true */
$(document).ready(function () {
$(document).trigger('bootstrap:before');
NexT.utils.isMobile() && window.FastClick.attach(document.body);
NexT.utils.lazyLoadPostsImages();
NexT.utils.registerESCKeyEvent();
NexT.utils.registerBackToTop();
// Mobile top menu bar.
$('.site-nav-toggle button').on('click', function () {
var $siteNav = $('.site-nav');
var ON_CLASS_NAME = 'site-nav-on';
var isSiteNavOn = $siteNav.hasClass(ON_CLASS_NAME);
var animateAction = isSiteNavOn ? 'slideUp' : 'slideDown';
var animateCallback = isSiteNavOn ? 'removeClass' : 'addClass';
$siteNav.stop()[animateAction]('fast', function () {
$siteNav[animateCallback](ON_CLASS_NAME);
});
});
/**
* Register JS handlers by condition option.
* Need to add config option in Front-End at 'layout/_partials/head.swig' file.
*/
CONFIG.fancybox && NexT.utils.wrapImageWithFancyBox();
CONFIG.tabs && NexT.utils.registerTabsTag();
NexT.utils.embeddedVideoTransformer();
NexT.utils.addActiveClassToMenuItem();
// Define Motion Sequence.
NexT.motion.integrator
.add(NexT.motion.middleWares.logo)
.add(NexT.motion.middleWares.menu)
.add(NexT.motion.middleWares.postList)
.add(NexT.motion.middleWares.sidebar);
$(document).trigger('motion:before');
// Bootstrap Motion.
CONFIG.motion.enable && NexT.motion.integrator.bootstrap();
$(document).trigger('bootstrap:after');
});
================================================
FILE: source/js/src/exturl.js
================================================
/* global NexT: true */
$(document).ready(function () {
// Create Base64 Object
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}};
$('.exturl').on('click', function () {
var $exturl = $(this).attr('data-url');
var $decurl = Base64.decode($exturl);
window.open($decurl, '_blank');
return false;
});
});
================================================
FILE: source/js/src/hook-duoshuo.js
================================================
/* global DUOSHUO: true */
/* jshint camelcase: false */
typeof DUOSHUO !== 'undefined' ?
hookTemplate() :
($('#duoshuo-script')[0].onload = hookTemplate);
function hookTemplate() {
var post = DUOSHUO.templates.post;
DUOSHUO.templates.post = function (e, t) {
var rs = post(e, t);
var agent = e.post.agent;
var userId = e.post.author.user_id;
var admin = '';
if (userId && (userId == CONFIG.duoshuo.userId)) {
admin = '' + CONFIG.duoshuo.author + '';
}
if (agent && /^Mozilla/.test(agent)) {
rs = rs.replace(/<\/div>/, admin + getAgentInfo(agent) + '
');
}
return rs;
};
}
function getAgentInfo(string) {
$.ua.set(string);
var UNKNOWN = 'Unknown';
var sua = $.ua;
var separator = isMobile() ? '
' : '';
var osName = sua.os.name || UNKNOWN;
var osVersion = sua.os.version || UNKNOWN;
var browserName = sua.browser.name || UNKNOWN;
var browserVersion = sua.browser.version || UNKNOWN;
var iconMapping = {
os: {
android : 'android',
linux : 'linux',
windows : 'windows',
ios : 'apple',
'mac os': 'apple',
unknown : 'desktop'
},
browser: {
chrome : 'chrome',
chromium : 'chrome',
firefox : 'firefox',
opera : 'opera',
safari : 'safari',
ie : 'internet-explorer',
wechat : 'wechat',
qq : 'qq',
unknown : 'globe'
}
};
var osIcon = iconMapping.os[osName.toLowerCase()];
var browserIcon = iconMapping.browser[getBrowserKey()];
return separator +
'' +
'' +
osName + ' ' + osVersion +
'' + separator +
'' +
'' +
browserName + ' ' + browserVersion +
'';
function getBrowserKey () {
var key = browserName.toLowerCase();
if (key.match(/WeChat/i)) {
return 'wechat';
}
if (key.match(/QQBrowser/i)) {
return 'qq';
}
return key;
}
function isMobile() {
var userAgent = window.navigator.userAgent;
var isiPad = userAgent.match(/iPad/i) !== null;
var mobileUA = [
'iphone', 'android', 'phone', 'mobile',
'wap', 'netfront', 'x11', 'java', 'opera mobi',
'opera mini', 'ucweb', 'windows ce', 'symbian',
'symbianos', 'series', 'webos', 'sony',
'blackberry', 'dopod', 'nokia', 'samsung',
'palmsource', 'xda', 'pieplus', 'meizu',
'midp' ,'cldc' , 'motorola', 'foma',
'docomo', 'up.browser', 'up.link', 'blazer',
'helio', 'hosin', 'huawei', 'novarra',
'coolpad', 'webos', 'techfaith', 'palmsource',
'alcatel', 'amoi', 'ktouch', 'nexian',
'ericsson', 'philips', 'sagem', 'wellcom',
'bunjalloo', 'maui', 'smartphone', 'iemobile',
'spice', 'bird', 'zte-', 'longcos',
'pantech', 'gionee', 'portalmmm', 'jig browser',
'hiptop', 'benq', 'haier', '^lct',
'320x320', '240x320', '176x220'
];
var pattern = new RegExp(mobileUA.join('|'), 'i');
return !isiPad && userAgent.match(pattern);
}
}
================================================
FILE: source/js/src/js.cookie.js
================================================
/*!
* JavaScript Cookie v2.1.4
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
;(function (factory) {
var registeredInModuleLoader = false;
if (typeof define === 'function' && define.amd) {
define(factory);
registeredInModuleLoader = true;
}
if (typeof exports === 'object') {
module.exports = factory();
registeredInModuleLoader = true;
}
if (!registeredInModuleLoader) {
var OldCookies = window.Cookies;
var api = window.Cookies = factory();
api.noConflict = function () {
window.Cookies = OldCookies;
return api;
};
}
}(function () {
function extend () {
var i = 0;
var result = {};
for (; i < arguments.length; i++) {
var attributes = arguments[ i ];
for (var key in attributes) {
result[key] = attributes[key];
}
}
return result;
}
function init (converter) {
function api (key, value, attributes) {
var result;
if (typeof document === 'undefined') {
return;
}
// Write
if (arguments.length > 1) {
attributes = extend({
path: '/'
}, api.defaults, attributes);
if (typeof attributes.expires === 'number') {
var expires = new Date();
expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
attributes.expires = expires;
}
// We're using "expires" because "max-age" is not supported by IE
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
try {
result = JSON.stringify(value);
if (/^[\{\[]/.test(result)) {
value = result;
}
} catch (e) {}
if (!converter.write) {
value = encodeURIComponent(String(value))
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
} else {
value = converter.write(value, key);
}
key = encodeURIComponent(String(key));
key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
key = key.replace(/[\(\)]/g, escape);
var stringifiedAttributes = '';
for (var attributeName in attributes) {
if (!attributes[attributeName]) {
continue;
}
stringifiedAttributes += '; ' + attributeName;
if (attributes[attributeName] === true) {
continue;
}
stringifiedAttributes += '=' + attributes[attributeName];
}
return (document.cookie = key + '=' + value + stringifiedAttributes);
}
// Read
if (!key) {
result = {};
}
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling "get()"
var cookies = document.cookie ? document.cookie.split('; ') : [];
var rdecode = /(%[0-9A-Z]{2})+/g;
var i = 0;
for (; i < cookies.length; i++) {
var parts = cookies[i].split('=');
var cookie = parts.slice(1).join('=');
if (cookie.charAt(0) === '"') {
cookie = cookie.slice(1, -1);
}
try {
var name = parts[0].replace(rdecode, decodeURIComponent);
cookie = converter.read ?
converter.read(cookie, name) : converter(cookie, name) ||
cookie.replace(rdecode, decodeURIComponent);
if (this.json) {
try {
cookie = JSON.parse(cookie);
} catch (e) {}
}
if (key === name) {
result = cookie;
break;
}
if (!key) {
result[name] = cookie;
}
} catch (e) {}
}
return result;
}
api.set = api;
api.get = function (key) {
return api.call(api, key);
};
api.getJSON = function () {
return api.apply({
json: true
}, [].slice.call(arguments));
};
api.defaults = {};
api.remove = function (key, attributes) {
api(key, '', extend(attributes, {
expires: -1
}));
};
api.withConverter = init;
return api;
}
return init(function () {});
}));
================================================
FILE: source/js/src/motion.js
================================================
/* global NexT: true */
$(document).ready(function () {
NexT.motion = {};
var sidebarToggleLines = {
lines: [],
push: function (line) {
this.lines.push(line);
},
init: function () {
this.lines.forEach(function (line) {
line.init();
});
},
arrow: function () {
this.lines.forEach(function (line) {
line.arrow();
});
},
close: function () {
this.lines.forEach(function (line) {
line.close();
});
}
};
function SidebarToggleLine(settings) {
this.el = $(settings.el);
this.status = $.extend({}, {
init: {
width: '100%',
opacity: 1,
left: 0,
rotateZ: 0,
top: 0
}
}, settings.status);
}
SidebarToggleLine.prototype.init = function () {
this.transform('init');
};
SidebarToggleLine.prototype.arrow = function () {
this.transform('arrow');
};
SidebarToggleLine.prototype.close = function () {
this.transform('close');
};
SidebarToggleLine.prototype.transform = function (status) {
this.el.velocity('stop').velocity(this.status[status]);
};
var sidebarToggleLine1st = new SidebarToggleLine({
el: '.sidebar-toggle-line-first',
status: {
arrow: {width: '50%', rotateZ: '-45deg', top: '2px'},
close: {width: '100%', rotateZ: '-45deg', top: '5px'}
}
});
var sidebarToggleLine2nd = new SidebarToggleLine({
el: '.sidebar-toggle-line-middle',
status: {
arrow: {width: '90%'},
close: {opacity: 0}
}
});
var sidebarToggleLine3rd = new SidebarToggleLine({
el: '.sidebar-toggle-line-last',
status: {
arrow: {width: '50%', rotateZ: '45deg', top: '-2px'},
close: {width: '100%', rotateZ: '45deg', top: '-5px'}
}
});
sidebarToggleLines.push(sidebarToggleLine1st);
sidebarToggleLines.push(sidebarToggleLine2nd);
sidebarToggleLines.push(sidebarToggleLine3rd);
var SIDEBAR_WIDTH = '320px';
var SIDEBAR_DISPLAY_DURATION = 200;
var xPos, yPos;
var sidebarToggleMotion = {
toggleEl: $('.sidebar-toggle'),
dimmerEl: $('#sidebar-dimmer'),
sidebarEl: $('.sidebar'),
isSidebarVisible: false,
init: function () {
this.toggleEl.on('click', this.clickHandler.bind(this));
this.dimmerEl.on('click', this.clickHandler.bind(this));
this.toggleEl.on('mouseenter', this.mouseEnterHandler.bind(this));
this.toggleEl.on('mouseleave', this.mouseLeaveHandler.bind(this));
this.sidebarEl.on('touchstart', this.touchstartHandler.bind(this));
this.sidebarEl.on('touchend', this.touchendHandler.bind(this));
this.sidebarEl.on('touchmove', function(e){e.preventDefault();});
$(document)
.on('sidebar.isShowing', function () {
NexT.utils.isDesktop() && $('body').velocity('stop').velocity(
{paddingRight: SIDEBAR_WIDTH},
SIDEBAR_DISPLAY_DURATION
);
})
.on('sidebar.isHiding', function () {
});
},
clickHandler: function () {
this.isSidebarVisible ? this.hideSidebar() : this.showSidebar();
this.isSidebarVisible = !this.isSidebarVisible;
},
mouseEnterHandler: function () {
if (this.isSidebarVisible) {
return;
}
sidebarToggleLines.arrow();
},
mouseLeaveHandler: function () {
if (this.isSidebarVisible) {
return;
}
sidebarToggleLines.init();
},
touchstartHandler: function(e) {
xPos = e.originalEvent.touches[0].clientX;
yPos = e.originalEvent.touches[0].clientY;
},
touchendHandler: function(e) {
var _xPos = e.originalEvent.changedTouches[0].clientX;
var _yPos = e.originalEvent.changedTouches[0].clientY;
if (_xPos-xPos > 30 && Math.abs(_yPos-yPos) < 20) {
this.clickHandler();
}
},
showSidebar: function () {
var self = this;
sidebarToggleLines.close();
this.sidebarEl.velocity('stop').velocity({
width: SIDEBAR_WIDTH
}, {
display: 'block',
duration: SIDEBAR_DISPLAY_DURATION,
begin: function () {
$('.sidebar .motion-element').velocity(
'transition.slideRightIn',
{
stagger: 50,
drag: true,
complete: function () {
self.sidebarEl.trigger('sidebar.motion.complete');
}
}
);
},
complete: function () {
self.sidebarEl.addClass('sidebar-active');
self.sidebarEl.trigger('sidebar.didShow');
}
}
);
this.sidebarEl.trigger('sidebar.isShowing');
},
hideSidebar: function () {
NexT.utils.isDesktop() && $('body').velocity('stop').velocity({paddingRight: 0});
this.sidebarEl.find('.motion-element').velocity('stop').css('display', 'none');
this.sidebarEl.velocity('stop').velocity({width: 0}, {display: 'none'});
sidebarToggleLines.init();
this.sidebarEl.removeClass('sidebar-active');
this.sidebarEl.trigger('sidebar.isHiding');
// Prevent adding TOC to Overview if Overview was selected when close & open sidebar.
if (!!$('.post-toc-wrap')) {
if ($('.site-overview-wrap').css('display') === 'block') {
$('.post-toc-wrap').removeClass('motion-element');
} else {
$('.post-toc-wrap').addClass('motion-element');
}
}
}
};
sidebarToggleMotion.init();
NexT.motion.integrator = {
queue: [],
cursor: -1,
add: function (fn) {
this.queue.push(fn);
return this;
},
next: function () {
this.cursor++;
var fn = this.queue[this.cursor];
$.isFunction(fn) && fn(NexT.motion.integrator);
},
bootstrap: function () {
this.next();
}
};
NexT.motion.middleWares = {
logo: function (integrator) {
var sequence = [];
var $brand = $('.brand');
var $title = $('.site-title');
var $subtitle = $('.site-subtitle');
var $logoLineTop = $('.logo-line-before i');
var $logoLineBottom = $('.logo-line-after i');
$brand.size() > 0 && sequence.push({
e: $brand,
p: {opacity: 1},
o: {duration: 200}
});
NexT.utils.isMist() && hasElement([$logoLineTop, $logoLineBottom]) &&
sequence.push(
getMistLineSettings($logoLineTop, '100%'),
getMistLineSettings($logoLineBottom, '-100%')
);
hasElement($title) && sequence.push({
e: $title,
p: {opacity: 1, top: 0},
o: { duration: 200 }
});
hasElement($subtitle) && sequence.push({
e: $subtitle,
p: {opacity: 1, top: 0},
o: {duration: 200}
});
if (CONFIG.motion.async) {
integrator.next();
}
if (sequence.length > 0) {
sequence[sequence.length - 1].o.complete = function () {
integrator.next();
};
$.Velocity.RunSequence(sequence);
} else {
integrator.next();
}
function getMistLineSettings (element, translateX) {
return {
e: $(element),
p: {translateX: translateX},
o: {
duration: 500,
sequenceQueue: false
}
};
}
/**
* Check if $elements exist.
* @param {jQuery|Array} $elements
* @returns {boolean}
*/
function hasElement ($elements) {
$elements = Array.isArray($elements) ? $elements : [$elements];
return $elements.every(function ($element) {
return $.isFunction($element.size) && $element.size() > 0;
});
}
},
menu: function (integrator) {
if (CONFIG.motion.async) {
integrator.next();
}
$('.menu-item').velocity('transition.slideDownIn', {
display: null,
duration: 200,
complete: function () {
integrator.next();
}
});
},
postList: function (integrator) {
//var $post = $('.post');
var $postBlock = $('.post-block, .pagination, .comments');
var $postBlockTransition = CONFIG.motion.transition.post_block;
var $postHeader = $('.post-header');
var $postHeaderTransition = CONFIG.motion.transition.post_header;
var $postBody = $('.post-body');
var $postBodyTransition = CONFIG.motion.transition.post_body;
var $collHeader = $('.collection-title, .archive-year');
var $collHeaderTransition = CONFIG.motion.transition.coll_header;
var $sidebarAffix = $('.sidebar-inner');
var $sidebarAffixTransition = CONFIG.motion.transition.sidebar;
var hasPost = $postBlock.size() > 0;
hasPost ? postMotion() : integrator.next();
if (CONFIG.motion.async) {
integrator.next();
}
function postMotion () {
var postMotionOptions = window.postMotionOptions || {
stagger: 100,
drag: true
};
postMotionOptions.complete = function () {
// After motion complete need to remove transform from sidebar to let affix work on Pisces | Gemini.
if (CONFIG.motion.transition.sidebar && (NexT.utils.isPisces() || NexT.utils.isGemini())) {
$sidebarAffix.css({ 'transform': 'initial' });
}
integrator.next();
};
//$post.velocity('transition.slideDownIn', postMotionOptions);
if (CONFIG.motion.transition.post_block) {
$postBlock.velocity('transition.' + $postBlockTransition, postMotionOptions);
}
if (CONFIG.motion.transition.post_header) {
$postHeader.velocity('transition.' + $postHeaderTransition, postMotionOptions);
}
if (CONFIG.motion.transition.post_body) {
$postBody.velocity('transition.' + $postBodyTransition, postMotionOptions);
}
if (CONFIG.motion.transition.coll_header) {
$collHeader.velocity('transition.' + $collHeaderTransition, postMotionOptions);
}
// Only for Pisces | Gemini.
if (CONFIG.motion.transition.sidebar && (NexT.utils.isPisces() || NexT.utils.isGemini())) {
$sidebarAffix.velocity('transition.' + $sidebarAffixTransition, postMotionOptions);
}
}
},
sidebar: function (integrator) {
if (CONFIG.sidebar.display === 'always') {
NexT.utils.displaySidebar();
}
integrator.next();
}
};
});
================================================
FILE: source/js/src/post-details.js
================================================
/* global NexT: true */
$(document).ready(function () {
initScrollSpy();
function initScrollSpy () {
var tocSelector = '.post-toc';
var $tocElement = $(tocSelector);
var activeCurrentSelector = '.active-current';
$tocElement
.on('activate.bs.scrollspy', function () {
var $currentActiveElement = $(tocSelector + ' .active').last();
removeCurrentActiveClass();
$currentActiveElement.addClass('active-current');
// Scrolling to center active TOC element if TOC content is taller then viewport.
$tocElement.scrollTop($currentActiveElement.offset().top - $tocElement.offset().top + $tocElement.scrollTop() - ($tocElement.height() / 2));
})
.on('clear.bs.scrollspy', removeCurrentActiveClass);
$('body').scrollspy({ target: tocSelector });
function removeCurrentActiveClass () {
$(tocSelector + ' ' + activeCurrentSelector)
.removeClass(activeCurrentSelector.substring(1));
}
}
});
$(document).ready(function () {
var html = $('html');
var TAB_ANIMATE_DURATION = 200;
var hasVelocity = $.isFunction(html.velocity);
$('.sidebar-nav li').on('click', function () {
var item = $(this);
var activeTabClassName = 'sidebar-nav-active';
var activePanelClassName = 'sidebar-panel-active';
if (item.hasClass(activeTabClassName)) {
return;
}
var currentTarget = $('.' + activePanelClassName);
var target = $('.' + item.data('target'));
hasVelocity ?
currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () {
target
.velocity('stop')
.velocity('transition.slideDownIn', TAB_ANIMATE_DURATION)
.addClass(activePanelClassName);
}) :
currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () {
currentTarget.hide();
target
.stop()
.css({'opacity': 0, 'display': 'block'})
.animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () {
currentTarget.removeClass(activePanelClassName);
target.addClass(activePanelClassName);
});
});
item.siblings().removeClass(activeTabClassName);
item.addClass(activeTabClassName);
});
// TOC item animation navigate & prevent #item selector in adress bar.
$('.post-toc a').on('click', function (e) {
e.preventDefault();
var targetSelector = NexT.utils.escapeSelector(this.getAttribute('href'));
var offset = $(targetSelector).offset().top;
hasVelocity ?
html.velocity('stop').velocity('scroll', {
offset: offset + 'px',
mobileHA: false
}) :
$('html, body').stop().animate({
scrollTop: offset
}, 500);
});
// Expand sidebar on post detail page by default, when post has a toc.
var $tocContent = $('.post-toc-content');
var isSidebarCouldDisplay = CONFIG.sidebar.display === 'post' ||
CONFIG.sidebar.display === 'always';
var hasTOC = $tocContent.length > 0 && $tocContent.html().trim().length > 0;
if (isSidebarCouldDisplay && hasTOC) {
CONFIG.motion.enable ?
(NexT.motion.middleWares.sidebar = function () {
NexT.utils.displaySidebar();
}) : NexT.utils.displaySidebar();
}
});
================================================
FILE: source/js/src/schemes/pisces.js
================================================
$(document).ready(function () {
var sidebarInner = $('.sidebar-inner');
initAffix();
resizeListener();
function initAffix () {
var headerOffset = getHeaderOffset(),
footerOffset = getFooterOffset(),
sidebarHeight = $('#sidebar').height() + NexT.utils.getSidebarb2tHeight(),
contentHeight = $('#content').height();
// Not affix if sidebar taller then content (to prevent bottom jumping).
if (headerOffset + sidebarHeight < contentHeight) {
sidebarInner.affix({
offset: {
top: headerOffset - CONFIG.sidebar.offset,
bottom: footerOffset
}
});
}
setSidebarMarginTop(headerOffset).css({ 'margin-left': 'initial' });
}
function resizeListener () {
var mql = window.matchMedia('(min-width: 991px)');
mql.addListener(function(e){
if(e.matches){
recalculateAffixPosition();
}
});
}
function getHeaderOffset () {
return $('.header-inner').height() + CONFIG.sidebar.offset;
}
function getFooterOffset () {
var footerInner = $('.footer-inner'),
footerMargin = footerInner.outerHeight(true) - footerInner.outerHeight(),
footerOffset = footerInner.outerHeight(true) + footerMargin;
return footerOffset;
}
function setSidebarMarginTop (headerOffset) {
return $('#sidebar').css({ 'margin-top': headerOffset });
}
function recalculateAffixPosition () {
$(window).off('.affix');
sidebarInner.removeData('bs.affix').removeClass('affix affix-top affix-bottom');
initAffix();
}
});
================================================
FILE: source/js/src/scroll-cookie.js
================================================
$(document).ready(function() {
// Set relative link path (without domain)
var rpath = window.location.href.replace(window.location.origin, "");
// Write position in cookie
var timeout;
$(window).on("scroll", function() {
clearTimeout(timeout);
timeout = setTimeout(function () {
Cookies.set("scroll-cookie", ($(window).scrollTop() + "|" + rpath), { expires: 365, path: '' });
}, 250);
});
// Read position from cookie
if (Cookies.get("scroll-cookie") !== undefined) {
var cvalues = Cookies.get("scroll-cookie").split('|');
if (cvalues[1] == rpath) {
$(window).scrollTop(cvalues[0]);
}
}
});
================================================
FILE: source/js/src/scrollspy.js
================================================
/* ========================================================================
* Bootstrap: scrollspy.js v3.3.2
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
/**
* Custom by iissnan
*
* - Add a `clear.bs.scrollspy` event.
* - Esacpe targets selector.
*/
+function ($) {
'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
function ScrollSpy(element, options) {
this.$body = $(document.body)
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target || '') + ' .nav li > a'
this.offsets = []
this.targets = []
this.activeTarget = null
this.scrollHeight = 0
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
this.refresh()
this.process()
}
ScrollSpy.VERSION = '3.3.2'
ScrollSpy.DEFAULTS = {
offset: 10
}
ScrollSpy.prototype.getScrollHeight = function () {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}
ScrollSpy.prototype.refresh = function () {
var that = this
var offsetMethod = 'offset'
var offsetBase = 0
this.offsets = []
this.targets = []
this.scrollHeight = this.getScrollHeight()
if (!$.isWindow(this.$scrollElement[0])) {
offsetMethod = 'position'
offsetBase = this.$scrollElement.scrollTop()
}
this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
var href = $el.data('target') || $el.attr('href')
var $href = /^#./.test(href) && $(NexT.utils.escapeSelector(href)) // Need to escape selector.
return ($href
&& $href.length
&& $href.is(':visible')
&& [[$href[offsetMethod]().top + offsetBase, href]]) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
that.offsets.push(this[0])
that.targets.push(this[1])
})
}
ScrollSpy.prototype.process = function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
var scrollHeight = this.getScrollHeight()
var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
var offsets = this.offsets
var targets = this.targets
var activeTarget = this.activeTarget
var i
if (this.scrollHeight != scrollHeight) {
this.refresh()
}
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
}
if (activeTarget && scrollTop < offsets[0]) {
$(this.selector).trigger('clear.bs.scrollspy') // Add a custom event.
this.activeTarget = null
return this.clear()
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& this.activate(targets[i])
}
}
ScrollSpy.prototype.activate = function (target) {
this.activeTarget = target
this.clear()
var selector = this.selector +
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'
var active = $(selector)
.parents('li')
.addClass('active')
if (active.parent('.dropdown-menu').length) {
active = active
.closest('li.dropdown')
.addClass('active')
}
active.trigger('activate.bs.scrollspy')
}
ScrollSpy.prototype.clear = function () {
$(this.selector)
.parentsUntil(this.options.target, '.active')
.removeClass('active')
}
// SCROLLSPY PLUGIN DEFINITION
// ===========================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.scrollspy')
var options = typeof option == 'object' && option
if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.scrollspy
$.fn.scrollspy = Plugin
$.fn.scrollspy.Constructor = ScrollSpy
// SCROLLSPY NO CONFLICT
// =====================
$.fn.scrollspy.noConflict = function () {
$.fn.scrollspy = old
return this
}
// SCROLLSPY DATA-API
// ==================
$(window).on('load.bs.scrollspy.data-api', function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
Plugin.call($spy, $spy.data())
})
})
}(jQuery);
================================================
FILE: source/js/src/utils.js
================================================
/* global NexT: true */
NexT.utils = NexT.$u = {
/**
* Wrap images with fancybox support.
*/
wrapImageWithFancyBox: function () {
$('.content img')
.not('[hidden]')
.not('.group-picture img, .post-gallery img')
.each(function () {
var $image = $(this);
var imageTitle = $image.attr('title');
var $imageWrapLink = $image.parent('a');
if ($imageWrapLink.size() < 1) {
var imageLink = ($image.attr('data-original')) ? this.getAttribute('data-original') : this.getAttribute('src');
$imageWrapLink = $image.wrap('').parent('a');
}
$imageWrapLink.addClass('fancybox fancybox.image');
$imageWrapLink.attr('rel', 'group');
if (imageTitle) {
$imageWrapLink.append('
' + imageTitle + '
');
//make sure img title tag will show correctly in fancybox
$imageWrapLink.attr('title', imageTitle);
}
});
$('.fancybox').fancybox({
helpers: {
overlay: {
locked: false
}
}
});
},
lazyLoadPostsImages: function () {
$('#posts').find('img').lazyload({
//placeholder: '/images/loading.gif',
effect: 'fadeIn',
threshold : 0
});
},
/**
* Tabs tag listener (without twitter bootstrap).
*/
registerTabsTag: function () {
var tNav = '.tabs ul.nav-tabs ';
// Binding `nav-tabs` & `tab-content` by real time permalink changing.
$(function() {
$(window).bind('hashchange', function() {
var tHash = location.hash;
if (tHash !== '') {
$(tNav + 'li:has(a[href="' + tHash + '"])').addClass('active').siblings().removeClass('active');
$(tHash).addClass('active').siblings().removeClass('active');
}
}).trigger('hashchange');
});
$(tNav + '.tab').on('click', function (href) {
href.preventDefault();
// Prevent selected tab to select again.
if(!$(this).hasClass('active')){
// Add & Remove active class on `nav-tabs` & `tab-content`.
$(this).addClass('active').siblings().removeClass('active');
var tActive = $(this).find('a').attr('href');
$(tActive).addClass('active').siblings().removeClass('active');
// Clear location hash in browser if #permalink exists.
if (location.hash !== '') {
history.pushState('', document.title, window.location.pathname + window.location.search);
}
}
});
},
registerESCKeyEvent: function () {
$(document).on('keyup', function (event) {
var shouldDismissSearchPopup = event.which === 27 &&
$('.search-popup').is(':visible');
if (shouldDismissSearchPopup) {
$('.search-popup').hide();
$('.search-popup-overlay').remove();
$('body').css('overflow', '');
}
});
},
registerBackToTop: function () {
var THRESHOLD = 50;
var $top = $('.back-to-top');
$(window).on('scroll', function () {
$top.toggleClass('back-to-top-on', window.pageYOffset > THRESHOLD);
var scrollTop = $(window).scrollTop();
var contentVisibilityHeight = NexT.utils.getContentVisibilityHeight();
var scrollPercent = (scrollTop) / (contentVisibilityHeight);
var scrollPercentRounded = Math.round(scrollPercent*100);
var scrollPercentMaxed = (scrollPercentRounded > 100) ? 100 : scrollPercentRounded;
$('#scrollpercent>span').html(scrollPercentMaxed);
});
$top.on('click', function () {
$('body').velocity('scroll');
});
},
/**
* Transform embedded video to support responsive layout.
* @see http://toddmotto.com/fluid-and-responsive-youtube-and-vimeo-videos-with-fluidvids-js/
*/
embeddedVideoTransformer: function () {
var $iframes = $('iframe');
// Supported Players. Extend this if you need more players.
var SUPPORTED_PLAYERS = [
'www.youtube.com',
'player.vimeo.com',
'player.youku.com',
'music.163.com',
'www.tudou.com'
];
var pattern = new RegExp( SUPPORTED_PLAYERS.join('|') );
$iframes.each(function () {
var iframe = this;
var $iframe = $(this);
var oldDimension = getDimension($iframe);
var newDimension;
if (this.src.search(pattern) > 0) {
// Calculate the video ratio based on the iframe's w/h dimensions
var videoRatio = getAspectRadio(oldDimension.width, oldDimension.height);
// Replace the iframe's dimensions and position the iframe absolute
// This is the trick to emulate the video ratio
$iframe.width('100%').height('100%')
.css({
position: 'absolute',
top: '0',
left: '0'
});
// Wrap the iframe in a new which uses a dynamically fetched padding-top property
// based on the video's w/h dimensions
var wrap = document.createElement('div');
wrap.className = 'fluid-vids';
wrap.style.position = 'relative';
wrap.style.marginBottom = '20px';
wrap.style.width = '100%';
wrap.style.paddingTop = videoRatio + '%';
// Fix for appear inside tabs tag.
(wrap.style.paddingTop === '') && (wrap.style.paddingTop = '50%');
// Add the iframe inside our newly created
var iframeParent = iframe.parentNode;
iframeParent.insertBefore(wrap, iframe);
wrap.appendChild(iframe);
// Additional adjustments for 163 Music
if (this.src.search('music.163.com') > 0) {
newDimension = getDimension($iframe);
var shouldRecalculateAspect = newDimension.width > oldDimension.width ||
newDimension.height < oldDimension.height;
// 163 Music Player has a fixed height, so we need to reset the aspect radio
if (shouldRecalculateAspect) {
wrap.style.paddingTop = getAspectRadio(newDimension.width, oldDimension.height) + '%';
}
}
}
});
function getDimension($element) {
return {
width: $element.width(),
height: $element.height()
};
}
function getAspectRadio(width, height) {
return height / width * 100;
}
},
/**
* Add `menu-item-active` class name to menu item
* via comparing location.path with menu item's href.
*/
addActiveClassToMenuItem: function () {
var path = window.location.pathname;
path = path === '/' ? path : path.substring(0, path.length - 1);
$('.menu-item a[href^="' + path + '"]:first').parent().addClass('menu-item-active');
},
hasMobileUA: function () {
var nav = window.navigator;
var ua = nav.userAgent;
var pa = /iPad|iPhone|Android|Opera Mini|BlackBerry|webOS|UCWEB|Blazer|PSP|IEMobile|Symbian/g;
return pa.test(ua);
},
isTablet: function () {
return window.screen.width < 992 && window.screen.width > 767 && this.hasMobileUA();
},
isMobile: function () {
return window.screen.width < 767 && this.hasMobileUA();
},
isDesktop: function () {
return !this.isTablet() && !this.isMobile();
},
/**
* Escape meta symbols in jQuery selectors.
*
* @param selector
* @returns {string|void|XML|*}
*/
escapeSelector: function (selector) {
return selector.replace(/[!"$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, '\\$&');
},
displaySidebar: function () {
if (!this.isDesktop() || this.isPisces() || this.isGemini()) {
return;
}
$('.sidebar-toggle').trigger('click');
},
isMist: function () {
return CONFIG.scheme === 'Mist';
},
isPisces: function () {
return CONFIG.scheme === 'Pisces';
},
isGemini: function () {
return CONFIG.scheme === 'Gemini';
},
getScrollbarWidth: function () {
var $div = $('').addClass('scrollbar-measure').prependTo('body');
var div = $div[0];
var scrollbarWidth = div.offsetWidth - div.clientWidth;
$div.remove();
return scrollbarWidth;
},
getContentVisibilityHeight: function () {
var docHeight = $('#content').height(),
winHeight = $(window).height(),
contentVisibilityHeight = (docHeight > winHeight) ? (docHeight - winHeight) : ($(document).height() - winHeight);
return contentVisibilityHeight;
},
getSidebarb2tHeight: function () {
//var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? document.getElementsByClassName('back-to-top')[0].clientHeight : 0;
var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? $('.back-to-top').height() : 0;
//var sidebarb2tHeight = (CONFIG.sidebar.b2t) ? 24 : 0;
return sidebarb2tHeight;
},
getSidebarSchemePadding: function () {
var sidebarNavHeight = ($('.sidebar-nav').css('display') == 'block') ? $('.sidebar-nav').outerHeight(true) : 0,
sidebarInner = $('.sidebar-inner'),
sidebarPadding = sidebarInner.innerWidth() - sidebarInner.width(),
sidebarSchemePadding = this.isPisces() || this.isGemini() ?
((sidebarPadding * 2) + sidebarNavHeight + (CONFIG.sidebar.offset * 2) + this.getSidebarb2tHeight()) :
((sidebarPadding * 2) + (sidebarNavHeight / 2));
return sidebarSchemePadding;
}
/**
* Affix behaviour for Sidebar.
*
* @returns {Boolean}
*/
// needAffix: function () {
// return this.isPisces() || this.isGemini();
// }
};
$(document).ready(function () {
initSidebarDimension();
/**
* Init Sidebar & TOC inner dimensions on all pages and for all schemes.
* Need for Sidebar/TOC inner scrolling if content taller then viewport.
*/
function initSidebarDimension () {
var updateSidebarHeightTimer;
$(window).on('resize', function () {
updateSidebarHeightTimer && clearTimeout(updateSidebarHeightTimer);
updateSidebarHeightTimer = setTimeout(function () {
var sidebarWrapperHeight = document.body.clientHeight - NexT.utils.getSidebarSchemePadding();
updateSidebarHeight(sidebarWrapperHeight);
}, 0);
});
// Initialize Sidebar & TOC Width.
var scrollbarWidth = NexT.utils.getScrollbarWidth();
if ($('.site-overview-wrap').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) {
$('.site-overview').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
}
if ($('.post-toc-wrap').height() > (document.body.clientHeight - NexT.utils.getSidebarSchemePadding())) {
$('.post-toc').css('width', 'calc(100% + ' + scrollbarWidth + 'px)');
}
// Initialize Sidebar & TOC Height.
updateSidebarHeight(document.body.clientHeight - NexT.utils.getSidebarSchemePadding());
}
function updateSidebarHeight (height) {
height = height || 'auto';
$('.site-overview, .post-toc').css('max-height', height);
}
});
================================================
FILE: source/lib/canvas-ribbon/canvas-ribbon.js
================================================
/**
* Created by zproo on 2017/4/8.
*/
!function () {
function getAttr(script, attr, default_val) {
return Number(script.getAttribute(attr)) || default_val;
}
// 获取自定义配置
var ribbon = document.getElementById('ribbon'); // 当前加载的script
config = {
zIndex: getAttr(ribbon, "zIndex", -1), // z-index
alpha: getAttr(ribbon, "alpha", 0.6), // alpha
ribbon_width: getAttr(ribbon, "size", 90), // size
};
var canvas = document.createElement("canvas");
canvas.style.cssText = "position:fixed;top:0;left:0;z-index:"+config.zIndex;
document.getElementsByTagName("body")[0].appendChild(canvas);
var canvasRibbon = canvas,
ctx = canvasRibbon.getContext('2d'), // 获取canvas 2d上下文
dpr = window.devicePixelRatio || 1, // the size of one CSS pixel to the size of one physical pixel.
width = window.innerWidth, // 返回窗口的文档显示区的宽高
height = window.innerHeight,
RIBBON_WIDTH = config.ribbon_width,
path,
math = Math,
r = 0,
PI_2 = math.PI * 2, // 圆周率*2
cos = math.cos, // cos函数返回一个数值的余弦值(-1~1)
random = math.random; // 返回0-1随机数
canvasRibbon.width = width * dpr; // 返回实际宽高
canvasRibbon.height = height * dpr;
ctx.scale(dpr, dpr); // 水平、竖直方向缩放
ctx.globalAlpha = config.alpha; // 图形透明度
function init() {
ctx.clearRect(0, 0, width, height); // 擦除之前绘制内容
path = [{x: 0, y: height * 0.7 + RIBBON_WIDTH}, {x: 0, y: height * 0.7 - RIBBON_WIDTH}];
// 路径没有填满屏幕宽度时,绘制路径
while (path[1].x < width + RIBBON_WIDTH) {
draw(path[0], path[1])
}
}
function draw(start, end) {
ctx.beginPath(); // 创建一个新的路径
ctx.moveTo(start.x, start.y); // path起点
ctx.lineTo(end.x, end.y); // path终点
var nextX = end.x + (random() * 2 - 0.25) * RIBBON_WIDTH,
nextY = geneY(end.y);
ctx.lineTo(nextX, nextY);
ctx.closePath();
r -= PI_2 / -50;
// 随机生成并设置canvas路径16进制颜色
ctx.fillStyle = '#' + (cos(r) * 127 + 128 << 16 | cos(r + PI_2 / 3) * 127 + 128 << 8 | cos(r + PI_2 / 3 * 2) * 127 + 128).toString(16);
ctx.fill(); // 根据当前样式填充路径
path[0] = path[1]; // 起点更新为当前终点
path[1] = {x: nextX, y: nextY} // 更新终点
}
function geneY(y) {
var temp = y + (random() * 2 - 1.1) * RIBBON_WIDTH;
return (temp > height || temp < 0) ? geneY(y) : temp;
}
document.onclick = init;
document.ontouchstart = init;
init();
}();
================================================
FILE: source/lib/fastclick/.bower.json
================================================
{
"name": "fastclick",
"main": "lib/fastclick.js",
"ignore": [
"**/.*",
"component.json",
"package.json",
"Makefile",
"tests",
"examples"
],
"homepage": "https://github.com/ftlabs/fastclick",
"version": "1.0.6",
"_release": "1.0.6",
"_resolution": {
"type": "version",
"tag": "v1.0.6",
"commit": "2ac7258407619398005ca720596f0d36ce66a6c8"
},
"_source": "git://github.com/ftlabs/fastclick.git",
"_target": "~1.0.6",
"_originalSource": "fastclick",
"_direct": true
}
================================================
FILE: source/lib/fastclick/LICENSE
================================================
Copyright (c) 2014 The Financial Times Ltd.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: source/lib/fastclick/README.md
================================================
# FastClick #
FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a `click` event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.
FastClick is developed by [FT Labs](http://labs.ft.com/), part of the Financial Times.
[Explication en français](http://maxime.sh/2013/02/supprimer-le-lag-des-clics-sur-mobile-avec-fastclick/).
[日本語で説明](https://developer.mozilla.org/ja/docs/Mozilla/Firefox_OS/Apps/Tips_and_techniques#Make_events_immediate)。
## Why does the delay exist? ##
According to [Google](https://developers.google.com/mobile/articles/fast_buttons):
> ...mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.
## Compatibility ##
The library has been deployed as part of the [FT Web App](http://app.ft.com/) and is tried and tested on the following mobile browsers:
* Mobile Safari on iOS 3 and upwards
* Chrome on iOS 5 and upwards
* Chrome on Android (ICS)
* Opera Mobile 11.5 and upwards
* Android Browser since Android 2
* PlayBook OS 1 and upwards
## When it isn't needed ##
FastClick doesn't attach any listeners on desktop browsers.
Chrome 32+ on Android with `width=device-width` in the [viewport meta tag](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag) doesn't have a 300ms delay, therefore listeners aren't attached.
```html
```
Same goes for Chrome on Android (all versions) with `user-scalable=no` in the viewport meta tag. But be aware that `user-scalable=no` also disables pinch zooming, which may be an accessibility concern.
For IE11+, you can use `touch-action: manipulation;` to disable double-tap-to-zoom on certain elements (like links and buttons). For IE10 use `-ms-touch-action: manipulation`.
## Usage ##
Include fastclick.js in your JavaScript bundle or add it to your HTML page like this:
```html
```
The script must be loaded prior to instantiating FastClick on any element of the page.
To instantiate FastClick on the `body`, which is the recommended method of use:
```js
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body);
}, false);
}
```
Or, if you're using jQuery:
```js
$(function() {
FastClick.attach(document.body);
});
```
If you're using Browserify or another CommonJS-style module system, the `FastClick.attach` function will be returned when you call `require('fastclick')`. As a result, the easiest way to use FastClick with these loaders is as follows:
```js
var attachFastClick = require('fastclick');
attachFastClick(document.body);
```
### Minified ###
Run `make` to build a minified version of FastClick using the Closure Compiler REST API. The minified file is saved to `build/fastclick.min.js` or you can [download a pre-minified version](http://build.origami.ft.com/bundles/js?modules=fastclick).
Note: the pre-minified version is built using [our build service](http://origami.ft.com/docs/developer-guide/build-service/) which exposes the `FastClick` object through `Origami.fastclick` and will have the Browserify/CommonJS API (see above).
```js
var attachFastClick = Origami.fastclick;
attachFastClick(document.body);
```
### AMD ###
FastClick has AMD (Asynchronous Module Definition) support. This allows it to be lazy-loaded with an AMD loader, such as [RequireJS](http://requirejs.org/). Note that when using the AMD style require, the full `FastClick` object will be returned, _not_ `FastClick.attach`
```js
var FastClick = require('fastclick');
FastClick.attach(document.body, options);
```
### Package managers ###
You can install FastClick using [Component](https://github.com/component/component), [npm](https://npmjs.org/package/fastclick) or [Bower](http://bower.io/).
For Ruby, there's a third-party gem called [fastclick-rails](http://rubygems.org/gems/fastclick-rails). For .NET there's a [NuGet package](http://nuget.org/packages/FastClick).
## Advanced ##
### Ignore certain elements with `needsclick` ###
Sometimes you need FastClick to ignore certain elements. You can do this easily by adding the `needsclick` class.
```html
Ignored by FastClick
```
#### Use case 1: non-synthetic click required ####
Internally, FastClick uses `document.createEvent` to fire a synthetic `click` event as soon as `touchend` is fired by the browser. It then suppresses the additional `click` event created by the browser after that. In some cases, the non-synthetic `click` event created by the browser is required, as described in the [triggering focus example](http://ftlabs.github.com/fastclick/examples/focus.html).
This is where the `needsclick` class comes in. Add the class to any element that requires a non-synthetic click.
#### Use case 2: Twitter Bootstrap 2.2.2 dropdowns ####
Another example of when to use the `needsclick` class is with dropdowns in Twitter Bootstrap 2.2.2. Bootstrap add its own `touchstart` listener for dropdowns, so you want to tell FastClick to ignore those. If you don't, touch devices will automatically close the dropdown as soon as it is clicked, because both FastClick and Bootstrap execute the synthetic click, one opens the dropdown, the second closes it immediately after.
```html
Dropdown
```
## Examples ##
FastClick is designed to cope with many different browser oddities. Here are some examples to illustrate this:
* [basic use](http://ftlabs.github.com/fastclick/examples/layer.html) showing the increase in perceived responsiveness
* [triggering focus](http://ftlabs.github.com/fastclick/examples/focus.html) on an input element from a `click` handler
* [input element](http://ftlabs.github.com/fastclick/examples/input.html) which never receives clicks but gets fast focus
## Tests ##
There are no automated tests. The files in `tests/` are manual reduced test cases. We've had a think about how best to test these cases, but they tend to be very browser/device specific and sometimes subjective which means it's not so trivial to test.
## Credits and collaboration ##
FastClick is maintained by [Rowan Beentje](http://twitter.com/rowanbeentje), [Matthew Caruana Galizia](http://twitter.com/mcaruanagalizia) and [Matthew Andrews](http://twitter.com/andrewsmatt) at [FT Labs](http://labs.ft.com). All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions. Please feel free to raise an issue or pull request.
================================================
FILE: source/lib/fastclick/bower.json
================================================
{
"name": "fastclick",
"main": "lib/fastclick.js",
"ignore": [
"**/.*",
"component.json",
"package.json",
"Makefile",
"tests",
"examples"
]
}
================================================
FILE: source/lib/fastclick/lib/fastclick.js
================================================
;(function () {
'use strict';
/**
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
*
* @codingstandard ftlabs-jsv2
* @copyright The Financial Times Limited [All Rights Reserved]
* @license MIT License (see LICENSE.txt)
*/
/*jslint browser:true, node:true*/
/*global define, Event, Node*/
/**
* Instantiate fast-clicking listeners on the specified layer.
*
* @constructor
* @param {Element} layer The layer to listen on
* @param {Object} [options={}] The options to override the defaults
*/
function FastClick(layer, options) {
var oldOnClick;
options = options || {};
/**
* Whether a click is currently being tracked.
*
* @type boolean
*/
this.trackingClick = false;
/**
* Timestamp for when click tracking started.
*
* @type number
*/
this.trackingClickStart = 0;
/**
* The element being tracked for a click.
*
* @type EventTarget
*/
this.targetElement = null;
/**
* X-coordinate of touch start event.
*
* @type number
*/
this.touchStartX = 0;
/**
* Y-coordinate of touch start event.
*
* @type number
*/
this.touchStartY = 0;
/**
* ID of the last touch, retrieved from Touch.identifier.
*
* @type number
*/
this.lastTouchIdentifier = 0;
/**
* Touchmove boundary, beyond which a click will be cancelled.
*
* @type number
*/
this.touchBoundary = options.touchBoundary || 10;
/**
* The FastClick layer.
*
* @type Element
*/
this.layer = layer;
/**
* The minimum time between tap(touchstart and touchend) events
*
* @type number
*/
this.tapDelay = options.tapDelay || 200;
/**
* The maximum time for a tap
*
* @type number
*/
this.tapTimeout = options.tapTimeout || 700;
if (FastClick.notNeeded(layer)) {
return;
}
// Some old versions of Android don't have Function.prototype.bind
function bind(method, context) {
return function() { return method.apply(context, arguments); };
}
var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
var context = this;
for (var i = 0, l = methods.length; i < l; i++) {
context[methods[i]] = bind(context[methods[i]], context);
}
// Set up event handlers as required
if (deviceIsAndroid) {
layer.addEventListener('mouseover', this.onMouse, true);
layer.addEventListener('mousedown', this.onMouse, true);
layer.addEventListener('mouseup', this.onMouse, true);
}
layer.addEventListener('click', this.onClick, true);
layer.addEventListener('touchstart', this.onTouchStart, false);
layer.addEventListener('touchmove', this.onTouchMove, false);
layer.addEventListener('touchend', this.onTouchEnd, false);
layer.addEventListener('touchcancel', this.onTouchCancel, false);
// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
// layer when they are cancelled.
if (!Event.prototype.stopImmediatePropagation) {
layer.removeEventListener = function(type, callback, capture) {
var rmv = Node.prototype.removeEventListener;
if (type === 'click') {
rmv.call(layer, type, callback.hijacked || callback, capture);
} else {
rmv.call(layer, type, callback, capture);
}
};
layer.addEventListener = function(type, callback, capture) {
var adv = Node.prototype.addEventListener;
if (type === 'click') {
adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
if (!event.propagationStopped) {
callback(event);
}
}), capture);
} else {
adv.call(layer, type, callback, capture);
}
};
}
// If a handler is already declared in the element's onclick attribute, it will be fired before
// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
// adding it as listener.
if (typeof layer.onclick === 'function') {
// Android browser on at least 3.2 requires a new reference to the function in layer.onclick
// - the old one won't work if passed to addEventListener directly.
oldOnClick = layer.onclick;
layer.addEventListener('click', function(event) {
oldOnClick(event);
}, false);
layer.onclick = null;
}
}
/**
* Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
*
* @type boolean
*/
var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
/**
* Android requires exceptions.
*
* @type boolean
*/
var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
/**
* iOS requires exceptions.
*
* @type boolean
*/
var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
/**
* iOS 4 requires an exception for select elements.
*
* @type boolean
*/
var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
/**
* iOS 6.0-7.* requires the target element to be manually derived
*
* @type boolean
*/
var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent);
/**
* BlackBerry requires exceptions.
*
* @type boolean
*/
var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
/**
* Determine whether a given element requires a native click.
*
* @param {EventTarget|Element} target Target DOM element
* @returns {boolean} Returns true if the element needs a native click
*/
FastClick.prototype.needsClick = function(target) {
switch (target.nodeName.toLowerCase()) {
// Don't send a synthetic click to disabled inputs (issue #62)
case 'button':
case 'select':
case 'textarea':
if (target.disabled) {
return true;
}
break;
case 'input':
// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
if ((deviceIsIOS && target.type === 'file') || target.disabled) {
return true;
}
break;
case 'label':
case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
case 'video':
return true;
}
return (/\bneedsclick\b/).test(target.className);
};
/**
* Determine whether a given element requires a call to focus to simulate click into element.
*
* @param {EventTarget|Element} target Target DOM element
* @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
*/
FastClick.prototype.needsFocus = function(target) {
switch (target.nodeName.toLowerCase()) {
case 'textarea':
return true;
case 'select':
return !deviceIsAndroid;
case 'input':
switch (target.type) {
case 'button':
case 'checkbox':
case 'file':
case 'image':
case 'radio':
case 'submit':
return false;
}
// No point in attempting to focus disabled inputs
return !target.disabled && !target.readOnly;
default:
return (/\bneedsfocus\b/).test(target.className);
}
};
/**
* Send a click event to the specified element.
*
* @param {EventTarget|Element} targetElement
* @param {Event} event
*/
FastClick.prototype.sendClick = function(targetElement, event) {
var clickEvent, touch;
// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
if (document.activeElement && document.activeElement !== targetElement) {
document.activeElement.blur();
}
touch = event.changedTouches[0];
// Synthesise a click event, with an extra attribute so it can be tracked
clickEvent = document.createEvent('MouseEvents');
clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
clickEvent.forwardedTouchEvent = true;
targetElement.dispatchEvent(clickEvent);
};
FastClick.prototype.determineEventType = function(targetElement) {
//Issue #159: Android Chrome Select Box does not open with a synthetic click event
if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
return 'mousedown';
}
return 'click';
};
/**
* @param {EventTarget|Element} targetElement
*/
FastClick.prototype.focus = function(targetElement) {
var length;
// Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
length = targetElement.value.length;
targetElement.setSelectionRange(length, length);
} else {
targetElement.focus();
}
};
/**
* Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
*
* @param {EventTarget|Element} targetElement
*/
FastClick.prototype.updateScrollParent = function(targetElement) {
var scrollParent, parentElement;
scrollParent = targetElement.fastClickScrollParent;
// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
// target element was moved to another parent.
if (!scrollParent || !scrollParent.contains(targetElement)) {
parentElement = targetElement;
do {
if (parentElement.scrollHeight > parentElement.offsetHeight) {
scrollParent = parentElement;
targetElement.fastClickScrollParent = parentElement;
break;
}
parentElement = parentElement.parentElement;
} while (parentElement);
}
// Always update the scroll top tracker if possible.
if (scrollParent) {
scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
}
};
/**
* @param {EventTarget} targetElement
* @returns {Element|EventTarget}
*/
FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
if (eventTarget.nodeType === Node.TEXT_NODE) {
return eventTarget.parentNode;
}
return eventTarget;
};
/**
* On touch start, record the position and scroll offset.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchStart = function(event) {
var targetElement, touch, selection;
// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
if (event.targetTouches.length > 1) {
return true;
}
targetElement = this.getTargetElementFromEventTarget(event.target);
touch = event.targetTouches[0];
if (deviceIsIOS) {
// Only trusted events will deselect text on iOS (issue #49)
selection = window.getSelection();
if (selection.rangeCount && !selection.isCollapsed) {
return true;
}
if (!deviceIsIOS4) {
// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
// with the same identifier as the touch event that previously triggered the click that triggered the alert.
// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
// Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
// which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
// random integers, it's safe to to continue if the identifier is 0 here.
if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
event.preventDefault();
return false;
}
this.lastTouchIdentifier = touch.identifier;
// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
// 1) the user does a fling scroll on the scrollable layer
// 2) the user stops the fling scroll with another tap
// then the event.target of the last 'touchend' event will be the element that was under the user's finger
// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
this.updateScrollParent(targetElement);
}
}
this.trackingClick = true;
this.trackingClickStart = event.timeStamp;
this.targetElement = targetElement;
this.touchStartX = touch.pageX;
this.touchStartY = touch.pageY;
// Prevent phantom clicks on fast double-tap (issue #36)
if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
event.preventDefault();
}
return true;
};
/**
* Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.touchHasMoved = function(event) {
var touch = event.changedTouches[0], boundary = this.touchBoundary;
if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
return true;
}
return false;
};
/**
* Update the last position.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchMove = function(event) {
if (!this.trackingClick) {
return true;
}
// If the touch has moved, cancel the click tracking
if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
this.trackingClick = false;
this.targetElement = null;
}
return true;
};
/**
* Attempt to find the labelled control for the given label element.
*
* @param {EventTarget|HTMLLabelElement} labelElement
* @returns {Element|null}
*/
FastClick.prototype.findControl = function(labelElement) {
// Fast path for newer browsers supporting the HTML5 control attribute
if (labelElement.control !== undefined) {
return labelElement.control;
}
// All browsers under test that support touch events also support the HTML5 htmlFor attribute
if (labelElement.htmlFor) {
return document.getElementById(labelElement.htmlFor);
}
// If no for attribute exists, attempt to retrieve the first labellable descendant element
// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
};
/**
* On touch end, determine whether to send a click event at once.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onTouchEnd = function(event) {
var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
if (!this.trackingClick) {
return true;
}
// Prevent phantom clicks on fast double-tap (issue #36)
if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
this.cancelNextClick = true;
return true;
}
if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {
return true;
}
// Reset to prevent wrong click cancel on input (issue #156).
this.cancelNextClick = false;
this.lastClickTime = event.timeStamp;
trackingClickStart = this.trackingClickStart;
this.trackingClick = false;
this.trackingClickStart = 0;
// On some iOS devices, the targetElement supplied with the event is invalid if the layer
// is performing a transition or scroll, and has to be re-detected manually. Note that
// for this to function correctly, it must be called *after* the event target is checked!
// See issue #57; also filed as rdar://13048589 .
if (deviceIsIOSWithBadTarget) {
touch = event.changedTouches[0];
// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
}
targetTagName = targetElement.tagName.toLowerCase();
if (targetTagName === 'label') {
forElement = this.findControl(targetElement);
if (forElement) {
this.focus(targetElement);
if (deviceIsAndroid) {
return false;
}
targetElement = forElement;
}
} else if (this.needsFocus(targetElement)) {
// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
this.targetElement = null;
return false;
}
this.focus(targetElement);
this.sendClick(targetElement, event);
// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
if (!deviceIsIOS || targetTagName !== 'select') {
this.targetElement = null;
event.preventDefault();
}
return false;
}
if (deviceIsIOS && !deviceIsIOS4) {
// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
scrollParent = targetElement.fastClickScrollParent;
if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
return true;
}
}
// Prevent the actual click from going though - unless the target node is marked as requiring
// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
if (!this.needsClick(targetElement)) {
event.preventDefault();
this.sendClick(targetElement, event);
}
return false;
};
/**
* On touch cancel, stop tracking the click.
*
* @returns {void}
*/
FastClick.prototype.onTouchCancel = function() {
this.trackingClick = false;
this.targetElement = null;
};
/**
* Determine mouse events which should be permitted.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onMouse = function(event) {
// If a target element was never set (because a touch event was never fired) allow the event
if (!this.targetElement) {
return true;
}
if (event.forwardedTouchEvent) {
return true;
}
// Programmatically generated events targeting a specific element should be permitted
if (!event.cancelable) {
return true;
}
// Derive and check the target element to see whether the mouse event needs to be permitted;
// unless explicitly enabled, prevent non-touch click events from triggering actions,
// to prevent ghost/doubleclicks.
if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
// Prevent any user-added listeners declared on FastClick element from being fired.
if (event.stopImmediatePropagation) {
event.stopImmediatePropagation();
} else {
// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
event.propagationStopped = true;
}
// Cancel the event
event.stopPropagation();
event.preventDefault();
return false;
}
// If the mouse event is permitted, return true for the action to go through.
return true;
};
/**
* On actual clicks, determine whether this is a touch-generated click, a click action occurring
* naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
* an actual click which should be permitted.
*
* @param {Event} event
* @returns {boolean}
*/
FastClick.prototype.onClick = function(event) {
var permitted;
// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
if (this.trackingClick) {
this.targetElement = null;
this.trackingClick = false;
return true;
}
// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
if (event.target.type === 'submit' && event.detail === 0) {
return true;
}
permitted = this.onMouse(event);
// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
if (!permitted) {
this.targetElement = null;
}
// If clicks are permitted, return true for the action to go through.
return permitted;
};
/**
* Remove all FastClick's event listeners.
*
* @returns {void}
*/
FastClick.prototype.destroy = function() {
var layer = this.layer;
if (deviceIsAndroid) {
layer.removeEventListener('mouseover', this.onMouse, true);
layer.removeEventListener('mousedown', this.onMouse, true);
layer.removeEventListener('mouseup', this.onMouse, true);
}
layer.removeEventListener('click', this.onClick, true);
layer.removeEventListener('touchstart', this.onTouchStart, false);
layer.removeEventListener('touchmove', this.onTouchMove, false);
layer.removeEventListener('touchend', this.onTouchEnd, false);
layer.removeEventListener('touchcancel', this.onTouchCancel, false);
};
/**
* Check whether FastClick is needed.
*
* @param {Element} layer The layer to listen on
*/
FastClick.notNeeded = function(layer) {
var metaViewport;
var chromeVersion;
var blackberryVersion;
var firefoxVersion;
// Devices that don't support touch don't need FastClick
if (typeof window.ontouchstart === 'undefined') {
return true;
}
// Chrome version - zero for other browsers
chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
if (chromeVersion) {
if (deviceIsAndroid) {
metaViewport = document.querySelector('meta[name=viewport]');
if (metaViewport) {
// Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
return true;
}
// Chrome 32 and above with width=device-width or less don't need FastClick
if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
return true;
}
}
// Chrome desktop doesn't need FastClick (issue #15)
} else {
return true;
}
}
if (deviceIsBlackBerry10) {
blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
// BlackBerry 10.3+ does not require Fastclick library.
// https://github.com/ftlabs/fastclick/issues/251
if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
metaViewport = document.querySelector('meta[name=viewport]');
if (metaViewport) {
// user-scalable=no eliminates click delay.
if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
return true;
}
// width=device-width (or less than device-width) eliminates click delay.
if (document.documentElement.scrollWidth <= window.outerWidth) {
return true;
}
}
}
}
// IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
return true;
}
// Firefox version - zero for other browsers
firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
if (firefoxVersion >= 27) {
// Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
metaViewport = document.querySelector('meta[name=viewport]');
if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
return true;
}
}
// IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
// http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
return true;
}
return false;
};
/**
* Factory method for creating a FastClick object
*
* @param {Element} layer The layer to listen on
* @param {Object} [options={}] The options to override the defaults
*/
FastClick.attach = function(layer, options) {
return new FastClick(layer, options);
};
if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
// AMD. Register as an anonymous module.
define(function() {
return FastClick;
});
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = FastClick.attach;
module.exports.FastClick = FastClick;
} else {
window.FastClick = FastClick;
}
}());
================================================
FILE: source/lib/font-awesome/.bower.json
================================================
{
"name": "font-awesome",
"description": "Font Awesome",
"keywords": [],
"homepage": "http://fontawesome.io",
"dependencies": {},
"devDependencies": {},
"license": [
"OFL-1.1",
"MIT",
"CC-BY-3.0"
],
"main": [
"less/font-awesome.less",
"scss/font-awesome.scss"
],
"ignore": [
"*/.*",
"*.json",
"src",
"*.yml",
"Gemfile",
"Gemfile.lock",
"*.md"
],
"version": "4.7.0",
"_release": "4.7.0",
"_resolution": {
"type": "version",
"tag": "v4.7.0",
"commit": "a3fe90fa5f6fac55d197f9cbd18e3f57dafb716c"
},
"_source": "https://github.com/FortAwesome/Font-Awesome.git",
"_target": "*",
"_originalSource": "fontawesome"
}
================================================
FILE: source/lib/font-awesome/.gitignore
================================================
*.pyc
*.egg-info
*.db
*.db.old
*.swp
*.db-journal
.coverage
.DS_Store
.installed.cfg
_gh_pages/*
.idea/*
.svn/*
src/website/static/*
src/website/media/*
bin
cfcache
develop-eggs
dist
downloads
eggs
parts
tmp
.sass-cache
node_modules
src/website/settingslocal.py
stunnel.log
.ruby-version
.bundle
================================================
FILE: source/lib/font-awesome/.npmignore
================================================
*.pyc
*.egg-info
*.db
*.db.old
*.swp
*.db-journal
.coverage
.DS_Store
.installed.cfg
_gh_pages/*
.idea/*
.svn/*
src/website/static/*
src/website/media/*
bin
cfcache
develop-eggs
dist
downloads
eggs
parts
tmp
.sass-cache
node_modules
src/website/settingslocal.py
stunnel.log
.ruby-version
# don't need these in the npm package.
src/
_config.yml
bower.json
component.json
composer.json
CONTRIBUTING.md
Gemfile
Gemfile.lock
================================================
FILE: source/lib/font-awesome/HELP-US-OUT.txt
================================================
I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project,
Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome,
comprehensive icon sets or copy and paste your own.
Please. Check it out.
-Dave Gandy
================================================
FILE: source/lib/font-awesome/bower.json
================================================
{
"name": "font-awesome",
"description": "Font Awesome",
"keywords": [],
"homepage": "http://fontawesome.io",
"dependencies": {},
"devDependencies": {},
"license": ["OFL-1.1", "MIT", "CC-BY-3.0"],
"main": [
"less/font-awesome.less",
"scss/font-awesome.scss"
],
"ignore": [
"*/.*",
"*.json",
"src",
"*.yml",
"Gemfile",
"Gemfile.lock",
"*.md"
]
}
================================================
FILE: source/lib/font-awesome/css/font-awesome.css
================================================
/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* makes the font 33% larger relative to the icon container */
.fa-lg {
font-size: 1.33333333em;
line-height: 0.75em;
vertical-align: -15%;
}
.fa-2x {
font-size: 2em;
}
.fa-3x {
font-size: 3em;
}
.fa-4x {
font-size: 4em;
}
.fa-5x {
font-size: 5em;
}
.fa-fw {
width: 1.28571429em;
text-align: center;
}
.fa-ul {
padding-left: 0;
margin-left: 2.14285714em;
list-style-type: none;
}
.fa-ul > li {
position: relative;
}
.fa-li {
position: absolute;
left: -2.14285714em;
width: 2.14285714em;
top: 0.14285714em;
text-align: center;
}
.fa-li.fa-lg {
left: -1.85714286em;
}
.fa-border {
padding: .2em .25em .15em;
border: solid 0.08em #eeeeee;
border-radius: .1em;
}
.fa-pull-left {
float: left;
}
.fa-pull-right {
float: right;
}
.fa.fa-pull-left {
margin-right: .3em;
}
.fa.fa-pull-right {
margin-left: .3em;
}
/* Deprecated as of 4.4.0 */
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.fa.pull-left {
margin-right: .3em;
}
.fa.pull-right {
margin-left: .3em;
}
.fa-spin {
-webkit-animation: fa-spin 2s infinite linear;
animation: fa-spin 2s infinite linear;
}
.fa-pulse {
-webkit-animation: fa-spin 1s infinite steps(8);
animation: fa-spin 1s infinite steps(8);
}
@-webkit-keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
.fa-rotate-90 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.fa-rotate-180 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.fa-rotate-270 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg);
}
.fa-flip-horizontal {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
-webkit-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
transform: scale(-1, 1);
}
.fa-flip-vertical {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
-webkit-transform: scale(1, -1);
-ms-transform: scale(1, -1);
transform: scale(1, -1);
}
:root .fa-rotate-90,
:root .fa-rotate-180,
:root .fa-rotate-270,
:root .fa-flip-horizontal,
:root .fa-flip-vertical {
filter: none;
}
.fa-stack {
position: relative;
display: inline-block;
width: 2em;
height: 2em;
line-height: 2em;
vertical-align: middle;
}
.fa-stack-1x,
.fa-stack-2x {
position: absolute;
left: 0;
width: 100%;
text-align: center;
}
.fa-stack-1x {
line-height: inherit;
}
.fa-stack-2x {
font-size: 2em;
}
.fa-inverse {
color: #ffffff;
}
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
.fa-glass:before {
content: "\f000";
}
.fa-music:before {
content: "\f001";
}
.fa-search:before {
content: "\f002";
}
.fa-envelope-o:before {
content: "\f003";
}
.fa-heart:before {
content: "\f004";
}
.fa-star:before {
content: "\f005";
}
.fa-star-o:before {
content: "\f006";
}
.fa-user:before {
content: "\f007";
}
.fa-film:before {
content: "\f008";
}
.fa-th-large:before {
content: "\f009";
}
.fa-th:before {
content: "\f00a";
}
.fa-th-list:before {
content: "\f00b";
}
.fa-check:before {
content: "\f00c";
}
.fa-remove:before,
.fa-close:before,
.fa-times:before {
content: "\f00d";
}
.fa-search-plus:before {
content: "\f00e";
}
.fa-search-minus:before {
content: "\f010";
}
.fa-power-off:before {
content: "\f011";
}
.fa-signal:before {
content: "\f012";
}
.fa-gear:before,
.fa-cog:before {
content: "\f013";
}
.fa-trash-o:before {
content: "\f014";
}
.fa-home:before {
content: "\f015";
}
.fa-file-o:before {
content: "\f016";
}
.fa-clock-o:before {
content: "\f017";
}
.fa-road:before {
content: "\f018";
}
.fa-download:before {
content: "\f019";
}
.fa-arrow-circle-o-down:before {
content: "\f01a";
}
.fa-arrow-circle-o-up:before {
content: "\f01b";
}
.fa-inbox:before {
content: "\f01c";
}
.fa-play-circle-o:before {
content: "\f01d";
}
.fa-rotate-right:before,
.fa-repeat:before {
content: "\f01e";
}
.fa-refresh:before {
content: "\f021";
}
.fa-list-alt:before {
content: "\f022";
}
.fa-lock:before {
content: "\f023";
}
.fa-flag:before {
content: "\f024";
}
.fa-headphones:before {
content: "\f025";
}
.fa-volume-off:before {
content: "\f026";
}
.fa-volume-down:before {
content: "\f027";
}
.fa-volume-up:before {
content: "\f028";
}
.fa-qrcode:before {
content: "\f029";
}
.fa-barcode:before {
content: "\f02a";
}
.fa-tag:before {
content: "\f02b";
}
.fa-tags:before {
content: "\f02c";
}
.fa-book:before {
content: "\f02d";
}
.fa-bookmark:before {
content: "\f02e";
}
.fa-print:before {
content: "\f02f";
}
.fa-camera:before {
content: "\f030";
}
.fa-font:before {
content: "\f031";
}
.fa-bold:before {
content: "\f032";
}
.fa-italic:before {
content: "\f033";
}
.fa-text-height:before {
content: "\f034";
}
.fa-text-width:before {
content: "\f035";
}
.fa-align-left:before {
content: "\f036";
}
.fa-align-center:before {
content: "\f037";
}
.fa-align-right:before {
content: "\f038";
}
.fa-align-justify:before {
content: "\f039";
}
.fa-list:before {
content: "\f03a";
}
.fa-dedent:before,
.fa-outdent:before {
content: "\f03b";
}
.fa-indent:before {
content: "\f03c";
}
.fa-video-camera:before {
content: "\f03d";
}
.fa-photo:before,
.fa-image:before,
.fa-picture-o:before {
content: "\f03e";
}
.fa-pencil:before {
content: "\f040";
}
.fa-map-marker:before {
content: "\f041";
}
.fa-adjust:before {
content: "\f042";
}
.fa-tint:before {
content: "\f043";
}
.fa-edit:before,
.fa-pencil-square-o:before {
content: "\f044";
}
.fa-share-square-o:before {
content: "\f045";
}
.fa-check-square-o:before {
content: "\f046";
}
.fa-arrows:before {
content: "\f047";
}
.fa-step-backward:before {
content: "\f048";
}
.fa-fast-backward:before {
content: "\f049";
}
.fa-backward:before {
content: "\f04a";
}
.fa-play:before {
content: "\f04b";
}
.fa-pause:before {
content: "\f04c";
}
.fa-stop:before {
content: "\f04d";
}
.fa-forward:before {
content: "\f04e";
}
.fa-fast-forward:before {
content: "\f050";
}
.fa-step-forward:before {
content: "\f051";
}
.fa-eject:before {
content: "\f052";
}
.fa-chevron-left:before {
content: "\f053";
}
.fa-chevron-right:before {
content: "\f054";
}
.fa-plus-circle:before {
content: "\f055";
}
.fa-minus-circle:before {
content: "\f056";
}
.fa-times-circle:before {
content: "\f057";
}
.fa-check-circle:before {
content: "\f058";
}
.fa-question-circle:before {
content: "\f059";
}
.fa-info-circle:before {
content: "\f05a";
}
.fa-crosshairs:before {
content: "\f05b";
}
.fa-times-circle-o:before {
content: "\f05c";
}
.fa-check-circle-o:before {
content: "\f05d";
}
.fa-ban:before {
content: "\f05e";
}
.fa-arrow-left:before {
content: "\f060";
}
.fa-arrow-right:before {
content: "\f061";
}
.fa-arrow-up:before {
content: "\f062";
}
.fa-arrow-down:before {
content: "\f063";
}
.fa-mail-forward:before,
.fa-share:before {
content: "\f064";
}
.fa-expand:before {
content: "\f065";
}
.fa-compress:before {
content: "\f066";
}
.fa-plus:before {
content: "\f067";
}
.fa-minus:before {
content: "\f068";
}
.fa-asterisk:before {
content: "\f069";
}
.fa-exclamation-circle:before {
content: "\f06a";
}
.fa-gift:before {
content: "\f06b";
}
.fa-leaf:before {
content: "\f06c";
}
.fa-fire:before {
content: "\f06d";
}
.fa-eye:before {
content: "\f06e";
}
.fa-eye-slash:before {
content: "\f070";
}
.fa-warning:before,
.fa-exclamation-triangle:before {
content: "\f071";
}
.fa-plane:before {
content: "\f072";
}
.fa-calendar:before {
content: "\f073";
}
.fa-random:before {
content: "\f074";
}
.fa-comment:before {
content: "\f075";
}
.fa-magnet:before {
content: "\f076";
}
.fa-chevron-up:before {
content: "\f077";
}
.fa-chevron-down:before {
content: "\f078";
}
.fa-retweet:before {
content: "\f079";
}
.fa-shopping-cart:before {
content: "\f07a";
}
.fa-folder:before {
content: "\f07b";
}
.fa-folder-open:before {
content: "\f07c";
}
.fa-arrows-v:before {
content: "\f07d";
}
.fa-arrows-h:before {
content: "\f07e";
}
.fa-bar-chart-o:before,
.fa-bar-chart:before {
content: "\f080";
}
.fa-twitter-square:before {
content: "\f081";
}
.fa-facebook-square:before {
content: "\f082";
}
.fa-camera-retro:before {
content: "\f083";
}
.fa-key:before {
content: "\f084";
}
.fa-gears:before,
.fa-cogs:before {
content: "\f085";
}
.fa-comments:before {
content: "\f086";
}
.fa-thumbs-o-up:before {
content: "\f087";
}
.fa-thumbs-o-down:before {
content: "\f088";
}
.fa-star-half:before {
content: "\f089";
}
.fa-heart-o:before {
content: "\f08a";
}
.fa-sign-out:before {
content: "\f08b";
}
.fa-linkedin-square:before {
content: "\f08c";
}
.fa-thumb-tack:before {
content: "\f08d";
}
.fa-external-link:before {
content: "\f08e";
}
.fa-sign-in:before {
content: "\f090";
}
.fa-trophy:before {
content: "\f091";
}
.fa-github-square:before {
content: "\f092";
}
.fa-upload:before {
content: "\f093";
}
.fa-lemon-o:before {
content: "\f094";
}
.fa-phone:before {
content: "\f095";
}
.fa-square-o:before {
content: "\f096";
}
.fa-bookmark-o:before {
content: "\f097";
}
.fa-phone-square:before {
content: "\f098";
}
.fa-twitter:before {
content: "\f099";
}
.fa-facebook-f:before,
.fa-facebook:before {
content: "\f09a";
}
.fa-github:before {
content: "\f09b";
}
.fa-unlock:before {
content: "\f09c";
}
.fa-credit-card:before {
content: "\f09d";
}
.fa-feed:before,
.fa-rss:before {
content: "\f09e";
}
.fa-hdd-o:before {
content: "\f0a0";
}
.fa-bullhorn:before {
content: "\f0a1";
}
.fa-bell:before {
content: "\f0f3";
}
.fa-certificate:before {
content: "\f0a3";
}
.fa-hand-o-right:before {
content: "\f0a4";
}
.fa-hand-o-left:before {
content: "\f0a5";
}
.fa-hand-o-up:before {
content: "\f0a6";
}
.fa-hand-o-down:before {
content: "\f0a7";
}
.fa-arrow-circle-left:before {
content: "\f0a8";
}
.fa-arrow-circle-right:before {
content: "\f0a9";
}
.fa-arrow-circle-up:before {
content: "\f0aa";
}
.fa-arrow-circle-down:before {
content: "\f0ab";
}
.fa-globe:before {
content: "\f0ac";
}
.fa-wrench:before {
content: "\f0ad";
}
.fa-tasks:before {
content: "\f0ae";
}
.fa-filter:before {
content: "\f0b0";
}
.fa-briefcase:before {
content: "\f0b1";
}
.fa-arrows-alt:before {
content: "\f0b2";
}
.fa-group:before,
.fa-users:before {
content: "\f0c0";
}
.fa-chain:before,
.fa-link:before {
content: "\f0c1";
}
.fa-cloud:before {
content: "\f0c2";
}
.fa-flask:before {
content: "\f0c3";
}
.fa-cut:before,
.fa-scissors:before {
content: "\f0c4";
}
.fa-copy:before,
.fa-files-o:before {
content: "\f0c5";
}
.fa-paperclip:before {
content: "\f0c6";
}
.fa-save:before,
.fa-floppy-o:before {
content: "\f0c7";
}
.fa-square:before {
content: "\f0c8";
}
.fa-navicon:before,
.fa-reorder:before,
.fa-bars:before {
content: "\f0c9";
}
.fa-list-ul:before {
content: "\f0ca";
}
.fa-list-ol:before {
content: "\f0cb";
}
.fa-strikethrough:before {
content: "\f0cc";
}
.fa-underline:before {
content: "\f0cd";
}
.fa-table:before {
content: "\f0ce";
}
.fa-magic:before {
content: "\f0d0";
}
.fa-truck:before {
content: "\f0d1";
}
.fa-pinterest:before {
content: "\f0d2";
}
.fa-pinterest-square:before {
content: "\f0d3";
}
.fa-google-plus-square:before {
content: "\f0d4";
}
.fa-google-plus:before {
content: "\f0d5";
}
.fa-money:before {
content: "\f0d6";
}
.fa-caret-down:before {
content: "\f0d7";
}
.fa-caret-up:before {
content: "\f0d8";
}
.fa-caret-left:before {
content: "\f0d9";
}
.fa-caret-right:before {
content: "\f0da";
}
.fa-columns:before {
content: "\f0db";
}
.fa-unsorted:before,
.fa-sort:before {
content: "\f0dc";
}
.fa-sort-down:before,
.fa-sort-desc:before {
content: "\f0dd";
}
.fa-sort-up:before,
.fa-sort-asc:before {
content: "\f0de";
}
.fa-envelope:before {
content: "\f0e0";
}
.fa-linkedin:before {
content: "\f0e1";
}
.fa-rotate-left:before,
.fa-undo:before {
content: "\f0e2";
}
.fa-legal:before,
.fa-gavel:before {
content: "\f0e3";
}
.fa-dashboard:before,
.fa-tachometer:before {
content: "\f0e4";
}
.fa-comment-o:before {
content: "\f0e5";
}
.fa-comments-o:before {
content: "\f0e6";
}
.fa-flash:before,
.fa-bolt:before {
content: "\f0e7";
}
.fa-sitemap:before {
content: "\f0e8";
}
.fa-umbrella:before {
content: "\f0e9";
}
.fa-paste:before,
.fa-clipboard:before {
content: "\f0ea";
}
.fa-lightbulb-o:before {
content: "\f0eb";
}
.fa-exchange:before {
content: "\f0ec";
}
.fa-cloud-download:before {
content: "\f0ed";
}
.fa-cloud-upload:before {
content: "\f0ee";
}
.fa-user-md:before {
content: "\f0f0";
}
.fa-stethoscope:before {
content: "\f0f1";
}
.fa-suitcase:before {
content: "\f0f2";
}
.fa-bell-o:before {
content: "\f0a2";
}
.fa-coffee:before {
content: "\f0f4";
}
.fa-cutlery:before {
content: "\f0f5";
}
.fa-file-text-o:before {
content: "\f0f6";
}
.fa-building-o:before {
content: "\f0f7";
}
.fa-hospital-o:before {
content: "\f0f8";
}
.fa-ambulance:before {
content: "\f0f9";
}
.fa-medkit:before {
content: "\f0fa";
}
.fa-fighter-jet:before {
content: "\f0fb";
}
.fa-beer:before {
content: "\f0fc";
}
.fa-h-square:before {
content: "\f0fd";
}
.fa-plus-square:before {
content: "\f0fe";
}
.fa-angle-double-left:before {
content: "\f100";
}
.fa-angle-double-right:before {
content: "\f101";
}
.fa-angle-double-up:before {
content: "\f102";
}
.fa-angle-double-down:before {
content: "\f103";
}
.fa-angle-left:before {
content: "\f104";
}
.fa-angle-right:before {
content: "\f105";
}
.fa-angle-up:before {
content: "\f106";
}
.fa-angle-down:before {
content: "\f107";
}
.fa-desktop:before {
content: "\f108";
}
.fa-laptop:before {
content: "\f109";
}
.fa-tablet:before {
content: "\f10a";
}
.fa-mobile-phone:before,
.fa-mobile:before {
content: "\f10b";
}
.fa-circle-o:before {
content: "\f10c";
}
.fa-quote-left:before {
content: "\f10d";
}
.fa-quote-right:before {
content: "\f10e";
}
.fa-spinner:before {
content: "\f110";
}
.fa-circle:before {
content: "\f111";
}
.fa-mail-reply:before,
.fa-reply:before {
content: "\f112";
}
.fa-github-alt:before {
content: "\f113";
}
.fa-folder-o:before {
content: "\f114";
}
.fa-folder-open-o:before {
content: "\f115";
}
.fa-smile-o:before {
content: "\f118";
}
.fa-frown-o:before {
content: "\f119";
}
.fa-meh-o:before {
content: "\f11a";
}
.fa-gamepad:before {
content: "\f11b";
}
.fa-keyboard-o:before {
content: "\f11c";
}
.fa-flag-o:before {
content: "\f11d";
}
.fa-flag-checkered:before {
content: "\f11e";
}
.fa-terminal:before {
content: "\f120";
}
.fa-code:before {
content: "\f121";
}
.fa-mail-reply-all:before,
.fa-reply-all:before {
content: "\f122";
}
.fa-star-half-empty:before,
.fa-star-half-full:before,
.fa-star-half-o:before {
content: "\f123";
}
.fa-location-arrow:before {
content: "\f124";
}
.fa-crop:before {
content: "\f125";
}
.fa-code-fork:before {
content: "\f126";
}
.fa-unlink:before,
.fa-chain-broken:before {
content: "\f127";
}
.fa-question:before {
content: "\f128";
}
.fa-info:before {
content: "\f129";
}
.fa-exclamation:before {
content: "\f12a";
}
.fa-superscript:before {
content: "\f12b";
}
.fa-subscript:before {
content: "\f12c";
}
.fa-eraser:before {
content: "\f12d";
}
.fa-puzzle-piece:before {
content: "\f12e";
}
.fa-microphone:before {
content: "\f130";
}
.fa-microphone-slash:before {
content: "\f131";
}
.fa-shield:before {
content: "\f132";
}
.fa-calendar-o:before {
content: "\f133";
}
.fa-fire-extinguisher:before {
content: "\f134";
}
.fa-rocket:before {
content: "\f135";
}
.fa-maxcdn:before {
content: "\f136";
}
.fa-chevron-circle-left:before {
content: "\f137";
}
.fa-chevron-circle-right:before {
content: "\f138";
}
.fa-chevron-circle-up:before {
content: "\f139";
}
.fa-chevron-circle-down:before {
content: "\f13a";
}
.fa-html5:before {
content: "\f13b";
}
.fa-css3:before {
content: "\f13c";
}
.fa-anchor:before {
content: "\f13d";
}
.fa-unlock-alt:before {
content: "\f13e";
}
.fa-bullseye:before {
content: "\f140";
}
.fa-ellipsis-h:before {
content: "\f141";
}
.fa-ellipsis-v:before {
content: "\f142";
}
.fa-rss-square:before {
content: "\f143";
}
.fa-play-circle:before {
content: "\f144";
}
.fa-ticket:before {
content: "\f145";
}
.fa-minus-square:before {
content: "\f146";
}
.fa-minus-square-o:before {
content: "\f147";
}
.fa-level-up:before {
content: "\f148";
}
.fa-level-down:before {
content: "\f149";
}
.fa-check-square:before {
content: "\f14a";
}
.fa-pencil-square:before {
content: "\f14b";
}
.fa-external-link-square:before {
content: "\f14c";
}
.fa-share-square:before {
content: "\f14d";
}
.fa-compass:before {
content: "\f14e";
}
.fa-toggle-down:before,
.fa-caret-square-o-down:before {
content: "\f150";
}
.fa-toggle-up:before,
.fa-caret-square-o-up:before {
content: "\f151";
}
.fa-toggle-right:before,
.fa-caret-square-o-right:before {
content: "\f152";
}
.fa-euro:before,
.fa-eur:before {
content: "\f153";
}
.fa-gbp:before {
content: "\f154";
}
.fa-dollar:before,
.fa-usd:before {
content: "\f155";
}
.fa-rupee:before,
.fa-inr:before {
content: "\f156";
}
.fa-cny:before,
.fa-rmb:before,
.fa-yen:before,
.fa-jpy:before {
content: "\f157";
}
.fa-ruble:before,
.fa-rouble:before,
.fa-rub:before {
content: "\f158";
}
.fa-won:before,
.fa-krw:before {
content: "\f159";
}
.fa-bitcoin:before,
.fa-btc:before {
content: "\f15a";
}
.fa-file:before {
content: "\f15b";
}
.fa-file-text:before {
content: "\f15c";
}
.fa-sort-alpha-asc:before {
content: "\f15d";
}
.fa-sort-alpha-desc:before {
content: "\f15e";
}
.fa-sort-amount-asc:before {
content: "\f160";
}
.fa-sort-amount-desc:before {
content: "\f161";
}
.fa-sort-numeric-asc:before {
content: "\f162";
}
.fa-sort-numeric-desc:before {
content: "\f163";
}
.fa-thumbs-up:before {
content: "\f164";
}
.fa-thumbs-down:before {
content: "\f165";
}
.fa-youtube-square:before {
content: "\f166";
}
.fa-youtube:before {
content: "\f167";
}
.fa-xing:before {
content: "\f168";
}
.fa-xing-square:before {
content: "\f169";
}
.fa-youtube-play:before {
content: "\f16a";
}
.fa-dropbox:before {
content: "\f16b";
}
.fa-stack-overflow:before {
content: "\f16c";
}
.fa-instagram:before {
content: "\f16d";
}
.fa-flickr:before {
content: "\f16e";
}
.fa-adn:before {
content: "\f170";
}
.fa-bitbucket:before {
content: "\f171";
}
.fa-bitbucket-square:before {
content: "\f172";
}
.fa-tumblr:before {
content: "\f173";
}
.fa-tumblr-square:before {
content: "\f174";
}
.fa-long-arrow-down:before {
content: "\f175";
}
.fa-long-arrow-up:before {
content: "\f176";
}
.fa-long-arrow-left:before {
content: "\f177";
}
.fa-long-arrow-right:before {
content: "\f178";
}
.fa-apple:before {
content: "\f179";
}
.fa-windows:before {
content: "\f17a";
}
.fa-android:before {
content: "\f17b";
}
.fa-linux:before {
content: "\f17c";
}
.fa-dribbble:before {
content: "\f17d";
}
.fa-skype:before {
content: "\f17e";
}
.fa-foursquare:before {
content: "\f180";
}
.fa-trello:before {
content: "\f181";
}
.fa-female:before {
content: "\f182";
}
.fa-male:before {
content: "\f183";
}
.fa-gittip:before,
.fa-gratipay:before {
content: "\f184";
}
.fa-sun-o:before {
content: "\f185";
}
.fa-moon-o:before {
content: "\f186";
}
.fa-archive:before {
content: "\f187";
}
.fa-bug:before {
content: "\f188";
}
.fa-vk:before {
content: "\f189";
}
.fa-weibo:before {
content: "\f18a";
}
.fa-renren:before {
content: "\f18b";
}
.fa-pagelines:before {
content: "\f18c";
}
.fa-stack-exchange:before {
content: "\f18d";
}
.fa-arrow-circle-o-right:before {
content: "\f18e";
}
.fa-arrow-circle-o-left:before {
content: "\f190";
}
.fa-toggle-left:before,
.fa-caret-square-o-left:before {
content: "\f191";
}
.fa-dot-circle-o:before {
content: "\f192";
}
.fa-wheelchair:before {
content: "\f193";
}
.fa-vimeo-square:before {
content: "\f194";
}
.fa-turkish-lira:before,
.fa-try:before {
content: "\f195";
}
.fa-plus-square-o:before {
content: "\f196";
}
.fa-space-shuttle:before {
content: "\f197";
}
.fa-slack:before {
content: "\f198";
}
.fa-envelope-square:before {
content: "\f199";
}
.fa-wordpress:before {
content: "\f19a";
}
.fa-openid:before {
content: "\f19b";
}
.fa-institution:before,
.fa-bank:before,
.fa-university:before {
content: "\f19c";
}
.fa-mortar-board:before,
.fa-graduation-cap:before {
content: "\f19d";
}
.fa-yahoo:before {
content: "\f19e";
}
.fa-google:before {
content: "\f1a0";
}
.fa-reddit:before {
content: "\f1a1";
}
.fa-reddit-square:before {
content: "\f1a2";
}
.fa-stumbleupon-circle:before {
content: "\f1a3";
}
.fa-stumbleupon:before {
content: "\f1a4";
}
.fa-delicious:before {
content: "\f1a5";
}
.fa-digg:before {
content: "\f1a6";
}
.fa-pied-piper-pp:before {
content: "\f1a7";
}
.fa-pied-piper-alt:before {
content: "\f1a8";
}
.fa-drupal:before {
content: "\f1a9";
}
.fa-joomla:before {
content: "\f1aa";
}
.fa-language:before {
content: "\f1ab";
}
.fa-fax:before {
content: "\f1ac";
}
.fa-building:before {
content: "\f1ad";
}
.fa-child:before {
content: "\f1ae";
}
.fa-paw:before {
content: "\f1b0";
}
.fa-spoon:before {
content: "\f1b1";
}
.fa-cube:before {
content: "\f1b2";
}
.fa-cubes:before {
content: "\f1b3";
}
.fa-behance:before {
content: "\f1b4";
}
.fa-behance-square:before {
content: "\f1b5";
}
.fa-steam:before {
content: "\f1b6";
}
.fa-steam-square:before {
content: "\f1b7";
}
.fa-recycle:before {
content: "\f1b8";
}
.fa-automobile:before,
.fa-car:before {
content: "\f1b9";
}
.fa-cab:before,
.fa-taxi:before {
content: "\f1ba";
}
.fa-tree:before {
content: "\f1bb";
}
.fa-spotify:before {
content: "\f1bc";
}
.fa-deviantart:before {
content: "\f1bd";
}
.fa-soundcloud:before {
content: "\f1be";
}
.fa-database:before {
content: "\f1c0";
}
.fa-file-pdf-o:before {
content: "\f1c1";
}
.fa-file-word-o:before {
content: "\f1c2";
}
.fa-file-excel-o:before {
content: "\f1c3";
}
.fa-file-powerpoint-o:before {
content: "\f1c4";
}
.fa-file-photo-o:before,
.fa-file-picture-o:before,
.fa-file-image-o:before {
content: "\f1c5";
}
.fa-file-zip-o:before,
.fa-file-archive-o:before {
content: "\f1c6";
}
.fa-file-sound-o:before,
.fa-file-audio-o:before {
content: "\f1c7";
}
.fa-file-movie-o:before,
.fa-file-video-o:before {
content: "\f1c8";
}
.fa-file-code-o:before {
content: "\f1c9";
}
.fa-vine:before {
content: "\f1ca";
}
.fa-codepen:before {
content: "\f1cb";
}
.fa-jsfiddle:before {
content: "\f1cc";
}
.fa-life-bouy:before,
.fa-life-buoy:before,
.fa-life-saver:before,
.fa-support:before,
.fa-life-ring:before {
content: "\f1cd";
}
.fa-circle-o-notch:before {
content: "\f1ce";
}
.fa-ra:before,
.fa-resistance:before,
.fa-rebel:before {
content: "\f1d0";
}
.fa-ge:before,
.fa-empire:before {
content: "\f1d1";
}
.fa-git-square:before {
content: "\f1d2";
}
.fa-git:before {
content: "\f1d3";
}
.fa-y-combinator-square:before,
.fa-yc-square:before,
.fa-hacker-news:before {
content: "\f1d4";
}
.fa-tencent-weibo:before {
content: "\f1d5";
}
.fa-qq:before {
content: "\f1d6";
}
.fa-wechat:before,
.fa-weixin:before {
content: "\f1d7";
}
.fa-send:before,
.fa-paper-plane:before {
content: "\f1d8";
}
.fa-send-o:before,
.fa-paper-plane-o:before {
content: "\f1d9";
}
.fa-history:before {
content: "\f1da";
}
.fa-circle-thin:before {
content: "\f1db";
}
.fa-header:before {
content: "\f1dc";
}
.fa-paragraph:before {
content: "\f1dd";
}
.fa-sliders:before {
content: "\f1de";
}
.fa-share-alt:before {
content: "\f1e0";
}
.fa-share-alt-square:before {
content: "\f1e1";
}
.fa-bomb:before {
content: "\f1e2";
}
.fa-soccer-ball-o:before,
.fa-futbol-o:before {
content: "\f1e3";
}
.fa-tty:before {
content: "\f1e4";
}
.fa-binoculars:before {
content: "\f1e5";
}
.fa-plug:before {
content: "\f1e6";
}
.fa-slideshare:before {
content: "\f1e7";
}
.fa-twitch:before {
content: "\f1e8";
}
.fa-yelp:before {
content: "\f1e9";
}
.fa-newspaper-o:before {
content: "\f1ea";
}
.fa-wifi:before {
content: "\f1eb";
}
.fa-calculator:before {
content: "\f1ec";
}
.fa-paypal:before {
content: "\f1ed";
}
.fa-google-wallet:before {
content: "\f1ee";
}
.fa-cc-visa:before {
content: "\f1f0";
}
.fa-cc-mastercard:before {
content: "\f1f1";
}
.fa-cc-discover:before {
content: "\f1f2";
}
.fa-cc-amex:before {
content: "\f1f3";
}
.fa-cc-paypal:before {
content: "\f1f4";
}
.fa-cc-stripe:before {
content: "\f1f5";
}
.fa-bell-slash:before {
content: "\f1f6";
}
.fa-bell-slash-o:before {
content: "\f1f7";
}
.fa-trash:before {
content: "\f1f8";
}
.fa-copyright:before {
content: "\f1f9";
}
.fa-at:before {
content: "\f1fa";
}
.fa-eyedropper:before {
content: "\f1fb";
}
.fa-paint-brush:before {
content: "\f1fc";
}
.fa-birthday-cake:before {
content: "\f1fd";
}
.fa-area-chart:before {
content: "\f1fe";
}
.fa-pie-chart:before {
content: "\f200";
}
.fa-line-chart:before {
content: "\f201";
}
.fa-lastfm:before {
content: "\f202";
}
.fa-lastfm-square:before {
content: "\f203";
}
.fa-toggle-off:before {
content: "\f204";
}
.fa-toggle-on:before {
content: "\f205";
}
.fa-bicycle:before {
content: "\f206";
}
.fa-bus:before {
content: "\f207";
}
.fa-ioxhost:before {
content: "\f208";
}
.fa-angellist:before {
content: "\f209";
}
.fa-cc:before {
content: "\f20a";
}
.fa-shekel:before,
.fa-sheqel:before,
.fa-ils:before {
content: "\f20b";
}
.fa-meanpath:before {
content: "\f20c";
}
.fa-buysellads:before {
content: "\f20d";
}
.fa-connectdevelop:before {
content: "\f20e";
}
.fa-dashcube:before {
content: "\f210";
}
.fa-forumbee:before {
content: "\f211";
}
.fa-leanpub:before {
content: "\f212";
}
.fa-sellsy:before {
content: "\f213";
}
.fa-shirtsinbulk:before {
content: "\f214";
}
.fa-simplybuilt:before {
content: "\f215";
}
.fa-skyatlas:before {
content: "\f216";
}
.fa-cart-plus:before {
content: "\f217";
}
.fa-cart-arrow-down:before {
content: "\f218";
}
.fa-diamond:before {
content: "\f219";
}
.fa-ship:before {
content: "\f21a";
}
.fa-user-secret:before {
content: "\f21b";
}
.fa-motorcycle:before {
content: "\f21c";
}
.fa-street-view:before {
content: "\f21d";
}
.fa-heartbeat:before {
content: "\f21e";
}
.fa-venus:before {
content: "\f221";
}
.fa-mars:before {
content: "\f222";
}
.fa-mercury:before {
content: "\f223";
}
.fa-intersex:before,
.fa-transgender:before {
content: "\f224";
}
.fa-transgender-alt:before {
content: "\f225";
}
.fa-venus-double:before {
content: "\f226";
}
.fa-mars-double:before {
content: "\f227";
}
.fa-venus-mars:before {
content: "\f228";
}
.fa-mars-stroke:before {
content: "\f229";
}
.fa-mars-stroke-v:before {
content: "\f22a";
}
.fa-mars-stroke-h:before {
content: "\f22b";
}
.fa-neuter:before {
content: "\f22c";
}
.fa-genderless:before {
content: "\f22d";
}
.fa-facebook-official:before {
content: "\f230";
}
.fa-pinterest-p:before {
content: "\f231";
}
.fa-whatsapp:before {
content: "\f232";
}
.fa-server:before {
content: "\f233";
}
.fa-user-plus:before {
content: "\f234";
}
.fa-user-times:before {
content: "\f235";
}
.fa-hotel:before,
.fa-bed:before {
content: "\f236";
}
.fa-viacoin:before {
content: "\f237";
}
.fa-train:before {
content: "\f238";
}
.fa-subway:before {
content: "\f239";
}
.fa-medium:before {
content: "\f23a";
}
.fa-yc:before,
.fa-y-combinator:before {
content: "\f23b";
}
.fa-optin-monster:before {
content: "\f23c";
}
.fa-opencart:before {
content: "\f23d";
}
.fa-expeditedssl:before {
content: "\f23e";
}
.fa-battery-4:before,
.fa-battery:before,
.fa-battery-full:before {
content: "\f240";
}
.fa-battery-3:before,
.fa-battery-three-quarters:before {
content: "\f241";
}
.fa-battery-2:before,
.fa-battery-half:before {
content: "\f242";
}
.fa-battery-1:before,
.fa-battery-quarter:before {
content: "\f243";
}
.fa-battery-0:before,
.fa-battery-empty:before {
content: "\f244";
}
.fa-mouse-pointer:before {
content: "\f245";
}
.fa-i-cursor:before {
content: "\f246";
}
.fa-object-group:before {
content: "\f247";
}
.fa-object-ungroup:before {
content: "\f248";
}
.fa-sticky-note:before {
content: "\f249";
}
.fa-sticky-note-o:before {
content: "\f24a";
}
.fa-cc-jcb:before {
content: "\f24b";
}
.fa-cc-diners-club:before {
content: "\f24c";
}
.fa-clone:before {
content: "\f24d";
}
.fa-balance-scale:before {
content: "\f24e";
}
.fa-hourglass-o:before {
content: "\f250";
}
.fa-hourglass-1:before,
.fa-hourglass-start:before {
content: "\f251";
}
.fa-hourglass-2:before,
.fa-hourglass-half:before {
content: "\f252";
}
.fa-hourglass-3:before,
.fa-hourglass-end:before {
content: "\f253";
}
.fa-hourglass:before {
content: "\f254";
}
.fa-hand-grab-o:before,
.fa-hand-rock-o:before {
content: "\f255";
}
.fa-hand-stop-o:before,
.fa-hand-paper-o:before {
content: "\f256";
}
.fa-hand-scissors-o:before {
content: "\f257";
}
.fa-hand-lizard-o:before {
content: "\f258";
}
.fa-hand-spock-o:before {
content: "\f259";
}
.fa-hand-pointer-o:before {
content: "\f25a";
}
.fa-hand-peace-o:before {
content: "\f25b";
}
.fa-trademark:before {
content: "\f25c";
}
.fa-registered:before {
content: "\f25d";
}
.fa-creative-commons:before {
content: "\f25e";
}
.fa-gg:before {
content: "\f260";
}
.fa-gg-circle:before {
content: "\f261";
}
.fa-tripadvisor:before {
content: "\f262";
}
.fa-odnoklassniki:before {
content: "\f263";
}
.fa-odnoklassniki-square:before {
content: "\f264";
}
.fa-get-pocket:before {
content: "\f265";
}
.fa-wikipedia-w:before {
content: "\f266";
}
.fa-safari:before {
content: "\f267";
}
.fa-chrome:before {
content: "\f268";
}
.fa-firefox:before {
content: "\f269";
}
.fa-opera:before {
content: "\f26a";
}
.fa-internet-explorer:before {
content: "\f26b";
}
.fa-tv:before,
.fa-television:before {
content: "\f26c";
}
.fa-contao:before {
content: "\f26d";
}
.fa-500px:before {
content: "\f26e";
}
.fa-amazon:before {
content: "\f270";
}
.fa-calendar-plus-o:before {
content: "\f271";
}
.fa-calendar-minus-o:before {
content: "\f272";
}
.fa-calendar-times-o:before {
content: "\f273";
}
.fa-calendar-check-o:before {
content: "\f274";
}
.fa-industry:before {
content: "\f275";
}
.fa-map-pin:before {
content: "\f276";
}
.fa-map-signs:before {
content: "\f277";
}
.fa-map-o:before {
content: "\f278";
}
.fa-map:before {
content: "\f279";
}
.fa-commenting:before {
content: "\f27a";
}
.fa-commenting-o:before {
content: "\f27b";
}
.fa-houzz:before {
content: "\f27c";
}
.fa-vimeo:before {
content: "\f27d";
}
.fa-black-tie:before {
content: "\f27e";
}
.fa-fonticons:before {
content: "\f280";
}
.fa-reddit-alien:before {
content: "\f281";
}
.fa-edge:before {
content: "\f282";
}
.fa-credit-card-alt:before {
content: "\f283";
}
.fa-codiepie:before {
content: "\f284";
}
.fa-modx:before {
content: "\f285";
}
.fa-fort-awesome:before {
content: "\f286";
}
.fa-usb:before {
content: "\f287";
}
.fa-product-hunt:before {
content: "\f288";
}
.fa-mixcloud:before {
content: "\f289";
}
.fa-scribd:before {
content: "\f28a";
}
.fa-pause-circle:before {
content: "\f28b";
}
.fa-pause-circle-o:before {
content: "\f28c";
}
.fa-stop-circle:before {
content: "\f28d";
}
.fa-stop-circle-o:before {
content: "\f28e";
}
.fa-shopping-bag:before {
content: "\f290";
}
.fa-shopping-basket:before {
content: "\f291";
}
.fa-hashtag:before {
content: "\f292";
}
.fa-bluetooth:before {
content: "\f293";
}
.fa-bluetooth-b:before {
content: "\f294";
}
.fa-percent:before {
content: "\f295";
}
.fa-gitlab:before {
content: "\f296";
}
.fa-wpbeginner:before {
content: "\f297";
}
.fa-wpforms:before {
content: "\f298";
}
.fa-envira:before {
content: "\f299";
}
.fa-universal-access:before {
content: "\f29a";
}
.fa-wheelchair-alt:before {
content: "\f29b";
}
.fa-question-circle-o:before {
content: "\f29c";
}
.fa-blind:before {
content: "\f29d";
}
.fa-audio-description:before {
content: "\f29e";
}
.fa-volume-control-phone:before {
content: "\f2a0";
}
.fa-braille:before {
content: "\f2a1";
}
.fa-assistive-listening-systems:before {
content: "\f2a2";
}
.fa-asl-interpreting:before,
.fa-american-sign-language-interpreting:before {
content: "\f2a3";
}
.fa-deafness:before,
.fa-hard-of-hearing:before,
.fa-deaf:before {
content: "\f2a4";
}
.fa-glide:before {
content: "\f2a5";
}
.fa-glide-g:before {
content: "\f2a6";
}
.fa-signing:before,
.fa-sign-language:before {
content: "\f2a7";
}
.fa-low-vision:before {
content: "\f2a8";
}
.fa-viadeo:before {
content: "\f2a9";
}
.fa-viadeo-square:before {
content: "\f2aa";
}
.fa-snapchat:before {
content: "\f2ab";
}
.fa-snapchat-ghost:before {
content: "\f2ac";
}
.fa-snapchat-square:before {
content: "\f2ad";
}
.fa-pied-piper:before {
content: "\f2ae";
}
.fa-first-order:before {
content: "\f2b0";
}
.fa-yoast:before {
content: "\f2b1";
}
.fa-themeisle:before {
content: "\f2b2";
}
.fa-google-plus-circle:before,
.fa-google-plus-official:before {
content: "\f2b3";
}
.fa-fa:before,
.fa-font-awesome:before {
content: "\f2b4";
}
.fa-handshake-o:before {
content: "\f2b5";
}
.fa-envelope-open:before {
content: "\f2b6";
}
.fa-envelope-open-o:before {
content: "\f2b7";
}
.fa-linode:before {
content: "\f2b8";
}
.fa-address-book:before {
content: "\f2b9";
}
.fa-address-book-o:before {
content: "\f2ba";
}
.fa-vcard:before,
.fa-address-card:before {
content: "\f2bb";
}
.fa-vcard-o:before,
.fa-address-card-o:before {
content: "\f2bc";
}
.fa-user-circle:before {
content: "\f2bd";
}
.fa-user-circle-o:before {
content: "\f2be";
}
.fa-user-o:before {
content: "\f2c0";
}
.fa-id-badge:before {
content: "\f2c1";
}
.fa-drivers-license:before,
.fa-id-card:before {
content: "\f2c2";
}
.fa-drivers-license-o:before,
.fa-id-card-o:before {
content: "\f2c3";
}
.fa-quora:before {
content: "\f2c4";
}
.fa-free-code-camp:before {
content: "\f2c5";
}
.fa-telegram:before {
content: "\f2c6";
}
.fa-thermometer-4:before,
.fa-thermometer:before,
.fa-thermometer-full:before {
content: "\f2c7";
}
.fa-thermometer-3:before,
.fa-thermometer-three-quarters:before {
content: "\f2c8";
}
.fa-thermometer-2:before,
.fa-thermometer-half:before {
content: "\f2c9";
}
.fa-thermometer-1:before,
.fa-thermometer-quarter:before {
content: "\f2ca";
}
.fa-thermometer-0:before,
.fa-thermometer-empty:before {
content: "\f2cb";
}
.fa-shower:before {
content: "\f2cc";
}
.fa-bathtub:before,
.fa-s15:before,
.fa-bath:before {
content: "\f2cd";
}
.fa-podcast:before {
content: "\f2ce";
}
.fa-window-maximize:before {
content: "\f2d0";
}
.fa-window-minimize:before {
content: "\f2d1";
}
.fa-window-restore:before {
content: "\f2d2";
}
.fa-times-rectangle:before,
.fa-window-close:before {
content: "\f2d3";
}
.fa-times-rectangle-o:before,
.fa-window-close-o:before {
content: "\f2d4";
}
.fa-bandcamp:before {
content: "\f2d5";
}
.fa-grav:before {
content: "\f2d6";
}
.fa-etsy:before {
content: "\f2d7";
}
.fa-imdb:before {
content: "\f2d8";
}
.fa-ravelry:before {
content: "\f2d9";
}
.fa-eercast:before {
content: "\f2da";
}
.fa-microchip:before {
content: "\f2db";
}
.fa-snowflake-o:before {
content: "\f2dc";
}
.fa-superpowers:before {
content: "\f2dd";
}
.fa-wpexplorer:before {
content: "\f2de";
}
.fa-meetup:before {
content: "\f2e0";
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
================================================
FILE: source/lib/jquery/.bower.json
================================================
{
"name": "jquery",
"_cacheHeaders": {
"ETag": "\"5492efef-14960\"",
"Last-Modified": "Thu, 18 Dec 2014 15:17:03 GMT",
"Content-Length": "84320",
"Content-Type": "application/x-javascript"
},
"_release": "e-tag:5492efef-",
"main": "index.js",
"_source": "http://code.jquery.com/jquery-2.1.3.min.js",
"_target": "*",
"_originalSource": "http://code.jquery.com/jquery-2.1.3.min.js",
"_direct": true
}
================================================
FILE: source/lib/jquery/index.js
================================================
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)
},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),f.removeChild(c),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec=/#.*$/,fc=/([?&])_=[^&]*/,gc=/^(.*?):[ \t]*([^\r\n]*)$/gm,hc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ic=/^(?:GET|HEAD)$/,jc=/^\/\//,kc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,lc={},mc={},nc="*/".concat("*"),oc=a.location.href,pc=kc.exec(oc.toLowerCase())||[];function qc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function rc(a,b,c,d){var e={},f=a===mc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function sc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function tc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function uc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:oc,type:"GET",isLocal:hc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":nc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?sc(sc(a,n.ajaxSettings),b):sc(n.ajaxSettings,a)},ajaxPrefilter:qc(lc),ajaxTransport:qc(mc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=gc.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||oc)+"").replace(ec,"").replace(jc,pc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=kc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===pc[1]&&h[2]===pc[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),rc(lc,k,b,v),2===t)return v;i=n.event&&k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!ic.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=fc.test(d)?d.replace(fc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+nc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=rc(mc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=tc(k,v,f)),u=uc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var vc=/%20/g,wc=/\[\]$/,xc=/\r?\n/g,yc=/^(?:submit|button|image|reset|file)$/i,zc=/^(?:input|select|textarea|keygen)/i;function Ac(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||wc.test(a)?d(a,e):Ac(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Ac(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Ac(c,a[c],b,e);return d.join("&").replace(vc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&zc.test(this.nodeName)&&!yc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(xc,"\r\n")}}):{name:b.name,value:c.replace(xc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Bc=0,Cc={},Dc={0:200,1223:204},Ec=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Cc)Cc[a]()}),k.cors=!!Ec&&"withCredentials"in Ec,k.ajax=Ec=!!Ec,n.ajaxTransport(function(a){var b;return k.cors||Ec&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Bc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Cc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Dc[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Cc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("
```
You must alter your HTML code. URL of the real image must be put into data-original attribute. It is good idea to give Lazy Loaded image a specific class. This way you can easily control which images plugin is binded to. Note that you should have width and height attributes in your image tag.
```html
```
then in your code do:
```js
$("img.lazy").lazyload();
```
This causes all images of class lazy to be lazy loaded.
More information on [Lazy Load](http://www.appelsiini.net/projects/lazyload) project page.
## Install
You can install with [bower](http://bower.io/) or [npm](https://www.npmjs.com/).
```sh
$ bower install jquery.lazyload
$ npm install jquery-lazyload
```
# License
All code licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php). All images licensed under [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/deed.en_US). In other words you are basically free to do whatever you want. Just don't remove my name from the source.
================================================
FILE: source/lib/jquery_lazyload/bower.json
================================================
{
"name": "jquery_lazyload",
"version": "1.9.4",
"homepage": "http://www.appelsiini.net/projects/lazyload",
"authors": [
"Mika Tuupola "
],
"description": "jQuery plugin for lazy loading images",
"main": [
"jquery.lazyload.js",
"jquery.scrollstop.js"
],
"license": "MIT",
"ignore": [
"**/.*",
"**/*.min.js",
"**/*.html",
"**/*.textile",
"Gruntfile.js",
"lazyload.jquery.json",
"package.json",
"node_modules",
"bower_components",
"test",
"img"
]
}
================================================
FILE: source/lib/jquery_lazyload/jquery.lazyload.js
================================================
/*!
* Lazy Load - jQuery plugin for lazy loading images
*
* Copyright (c) 2007-2015 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Project home:
* http://www.appelsiini.net/projects/lazyload
*
* Version: 1.9.7
*
*/
(function($, window, document, undefined) {
var $window = $(window);
$.fn.lazyload = function(options) {
var elements = this;
var $container;
var settings = {
threshold : 0,
failure_limit : 0,
event : "scroll",
effect : "show",
container : window,
data_attribute : "original",
skip_invisible : false,
appear : null,
load : null,
placeholder : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"
};
function update() {
var counter = 0;
elements.each(function() {
var $this = $(this);
if (settings.skip_invisible && !$this.is(":visible")) {
return;
}
if ($.abovethetop(this, settings) ||
$.leftofbegin(this, settings)) {
/* Nothing. */
} else if (!$.belowthefold(this, settings) &&
!$.rightoffold(this, settings)) {
$this.trigger("appear");
/* if we found an image we'll load, reset the counter */
counter = 0;
} else {
if (++counter > settings.failure_limit) {
return false;
}
}
});
}
if(options) {
/* Maintain BC for a couple of versions. */
if (undefined !== options.failurelimit) {
options.failure_limit = options.failurelimit;
delete options.failurelimit;
}
if (undefined !== options.effectspeed) {
options.effect_speed = options.effectspeed;
delete options.effectspeed;
}
$.extend(settings, options);
}
/* Cache container as jQuery as object. */
$container = (settings.container === undefined ||
settings.container === window) ? $window : $(settings.container);
/* Fire one scroll event per scroll. Not one scroll event per image. */
if (0 === settings.event.indexOf("scroll")) {
$container.bind(settings.event, function() {
return update();
});
}
this.each(function() {
var self = this;
var $self = $(self);
self.loaded = false;
/* If no src attribute given use data:uri. */
if ($self.attr("src") === undefined || $self.attr("src") === false) {
if ($self.is("img")) {
$self.attr("src", settings.placeholder);
}
}
/* When appear is triggered load original image. */
$self.one("appear", function() {
if (!this.loaded) {
if (settings.appear) {
var elements_left = elements.length;
settings.appear.call(self, elements_left, settings);
}
$("
")
.bind("load", function() {
var original = $self.attr("data-" + settings.data_attribute);
$self.hide();
if ($self.is("img")) {
$self.attr("src", original);
} else {
$self.css("background-image", "url('" + original + "')");
}
$self[settings.effect](settings.effect_speed);
self.loaded = true;
/* Remove image from array so it is not looped next time. */
var temp = $.grep(elements, function(element) {
return !element.loaded;
});
elements = $(temp);
if (settings.load) {
var elements_left = elements.length;
settings.load.call(self, elements_left, settings);
}
})
.attr("src", $self.attr("data-" + settings.data_attribute));
}
});
/* When wanted event is triggered load original image */
/* by triggering appear. */
if (0 !== settings.event.indexOf("scroll")) {
$self.bind(settings.event, function() {
if (!self.loaded) {
$self.trigger("appear");
}
});
}
});
/* Check if something appears when window is resized. */
$window.bind("resize", function() {
update();
});
/* With IOS5 force loading images when navigating with back button. */
/* Non optimal workaround. */
if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) {
$window.bind("pageshow", function(event) {
if (event.originalEvent && event.originalEvent.persisted) {
elements.each(function() {
$(this).trigger("appear");
});
}
});
}
/* Force initial check if images should appear. */
$(document).ready(function() {
update();
});
return this;
};
/* Convenience methods in jQuery namespace. */
/* Use as $.belowthefold(element, {threshold : 100, container : window}) */
$.belowthefold = function(element, settings) {
var fold;
if (settings.container === undefined || settings.container === window) {
fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop();
} else {
fold = $(settings.container).offset().top + $(settings.container).height();
}
return fold <= $(element).offset().top - settings.threshold;
};
$.rightoffold = function(element, settings) {
var fold;
if (settings.container === undefined || settings.container === window) {
fold = $window.width() + $window.scrollLeft();
} else {
fold = $(settings.container).offset().left + $(settings.container).width();
}
return fold <= $(element).offset().left - settings.threshold;
};
$.abovethetop = function(element, settings) {
var fold;
if (settings.container === undefined || settings.container === window) {
fold = $window.scrollTop();
} else {
fold = $(settings.container).offset().top;
}
return fold >= $(element).offset().top + settings.threshold + $(element).height();
};
$.leftofbegin = function(element, settings) {
var fold;
if (settings.container === undefined || settings.container === window) {
fold = $window.scrollLeft();
} else {
fold = $(settings.container).offset().left;
}
return fold >= $(element).offset().left + settings.threshold + $(element).width();
};
$.inviewport = function(element, settings) {
return !$.rightoffold(element, settings) && !$.leftofbegin(element, settings) &&
!$.belowthefold(element, settings) && !$.abovethetop(element, settings);
};
/* Custom selectors for your convenience. */
/* Use as $("img:below-the-fold").something() or */
/* $("img").filter(":below-the-fold").something() which is faster */
$.extend($.expr[":"], {
"below-the-fold" : function(a) { return $.belowthefold(a, {threshold : 0}); },
"above-the-top" : function(a) { return !$.belowthefold(a, {threshold : 0}); },
"right-of-screen": function(a) { return $.rightoffold(a, {threshold : 0}); },
"left-of-screen" : function(a) { return !$.rightoffold(a, {threshold : 0}); },
"in-viewport" : function(a) { return $.inviewport(a, {threshold : 0}); },
/* Maintain BC for couple of versions. */
"above-the-fold" : function(a) { return !$.belowthefold(a, {threshold : 0}); },
"right-of-fold" : function(a) { return $.rightoffold(a, {threshold : 0}); },
"left-of-fold" : function(a) { return !$.rightoffold(a, {threshold : 0}); }
});
})(jQuery, window, document);
================================================
FILE: source/lib/jquery_lazyload/jquery.scrollstop.js
================================================
/* http://james.padolsey.com/javascript/special-scroll-events-for-jquery/ */
(function(){
var special = jQuery.event.special,
uid1 = "D" + (+new Date()),
uid2 = "D" + (+new Date() + 1);
special.scrollstart = {
setup: function() {
var timer,
handler = function(evt) {
var _self = this,
_args = arguments;
if (timer) {
clearTimeout(timer);
} else {
evt.type = "scrollstart";
jQuery.event.dispatch.apply(_self, _args);
}
timer = setTimeout( function(){
timer = null;
}, special.scrollstop.latency);
};
jQuery(this).bind("scroll", handler).data(uid1, handler);
},
teardown: function(){
jQuery(this).unbind( "scroll", jQuery(this).data(uid1) );
}
};
special.scrollstop = {
latency: 300,
setup: function() {
var timer,
handler = function(evt) {
var _self = this,
_args = arguments;
if (timer) {
clearTimeout(timer);
}
timer = setTimeout( function(){
timer = null;
evt.type = "scrollstop";
jQuery.event.dispatch.apply(_self, _args);
}, special.scrollstop.latency);
};
jQuery(this).bind("scroll", handler).data(uid2, handler);
},
teardown: function() {
jQuery(this).unbind( "scroll", jQuery(this).data(uid2) );
}
};
})();
================================================
FILE: source/lib/needsharebutton/font-embedded.css
================================================
/* SOCIAL ICON */
@font-face {
font-family: 'social-icons';
font-weight: normal;
font-style: normal;
src: url('font/social.eot?44259375');
src: url('font/social.eot?44259375#iefix') format('embedded-opentype'), url('font/social.woff?44259375') format('woff'), url('font/social.ttf?44259375') format('truetype'), url('font/social.svg?44259375#social') format('svg');
}
@font-face {
font-family: 'social-icons';
src: url('data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAB5QAA4AAAAALUAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8y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KyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwAmIgsABQWLBAYFlmsAFjYbACJUZhOCMgPCM4GyEgIEYjR7ABKyNhOCFZsSsBFCstsEIssDUrLrErARQrLbBDLLA2KyEjICA8sAQjQiM4sSsBFCuwBEMusCsrLbBELLAAFSBHsAAjQrIAAQEVFBMusDEqLbBFLLAAFSBHsAAjQrIAAQEVFBMusDEqLbBGLLEAARQTsDIqLbBHLLA0Ki2wSCywABZFIyAuIEaKI2E4sSsBFCstsEkssAgjQrBIKy2wSiyyAABBKy2wSyyyAAFBKy2wTCyyAQBBKy2wTSyyAQFBKy2wTiyyAABCKy2wTyyyAAFCKy2wUCyyAQBCKy2wUSyyAQFCKy2wUiyyAAA+Ky2wUyyyAAE+Ky2wVCyyAQA+Ky2wVSyyAQE+Ky2wViyyAABAKy2wVyyyAAFAKy2wWCyyAQBAKy2wWSyyAQFAKy2wWiyyAABDKy2wWyyyAAFDKy2wXCyyAQBDKy2wXSyyAQFDKy2wXiyyAAA/Ky2wXyyyAAE/Ky2wYCyyAQA/Ky2wYSyyAQE/Ky2wYiywNysusSsBFCstsGMssDcrsDsrLbBkLLA3K7A8Ky2wZSywABawNyuwPSstsGYssDgrLrErARQrLbBnLLA4K7A7Ky2waCywOCuwPCstsGkssDgrsD0rLbBqLLA5Ky6xKwEUKy2wayywOSuwOystsGwssDkrsDwrLbBtLLA5K7A9Ky2wbiywOisusSsBFCstsG8ssDorsDsrLbBwLLA6K7A8Ky2wcSywOiuwPSstsHIsswkEAgNFWCEbIyFZQiuwCGWwAyRQeLABFTAtAEu4AMhSWLEBAY5ZsAG5CAAIAGNwsQAFQrEAACqxAAVCsQAIKrEABUKxAAgqsQAFQrkAAAAJKrEABUK5AAAACSqxAwBEsSQBiFFYsECIWLEDZESxJgGIUVi6CIAAAQRAiGNUWLEDAERZWVlZsQAMKrgB/4WwBI2xAgBEAA==') format('truetype');
}
.need-share-button_dropdown [class^="social-"]:before, .need-share-button_dropdown [class*=" social-"]:before {
font-family: "social-icons";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.social-mailto:before { content: '\e80a'; }
.social-twitter:before { content: '\e813'; }
.social-pinterest:before { content: '\e80f'; }
.social-facebook:before { content: '\e80e'; }
.social-googleplus:before { content: '\e80d'; }
.social-reddit:before { content: '\e810'; }
.social-linkedin:before { content: '\e80c'; }
.social-tumblr:before { content: '\e812'; }
.social-evernote:before { content: '\e801'; }
.social-delicious:before { content: '\e815'; }
.social-stumbleupon:before { content: '\e811'; }
.social-slashdot:before { content: '\e806'; }
.social-technorati:before { content: '\e807'; }
.social-posterous:before { content: '\e809'; }
.social-googlebookmarks:before { content: '\e80b'; }
.social-newsvine:before { content: '\e803'; }
.social-friendfeed:before { content: '\e802'; }
.social-vkontakte:before { content: '\e814'; }
.social-odnoklassniki:before { content: '\e804'; }
.social-mailru:before { content: '\e800'; }
/* FONTELLO ICON */
@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?34242489');
src: url('../font/fontello.eot?34242489#iefix') format('embedded-opentype'),
url('../font/fontello.svg?34242489#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'fontello';
src: url('data:application/octet-stream;base64,d09GRgABAAAAAA7IAA8AAAAAGBAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+S1NOY21hcAAAAdgAAABqAAABqkbJ0JZjdnQgAAACRAAAABMAAAAgBtX/BGZwZ20AA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vgZqtdVREBpZG9Rlu9nqyOlWKqoocWPprk2odCr7cq4S48excjy13PPYD9axq/fhfp74Oo1UIltOc69GfuJr1/izXfV0E7SNmcu5Vks5tBlypdXC94wTGrPqNhp/z8MACitsoRHxqkIYSNRo65zbaKKFDmnKDMnMPCtCAhcxjYs1d4TZSsq4zzFnlND6zIjJDjx+l0d+TAq4P2YVfbR6GE9IuzOizEv25bC7w6wRKcky3czOfntPseFpbVrDXbsuddaVxPCghuR97NYWNB69k92Koe2iwfef//sB5m6EUQB4nGNgYoAALgbsgJWRiZGZkYWRlZGNgbU8NTMpn60oNQ+ImAoL2cpTkzMSSxgYAHR0CDwAeJxj8N7BcCIoYiMjY1/kBsadHAwcDMkFGxlYnTYxMDJogRibuZgYOSAsPgYwi81pF9MBoDQnkM3utIvBAcJmZnDZqMLYERixwaEjYiNzistGNRBvF0cDAyOLQ0dySARISSQQbOZhYuTR2sH4v3UDS+9GJgYXAAx2I/QAAA==') format('woff'),
url('data:application/octet-stream;base64,AAEAAAAPAIAAAwBwR1NVQiCLJXoAAAD8AAAAVE9TLzI+S1NOAAABUAAAAFZjbWFwRsnQlgAAAagAAAGqY3Z0IAbV/wQAAAv4AAAAIGZwZ22KkZBZAAAMGAAAC3BnYXNwAAAAEAAAC/AAAAAIZ2x5Zjv42esAAANUAAAE6GhlYWQPhh2FAAAIPAAAADZoaGVhB8oD3QAACHQAAAAkaG10eBOH//4AAAiYAAAAFGxvY2EChAN+AAAIrAAAAAxtYXhwARMMFgAACLgAAAAgbmFtZcydHR8AAAjYAAACzXBvc3QXwzMzAAALqAAAAEZwcmVw5UErvAAAF4gAAACGAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAED6AGQAAUAAAJ6ArwAAACMAnoCvAAAAeAAMQECAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQ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AEACSqxAAdCugBAAAEACSqxAwBEsSQBiFFYsECIWLEDZESxJgGIUVi6CIAAAQRAiGNUWLEDAERZWVlZswwCAQwquAH/hbAEjbECAEQAAA==') format('truetype');
}
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?13586373#fontello') format('svg');
}
}
*/
.need-share-button_dropdown [class^="icon-"]:before, .need-share-button_dropdown [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* fix buttons height, for twitter bootstrap */
line-height: 1em;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin-left: .2em;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
.icon-weibo:before { content: '\e82b'; } /* '' */
.icon-renren:before { content: '\f18b'; } /* '' */
.icon-qqzone:before { content: '\f1d6'; } /* '' */
.icon-wechat:before { content: '\f1d7'; } /* '' */
================================================
FILE: source/lib/needsharebutton/needsharebutton.css
================================================
/***********************************************
needShareButton
- Version 1.0.0
- Copyright 2015 Dzmitry Vasileuski
- Licensed under MIT (http://opensource.org/licenses/MIT)
***********************************************/
/* Social icons font
***********************************************/
@import url('font-embedded.css');
.need-share-button {
position: relative;
}
.need-share-button-opened {
position: relative;
}
.need-share-button-opened img.need-share-wechat-code-image {
display: block;
width: 100%;
max-width: 200px;
margin: auto;
}
.need-share-button_dropdown {
position: absolute;
z-index: 10;
visibility: hidden;
overflow: hidden;
width: 300px;
font-size: 16px;
-webkit-transition: .3s;
transition: .3s;
-webkit-transform: scale(.1);
-ms-transform: scale(.1);
transform: scale(.1);
text-align: center;
white-space: normal;
opacity: 0;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #fff;
-webkit-box-shadow: 0 0 2px rgba(0, 0, 0, .5);
box-shadow: 0 0 2px rgba(0, 0, 0, .5);
}
.need-share-button-opened .need-share-button_dropdown {
visibility: visible;
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 1;
}
.need-share-button_dropdown-box-vertical,
.need-share-button_dropdown-box-horizontal {
-webkit-border-radius: 0;
border-radius: 0;
}
.need-share-button_dropdown-box-vertical {
width: 50px;
}
.need-share-button_dropdown-box-horizontal {
width: auto;
white-space: nowrap;
}
.need-share-button_link {
display: inline-block;
width: 50px;
height: 50px;
line-height: 50px;
cursor: pointer;
text-align: center;
}
.need-share-button_link:hover {
-webkit-transition: .3s;
transition: .3s;
opacity: .7;
}
/* Dropdown position
***********************************************/
.need-share-button_dropdown-top-left {
right: 100%;
bottom: 100%;
margin-right: 10px;
margin-bottom: 10px;
}
.need-share-button_dropdown-top-right {
bottom: 100%;
left: 100%;
margin-bottom: 10px;
margin-left: 10px;
}
.need-share-button_dropdown-top-center {
bottom: 100%;
left: 50%;
margin-bottom: 10px;
}
.need-share-button_dropdown-middle-left {
top: 50%;
right: 100%;
margin-right: 10px;
}
.need-share-button_dropdown-middle-right {
top: 50%;
left: 100%;
margin-left: 10px;
}
.need-share-button_dropdown-bottom-left {
top: 100%;
right: 100%;
margin-top: 10px;
margin-right: 10px;
}
.need-share-button_dropdown-bottom-right {
top: 100%;
left: 100%;
margin-top: 10px;
margin-left: 10px;
}
.need-share-button_dropdown-bottom-center {
top: 100%;
left: 50%;
margin-top: 10px;
}
/* Default theme
***********************************************/
.need-share-button-default {
display: inline-block;
margin-bottom: 0;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
font-weight: 400;
color: #333;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
vertical-align: middle;
border: 1px solid #ccc;
-webkit-border-radius: 4px;
border-radius: 4px;
background-color: #fff;
}
/* Network buttons
***********************************************/
.need-share-button_wechat {
color: #a2dc30;
}
.need-share-button_wechat.need-share-button_link-box {
color: #fff;
background: #a2dc30;
}
.need-share-button_weibo {
color: #d52b2b;
}
.need-share-button_weibo.need-share-button_link-box {
color: #fff;
background: #d52b2b;
}
.need-share-button_douban {
color: #072;
}
.need-share-button_douban:before {
content: '豆';
}
.need-share-button_douban.need-share-button_link-box {
color: #fff;
background: #072;
}
.need-share-button_qqzone {
color: #ffce00;
}
.need-share-button_qqzone.need-share-button_link-box {
color: #fff;
background: #ffce00;
}
.need-share-button_renren {
color: #207cc5;
}
.need-share-button_renren.need-share-button_link-box {
color: #fff;
background: #207cc5;
}
.need-share-button_mailto {
color: #efbe00;
}
.need-share-button_mailto.need-share-button_link-box {
color: #fff;
background: #efbe00;
}
.need-share-button_twitter {
color: #00acec;
}
.need-share-button_twitter.need-share-button_link-box {
color: #fff;
background: #00acec;
}
.need-share-button_pinterest {
color: #cd2027;
}
.need-share-button_pinterest.need-share-button_link-box {
color: #fff;
background: #cd2027;
}
.need-share-button_facebook {
color: #3b5998;
}
.need-share-button_facebook.need-share-button_link-box {
color: #fff;
background: #3b5998;
}
.need-share-button_googleplus {
color: #d44132;
}
.need-share-button_googleplus.need-share-button_link-box {
color: #fff;
background: #d44132;
}
.need-share-button_reddit {
color: #000;
}
.need-share-button_reddit.need-share-button_link-box {
color: #fff;
background: #000;
}
.need-share-button_delicious {
color: #000;
}
.need-share-button_delicious.need-share-button_link-box {
color: #fff;
background: #000;
}
.need-share-button_stumbleupon {
color: #f04e23;
}
.need-share-button_stumbleupon.need-share-button_link-box {
color: #fff;
background: #f04e23;
}
.need-share-button_linkedin {
color: #0085af;
}
.need-share-button_linkedin.need-share-button_link-box {
color: #fff;
background: #0085af;
}
.need-share-button_slashdot {
color: #026664;
}
.need-share-button_slashdot.need-share-button_link-box {
color: #fff;
background: #026664;
}
.need-share-button_technorati {
color: #49ae47;
}
.need-share-button_technorati.need-share-button_link-box {
color: #fff;
background: #49ae47;
}
.need-share-button_posterous {
color: #795d31;
}
.need-share-button_posterous.need-share-button_link-box {
color: #fff;
background: #795d31;
}
.need-share-button_tumblr {
color: #34465d;
}
.need-share-button_tumblr.need-share-button_link-box {
color: #fff;
background: #34465d;
}
.need-share-button_googlebookmarks {
color: #fde331;
}
.need-share-button_googlebookmarks.need-share-button_link-box {
color: #fff;
background: #fde331;
}
.need-share-button_newsvine {
color: #03652c;
}
.need-share-button_newsvine.need-share-button_link-box {
color: #fff;
background: #03652c;
}
.need-share-button_evernote {
color: #79d626;
}
.need-share-button_evernote.need-share-button_link-box {
color: #fff;
background: #79d626;
}
.need-share-button_friendfeed {
color: #b0cbe9;
}
.need-share-button_friendfeed.need-share-button_link-box {
color: #fff;
background: #b0cbe9;
}
.need-share-button_vkontakte {
color: #4c75a3;
}
.need-share-button_vkontakte.need-share-button_link-box {
color: #fff;
background: #4c75a3;
}
.need-share-button_odnoklassniki {
color: #ed812b;
}
.need-share-button_odnoklassniki.need-share-button_link-box {
color: #fff;
background: #ed812b;
}
.need-share-button_mailru {
color: #f89c0e;
}
.need-share-button_mailru.need-share-button_link-box {
color: #fff;
background: #f89c0e;
}
================================================
FILE: source/lib/needsharebutton/needsharebutton.js
================================================
/***********************************************
needShareButton
- Version 1.0.0
- Copyright 2015 Dzmitry Vasileuski
- Licensed under MIT (http://opensource.org/licenses/MIT)
***********************************************/
(function () {
// find closest
function closest(elem, parent) {
if (typeof (parent) == "string") {
var matchesSelector = elem.matches || elem.webkitMatchesSelector ||
elem.mozMatchesSelector || elem.msMatchesSelector;
if (!!matchesSelector) {
while (elem) {
if (matchesSelector.bind(elem)(parent)) {
return elem;
} else {
elem = elem.parentElement;
}
}
}
return false;
} else {
while (elem) {
if (elem == parent) {
return elem;
} else {
elem = elem.parentElement;
}
}
return false;
}
}
// share button class
window.needShareButton = function (elem, options) {
// create element reference
var root = this;
root.elem = elem || "need-share-button";
/* Helpers
***********************************************/
// get title from html
root.getTitle = function () {
var content;
// check querySelector existance for old browsers
if (document.querySelector) {
content = document.querySelector("title");
if (content) {
return content.innerText;
}
}
return document.title;
};
// get image from html
root.getImage = function () {
var content;
// check querySelector existance for old browsers
if (document.querySelector) {
content = document.querySelector("meta[property=\"og:image\"]") ||
document.querySelector("meta[name=\"twitter:image\"]");
if (content) {
return content.getAttribute("content");
} else {
return "";
}
} else {
return "";
}
};
// get description from html
root.getDescription = function () {
var content;
// check querySelector existance for old browsers
if (document.querySelector) {
content = document.querySelector("meta[property=\"og:description\"]") ||
document.querySelector("meta[name=\"twitter:description\"]") ||
document.querySelector("meta[name=\"description\"]");
if (content) {
return content.getAttribute("content");
} else {
return "";
}
} else {
content = document.getElementsByTagName("meta").namedItem("description");
if (content) {
return content.getAttribute("content");
} else {
return "";
}
}
};
// share urls for all networks
root.share = {
"weibo": function (el) {
var myoptions = getOptions(el);
var url = "http://v.t.sina.com.cn/share/share.php?title=" +
encodeURIComponent(myoptions.title) +
"&url=" + encodeURIComponent(myoptions.url) +
"&pic=" + encodeURIComponent(myoptions.image);
root.popup(url);
},
"wechat": function (el) {
var myoptions = getOptions(el);
var imgSrc = "https://api.qinco.me/api/qr?size=400&content=" + encodeURIComponent(myoptions.url);
var dropdownEl = el.querySelector(".need-share-button_dropdown");
var img = dropdownEl.getElementsByClassName("need-share-wechat-code-image")[0];
if (img) {
img.remove();
} else {
img = document.createElement("img");
img.src = imgSrc;
img.alt = "loading wechat image...";
img.setAttribute("class", "need-share-wechat-code-image");
dropdownEl.appendChild(img);
}
},
"douban": function (el) {
var myoptions = getOptions(el);
var url = "https://www.douban.com/share/service?name=" +
encodeURIComponent(myoptions.title) +
"&href=" + encodeURIComponent(myoptions.url) +
"&image=" + encodeURIComponent(myoptions.image);
root.popup(url);
},
"qqzone": function (el) {
var myoptions = getOptions(el);
var url = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title=" +
encodeURIComponent(myoptions.title) +
"&url=" + encodeURIComponent(myoptions.url) +
"&pics=" + encodeURIComponent(myoptions.image) +
"&desc=" + encodeURIComponent(myoptions.description);
root.popup(url);
},
"renren": function (el) {
var myoptions = getOptions(el);
var url = "http://widget.renren.com/dialog/share?title=" +
encodeURIComponent(myoptions.title) +
"&resourceUrl=" + encodeURIComponent(myoptions.url) +
"&pic=" + encodeURIComponent(myoptions.image) +
"&description=" + encodeURIComponent(myoptions.description);
root.popup(url);
},
"mailto": function (el) {
var myoptions = getOptions(el);
var url = "mailto:?subject=" + encodeURIComponent(myoptions.title) +
"&body=Thought you might enjoy reading this: " + encodeURIComponent(myoptions.url) +
" - " + encodeURIComponent(myoptions.description);
window.location.href = url;
},
"twitter": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "twitter.com/intent/tweet?text=";
url += encodeURIComponent(myoptions.title) + "&url=" + encodeURIComponent(myoptions.url);
root.popup(url);
},
"pinterest": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "pinterest.com/pin/create/bookmarklet/?is_video=false";
url += "&media=" + encodeURIComponent(myoptions.image);
url += "&url=" + encodeURIComponent(myoptions.url);
url += "&description=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"facebook": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.facebook.com/share.php?";
url += "u=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"googleplus": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "plus.google.com/share?";
url += "url=" + encodeURIComponent(myoptions.url);
root.popup(url);
},
"reddit": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.reddit.com/submit?";
url += "url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"delicious": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "del.icio.us/post?";
url += "url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
url += "¬es=" + encodeURIComponent(myoptions.description);
root.popup(url);
},
"stumbleupon": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.stumbleupon.com/submit?";
url += "url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"linkedin": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.linkedin.com/shareArticle?mini=true";
url += "&url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
url += "&source=" + encodeURIComponent(myoptions.source);
root.popup(url);
},
"slashdot": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "slashdot.org/bookmark.pl?";
url += "url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"technorati": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "technorati.com/faves?";
url += "add=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"posterous": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "posterous.com/share?";
url += "linkto=" + encodeURIComponent(myoptions.url);
root.popup(url);
},
"tumblr": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.tumblr.com/share?v=3";
url += "&u=" + encodeURIComponent(myoptions.url);
url += "&t=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"googlebookmarks": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.google.com/bookmarks/mark?op=edit";
url += "&bkmk=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
url += "&annotation=" + encodeURIComponent(myoptions.description);
root.popup(url);
},
"newsvine": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.newsvine.com/_tools/seed&save?";
url += "u=" + encodeURIComponent(myoptions.url);
url += "&h=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"evernote": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.evernote.com/clip.action?";
url += "url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"friendfeed": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.friendfeed.com/share?";
url += "url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
root.popup(url);
},
"vkontakte": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "vkontakte.ru/share.php?";
url += "url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
url += "&description=" + encodeURIComponent(myoptions.description);
url += "&image=" + encodeURIComponent(myoptions.image);
url += "&noparse=true";
root.popup(url);
},
"odnoklassniki": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1";
url += "&st.comments=" + encodeURIComponent(myoptions.description);
url += "&st._surl=" + encodeURIComponent(myoptions.url);
root.popup(url);
},
"mailru": function (el) {
var myoptions = getOptions(el);
var url = myoptions.protocol + "connect.mail.ru/share?";
url += "url=" + encodeURIComponent(myoptions.url);
url += "&title=" + encodeURIComponent(myoptions.title);
url += "&description=" + encodeURIComponent(myoptions.description);
url += "&imageurl=" + encodeURIComponent(myoptions.image);
root.popup(url);
}
};
// open share link in a popup
root.popup = function (url) {
// set left and top position
var popupWidth = 600,
popupHeight = 500,
// fix dual screen mode
dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left,
dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top,
width = window.innerWidth ?
window.innerWidth :
document.documentElement.clientWidth ?
document.documentElement.clientWidth :
screen.width,
height = window.innerHeight ?
window.innerHeight :
document.documentElement.clientHeight ?
document.documentElement.clientHeight :
screen.height,
// calculate top and left position
left = ((width / 2) - (popupWidth / 2)) + dualScreenLeft,
top = ((height / 2) - (popupHeight / 2)) + dualScreenTop,
// show popup
shareWindow = window.open(url, "targetWindow",
"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=" + popupWidth +
", height=" + popupHeight + ", top=" + top + ", left=" + left);
// Puts focus on the newWindow
if (window.focus) {
shareWindow.focus();
}
};
/* Set options
***********************************************/
// create default options
root.options = {
iconStyle: "default", // default or box
boxForm: "horizontal", // horizontal or vertical
position: "bottomCenter", // top / middle / bottom + Left / Center / Right
protocol: ["http", "https"].indexOf(window.location.href.split(":")[0]) === -1 ? "https://" : "//",
networks: "Weibo,Wechat,Douban,QQZone,Twitter,Pinterest,Facebook,GooglePlus,Reddit,Linkedin,Tumblr,Evernote"
};
// integrate custom options
for (var i in options) {
if (options.hasOwnProperty(i)) {
root.options[i] = options[i];
}
}
// convert networks string into array
//root.options.networks = root.options.networks.toLowerCase().split(",");
root.options.networks = root.options.networks.split(",");
function getOptions(el) {
// integrate data attribute options
var ret = {};
for (var i in root.options) {
if (root.options.hasOwnProperty(i)) {
ret[i] = root.options[i];
}
}
// these attrs must get dynamically.
ret.url = window.location.href;
ret.title = root.getTitle();
ret.image = root.getImage();
ret.description = root.getDescription();
for (var option in el.dataset) {
// replace only 'share-' prefixed data-attributes
if (option.match(/share/)) {
var newOption = option.replace(/share/, "");
if (!newOption.length) {
continue;
}
newOption = newOption.charAt(0).toLowerCase() + newOption.slice(1);
var val = el.dataset[option];
if (newOption === "networks") {
//val = val.toLowerCase().split(",");
val = val.split(",");
} else if (newOption === "url" && val && val[0] === "/") {
// fix relative url problem.
val = location.origin + val;
}
ret[newOption] = val;
}
}
return ret;
}
function createDropdown(el) {
// create dropdown
var dropdownEl = document.createElement("span");
dropdownEl.className = "need-share-button_dropdown";
if (el.querySelector(".need-share-button_dropdown")) {
return;
}
var myoptions = getOptions(el);
// set dropdown row length
if (myoptions.iconStyle == "box" && myoptions.boxForm == "horizontal") {
dropdownEl.className += " need-share-button_dropdown-box-horizontal";
} else if (myoptions.iconStyle == "box" && myoptions.boxForm == "vertical") {
dropdownEl.className += " need-share-button_dropdown-box-vertical";
}
// set dropdown position
setTimeout(function () {
switch (myoptions.position) {
case "topLeft":
dropdownEl.className += " need-share-button_dropdown-top-left";
break;
case "topRight":
dropdownEl.className += " need-share-button_dropdown-top-right";
break;
case "topCenter":
dropdownEl.className += " need-share-button_dropdown-top-center";
dropdownEl.style.marginLeft = -dropdownEl.offsetWidth / 2 + "px";
break;
case "middleLeft":
dropdownEl.className += " need-share-button_dropdown-middle-left";
dropdownEl.style.marginTop = -dropdownEl.offsetHeight / 2 + "px";
break;
case "middleRight":
dropdownEl.className += " need-share-button_dropdown-middle-right";
dropdownEl.style.marginTop = -dropdownEl.offsetHeight / 2 + "px";
break;
case "bottomLeft":
dropdownEl.className += " need-share-button_dropdown-bottom-left";
break;
case "bottomRight":
dropdownEl.className += " need-share-button_dropdown-bottom-right";
break;
case "bottomCenter":
dropdownEl.className += " need-share-button_dropdown-bottom-center";
dropdownEl.style.marginLeft = -dropdownEl.offsetWidth / 2 + "px";
break;
default:
dropdownEl.className += " need-share-button_dropdown-bottom-center";
dropdownEl.style.marginLeft = -dropdownEl.offsetWidth / 2 + "px";
break;
}
}, 1);
// fill fropdown with buttons
var iconClass = myoptions.iconStyle == "default" ?
"need-share-button_link need-share-button_" :
"need-share-button_link-" + myoptions.iconStyle + " need-share-button_link need-share-button_";
for (var network in myoptions.networks) {
if (myoptions.networks.hasOwnProperty(network)) {
var link = document.createElement("span");
network = myoptions.networks[network].trim();
var networkLC = network.toLowerCase();
link.className = iconClass + networkLC;
var fontello = ["weibo", "wechat", "douban", "qqzone", "renren"];
if (fontello.indexOf(networkLC) === -1) {
link.className += " social-" + networkLC;
} else {
link.className += " icon-" + networkLC;
}
link.dataset.network = networkLC;
link.title = network;
dropdownEl.appendChild(link);
}
}
dropdownEl.addEventListener("click", function (event) {
if (closest(event.target, ".need-share-button_link")) {
event.preventDefault();
event.stopPropagation();
root.share[event.target.dataset.network](el);
return false;
}
});
el.appendChild(dropdownEl);
}
// close on click outside
document.addEventListener("click", function (event) {
var openedEl = document.querySelector(".need-share-button-opened");
if (!closest(event.target, ".need-share-button-opened")) {
if (openedEl) {
openedEl.classList.remove("need-share-button-opened");
// hide wechat code image when close the dropdown.
if (openedEl.querySelector(".need-share-wechat-code-image")) {
openedEl.querySelector(".need-share-wechat-code-image").remove();
}
} else {
var el = closest(event.target, root.elem);
if (el) {
if (!el.classList.contains("need-share-button-opened")) {
createDropdown(el);
setTimeout(function () {
el.classList.add("need-share-button-opened");
}, 1);
}
}
}
} else {
setTimeout(function () {
openedEl.classList.remove("need-share-button-opened");
// hide wechat code image when close the dropdown.
if (openedEl.querySelector(".need-share-wechat-code-image")) {
openedEl.querySelector(".need-share-wechat-code-image").remove();
}
}, 1);
}
});
};
})();
================================================
FILE: source/lib/velocity/.bower.json
================================================
{
"name": "velocity",
"version": "1.2.2",
"homepage": "http://velocityjs.org",
"authors": [
{
"name": "Julian Shapiro",
"homepage": "http://julian.com/"
}
],
"description": "Accelerated JavaScript animation.",
"main": [
"./velocity.js",
"./velocity.ui.js"
],
"keywords": [
"animation",
"jquery",
"animate",
"lightweight",
"smooth",
"ui",
"velocity.js",
"velocityjs",
"javascript"
],
"license": "MIT",
"ignore": [
"*.json",
"!/bower.json",
"LICENSE",
"*.md"
],
"dependencies": {
"jquery": "*"
},
"repository": {
"type": "git",
"url": "http://github.com/julianshapiro/velocity.git"
},
"_release": "1.2.2",
"_resolution": {
"type": "version",
"tag": "1.2.2",
"commit": "6b227928631aab5694255df3c219736c4c02449d"
},
"_source": "git://github.com/julianshapiro/velocity.git",
"_target": "~1.2.1",
"_originalSource": "velocity"
}
================================================
FILE: source/lib/velocity/bower.json
================================================
{
"name": "velocity",
"version": "1.2.2",
"homepage": "http://velocityjs.org",
"authors": [
{ "name" : "Julian Shapiro",
"homepage" : "http://julian.com/"
}
],
"description": "Accelerated JavaScript animation.",
"main": [ "./velocity.js", "./velocity.ui.js"],
"keywords": [
"animation",
"jquery",
"animate",
"lightweight",
"smooth",
"ui",
"velocity.js",
"velocityjs",
"javascript"
],
"license": "MIT",
"ignore": [
"*.json",
"!/bower.json",
"LICENSE",
"*.md"
],
"dependencies": {
"jquery": "*"
},
"repository" :
{
"type" : "git",
"url" : "http://github.com/julianshapiro/velocity.git"
}
}
================================================
FILE: source/lib/velocity/velocity.js
================================================
/*! VelocityJS.org (1.2.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
/*************************
Velocity jQuery Shim
*************************/
/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
/* This file contains the jQuery functions that Velocity relies on, thereby removing Velocity's dependency on a full copy of jQuery, and allowing it to work in any environment. */
/* These shimmed functions are only used if jQuery isn't present. If both this shim and jQuery are loaded, Velocity defaults to jQuery proper. */
/* Browser support: Using this shim instead of jQuery proper removes support for IE8. */
;(function (window) {
/***************
Setup
***************/
/* If jQuery is already loaded, there's no point in loading this shim. */
if (window.jQuery) {
return;
}
/* jQuery base. */
var $ = function (selector, context) {
return new $.fn.init(selector, context);
};
/********************
Private Methods
********************/
/* jQuery */
$.isWindow = function (obj) {
/* jshint eqeqeq: false */
return obj != null && obj == obj.window;
};
/* jQuery */
$.type = function (obj) {
if (obj == null) {
return obj + "";
}
return typeof obj === "object" || typeof obj === "function" ?
class2type[toString.call(obj)] || "object" :
typeof obj;
};
/* jQuery */
$.isArray = Array.isArray || function (obj) {
return $.type(obj) === "array";
};
/* jQuery */
function isArraylike (obj) {
var length = obj.length,
type = $.type(obj);
if (type === "function" || $.isWindow(obj)) {
return false;
}
if (obj.nodeType === 1 && length) {
return true;
}
return type === "array" || length === 0 || typeof length === "number" && length > 0 && (length - 1) in obj;
}
/***************
$ Methods
***************/
/* jQuery: Support removed for IE<9. */
$.isPlainObject = function (obj) {
var key;
if (!obj || $.type(obj) !== "object" || obj.nodeType || $.isWindow(obj)) {
return false;
}
try {
if (obj.constructor &&
!hasOwn.call(obj, "constructor") &&
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
return false;
}
} catch (e) {
return false;
}
for (key in obj) {}
return key === undefined || hasOwn.call(obj, key);
};
/* jQuery */
$.each = function(obj, callback, args) {
var value,
i = 0,
length = obj.length,
isArray = isArraylike(obj);
if (args) {
if (isArray) {
for (; i < length; i++) {
value = callback.apply(obj[i], args);
if (value === false) {
break;
}
}
} else {
for (i in obj) {
value = callback.apply(obj[i], args);
if (value === false) {
break;
}
}
}
} else {
if (isArray) {
for (; i < length; i++) {
value = callback.call(obj[i], i, obj[i]);
if (value === false) {
break;
}
}
} else {
for (i in obj) {
value = callback.call(obj[i], i, obj[i]);
if (value === false) {
break;
}
}
}
}
return obj;
};
/* Custom */
$.data = function (node, key, value) {
/* $.getData() */
if (value === undefined) {
var id = node[$.expando],
store = id && cache[id];
if (key === undefined) {
return store;
} else if (store) {
if (key in store) {
return store[key];
}
}
/* $.setData() */
} else if (key !== undefined) {
var id = node[$.expando] || (node[$.expando] = ++$.uuid);
cache[id] = cache[id] || {};
cache[id][key] = value;
return value;
}
};
/* Custom */
$.removeData = function (node, keys) {
var id = node[$.expando],
store = id && cache[id];
if (store) {
$.each(keys, function(_, key) {
delete store[key];
});
}
};
/* jQuery */
$.extend = function () {
var src, copyIsArray, copy, name, options, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false;
if (typeof target === "boolean") {
deep = target;
target = arguments[i] || {};
i++;
}
if (typeof target !== "object" && $.type(target) !== "function") {
target = {};
}
if (i === length) {
target = this;
i--;
}
for (; i < length; i++) {
if ((options = arguments[i]) != null) {
for (name in options) {
src = target[name];
copy = options[name];
if (target === copy) {
continue;
}
if (deep && copy && ($.isPlainObject(copy) || (copyIsArray = $.isArray(copy)))) {
if (copyIsArray) {
copyIsArray = false;
clone = src && $.isArray(src) ? src : [];
} else {
clone = src && $.isPlainObject(src) ? src : {};
}
target[name] = $.extend(deep, clone, copy);
} else if (copy !== undefined) {
target[name] = copy;
}
}
}
}
return target;
};
/* jQuery 1.4.3 */
$.queue = function (elem, type, data) {
function $makeArray (arr, results) {
var ret = results || [];
if (arr != null) {
if (isArraylike(Object(arr))) {
/* $.merge */
(function(first, second) {
var len = +second.length,
j = 0,
i = first.length;
while (j < len) {
first[i++] = second[j++];
}
if (len !== len) {
while (second[j] !== undefined) {
first[i++] = second[j++];
}
}
first.length = i;
return first;
})(ret, typeof arr === "string" ? [arr] : arr);
} else {
[].push.call(ret, arr);
}
}
return ret;
}
if (!elem) {
return;
}
type = (type || "fx") + "queue";
var q = $.data(elem, type);
if (!data) {
return q || [];
}
if (!q || $.isArray(data)) {
q = $.data(elem, type, $makeArray(data));
} else {
q.push(data);
}
return q;
};
/* jQuery 1.4.3 */
$.dequeue = function (elems, type) {
/* Custom: Embed element iteration. */
$.each(elems.nodeType ? [ elems ] : elems, function(i, elem) {
type = type || "fx";
var queue = $.queue(elem, type),
fn = queue.shift();
if (fn === "inprogress") {
fn = queue.shift();
}
if (fn) {
if (type === "fx") {
queue.unshift("inprogress");
}
fn.call(elem, function() {
$.dequeue(elem, type);
});
}
});
};
/******************
$.fn Methods
******************/
/* jQuery */
$.fn = $.prototype = {
init: function (selector) {
/* Just return the element wrapped inside an array; don't proceed with the actual jQuery node wrapping process. */
if (selector.nodeType) {
this[0] = selector;
return this;
} else {
throw new Error("Not a DOM node.");
}
},
offset: function () {
/* jQuery altered code: Dropped disconnected DOM node checking. */
var box = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 };
return {
top: box.top + (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0),
left: box.left + (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0)
};
},
position: function () {
/* jQuery */
function offsetParent() {
var offsetParent = this.offsetParent || document;
while (offsetParent && (!offsetParent.nodeType.toLowerCase === "html" && offsetParent.style.position === "static")) {
offsetParent = offsetParent.offsetParent;
}
return offsetParent || document;
}
/* Zepto */
var elem = this[0],
offsetParent = offsetParent.apply(elem),
offset = this.offset(),
parentOffset = /^(?:body|html)$/i.test(offsetParent.nodeName) ? { top: 0, left: 0 } : $(offsetParent).offset()
offset.top -= parseFloat(elem.style.marginTop) || 0;
offset.left -= parseFloat(elem.style.marginLeft) || 0;
if (offsetParent.style) {
parentOffset.top += parseFloat(offsetParent.style.borderTopWidth) || 0
parentOffset.left += parseFloat(offsetParent.style.borderLeftWidth) || 0
}
return {
top: offset.top - parentOffset.top,
left: offset.left - parentOffset.left
};
}
};
/**********************
Private Variables
**********************/
/* For $.data() */
var cache = {};
$.expando = "velocity" + (new Date().getTime());
$.uuid = 0;
/* For $.queue() */
var class2type = {},
hasOwn = class2type.hasOwnProperty,
toString = class2type.toString;
var types = "Boolean Number String Function Array Date RegExp Object Error".split(" ");
for (var i = 0; i < types.length; i++) {
class2type["[object " + types[i] + "]"] = types[i].toLowerCase();
}
/* Makes $(node) possible, without having to call init. */
$.fn.init.prototype = $.fn;
/* Globalize Velocity onto the window, and assign its Utilities property. */
window.Velocity = { Utilities: $ };
})(window);
/******************
Velocity.js
******************/
;(function (factory) {
/* CommonJS module. */
if (typeof module === "object" && typeof module.exports === "object") {
module.exports = factory();
/* AMD module. */
} else if (typeof define === "function" && define.amd) {
define(factory);
/* Browser globals. */
} else {
factory();
}
}(function() {
return function (global, window, document, undefined) {
/***************
Summary
***************/
/*
- CSS: CSS stack that works independently from the rest of Velocity.
- animate(): Core animation method that iterates over the targeted elements and queues the incoming call onto each element individually.
- Pre-Queueing: Prepare the element for animation by instantiating its data cache and processing the call's options.
- Queueing: The logic that runs once the call has reached its point of execution in the element's $.queue() stack.
Most logic is placed here to avoid risking it becoming stale (if the element's properties have changed).
- Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container.
- tick(): The single requestAnimationFrame loop responsible for tweening all in-progress calls.
- completeCall(): Handles the cleanup process for each Velocity call.
*/
/*********************
Helper Functions
*********************/
/* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */
var IE = (function() {
if (document.documentMode) {
return document.documentMode;
} else {
for (var i = 7; i > 4; i--) {
var div = document.createElement("div");
div.innerHTML = "";
if (div.getElementsByTagName("span").length) {
div = null;
return i;
}
}
}
return undefined;
})();
/* rAF shim. Gist: https://gist.github.com/julianshapiro/9497513 */
var rAFShim = (function() {
var timeLast = 0;
return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {
var timeCurrent = (new Date()).getTime(),
timeDelta;
/* Dynamically set delay on a per-tick basis to match 60fps. */
/* Technique by Erik Moller. MIT license: https://gist.github.com/paulirish/1579671 */
timeDelta = Math.max(0, 16 - (timeCurrent - timeLast));
timeLast = timeCurrent + timeDelta;
return setTimeout(function() { callback(timeCurrent + timeDelta); }, timeDelta);
};
})();
/* Array compacting. Copyright Lo-Dash. MIT License: https://github.com/lodash/lodash/blob/master/LICENSE.txt */
function compactSparseArray (array) {
var index = -1,
length = array ? array.length : 0,
result = [];
while (++index < length) {
var value = array[index];
if (value) {
result.push(value);
}
}
return result;
}
function sanitizeElements (elements) {
/* Unwrap jQuery/Zepto objects. */
if (Type.isWrapped(elements)) {
elements = [].slice.call(elements);
/* Wrap a single element in an array so that $.each() can iterate with the element instead of its node's children. */
} else if (Type.isNode(elements)) {
elements = [ elements ];
}
return elements;
}
var Type = {
isString: function (variable) {
return (typeof variable === "string");
},
isArray: Array.isArray || function (variable) {
return Object.prototype.toString.call(variable) === "[object Array]";
},
isFunction: function (variable) {
return Object.prototype.toString.call(variable) === "[object Function]";
},
isNode: function (variable) {
return variable && variable.nodeType;
},
/* Copyright Martin Bohm. MIT License: https://gist.github.com/Tomalak/818a78a226a0738eaade */
isNodeList: function (variable) {
return typeof variable === "object" &&
/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(variable)) &&
variable.length !== undefined &&
(variable.length === 0 || (typeof variable[0] === "object" && variable[0].nodeType > 0));
},
/* Determine if variable is a wrapped jQuery or Zepto element. */
isWrapped: function (variable) {
return variable && (variable.jquery || (window.Zepto && window.Zepto.zepto.isZ(variable)));
},
isSVG: function (variable) {
return window.SVGElement && (variable instanceof window.SVGElement);
},
isEmptyObject: function (variable) {
for (var name in variable) {
return false;
}
return true;
}
};
/*****************
Dependencies
*****************/
var $,
isJQuery = false;
if (global.fn && global.fn.jquery) {
$ = global;
isJQuery = true;
} else {
$ = window.Velocity.Utilities;
}
if (IE <= 8 && !isJQuery) {
throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");
} else if (IE <= 7) {
/* Revert to jQuery's $.animate(), and lose Velocity's extra features. */
jQuery.fn.velocity = jQuery.fn.animate;
/* Now that $.fn.velocity is aliased, abort this Velocity declaration. */
return;
}
/*****************
Constants
*****************/
var DURATION_DEFAULT = 400,
EASING_DEFAULT = "swing";
/*************
State
*************/
var Velocity = {
/* Container for page-wide Velocity state data. */
State: {
/* Detect mobile devices to determine if mobileHA should be turned on. */
isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
/* The mobileHA option's behavior changes on older Android devices (Gingerbread, versions 2.3.3-2.3.7). */
isAndroid: /Android/i.test(navigator.userAgent),
isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent),
isChrome: window.chrome,
isFirefox: /Firefox/i.test(navigator.userAgent),
/* Create a cached element for re-use when checking for CSS property prefixes. */
prefixElement: document.createElement("div"),
/* Cache every prefix match to avoid repeating lookups. */
prefixMatches: {},
/* Cache the anchor used for animating window scrolling. */
scrollAnchor: null,
/* Cache the browser-specific property names associated with the scroll anchor. */
scrollPropertyLeft: null,
scrollPropertyTop: null,
/* Keep track of whether our RAF tick is running. */
isTicking: false,
/* Container for every in-progress call to Velocity. */
calls: []
},
/* Velocity's custom CSS stack. Made global for unit testing. */
CSS: { /* Defined below. */ },
/* A shim of the jQuery utility functions used by Velocity -- provided by Velocity's optional jQuery shim. */
Utilities: $,
/* Container for the user's custom animation redirects that are referenced by name in place of the properties map argument. */
Redirects: { /* Manually registered by the user. */ },
Easings: { /* Defined below. */ },
/* Attempt to use ES6 Promises by default. Users can override this with a third-party promises library. */
Promise: window.Promise,
/* Velocity option defaults, which can be overriden by the user. */
defaults: {
queue: "",
duration: DURATION_DEFAULT,
easing: EASING_DEFAULT,
begin: undefined,
complete: undefined,
progress: undefined,
display: undefined,
visibility: undefined,
loop: false,
delay: false,
mobileHA: true,
/* Advanced: Set to false to prevent property values from being cached between consecutive Velocity-initiated chain calls. */
_cacheValues: true
},
/* A design goal of Velocity is to cache data wherever possible in order to avoid DOM requerying. Accordingly, each element has a data cache. */
init: function (element) {
$.data(element, "velocity", {
/* Store whether this is an SVG element, since its properties are retrieved and updated differently than standard HTML elements. */
isSVG: Type.isSVG(element),
/* Keep track of whether the element is currently being animated by Velocity.
This is used to ensure that property values are not transferred between non-consecutive (stale) calls. */
isAnimating: false,
/* A reference to the element's live computedStyle object. Learn more here: https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle */
computedStyle: null,
/* Tween data is cached for each animation on the element so that data can be passed across calls --
in particular, end values are used as subsequent start values in consecutive Velocity calls. */
tweensContainer: null,
/* The full root property values of each CSS hook being animated on this element are cached so that:
1) Concurrently-animating hooks sharing the same root can have their root values' merged into one while tweening.
2) Post-hook-injection root values can be transferred over to consecutively chained Velocity calls as starting root values. */
rootPropertyValueCache: {},
/* A cache for transform updates, which must be manually flushed via CSS.flushTransformCache(). */
transformCache: {}
});
},
/* A parallel to jQuery's $.css(), used for getting/setting Velocity's hooked CSS properties. */
hook: null, /* Defined below. */
/* Velocity-wide animation time remapping for testing purposes. */
mock: false,
version: { major: 1, minor: 2, patch: 2 },
/* Set to 1 or 2 (most verbose) to output debug info to console. */
debug: false
};
/* Retrieve the appropriate scroll anchor and property name for the browser: https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY */
if (window.pageYOffset !== undefined) {
Velocity.State.scrollAnchor = window;
Velocity.State.scrollPropertyLeft = "pageXOffset";
Velocity.State.scrollPropertyTop = "pageYOffset";
} else {
Velocity.State.scrollAnchor = document.documentElement || document.body.parentNode || document.body;
Velocity.State.scrollPropertyLeft = "scrollLeft";
Velocity.State.scrollPropertyTop = "scrollTop";
}
/* Shorthand alias for jQuery's $.data() utility. */
function Data (element) {
/* Hardcode a reference to the plugin name. */
var response = $.data(element, "velocity");
/* jQuery <=1.4.2 returns null instead of undefined when no match is found. We normalize this behavior. */
return response === null ? undefined : response;
};
/**************
Easing
**************/
/* Step easing generator. */
function generateStep (steps) {
return function (p) {
return Math.round(p * steps) * (1 / steps);
};
}
/* Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */
function generateBezier (mX1, mY1, mX2, mY2) {
var NEWTON_ITERATIONS = 4,
NEWTON_MIN_SLOPE = 0.001,
SUBDIVISION_PRECISION = 0.0000001,
SUBDIVISION_MAX_ITERATIONS = 10,
kSplineTableSize = 11,
kSampleStepSize = 1.0 / (kSplineTableSize - 1.0),
float32ArraySupported = "Float32Array" in window;
/* Must contain four arguments. */
if (arguments.length !== 4) {
return false;
}
/* Arguments must be numbers. */
for (var i = 0; i < 4; ++i) {
if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) {
return false;
}
}
/* X values must be in the [0, 1] range. */
mX1 = Math.min(mX1, 1);
mX2 = Math.min(mX2, 1);
mX1 = Math.max(mX1, 0);
mX2 = Math.max(mX2, 0);
var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
function A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
function B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
function C (aA1) { return 3.0 * aA1; }
function calcBezier (aT, aA1, aA2) {
return ((A(aA1, aA2)*aT + B(aA1, aA2))*aT + C(aA1))*aT;
}
function getSlope (aT, aA1, aA2) {
return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
}
function newtonRaphsonIterate (aX, aGuessT) {
for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
var currentSlope = getSlope(aGuessT, mX1, mX2);
if (currentSlope === 0.0) return aGuessT;
var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
aGuessT -= currentX / currentSlope;
}
return aGuessT;
}
function calcSampleValues () {
for (var i = 0; i < kSplineTableSize; ++i) {
mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
}
}
function binarySubdivide (aX, aA, aB) {
var currentX, currentT, i = 0;
do {
currentT = aA + (aB - aA) / 2.0;
currentX = calcBezier(currentT, mX1, mX2) - aX;
if (currentX > 0.0) {
aB = currentT;
} else {
aA = currentT;
}
} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
return currentT;
}
function getTForX (aX) {
var intervalStart = 0.0,
currentSample = 1,
lastSample = kSplineTableSize - 1;
for (; currentSample != lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
intervalStart += kSampleStepSize;
}
--currentSample;
var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample+1] - mSampleValues[currentSample]),
guessForT = intervalStart + dist * kSampleStepSize,
initialSlope = getSlope(guessForT, mX1, mX2);
if (initialSlope >= NEWTON_MIN_SLOPE) {
return newtonRaphsonIterate(aX, guessForT);
} else if (initialSlope == 0.0) {
return guessForT;
} else {
return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);
}
}
var _precomputed = false;
function precompute() {
_precomputed = true;
if (mX1 != mY1 || mX2 != mY2) calcSampleValues();
}
var f = function (aX) {
if (!_precomputed) precompute();
if (mX1 === mY1 && mX2 === mY2) return aX;
if (aX === 0) return 0;
if (aX === 1) return 1;
return calcBezier(getTForX(aX), mY1, mY2);
};
f.getControlPoints = function() { return [{ x: mX1, y: mY1 }, { x: mX2, y: mY2 }]; };
var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")";
f.toString = function () { return str; };
return f;
}
/* Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */
/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass
then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */
var generateSpringRK4 = (function () {
function springAccelerationForState (state) {
return (-state.tension * state.x) - (state.friction * state.v);
}
function springEvaluateStateWithDerivative (initialState, dt, derivative) {
var state = {
x: initialState.x + derivative.dx * dt,
v: initialState.v + derivative.dv * dt,
tension: initialState.tension,
friction: initialState.friction
};
return { dx: state.v, dv: springAccelerationForState(state) };
}
function springIntegrateState (state, dt) {
var a = {
dx: state.v,
dv: springAccelerationForState(state)
},
b = springEvaluateStateWithDerivative(state, dt * 0.5, a),
c = springEvaluateStateWithDerivative(state, dt * 0.5, b),
d = springEvaluateStateWithDerivative(state, dt, c),
dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx),
dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv);
state.x = state.x + dxdt * dt;
state.v = state.v + dvdt * dt;
return state;
}
return function springRK4Factory (tension, friction, duration) {
var initState = {
x: -1,
v: 0,
tension: null,
friction: null
},
path = [0],
time_lapsed = 0,
tolerance = 1 / 10000,
DT = 16 / 1000,
have_duration, dt, last_state;
tension = parseFloat(tension) || 500;
friction = parseFloat(friction) || 20;
duration = duration || null;
initState.tension = tension;
initState.friction = friction;
have_duration = duration !== null;
/* Calculate the actual time it takes for this animation to complete with the provided conditions. */
if (have_duration) {
/* Run the simulation without a duration. */
time_lapsed = springRK4Factory(tension, friction);
/* Compute the adjusted time delta. */
dt = time_lapsed / duration * DT;
} else {
dt = DT;
}
while (true) {
/* Next/step function .*/
last_state = springIntegrateState(last_state || initState, dt);
/* Store the position. */
path.push(1 + last_state.x);
time_lapsed += 16;
/* If the change threshold is reached, break. */
if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {
break;
}
}
/* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the
computed path and returns a snapshot of the position according to a given percentComplete. */
return !have_duration ? time_lapsed : function(percentComplete) { return path[ (percentComplete * (path.length - 1)) | 0 ]; };
};
}());
/* jQuery easings. */
Velocity.Easings = {
linear: function(p) { return p; },
swing: function(p) { return 0.5 - Math.cos( p * Math.PI ) / 2 },
/* Bonus "spring" easing, which is a less exaggerated version of easeInOutElastic. */
spring: function(p) { return 1 - (Math.cos(p * 4.5 * Math.PI) * Math.exp(-p * 6)); }
};
/* CSS3 and Robert Penner easings. */
$.each(
[
[ "ease", [ 0.25, 0.1, 0.25, 1.0 ] ],
[ "ease-in", [ 0.42, 0.0, 1.00, 1.0 ] ],
[ "ease-out", [ 0.00, 0.0, 0.58, 1.0 ] ],
[ "ease-in-out", [ 0.42, 0.0, 0.58, 1.0 ] ],
[ "easeInSine", [ 0.47, 0, 0.745, 0.715 ] ],
[ "easeOutSine", [ 0.39, 0.575, 0.565, 1 ] ],
[ "easeInOutSine", [ 0.445, 0.05, 0.55, 0.95 ] ],
[ "easeInQuad", [ 0.55, 0.085, 0.68, 0.53 ] ],
[ "easeOutQuad", [ 0.25, 0.46, 0.45, 0.94 ] ],
[ "easeInOutQuad", [ 0.455, 0.03, 0.515, 0.955 ] ],
[ "easeInCubic", [ 0.55, 0.055, 0.675, 0.19 ] ],
[ "easeOutCubic", [ 0.215, 0.61, 0.355, 1 ] ],
[ "easeInOutCubic", [ 0.645, 0.045, 0.355, 1 ] ],
[ "easeInQuart", [ 0.895, 0.03, 0.685, 0.22 ] ],
[ "easeOutQuart", [ 0.165, 0.84, 0.44, 1 ] ],
[ "easeInOutQuart", [ 0.77, 0, 0.175, 1 ] ],
[ "easeInQuint", [ 0.755, 0.05, 0.855, 0.06 ] ],
[ "easeOutQuint", [ 0.23, 1, 0.32, 1 ] ],
[ "easeInOutQuint", [ 0.86, 0, 0.07, 1 ] ],
[ "easeInExpo", [ 0.95, 0.05, 0.795, 0.035 ] ],
[ "easeOutExpo", [ 0.19, 1, 0.22, 1 ] ],
[ "easeInOutExpo", [ 1, 0, 0, 1 ] ],
[ "easeInCirc", [ 0.6, 0.04, 0.98, 0.335 ] ],
[ "easeOutCirc", [ 0.075, 0.82, 0.165, 1 ] ],
[ "easeInOutCirc", [ 0.785, 0.135, 0.15, 0.86 ] ]
], function(i, easingArray) {
Velocity.Easings[easingArray[0]] = generateBezier.apply(null, easingArray[1]);
});
/* Determine the appropriate easing type given an easing input. */
function getEasing(value, duration) {
var easing = value;
/* The easing option can either be a string that references a pre-registered easing,
or it can be a two-/four-item array of integers to be converted into a bezier/spring function. */
if (Type.isString(value)) {
/* Ensure that the easing has been assigned to jQuery's Velocity.Easings object. */
if (!Velocity.Easings[value]) {
easing = false;
}
} else if (Type.isArray(value) && value.length === 1) {
easing = generateStep.apply(null, value);
} else if (Type.isArray(value) && value.length === 2) {
/* springRK4 must be passed the animation's duration. */
/* Note: If the springRK4 array contains non-numbers, generateSpringRK4() returns an easing
function generated with default tension and friction values. */
easing = generateSpringRK4.apply(null, value.concat([ duration ]));
} else if (Type.isArray(value) && value.length === 4) {
/* Note: If the bezier array contains non-numbers, generateBezier() returns false. */
easing = generateBezier.apply(null, value);
} else {
easing = false;
}
/* Revert to the Velocity-wide default easing type, or fall back to "swing" (which is also jQuery's default)
if the Velocity-wide default has been incorrectly modified. */
if (easing === false) {
if (Velocity.Easings[Velocity.defaults.easing]) {
easing = Velocity.defaults.easing;
} else {
easing = EASING_DEFAULT;
}
}
return easing;
}
/*****************
CSS Stack
*****************/
/* The CSS object is a highly condensed and performant CSS stack that fully replaces jQuery's.
It handles the validation, getting, and setting of both standard CSS properties and CSS property hooks. */
/* Note: A "CSS" shorthand is aliased so that our code is easier to read. */
var CSS = Velocity.CSS = {
/*************
RegEx
*************/
RegEx: {
isHex: /^#([A-f\d]{3}){1,2}$/i,
/* Unwrap a property value's surrounding text, e.g. "rgba(4, 3, 2, 1)" ==> "4, 3, 2, 1" and "rect(4px 3px 2px 1px)" ==> "4px 3px 2px 1px". */
valueUnwrap: /^[A-z]+\((.*)\)$/i,
wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,
/* Split a multi-value property into an array of subvalues, e.g. "rgba(4, 3, 2, 1) 4px 3px 2px 1px" ==> [ "rgba(4, 3, 2, 1)", "4px", "3px", "2px", "1px" ]. */
valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/ig
},
/************
Lists
************/
Lists: {
colors: [ "fill", "stroke", "stopColor", "color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor" ],
transformsBase: [ "translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ" ],
transforms3D: [ "transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY" ]
},
/************
Hooks
************/
/* Hooks allow a subproperty (e.g. "boxShadowBlur") of a compound-value CSS property
(e.g. "boxShadow: X Y Blur Spread Color") to be animated as if it were a discrete property. */
/* Note: Beyond enabling fine-grained property animation, hooking is necessary since Velocity only
tweens properties with single numeric values; unlike CSS transitions, Velocity does not interpolate compound-values. */
Hooks: {
/********************
Registration
********************/
/* Templates are a concise way of indicating which subproperties must be individually registered for each compound-value CSS property. */
/* Each template consists of the compound-value's base name, its constituent subproperty names, and those subproperties' default values. */
templates: {
"textShadow": [ "Color X Y Blur", "black 0px 0px 0px" ],
"boxShadow": [ "Color X Y Blur Spread", "black 0px 0px 0px 0px" ],
"clip": [ "Top Right Bottom Left", "0px 0px 0px 0px" ],
"backgroundPosition": [ "X Y", "0% 0%" ],
"transformOrigin": [ "X Y Z", "50% 50% 0px" ],
"perspectiveOrigin": [ "X Y", "50% 50%" ]
},
/* A "registered" hook is one that has been converted from its template form into a live,
tweenable property. It contains data to associate it with its root property. */
registered: {
/* Note: A registered hook looks like this ==> textShadowBlur: [ "textShadow", 3 ],
which consists of the subproperty's name, the associated root property's name,
and the subproperty's position in the root's value. */
},
/* Convert the templates into individual hooks then append them to the registered object above. */
register: function () {
/* Color hooks registration: Colors are defaulted to white -- as opposed to black -- since colors that are
currently set to "transparent" default to their respective template below when color-animated,
and white is typically a closer match to transparent than black is. An exception is made for text ("color"),
which is almost always set closer to black than white. */
for (var i = 0; i < CSS.Lists.colors.length; i++) {
var rgbComponents = (CSS.Lists.colors[i] === "color") ? "0 0 0 1" : "255 255 255 1";
CSS.Hooks.templates[CSS.Lists.colors[i]] = [ "Red Green Blue Alpha", rgbComponents ];
}
var rootProperty,
hookTemplate,
hookNames;
/* In IE, color values inside compound-value properties are positioned at the end the value instead of at the beginning.
Thus, we re-arrange the templates accordingly. */
if (IE) {
for (rootProperty in CSS.Hooks.templates) {
hookTemplate = CSS.Hooks.templates[rootProperty];
hookNames = hookTemplate[0].split(" ");
var defaultValues = hookTemplate[1].match(CSS.RegEx.valueSplit);
if (hookNames[0] === "Color") {
/* Reposition both the hook's name and its default value to the end of their respective strings. */
hookNames.push(hookNames.shift());
defaultValues.push(defaultValues.shift());
/* Replace the existing template for the hook's root property. */
CSS.Hooks.templates[rootProperty] = [ hookNames.join(" "), defaultValues.join(" ") ];
}
}
}
/* Hook registration. */
for (rootProperty in CSS.Hooks.templates) {
hookTemplate = CSS.Hooks.templates[rootProperty];
hookNames = hookTemplate[0].split(" ");
for (var i in hookNames) {
var fullHookName = rootProperty + hookNames[i],
hookPosition = i;
/* For each hook, register its full name (e.g. textShadowBlur) with its root property (e.g. textShadow)
and the hook's position in its template's default value string. */
CSS.Hooks.registered[fullHookName] = [ rootProperty, hookPosition ];
}
}
},
/*****************************
Injection and Extraction
*****************************/
/* Look up the root property associated with the hook (e.g. return "textShadow" for "textShadowBlur"). */
/* Since a hook cannot be set directly (the browser won't recognize it), style updating for hooks is routed through the hook's root property. */
getRoot: function (property) {
var hookData = CSS.Hooks.registered[property];
if (hookData) {
return hookData[0];
} else {
/* If there was no hook match, return the property name untouched. */
return property;
}
},
/* Convert any rootPropertyValue, null or otherwise, into a space-delimited list of hook values so that
the targeted hook can be injected or extracted at its standard position. */
cleanRootPropertyValue: function(rootProperty, rootPropertyValue) {
/* If the rootPropertyValue is wrapped with "rgb()", "clip()", etc., remove the wrapping to normalize the value before manipulation. */
if (CSS.RegEx.valueUnwrap.test(rootPropertyValue)) {
rootPropertyValue = rootPropertyValue.match(CSS.RegEx.valueUnwrap)[1];
}
/* If rootPropertyValue is a CSS null-value (from which there's inherently no hook value to extract),
default to the root's default value as defined in CSS.Hooks.templates. */
/* Note: CSS null-values include "none", "auto", and "transparent". They must be converted into their
zero-values (e.g. textShadow: "none" ==> textShadow: "0px 0px 0px black") for hook manipulation to proceed. */
if (CSS.Values.isCSSNullValue(rootPropertyValue)) {
rootPropertyValue = CSS.Hooks.templates[rootProperty][1];
}
return rootPropertyValue;
},
/* Extracted the hook's value from its root property's value. This is used to get the starting value of an animating hook. */
extractValue: function (fullHookName, rootPropertyValue) {
var hookData = CSS.Hooks.registered[fullHookName];
if (hookData) {
var hookRoot = hookData[0],
hookPosition = hookData[1];
rootPropertyValue = CSS.Hooks.cleanRootPropertyValue(hookRoot, rootPropertyValue);
/* Split rootPropertyValue into its constituent hook values then grab the desired hook at its standard position. */
return rootPropertyValue.toString().match(CSS.RegEx.valueSplit)[hookPosition];
} else {
/* If the provided fullHookName isn't a registered hook, return the rootPropertyValue that was passed in. */
return rootPropertyValue;
}
},
/* Inject the hook's value into its root property's value. This is used to piece back together the root property
once Velocity has updated one of its individually hooked values through tweening. */
injectValue: function (fullHookName, hookValue, rootPropertyValue) {
var hookData = CSS.Hooks.registered[fullHookName];
if (hookData) {
var hookRoot = hookData[0],
hookPosition = hookData[1],
rootPropertyValueParts,
rootPropertyValueUpdated;
rootPropertyValue = CSS.Hooks.cleanRootPropertyValue(hookRoot, rootPropertyValue);
/* Split rootPropertyValue into its individual hook values, replace the targeted value with hookValue,
then reconstruct the rootPropertyValue string. */
rootPropertyValueParts = rootPropertyValue.toString().match(CSS.RegEx.valueSplit);
rootPropertyValueParts[hookPosition] = hookValue;
rootPropertyValueUpdated = rootPropertyValueParts.join(" ");
return rootPropertyValueUpdated;
} else {
/* If the provided fullHookName isn't a registered hook, return the rootPropertyValue that was passed in. */
return rootPropertyValue;
}
}
},
/*******************
Normalizations
*******************/
/* Normalizations standardize CSS property manipulation by pollyfilling browser-specific implementations (e.g. opacity)
and reformatting special properties (e.g. clip, rgba) to look like standard ones. */
Normalizations: {
/* Normalizations are passed a normalization target (either the property's name, its extracted value, or its injected value),
the targeted element (which may need to be queried), and the targeted property value. */
registered: {
clip: function (type, element, propertyValue) {
switch (type) {
case "name":
return "clip";
/* Clip needs to be unwrapped and stripped of its commas during extraction. */
case "extract":
var extracted;
/* If Velocity also extracted this value, skip extraction. */
if (CSS.RegEx.wrappedValueAlreadyExtracted.test(propertyValue)) {
extracted = propertyValue;
} else {
/* Remove the "rect()" wrapper. */
extracted = propertyValue.toString().match(CSS.RegEx.valueUnwrap);
/* Strip off commas. */
extracted = extracted ? extracted[1].replace(/,(\s+)?/g, " ") : propertyValue;
}
return extracted;
/* Clip needs to be re-wrapped during injection. */
case "inject":
return "rect(" + propertyValue + ")";
}
},
blur: function(type, element, propertyValue) {
switch (type) {
case "name":
return Velocity.State.isFirefox ? "filter" : "-webkit-filter";
case "extract":
var extracted = parseFloat(propertyValue);
/* If extracted is NaN, meaning the value isn't already extracted. */
if (!(extracted || extracted === 0)) {
var blurComponent = propertyValue.toString().match(/blur\(([0-9]+[A-z]+)\)/i);
/* If the filter string had a blur component, return just the blur value and unit type. */
if (blurComponent) {
extracted = blurComponent[1];
/* If the component doesn't exist, default blur to 0. */
} else {
extracted = 0;
}
}
return extracted;
/* Blur needs to be re-wrapped during injection. */
case "inject":
/* For the blur effect to be fully de-applied, it needs to be set to "none" instead of 0. */
if (!parseFloat(propertyValue)) {
return "none";
} else {
return "blur(" + propertyValue + ")";
}
}
},
/* <=IE8 do not support the standard opacity property. They use filter:alpha(opacity=INT) instead. */
opacity: function (type, element, propertyValue) {
if (IE <= 8) {
switch (type) {
case "name":
return "filter";
case "extract":
/* <=IE8 return a "filter" value of "alpha(opacity=\d{1,3})".
Extract the value and convert it to a decimal value to match the standard CSS opacity property's formatting. */
var extracted = propertyValue.toString().match(/alpha\(opacity=(.*)\)/i);
if (extracted) {
/* Convert to decimal value. */
propertyValue = extracted[1] / 100;
} else {
/* When extracting opacity, default to 1 since a null value means opacity hasn't been set. */
propertyValue = 1;
}
return propertyValue;
case "inject":
/* Opacified elements are required to have their zoom property set to a non-zero value. */
element.style.zoom = 1;
/* Setting the filter property on elements with certain font property combinations can result in a
highly unappealing ultra-bolding effect. There's no way to remedy this throughout a tween, but dropping the
value altogether (when opacity hits 1) at leasts ensures that the glitch is gone post-tweening. */
if (parseFloat(propertyValue) >= 1) {
return "";
} else {
/* As per the filter property's spec, convert the decimal value to a whole number and wrap the value. */
return "alpha(opacity=" + parseInt(parseFloat(propertyValue) * 100, 10) + ")";
}
}
/* With all other browsers, normalization is not required; return the same values that were passed in. */
} else {
switch (type) {
case "name":
return "opacity";
case "extract":
return propertyValue;
case "inject":
return propertyValue;
}
}
}
},
/*****************************
Batched Registrations
*****************************/
/* Note: Batched normalizations extend the CSS.Normalizations.registered object. */
register: function () {
/*****************
Transforms
*****************/
/* Transforms are the subproperties contained by the CSS "transform" property. Transforms must undergo normalization
so that they can be referenced in a properties map by their individual names. */
/* Note: When transforms are "set", they are actually assigned to a per-element transformCache. When all transform
setting is complete complete, CSS.flushTransformCache() must be manually called to flush the values to the DOM.
Transform setting is batched in this way to improve performance: the transform style only needs to be updated
once when multiple transform subproperties are being animated simultaneously. */
/* Note: IE9 and Android Gingerbread have support for 2D -- but not 3D -- transforms. Since animating unsupported
transform properties results in the browser ignoring the *entire* transform string, we prevent these 3D values
from being normalized for these browsers so that tweening skips these properties altogether
(since it will ignore them as being unsupported by the browser.) */
if (!(IE <= 9) && !Velocity.State.isGingerbread) {
/* Note: Since the standalone CSS "perspective" property and the CSS transform "perspective" subproperty
share the same name, the latter is given a unique token within Velocity: "transformPerspective". */
CSS.Lists.transformsBase = CSS.Lists.transformsBase.concat(CSS.Lists.transforms3D);
}
for (var i = 0; i < CSS.Lists.transformsBase.length; i++) {
/* Wrap the dynamically generated normalization function in a new scope so that transformName's value is
paired with its respective function. (Otherwise, all functions would take the final for loop's transformName.) */
(function() {
var transformName = CSS.Lists.transformsBase[i];
CSS.Normalizations.registered[transformName] = function (type, element, propertyValue) {
switch (type) {
/* The normalized property name is the parent "transform" property -- the property that is actually set in CSS. */
case "name":
return "transform";
/* Transform values are cached onto a per-element transformCache object. */
case "extract":
/* If this transform has yet to be assigned a value, return its null value. */
if (Data(element) === undefined || Data(element).transformCache[transformName] === undefined) {
/* Scale CSS.Lists.transformsBase default to 1 whereas all other transform properties default to 0. */
return /^scale/i.test(transformName) ? 1 : 0;
/* When transform values are set, they are wrapped in parentheses as per the CSS spec.
Thus, when extracting their values (for tween calculations), we strip off the parentheses. */
} else {
return Data(element).transformCache[transformName].replace(/[()]/g, "");
}
case "inject":
var invalid = false;
/* If an individual transform property contains an unsupported unit type, the browser ignores the *entire* transform property.
Thus, protect users from themselves by skipping setting for transform values supplied with invalid unit types. */
/* Switch on the base transform type; ignore the axis by removing the last letter from the transform's name. */
switch (transformName.substr(0, transformName.length - 1)) {
/* Whitelist unit types for each transform. */
case "translate":
invalid = !/(%|px|em|rem|vw|vh|\d)$/i.test(propertyValue);
break;
/* Since an axis-free "scale" property is supported as well, a little hack is used here to detect it by chopping off its last letter. */
case "scal":
case "scale":
/* Chrome on Android has a bug in which scaled elements blur if their initial scale
value is below 1 (which can happen with forcefeeding). Thus, we detect a yet-unset scale property
and ensure that its first value is always 1. More info: http://stackoverflow.com/questions/10417890/css3-animations-with-transform-causes-blurred-elements-on-webkit/10417962#10417962 */
if (Velocity.State.isAndroid && Data(element).transformCache[transformName] === undefined && propertyValue < 1) {
propertyValue = 1;
}
invalid = !/(\d)$/i.test(propertyValue);
break;
case "skew":
invalid = !/(deg|\d)$/i.test(propertyValue);
break;
case "rotate":
invalid = !/(deg|\d)$/i.test(propertyValue);
break;
}
if (!invalid) {
/* As per the CSS spec, wrap the value in parentheses. */
Data(element).transformCache[transformName] = "(" + propertyValue + ")";
}
/* Although the value is set on the transformCache object, return the newly-updated value for the calling code to process as normal. */
return Data(element).transformCache[transformName];
}
};
})();
}
/*************
Colors
*************/
/* Since Velocity only animates a single numeric value per property, color animation is achieved by hooking the individual RGBA components of CSS color properties.
Accordingly, color values must be normalized (e.g. "#ff0000", "red", and "rgb(255, 0, 0)" ==> "255 0 0 1") so that their components can be injected/extracted by CSS.Hooks logic. */
for (var i = 0; i < CSS.Lists.colors.length; i++) {
/* Wrap the dynamically generated normalization function in a new scope so that colorName's value is paired with its respective function.
(Otherwise, all functions would take the final for loop's colorName.) */
(function () {
var colorName = CSS.Lists.colors[i];
/* Note: In IE<=8, which support rgb but not rgba, color properties are reverted to rgb by stripping off the alpha component. */
CSS.Normalizations.registered[colorName] = function(type, element, propertyValue) {
switch (type) {
case "name":
return colorName;
/* Convert all color values into the rgb format. (Old IE can return hex values and color names instead of rgb/rgba.) */
case "extract":
var extracted;
/* If the color is already in its hookable form (e.g. "255 255 255 1") due to having been previously extracted, skip extraction. */
if (CSS.RegEx.wrappedValueAlreadyExtracted.test(propertyValue)) {
extracted = propertyValue;
} else {
var converted,
colorNames = {
black: "rgb(0, 0, 0)",
blue: "rgb(0, 0, 255)",
gray: "rgb(128, 128, 128)",
green: "rgb(0, 128, 0)",
red: "rgb(255, 0, 0)",
white: "rgb(255, 255, 255)"
};
/* Convert color names to rgb. */
if (/^[A-z]+$/i.test(propertyValue)) {
if (colorNames[propertyValue] !== undefined) {
converted = colorNames[propertyValue]
} else {
/* If an unmatched color name is provided, default to black. */
converted = colorNames.black;
}
/* Convert hex values to rgb. */
} else if (CSS.RegEx.isHex.test(propertyValue)) {
converted = "rgb(" + CSS.Values.hexToRgb(propertyValue).join(" ") + ")";
/* If the provided color doesn't match any of the accepted color formats, default to black. */
} else if (!(/^rgba?\(/i.test(propertyValue))) {
converted = colorNames.black;
}
/* Remove the surrounding "rgb/rgba()" string then replace commas with spaces and strip
repeated spaces (in case the value included spaces to begin with). */
extracted = (converted || propertyValue).toString().match(CSS.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g, " ");
}
/* So long as this isn't <=IE8, add a fourth (alpha) component if it's missing and default it to 1 (visible). */
if (!(IE <= 8) && extracted.split(" ").length === 3) {
extracted += " 1";
}
return extracted;
case "inject":
/* If this is IE<=8 and an alpha component exists, strip it off. */
if (IE <= 8) {
if (propertyValue.split(" ").length === 4) {
propertyValue = propertyValue.split(/\s+/).slice(0, 3).join(" ");
}
/* Otherwise, add a fourth (alpha) component if it's missing and default it to 1 (visible). */
} else if (propertyValue.split(" ").length === 3) {
propertyValue += " 1";
}
/* Re-insert the browser-appropriate wrapper("rgb/rgba()"), insert commas, and strip off decimal units
on all values but the fourth (R, G, and B only accept whole numbers). */
return (IE <= 8 ? "rgb" : "rgba") + "(" + propertyValue.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")";
}
};
})();
}
}
},
/************************
CSS Property Names
************************/
Names: {
/* Camelcase a property name into its JavaScript notation (e.g. "background-color" ==> "backgroundColor").
Camelcasing is used to normalize property names between and across calls. */
camelCase: function (property) {
return property.replace(/-(\w)/g, function (match, subMatch) {
return subMatch.toUpperCase();
});
},
/* For SVG elements, some properties (namely, dimensional ones) are GET/SET via the element's HTML attributes (instead of via CSS styles). */
SVGAttribute: function (property) {
var SVGAttributes = "width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";
/* Certain browsers require an SVG transform to be applied as an attribute. (Otherwise, application via CSS is preferable due to 3D support.) */
if (IE || (Velocity.State.isAndroid && !Velocity.State.isChrome)) {
SVGAttributes += "|transform";
}
return new RegExp("^(" + SVGAttributes + ")$", "i").test(property);
},
/* Determine whether a property should be set with a vendor prefix. */
/* If a prefixed version of the property exists, return it. Otherwise, return the original property name.
If the property is not at all supported by the browser, return a false flag. */
prefixCheck: function (property) {
/* If this property has already been checked, return the cached value. */
if (Velocity.State.prefixMatches[property]) {
return [ Velocity.State.prefixMatches[property], true ];
} else {
var vendors = [ "", "Webkit", "Moz", "ms", "O" ];
for (var i = 0, vendorsLength = vendors.length; i < vendorsLength; i++) {
var propertyPrefixed;
if (i === 0) {
propertyPrefixed = property;
} else {
/* Capitalize the first letter of the property to conform to JavaScript vendor prefix notation (e.g. webkitFilter). */
propertyPrefixed = vendors[i] + property.replace(/^\w/, function(match) { return match.toUpperCase(); });
}
/* Check if the browser supports this property as prefixed. */
if (Type.isString(Velocity.State.prefixElement.style[propertyPrefixed])) {
/* Cache the match. */
Velocity.State.prefixMatches[property] = propertyPrefixed;
return [ propertyPrefixed, true ];
}
}
/* If the browser doesn't support this property in any form, include a false flag so that the caller can decide how to proceed. */
return [ property, false ];
}
}
},
/************************
CSS Property Values
************************/
Values: {
/* Hex to RGB conversion. Copyright Tim Down: http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb */
hexToRgb: function (hex) {
var shortformRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
longformRegex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,
rgbParts;
hex = hex.replace(shortformRegex, function (m, r, g, b) {
return r + r + g + g + b + b;
});
rgbParts = longformRegex.exec(hex);
return rgbParts ? [ parseInt(rgbParts[1], 16), parseInt(rgbParts[2], 16), parseInt(rgbParts[3], 16) ] : [ 0, 0, 0 ];
},
isCSSNullValue: function (value) {
/* The browser defaults CSS values that have not been set to either 0 or one of several possible null-value strings.
Thus, we check for both falsiness and these special strings. */
/* Null-value checking is performed to default the special strings to 0 (for the sake of tweening) or their hook
templates as defined as CSS.Hooks (for the sake of hook injection/extraction). */
/* Note: Chrome returns "rgba(0, 0, 0, 0)" for an undefined color whereas IE returns "transparent". */
return (value == 0 || /^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(value));
},
/* Retrieve a property's default unit type. Used for assigning a unit type when one is not supplied by the user. */
getUnitType: function (property) {
if (/^(rotate|skew)/i.test(property)) {
return "deg";
} else if (/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(property)) {
/* The above properties are unitless. */
return "";
} else {
/* Default to px for all other properties. */
return "px";
}
},
/* HTML elements default to an associated display type when they're not set to display:none. */
/* Note: This function is used for correctly setting the non-"none" display value in certain Velocity redirects, such as fadeIn/Out. */
getDisplayType: function (element) {
var tagName = element && element.tagName.toString().toLowerCase();
if (/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(tagName)) {
return "inline";
} else if (/^(li)$/i.test(tagName)) {
return "list-item";
} else if (/^(tr)$/i.test(tagName)) {
return "table-row";
} else if (/^(table)$/i.test(tagName)) {
return "table";
} else if (/^(tbody)$/i.test(tagName)) {
return "table-row-group";
/* Default to "block" when no match is found. */
} else {
return "block";
}
},
/* The class add/remove functions are used to temporarily apply a "velocity-animating" class to elements while they're animating. */
addClass: function (element, className) {
if (element.classList) {
element.classList.add(className);
} else {
element.className += (element.className.length ? " " : "") + className;
}
},
removeClass: function (element, className) {
if (element.classList) {
element.classList.remove(className);
} else {
element.className = element.className.toString().replace(new RegExp("(^|\\s)" + className.split(" ").join("|") + "(\\s|$)", "gi"), " ");
}
}
},
/****************************
Style Getting & Setting
****************************/
/* The singular getPropertyValue, which routes the logic for all normalizations, hooks, and standard CSS properties. */
getPropertyValue: function (element, property, rootPropertyValue, forceStyleLookup) {
/* Get an element's computed property value. */
/* Note: Retrieving the value of a CSS property cannot simply be performed by checking an element's
style attribute (which only reflects user-defined values). Instead, the browser must be queried for a property's
*computed* value. You can read more about getComputedStyle here: https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle */
function computePropertyValue (element, property) {
/* When box-sizing isn't set to border-box, height and width style values are incorrectly computed when an
element's scrollbars are visible (which expands the element's dimensions). Thus, we defer to the more accurate
offsetHeight/Width property, which includes the total dimensions for interior, border, padding, and scrollbar.
We subtract border and padding to get the sum of interior + scrollbar. */
var computedValue = 0;
/* IE<=8 doesn't support window.getComputedStyle, thus we defer to jQuery, which has an extensive array
of hacks to accurately retrieve IE8 property values. Re-implementing that logic here is not worth bloating the
codebase for a dying browser. The performance repercussions of using jQuery here are minimal since
Velocity is optimized to rarely (and sometimes never) query the DOM. Further, the $.css() codepath isn't that slow. */
if (IE <= 8) {
computedValue = $.css(element, property); /* GET */
/* All other browsers support getComputedStyle. The returned live object reference is cached onto its
associated element so that it does not need to be refetched upon every GET. */
} else {
/* Browsers do not return height and width values for elements that are set to display:"none". Thus, we temporarily
toggle display to the element type's default value. */
var toggleDisplay = false;
if (/^(width|height)$/.test(property) && CSS.getPropertyValue(element, "display") === 0) {
toggleDisplay = true;
CSS.setPropertyValue(element, "display", CSS.Values.getDisplayType(element));
}
function revertDisplay () {
if (toggleDisplay) {
CSS.setPropertyValue(element, "display", "none");
}
}
if (!forceStyleLookup) {
if (property === "height" && CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() !== "border-box") {
var contentBoxHeight = element.offsetHeight - (parseFloat(CSS.getPropertyValue(element, "borderTopWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "borderBottomWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingTop")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingBottom")) || 0);
revertDisplay();
return contentBoxHeight;
} else if (property === "width" && CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() !== "border-box") {
var contentBoxWidth = element.offsetWidth - (parseFloat(CSS.getPropertyValue(element, "borderLeftWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "borderRightWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingLeft")) || 0) - (parseFloat(CSS.getPropertyValue(element, "paddingRight")) || 0);
revertDisplay();
return contentBoxWidth;
}
}
var computedStyle;
/* For elements that Velocity hasn't been called on directly (e.g. when Velocity queries the DOM on behalf
of a parent of an element its animating), perform a direct getComputedStyle lookup since the object isn't cached. */
if (Data(element) === undefined) {
computedStyle = window.getComputedStyle(element, null); /* GET */
/* If the computedStyle object has yet to be cached, do so now. */
} else if (!Data(element).computedStyle) {
computedStyle = Data(element).computedStyle = window.getComputedStyle(element, null); /* GET */
/* If computedStyle is cached, use it. */
} else {
computedStyle = Data(element).computedStyle;
}
/* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.
Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.
So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */
if (property === "borderColor") {
property = "borderTopColor";
}
/* IE9 has a bug in which the "filter" property must be accessed from computedStyle using the getPropertyValue method
instead of a direct property lookup. The getPropertyValue method is slower than a direct lookup, which is why we avoid it by default. */
if (IE === 9 && property === "filter") {
computedValue = computedStyle.getPropertyValue(property); /* GET */
} else {
computedValue = computedStyle[property];
}
/* Fall back to the property's style value (if defined) when computedValue returns nothing,
which can happen when the element hasn't been painted. */
if (computedValue === "" || computedValue === null) {
computedValue = element.style[property];
}
revertDisplay();
}
/* For top, right, bottom, and left (TRBL) values that are set to "auto" on elements of "fixed" or "absolute" position,
defer to jQuery for converting "auto" to a numeric value. (For elements with a "static" or "relative" position, "auto" has the same
effect as being set to 0, so no conversion is necessary.) */
/* An example of why numeric conversion is necessary: When an element with "position:absolute" has an untouched "left"
property, which reverts to "auto", left's value is 0 relative to its parent element, but is often non-zero relative
to its *containing* (not parent) element, which is the nearest "position:relative" ancestor or the viewport (and always the viewport in the case of "position:fixed"). */
if (computedValue === "auto" && /^(top|right|bottom|left)$/i.test(property)) {
var position = computePropertyValue(element, "position"); /* GET */
/* For absolute positioning, jQuery's $.position() only returns values for top and left;
right and bottom will have their "auto" value reverted to 0. */
/* Note: A jQuery object must be created here since jQuery doesn't have a low-level alias for $.position().
Not a big deal since we're currently in a GET batch anyway. */
if (position === "fixed" || (position === "absolute" && /top|left/i.test(property))) {
/* Note: jQuery strips the pixel unit from its returned values; we re-add it here to conform with computePropertyValue's behavior. */
computedValue = $(element).position()[property] + "px"; /* GET */
}
}
return computedValue;
}
var propertyValue;
/* If this is a hooked property (e.g. "clipLeft" instead of the root property of "clip"),
extract the hook's value from a normalized rootPropertyValue using CSS.Hooks.extractValue(). */
if (CSS.Hooks.registered[property]) {
var hook = property,
hookRoot = CSS.Hooks.getRoot(hook);
/* If a cached rootPropertyValue wasn't passed in (which Velocity always attempts to do in order to avoid requerying the DOM),
query the DOM for the root property's value. */
if (rootPropertyValue === undefined) {
/* Since the browser is now being directly queried, use the official post-prefixing property name for this lookup. */
rootPropertyValue = CSS.getPropertyValue(element, CSS.Names.prefixCheck(hookRoot)[0]); /* GET */
}
/* If this root has a normalization registered, peform the associated normalization extraction. */
if (CSS.Normalizations.registered[hookRoot]) {
rootPropertyValue = CSS.Normalizations.registered[hookRoot]("extract", element, rootPropertyValue);
}
/* Extract the hook's value. */
propertyValue = CSS.Hooks.extractValue(hook, rootPropertyValue);
/* If this is a normalized property (e.g. "opacity" becomes "filter" in <=IE8) or "translateX" becomes "transform"),
normalize the property's name and value, and handle the special case of transforms. */
/* Note: Normalizing a property is mutually exclusive from hooking a property since hook-extracted values are strictly
numerical and therefore do not require normalization extraction. */
} else if (CSS.Normalizations.registered[property]) {
var normalizedPropertyName,
normalizedPropertyValue;
normalizedPropertyName = CSS.Normalizations.registered[property]("name", element);
/* Transform values are calculated via normalization extraction (see below), which checks against the element's transformCache.
At no point do transform GETs ever actually query the DOM; initial stylesheet values are never processed.
This is because parsing 3D transform matrices is not always accurate and would bloat our codebase;
thus, normalization extraction defaults initial transform values to their zero-values (e.g. 1 for scaleX and 0 for translateX). */
if (normalizedPropertyName !== "transform") {
normalizedPropertyValue = computePropertyValue(element, CSS.Names.prefixCheck(normalizedPropertyName)[0]); /* GET */
/* If the value is a CSS null-value and this property has a hook template, use that zero-value template so that hooks can be extracted from it. */
if (CSS.Values.isCSSNullValue(normalizedPropertyValue) && CSS.Hooks.templates[property]) {
normalizedPropertyValue = CSS.Hooks.templates[property][1];
}
}
propertyValue = CSS.Normalizations.registered[property]("extract", element, normalizedPropertyValue);
}
/* If a (numeric) value wasn't produced via hook extraction or normalization, query the DOM. */
if (!/^[\d-]/.test(propertyValue)) {
/* For SVG elements, dimensional properties (which SVGAttribute() detects) are tweened via
their HTML attribute values instead of their CSS style values. */
if (Data(element) && Data(element).isSVG && CSS.Names.SVGAttribute(property)) {
/* Since the height/width attribute values must be set manually, they don't reflect computed values.
Thus, we use use getBBox() to ensure we always get values for elements with undefined height/width attributes. */
if (/^(height|width)$/i.test(property)) {
/* Firefox throws an error if .getBBox() is called on an SVG that isn't attached to the DOM. */
try {
propertyValue = element.getBBox()[property];
} catch (error) {
propertyValue = 0;
}
/* Otherwise, access the attribute value directly. */
} else {
propertyValue = element.getAttribute(property);
}
} else {
propertyValue = computePropertyValue(element, CSS.Names.prefixCheck(property)[0]); /* GET */
}
}
/* Since property lookups are for animation purposes (which entails computing the numeric delta between start and end values),
convert CSS null-values to an integer of value 0. */
if (CSS.Values.isCSSNullValue(propertyValue)) {
propertyValue = 0;
}
if (Velocity.debug >= 2) console.log("Get " + property + ": " + propertyValue);
return propertyValue;
},
/* The singular setPropertyValue, which routes the logic for all normalizations, hooks, and standard CSS properties. */
setPropertyValue: function(element, property, propertyValue, rootPropertyValue, scrollData) {
var propertyName = property;
/* In order to be subjected to call options and element queueing, scroll animation is routed through Velocity as if it were a standard CSS property. */
if (property === "scroll") {
/* If a container option is present, scroll the container instead of the browser window. */
if (scrollData.container) {
scrollData.container["scroll" + scrollData.direction] = propertyValue;
/* Otherwise, Velocity defaults to scrolling the browser window. */
} else {
if (scrollData.direction === "Left") {
window.scrollTo(propertyValue, scrollData.alternateValue);
} else {
window.scrollTo(scrollData.alternateValue, propertyValue);
}
}
} else {
/* Transforms (translateX, rotateZ, etc.) are applied to a per-element transformCache object, which is manually flushed via flushTransformCache().
Thus, for now, we merely cache transforms being SET. */
if (CSS.Normalizations.registered[property] && CSS.Normalizations.registered[property]("name", element) === "transform") {
/* Perform a normalization injection. */
/* Note: The normalization logic handles the transformCache updating. */
CSS.Normalizations.registered[property]("inject", element, propertyValue);
propertyName = "transform";
propertyValue = Data(element).transformCache[property];
} else {
/* Inject hooks. */
if (CSS.Hooks.registered[property]) {
var hookName = property,
hookRoot = CSS.Hooks.getRoot(property);
/* If a cached rootPropertyValue was not provided, query the DOM for the hookRoot's current value. */
rootPropertyValue = rootPropertyValue || CSS.getPropertyValue(element, hookRoot); /* GET */
propertyValue = CSS.Hooks.injectValue(hookName, propertyValue, rootPropertyValue);
property = hookRoot;
}
/* Normalize names and values. */
if (CSS.Normalizations.registered[property]) {
propertyValue = CSS.Normalizations.registered[property]("inject", element, propertyValue);
property = CSS.Normalizations.registered[property]("name", element);
}
/* Assign the appropriate vendor prefix before performing an official style update. */
propertyName = CSS.Names.prefixCheck(property)[0];
/* A try/catch is used for IE<=8, which throws an error when "invalid" CSS values are set, e.g. a negative width.
Try/catch is avoided for other browsers since it incurs a performance overhead. */
if (IE <= 8) {
try {
element.style[propertyName] = propertyValue;
} catch (error) { if (Velocity.debug) console.log("Browser does not support [" + propertyValue + "] for [" + propertyName + "]"); }
/* SVG elements have their dimensional properties (width, height, x, y, cx, etc.) applied directly as attributes instead of as styles. */
/* Note: IE8 does not support SVG elements, so it's okay that we skip it for SVG animation. */
} else if (Data(element) && Data(element).isSVG && CSS.Names.SVGAttribute(property)) {
/* Note: For SVG attributes, vendor-prefixed property names are never used. */
/* Note: Not all CSS properties can be animated via attributes, but the browser won't throw an error for unsupported properties. */
element.setAttribute(property, propertyValue);
} else {
element.style[propertyName] = propertyValue;
}
if (Velocity.debug >= 2) console.log("Set " + property + " (" + propertyName + "): " + propertyValue);
}
}
/* Return the normalized property name and value in case the caller wants to know how these values were modified before being applied to the DOM. */
return [ propertyName, propertyValue ];
},
/* To increase performance by batching transform updates into a single SET, transforms are not directly applied to an element until flushTransformCache() is called. */
/* Note: Velocity applies transform properties in the same order that they are chronogically introduced to the element's CSS styles. */
flushTransformCache: function(element) {
var transformString = "";
/* Certain browsers require that SVG transforms be applied as an attribute. However, the SVG transform attribute takes a modified version of CSS's transform string
(units are dropped and, except for skewX/Y, subproperties are merged into their master property -- e.g. scaleX and scaleY are merged into scale(X Y). */
if ((IE || (Velocity.State.isAndroid && !Velocity.State.isChrome)) && Data(element).isSVG) {
/* Since transform values are stored in their parentheses-wrapped form, we use a helper function to strip out their numeric values.
Further, SVG transform properties only take unitless (representing pixels) values, so it's okay that parseFloat() strips the unit suffixed to the float value. */
function getTransformFloat (transformProperty) {
return parseFloat(CSS.getPropertyValue(element, transformProperty));
}
/* Create an object to organize all the transforms that we'll apply to the SVG element. To keep the logic simple,
we process *all* transform properties -- even those that may not be explicitly applied (since they default to their zero-values anyway). */
var SVGTransforms = {
translate: [ getTransformFloat("translateX"), getTransformFloat("translateY") ],
skewX: [ getTransformFloat("skewX") ], skewY: [ getTransformFloat("skewY") ],
/* If the scale property is set (non-1), use that value for the scaleX and scaleY values
(this behavior mimics the result of animating all these properties at once on HTML elements). */
scale: getTransformFloat("scale") !== 1 ? [ getTransformFloat("scale"), getTransformFloat("scale") ] : [ getTransformFloat("scaleX"), getTransformFloat("scaleY") ],
/* Note: SVG's rotate transform takes three values: rotation degrees followed by the X and Y values
defining the rotation's origin point. We ignore the origin values (default them to 0). */
rotate: [ getTransformFloat("rotateZ"), 0, 0 ]
};
/* Iterate through the transform properties in the user-defined property map order.
(This mimics the behavior of non-SVG transform animation.) */
$.each(Data(element).transformCache, function(transformName) {
/* Except for with skewX/Y, revert the axis-specific transform subproperties to their axis-free master
properties so that they match up with SVG's accepted transform properties. */
if (/^translate/i.test(transformName)) {
transformName = "translate";
} else if (/^scale/i.test(transformName)) {
transformName = "scale";
} else if (/^rotate/i.test(transformName)) {
transformName = "rotate";
}
/* Check that we haven't yet deleted the property from the SVGTransforms container. */
if (SVGTransforms[transformName]) {
/* Append the transform property in the SVG-supported transform format. As per the spec, surround the space-delimited values in parentheses. */
transformString += transformName + "(" + SVGTransforms[transformName].join(" ") + ")" + " ";
/* After processing an SVG transform property, delete it from the SVGTransforms container so we don't
re-insert the same master property if we encounter another one of its axis-specific properties. */
delete SVGTransforms[transformName];
}
});
} else {
var transformValue,
perspective;
/* Transform properties are stored as members of the transformCache object. Concatenate all the members into a string. */
$.each(Data(element).transformCache, function(transformName) {
transformValue = Data(element).transformCache[transformName];
/* Transform's perspective subproperty must be set first in order to take effect. Store it temporarily. */
if (transformName === "transformPerspective") {
perspective = transformValue;
return true;
}
/* IE9 only supports one rotation type, rotateZ, which it refers to as "rotate". */
if (IE === 9 && transformName === "rotateZ") {
transformName = "rotate";
}
transformString += transformName + transformValue + " ";
});
/* If present, set the perspective subproperty first. */
if (perspective) {
transformString = "perspective" + perspective + " " + transformString;
}
}
CSS.setPropertyValue(element, "transform", transformString);
}
};
/* Register hooks and normalizations. */
CSS.Hooks.register();
CSS.Normalizations.register();
/* Allow hook setting in the same fashion as jQuery's $.css(). */
Velocity.hook = function (elements, arg2, arg3) {
var value = undefined;
elements = sanitizeElements(elements);
$.each(elements, function(i, element) {
/* Initialize Velocity's per-element data cache if this element hasn't previously been animated. */
if (Data(element) === undefined) {
Velocity.init(element);
}
/* Get property value. If an element set was passed in, only return the value for the first element. */
if (arg3 === undefined) {
if (value === undefined) {
value = Velocity.CSS.getPropertyValue(element, arg2);
}
/* Set property value. */
} else {
/* sPV returns an array of the normalized propertyName/propertyValue pair used to update the DOM. */
var adjustedSet = Velocity.CSS.setPropertyValue(element, arg2, arg3);
/* Transform properties don't automatically set. They have to be flushed to the DOM. */
if (adjustedSet[0] === "transform") {
Velocity.CSS.flushTransformCache(element);
}
value = adjustedSet;
}
});
return value;
};
/*****************
Animation
*****************/
var animate = function() {
/******************
Call Chain
******************/
/* Logic for determining what to return to the call stack when exiting out of Velocity. */
function getChain () {
/* If we are using the utility function, attempt to return this call's promise. If no promise library was detected,
default to null instead of returning the targeted elements so that utility function's return value is standardized. */
if (isUtility) {
return promiseData.promise || null;
/* Otherwise, if we're using $.fn, return the jQuery-/Zepto-wrapped element set. */
} else {
return elementsWrapped;
}
}
/*************************
Arguments Assignment
*************************/
/* To allow for expressive CoffeeScript code, Velocity supports an alternative syntax in which "elements" (or "e"), "properties" (or "p"), and "options" (or "o")
objects are defined on a container object that's passed in as Velocity's sole argument. */
/* Note: Some browsers automatically populate arguments with a "properties" object. We detect it by checking for its default "names" property. */
var syntacticSugar = (arguments[0] && (arguments[0].p || (($.isPlainObject(arguments[0].properties) && !arguments[0].properties.names) || Type.isString(arguments[0].properties)))),
/* Whether Velocity was called via the utility function (as opposed to on a jQuery/Zepto object). */
isUtility,
/* When Velocity is called via the utility function ($.Velocity()/Velocity()), elements are explicitly
passed in as the first parameter. Thus, argument positioning varies. We normalize them here. */
elementsWrapped,
argumentIndex;
var elements,
propertiesMap,
options;
/* Detect jQuery/Zepto elements being animated via the $.fn method. */
if (Type.isWrapped(this)) {
isUtility = false;
argumentIndex = 0;
elements = this;
elementsWrapped = this;
/* Otherwise, raw elements are being animated via the utility function. */
} else {
isUtility = true;
argumentIndex = 1;
elements = syntacticSugar ? (arguments[0].elements || arguments[0].e) : arguments[0];
}
elements = sanitizeElements(elements);
if (!elements) {
return;
}
if (syntacticSugar) {
propertiesMap = arguments[0].properties || arguments[0].p;
options = arguments[0].options || arguments[0].o;
} else {
propertiesMap = arguments[argumentIndex];
options = arguments[argumentIndex + 1];
}
/* The length of the element set (in the form of a nodeList or an array of elements) is defaulted to 1 in case a
single raw DOM element is passed in (which doesn't contain a length property). */
var elementsLength = elements.length,
elementsIndex = 0;
/***************************
Argument Overloading
***************************/
/* Support is included for jQuery's argument overloading: $.animate(propertyMap [, duration] [, easing] [, complete]).
Overloading is detected by checking for the absence of an object being passed into options. */
/* Note: The stop and finish actions do not accept animation options, and are therefore excluded from this check. */
if (!/^(stop|finish)$/i.test(propertiesMap) && !$.isPlainObject(options)) {
/* The utility function shifts all arguments one position to the right, so we adjust for that offset. */
var startingArgumentPosition = argumentIndex + 1;
options = {};
/* Iterate through all options arguments */
for (var i = startingArgumentPosition; i < arguments.length; i++) {
/* Treat a number as a duration. Parse it out. */
/* Note: The following RegEx will return true if passed an array with a number as its first item.
Thus, arrays are skipped from this check. */
if (!Type.isArray(arguments[i]) && (/^(fast|normal|slow)$/i.test(arguments[i]) || /^\d/.test(arguments[i]))) {
options.duration = arguments[i];
/* Treat strings and arrays as easings. */
} else if (Type.isString(arguments[i]) || Type.isArray(arguments[i])) {
options.easing = arguments[i];
/* Treat a function as a complete callback. */
} else if (Type.isFunction(arguments[i])) {
options.complete = arguments[i];
}
}
}
/***************
Promises
***************/
var promiseData = {
promise: null,
resolver: null,
rejecter: null
};
/* If this call was made via the utility function (which is the default method of invocation when jQuery/Zepto are not being used), and if
promise support was detected, create a promise object for this call and store references to its resolver and rejecter methods. The resolve
method is used when a call completes naturally or is prematurely stopped by the user. In both cases, completeCall() handles the associated
call cleanup and promise resolving logic. The reject method is used when an invalid set of arguments is passed into a Velocity call. */
/* Note: Velocity employs a call-based queueing architecture, which means that stopping an animating element actually stops the full call that
triggered it -- not that one element exclusively. Similarly, there is one promise per call, and all elements targeted by a Velocity call are
grouped together for the purposes of resolving and rejecting a promise. */
if (isUtility && Velocity.Promise) {
promiseData.promise = new Velocity.Promise(function (resolve, reject) {
promiseData.resolver = resolve;
promiseData.rejecter = reject;
});
}
/*********************
Action Detection
*********************/
/* Velocity's behavior is categorized into "actions": Elements can either be specially scrolled into view,
or they can be started, stopped, or reversed. If a literal or referenced properties map is passed in as Velocity's
first argument, the associated action is "start". Alternatively, "scroll", "reverse", or "stop" can be passed in instead of a properties map. */
var action;
switch (propertiesMap) {
case "scroll":
action = "scroll";
break;
case "reverse":
action = "reverse";
break;
case "finish":
case "stop":
/*******************
Action: Stop
*******************/
/* Clear the currently-active delay on each targeted element. */
$.each(elements, function(i, element) {
if (Data(element) && Data(element).delayTimer) {
/* Stop the timer from triggering its cached next() function. */
clearTimeout(Data(element).delayTimer.setTimeout);
/* Manually call the next() function so that the subsequent queue items can progress. */
if (Data(element).delayTimer.next) {
Data(element).delayTimer.next();
}
delete Data(element).delayTimer;
}
});
var callsToStop = [];
/* When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have
been applied to multiple elements, in which case all of the call's elements will be stopped. When an element
is stopped, the next item in its animation queue is immediately triggered. */
/* An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the "fx" queue)
or a custom queue string can be passed in. */
/* Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*,
regardless of the element's current queue state. */
/* Iterate through every active call. */
$.each(Velocity.State.calls, function(i, activeCall) {
/* Inactive calls are set to false by the logic inside completeCall(). Skip them. */
if (activeCall) {
/* Iterate through the active call's targeted elements. */
$.each(activeCall[1], function(k, activeElement) {
/* If true was passed in as a secondary argument, clear absolutely all calls on this element. Otherwise, only
clear calls associated with the relevant queue. */
/* Call stopping logic works as follows:
- options === true --> stop current default queue calls (and queue:false calls), including remaining queued ones.
- options === undefined --> stop current queue:"" call and all queue:false calls.
- options === false --> stop only queue:false calls.
- options === "custom" --> stop current queue:"custom" call, including remaining queued ones (there is no functionality to only clear the currently-running queue:"custom" call). */
var queueName = (options === undefined) ? "" : options;
if (queueName !== true && (activeCall[2].queue !== queueName) && !(options === undefined && activeCall[2].queue === false)) {
return true;
}
/* Iterate through the calls targeted by the stop command. */
$.each(elements, function(l, element) {
/* Check that this call was applied to the target element. */
if (element === activeElement) {
/* Optionally clear the remaining queued calls. */
if (options === true || Type.isString(options)) {
/* Iterate through the items in the element's queue. */
$.each($.queue(element, Type.isString(options) ? options : ""), function(_, item) {
/* The queue array can contain an "inprogress" string, which we skip. */
if (Type.isFunction(item)) {
/* Pass the item's callback a flag indicating that we want to abort from the queue call.
(Specifically, the queue will resolve the call's associated promise then abort.) */
item(null, true);
}
});
/* Clearing the $.queue() array is achieved by resetting it to []. */
$.queue(element, Type.isString(options) ? options : "", []);
}
if (propertiesMap === "stop") {
/* Since "reverse" uses cached start values (the previous call's endValues), these values must be
changed to reflect the final value that the elements were actually tweened to. */
/* Note: If only queue:false animations are currently running on an element, it won't have a tweensContainer
object. Also, queue:false animations can't be reversed. */
if (Data(element) && Data(element).tweensContainer && queueName !== false) {
$.each(Data(element).tweensContainer, function(m, activeTween) {
activeTween.endValue = activeTween.currentValue;
});
}
callsToStop.push(i);
} else if (propertiesMap === "finish") {
/* To get active tweens to finish immediately, we forcefully shorten their durations to 1ms so that
they finish upon the next rAf tick then proceed with normal call completion logic. */
activeCall[2].duration = 1;
}
}
});
});
}
});
/* Prematurely call completeCall() on each matched active call. Pass an additional flag for "stop" to indicate
that the complete callback and display:none setting should be skipped since we're completing prematurely. */
if (propertiesMap === "stop") {
$.each(callsToStop, function(i, j) {
completeCall(j, true);
});
if (promiseData.promise) {
/* Immediately resolve the promise associated with this stop call since stop runs synchronously. */
promiseData.resolver(elements);
}
}
/* Since we're stopping, and not proceeding with queueing, exit out of Velocity. */
return getChain();
default:
/* Treat a non-empty plain object as a literal properties map. */
if ($.isPlainObject(propertiesMap) && !Type.isEmptyObject(propertiesMap)) {
action = "start";
/****************
Redirects
****************/
/* Check if a string matches a registered redirect (see Redirects above). */
} else if (Type.isString(propertiesMap) && Velocity.Redirects[propertiesMap]) {
var opts = $.extend({}, options),
durationOriginal = opts.duration,
delayOriginal = opts.delay || 0;
/* If the backwards option was passed in, reverse the element set so that elements animate from the last to the first. */
if (opts.backwards === true) {
elements = $.extend(true, [], elements).reverse();
}
/* Individually trigger the redirect for each element in the set to prevent users from having to handle iteration logic in their redirect. */
$.each(elements, function(elementIndex, element) {
/* If the stagger option was passed in, successively delay each element by the stagger value (in ms). Retain the original delay value. */
if (parseFloat(opts.stagger)) {
opts.delay = delayOriginal + (parseFloat(opts.stagger) * elementIndex);
} else if (Type.isFunction(opts.stagger)) {
opts.delay = delayOriginal + opts.stagger.call(element, elementIndex, elementsLength);
}
/* If the drag option was passed in, successively increase/decrease (depending on the presense of opts.backwards)
the duration of each element's animation, using floors to prevent producing very short durations. */
if (opts.drag) {
/* Default the duration of UI pack effects (callouts and transitions) to 1000ms instead of the usual default duration of 400ms. */
opts.duration = parseFloat(durationOriginal) || (/^(callout|transition)/.test(propertiesMap) ? 1000 : DURATION_DEFAULT);
/* For each element, take the greater duration of: A) animation completion percentage relative to the original duration,
B) 75% of the original duration, or C) a 200ms fallback (in case duration is already set to a low value).
The end result is a baseline of 75% of the redirect's duration that increases/decreases as the end of the element set is approached. */
opts.duration = Math.max(opts.duration * (opts.backwards ? 1 - elementIndex/elementsLength : (elementIndex + 1) / elementsLength), opts.duration * 0.75, 200);
}
/* Pass in the call's opts object so that the redirect can optionally extend it. It defaults to an empty object instead of null to
reduce the opts checking logic required inside the redirect. */
Velocity.Redirects[propertiesMap].call(element, element, opts || {}, elementIndex, elementsLength, elements, promiseData.promise ? promiseData : undefined);
});
/* Since the animation logic resides within the redirect's own code, abort the remainder of this call.
(The performance overhead up to this point is virtually non-existant.) */
/* Note: The jQuery call chain is kept intact by returning the complete element set. */
return getChain();
} else {
var abortError = "Velocity: First argument (" + propertiesMap + ") was not a property map, a known action, or a registered redirect. Aborting.";
if (promiseData.promise) {
promiseData.rejecter(new Error(abortError));
} else {
console.log(abortError);
}
return getChain();
}
}
/**************************
Call-Wide Variables
**************************/
/* A container for CSS unit conversion ratios (e.g. %, rem, and em ==> px) that is used to cache ratios across all elements
being animated in a single Velocity call. Calculating unit ratios necessitates DOM querying and updating, and is therefore
avoided (via caching) wherever possible. This container is call-wide instead of page-wide to avoid the risk of using stale
conversion metrics across Velocity animations that are not immediately consecutively chained. */
var callUnitConversionData = {
lastParent: null,
lastPosition: null,
lastFontSize: null,
lastPercentToPxWidth: null,
lastPercentToPxHeight: null,
lastEmToPx: null,
remToPx: null,
vwToPx: null,
vhToPx: null
};
/* A container for all the ensuing tween data and metadata associated with this call. This container gets pushed to the page-wide
Velocity.State.calls array that is processed during animation ticking. */
var call = [];
/************************
Element Processing
************************/
/* Element processing consists of three parts -- data processing that cannot go stale and data processing that *can* go stale (i.e. third-party style modifications):
1) Pre-Queueing: Element-wide variables, including the element's data storage, are instantiated. Call options are prepared. If triggered, the Stop action is executed.
2) Queueing: The logic that runs once this call has reached its point of execution in the element's $.queue() stack. Most logic is placed here to avoid risking it becoming stale.
3) Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container.
*/
function processElement () {
/*************************
Part I: Pre-Queueing
*************************/
/***************************
Element-Wide Variables
***************************/
var element = this,
/* The runtime opts object is the extension of the current call's options and Velocity's page-wide option defaults. */
opts = $.extend({}, Velocity.defaults, options),
/* A container for the processed data associated with each property in the propertyMap.
(Each property in the map produces its own "tween".) */
tweensContainer = {},
elementUnitConversionData;
/******************
Element Init
******************/
if (Data(element) === undefined) {
Velocity.init(element);
}
/******************
Option: Delay
******************/
/* Since queue:false doesn't respect the item's existing queue, we avoid injecting its delay here (it's set later on). */
/* Note: Velocity rolls its own delay function since jQuery doesn't have a utility alias for $.fn.delay()
(and thus requires jQuery element creation, which we avoid since its overhead includes DOM querying). */
if (parseFloat(opts.delay) && opts.queue !== false) {
$.queue(element, opts.queue, function(next) {
/* This is a flag used to indicate to the upcoming completeCall() function that this queue entry was initiated by Velocity. See completeCall() for further details. */
Velocity.velocityQueueEntryFlag = true;
/* The ensuing queue item (which is assigned to the "next" argument that $.queue() automatically passes in) will be triggered after a setTimeout delay.
The setTimeout is stored so that it can be subjected to clearTimeout() if this animation is prematurely stopped via Velocity's "stop" command. */
Data(element).delayTimer = {
setTimeout: setTimeout(next, parseFloat(opts.delay)),
next: next
};
});
}
/*********************
Option: Duration
*********************/
/* Support for jQuery's named durations. */
switch (opts.duration.toString().toLowerCase()) {
case "fast":
opts.duration = 200;
break;
case "normal":
opts.duration = DURATION_DEFAULT;
break;
case "slow":
opts.duration = 600;
break;
default:
/* Remove the potential "ms" suffix and default to 1 if the user is attempting to set a duration of 0 (in order to produce an immediate style change). */
opts.duration = parseFloat(opts.duration) || 1;
}
/************************
Global Option: Mock
************************/
if (Velocity.mock !== false) {
/* In mock mode, all animations are forced to 1ms so that they occur immediately upon the next rAF tick.
Alternatively, a multiplier can be passed in to time remap all delays and durations. */
if (Velocity.mock === true) {
opts.duration = opts.delay = 1;
} else {
opts.duration *= parseFloat(Velocity.mock) || 1;
opts.delay *= parseFloat(Velocity.mock) || 1;
}
}
/*******************
Option: Easing
*******************/
opts.easing = getEasing(opts.easing, opts.duration);
/**********************
Option: Callbacks
**********************/
/* Callbacks must functions. Otherwise, default to null. */
if (opts.begin && !Type.isFunction(opts.begin)) {
opts.begin = null;
}
if (opts.progress && !Type.isFunction(opts.progress)) {
opts.progress = null;
}
if (opts.complete && !Type.isFunction(opts.complete)) {
opts.complete = null;
}
/*********************************
Option: Display & Visibility
*********************************/
/* Refer to Velocity's documentation (VelocityJS.org/#displayAndVisibility) for a description of the display and visibility options' behavior. */
/* Note: We strictly check for undefined instead of falsiness because display accepts an empty string value. */
if (opts.display !== undefined && opts.display !== null) {
opts.display = opts.display.toString().toLowerCase();
/* Users can pass in a special "auto" value to instruct Velocity to set the element to its default display value. */
if (opts.display === "auto") {
opts.display = Velocity.CSS.Values.getDisplayType(element);
}
}
if (opts.visibility !== undefined && opts.visibility !== null) {
opts.visibility = opts.visibility.toString().toLowerCase();
}
/**********************
Option: mobileHA
**********************/
/* When set to true, and if this is a mobile device, mobileHA automatically enables hardware acceleration (via a null transform hack)
on animating elements. HA is removed from the element at the completion of its animation. */
/* Note: Android Gingerbread doesn't support HA. If a null transform hack (mobileHA) is in fact set, it will prevent other tranform subproperties from taking effect. */
/* Note: You can read more about the use of mobileHA in Velocity's documentation: VelocityJS.org/#mobileHA. */
opts.mobileHA = (opts.mobileHA && Velocity.State.isMobile && !Velocity.State.isGingerbread);
/***********************
Part II: Queueing
***********************/
/* When a set of elements is targeted by a Velocity call, the set is broken up and each element has the current Velocity call individually queued onto it.
In this way, each element's existing queue is respected; some elements may already be animating and accordingly should not have this current Velocity call triggered immediately. */
/* In each queue, tween data is processed for each animating property then pushed onto the call-wide calls array. When the last element in the set has had its tweens processed,
the call array is pushed to Velocity.State.calls for live processing by the requestAnimationFrame tick. */
function buildQueue (next) {
/*******************
Option: Begin
*******************/
/* The begin callback is fired once per call -- not once per elemenet -- and is passed the full raw DOM element set as both its context and its first argument. */
if (opts.begin && elementsIndex === 0) {
/* We throw callbacks in a setTimeout so that thrown errors don't halt the execution of Velocity itself. */
try {
opts.begin.call(elements, elements);
} catch (error) {
setTimeout(function() { throw error; }, 1);
}
}
/*****************************************
Tween Data Construction (for Scroll)
*****************************************/
/* Note: In order to be subjected to chaining and animation options, scroll's tweening is routed through Velocity as if it were a standard CSS property animation. */
if (action === "scroll") {
/* The scroll action uniquely takes an optional "offset" option -- specified in pixels -- that offsets the targeted scroll position. */
var scrollDirection = (/^x$/i.test(opts.axis) ? "Left" : "Top"),
scrollOffset = parseFloat(opts.offset) || 0,
scrollPositionCurrent,
scrollPositionCurrentAlternate,
scrollPositionEnd;
/* Scroll also uniquely takes an optional "container" option, which indicates the parent element that should be scrolled --
as opposed to the browser window itself. This is useful for scrolling toward an element that's inside an overflowing parent element. */
if (opts.container) {
/* Ensure that either a jQuery object or a raw DOM element was passed in. */
if (Type.isWrapped(opts.container) || Type.isNode(opts.container)) {
/* Extract the raw DOM element from the jQuery wrapper. */
opts.container = opts.container[0] || opts.container;
/* Note: Unlike other properties in Velocity, the browser's scroll position is never cached since it so frequently changes
(due to the user's natural interaction with the page). */
scrollPositionCurrent = opts.container["scroll" + scrollDirection]; /* GET */
/* $.position() values are relative to the container's currently viewable area (without taking into account the container's true dimensions
-- say, for example, if the container was not overflowing). Thus, the scroll end value is the sum of the child element's position *and*
the scroll container's current scroll position. */
scrollPositionEnd = (scrollPositionCurrent + $(element).position()[scrollDirection.toLowerCase()]) + scrollOffset; /* GET */
/* If a value other than a jQuery object or a raw DOM element was passed in, default to null so that this option is ignored. */
} else {
opts.container = null;
}
} else {
/* If the window itself is being scrolled -- not a containing element -- perform a live scroll position lookup using
the appropriate cached property names (which differ based on browser type). */
scrollPositionCurrent = Velocity.State.scrollAnchor[Velocity.State["scrollProperty" + scrollDirection]]; /* GET */
/* When scrolling the browser window, cache the alternate axis's current value since window.scrollTo() doesn't let us change only one value at a time. */
scrollPositionCurrentAlternate = Velocity.State.scrollAnchor[Velocity.State["scrollProperty" + (scrollDirection === "Left" ? "Top" : "Left")]]; /* GET */
/* Unlike $.position(), $.offset() values are relative to the browser window's true dimensions -- not merely its currently viewable area --
and therefore end values do not need to be compounded onto current values. */
scrollPositionEnd = $(element).offset()[scrollDirection.toLowerCase()] + scrollOffset; /* GET */
}
/* Since there's only one format that scroll's associated tweensContainer can take, we create it manually. */
tweensContainer = {
scroll: {
rootPropertyValue: false,
startValue: scrollPositionCurrent,
currentValue: scrollPositionCurrent,
endValue: scrollPositionEnd,
unitType: "",
easing: opts.easing,
scrollData: {
container: opts.container,
direction: scrollDirection,
alternateValue: scrollPositionCurrentAlternate
}
},
element: element
};
if (Velocity.debug) console.log("tweensContainer (scroll): ", tweensContainer.scroll, element);
/******************************************
Tween Data Construction (for Reverse)
******************************************/
/* Reverse acts like a "start" action in that a property map is animated toward. The only difference is
that the property map used for reverse is the inverse of the map used in the previous call. Thus, we manipulate
the previous call to construct our new map: use the previous map's end values as our new map's start values. Copy over all other data. */
/* Note: Reverse can be directly called via the "reverse" parameter, or it can be indirectly triggered via the loop option. (Loops are composed of multiple reverses.) */
/* Note: Reverse calls do not need to be consecutively chained onto a currently-animating element in order to operate on cached values;
there is no harm to reverse being called on a potentially stale data cache since reverse's behavior is simply defined
as reverting to the element's values as they were prior to the previous *Velocity* call. */
} else if (action === "reverse") {
/* Abort if there is no prior animation data to reverse to. */
if (!Data(element).tweensContainer) {
/* Dequeue the element so that this queue entry releases itself immediately, allowing subsequent queue entries to run. */
$.dequeue(element, opts.queue);
return;
} else {
/*********************
Options Parsing
*********************/
/* If the element was hidden via the display option in the previous call,
revert display to "auto" prior to reversal so that the element is visible again. */
if (Data(element).opts.display === "none") {
Data(element).opts.display = "auto";
}
if (Data(element).opts.visibility === "hidden") {
Data(element).opts.visibility = "visible";
}
/* If the loop option was set in the previous call, disable it so that "reverse" calls aren't recursively generated.
Further, remove the previous call's callback options; typically, users do not want these to be refired. */
Data(element).opts.loop = false;
Data(element).opts.begin = null;
Data(element).opts.complete = null;
/* Since we're extending an opts object that has already been extended with the defaults options object,
we remove non-explicitly-defined properties that are auto-assigned values. */
if (!options.easing) {
delete opts.easing;
}
if (!options.duration) {
delete opts.duration;
}
/* The opts object used for reversal is an extension of the options object optionally passed into this
reverse call plus the options used in the previous Velocity call. */
opts = $.extend({}, Data(element).opts, opts);
/*************************************
Tweens Container Reconstruction
*************************************/
/* Create a deepy copy (indicated via the true flag) of the previous call's tweensContainer. */
var lastTweensContainer = $.extend(true, {}, Data(element).tweensContainer);
/* Manipulate the previous tweensContainer by replacing its end values and currentValues with its start values. */
for (var lastTween in lastTweensContainer) {
/* In addition to tween data, tweensContainers contain an element property that we ignore here. */
if (lastTween !== "element") {
var lastStartValue = lastTweensContainer[lastTween].startValue;
lastTweensContainer[lastTween].startValue = lastTweensContainer[lastTween].currentValue = lastTweensContainer[lastTween].endValue;
lastTweensContainer[lastTween].endValue = lastStartValue;
/* Easing is the only option that embeds into the individual tween data (since it can be defined on a per-property basis).
Accordingly, every property's easing value must be updated when an options object is passed in with a reverse call.
The side effect of this extensibility is that all per-property easing values are forcefully reset to the new value. */
if (!Type.isEmptyObject(options)) {
lastTweensContainer[lastTween].easing = opts.easing;
}
if (Velocity.debug) console.log("reverse tweensContainer (" + lastTween + "): " + JSON.stringify(lastTweensContainer[lastTween]), element);
}
}
tweensContainer = lastTweensContainer;
}
/*****************************************
Tween Data Construction (for Start)
*****************************************/
} else if (action === "start") {
/*************************
Value Transferring
*************************/
/* If this queue entry follows a previous Velocity-initiated queue entry *and* if this entry was created
while the element was in the process of being animated by Velocity, then this current call is safe to use
the end values from the prior call as its start values. Velocity attempts to perform this value transfer
process whenever possible in order to avoid requerying the DOM. */
/* If values aren't transferred from a prior call and start values were not forcefed by the user (more on this below),
then the DOM is queried for the element's current values as a last resort. */
/* Note: Conversely, animation reversal (and looping) *always* perform inter-call value transfers; they never requery the DOM. */
var lastTweensContainer;
/* The per-element isAnimating flag is used to indicate whether it's safe (i.e. the data isn't stale)
to transfer over end values to use as start values. If it's set to true and there is a previous
Velocity call to pull values from, do so. */
if (Data(element).tweensContainer && Data(element).isAnimating === true) {
lastTweensContainer = Data(element).tweensContainer;
}
/***************************
Tween Data Calculation
***************************/
/* This function parses property data and defaults endValue, easing, and startValue as appropriate. */
/* Property map values can either take the form of 1) a single value representing the end value,
or 2) an array in the form of [ endValue, [, easing] [, startValue] ].
The optional third parameter is a forcefed startValue to be used instead of querying the DOM for
the element's current value. Read Velocity's docmentation to learn more about forcefeeding: VelocityJS.org/#forcefeeding */
function parsePropertyValue (valueData, skipResolvingEasing) {
var endValue = undefined,
easing = undefined,
startValue = undefined;
/* Handle the array format, which can be structured as one of three potential overloads:
A) [ endValue, easing, startValue ], B) [ endValue, easing ], or C) [ endValue, startValue ] */
if (Type.isArray(valueData)) {
/* endValue is always the first item in the array. Don't bother validating endValue's value now
since the ensuing property cycling logic does that. */
endValue = valueData[0];
/* Two-item array format: If the second item is a number, function, or hex string, treat it as a
start value since easings can only be non-hex strings or arrays. */
if ((!Type.isArray(valueData[1]) && /^[\d-]/.test(valueData[1])) || Type.isFunction(valueData[1]) || CSS.RegEx.isHex.test(valueData[1])) {
startValue = valueData[1];
/* Two or three-item array: If the second item is a non-hex string or an array, treat it as an easing. */
} else if ((Type.isString(valueData[1]) && !CSS.RegEx.isHex.test(valueData[1])) || Type.isArray(valueData[1])) {
easing = skipResolvingEasing ? valueData[1] : getEasing(valueData[1], opts.duration);
/* Don't bother validating startValue's value now since the ensuing property cycling logic inherently does that. */
if (valueData[2] !== undefined) {
startValue = valueData[2];
}
}
/* Handle the single-value format. */
} else {
endValue = valueData;
}
/* Default to the call's easing if a per-property easing type was not defined. */
if (!skipResolvingEasing) {
easing = easing || opts.easing;
}
/* If functions were passed in as values, pass the function the current element as its context,
plus the element's index and the element set's size as arguments. Then, assign the returned value. */
if (Type.isFunction(endValue)) {
endValue = endValue.call(element, elementsIndex, elementsLength);
}
if (Type.isFunction(startValue)) {
startValue = startValue.call(element, elementsIndex, elementsLength);
}
/* Allow startValue to be left as undefined to indicate to the ensuing code that its value was not forcefed. */
return [ endValue || 0, easing, startValue ];
}
/* Cycle through each property in the map, looking for shorthand color properties (e.g. "color" as opposed to "colorRed"). Inject the corresponding
colorRed, colorGreen, and colorBlue RGB component tweens into the propertiesMap (which Velocity understands) and remove the shorthand property. */
$.each(propertiesMap, function(property, value) {
/* Find shorthand color properties that have been passed a hex string. */
if (RegExp("^" + CSS.Lists.colors.join("$|^") + "$").test(property)) {
/* Parse the value data for each shorthand. */
var valueData = parsePropertyValue(value, true),
endValue = valueData[0],
easing = valueData[1],
startValue = valueData[2];
if (CSS.RegEx.isHex.test(endValue)) {
/* Convert the hex strings into their RGB component arrays. */
var colorComponents = [ "Red", "Green", "Blue" ],
endValueRGB = CSS.Values.hexToRgb(endValue),
startValueRGB = startValue ? CSS.Values.hexToRgb(startValue) : undefined;
/* Inject the RGB component tweens into propertiesMap. */
for (var i = 0; i < colorComponents.length; i++) {
var dataArray = [ endValueRGB[i] ];
if (easing) {
dataArray.push(easing);
}
if (startValueRGB !== undefined) {
dataArray.push(startValueRGB[i]);
}
propertiesMap[property + colorComponents[i]] = dataArray;
}
/* Remove the intermediary shorthand property entry now that we've processed it. */
delete propertiesMap[property];
}
}
});
/* Create a tween out of each property, and append its associated data to tweensContainer. */
for (var property in propertiesMap) {
/**************************
Start Value Sourcing
**************************/
/* Parse out endValue, easing, and startValue from the property's data. */
var valueData = parsePropertyValue(propertiesMap[property]),
endValue = valueData[0],
easing = valueData[1],
startValue = valueData[2];
/* Now that the original property name's format has been used for the parsePropertyValue() lookup above,
we force the property to its camelCase styling to normalize it for manipulation. */
property = CSS.Names.camelCase(property);
/* In case this property is a hook, there are circumstances where we will intend to work on the hook's root property and not the hooked subproperty. */
var rootProperty = CSS.Hooks.getRoot(property),
rootPropertyValue = false;
/* Other than for the dummy tween property, properties that are not supported by the browser (and do not have an associated normalization) will
inherently produce no style changes when set, so they are skipped in order to decrease animation tick overhead.
Property support is determined via prefixCheck(), which returns a false flag when no supported is detected. */
/* Note: Since SVG elements have some of their properties directly applied as HTML attributes,
there is no way to check for their explicit browser support, and so we skip skip this check for them. */
if (!Data(element).isSVG && rootProperty !== "tween" && CSS.Names.prefixCheck(rootProperty)[1] === false && CSS.Normalizations.registered[rootProperty] === undefined) {
if (Velocity.debug) console.log("Skipping [" + rootProperty + "] due to a lack of browser support.");
continue;
}
/* If the display option is being set to a non-"none" (e.g. "block") and opacity (filter on IE<=8) is being
animated to an endValue of non-zero, the user's intention is to fade in from invisible, thus we forcefeed opacity
a startValue of 0 if its startValue hasn't already been sourced by value transferring or prior forcefeeding. */
if (((opts.display !== undefined && opts.display !== null && opts.display !== "none") || (opts.visibility !== undefined && opts.visibility !== "hidden")) && /opacity|filter/.test(property) && !startValue && endValue !== 0) {
startValue = 0;
}
/* If values have been transferred from the previous Velocity call, extract the endValue and rootPropertyValue
for all of the current call's properties that were *also* animated in the previous call. */
/* Note: Value transferring can optionally be disabled by the user via the _cacheValues option. */
if (opts._cacheValues && lastTweensContainer && lastTweensContainer[property]) {
if (startValue === undefined) {
startValue = lastTweensContainer[property].endValue + lastTweensContainer[property].unitType;
}
/* The previous call's rootPropertyValue is extracted from the element's data cache since that's the
instance of rootPropertyValue that gets freshly updated by the tweening process, whereas the rootPropertyValue
attached to the incoming lastTweensContainer is equal to the root property's value prior to any tweening. */
rootPropertyValue = Data(element).rootPropertyValueCache[rootProperty];
/* If values were not transferred from a previous Velocity call, query the DOM as needed. */
} else {
/* Handle hooked properties. */
if (CSS.Hooks.registered[property]) {
if (startValue === undefined) {
rootPropertyValue = CSS.getPropertyValue(element, rootProperty); /* GET */
/* Note: The following getPropertyValue() call does not actually trigger a DOM query;
getPropertyValue() will extract the hook from rootPropertyValue. */
startValue = CSS.getPropertyValue(element, property, rootPropertyValue);
/* If startValue is already defined via forcefeeding, do not query the DOM for the root property's value;
just grab rootProperty's zero-value template from CSS.Hooks. This overwrites the element's actual
root property value (if one is set), but this is acceptable since the primary reason users forcefeed is
to avoid DOM queries, and thus we likewise avoid querying the DOM for the root property's value. */
} else {
/* Grab this hook's zero-value template, e.g. "0px 0px 0px black". */
rootPropertyValue = CSS.Hooks.templates[rootProperty][1];
}
/* Handle non-hooked properties that haven't already been defined via forcefeeding. */
} else if (startValue === undefined) {
startValue = CSS.getPropertyValue(element, property); /* GET */
}
}
/**************************
Value Data Extraction
**************************/
var separatedValue,
endValueUnitType,
startValueUnitType,
operator = false;
/* Separates a property value into its numeric value and its unit type. */
function separateValue (property, value) {
var unitType,
numericValue;
numericValue = (value || "0")
.toString()
.toLowerCase()
/* Match the unit type at the end of the value. */
.replace(/[%A-z]+$/, function(match) {
/* Grab the unit type. */
unitType = match;
/* Strip the unit type off of value. */
return "";
});
/* If no unit type was supplied, assign one that is appropriate for this property (e.g. "deg" for rotateZ or "px" for width). */
if (!unitType) {
unitType = CSS.Values.getUnitType(property);
}
return [ numericValue, unitType ];
}
/* Separate startValue. */
separatedValue = separateValue(property, startValue);
startValue = separatedValue[0];
startValueUnitType = separatedValue[1];
/* Separate endValue, and extract a value operator (e.g. "+=", "-=") if one exists. */
separatedValue = separateValue(property, endValue);
endValue = separatedValue[0].replace(/^([+-\/*])=/, function(match, subMatch) {
operator = subMatch;
/* Strip the operator off of the value. */
return "";
});
endValueUnitType = separatedValue[1];
/* Parse float values from endValue and startValue. Default to 0 if NaN is returned. */
startValue = parseFloat(startValue) || 0;
endValue = parseFloat(endValue) || 0;
/***************************************
Property-Specific Value Conversion
***************************************/
/* Custom support for properties that don't actually accept the % unit type, but where pollyfilling is trivial and relatively foolproof. */
if (endValueUnitType === "%") {
/* A %-value fontSize/lineHeight is relative to the parent's fontSize (as opposed to the parent's dimensions),
which is identical to the em unit's behavior, so we piggyback off of that. */
if (/^(fontSize|lineHeight)$/.test(property)) {
/* Convert % into an em decimal value. */
endValue = endValue / 100;
endValueUnitType = "em";
/* For scaleX and scaleY, convert the value into its decimal format and strip off the unit type. */
} else if (/^scale/.test(property)) {
endValue = endValue / 100;
endValueUnitType = "";
/* For RGB components, take the defined percentage of 255 and strip off the unit type. */
} else if (/(Red|Green|Blue)$/i.test(property)) {
endValue = (endValue / 100) * 255;
endValueUnitType = "";
}
}
/***************************
Unit Ratio Calculation
***************************/
/* When queried, the browser returns (most) CSS property values in pixels. Therefore, if an endValue with a unit type of
%, em, or rem is animated toward, startValue must be converted from pixels into the same unit type as endValue in order
for value manipulation logic (increment/decrement) to proceed. Further, if the startValue was forcefed or transferred
from a previous call, startValue may also not be in pixels. Unit conversion logic therefore consists of two steps:
1) Calculating the ratio of %/em/rem/vh/vw relative to pixels
2) Converting startValue into the same unit of measurement as endValue based on these ratios. */
/* Unit conversion ratios are calculated by inserting a sibling node next to the target node, copying over its position property,
setting values with the target unit type then comparing the returned pixel value. */
/* Note: Even if only one of these unit types is being animated, all unit ratios are calculated at once since the overhead
of batching the SETs and GETs together upfront outweights the potential overhead
of layout thrashing caused by re-querying for uncalculated ratios for subsequently-processed properties. */
/* Todo: Shift this logic into the calls' first tick instance so that it's synced with RAF. */
function calculateUnitRatios () {
/************************
Same Ratio Checks
************************/
/* The properties below are used to determine whether the element differs sufficiently from this call's
previously iterated element to also differ in its unit conversion ratios. If the properties match up with those
of the prior element, the prior element's conversion ratios are used. Like most optimizations in Velocity,
this is done to minimize DOM querying. */
var sameRatioIndicators = {
myParent: element.parentNode || document.body, /* GET */
position: CSS.getPropertyValue(element, "position"), /* GET */
fontSize: CSS.getPropertyValue(element, "fontSize") /* GET */
},
/* Determine if the same % ratio can be used. % is based on the element's position value and its parent's width and height dimensions. */
samePercentRatio = ((sameRatioIndicators.position === callUnitConversionData.lastPosition) && (sameRatioIndicators.myParent === callUnitConversionData.lastParent)),
/* Determine if the same em ratio can be used. em is relative to the element's fontSize. */
sameEmRatio = (sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize);
/* Store these ratio indicators call-wide for the next element to compare against. */
callUnitConversionData.lastParent = sameRatioIndicators.myParent;
callUnitConversionData.lastPosition = sameRatioIndicators.position;
callUnitConversionData.lastFontSize = sameRatioIndicators.fontSize;
/***************************
Element-Specific Units
***************************/
/* Note: IE8 rounds to the nearest pixel when returning CSS values, thus we perform conversions using a measurement
of 100 (instead of 1) to give our ratios a precision of at least 2 decimal values. */
var measurement = 100,
unitRatios = {};
if (!sameEmRatio || !samePercentRatio) {
var dummy = Data(element).isSVG ? document.createElementNS("http://www.w3.org/2000/svg", "rect") : document.createElement("div");
Velocity.init(dummy);
sameRatioIndicators.myParent.appendChild(dummy);
/* To accurately and consistently calculate conversion ratios, the element's cascaded overflow and box-sizing are stripped.
Similarly, since width/height can be artificially constrained by their min-/max- equivalents, these are controlled for as well. */
/* Note: Overflow must be also be controlled for per-axis since the overflow property overwrites its per-axis values. */
$.each([ "overflow", "overflowX", "overflowY" ], function(i, property) {
Velocity.CSS.setPropertyValue(dummy, property, "hidden");
});
Velocity.CSS.setPropertyValue(dummy, "position", sameRatioIndicators.position);
Velocity.CSS.setPropertyValue(dummy, "fontSize", sameRatioIndicators.fontSize);
Velocity.CSS.setPropertyValue(dummy, "boxSizing", "content-box");
/* width and height act as our proxy properties for measuring the horizontal and vertical % ratios. */
$.each([ "minWidth", "maxWidth", "width", "minHeight", "maxHeight", "height" ], function(i, property) {
Velocity.CSS.setPropertyValue(dummy, property, measurement + "%");
});
/* paddingLeft arbitrarily acts as our proxy property for the em ratio. */
Velocity.CSS.setPropertyValue(dummy, "paddingLeft", measurement + "em");
/* Divide the returned value by the measurement to get the ratio between 1% and 1px. Default to 1 since working with 0 can produce Infinite. */
unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, "width", null, true)) || 1) / measurement; /* GET */
unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, "height", null, true)) || 1) / measurement; /* GET */
unitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, "paddingLeft")) || 1) / measurement; /* GET */
sameRatioIndicators.myParent.removeChild(dummy);
} else {
unitRatios.emToPx = callUnitConversionData.lastEmToPx;
unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth;
unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight;
}
/***************************
Element-Agnostic Units
***************************/
/* Whereas % and em ratios are determined on a per-element basis, the rem unit only needs to be checked
once per call since it's exclusively dependant upon document.body's fontSize. If this is the first time
that calculateUnitRatios() is being run during this call, remToPx will still be set to its default value of null,
so we calculate it now. */
if (callUnitConversionData.remToPx === null) {
/* Default to browsers' default fontSize of 16px in the case of 0. */
callUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document.body, "fontSize")) || 16; /* GET */
}
/* Similarly, viewport units are %-relative to the window's inner dimensions. */
if (callUnitConversionData.vwToPx === null) {
callUnitConversionData.vwToPx = parseFloat(window.innerWidth) / 100; /* GET */
callUnitConversionData.vhToPx = parseFloat(window.innerHeight) / 100; /* GET */
}
unitRatios.remToPx = callUnitConversionData.remToPx;
unitRatios.vwToPx = callUnitConversionData.vwToPx;
unitRatios.vhToPx = callUnitConversionData.vhToPx;
if (Velocity.debug >= 1) console.log("Unit ratios: " + JSON.stringify(unitRatios), element);
return unitRatios;
}
/********************
Unit Conversion
********************/
/* The * and / operators, which are not passed in with an associated unit, inherently use startValue's unit. Skip value and unit conversion. */
if (/[\/*]/.test(operator)) {
endValueUnitType = startValueUnitType;
/* If startValue and endValue differ in unit type, convert startValue into the same unit type as endValue so that if endValueUnitType
is a relative unit (%, em, rem), the values set during tweening will continue to be accurately relative even if the metrics they depend
on are dynamically changing during the course of the animation. Conversely, if we always normalized into px and used px for setting values, the px ratio
would become stale if the original unit being animated toward was relative and the underlying metrics change during the animation. */
/* Since 0 is 0 in any unit type, no conversion is necessary when startValue is 0 -- we just start at 0 with endValueUnitType. */
} else if ((startValueUnitType !== endValueUnitType) && startValue !== 0) {
/* Unit conversion is also skipped when endValue is 0, but *startValueUnitType* must be used for tween values to remain accurate. */
/* Note: Skipping unit conversion here means that if endValueUnitType was originally a relative unit, the animation won't relatively
match the underlying metrics if they change, but this is acceptable since we're animating toward invisibility instead of toward visibility,
which remains past the point of the animation's completion. */
if (endValue === 0) {
endValueUnitType = startValueUnitType;
} else {
/* By this point, we cannot avoid unit conversion (it's undesirable since it causes layout thrashing).
If we haven't already, we trigger calculateUnitRatios(), which runs once per element per call. */
elementUnitConversionData = elementUnitConversionData || calculateUnitRatios();
/* The following RegEx matches CSS properties that have their % values measured relative to the x-axis. */
/* Note: W3C spec mandates that all of margin and padding's properties (even top and bottom) are %-relative to the *width* of the parent element. */
var axis = (/margin|padding|left|right|width|text|word|letter/i.test(property) || /X$/.test(property) || property === "x") ? "x" : "y";
/* In order to avoid generating n^2 bespoke conversion functions, unit conversion is a two-step process:
1) Convert startValue into pixels. 2) Convert this new pixel value into endValue's unit type. */
switch (startValueUnitType) {
case "%":
/* Note: translateX and translateY are the only properties that are %-relative to an element's own dimensions -- not its parent's dimensions.
Velocity does not include a special conversion process to account for this behavior. Therefore, animating translateX/Y from a % value
to a non-% value will produce an incorrect start value. Fortunately, this sort of cross-unit conversion is rarely done by users in practice. */
startValue *= (axis === "x" ? elementUnitConversionData.percentToPxWidth : elementUnitConversionData.percentToPxHeight);
break;
case "px":
/* px acts as our midpoint in the unit conversion process; do nothing. */
break;
default:
startValue *= elementUnitConversionData[startValueUnitType + "ToPx"];
}
/* Invert the px ratios to convert into to the target unit. */
switch (endValueUnitType) {
case "%":
startValue *= 1 / (axis === "x" ? elementUnitConversionData.percentToPxWidth : elementUnitConversionData.percentToPxHeight);
break;
case "px":
/* startValue is already in px, do nothing; we're done. */
break;
default:
startValue *= 1 / elementUnitConversionData[endValueUnitType + "ToPx"];
}
}
}
/*********************
Relative Values
*********************/
/* Operator logic must be performed last since it requires unit-normalized start and end values. */
/* Note: Relative *percent values* do not behave how most people think; while one would expect "+=50%"
to increase the property 1.5x its current value, it in fact increases the percent units in absolute terms:
50 points is added on top of the current % value. */
switch (operator) {
case "+":
endValue = startValue + endValue;
break;
case "-":
endValue = startValue - endValue;
break;
case "*":
endValue = startValue * endValue;
break;
case "/":
endValue = startValue / endValue;
break;
}
/**************************
tweensContainer Push
**************************/
/* Construct the per-property tween object, and push it to the element's tweensContainer. */
tweensContainer[property] = {
rootPropertyValue: rootPropertyValue,
startValue: startValue,
currentValue: startValue,
endValue: endValue,
unitType: endValueUnitType,
easing: easing
};
if (Velocity.debug) console.log("tweensContainer (" + property + "): " + JSON.stringify(tweensContainer[property]), element);
}
/* Along with its property data, store a reference to the element itself onto tweensContainer. */
tweensContainer.element = element;
}
/*****************
Call Push
*****************/
/* Note: tweensContainer can be empty if all of the properties in this call's property map were skipped due to not
being supported by the browser. The element property is used for checking that the tweensContainer has been appended to. */
if (tweensContainer.element) {
/* Apply the "velocity-animating" indicator class. */
CSS.Values.addClass(element, "velocity-animating");
/* The call array houses the tweensContainers for each element being animated in the current call. */
call.push(tweensContainer);
/* Store the tweensContainer and options if we're working on the default effects queue, so that they can be used by the reverse command. */
if (opts.queue === "") {
Data(element).tweensContainer = tweensContainer;
Data(element).opts = opts;
}
/* Switch on the element's animating flag. */
Data(element).isAnimating = true;
/* Once the final element in this call's element set has been processed, push the call array onto
Velocity.State.calls for the animation tick to immediately begin processing. */
if (elementsIndex === elementsLength - 1) {
/* Add the current call plus its associated metadata (the element set and the call's options) onto the global call container.
Anything on this call container is subjected to tick() processing. */
Velocity.State.calls.push([ call, elements, opts, null, promiseData.resolver ]);
/* If the animation tick isn't running, start it. (Velocity shuts it off when there are no active calls to process.) */
if (Velocity.State.isTicking === false) {
Velocity.State.isTicking = true;
/* Start the tick loop. */
tick();
}
} else {
elementsIndex++;
}
}
}
/* When the queue option is set to false, the call skips the element's queue and fires immediately. */
if (opts.queue === false) {
/* Since this buildQueue call doesn't respect the element's existing queue (which is where a delay option would have been appended),
we manually inject the delay property here with an explicit setTimeout. */
if (opts.delay) {
setTimeout(buildQueue, opts.delay);
} else {
buildQueue();
}
/* Otherwise, the call undergoes element queueing as normal. */
/* Note: To interoperate with jQuery, Velocity uses jQuery's own $.queue() stack for queuing logic. */
} else {
$.queue(element, opts.queue, function(next, clearQueue) {
/* If the clearQueue flag was passed in by the stop command, resolve this call's promise. (Promises can only be resolved once,
so it's fine if this is repeatedly triggered for each element in the associated call.) */
if (clearQueue === true) {
if (promiseData.promise) {
promiseData.resolver(elements);
}
/* Do not continue with animation queueing. */
return true;
}
/* This flag indicates to the upcoming completeCall() function that this queue entry was initiated by Velocity.
See completeCall() for further details. */
Velocity.velocityQueueEntryFlag = true;
buildQueue(next);
});
}
/*********************
Auto-Dequeuing
*********************/
/* As per jQuery's $.queue() behavior, to fire the first non-custom-queue entry on an element, the element
must be dequeued if its queue stack consists *solely* of the current call. (This can be determined by checking
for the "inprogress" item that jQuery prepends to active queue stack arrays.) Regardless, whenever the element's
queue is further appended with additional items -- including $.delay()'s or even $.animate() calls, the queue's
first entry is automatically fired. This behavior contrasts that of custom queues, which never auto-fire. */
/* Note: When an element set is being subjected to a non-parallel Velocity call, the animation will not begin until
each one of the elements in the set has reached the end of its individually pre-existing queue chain. */
/* Note: Unfortunately, most people don't fully grasp jQuery's powerful, yet quirky, $.queue() function.
Lean more here: http://stackoverflow.com/questions/1058158/can-somebody-explain-jquery-queue-to-me */
if ((opts.queue === "" || opts.queue === "fx") && $.queue(element)[0] !== "inprogress") {
$.dequeue(element);
}
}
/**************************
Element Set Iteration
**************************/
/* If the "nodeType" property exists on the elements variable, we're animating a single element.
Place it in an array so that $.each() can iterate over it. */
$.each(elements, function(i, element) {
/* Ensure each element in a set has a nodeType (is a real element) to avoid throwing errors. */
if (Type.isNode(element)) {
processElement.call(element);
}
});
/******************
Option: Loop
******************/
/* The loop option accepts an integer indicating how many times the element should loop between the values in the
current call's properties map and the element's property values prior to this call. */
/* Note: The loop option's logic is performed here -- after element processing -- because the current call needs
to undergo its queue insertion prior to the loop option generating its series of constituent "reverse" calls,
which chain after the current call. Two reverse calls (two "alternations") constitute one loop. */
var opts = $.extend({}, Velocity.defaults, options),
reverseCallsCount;
opts.loop = parseInt(opts.loop);
reverseCallsCount = (opts.loop * 2) - 1;
if (opts.loop) {
/* Double the loop count to convert it into its appropriate number of "reverse" calls.
Subtract 1 from the resulting value since the current call is included in the total alternation count. */
for (var x = 0; x < reverseCallsCount; x++) {
/* Since the logic for the reverse action occurs inside Queueing and therefore this call's options object
isn't parsed until then as well, the current call's delay option must be explicitly passed into the reverse
call so that the delay logic that occurs inside *Pre-Queueing* can process it. */
var reverseOptions = {
delay: opts.delay,
progress: opts.progress
};
/* If a complete callback was passed into this call, transfer it to the loop redirect's final "reverse" call
so that it's triggered when the entire redirect is complete (and not when the very first animation is complete). */
if (x === reverseCallsCount - 1) {
reverseOptions.display = opts.display;
reverseOptions.visibility = opts.visibility;
reverseOptions.complete = opts.complete;
}
animate(elements, "reverse", reverseOptions);
}
}
/***************
Chaining
***************/
/* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */
return getChain();
};
/* Turn Velocity into the animation function, extended with the pre-existing Velocity object. */
Velocity = $.extend(animate, Velocity);
/* For legacy support, also expose the literal animate method. */
Velocity.animate = animate;
/**************
Timing
**************/
/* Ticker function. */
var ticker = window.requestAnimationFrame || rAFShim;
/* Inactive browser tabs pause rAF, which results in all active animations immediately sprinting to their completion states when the tab refocuses.
To get around this, we dynamically switch rAF to setTimeout (which the browser *doesn't* pause) when the tab loses focus. We skip this for mobile
devices to avoid wasting battery power on inactive tabs. */
/* Note: Tab focus detection doesn't work on older versions of IE, but that's okay since they don't support rAF to begin with. */
if (!Velocity.State.isMobile && document.hidden !== undefined) {
document.addEventListener("visibilitychange", function() {
/* Reassign the rAF function (which the global tick() function uses) based on the tab's focus state. */
if (document.hidden) {
ticker = function(callback) {
/* The tick function needs a truthy first argument in order to pass its internal timestamp check. */
return setTimeout(function() { callback(true) }, 16);
};
/* The rAF loop has been paused by the browser, so we manually restart the tick. */
tick();
} else {
ticker = window.requestAnimationFrame || rAFShim;
}
});
}
/************
Tick
************/
/* Note: All calls to Velocity are pushed to the Velocity.State.calls array, which is fully iterated through upon each tick. */
function tick (timestamp) {
/* An empty timestamp argument indicates that this is the first tick occurence since ticking was turned on.
We leverage this metadata to fully ignore the first tick pass since RAF's initial pass is fired whenever
the browser's next tick sync time occurs, which results in the first elements subjected to Velocity
calls being animated out of sync with any elements animated immediately thereafter. In short, we ignore
the first RAF tick pass so that elements being immediately consecutively animated -- instead of simultaneously animated
by the same Velocity call -- are properly batched into the same initial RAF tick and consequently remain in sync thereafter. */
if (timestamp) {
/* We ignore RAF's high resolution timestamp since it can be significantly offset when the browser is
under high stress; we opt for choppiness over allowing the browser to drop huge chunks of frames. */
var timeCurrent = (new Date).getTime();
/********************
Call Iteration
********************/
var callsLength = Velocity.State.calls.length;
/* To speed up iterating over this array, it is compacted (falsey items -- calls that have completed -- are removed)
when its length has ballooned to a point that can impact tick performance. This only becomes necessary when animation
has been continuous with many elements over a long period of time; whenever all active calls are completed, completeCall() clears Velocity.State.calls. */
if (callsLength > 10000) {
Velocity.State.calls = compactSparseArray(Velocity.State.calls);
}
/* Iterate through each active call. */
for (var i = 0; i < callsLength; i++) {
/* When a Velocity call is completed, its Velocity.State.calls entry is set to false. Continue on to the next call. */
if (!Velocity.State.calls[i]) {
continue;
}
/************************
Call-Wide Variables
************************/
var callContainer = Velocity.State.calls[i],
call = callContainer[0],
opts = callContainer[2],
timeStart = callContainer[3],
firstTick = !!timeStart,
tweenDummyValue = null;
/* If timeStart is undefined, then this is the first time that this call has been processed by tick().
We assign timeStart now so that its value is as close to the real animation start time as possible.
(Conversely, had timeStart been defined when this call was added to Velocity.State.calls, the delay
between that time and now would cause the first few frames of the tween to be skipped since
percentComplete is calculated relative to timeStart.) */
/* Further, subtract 16ms (the approximate resolution of RAF) from the current time value so that the
first tick iteration isn't wasted by animating at 0% tween completion, which would produce the
same style value as the element's current value. */
if (!timeStart) {
timeStart = Velocity.State.calls[i][3] = timeCurrent - 16;
}
/* The tween's completion percentage is relative to the tween's start time, not the tween's start value
(which would result in unpredictable tween durations since JavaScript's timers are not particularly accurate).
Accordingly, we ensure that percentComplete does not exceed 1. */
var percentComplete = Math.min((timeCurrent - timeStart) / opts.duration, 1);
/**********************
Element Iteration
**********************/
/* For every call, iterate through each of the elements in its set. */
for (var j = 0, callLength = call.length; j < callLength; j++) {
var tweensContainer = call[j],
element = tweensContainer.element;
/* Check to see if this element has been deleted midway through the animation by checking for the
continued existence of its data cache. If it's gone, skip animating this element. */
if (!Data(element)) {
continue;
}
var transformPropertyExists = false;
/**********************************
Display & Visibility Toggling
**********************************/
/* If the display option is set to non-"none", set it upfront so that the element can become visible before tweening begins.
(Otherwise, display's "none" value is set in completeCall() once the animation has completed.) */
if (opts.display !== undefined && opts.display !== null && opts.display !== "none") {
if (opts.display === "flex") {
var flexValues = [ "-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex" ];
$.each(flexValues, function(i, flexValue) {
CSS.setPropertyValue(element, "display", flexValue);
});
}
CSS.setPropertyValue(element, "display", opts.display);
}
/* Same goes with the visibility option, but its "none" equivalent is "hidden". */
if (opts.visibility !== undefined && opts.visibility !== "hidden") {
CSS.setPropertyValue(element, "visibility", opts.visibility);
}
/************************
Property Iteration
************************/
/* For every element, iterate through each property. */
for (var property in tweensContainer) {
/* Note: In addition to property tween data, tweensContainer contains a reference to its associated element. */
if (property !== "element") {
var tween = tweensContainer[property],
currentValue,
/* Easing can either be a pre-genereated function or a string that references a pre-registered easing
on the Velocity.Easings object. In either case, return the appropriate easing *function*. */
easing = Type.isString(tween.easing) ? Velocity.Easings[tween.easing] : tween.easing;
/******************************
Current Value Calculation
******************************/
/* If this is the last tick pass (if we've reached 100% completion for this tween),
ensure that currentValue is explicitly set to its target endValue so that it's not subjected to any rounding. */
if (percentComplete === 1) {
currentValue = tween.endValue;
/* Otherwise, calculate currentValue based on the current delta from startValue. */
} else {
var tweenDelta = tween.endValue - tween.startValue;
currentValue = tween.startValue + (tweenDelta * easing(percentComplete, opts, tweenDelta));
/* If no value change is occurring, don't proceed with DOM updating. */
if (!firstTick && (currentValue === tween.currentValue)) {
continue;
}
}
tween.currentValue = currentValue;
/* If we're tweening a fake 'tween' property in order to log transition values, update the one-per-call variable so that
it can be passed into the progress callback. */
if (property === "tween") {
tweenDummyValue = currentValue;
} else {
/******************
Hooks: Part I
******************/
/* For hooked properties, the newly-updated rootPropertyValueCache is cached onto the element so that it can be used
for subsequent hooks in this call that are associated with the same root property. If we didn't cache the updated
rootPropertyValue, each subsequent update to the root property in this tick pass would reset the previous hook's
updates to rootPropertyValue prior to injection. A nice performance byproduct of rootPropertyValue caching is that
subsequently chained animations using the same hookRoot but a different hook can use this cached rootPropertyValue. */
if (CSS.Hooks.registered[property]) {
var hookRoot = CSS.Hooks.getRoot(property),
rootPropertyValueCache = Data(element).rootPropertyValueCache[hookRoot];
if (rootPropertyValueCache) {
tween.rootPropertyValue = rootPropertyValueCache;
}
}
/*****************
DOM Update
*****************/
/* setPropertyValue() returns an array of the property name and property value post any normalization that may have been performed. */
/* Note: To solve an IE<=8 positioning bug, the unit type is dropped when setting a property value of 0. */
var adjustedSetData = CSS.setPropertyValue(element, /* SET */
property,
tween.currentValue + (parseFloat(currentValue) === 0 ? "" : tween.unitType),
tween.rootPropertyValue,
tween.scrollData);
/*******************
Hooks: Part II
*******************/
/* Now that we have the hook's updated rootPropertyValue (the post-processed value provided by adjustedSetData), cache it onto the element. */
if (CSS.Hooks.registered[property]) {
/* Since adjustedSetData contains normalized data ready for DOM updating, the rootPropertyValue needs to be re-extracted from its normalized form. ?? */
if (CSS.Normalizations.registered[hookRoot]) {
Data(element).rootPropertyValueCache[hookRoot] = CSS.Normalizations.registered[hookRoot]("extract", null, adjustedSetData[1]);
} else {
Data(element).rootPropertyValueCache[hookRoot] = adjustedSetData[1];
}
}
/***************
Transforms
***************/
/* Flag whether a transform property is being animated so that flushTransformCache() can be triggered once this tick pass is complete. */
if (adjustedSetData[0] === "transform") {
transformPropertyExists = true;
}
}
}
}
/****************
mobileHA
****************/
/* If mobileHA is enabled, set the translate3d transform to null to force hardware acceleration.
It's safe to override this property since Velocity doesn't actually support its animation (hooks are used in its place). */
if (opts.mobileHA) {
/* Don't set the null transform hack if we've already done so. */
if (Data(element).transformCache.translate3d === undefined) {
/* All entries on the transformCache object are later concatenated into a single transform string via flushTransformCache(). */
Data(element).transformCache.translate3d = "(0px, 0px, 0px)";
transformPropertyExists = true;
}
}
if (transformPropertyExists) {
CSS.flushTransformCache(element);
}
}
/* The non-"none" display value is only applied to an element once -- when its associated call is first ticked through.
Accordingly, it's set to false so that it isn't re-processed by this call in the next tick. */
if (opts.display !== undefined && opts.display !== "none") {
Velocity.State.calls[i][2].display = false;
}
if (opts.visibility !== undefined && opts.visibility !== "hidden") {
Velocity.State.calls[i][2].visibility = false;
}
/* Pass the elements and the timing data (percentComplete, msRemaining, timeStart, tweenDummyValue) into the progress callback. */
if (opts.progress) {
opts.progress.call(callContainer[1],
callContainer[1],
percentComplete,
Math.max(0, (timeStart + opts.duration) - timeCurrent),
timeStart,
tweenDummyValue);
}
/* If this call has finished tweening, pass its index to completeCall() to handle call cleanup. */
if (percentComplete === 1) {
completeCall(i);
}
}
}
/* Note: completeCall() sets the isTicking flag to false when the last call on Velocity.State.calls has completed. */
if (Velocity.State.isTicking) {
ticker(tick);
}
}
/**********************
Call Completion
**********************/
/* Note: Unlike tick(), which processes all active calls at once, call completion is handled on a per-call basis. */
function completeCall (callIndex, isStopped) {
/* Ensure the call exists. */
if (!Velocity.State.calls[callIndex]) {
return false;
}
/* Pull the metadata from the call. */
var call = Velocity.State.calls[callIndex][0],
elements = Velocity.State.calls[callIndex][1],
opts = Velocity.State.calls[callIndex][2],
resolver = Velocity.State.calls[callIndex][4];
var remainingCallsExist = false;
/*************************
Element Finalization
*************************/
for (var i = 0, callLength = call.length; i < callLength; i++) {
var element = call[i].element;
/* If the user set display to "none" (intending to hide the element), set it now that the animation has completed. */
/* Note: display:none isn't set when calls are manually stopped (via Velocity("stop"). */
/* Note: Display gets ignored with "reverse" calls and infinite loops, since this behavior would be undesirable. */
if (!isStopped && !opts.loop) {
if (opts.display === "none") {
CSS.setPropertyValue(element, "display", opts.display);
}
if (opts.visibility === "hidden") {
CSS.setPropertyValue(element, "visibility", opts.visibility);
}
}
/* If the element's queue is empty (if only the "inprogress" item is left at position 0) or if its queue is about to run
a non-Velocity-initiated entry, turn off the isAnimating flag. A non-Velocity-initiatied queue entry's logic might alter
an element's CSS values and thereby cause Velocity's cached value data to go stale. To detect if a queue entry was initiated by Velocity,
we check for the existence of our special Velocity.queueEntryFlag declaration, which minifiers won't rename since the flag
is assigned to jQuery's global $ object and thus exists out of Velocity's own scope. */
if (opts.loop !== true && ($.queue(element)[1] === undefined || !/\.velocityQueueEntryFlag/i.test($.queue(element)[1]))) {
/* The element may have been deleted. Ensure that its data cache still exists before acting on it. */
if (Data(element)) {
Data(element).isAnimating = false;
/* Clear the element's rootPropertyValueCache, which will become stale. */
Data(element).rootPropertyValueCache = {};
var transformHAPropertyExists = false;
/* If any 3D transform subproperty is at its default value (regardless of unit type), remove it. */
$.each(CSS.Lists.transforms3D, function(i, transformName) {
var defaultValue = /^scale/.test(transformName) ? 1 : 0,
currentValue = Data(element).transformCache[transformName];
if (Data(element).transformCache[transformName] !== undefined && new RegExp("^\\(" + defaultValue + "[^.]").test(currentValue)) {
transformHAPropertyExists = true;
delete Data(element).transformCache[transformName];
}
});
/* Mobile devices have hardware acceleration removed at the end of the animation in order to avoid hogging the GPU's memory. */
if (opts.mobileHA) {
transformHAPropertyExists = true;
delete Data(element).transformCache.translate3d;
}
/* Flush the subproperty removals to the DOM. */
if (transformHAPropertyExists) {
CSS.flushTransformCache(element);
}
/* Remove the "velocity-animating" indicator class. */
CSS.Values.removeClass(element, "velocity-animating");
}
}
/*********************
Option: Complete
*********************/
/* Complete is fired once per call (not once per element) and is passed the full raw DOM element set as both its context and its first argument. */
/* Note: Callbacks aren't fired when calls are manually stopped (via Velocity("stop"). */
if (!isStopped && opts.complete && !opts.loop && (i === callLength - 1)) {
/* We throw callbacks in a setTimeout so that thrown errors don't halt the execution of Velocity itself. */
try {
opts.complete.call(elements, elements);
} catch (error) {
setTimeout(function() { throw error; }, 1);
}
}
/**********************
Promise Resolving
**********************/
/* Note: Infinite loops don't return promises. */
if (resolver && opts.loop !== true) {
resolver(elements);
}
/****************************
Option: Loop (Infinite)
****************************/
if (Data(element) && opts.loop === true && !isStopped) {
/* If a rotateX/Y/Z property is being animated to 360 deg with loop:true, swap tween start/end values to enable
continuous iterative rotation looping. (Otherise, the element would just rotate back and forth.) */
$.each(Data(element).tweensContainer, function(propertyName, tweenContainer) {
if (/^rotate/.test(propertyName) && parseFloat(tweenContainer.endValue) === 360) {
tweenContainer.endValue = 0;
tweenContainer.startValue = 360;
}
if (/^backgroundPosition/.test(propertyName) && parseFloat(tweenContainer.endValue) === 100 && tweenContainer.unitType === "%") {
tweenContainer.endValue = 0;
tweenContainer.startValue = 100;
}
});
Velocity(element, "reverse", { loop: true, delay: opts.delay });
}
/***************
Dequeueing
***************/
/* Fire the next call in the queue so long as this call's queue wasn't set to false (to trigger a parallel animation),
which would have already caused the next call to fire. Note: Even if the end of the animation queue has been reached,
$.dequeue() must still be called in order to completely clear jQuery's animation queue. */
if (opts.queue !== false) {
$.dequeue(element, opts.queue);
}
}
/************************
Calls Array Cleanup
************************/
/* Since this call is complete, set it to false so that the rAF tick skips it. This array is later compacted via compactSparseArray().
(For performance reasons, the call is set to false instead of being deleted from the array: http://www.html5rocks.com/en/tutorials/speed/v8/) */
Velocity.State.calls[callIndex] = false;
/* Iterate through the calls array to determine if this was the final in-progress animation.
If so, set a flag to end ticking and clear the calls array. */
for (var j = 0, callsLength = Velocity.State.calls.length; j < callsLength; j++) {
if (Velocity.State.calls[j] !== false) {
remainingCallsExist = true;
break;
}
}
if (remainingCallsExist === false) {
/* tick() will detect this flag upon its next iteration and subsequently turn itself off. */
Velocity.State.isTicking = false;
/* Clear the calls array so that its length is reset. */
delete Velocity.State.calls;
Velocity.State.calls = [];
}
}
/******************
Frameworks
******************/
/* Both jQuery and Zepto allow their $.fn object to be extended to allow wrapped elements to be subjected to plugin calls.
If either framework is loaded, register a "velocity" extension pointing to Velocity's core animate() method. Velocity
also registers itself onto a global container (window.jQuery || window.Zepto || window) so that certain features are
accessible beyond just a per-element scope. This master object contains an .animate() method, which is later assigned to $.fn
(if jQuery or Zepto are present). Accordingly, Velocity can both act on wrapped DOM elements and stand alone for targeting raw DOM elements. */
global.Velocity = Velocity;
if (global !== window) {
/* Assign the element function to Velocity's core animate() method. */
global.fn.velocity = animate;
/* Assign the object function's defaults to Velocity's global defaults object. */
global.fn.velocity.defaults = Velocity.defaults;
}
/***********************
Packaged Redirects
***********************/
/* slideUp, slideDown */
$.each([ "Down", "Up" ], function(i, direction) {
Velocity.Redirects["slide" + direction] = function (element, options, elementsIndex, elementsSize, elements, promiseData) {
var opts = $.extend({}, options),
begin = opts.begin,
complete = opts.complete,
computedValues = { height: "", marginTop: "", marginBottom: "", paddingTop: "", paddingBottom: "" },
inlineValues = {};
if (opts.display === undefined) {
/* Show the element before slideDown begins and hide the element after slideUp completes. */
/* Note: Inline elements cannot have dimensions animated, so they're reverted to inline-block. */
opts.display = (direction === "Down" ? (Velocity.CSS.Values.getDisplayType(element) === "inline" ? "inline-block" : "block") : "none");
}
opts.begin = function() {
/* If the user passed in a begin callback, fire it now. */
begin && begin.call(elements, elements);
/* Cache the elements' original vertical dimensional property values so that we can animate back to them. */
for (var property in computedValues) {
inlineValues[property] = element.style[property];
/* For slideDown, use forcefeeding to animate all vertical properties from 0. For slideUp,
use forcefeeding to start from computed values and animate down to 0. */
var propertyValue = Velocity.CSS.getPropertyValue(element, property);
computedValues[property] = (direction === "Down") ? [ propertyValue, 0 ] : [ 0, propertyValue ];
}
/* Force vertical overflow content to clip so that sliding works as expected. */
inlineValues.overflow = element.style.overflow;
element.style.overflow = "hidden";
}
opts.complete = function() {
/* Reset element to its pre-slide inline values once its slide animation is complete. */
for (var property in inlineValues) {
element.style[property] = inlineValues[property];
}
/* If the user passed in a complete callback, fire it now. */
complete && complete.call(elements, elements);
promiseData && promiseData.resolver(elements);
};
Velocity(element, computedValues, opts);
};
});
/* fadeIn, fadeOut */
$.each([ "In", "Out" ], function(i, direction) {
Velocity.Redirects["fade" + direction] = function (element, options, elementsIndex, elementsSize, elements, promiseData) {
var opts = $.extend({}, options),
propertiesMap = { opacity: (direction === "In") ? 1 : 0 },
originalComplete = opts.complete;
/* Since redirects are triggered individually for each element in the animated set, avoid repeatedly triggering
callbacks by firing them only when the final element has been reached. */
if (elementsIndex !== elementsSize - 1) {
opts.complete = opts.begin = null;
} else {
opts.complete = function() {
if (originalComplete) {
originalComplete.call(elements, elements);
}
promiseData && promiseData.resolver(elements);
}
}
/* If a display was passed in, use it. Otherwise, default to "none" for fadeOut or the element-specific default for fadeIn. */
/* Note: We allow users to pass in "null" to skip display setting altogether. */
if (opts.display === undefined) {
opts.display = (direction === "In" ? "auto" : "none");
}
Velocity(this, propertiesMap, opts);
};
});
return Velocity;
}((window.jQuery || window.Zepto || window), window, document);
}));
/******************
Known Issues
******************/
/* The CSS spec mandates that the translateX/Y/Z transforms are %-relative to the element itself -- not its parent.
Velocity, however, doesn't make this distinction. Thus, converting to or from the % unit with these subproperties
will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */
================================================
FILE: source/lib/velocity/velocity.ui.js
================================================
/**********************
Velocity UI Pack
**********************/
/* VelocityJS.org UI Pack (5.0.4). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */
;(function (factory) {
/* CommonJS module. */
if (typeof require === "function" && typeof exports === "object" ) {
module.exports = factory();
/* AMD module. */
} else if (typeof define === "function" && define.amd) {
define([ "velocity" ], factory);
/* Browser globals. */
} else {
factory();
}
}(function() {
return function (global, window, document, undefined) {
/*************
Checks
*************/
if (!global.Velocity || !global.Velocity.Utilities) {
window.console && console.log("Velocity UI Pack: Velocity must be loaded first. Aborting.");
return;
} else {
var Velocity = global.Velocity,
$ = Velocity.Utilities;
}
var velocityVersion = Velocity.version,
requiredVersion = { major: 1, minor: 1, patch: 0 };
function greaterSemver (primary, secondary) {
var versionInts = [];
if (!primary || !secondary) { return false; }
$.each([ primary, secondary ], function(i, versionObject) {
var versionIntsComponents = [];
$.each(versionObject, function(component, value) {
while (value.toString().length < 5) {
value = "0" + value;
}
versionIntsComponents.push(value);
});
versionInts.push(versionIntsComponents.join(""))
});
return (parseFloat(versionInts[0]) > parseFloat(versionInts[1]));
}
if (greaterSemver(requiredVersion, velocityVersion)){
var abortError = "Velocity UI Pack: You need to update Velocity (jquery.velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";
alert(abortError);
throw new Error(abortError);
}
/************************
Effect Registration
************************/
/* Note: RegisterUI is a legacy name. */
Velocity.RegisterEffect = Velocity.RegisterUI = function (effectName, properties) {
/* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */
function animateParentHeight (elements, direction, totalDuration, stagger) {
var totalHeightDelta = 0,
parentNode;
/* Sum the total height (including padding and margin) of all targeted elements. */
$.each(elements.nodeType ? [ elements ] : elements, function(i, element) {
if (stagger) {
/* Increase the totalDuration by the successive delay amounts produced by the stagger option. */
totalDuration += i * stagger;
}
parentNode = element.parentNode;
$.each([ "height", "paddingTop", "paddingBottom", "marginTop", "marginBottom"], function(i, property) {
totalHeightDelta += parseFloat(Velocity.CSS.getPropertyValue(element, property));
});
});
/* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */
Velocity.animate(
parentNode,
{ height: (direction === "In" ? "+" : "-") + "=" + totalHeightDelta },
{ queue: false, easing: "ease-in-out", duration: totalDuration * (direction === "In" ? 0.6 : 1) }
);
}
/* Register a custom redirect for each effect. */
Velocity.Redirects[effectName] = function (element, redirectOptions, elementsIndex, elementsSize, elements, promiseData) {
var finalElement = (elementsIndex === elementsSize - 1);
if (typeof properties.defaultDuration === "function") {
properties.defaultDuration = properties.defaultDuration.call(elements, elements);
} else {
properties.defaultDuration = parseFloat(properties.defaultDuration);
}
/* Iterate through each effect's call array. */
for (var callIndex = 0; callIndex < properties.calls.length; callIndex++) {
var call = properties.calls[callIndex],
propertyMap = call[0],
redirectDuration = (redirectOptions.duration || properties.defaultDuration || 1000),
durationPercentage = call[1],
callOptions = call[2] || {},
opts = {};
/* Assign the whitelisted per-call options. */
opts.duration = redirectDuration * (durationPercentage || 1);
opts.queue = redirectOptions.queue || "";
opts.easing = callOptions.easing || "ease";
opts.delay = parseFloat(callOptions.delay) || 0;
opts._cacheValues = callOptions._cacheValues || true;
/* Special processing for the first effect call. */
if (callIndex === 0) {
/* If a delay was passed into the redirect, combine it with the first call's delay. */
opts.delay += (parseFloat(redirectOptions.delay) || 0);
if (elementsIndex === 0) {
opts.begin = function() {
/* Only trigger a begin callback on the first effect call with the first element in the set. */
redirectOptions.begin && redirectOptions.begin.call(elements, elements);
var direction = effectName.match(/(In|Out)$/);
/* Make "in" transitioning elements invisible immediately so that there's no FOUC between now
and the first RAF tick. */
if ((direction && direction[0] === "In") && propertyMap.opacity !== undefined) {
$.each(elements.nodeType ? [ elements ] : elements, function(i, element) {
Velocity.CSS.setPropertyValue(element, "opacity", 0);
});
}
/* Only trigger animateParentHeight() if we're using an In/Out transition. */
if (redirectOptions.animateParentHeight && direction) {
animateParentHeight(elements, direction[0], redirectDuration + opts.delay, redirectOptions.stagger);
}
}
}
/* If the user isn't overriding the display option, default to "auto" for "In"-suffixed transitions. */
if (redirectOptions.display !== null) {
if (redirectOptions.display !== undefined && redirectOptions.display !== "none") {
opts.display = redirectOptions.display;
} else if (/In$/.test(effectName)) {
/* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */
var defaultDisplay = Velocity.CSS.Values.getDisplayType(element);
opts.display = (defaultDisplay === "inline") ? "inline-block" : defaultDisplay;
}
}
if (redirectOptions.visibility && redirectOptions.visibility !== "hidden") {
opts.visibility = redirectOptions.visibility;
}
}
/* Special processing for the last effect call. */
if (callIndex === properties.calls.length - 1) {
/* Append promise resolving onto the user's redirect callback. */
function injectFinalCallbacks () {
if ((redirectOptions.display === undefined || redirectOptions.display === "none") && /Out$/.test(effectName)) {
$.each(elements.nodeType ? [ elements ] : elements, function(i, element) {
Velocity.CSS.setPropertyValue(element, "display", "none");
});
}
redirectOptions.complete && redirectOptions.complete.call(elements, elements);
if (promiseData) {
promiseData.resolver(elements || element);
}
}
opts.complete = function() {
if (properties.reset) {
for (var resetProperty in properties.reset) {
var resetValue = properties.reset[resetProperty];
/* Format each non-array value in the reset property map to [ value, value ] so that changes apply
immediately and DOM querying is avoided (via forcefeeding). */
/* Note: Don't forcefeed hooks, otherwise their hook roots will be defaulted to their null values. */
if (Velocity.CSS.Hooks.registered[resetProperty] === undefined && (typeof resetValue === "string" || typeof resetValue === "number")) {
properties.reset[resetProperty] = [ properties.reset[resetProperty], properties.reset[resetProperty] ];
}
}
/* So that the reset values are applied instantly upon the next rAF tick, use a zero duration and parallel queueing. */
var resetOptions = { duration: 0, queue: false };
/* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */
if (finalElement) {
resetOptions.complete = injectFinalCallbacks;
}
Velocity.animate(element, properties.reset, resetOptions);
/* Only trigger the user's complete callback on the last effect call with the last element in the set. */
} else if (finalElement) {
injectFinalCallbacks();
}
};
if (redirectOptions.visibility === "hidden") {
opts.visibility = redirectOptions.visibility;
}
}
Velocity.animate(element, propertyMap, opts);
}
};
/* Return the Velocity object so that RegisterUI calls can be chained. */
return Velocity;
};
/*********************
Packaged Effects
*********************/
/* Externalize the packagedEffects data so that they can optionally be modified and re-registered. */
/* Support: <=IE8: Callouts will have no effect, and transitions will simply fade in/out. IE9/Android 2.3: Most effects are fully supported, the rest fade in/out. All other browsers: full support. */
Velocity.RegisterEffect.packagedEffects =
{
/* Animate.css */
"callout.bounce": {
defaultDuration: 550,
calls: [
[ { translateY: -30 }, 0.25 ],
[ { translateY: 0 }, 0.125 ],
[ { translateY: -15 }, 0.125 ],
[ { translateY: 0 }, 0.25 ]
]
},
/* Animate.css */
"callout.shake": {
defaultDuration: 800,
calls: [
[ { translateX: -11 }, 0.125 ],
[ { translateX: 11 }, 0.125 ],
[ { translateX: -11 }, 0.125 ],
[ { translateX: 11 }, 0.125 ],
[ { translateX: -11 }, 0.125 ],
[ { translateX: 11 }, 0.125 ],
[ { translateX: -11 }, 0.125 ],
[ { translateX: 0 }, 0.125 ]
]
},
/* Animate.css */
"callout.flash": {
defaultDuration: 1100,
calls: [
[ { opacity: [ 0, "easeInOutQuad", 1 ] }, 0.25 ],
[ { opacity: [ 1, "easeInOutQuad" ] }, 0.25 ],
[ { opacity: [ 0, "easeInOutQuad" ] }, 0.25 ],
[ { opacity: [ 1, "easeInOutQuad" ] }, 0.25 ]
]
},
/* Animate.css */
"callout.pulse": {
defaultDuration: 825,
calls: [
[ { scaleX: 1.1, scaleY: 1.1 }, 0.50, { easing: "easeInExpo" } ],
[ { scaleX: 1, scaleY: 1 }, 0.50 ]
]
},
/* Animate.css */
"callout.swing": {
defaultDuration: 950,
calls: [
[ { rotateZ: 15 }, 0.20 ],
[ { rotateZ: -10 }, 0.20 ],
[ { rotateZ: 5 }, 0.20 ],
[ { rotateZ: -5 }, 0.20 ],
[ { rotateZ: 0 }, 0.20 ]
]
},
/* Animate.css */
"callout.tada": {
defaultDuration: 1000,
calls: [
[ { scaleX: 0.9, scaleY: 0.9, rotateZ: -3 }, 0.10 ],
[ { scaleX: 1.1, scaleY: 1.1, rotateZ: 3 }, 0.10 ],
[ { scaleX: 1.1, scaleY: 1.1, rotateZ: -3 }, 0.10 ],
[ "reverse", 0.125 ],
[ "reverse", 0.125 ],
[ "reverse", 0.125 ],
[ "reverse", 0.125 ],
[ "reverse", 0.125 ],
[ { scaleX: 1, scaleY: 1, rotateZ: 0 }, 0.20 ]
]
},
"transition.fadeIn": {
defaultDuration: 500,
calls: [
[ { opacity: [ 1, 0 ] } ]
]
},
"transition.fadeOut": {
defaultDuration: 500,
calls: [
[ { opacity: [ 0, 1 ] } ]
]
},
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipXIn": {
defaultDuration: 700,
calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], rotateY: [ 0, -55 ] } ]
],
reset: { transformPerspective: 0 }
},
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipXOut": {
defaultDuration: 700,
calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], rotateY: 55 } ]
],
reset: { transformPerspective: 0, rotateY: 0 }
},
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipYIn": {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], rotateX: [ 0, -45 ] } ]
],
reset: { transformPerspective: 0 }
},
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipYOut": {
defaultDuration: 800,
calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], rotateX: 25 } ]
],
reset: { transformPerspective: 0, rotateX: 0 }
},
/* Animate.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipBounceXIn": {
defaultDuration: 900,
calls: [
[ { opacity: [ 0.725, 0 ], transformPerspective: [ 400, 400 ], rotateY: [ -10, 90 ] }, 0.50 ],
[ { opacity: 0.80, rotateY: 10 }, 0.25 ],
[ { opacity: 1, rotateY: 0 }, 0.25 ]
],
reset: { transformPerspective: 0 }
},
/* Animate.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipBounceXOut": {
defaultDuration: 800,
calls: [
[ { opacity: [ 0.9, 1 ], transformPerspective: [ 400, 400 ], rotateY: -10 }, 0.50 ],
[ { opacity: 0, rotateY: 90 }, 0.50 ]
],
reset: { transformPerspective: 0, rotateY: 0 }
},
/* Animate.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipBounceYIn": {
defaultDuration: 850,
calls: [
[ { opacity: [ 0.725, 0 ], transformPerspective: [ 400, 400 ], rotateX: [ -10, 90 ] }, 0.50 ],
[ { opacity: 0.80, rotateX: 10 }, 0.25 ],
[ { opacity: 1, rotateX: 0 }, 0.25 ]
],
reset: { transformPerspective: 0 }
},
/* Animate.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipBounceYOut": {
defaultDuration: 800,
calls: [
[ { opacity: [ 0.9, 1 ], transformPerspective: [ 400, 400 ], rotateX: -15 }, 0.50 ],
[ { opacity: 0, rotateX: 90 }, 0.50 ]
],
reset: { transformPerspective: 0, rotateX: 0 }
},
/* Magic.css */
"transition.swoopIn": {
defaultDuration: 850,
calls: [
[ { opacity: [ 1, 0 ], transformOriginX: [ "100%", "50%" ], transformOriginY: [ "100%", "100%" ], scaleX: [ 1, 0 ], scaleY: [ 1, 0 ], translateX: [ 0, -700 ], translateZ: 0 } ]
],
reset: { transformOriginX: "50%", transformOriginY: "50%" }
},
/* Magic.css */
"transition.swoopOut": {
defaultDuration: 850,
calls: [
[ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "100%" ], transformOriginY: [ "100%", "100%" ], scaleX: 0, scaleY: 0, translateX: -700, translateZ: 0 } ]
],
reset: { transformOriginX: "50%", transformOriginY: "50%", scaleX: 1, scaleY: 1, translateX: 0 }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */
"transition.whirlIn": {
defaultDuration: 850,
calls: [
[ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 0 ], scaleY: [ 1, 0 ], rotateY: [ 0, 160 ] }, 1, { easing: "easeInOutSine" } ]
]
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */
"transition.whirlOut": {
defaultDuration: 750,
calls: [
[ { opacity: [ 0, "easeInOutQuint", 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 0, scaleY: 0, rotateY: 160 }, 1, { easing: "swing" } ]
],
reset: { scaleX: 1, scaleY: 1, rotateY: 0 }
},
"transition.shrinkIn": {
defaultDuration: 750,
calls: [
[ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 1.5 ], scaleY: [ 1, 1.5 ], translateZ: 0 } ]
]
},
"transition.shrinkOut": {
defaultDuration: 600,
calls: [
[ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 1.3, scaleY: 1.3, translateZ: 0 } ]
],
reset: { scaleX: 1, scaleY: 1 }
},
"transition.expandIn": {
defaultDuration: 700,
calls: [
[ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 0.625 ], scaleY: [ 1, 0.625 ], translateZ: 0 } ]
]
},
"transition.expandOut": {
defaultDuration: 700,
calls: [
[ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 0.5, scaleY: 0.5, translateZ: 0 } ]
],
reset: { scaleX: 1, scaleY: 1 }
},
/* Animate.css */
"transition.bounceIn": {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], scaleX: [ 1.05, 0.3 ], scaleY: [ 1.05, 0.3 ] }, 0.40 ],
[ { scaleX: 0.9, scaleY: 0.9, translateZ: 0 }, 0.20 ],
[ { scaleX: 1, scaleY: 1 }, 0.50 ]
]
},
/* Animate.css */
"transition.bounceOut": {
defaultDuration: 800,
calls: [
[ { scaleX: 0.95, scaleY: 0.95 }, 0.35 ],
[ { scaleX: 1.1, scaleY: 1.1, translateZ: 0 }, 0.35 ],
[ { opacity: [ 0, 1 ], scaleX: 0.3, scaleY: 0.3 }, 0.30 ]
],
reset: { scaleX: 1, scaleY: 1 }
},
/* Animate.css */
"transition.bounceUpIn": {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], translateY: [ -30, 1000 ] }, 0.60, { easing: "easeOutCirc" } ],
[ { translateY: 10 }, 0.20 ],
[ { translateY: 0 }, 0.20 ]
]
},
/* Animate.css */
"transition.bounceUpOut": {
defaultDuration: 1000,
calls: [
[ { translateY: 20 }, 0.20 ],
[ { opacity: [ 0, "easeInCirc", 1 ], translateY: -1000 }, 0.80 ]
],
reset: { translateY: 0 }
},
/* Animate.css */
"transition.bounceDownIn": {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], translateY: [ 30, -1000 ] }, 0.60, { easing: "easeOutCirc" } ],
[ { translateY: -10 }, 0.20 ],
[ { translateY: 0 }, 0.20 ]
]
},
/* Animate.css */
"transition.bounceDownOut": {
defaultDuration: 1000,
calls: [
[ { translateY: -20 }, 0.20 ],
[ { opacity: [ 0, "easeInCirc", 1 ], translateY: 1000 }, 0.80 ]
],
reset: { translateY: 0 }
},
/* Animate.css */
"transition.bounceLeftIn": {
defaultDuration: 750,
calls: [
[ { opacity: [ 1, 0 ], translateX: [ 30, -1250 ] }, 0.60, { easing: "easeOutCirc" } ],
[ { translateX: -10 }, 0.20 ],
[ { translateX: 0 }, 0.20 ]
]
},
/* Animate.css */
"transition.bounceLeftOut": {
defaultDuration: 750,
calls: [
[ { translateX: 30 }, 0.20 ],
[ { opacity: [ 0, "easeInCirc", 1 ], translateX: -1250 }, 0.80 ]
],
reset: { translateX: 0 }
},
/* Animate.css */
"transition.bounceRightIn": {
defaultDuration: 750,
calls: [
[ { opacity: [ 1, 0 ], translateX: [ -30, 1250 ] }, 0.60, { easing: "easeOutCirc" } ],
[ { translateX: 10 }, 0.20 ],
[ { translateX: 0 }, 0.20 ]
]
},
/* Animate.css */
"transition.bounceRightOut": {
defaultDuration: 750,
calls: [
[ { translateX: -30 }, 0.20 ],
[ { opacity: [ 0, "easeInCirc", 1 ], translateX: 1250 }, 0.80 ]
],
reset: { translateX: 0 }
},
"transition.slideUpIn": {
defaultDuration: 900,
calls: [
[ { opacity: [ 1, 0 ], translateY: [ 0, 20 ], translateZ: 0 } ]
]
},
"transition.slideUpOut": {
defaultDuration: 900,
calls: [
[ { opacity: [ 0, 1 ], translateY: -20, translateZ: 0 } ]
],
reset: { translateY: 0 }
},
"transition.slideDownIn": {
defaultDuration: 900,
calls: [
[ { opacity: [ 1, 0 ], translateY: [ 0, -20 ], translateZ: 0 } ]
]
},
"transition.slideDownOut": {
defaultDuration: 900,
calls: [
[ { opacity: [ 0, 1 ], translateY: 20, translateZ: 0 } ]
],
reset: { translateY: 0 }
},
"transition.slideLeftIn": {
defaultDuration: 1000,
calls: [
[ { opacity: [ 1, 0 ], translateX: [ 0, -20 ], translateZ: 0 } ]
]
},
"transition.slideLeftOut": {
defaultDuration: 1050,
calls: [
[ { opacity: [ 0, 1 ], translateX: -20, translateZ: 0 } ]
],
reset: { translateX: 0 }
},
"transition.slideRightIn": {
defaultDuration: 1000,
calls: [
[ { opacity: [ 1, 0 ], translateX: [ 0, 20 ], translateZ: 0 } ]
]
},
"transition.slideRightOut": {
defaultDuration: 1050,
calls: [
[ { opacity: [ 0, 1 ], translateX: 20, translateZ: 0 } ]
],
reset: { translateX: 0 }
},
"transition.slideUpBigIn": {
defaultDuration: 850,
calls: [
[ { opacity: [ 1, 0 ], translateY: [ 0, 75 ], translateZ: 0 } ]
]
},
"transition.slideUpBigOut": {
defaultDuration: 800,
calls: [
[ { opacity: [ 0, 1 ], translateY: -75, translateZ: 0 } ]
],
reset: { translateY: 0 }
},
"transition.slideDownBigIn": {
defaultDuration: 850,
calls: [
[ { opacity: [ 1, 0 ], translateY: [ 0, -75 ], translateZ: 0 } ]
]
},
"transition.slideDownBigOut": {
defaultDuration: 800,
calls: [
[ { opacity: [ 0, 1 ], translateY: 75, translateZ: 0 } ]
],
reset: { translateY: 0 }
},
"transition.slideLeftBigIn": {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], translateX: [ 0, -75 ], translateZ: 0 } ]
]
},
"transition.slideLeftBigOut": {
defaultDuration: 750,
calls: [
[ { opacity: [ 0, 1 ], translateX: -75, translateZ: 0 } ]
],
reset: { translateX: 0 }
},
"transition.slideRightBigIn": {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], translateX: [ 0, 75 ], translateZ: 0 } ]
]
},
"transition.slideRightBigOut": {
defaultDuration: 750,
calls: [
[ { opacity: [ 0, 1 ], translateX: 75, translateZ: 0 } ]
],
reset: { translateX: 0 }
},
/* Magic.css */
"transition.perspectiveUpIn": {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: [ 0, -180 ] } ]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveUpOut": {
defaultDuration: 850,
calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: -180 } ]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0 }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveDownIn": {
defaultDuration: 800,
calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateX: [ 0, 180 ] } ]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveDownOut": {
defaultDuration: 850,
calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateX: 180 } ]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0 }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveLeftIn": {
defaultDuration: 950,
calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateY: [ 0, -180 ] } ]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveLeftOut": {
defaultDuration: 950,
calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateY: -180 } ]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0 }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveRightIn": {
defaultDuration: 950,
calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ "100%", "100%" ], transformOriginY: [ 0, 0 ], rotateY: [ 0, 180 ] } ]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
},
/* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveRightOut": {
defaultDuration: 950,
calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ "100%", "100%" ], transformOriginY: [ 0, 0 ], rotateY: 180 } ]
],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0 }
}
};
/* Register the packaged effects. */
for (var effectName in Velocity.RegisterEffect.packagedEffects) {
Velocity.RegisterEffect(effectName, Velocity.RegisterEffect.packagedEffects[effectName]);
}
/*********************
Sequence Running
**********************/
/* Note: Sequence calls must use Velocity's single-object arguments syntax. */
Velocity.RunSequence = function (originalSequence) {
var sequence = $.extend(true, [], originalSequence);
if (sequence.length > 1) {
$.each(sequence.reverse(), function(i, currentCall) {
var nextCall = sequence[i + 1];
if (nextCall) {
/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered
in the previous call's begin callback. Otherwise, chained calls are normally triggered
in the previous call's complete callback. */
var currentCallOptions = currentCall.o || currentCall.options,
nextCallOptions = nextCall.o || nextCall.options;
var timing = (currentCallOptions && currentCallOptions.sequenceQueue === false) ? "begin" : "complete",
callbackOriginal = nextCallOptions && nextCallOptions[timing],
options = {};
options[timing] = function() {
var nextCallElements = nextCall.e || nextCall.elements;
var elements = nextCallElements.nodeType ? [ nextCallElements ] : nextCallElements;
callbackOriginal && callbackOriginal.call(elements, elements);
Velocity(currentCall);
}
if (nextCall.o) {
nextCall.o = $.extend({}, nextCallOptions, options);
} else {
nextCall.options = $.extend({}, nextCallOptions, options);
}
}
});
sequence.reverse();
}
Velocity(sequence[0]);
};
}((window.jQuery || window.Zepto || window), window, document);
}));
================================================
FILE: test/.jshintrc
================================================
{
"curly": true,
"eqnull": true,
"eqeqeq": true,
"undef": true,
"newcap": true,
"unused": true,
"laxcomma": false,
"asi": false,
"expr": true,
"loopfunc": false,
"strict": false,
"globals": {
"define": true,
"require": true,
"it": true,
"module": true,
"describe": true,
"window": true,
"$": true
}
}
================================================
FILE: test/helpers.js
================================================
define([
'intern!object',
'intern/chai!assert',
'intern/order!source/js/helpers.js'
], function (registerSuite, assert) {
registerSuite({
name: 'helpers',
beforeEach: function () {
window = {
navigator: {
userAgent: ''
}
};
screen = {
width: 0
};
minic = {
desktop: function (screenWidth) {
window.navigator.userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36';
screen.width = screenWidth || 992;
},
tablet: function (screenWidth) {
window.navigator.userAgent = 'Mozilla/5.0 (iPad; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5';
screen.width = screenWidth || 750;
},
mobile: function (screenWidth) {
window.navigator.userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4';
screen.width = screenWidth || 767;
}
};
},
'#hasMobileUA': {
'should be true': function () {
minic.mobile();
assert.isTrue( hasMobileUA() );
minic.tablet();
assert.isTrue( hasMobileUA() );
},
'should be false': function () {
minic.desktop();
assert.isFalse( hasMobileUA() );
}
},
'#isDesktop': {
'should be true': function () {
minic.desktop(992);
assert.isTrue( isDesktop() );
minic.desktop(1200);
assert.isTrue( isDesktop() );
},
'should be false': function () {
minic.mobile();
assert.isFalse( isDesktop() );
minic.tablet(992);
assert.isFalse( isDesktop() );
}
},
'#isTablet': {
'should be true': function () {
minic.tablet(900);
assert.isTrue( isTablet() );
minic.tablet(780);
assert.isTrue( isTablet() );
},
'should be false': function () {
minic.desktop(500);
assert.isFalse( isTablet() );
minic.tablet(1000);
assert.isFalse( isTablet() );
minic.tablet(500);
assert.isFalse( isTablet() );
}
},
'#isMobile': {
'should be true': function () {
minic.mobile();
assert.isTrue( isMobile() );
minic.mobile(700);
assert.isTrue( isMobile() );
},
'should be false': function () {
minic.desktop();
assert.isFalse( isMobile() );
minic.tablet();
assert.isFalse( isMobile() );
minic.mobile(1000);
assert.isFalse( isMobile() );
}
},
'#escapeSelector': function () {
var selectors = ['(something', '.something', '$something'];
selectors.forEach(function (s) {
assert.equal( escapeSelector(s), '\\' + s );
});
},
'#displaySidebar': function () {},
'#isMist': {
beforeEach: function () {
CONFIG = {
scheme: ''
};
},
'should be true': function () {
CONFIG.scheme = 'Mist';
assert.isTrue( isMist() );
},
'should be false': function () {
CONFIG.scheme = 'Minimal';
assert.isFalse( isMist() );
}
}
});
});
================================================
FILE: test/intern.js
================================================
// Learn more about configuring this file at .
// These default settings work OK for most people. The options that *must* be changed below are the
// packages, suites, excludeInstrumentation, and (if you want functional tests) functionalSuites.
define({
// The port on which the instrumenting proxy will listen
proxyPort: 9000,
// A fully qualified URL to the Intern proxy
proxyUrl: 'http://localhost:9000/',
// Default desired capabilities for all environments. Individual capabilities can be overridden by any of the
// specified browser environments in the `environments` array below as well. See
// https://code.google.com/p/selenium/wiki/DesiredCapabilities for standard Selenium capabilities and
// https://saucelabs.com/docs/additional-config#desired-capabilities for Sauce Labs capabilities.
// Note that the `build` capability will be filled in with the current commit ID from the Travis CI environment
// automatically
capabilities: {
'selenium-version': '2.41.0'
},
// Browsers to run integration testing against. Note that version numbers must be strings if used with Sauce
// OnDemand. Options that will be permutated are browserName, version, platform, and platformVersion; any other
// capabilities options specified for an environment will be copied as-is
environments: [
{ browserName: 'internet explorer', version: '11', platform: 'Windows 8.1' },
{ browserName: 'internet explorer', version: '10', platform: 'Windows 8' },
{ browserName: 'internet explorer', version: '9', platform: 'Windows 7' },
{ browserName: 'firefox', version: '28', platform: [ 'OS X 10.9', 'Windows 7', 'Linux' ] },
{ browserName: 'chrome', version: '34', platform: [ 'OS X 10.9', 'Windows 7', 'Linux' ] },
{ browserName: 'safari', version: '6', platform: 'OS X 10.8' },
{ browserName: 'safari', version: '7', platform: 'OS X 10.9' }
],
// Maximum number of simultaneous integration tests that should be executed on the remote WebDriver service
maxConcurrency: 3,
// Name of the tunnel class to use for WebDriver tests
tunnel: 'SauceLabsTunnel',
// The desired AMD loader to use when running unit tests (client.html/client.js). Omit to use the default Dojo
// loader
useLoader: {
'host-node': 'dojo/dojo',
'host-browser': 'node_modules/dojo/dojo.js'
},
// Configuration options for the module loader; any AMD configuration options supported by the specified AMD loader
// can be used here
loader: {
// Packages that should be registered with the loader in each testing environment
packages: [ { name: 'next', location: '.' } ]
},
// Non-functional test suite(s) to run in each browser
suites: [
/* 'myPackage/tests/foo', 'myPackage/tests/bar' */
'tests/helpers'
],
// Functional test suite(s) to run in each browser once non-functional tests are completed
functionalSuites: [ /* 'myPackage/tests/functional' */ ],
// A regular expression matching URLs to files that should not be included in code coverage analysis
excludeInstrumentation: /^(?:tests|node_modules)\//
});