commit 0d8a9f6739362399f05f059a0e055e21371c09cf Author: 结发受长生 Date: Sun May 6 01:00:35 2018 +0800 initial diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..063b0e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +Thumbs.db +db.json +*.log +node_modules/ +public/ +.deploy*/ \ No newline at end of file diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..ddd4b3e --- /dev/null +++ b/_config.yml @@ -0,0 +1,87 @@ +# Hexo Configuration +## Docs: https://hexo.io/docs/configuration.html +## Source: https://github.com/hexojs/hexo/ +server: + port: 6603 + compress: true + header: true + +# Site +title: 日月追影俯河山 +subtitle: 世上有条唯一的路,除了你无人能走 +description: +keywords: +author: 柠烟夏季 +language: zh-CN +timezone: + +# URL +## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' +url: https://www.colorfulsweet.site +root: / +permalink: :year/:month/:day/:title/ +permalink_defaults: + +# Directory +source_dir: source +public_dir: public +tag_dir: tags +archive_dir: archives +category_dir: categories +code_dir: downloads/code +i18n_dir: :lang +skip_render: + +# Writing +new_post_name: :title.md # File name of new posts +default_layout: post +titlecase: false # Transform title into titlecase +external_link: true # Open external links in new tab +filename_case: 0 +render_drafts: false +post_asset_folder: false +relative_link: false +future: true +highlight: + enable: true + line_number: true + auto_detect: false + tab_replace: + +# Home page setting +# path: Root path for your blogs index page. (default = '') +# per_page: Posts displayed per page. (0 = disable pagination) +# order_by: Posts order. (Order by date descending by default) +index_generator: + path: '' + per_page: 10 + order_by: -date + +# Category & Tag +default_category: uncategorized +category_map: +tag_map: + +# Date / Time format +## Hexo uses Moment.js to parse and display date +## You can customize the date format as defined in +## http://momentjs.com/docs/#/displaying/format/ +date_format: YYYY-MM-DD +time_format: HH:mm:ss + +# Pagination +## Set per_page to 0 to disable pagination +per_page: 10 +pagination_dir: page + +# Extensions +## Plugins: https://hexo.io/plugins/ +## Themes: https://hexo.io/themes/ +theme: hexo-theme-xups + +# Deployment +## Docs: https://hexo.io/docs/deployment.html +deploy: + type: git + repo: git@github.com:sookie2010/sookie2010.github.io.git + branch: master diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..dbe364c --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2610 @@ +{ + "name": "hexo-site", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "JSONStream": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", + "requires": { + "jsonparse": "1.3.1", + "through": "2.3.8" + } + }, + "a-sync-waterfall": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.0.tgz", + "integrity": "sha1-OOgxnXk3niRiiEW1O5ZyKyng5Hw=" + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "2.1.18", + "negotiator": "0.6.1" + } + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "requires": { + "kind-of": "3.2.2", + "longest": "1.0.1", + "repeat-string": "1.6.1" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "1.0.3" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "1.1.3", + "esutils": "2.0.2", + "js-tokens": "3.0.2" + } + }, + "babel-eslint": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.2.3.tgz", + "integrity": "sha1-sv4tgBJkcPXBlELcdXJTqJdxCCc=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-traverse": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "6.26.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "2.5.5", + "regenerator-runtime": "0.11.1" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "6.26.0", + "babel-messages": "6.23.0", + "babel-runtime": "6.26.0", + "babel-types": "6.26.0", + "babylon": "6.18.0", + "debug": "2.6.9", + "globals": "9.18.0", + "invariant": "2.2.4", + "lodash": "4.17.10" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "6.26.0", + "esutils": "2.0.2", + "lodash": "4.17.10", + "to-fast-properties": "1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "basic-auth": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.0.tgz", + "integrity": "sha1-AV2z81PgLlY3d1X5YnQuiYHnu7o=", + "requires": { + "safe-buffer": "5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + } + } + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "browser-fingerprint": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/browser-fingerprint/-/browser-fingerprint-0.0.1.tgz", + "integrity": "sha1-jfPNyiW/fVs1QtYVRdcwBT/OYEo=" + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "requires": { + "no-case": "2.3.2", + "upper-case": "1.1.3" + } + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "requires": { + "align-text": "0.1.4", + "lazy-cache": "1.0.4" + } + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "requires": { + "css-select": "1.2.0", + "dom-serializer": "0.1.0", + "entities": "1.1.1", + "htmlparser2": "3.9.2", + "lodash.assignin": "4.2.0", + "lodash.bind": "4.2.1", + "lodash.defaults": "4.2.0", + "lodash.filter": "4.6.0", + "lodash.flatten": "4.4.0", + "lodash.foreach": "4.5.0", + "lodash.map": "4.6.0", + "lodash.merge": "4.6.1", + "lodash.pick": "4.4.0", + "lodash.reduce": "4.6.0", + "lodash.reject": "4.6.0", + "lodash.some": "4.6.0" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "fsevents": "1.2.3", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "command-exists": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.6.tgz", + "integrity": "sha512-Qst/zUUNmS/z3WziPxyqjrcz09pm+2Knbs5mAZL4VAE0sSrNY1/w8+/YxeHcoBTsO6iojA6BW7eFf27Eg2MRuw==" + }, + "compressible": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz", + "integrity": "sha1-DRAgq5JLL9tNYnmHXH1tq6a6p6k=", + "requires": { + "mime-db": "1.33.0" + } + }, + "compression": { + "version": "1.7.2", + "resolved": "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz", + "integrity": "sha1-qv+81qr4VLROuygDU9WtFlH1mmk=", + "requires": { + "accepts": "1.3.5", + "bytes": "3.0.0", + "compressible": "2.0.13", + "debug": "2.6.9", + "on-headers": "1.0.1", + "safe-buffer": "5.1.1", + "vary": "1.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "connect": { + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz", + "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=", + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.0", + "parseurl": "1.3.2", + "utils-merge": "1.0.1" + } + }, + "core-js": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz", + "integrity": "sha1-sU3ek2xkDAV5prUMq8wTLdYSfjs=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "requires": { + "lru-cache": "4.1.2", + "which": "1.3.0" + } + }, + "css-parse": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz", + "integrity": "sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=" + }, + "css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "requires": { + "boolbase": "1.0.0", + "css-what": "2.1.0", + "domutils": "1.5.1", + "nth-check": "1.0.1" + } + }, + "css-what": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz", + "integrity": "sha1-lGfQMsOM+u+58teVASUwYvh/ob0=" + }, + "cuid": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/cuid/-/cuid-1.3.8.tgz", + "integrity": "sha1-S4deCWm612T37AcGz0T1+wgx9rc=", + "requires": { + "browser-fingerprint": "0.0.1", + "core-js": "1.2.7", + "node-fingerprint": "0.0.2" + }, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "dom-serializer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", + "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=", + "requires": { + "domelementtype": "1.1.3", + "entities": "1.1.1" + }, + "dependencies": { + "domelementtype": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz", + "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=" + } + } + }, + "domelementtype": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz", + "integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=" + }, + "domhandler": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.1.tgz", + "integrity": "sha1-iS5HAAqZvlW783dP/qBWHYh5wlk=", + "requires": { + "domelementtype": "1.3.0" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "requires": { + "dom-serializer": "0.1.0", + "domelementtype": "1.3.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.5.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.9.tgz", + "integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "entities": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", + "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "2.2.3" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "1.0.2" + } + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.3.tgz", + "integrity": "sha512-X+57O5YkDTiEQGiw8i7wYc2nQgweIekqkepI8Q3y4wVlurgBt2SuwxTeYUYMZIGpLZH3r/TsMjczCMXE5ZOt7Q==", + "optional": true, + "requires": { + "nan": "2.10.0", + "node-pre-gyp": "0.9.1" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.3.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "1.2.0", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "optional": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "requires": { + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "minipass": "2.2.4" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "2.6.9", + "iconv-lite": "0.4.21", + "sax": "1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.9.1", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "1.0.3", + "mkdirp": "0.5.1", + "needle": "2.2.0", + "nopt": "4.0.1", + "npm-packlist": "1.1.10", + "npmlog": "4.1.2", + "rc": "1.2.6", + "rimraf": "2.6.2", + "semver": "5.5.0", + "tar": "4.4.1" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1.1.1", + "osenv": "0.1.5" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "3.0.1", + "npm-bundled": "1.0.3" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.6", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.5", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "optional": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "optional": true, + "requires": { + "chownr": "1.0.1", + "fs-minipass": "1.2.5", + "minipass": "2.2.4", + "minizlib": "1.1.0", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.1", + "yallist": "3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true + } + } + }, + "glob": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", + "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", + "optional": true, + "requires": { + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "2.0.1" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "hexo": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/hexo/-/hexo-3.7.1.tgz", + "integrity": "sha512-+RRN4C8oWYzEnW0NtqNrIfIITRTvXpMoE6OrK5aK4nrO+4lzp0JfZkoxnsINVXUPmzHRimLWUzO95x9lt33jEg==", + "requires": { + "abbrev": "1.1.1", + "archy": "1.0.0", + "bluebird": "3.5.1", + "chalk": "2.4.1", + "cheerio": "0.22.0", + "hexo-cli": "1.1.0", + "hexo-front-matter": "0.2.3", + "hexo-fs": "0.2.3", + "hexo-i18n": "0.2.1", + "hexo-log": "0.2.0", + "hexo-util": "0.6.3", + "js-yaml": "3.11.0", + "lodash": "4.17.10", + "minimatch": "3.0.4", + "moment": "2.22.1", + "moment-timezone": "0.5.16", + "nunjucks": "3.1.2", + "pretty-hrtime": "1.0.3", + "resolve": "1.7.1", + "strip-ansi": "4.0.0", + "strip-indent": "2.0.0", + "swig-extras": "0.0.1", + "swig-templates": "2.0.2", + "text-table": "0.2.0", + "tildify": "1.2.0", + "titlecase": "1.1.2", + "warehouse": "2.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "requires": { + "center-align": "0.1.3", + "right-align": "0.1.3", + "wordwrap": "0.0.2" + } + }, + "hexo-cli": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hexo-cli/-/hexo-cli-1.1.0.tgz", + "integrity": "sha512-IWQPppwgmj1iBUcP5mpcMg3Tre6a8Qlr8ejXw6naZiJNSepSgh4mS3KiNPKDa2qQIgPDqJYJzNVFLw+RLA9CkA==", + "requires": { + "abbrev": "1.1.1", + "bluebird": "3.5.1", + "chalk": "1.1.3", + "command-exists": "1.2.6", + "hexo-fs": "0.2.3", + "hexo-log": "0.2.0", + "hexo-util": "0.6.3", + "minimist": "1.2.0", + "object-assign": "4.1.1", + "resolve": "1.7.1", + "tildify": "1.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "2.2.1", + "escape-string-regexp": "1.0.5", + "has-ansi": "2.0.0", + "strip-ansi": "3.0.1", + "supports-color": "2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + } + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "requires": { + "has-flag": "3.0.0" + } + }, + "swig-templates": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/swig-templates/-/swig-templates-2.0.2.tgz", + "integrity": "sha1-0lAqcwMBk1b06nbqkGXU9Yr2q3U=", + "requires": { + "optimist": "0.6.1", + "uglify-js": "2.6.0" + } + }, + "uglify-js": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.6.0.tgz", + "integrity": "sha1-JeqhzDVQ45QQzu+v0c+7a20V8AE=", + "requires": { + "async": "0.2.10", + "source-map": "0.5.7", + "uglify-to-browserify": "1.0.2", + "yargs": "3.10.0" + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "requires": { + "camelcase": "1.2.1", + "cliui": "2.1.0", + "decamelize": "1.2.0", + "window-size": "0.1.0" + } + } + } + }, + "hexo-bunyan": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hexo-bunyan/-/hexo-bunyan-1.0.0.tgz", + "integrity": "sha512-RymT8Ck+K77mLt9BEYNb4uyfC7RIQnU5N3laXowMrS28jj2h89VHJCOnhV00mmta4fHRqNa07kP1Hrn17nvMkQ==", + "requires": { + "moment": "2.22.1", + "mv": "2.1.1", + "safe-json-stringify": "1.1.0" + } + }, + "hexo-deployer-git": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/hexo-deployer-git/-/hexo-deployer-git-0.3.1.tgz", + "integrity": "sha512-JSwSmTSknGpaiooGXwmP7sAhoSNW3c+xmBiCc5yyrvRSfQ3zIYWjmcqNXSj8m2DmheqQNgt5D4M7quYjw+L6tA==", + "requires": { + "babel-eslint": "7.2.3", + "bluebird": "3.5.1", + "chalk": "1.1.3", + "hexo-fs": "0.2.3", + "hexo-util": "0.6.3", + "moment": "2.22.1", + "swig": "1.4.2" + } + }, + "hexo-front-matter": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hexo-front-matter/-/hexo-front-matter-0.2.3.tgz", + "integrity": "sha1-x8qO9CDqNr2F6ECKLoyb9J76YF4=", + "requires": { + "js-yaml": "3.11.0" + } + }, + "hexo-fs": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/hexo-fs/-/hexo-fs-0.2.3.tgz", + "integrity": "sha512-rLB1rMVUW3csAljvJgHfyjemL0BrmcUZfBf9hJe6S0pA53igFa3ON0PFwomvoLs1Wdmjs9Awnw9Tru4PjWFSlQ==", + "requires": { + "bluebird": "3.5.1", + "chokidar": "1.7.0", + "escape-string-regexp": "1.0.5", + "graceful-fs": "4.1.11" + } + }, + "hexo-generator-archive": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/hexo-generator-archive/-/hexo-generator-archive-0.1.5.tgz", + "integrity": "sha512-jPbMtibqkJnAX3hCwhYhK3r6cqy9OKQsVEScjk7LDok+iPmFmkKCNdU/OccxGe1CWAZpT+ta4+LknwNeHG2G4w==", + "requires": { + "hexo-pagination": "0.0.2", + "object-assign": "2.1.1" + }, + "dependencies": { + "object-assign": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" + } + } + }, + "hexo-generator-category": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/hexo-generator-category/-/hexo-generator-category-0.1.3.tgz", + "integrity": "sha1-uealhiUwqDvdfaTIGcG58+TMtLI=", + "requires": { + "hexo-pagination": "0.0.2", + "object-assign": "2.1.1" + }, + "dependencies": { + "object-assign": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", + "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=" + } + } + }, + "hexo-generator-index": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/hexo-generator-index/-/hexo-generator-index-0.2.1.tgz", + "integrity": "sha1-kEIin8rHmq9wBXXaGTMr8/fuXF0=", + "requires": { + "hexo-pagination": "0.0.2", + "object-assign": "4.1.1" + } + }, + "hexo-generator-tag": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/hexo-generator-tag/-/hexo-generator-tag-0.2.0.tgz", + "integrity": "sha1-xXFYRrtB5X2cIMHWbX2yGhq/emI=", + "requires": { + "hexo-pagination": "0.0.2", + "object-assign": "4.1.1" + } + }, + "hexo-i18n": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/hexo-i18n/-/hexo-i18n-0.2.1.tgz", + "integrity": "sha1-hPFBQyvwnYtVjth4xygWS20c1t4=", + "requires": { + "sprintf-js": "1.0.3" + } + }, + "hexo-log": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/hexo-log/-/hexo-log-0.2.0.tgz", + "integrity": "sha512-fzoc+GQexxPPILTjoOQILnA3ZG2MFgqMBVel4xvJ11pXptw9+f97ynTgDAExXafyp9Nz2ChXRuqlCYgPtZSlxQ==", + "requires": { + "chalk": "1.1.3", + "hexo-bunyan": "1.0.0" + } + }, + "hexo-pagination": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/hexo-pagination/-/hexo-pagination-0.0.2.tgz", + "integrity": "sha1-jPRwx9sN5bGKOSanbesZQBXffys=", + "requires": { + "utils-merge": "1.0.1" + } + }, + "hexo-renderer-ejs": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/hexo-renderer-ejs/-/hexo-renderer-ejs-0.3.1.tgz", + "integrity": "sha512-XN8pYJU+Wr3dT8ipqEPRlOBySJpd1C5NUBBzgZpVSVBC/6L36O0YZI/Qd5NxQqwfGfSuKQ8N5iMyjmRXSR1MdA==", + "requires": { + "ejs": "2.5.9", + "object-assign": "4.1.1" + } + }, + "hexo-renderer-marked": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/hexo-renderer-marked/-/hexo-renderer-marked-0.3.2.tgz", + "integrity": "sha512-joSLeHB0YRkuViIPQlRz4A+zfJKPNHT+rABFgPHiT1zL9eeTUPxoLL4h7kcgOwRLAontVScaxP2Sie15mNitFg==", + "requires": { + "hexo-util": "0.6.3", + "marked": "0.3.19", + "object-assign": "4.1.1", + "strip-indent": "2.0.0" + } + }, + "hexo-renderer-stylus": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/hexo-renderer-stylus/-/hexo-renderer-stylus-0.3.3.tgz", + "integrity": "sha1-xU6ifh/Y48ipp6hM+6itNUEiyn8=", + "requires": { + "nib": "1.1.2", + "stylus": "0.54.5" + } + }, + "hexo-server": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/hexo-server/-/hexo-server-0.2.2.tgz", + "integrity": "sha512-/KkOYMIGylNoMtnlgas84Kw18A60WU3BVfo8ZnTHy8omCsAz2Z+aK6ddR4PpSmTdLeKDsiZj4ZSg86ZQ+FZzrA==", + "requires": { + "bluebird": "3.5.1", + "chalk": "1.1.3", + "compression": "1.7.2", + "connect": "3.6.6", + "mime": "1.6.0", + "morgan": "1.9.0", + "object-assign": "4.1.1", + "opn": "4.0.2", + "serve-static": "1.13.2" + } + }, + "hexo-util": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/hexo-util/-/hexo-util-0.6.3.tgz", + "integrity": "sha512-zPxaqCWZz3/25SAB4FlrRtWktJ+Pr+vBiv/nyHpXKgXPt1m70liViKlRwWLqDmRjJ72x6/k4qCEeXHajvcGHUw==", + "requires": { + "bluebird": "3.5.1", + "camel-case": "3.0.0", + "cross-spawn": "4.0.2", + "highlight.js": "9.12.0", + "html-entities": "1.2.1", + "striptags": "2.2.1" + } + }, + "highlight.js": { + "version": "9.12.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.12.0.tgz", + "integrity": "sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=" + }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, + "htmlparser2": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.9.2.tgz", + "integrity": "sha1-G9+HrMoPP55T+k/M6w9LTLsAszg=", + "requires": { + "domelementtype": "1.3.0", + "domhandler": "2.4.1", + "domutils": "1.5.1", + "entities": "1.1.1", + "inherits": "2.0.3", + "readable-stream": "2.3.6" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": "1.5.0" + }, + "dependencies": { + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + } + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "1.3.1" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + }, + "lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "lodash.merge": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", + "integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==" + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" + }, + "lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "requires": { + "js-tokens": "3.0.2" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" + }, + "lru-cache": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.2.tgz", + "integrity": "sha512-wgeVXhrDwAWnIF/yZARsFnMBtdFXOg1b8RIrhilp+0iDYN4mdQcNZElDZ0e4B64BhaxeQ5zN7PMyvu7we1kPeQ==", + "requires": { + "pseudomap": "1.0.2", + "yallist": "2.1.2" + } + }, + "markdown": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/markdown/-/markdown-0.5.0.tgz", + "integrity": "sha1-KCBbVlqK51kt4gdGPWY33BgnIrI=", + "requires": { + "nopt": "2.1.2" + } + }, + "marked": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==" + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + } + } + }, + "moment": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.1.tgz", + "integrity": "sha512-shJkRTSebXvsVqk56I+lkb2latjBs8I+pc2TzWc545y2iFnSjm7Wg0QMh+ZWcdSLQyGEau5jI8ocnmkyTgr9YQ==" + }, + "moment-timezone": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.16.tgz", + "integrity": "sha512-4d1l92plNNqnMkqI/7boWNVXJvwGL2WyByl1Hxp3h/ao3HZiAqaoQY+6KBkYdiN5QtNDpndq+58ozl8W4GVoNw==", + "requires": { + "moment": "2.22.1" + } + }, + "morgan": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.0.tgz", + "integrity": "sha1-0B+mxlhZt2/PMbPLU6OCGjEdgFE=", + "requires": { + "basic-auth": "2.0.0", + "debug": "2.6.9", + "depd": "1.1.2", + "on-finished": "2.3.0", + "on-headers": "1.0.1" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "mv": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", + "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", + "optional": true, + "requires": { + "mkdirp": "0.5.1", + "ncp": "2.0.0", + "rimraf": "2.4.5" + } + }, + "nan": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", + "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", + "optional": true + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "optional": true + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "nib": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/nib/-/nib-1.1.2.tgz", + "integrity": "sha1-amnt5AgblcDe+L4CSkyK4MLLtsc=", + "requires": { + "stylus": "0.54.5" + } + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "requires": { + "lower-case": "1.1.4" + } + }, + "node-fingerprint": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/node-fingerprint/-/node-fingerprint-0.0.2.tgz", + "integrity": "sha1-Mcur63GmeufdWn3AQuUcPHWGhQE=" + }, + "nopt": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-2.1.2.tgz", + "integrity": "sha1-bMzZd7gBMqB3MdbozljCyDA8+a8=", + "requires": { + "abbrev": "1.1.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "nth-check": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz", + "integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ=", + "requires": { + "boolbase": "1.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "nunjucks": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.1.2.tgz", + "integrity": "sha512-pJXncV07mmiuIDL9OqdNkcpvifuDMzMq9qBQT9SHasAS7AEwzNp/r/jHNl+9O0+zsldcdWG9ZtXo/nwu2cTqXA==", + "requires": { + "a-sync-waterfall": "1.0.0", + "asap": "2.0.6", + "chokidar": "1.7.0", + "postinstall-build": "5.0.1", + "yargs": "3.32.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "2.1.1", + "cliui": "3.2.0", + "decamelize": "1.2.0", + "os-locale": "1.4.0", + "string-width": "1.0.2", + "window-size": "0.1.4", + "y18n": "3.2.1" + } + } + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "opn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", + "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", + "requires": { + "object-assign": "4.1.1", + "pinkie-promise": "2.0.1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "0.0.10", + "wordwrap": "0.0.3" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "postinstall-build": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postinstall-build/-/postinstall-build-5.0.1.tgz", + "integrity": "sha1-uRepB5smF42aJK9aXNjLSpkdEbk=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "resolve": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "requires": { + "path-parse": "1.0.5" + } + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "requires": { + "align-text": "0.1.4" + } + }, + "rimraf": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", + "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", + "optional": true, + "requires": { + "glob": "6.0.4" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-json-stringify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.1.0.tgz", + "integrity": "sha512-EzBtUaFH9bHYPc69wqjp0efJI/DPNHdFbGE3uIMn4sVbO0zx8vZ8cG4WKxQfOpUOKsQyGBiT2mTqnCw+6nLswA==", + "optional": true + }, + "sax": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "1.1.2", + "destroy": "1.0.4", + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.3", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.4.0" + }, + "dependencies": { + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "1.0.2", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.16.2" + } + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "source-map": { + "version": "0.1.34", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.34.tgz", + "integrity": "sha1-p8/omux7FoLDsZjQrPtH19CQVms=", + "requires": { + "amdefine": "1.0.1" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=" + }, + "striptags": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/striptags/-/striptags-2.2.1.tgz", + "integrity": "sha1-TEULcI1BuL85zyTEn/I0/Gqr/TI=" + }, + "stylus": { + "version": "0.54.5", + "resolved": "https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz", + "integrity": "sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=", + "requires": { + "css-parse": "1.7.0", + "debug": "2.6.9", + "glob": "7.0.6", + "mkdirp": "0.5.1", + "sax": "0.5.8", + "source-map": "0.1.34" + }, + "dependencies": { + "glob": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", + "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "swig": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/swig/-/swig-1.4.2.tgz", + "integrity": "sha1-QIXKBFM2kQS11IPihBs5t64aq6U=", + "requires": { + "optimist": "0.6.1", + "uglify-js": "2.4.24" + } + }, + "swig-extras": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/swig-extras/-/swig-extras-0.0.1.tgz", + "integrity": "sha1-tQP+3jcqucJMasaMr2VrzvGHIyg=", + "requires": { + "markdown": "0.5.0" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tildify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", + "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", + "requires": { + "os-homedir": "1.0.2" + } + }, + "titlecase": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/titlecase/-/titlecase-1.1.2.tgz", + "integrity": "sha1-eBE9EQgIa4MmMxoyR96o9aSeqFM=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "uglify-js": { + "version": "2.4.24", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.4.24.tgz", + "integrity": "sha1-+tV1XB4Vd2WLsG/5q25UjJW+vW4=", + "requires": { + "async": "0.2.10", + "source-map": "0.1.34", + "uglify-to-browserify": "1.0.2", + "yargs": "3.5.4" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "warehouse": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/warehouse/-/warehouse-2.2.0.tgz", + "integrity": "sha1-XQnWSUKZK+Zn2PfIagnCuK6gQGI=", + "requires": { + "JSONStream": "1.3.2", + "bluebird": "3.5.1", + "cuid": "1.3.8", + "graceful-fs": "4.1.11", + "is-plain-object": "2.0.4", + "lodash": "4.17.10" + } + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "requires": { + "isexe": "2.0.0" + } + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.5.4.tgz", + "integrity": "sha1-2K/49mXpTDS9JZvevRv68N3TU2E=", + "requires": { + "camelcase": "1.2.1", + "decamelize": "1.2.0", + "window-size": "0.1.0", + "wordwrap": "0.0.2" + }, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..4c1c807 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "hexo-site", + "version": "0.0.0", + "private": true, + "hexo": { + "version": "3.7.1" + }, + "dependencies": { + "hexo": "^3.2.0", + "hexo-deployer-git": "^0.3.1", + "hexo-generator-archive": "^0.1.4", + "hexo-generator-category": "^0.1.3", + "hexo-generator-index": "^0.2.0", + "hexo-generator-tag": "^0.2.0", + "hexo-renderer-ejs": "^0.3.0", + "hexo-renderer-marked": "^0.3.0", + "hexo-renderer-stylus": "^0.3.1", + "hexo-server": "^0.2.0" + } +} diff --git a/scaffolds/draft.md b/scaffolds/draft.md new file mode 100644 index 0000000..498e95b --- /dev/null +++ b/scaffolds/draft.md @@ -0,0 +1,4 @@ +--- +title: {{ title }} +tags: +--- diff --git a/scaffolds/page.md b/scaffolds/page.md new file mode 100644 index 0000000..f01ba3c --- /dev/null +++ b/scaffolds/page.md @@ -0,0 +1,4 @@ +--- +title: {{ title }} +date: {{ date }} +--- diff --git a/scaffolds/post.md b/scaffolds/post.md new file mode 100644 index 0000000..1f9b9a4 --- /dev/null +++ b/scaffolds/post.md @@ -0,0 +1,5 @@ +--- +title: {{ title }} +date: {{ date }} +tags: +--- diff --git a/source/_posts/linux/1.1 linux常用命令与技巧(1).md b/source/_posts/linux/1.1 linux常用命令与技巧(1).md new file mode 100644 index 0000000..9e452a9 --- /dev/null +++ b/source/_posts/linux/1.1 linux常用命令与技巧(1).md @@ -0,0 +1,110 @@ +--- +title: 1.1 linux常用命令与技巧(1) +date: 2018-5-3 00:52:22 +tags: linux +categories: + - linux +--- + +### md5sum与sha1sum +用于使用hash算法生成文件的摘要信息 , 常用于文件完整性的校验 + +```bash +# 生成a.txt的md5摘要信息 +md5sum a.txt + +# 生成当前目录下所有文件的sha1摘要信息 +sha1sum ./* +``` + +### history +显示在终端中执行过的所有命令的历史记录 +(按↑方向键快速找到执行过的命令也是利用的这个记录) +如果使用`history -c`可以清空这个列表 + +### chown +这个命令是用来改变文件拥有者和所在的组 +``` +chown <用户名>:<组> <文件名> +``` +可以改变文件的所有权 + +### cal +就是calendar(日历) , 可以用来显示当前月份或者任意年份中的某一月 +``` +# 显示当前月份日历 +cal + +# 显示2018年2月的日历 +cal 2 2018 + +# 显示2018年全年日历 +cal -y 2018 +``` + +### cat +代表了连结 , 通常也可以用它输出单个文件的内容 +```bash +# 输出a.txt的内容(带行号) +cat -n a.txt + +# 将a.txt b.txt的内容连结输出 +cat a.txt b.txt +``` + +### 输出重定向 +对于程序的输出 , 我们通常不能一直看着终端 , 而且终端也只能保留最近的内容 +除了程序本身可以有对于日志的处理之外 +我们也可以将程序向终端的输出重定向到指定的文件里面 +使用`>`和`>>`可以实现重定向 +前者表示始终覆盖目标文件 , 后者表示如果目标文件存在则执行追加操作 , 不会覆盖 +```bash +# 执行java程序并将输出写入到当前目录的output.txt文件当中 +java -jar demo.jar > ./output.txt +``` +当然有些程序会在终端打印大量无意义的内容 +我们如果想把这些输出直接丢弃 +可以使用`/dev/null`作为目标位置 +这是个并不存在的虚拟位置 , 定向到这里相当于是把输出内容直接丢弃 , 避免占用磁盘空间 +```bash +command > /dev/null 2>&1 +# 1表示标准输出 2表示标准错误输出 +# 2>&1表示将标准错误输出重定向到标准输出, 这样两者都会被丢弃 +``` + +#### 与cat的配合使用 +cat既然表示连结 , 那么与输出重定向配合使用 , 就可以实现对于压缩分卷的结合了 +```bash +# 注意分卷的顺序 +cat data.z01 data.z02 data.zip > xdata.zip +# 将分卷结合成一个文件之后就可以执行解压了 +unzip xdata.zip +``` + +### grep +全称是Global Regular Expression Print, 全局正则表达式输出 +这个命令的作用是执行全文检索 +``` +# 在a.txt当中搜索str1字符串 +grep "str1" a.txt + +# 在当前目录下递归检索所有文件搜索str1字符串 +grep -r "str1" ./ +``` +当然不限于固定的字符串, 也可以使用正则表达式 + +#### 管道符"|" +格式 : 命令A|命令B +作用是将命令A的输出结果作为命令B的操作对象 +比如结合`grep`可以对繁杂的输出结果进行过滤 +```bash +# 查询当前运行的进程, 并过滤包含tomcat关键字的行 +ps ax | grep tomcat +``` +比如`wc -l`可以用来统计行数 +``` +# 统计当前目录下总共有多少文件 +ls -l | wc -l +``` +因为`ls -l`的输出是逐行输出当前目录下每个文件的详细信息 , 所以统计出的行数实际上就是文件数量了 + diff --git a/source/_posts/linux/2.0 shell编程(1)-初见.md b/source/_posts/linux/2.0 shell编程(1)-初见.md new file mode 100644 index 0000000..f1589c8 --- /dev/null +++ b/source/_posts/linux/2.0 shell编程(1)-初见.md @@ -0,0 +1,126 @@ +--- +title: 2.0 shell编程(1)-初见 +date: 2018-5-5 22:38:32 +tags: + - linux + - shell +categories: + - linux +--- + +`shell`俗称为**壳** , 是指提供使用者使用界面的软件 +也叫做命令解析器 +接收用户的命令 , 然后调用相应的应用程序 +(接收命令的方式可以是命令行 , 也可以是图形界面) + +在linux发展过程中 , 出现过很多的shell ++ `sh`(全称 Bourne Shell): 是UNIX最初使用的 shell,而且在每种 UNIX 上都可以使用。 +Bourne Shell 在 shell 编程方面相当优秀,但在处理与用户的交互方面做得不如其他几种 shell。 ++ `bash`(全称 Bourne Again Shell): LinuxOS 默认的,它是 Bourne Shell 的扩展。 +与 Bourne Shell 完全兼容,并且在 Bourne Shell 的基础上增加了很多特性。可以提供命令补全,命令编辑和命令历史等功能。它还包含了很多 C Shell 和 Korn Shell 中的优点,有灵活和强大的编辑接口,同时又很友好的用户界面。 ++ `csh`(全称 C Shell): 是一种比 Bourne Shell更适合的变种 Shell,它的语法与 C 语言很相似。 +Tcsh: 是 Linux 提供的 C Shell 的一个扩展版本。 +Tcsh 包括命令行编辑,可编程单词补全,拼写校正,历史命令替换,作业控制和类似 C 语言的语法,他不仅和 Bash Shell 提示符兼容,而且还提供比 Bash Shell 更多的提示符参数。 ++ `ksh` (全称 Korn Shell): 集合了 C Shell 和 Bourne Shell 的优点并且和 Bourne Shell 完全兼容。 ++ `pdksh`: 是 Linux 系统提供的 ksh 的扩展。 ++ `pdksh` 支持人物控制,可以在命令行上挂起,后台执行,唤醒或终止程序。 + +--- ++ **交互式shell** : 等待用户的命令 , 提交后就立即执行该命令 ++ **非交互式shell** : 不等待用户的输入 , 而是去读取写在文件中的命令代码 , 并且执行 , 这个文件就被称为shell脚本 + +> **脚本**其实就是短小的、用来让计算机自动化完成一系列工作的程序,这类程序可以用文本编辑器修改,不需要编译,通常是解释运行的。 + +### Hello World +test.sh +```bash +#!/bin/bash +echo "Hello World!" +``` +echo就是对传入的参数直接进行输出的程序 +这个脚本的作用就是执行该命令 +`#!`是一个约定的标记 , 它告诉系统这个脚本要用什么解释器来执行 + +之后需要给这个文件加上可执行权限 +`chmod +x test.sh` +然后就可以执行该脚本了 +`./test.sh` + +当然如果这样执行 , 是根据脚本内容中指定的解释器运行 +如果没有指定 , 则使用系统默认的 +我们也可以在运行时指定使用某个解释器 +比如`sh test.sh` + +### 变量 +命名规则是可以包含 字母 数字 下划线 , 且以字母或者数字开头 +使用变量则是在前面加`$`或者用`${}` +( 当然如果在字符串内部使用 , 为了防止歧义, 必须用${} ) +```bash +name="sookie" +echo $name +echo "my name is ${name}123" +# 大括号是为了帮助解释器识别变量名称的边界 + +#将该变量设为只读, 之后若再赋值就会报错 +readonly name +``` +**注意** : 等号的两端不能加空格 + +#### 删除变量 +使用`unset 变量名称`可以删除对应的变量 + +> 按照上面方式定义的变量实际上是这个shell脚本当中的**局部变量** +在操作系统当中可以设置**环境变量** , 所有的shell脚本当中都可以直接使用 + +### 字符串 +字符串的边界可以是单引号也可以是双引号 也可以无引号 , 但是实际应用当中有一些区别 ++ `单引号`当中的内容都会原样输出 , 不可以使用转义字符 , 不可以使用字符串模板 ++ `双引号`当中的内容可以使用转义字符 , 也可以使用字符串模板 ++ `无引号`不可以使用转义字符 , 但是可以使用字符串模板 +```bash +name="sookie" +echo 'my name is ${name}1' +# output: my name is ${name}1 +echo "my name is ${name}1" +# output: my name is sookie1 +echo my name is ${name}1 +# output: my name is sookie1 +``` +#### 字符串操作 +shell当中字符串的拼接不需要用加号 +直接写在一起即可 +```bash +name="sookie" +echo 'my name is '${name} + +#获取字符串长度 +echo ${#name} + +#截取子串 +echo ${name:1:3} #输出 ook + +#将字符串内容当做命令执行 +echo `ls /usr/local` +``` + +### 数组 +同大多数解释型语言一样 , 对于数组并没有严格的越界限制 +```bash +#数组定义, 元素之间用空白分割 +arr=(1 "aa" 2.6) + +#超出当前数组边界的下标形式赋值, 会将元素追加至末尾 +arr[6]="bb" #当前数组当中有4个元素 + +#获取数组长度 +echo ${#arr[@]} + +#遍历数组 +for item in ${arr[@]} +do + echo ${item} +done + +#删除数组元素 +unset arr[1] +``` \ No newline at end of file diff --git a/source/_posts/linux/2.1 shell编程(2)-从入门到重新入门.md b/source/_posts/linux/2.1 shell编程(2)-从入门到重新入门.md new file mode 100644 index 0000000..3af5d96 --- /dev/null +++ b/source/_posts/linux/2.1 shell编程(2)-从入门到重新入门.md @@ -0,0 +1,219 @@ +--- +title: 2.1 shell编程(2)-从入门到重新入门 +date: 2018-5-5 00:52:22 +tags: + - linux + - shell +categories: + - linux +--- + +### 传参 +在外部执行时可以给脚本传参 +在脚本当中获取时 , `$0`是执行的文件路径 +`$1`代表第一个参数 , `$2`代表第二个参数 , 以此类推 + +```bash +echo "当前文件:$0" +echo "第一个参数:$1" +#参数个数 +echo "共传入$#个参数" + +#遍历所有的参数 +for arg in $@ +do + echo $arg +done + +#脚本运行进程的ID +echo "PID:$$" +``` +执行脚本 +```bash +./test.sh aa bb + +#如果参数内容包含空白, 要加引号才能作为一个参数传递 +./test.sh aa "bb cc" +``` +#### 变量的判断 +对于shell脚本来说 , 传参通常是比较灵活的 +所以经常需要判断是否传入了这个参数 +```bash +if [ -n "$1" ] +then + echo "包含第一个参数" +else + echo "未包含第一个参数" +fi +``` +这是判断某个变量是否有值的方式 +因为解释型语言的语法比较松散 , 对于变量先定义后使用没有严格要求 +所以直接使用一个变量而不进行检查可能造成灾难性的后果 + +### 运算 +原生bash对数学运算的支持比较有限 +##### 方法1 `$((expression))` +```bash +num1=3 +num2=4 +echo $((num1+num2)) +echo $((num1**num2)) #乘方 +``` +变量的引用加不加$都可以 , 不能计算浮点数 +##### 方法2 `$[expression]` +```bash +num1=3 +num2=4 +echo $[num1+num2] +``` +变量的引用加不加$都可以 , 不能计算浮点数 +##### 方法3 `let`关键字 +```bash +num1=3 +num2=4 +let sum=$num1+$num2 +echo $sum +``` +变量的引用加不加$都可以 , 不能计算浮点数 , 加号两端不能有空格 + +##### 方法4 使用`expr` +这是一个内建的用于数学运算的命令 +需要注意的是运算符两边必须要有空格 +```bash +expr 2 + 6 +expr 4 - 9 +#注意为了防止歧义 乘法要写 \* 而不能直接写 * +expr 5 \* 4 +#除法保留整数 +expr 9 / 2 +#取余 +expr 9 % 2 + +#浮点数计算 +expr "3.9 + 1.8"|bc +#scale表示保留到的小数位数 +expr "scale=3;1.2 * 8.73"|bc +``` + +#### 关系运算 +bash当中原生支持关系运算 + +比较是否相等 +```bash +if [ $a == $b ] +then + echo "相等" +fi + +if [ $a != $b ] +then + echo "不相等" +fi +``` + +|运算符|含义|其他表示方式|备注| +|-----|---|---------| +|-eq|是否相等|==| +|-ne|是否不相等|!=| +|-gt|大于|>| +|-lt|小于|<| +|-ge|大于等于|\>=|使用\>=需要使用(( ))| +|-le|小于等于|<=|使用<=需要使用(( ))| +```bash +if [ $a -ge $b ] +then + echo "大于等于" +fi +# 等价于上面的写法, 注意用(( )) +if (( $a >= $b )) +then + echo "大于等于" +fi +``` +> 关系运算符只能用于整数 , 或者能够解析为整数的字符串 + +#### 布尔运算 +|运算符|含义|其他表示方式| +|-----|----|---------| +|!|非|| +|-o|或|\|\|| +|-a|与|&&| +```bash +# a小于10 并且 b大于20 +if [ $a -lt 10 -a $b -gt 20 ] +then + echo "yes" +else + echo "no" +fi +# 与上面的含义相同, 但是注意使用[[ ]] +if [[ $a -lt 10 && $b -gt 20 ]] +then + echo "yes" +else + echo "no" +fi +``` +> **说明** +> 推荐使用 `[[ ... ]]` 条件判断结构,而不是 `[ ... ]`,能够防止脚本中的许多逻辑错误。比如,&&、|| 操作符能够正常存在于 [[ ]] 条件判断结构中,但是如果出现在 [ ] 结构中的话,会报错。 + +#### 字符串运算 +|运算符|含义| +|----|-----| +|=|两个字符串是否相同(区别于数字的比较)| +|!=|两个字符串是否不相同| +|-z|字符串长度为0返回true| +|-n|字符串长度不为0返回true| +```bash +a="123" +b="456" +if [ $a = $b ] +then + echo "相同" +else + echo "不同" +fi +# 字符串本身也可以用作判断条件 +if [ ! $a ] +then + echo "字符串为空" +fi +``` +使用`-n`和`-z`的时候需要注意 , 需要在字符串变量引用上加双引号 +```bash +if [ -n "$a"] +then + echo "OK" +fi +``` +如果不加双引号 , 当a为空的时候 , 相当于执行 +`if [ -n ]` , 这个时候会把里面的**-n**当做一个普通字符串来处理 , 而不是运算符 +自然每次都会是true , **-z** 同理 +### 文件测试运算符 +一个字符串也可以表示一个文件(目录)的路径 +使用这些方式可以获得这个文件的各种信息 +|运算符|含义| +|------|----| +|-b file |检测文件是否是块设备文件,如果是,则返回 true| +|-c file |检测文件是否是字符设备文件,如果是,则返回 true| +|-d file |检测文件是否是目录,如果是,则返回 true| +|-f file |检测文件是否是普通文件(既不是目录,也不是设备文件),如果是,则返回 true| +|-g file |检测文件是否设置了 SGID 位,如果是,则返回 true| +|-k file |检测文件是否设置了粘着位(Sticky Bit),如果是,则返回 true| +|-p file |检测文件是否是有名管道,如果是,则返回 true| +|-u file |检测文件是否设置了 SUID 位,如果是,则返回 true| +|-r file |检测文件是否可读,如果是,则返回 true| +|-w file |检测文件是否可写,如果是,则返回 true| +|-x file |检测文件是否可执行,如果是,则返回 true| +|-s file |检测文件是否为空(文件大小是否大于0),不为空返回 true| +|-e file |检测文件(包括目录)是否存在,如果是,则返回 true| + +```bash +filepath=/usr/local/test.txt +if [ -e filepath ] +then + echo "文件存在" +else + echo "文件不存在" +fi +``` \ No newline at end of file diff --git a/source/_posts/linux/2.2 shell编程(3)-流程控制&函数.md b/source/_posts/linux/2.2 shell编程(3)-流程控制&函数.md new file mode 100644 index 0000000..b02e952 --- /dev/null +++ b/source/_posts/linux/2.2 shell编程(3)-流程控制&函数.md @@ -0,0 +1,162 @@ +--- +title: shell编程(3)-流程控制&函数 +date: 2018-5-6 00:52:22 +tags: + - linux + - shell +categories: + - linux +--- + +### 判断 +```bash +if condition1 +then + command1 +elif condition2 +then + command2 +else + command3 +fi +``` +如果else没有语句执行 +则不能留空 , 最好直接不写这个else + +举例 +```bash +if [ `ps ax | grep -c "ssh"` -ge 1 ] +then + echo "RUNNING" +fi +# grep的-c参数代表对过滤后的行进行计数 + +# 也可以使用test命令做判断 +if test `ps ax | grep -c "ssh"` -ge 1 +then + echo "RUNNING" +fi +``` + +### 循环 +#### for循环 +```bash +for ((i=1 ; i<=10 ; i++)) +do + echo $i +done +# 注意使用(()), 里面的变量并不需要加$ +``` +`for (( ; ; ))` - 死循环 + +##### foreach +bash支持对集合进行迭代的foreach类型语法 +使用`for ... in ...` +```bash +# seq命令可以生成一个序列 +for i in `seq 1 10` +do + echo $i +done + +# 这样也是一个序列 +for i in {1..10} +do + echo $i +done + +# 迭代遍历一个数组 +arr=("ab" "cd" "ef") +for item in ${arr[@]} +do + echo $item +done +``` +如果一个命令返回的是一个集合 , 也可以执行循环迭代 +```bash +for item in `ls /usr/local` +do + echo $item +done +``` +当然如果是找一个目录下的文件 , 也可以不用ls命令 +for循环自带路径查找功能 +```bash +for item in /usr/local/* +do + echo $item +done +# 注意路径不要加引号 +``` + +#### while循环 +while循环是在判断条件为false的时候结束循环 +```bash +cnt=1 +while (( $cnt<=5 )) +do + echo $cnt + let "cnt++" +done +``` +`while :`或者`while true`表示死循环 +#### until循环 +格式与while循环基本一致 , 只不过是当判断条件为true的时候结束循环 +```bash +cnt=1 +until (( $cnt>=5 )) +do + echo $cnt + let "cnt++" +done +``` + +#### break与continue +表示跳出循环以及继续下一次循环 , 与其他语言当中类似 + +### 多选择语句 +类似其他语言当中的switch , bash当中使用case关键字 +```bash +echo "input a number:" +# read表示从终端读取用户输入内容 +read num +case $num in + 1) echo "数字1" + ;; + 2) echo "数字2" + ;; + 3|4) echo "3或者4" + ;; + ok) echo "字符串ok" + ;; + *) echo "其他内容" + ;; +esac +``` + +### 函数 +shell当中可以自定义函数 +```bash +function myFunc() { + echo "参数 $1,$2,$3" + echo "所有参数:" + for arg in $@ + do + echo $arg + done +} +myFunc "aa" "bb" +``` +> **说明** : +1. 与获取脚本的参数类似 , 使用`$序号`或者`${序号}`来获取 +但是如果到了10 , 就必须写作`${10}` , 否则会与$1产生歧义 +2. `function` 关键字也可以省略 + +### 文件包含 +一个shell脚本当中可以引入另一个shell脚本 +```bash +. /home/sookie/test2.sh +# 或者 +source /home/sookie/test2.sh +``` +被引入的文件并不需要可执行权限 \ No newline at end of file diff --git a/source/_posts/linux/2.4 shell(4)-使用技巧.md b/source/_posts/linux/2.4 shell(4)-使用技巧.md new file mode 100644 index 0000000..c420609 --- /dev/null +++ b/source/_posts/linux/2.4 shell(4)-使用技巧.md @@ -0,0 +1,29 @@ +--- +title: shell(4)-使用技巧 +date: 2018-5-6 00:52:25 +tags: + - linux + - shell +categories: + - linux +--- + +#### 判断上一条命令执行是否成功 +`$?`变量的值是上一条命令执行的返回值 +通过判断这个变量的值 , 可以知道上一条命令是否执行成功 +```bash +if [ $? -eq 0 ];then + echo "执行成功" +else + echo "执行失败" +fi +``` + + +#### 逐行读取文件 +```bash +while read LINE +do + echo $LINE +done < test.txt +``` \ No newline at end of file diff --git a/source/_posts/linux/3.1 Docker(1)-初见.md b/source/_posts/linux/3.1 Docker(1)-初见.md new file mode 100644 index 0000000..73d9396 --- /dev/null +++ b/source/_posts/linux/3.1 Docker(1)-初见.md @@ -0,0 +1,247 @@ +--- +title: 3.1 Docker(1)-初见 +date: 2018-5-8 22:38:32 +tags: + - linux + - docker +categories: + - linux +--- + +**程序部署运维的痛点** +当今软件越发庞大复杂 , 在服务器部署运行一个软件之前通常需要完成: +1. 操作系统的设置 +2. 各种库和组件的安装 + +只有他们都正确 , 软件才能正常运行 +当需要迁移的时候 , 这些事情都要重来一遍 +并且由于各种原因 , 还可能会产生不一样的问题 , 费时费力 + +于是就有了独立运行容器的需求 , 从根本上解决这个问题 +让软件带环境安装 +给软件一个独立的环境去运行 , 并且这个软件所有的依赖都在这个环境里面 + + +**虚拟机** +虚拟机是一种针对上述问题的解决方案 , 在一个操作系统里面构造一个虚拟环境运行另一个操作系统 +但是通常会有以下缺陷 +1. 资源占用多 +虚拟机会独占一部分内存和硬盘空间。它运行的时候,其他程序就不能使用这些资源了。哪怕虚拟机里面的应用程序,真正使用的内存只有 1MB,虚拟机依然需要几百 MB 的内存才能运行。 + +2. 冗余步骤多 +虚拟机是完整的操作系统,一些系统级别的操作步骤,往往无法跳过,比如用户登录。 + +3. 启动慢 +启动操作系统需要多久,启动虚拟机就需要多久。可能要等几分钟,应用程序才能真正运行。 + +**Docker** +由于虚拟机存在这些缺点,Linux 发展出了另一种虚拟化技术:Linux 容器 +Linux 容器不是模拟一个完整的操作系统,而是对进程进行隔离。或者说,在正常进程的外面套了一个保护层。对于容器里面的进程来说,它接触到的各种资源都是虚拟的,从而实现与底层系统的隔离。 + +Docker 属于 Linux 容器的一种封装,提供简单易用的容器使用接口。 + +Docker 将应用程序与该程序的依赖,打包在一个文件里面。运行这个文件,就会生成一个虚拟容器。程序在这个虚拟容器里运行 + +ubuntu系统直接使用apt安装即可 +```bash +apt install docker.io +``` + +### 镜像(image) +docker把程序及其依赖 , 打包在image文件里面 , 称之为镜像文件 +它可以看做是生成容器的模板 , 一个镜像文件可以生成多个运行容器实例 +使用`docker image COMMAND`可以实现对镜像的相关操作 + +```bash +# 查看本机所有的镜像 +docker image ls + +# 删除指定镜像 +docker image rm [ImageId] +``` +![查看所有镜像](/images/linux/查看所有镜像.png) +每个镜像都有一个唯一ID , 是一串hash码 +我们可以根据这个ID来对指定的镜像进行操作 +当然也不需要必须写完整 , 只要能找到一个唯一的镜像就可以了 +比如执行`docker image rm 56a`就可以删除掉express-demo这个镜像了 +当然使用`docker image rm express-demo`也是可以的 +> docker中的操作大都是这种模式 + +### 容器(container) +容器就是程序运行的独立虚拟环境了 , 容器由镜像生成 +( 镜像可以认为是一种存储的结构 , 而容器才是实际运行的实例 ) +```bash +# 查看运行中的容器 +docker container ls + +# 运行指定的镜像 +docker container run [ImageId] + +# 运行指定的容器 +docker container start [ContainerId] + +# 停止指定的镜像 +docker container stop [ContainerId] + +# 强行终止指定的镜像 +docker container kill [ContainerId] +``` +使用`run`每次都会生成一个新的容器文件 , 如果要复用指定的容器 , 可以使用`start` + + + +### Hello World +这是一个官方提供的最简单的镜像 , 可以用来熟悉docker的基本用法 +```bash +# 从官方仓库拉取镜像 +docker image pull hello-world + +# 运行这个image +docker container run hello-world +``` +> `docker container run`命令具有自动抓取 image 文件的功能。如果发现本地没有指定的 image 文件,就会从仓库自动抓取。因此,前面的`docker image pull`命令并不是必需的步骤 + +这个镜像当中的程序就是在控制台输出一段内容 , 是docker的一些基本介绍 + +> image文件生成的容器实例, 本身也是一个文件 +默认情况下即使容器停止运行 , 这个文件也还是在的 , 不会被删除 +可以使用`docker container ls -all`来查看所有容器文件 +使用`docker container rm [ContainerId]`来删除指定的容器文件 + +### 尝试制作自己的image并运行 +这里用一个简单的nodejs项目作为例子 , 尝试制作一个自己的image +```bash +mkdir express-demo +cd express-demo +npm init +npm install express --save +``` +index.js +```javascript +const express = require("express") + +var port = 7001 +const app = express() + +app.get("/", function(req, res){ + res.send("

Hello World

"); +}) + +const server = app.listen(port, function(){ + var port = server.address().port; + console.log("在%s端口执行监听", port) +}) +``` + +#### 编写Dockerfile +在此之前 , 我们也可以在项目目录里面加一个`.dockerignore` +这个文件表示打包image的时候需要排除在外的内容( 很类似.gitignore ) +比如 +``` +.git +node_modules +``` +创建Dockerfile文件 +``` +FROM node:9.11 +COPY . /app +WORKDIR /app +RUN npm install +EXPOSE 7001 +``` ++ `FORM node:9.11` 继承自官方的node镜像 , 冒号后面是标签(通常是版本号) ++ `COPY . /app` 将当前目录下的所有文件(除了.dockerignore排除的)都拷贝到image文件的app目录下 ++ `WORKDIR /app` 工作路径为/app ++ `RUN npm install` 在打包image的时候需要执行的 ( 所以这个nodejs项目的依赖包会被打包进image当中 ) ++ `EXPOSE 7001` 运行时暴露出的端口号 + +#### 打包与运行 +打包image +```bash +docker image build -t express-demo:1.0 . +# -t参数是指定该image的名字 , 冒号后面是标签(默认是latest) +# . 表示打包当前目录下的文件 +``` +运行 +``` +docker container run --rm -p 8000:7001 -it express-demo:1.0 /bin/bash +``` ++ `--rm` 容器停止运行时自动删除容器文件 ++ `-p` 表示端口映射 , 这里是将容器的7001端口映射到本地的8000端口 ++ `-it` 容器的 Shell 映射到当前的 Shell,然后你在本机窗口输入的命令,就会传入容器 ++ **express-demo:1.0** image的名称和标签(当然直接用image的id也可以) ++ **/bin/bash** 容器启动后第一个执行的命令 , 这里启动bash , 保证可以使用shell + +执行之后会进入到命令提示符`root@2604657cb46c:/app#` +在这里我们就可以执行**node index.js**来运行程序了 + +运行之后在外部当然是要通过8000端口来访问 + +#### 自动化运行 +上面的方式在启动容器之后还要手动运行程序 , 还是显得有些繁琐了 +我们可以在Dockerfile里面加一个CMD的选项 +``` +FROM node:9.11 +COPY . /app +WORKDIR /app +RUN npm install +EXPOSE 7001 +CMD node index.js +``` +区别于RUN , CMD是在容器启动的时候执行的 , 而RUN是在打包image的时候执行的 + +> 当然 , 有了这个入口 , 就可以自由发挥了 +比如程序启动比较繁琐 , 完全可以在image里面编写一个shell脚本 +然后容器启动的时候运行这个脚本即可 + + +#### 其他常用命令 +查看指定容器的输出 , 即容器里面Shell的标准输出 +```bash +docker container logs [ContainerId] +``` + +进入一个正在运行的容器 +```bash +docker container exec -it [ContainerID] /bin/bash +``` +之后就可以在容器的shell当中执行命令了 + +有时候我们需要把容器当中运行产生的文件拷贝出来 +可以使用 +``` +docker container cp [ContainerId]:[/app/run.log] /home/sookie +``` +上面的命令表示将指定容器的/app/run.log文件拷贝到本地的/home/sookie目录下 + +#### 使用国内镜像仓库 +出于众所周知的原因 , 官方仓库的速度比较慢 +所以可以把官方镜像的下载地址改为国内的镜像仓库 + + +Docker 官方中国区 +https://registry.docker-cn.com +网易 +http://hub-mirror.c.163.com +ustc +https://docker.mirrors.ustc.edu.cn + +##### 方法1 registry-mirror参数 +直接设置 –registry-mirror 参数,仅对当前的命令有效 +```bash +docker run hello-world --registry-mirror=https://docker.mirrors.ustc.edu.cn +``` + +##### 方法2 修改/etc/default/docker +加入 DOCKER_OPTS=”镜像地址”,可以有多个 +``` +DOCKER_OPTS="--registry-mirror=https://docker.mirrors.ustc.edu.cn" +``` + +##### 方法3 修改/etc/docker/daemon.json +```json +{ +"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"] +} +``` +> 新版的docker比较推荐方法3 \ No newline at end of file diff --git a/source/_posts/linux/3.2 Docker(2)-使用技巧.md b/source/_posts/linux/3.2 Docker(2)-使用技巧.md new file mode 100644 index 0000000..ba48f04 --- /dev/null +++ b/source/_posts/linux/3.2 Docker(2)-使用技巧.md @@ -0,0 +1,42 @@ +--- +title: 3.2 Docler(2)-使用技巧 +date: 2018-5-9 22:38:32 +tags: + - linux + - docker +categories: + - linux +--- + +### 与宿主机共享网络 +默认情况下 , 在宿主机可以根据容器暴露出的端口来访问容器中启动的服务 +但是由于容器的隔离 , 在容器内部是无法访问宿主机的服务的 +如果有这种需要 , 可以在启动容器的时候添加参数`--net=host` + +作用就是使容器和宿主机共用网络 + +### 镜像的备份与恢复 +docker的一个重要目标就是方便实现迁移 +对于一个镜像 , 也可以打包出来作为备份 , 或者迁移到其他机器上 + +对于镜像的导出与导入操作 , 使用的是`save`和`load` +```bash +# 备份 +docker save -o dump.tar [ImageId] + +# 恢复 +docker load < dump.tar +``` +> 继承的镜像也会一同打包进去 +再次导入之后 , 该镜像就不再作为一个子镜像存在了 +比如该镜像继承jre镜像 , 那么打包之后的tar包当中直接包含jre镜像的内容 + +### 容器的导出与导入 +要将一个容器进行导出与导入 , 使用的是`export`和`import` +```bash +# 导出容器 +docker export [ContainerId] > demo.tar + +# 导入容器 +docker import demo.tar [ImageName][:Tag] +``` \ No newline at end of file diff --git a/source/_posts/linux/3.3 Docker(3)-WordPress部署实践.md b/source/_posts/linux/3.3 Docker(3)-WordPress部署实践.md new file mode 100644 index 0000000..921cce0 --- /dev/null +++ b/source/_posts/linux/3.3 Docker(3)-WordPress部署实践.md @@ -0,0 +1,127 @@ +--- +title: 3.3 Docker(3)-部署wordpress实践 +date: 2018-5-10 22:38:32 +tags: + - linux + - docker +categories: + - linux +--- +站在 Docker 的角度,软件就是容器的组合:业务逻辑容器、数据库容器、储存容器、队列容器......Docker 使得软件可以拆分成若干个标准化容器,然后像搭积木一样组合起来。 + +这正是微服务(microservices)的思想:软件把任务外包出去,让各种外部服务完成这些任务,软件本身只是底层服务的调度中心和组装层。 + +![微服务](/images/linux/20180505231057.png) + +微服务很适合用 Docker 容器实现,每个容器承载一个服务。一台计算机同时运行多个容器,从而就能很轻松地模拟出复杂的微服务架构。 + +![应用解耦](/images/linux/20180505231120.png) + + +现在尝试实践搭建一个wordpress的服务 +这是一个php编写的博客系统 + +运行需要依赖的环境有 : mysql php apache +当然也包括php的扩展包mysqli , 用于实现mysql数据库的连接 + +### 自建wordpress容器 + +#### 尝试启动一个php-apache容器 +创建应用目录 php-demo , 然后进入该目录执行 +```bash +docker container run \ +-d \ +--rm \ +--name wordpress \ +--volume "$PWD/":/var/www/html \ +php:7.2-apache +``` +> linux当中 , 命令末尾的`\`代表换行继续输入命令 , 而不立即执行 + ++ `-d` : 容器在后台运行 , 输出内容不会打印到终端(可以用docker logs [ContainerId]查看) ++ `--rm` : 容器运行停止后 , 自动删除容器文件 ++ `--name` : 指定容器的名字 ++ `--volume` : 指定目录映射 , 这里表示把当前目录映射到容器内的/var/www/html目录 +这个目录是apache服务器对外访问的默认目录 +这样我们就可以直接在当前目录中添加php页面文件进行访问 + +成功从远程仓库下载**php:7.2-apache**镜像并启动容器之后 +会提示容器对外访问的IP地址 , 比如**172.17.0.2** , 可以直接访问这个地址 + +但是此时还没有在访问目录中添加php页面 +可以写个测试页面index.php +```php + +``` +此时再访问就可以看到php信息了 + +#### 安装wordpress +删掉index.php +官网下载wordpress安装包 , 直接解压到该目录下 +然后访问就可以看到wordpress的初始化页面了 +![wordpress_init](/images/linux/wordpress_init.png) +但是目前还没有mysql的容器 + +#### 运行mysql容器 +```bash +docker container run \ +-d \ +--rm \ +--name wordpressdb \ +--env MYSQL_ROOT_PASSWORD=123456 \ +--env MYSQL_DATABASE=wordpress \ +mysql:5.7 +``` +`env`代表向容器中传入的环境变量 , 容器中的mysql会根据环境变量创建数据库以及设置root用户的密码 + +#### 添加mysqli扩展 +PHP 的官方 image 不带有 mysqli 扩展,必须自己新建一个image + +新建`Dockerfile`文件 +``` +FROM php:7.2-apache +RUN docker-php-ext-install mysqli +CMD apache2-foreground +``` +打包镜像时安装mysqli的扩展 , 运行容器时启动apache +之后构建image +```bash +docker build -t php-with-mysql . +``` + +#### 运行php-with-mysql +```bash +docker container run \ +-d \ +--rm \ +--volume "$PWD/":/var/www/html \ +--link wordpressdb:mysqlhost \ +php-with-mysql +``` +link是实现容器之间通信的一种机制 , 表示该容器要链接到**wordpressdb**容器 , 冒号表示该容器主机的名称是**mysqlhost** +(之后配置数据库连接时 , 主机名称不是localhost , 而是**mysqlhost**) + +由于wordpress在运行时需要写入配置文件( 也包括自身版本的更新 ) +我们可以给当前目录添加写权限 +```bash +chmod -R 777 ./ +``` + +之后再访问172.17.0.2 , 填写数据库配置信息即可完成 + +### 使用wordpress官方镜像 +首先仍然是要启动mysql的容器 , 参考上面的**运行mysql容器** +然后使用wordpress的官方镜像构建容器 +```bash +docker container run \ +-d \ +--rm \ +--name wordpress \ +--env WORDPRESS_DB_PASSWORD=123456 \ +--link wordpressdb:mysqlhost \ +wordpress +``` +环境变量`WORDPRESS_DB_PASSWORD`是 MySQL 容器的根密码 +运行之后的访问和初始化操作和前一种方式相同 \ No newline at end of file diff --git a/source/about/index.md b/source/about/index.md new file mode 100644 index 0000000..5a2b024 --- /dev/null +++ b/source/about/index.md @@ -0,0 +1 @@ +个人介绍页面 \ No newline at end of file diff --git a/source/images/linux/20180505231057.png b/source/images/linux/20180505231057.png new file mode 100644 index 0000000..071e90e Binary files /dev/null and b/source/images/linux/20180505231057.png differ diff --git a/source/images/linux/20180505231120.png b/source/images/linux/20180505231120.png new file mode 100644 index 0000000..eb85d3d Binary files /dev/null and b/source/images/linux/20180505231120.png differ diff --git a/source/images/linux/wordpress_init.png b/source/images/linux/wordpress_init.png new file mode 100644 index 0000000..1713db4 Binary files /dev/null and b/source/images/linux/wordpress_init.png differ diff --git a/source/images/linux/查看所有镜像.png b/source/images/linux/查看所有镜像.png new file mode 100644 index 0000000..7fd5e45 Binary files /dev/null and b/source/images/linux/查看所有镜像.png differ diff --git a/themes/hexo-theme-xups/.gitignore b/themes/hexo-theme-xups/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/themes/hexo-theme-xups/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/themes/hexo-theme-xups/README.md b/themes/hexo-theme-xups/README.md new file mode 100644 index 0000000..ba630ac --- /dev/null +++ b/themes/hexo-theme-xups/README.md @@ -0,0 +1,148 @@ +# Xups 主题安装及 Hexo 使用教程 +![预览](./xups.png) + +## 主题的一些特性 + +1. 扁平。思路源于大前端 WordPress 主题。 +2. 自带博客评论系统。博客主题自带评论系统,基于 github issues 实现,了解更多请点击[基于 github issues实现的评论框](http://jelon.top/posts/xups-comment-box/)。 + +## 使用指引 + +1. 安装hexo + + ``` + npm i hexo-cli -g + hexo init blog + cd blog + npm install + ``` + +2. 将主题拉到本地,并解压 + + ``` + cd themes + git clone https://github.com/jangdelong/hexo-theme-xups.git + ``` + +3. 配置 _config.yml 的 theme 配置 + + ``` + theme: hexo-theme-xups + ``` + +4. 运行 `hexo s --watch` + + ``` + cd .. + hexo generate # 或者 hexo g + hexo s --watch + ``` + + 运行上述命令后,浏览器打开 [http://localhost:4000](http://localhost:4000) 即可本地访问我们的网站 + +## 创建文章 + +有两种方法创建文章,可任选其一: + +> 注意:文件名不要出现中文!!! + +1. 使用`hexo new` 命令 + + ``` bash + $ hexo new "My New Post" + ``` + +2. 拷贝现有的文章进行修改 + + hexo使用markdown来编辑文章,在source目录下,拷贝任意md文件进行创建新的文章。具体可参考下hexo的官方说明 + +## 文章规范 + +1. 使用markdown写博文 +2. 建议图片进行单独 cdn 存储 +3. 标准配图 + - xups主题现默认有0-9共10张博客配图 + - 博客封面配图:200x140,命名:xxx_thumbnail +4. 指明文章的标题、作者信息、封面图片地址、博客摘要 + + ``` + --- + title: {{ title }} + date: {{ date }} + author: + tags: + categories: + - Web技术 + - 生活琐事 + thumbnail: + blogexcerpt: + + --- + + ``` + > 另外, 如果您需保留原主题的关于页(about)、留言页面(comment)、实验室页(lab)的话, 请将 __source/ 目录下的 about/、comment/、lab/ 三个目录及里面的页面放到您的 Hexo 程序的 source 目录下(注意不是theme主题下的目录);将 __scaffolds 目录下的 draft.md、page.md、post.md 放到 Hexo 程序的 scaffolds 目录(注意不是theme主题下的目录)。 + + +5. 利用` `或者`post.blogexcerpt`设置文章的摘要 + + 示例: + + ``` + + --- + title: 文章标题 + blogexcerpt: 这里是自定义文章摘要 + ... + --- + + 这里是文章正文内容 + ... + + ``` + + 这部分是文章摘要,这部分是文章摘要。在hexo模版里可通过 `<%- post.blogexcerpt || post.excerpt || post.content %>` 来引用。 + - post.blogexcerpt:自定义摘要 + - post.excerpt:通过``分隔符来获取的文章摘要 + - post.content:如不设置摘要情况,则直接输出文章全部内容 + +## 评论系统 + +1. 创建 Github Application +2. 创建仓库 +3. 主题 _config.yml 配置 + + ```python + #---------------------------- + # 是否开启评论 + #---------------------------- + comment: + enable: false # 是否开启配置 + owner: jangdelong # 你的 github 账户名 + repo: blog_comments # github repository + client_id: xxxxxxxxxx # github application client id + client_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # github application secret + ``` +4. 评论框使用 + + ```html +
+
+ + ``` + +## 其他 + +- [Jelon前端小站](http://jelon.top) + +## LICENCE + +The MIT License (MIT) diff --git a/themes/hexo-theme-xups/__scaffolds/draft.md b/themes/hexo-theme-xups/__scaffolds/draft.md new file mode 100644 index 0000000..e9c99df --- /dev/null +++ b/themes/hexo-theme-xups/__scaffolds/draft.md @@ -0,0 +1,10 @@ +--- +title: {{ title }} +author: +tags: +categories: + - Web技术 + - 生活琐事 +thumbnail: +blogexcerpt: +--- diff --git a/themes/hexo-theme-xups/__scaffolds/page.md b/themes/hexo-theme-xups/__scaffolds/page.md new file mode 100644 index 0000000..f01ba3c --- /dev/null +++ b/themes/hexo-theme-xups/__scaffolds/page.md @@ -0,0 +1,4 @@ +--- +title: {{ title }} +date: {{ date }} +--- diff --git a/themes/hexo-theme-xups/__scaffolds/post.md b/themes/hexo-theme-xups/__scaffolds/post.md new file mode 100644 index 0000000..e9c99df --- /dev/null +++ b/themes/hexo-theme-xups/__scaffolds/post.md @@ -0,0 +1,10 @@ +--- +title: {{ title }} +author: +tags: +categories: + - Web技术 + - 生活琐事 +thumbnail: +blogexcerpt: +--- diff --git a/themes/hexo-theme-xups/__source/about/index.md b/themes/hexo-theme-xups/__source/about/index.md new file mode 100644 index 0000000..c92f5ac --- /dev/null +++ b/themes/hexo-theme-xups/__source/about/index.md @@ -0,0 +1,5 @@ +--- +title: 关于 +date: 2016-01-31 22:10:28 +pageid: about +--- \ No newline at end of file diff --git a/themes/hexo-theme-xups/__source/comment/index.md b/themes/hexo-theme-xups/__source/comment/index.md new file mode 100644 index 0000000..7d1f2e2 --- /dev/null +++ b/themes/hexo-theme-xups/__source/comment/index.md @@ -0,0 +1,5 @@ +--- +title: 留言 +date: 2016-02-01 20:29:57 +pageid: comment +--- diff --git a/themes/hexo-theme-xups/__source/lab/index.md b/themes/hexo-theme-xups/__source/lab/index.md new file mode 100644 index 0000000..dfdd9ca --- /dev/null +++ b/themes/hexo-theme-xups/__source/lab/index.md @@ -0,0 +1,28 @@ +--- +title: 实验室 +date: 2016-02-01 20:29:57 +pageid: lab + +projects: + blog_demo: + title: Blog Demo + time: 2016-10-10 + content: + 1: + name: 基于 vue + vuex + bootstrap 的 blog demo + link: https://github.com/jangdelong/vue-blog-demo + hexo_theme_xups: + title: hexo-theme-xups 博客主题 + time: 2016-03-12 + content: + 1: + name: 基于 hexo 静态博客系统的 博客主题 xups + link: https://github.com/jangdelong/hexo-theme-xups + typecho_theme_xups: + title: Typecho 博客主题 + time: 2015-10-15 + content: + 1: + name: 基于 php 博客系统 typecho 的主题 xups + link: https://github.com/jangdelong/typecho-theme-xups +--- diff --git a/themes/hexo-theme-xups/_config.yml b/themes/hexo-theme-xups/_config.yml new file mode 100644 index 0000000..1952de1 --- /dev/null +++ b/themes/hexo-theme-xups/_config.yml @@ -0,0 +1,137 @@ +############################# +# Xups for Hexo 主题配置文件 +# Jelon +# http://jelon.top +############################# + +#---------------------------- +# 头部导航 +#---------------------------- +menu: + home: + name: 首页 + link: / + icon: icon-home + lab: + name: 实验室 + link: /lab/ + icon: icon-lab + about: + name: 关于 + link: /about/ + icon: icon-about + comment: + name: 留言 + link: /comment/ + icon: icon-comment + +#---------------------------- +# 副导航 +#---------------------------- +subnav: + github: "#" + weibo: "#" + rss: "#" + zhihu: "#" + +#---------------------------- +# RSS +#---------------------------- +rss: /atom.xml + +#---------------------------- +# Favicon +#---------------------------- +favicon: /favicon.ico + +#---------------------------- +# 头像url +#---------------------------- +avatar: https://i.loli.net/2018/05/04/5aeb37415a0dc.jpg + +#---------------------------- +# 是否开启分享 +#---------------------------- +share: true + +#---------------------------- +# 侧栏是否显示微博秀 +#---------------------------- +weibo_show: + enable: false + code: + +#---------------------------- +# 是否开启评论 +#---------------------------- +comment: + enable: true + owner: jangdelong + repo: blog_comments + client_id: b08ed25e52c57993e69c + client_secret: 1cb9545488f0380904b87350e7c5a270ae03bab7 + +#---------------------------- +# 是否开启云标签 +#---------------------------- +tagcloud: true + +#---------------------------- +# 友情链接 +#---------------------------- +friends: + enable: true + list: + 1: + name: Haoren博客 + title: 网络安全博客 + link: http://blog.sina.com.cn/u/1825875765 + 2: + name: Maxwell博客 + title: 技术博客 + link: http://blog.csdn.net/yeweiouyang + +#---------------------------- +# 头部链接 +#---------------------------- +head_links: + enable: true + list: + sup: + 0: + name: Github + link: https://github.com/sookie2010 + last: + name: Hosted by Coding Pages + link: https://pages.coding.me + sub: + sinaweibo: + name: 新浪微博 + link: https://weibo.com/2633013641 + qqweibo: + name: Facebook + link: https://www.facebook.com/profile.php?id=100016469831631 +#---------------------------- +# SEO +#---------------------------- +SEO: + keywords: 前端, Web, Java + description: Jelon个人前端小站 + +#---------------------------- +# 百度分析 +#---------------------------- +baidu_analytics: true + +#---------------------------- +# 高亮样式 +#---------------------------- +highlight_theme: normal +#---------------------------- +# CDN +# 如: //7xs305.com1.z0.glb.clouddn.com/ +# 主要以下两个目录进行 cdn 存储 +# - img 图片资源下的 thumbnail 目录 +# - css 样式资源下的 fonts 目录 +#---------------------------- +CDN: diff --git a/themes/hexo-theme-xups/layout/_custom/about.ejs b/themes/hexo-theme-xups/layout/_custom/about.ejs new file mode 100644 index 0000000..d7da15f --- /dev/null +++ b/themes/hexo-theme-xups/layout/_custom/about.ejs @@ -0,0 +1,57 @@ + + +

+ + 关于我 +

+ + + +

+ + 关于博客 +

+ + + +

+ + Github账号 +

+ + diff --git a/themes/hexo-theme-xups/layout/_custom/comment.ejs b/themes/hexo-theme-xups/layout/_custom/comment.ejs new file mode 100644 index 0000000..29b33c3 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_custom/comment.ejs @@ -0,0 +1,12 @@ + + +

+ +

+ +

+ 如果觉得博客对您有用,欢迎微信赞赏 +

+<% if (theme.comment.enable) { %> + <%- partial('../_partial/post/comment') %> +<% } %> diff --git a/themes/hexo-theme-xups/layout/_custom/lab.ejs b/themes/hexo-theme-xups/layout/_custom/lab.ejs new file mode 100644 index 0000000..e2b53ab --- /dev/null +++ b/themes/hexo-theme-xups/layout/_custom/lab.ejs @@ -0,0 +1,27 @@ + + +
+ Lab Banner +
+<% + var projects = page.projects; + for (var i in projects) { +%> +

+ + + <%- date(projects[i].time, 'YYYY-MM-DD') %> <%- projects[i].title %> +

+ + +<% } %> diff --git a/themes/hexo-theme-xups/layout/_partial/after-footer.ejs b/themes/hexo-theme-xups/layout/_partial/after-footer.ejs new file mode 100644 index 0000000..dafb960 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/after-footer.ejs @@ -0,0 +1,2 @@ + +<%- js('js/main') %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/archive-post.ejs b/themes/hexo-theme-xups/layout/_partial/archive-post.ejs new file mode 100644 index 0000000..4285194 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/archive-post.ejs @@ -0,0 +1,56 @@ + +
+
+ + <% if (post.categories && post.categories.length) { %> + <%- + list_categories(post.categories, { + show_count: false, + class: 'cat', + style: 'none', + separator: '|' + }).split('|')[0] + %> + <% } else { %> + 未分类 + <% } %> + + <%- partial('post/title', { class_name: 'post-title' }) %> +
+ + +
+
+ <% if (index == true) { %> + <%- post.blogexcerpt || post.excerpt || post.content %> + <% } %> +

+ 阅读全文 +

+
+
+ + <% if (post.thumbnail) { %> + + <%= post.title %> + <% } else if (post.photos.length) { %> + <%= post.title %> + <% } else if (theme.CDN) { %> + 默认配图 + <% } else { %> + 默认配图 + <% } %> + +
+
+
diff --git a/themes/hexo-theme-xups/layout/_partial/archive.ejs b/themes/hexo-theme-xups/layout/_partial/archive.ejs new file mode 100644 index 0000000..ad0a07c --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/archive.ejs @@ -0,0 +1,27 @@ +<% if (index == true) { %> +

+ + <% if (pagination == 2) { %> + 最近动态 + <% } else if (pagination == 3) { %> + 文章归档 + <% } else if (pagination == 4) { %> + `<%- page.category %>`分类下的文章 + <% } else if (pagination == 5) { %> + `<%- page.tag %>`标签下的文章 + <% } %> + +

+ <% page.posts.each(function(post) { %> + <%- partial('archive-post', { post: post }) %> + <% }) %> + + <% if (page.total >= 1){ %> + + <% } %> +<% } %> diff --git a/themes/hexo-theme-xups/layout/_partial/article.ejs b/themes/hexo-theme-xups/layout/_partial/article.ejs new file mode 100644 index 0000000..d99c40c --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/article.ejs @@ -0,0 +1,35 @@ + +
+
+

<%= post.title %>

+
+ +
+ <%- post.content %> +
+ +
+ +<%- partial('post/share') %> + +<%- partial('post/nav', { post: post }) %> + +<%- partial('post/comment') %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/baidu-analytics.ejs b/themes/hexo-theme-xups/layout/_partial/baidu-analytics.ejs new file mode 100644 index 0000000..d95ed0b --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/baidu-analytics.ejs @@ -0,0 +1,11 @@ +<% if (theme.baidu_analytics) { %> + +<% } %> diff --git a/themes/hexo-theme-xups/layout/_partial/footer.ejs b/themes/hexo-theme-xups/layout/_partial/footer.ejs new file mode 100644 index 0000000..f4fff94 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/footer.ejs @@ -0,0 +1,11 @@ + +
返回顶部
diff --git a/themes/hexo-theme-xups/layout/_partial/head.ejs b/themes/hexo-theme-xups/layout/_partial/head.ejs new file mode 100644 index 0000000..b037f54 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/head.ejs @@ -0,0 +1,41 @@ + + + + + + + <% + var title = page.title; + + if (is_archive()) { + title = '文章归档'; + if (is_month()){ + title += ': ' + page.year + '/' + page.month; + } else if (is_year()) { + title += ': ' + page.year; + } + } else if (is_category()) { + title = '`' + page.category + '`分类下的文章'; + } else if (is_tag()) { + title = '`' + page.tag + '`标签下的文章'; + } + %> + <% if (title) { %><%= title %> | <% } %><%= config.title %> + + + + + <% if (theme.rss) { %> + + <% } %> + <% if (config.favicon) { %> + + <% } else { %> + + <% } %> + <%- css('css/style') %> + + <%- partial('baidu-analytics') %> + diff --git a/themes/hexo-theme-xups/layout/_partial/header.ejs b/themes/hexo-theme-xups/layout/_partial/header.ejs new file mode 100644 index 0000000..b701480 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/header.ejs @@ -0,0 +1,52 @@ +
+
+ +
+ +
+
+ <% if (theme.head_links.enable) { %> + <% + var supList = theme.head_links.list.sup, + subList = theme.head_links.list.sub; + %> + +

+ <% for (var j in subList) { %> + <%= subList[j]['name'] %> + <% } %> + + + 公众号 + + 我的微信订阅号 + + + +

+ <% } %> +
+
+ avatar +
+
+
+
diff --git a/themes/hexo-theme-xups/layout/_partial/post/category.ejs b/themes/hexo-theme-xups/layout/_partial/post/category.ejs new file mode 100644 index 0000000..fb72431 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/post/category.ejs @@ -0,0 +1,4 @@ + +<% if (post.categories && post.categories.length) { %> + +<% } %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/post/comment.ejs b/themes/hexo-theme-xups/layout/_partial/post/comment.ejs new file mode 100644 index 0000000..f707399 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/post/comment.ejs @@ -0,0 +1,77 @@ +<% if (theme.comment.enable) { %> + <%- js('js/comment') %> +
+ +
+ +<% } %> diff --git a/themes/hexo-theme-xups/layout/_partial/post/date.ejs b/themes/hexo-theme-xups/layout/_partial/post/date.ejs new file mode 100644 index 0000000..5353bf9 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/post/date.ejs @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/post/gallery.ejs b/themes/hexo-theme-xups/layout/_partial/post/gallery.ejs new file mode 100644 index 0000000..c526461 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/post/gallery.ejs @@ -0,0 +1,4 @@ +<% if (post.photos && post.photos.length) { %> + + +<% } %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/post/nav.ejs b/themes/hexo-theme-xups/layout/_partial/post/nav.ejs new file mode 100644 index 0000000..95b97af --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/post/nav.ejs @@ -0,0 +1,40 @@ + +<% if (post.prev || post.next) { %> +
+ <% if (post.prev) { %> + + 上一篇
+ + <% if (post.prev.title) { %> + <%= post.prev.title %> + <% } else { %> + 无标题 + <% } %> + +
+ <% } else { %> + + 上一篇
+ 没有上一篇了 +
+ <% } %> + + <% if (post.next) { %> + + 下一篇
+ + <% if (post.next.title) { %> + <%= post.next.title %> + <% } else { %> + 无标题 + <% } %> + +
+ <% } else { %> + + 下一篇
+ 没有下一篇了 +
+ <% } %> +
+<% } %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/post/share.ejs b/themes/hexo-theme-xups/layout/_partial/post/share.ejs new file mode 100644 index 0000000..477f42a --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/post/share.ejs @@ -0,0 +1,12 @@ +<% if (theme.share) { %> +
+ +
+<% } %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/post/tag.ejs b/themes/hexo-theme-xups/layout/_partial/post/tag.ejs new file mode 100644 index 0000000..06618c2 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/post/tag.ejs @@ -0,0 +1,5 @@ +<% if (post.tags && post.tags.length) { %> + <% post.tags.forEach(function(tag, i) { %> + <%- link_to(tag.path, tag.name) %><% if (i != post.tags.length - 1) { %> / <% } %> + <% }); %> +<% } %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/post/title.ejs b/themes/hexo-theme-xups/layout/_partial/post/title.ejs new file mode 100644 index 0000000..85a1cb4 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/post/title.ejs @@ -0,0 +1,13 @@ +<% if (post.link) { %> +

+ + <%= post.title || post.link %> + +

+<% } else if (post.title) { %> +

+ + <%= post.title %> + +

+<% } %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_partial/sidebar.ejs b/themes/hexo-theme-xups/layout/_partial/sidebar.ejs new file mode 100644 index 0000000..078cb10 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_partial/sidebar.ejs @@ -0,0 +1,31 @@ + + + \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_widget/categorys.ejs b/themes/hexo-theme-xups/layout/_widget/categorys.ejs new file mode 100644 index 0000000..59c1032 --- /dev/null +++ b/themes/hexo-theme-xups/layout/_widget/categorys.ejs @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_widget/friend_links.ejs b/themes/hexo-theme-xups/layout/_widget/friend_links.ejs new file mode 100644 index 0000000..61fa60a --- /dev/null +++ b/themes/hexo-theme-xups/layout/_widget/friend_links.ejs @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_widget/tags.ejs b/themes/hexo-theme-xups/layout/_widget/tags.ejs new file mode 100644 index 0000000..393271d --- /dev/null +++ b/themes/hexo-theme-xups/layout/_widget/tags.ejs @@ -0,0 +1,12 @@ + +
+ <% + site.tags.forEach(function (tag, index) { + if (index < 39) { + %> + <%- tag.name %> (<%- tag.length %>) + <% + } + }); + %> +
\ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/_widget/weibo.ejs b/themes/hexo-theme-xups/layout/_widget/weibo.ejs new file mode 100644 index 0000000..a95f4bf --- /dev/null +++ b/themes/hexo-theme-xups/layout/_widget/weibo.ejs @@ -0,0 +1,29 @@ +
+
微博加载中...
+ <%- theme.weibo_show.code %> + +
\ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/archive.ejs b/themes/hexo-theme-xups/layout/archive.ejs new file mode 100644 index 0000000..091b806 --- /dev/null +++ b/themes/hexo-theme-xups/layout/archive.ejs @@ -0,0 +1,2 @@ + +<%- partial('_partial/archive', { pagination: 3, index: true }) %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/category.ejs b/themes/hexo-theme-xups/layout/category.ejs new file mode 100644 index 0000000..27cc348 --- /dev/null +++ b/themes/hexo-theme-xups/layout/category.ejs @@ -0,0 +1,2 @@ + +<%- partial('_partial/archive', { pagination: 4, index: true }) %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/index.ejs b/themes/hexo-theme-xups/layout/index.ejs new file mode 100644 index 0000000..f286030 --- /dev/null +++ b/themes/hexo-theme-xups/layout/index.ejs @@ -0,0 +1,6 @@ + +<% if (page.content) { %> + <%- page.content %> +<% } else { %> + <%- partial('_partial/archive', { pagination: 2, index: true }) %> +<% } %> diff --git a/themes/hexo-theme-xups/layout/layout.ejs b/themes/hexo-theme-xups/layout/layout.ejs new file mode 100644 index 0000000..38f666a --- /dev/null +++ b/themes/hexo-theme-xups/layout/layout.ejs @@ -0,0 +1,29 @@ +<%- partial('_partial/head') %> + + + + + <%- partial('_partial/header') %> + + +
+
+
+ <%- body %> +
+ +
+ <%- partial('_partial/sidebar') %> +
+ + + <%- partial('_partial/footer') %> + + <%- partial('_partial/after-footer') %> + + \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/page.ejs b/themes/hexo-theme-xups/layout/page.ejs new file mode 100644 index 0000000..775ae29 --- /dev/null +++ b/themes/hexo-theme-xups/layout/page.ejs @@ -0,0 +1,17 @@ + +
+
+

<%- page.title %>

+
+
+ <% if (page.pageid && page.pageid == 'about') { %> + <%- partial('_custom/about', { page: page, post: page }) %> + <% } else if (page.pageid && page.pageid == 'lab') { %> + <%- partial('_custom/lab', { page: page, post: page }) %> + <% } else if (page.pageid && page.pageid == 'comment') { %> + <%- partial('_custom/comment', { page: page, post: page }) %> + <% } else { %> + <%- page.content %> + <% } %> +
+
\ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/post.ejs b/themes/hexo-theme-xups/layout/post.ejs new file mode 100644 index 0000000..b5ffca8 --- /dev/null +++ b/themes/hexo-theme-xups/layout/post.ejs @@ -0,0 +1,2 @@ + +<%- partial('_partial/article', { index: false, post: page }) %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/tag.ejs b/themes/hexo-theme-xups/layout/tag.ejs new file mode 100644 index 0000000..d4b86c8 --- /dev/null +++ b/themes/hexo-theme-xups/layout/tag.ejs @@ -0,0 +1,2 @@ + +<%- partial('_partial/archive', { pagination: 5, index: true }) %> \ No newline at end of file diff --git a/themes/hexo-theme-xups/layout/tags.ejs b/themes/hexo-theme-xups/layout/tags.ejs new file mode 100644 index 0000000..6d06771 --- /dev/null +++ b/themes/hexo-theme-xups/layout/tags.ejs @@ -0,0 +1 @@ + diff --git a/themes/hexo-theme-xups/source/css/_base/font.styl b/themes/hexo-theme-xups/source/css/_base/font.styl new file mode 100644 index 0000000..3ff8c1e --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_base/font.styl @@ -0,0 +1,77 @@ +/*! + * 网站字体及icon + * $CDN = hexo-config("CDN") || '//7xs305.com1.z0.glb.clouddn.com/' + */ +$CDN = hexo-config("CDN") || './fonts/' + +@font-face + font-family "HomizioNova" + src url($CDN + 'homizio-nova/light.ttf'),url($CDN + 'homizio-nova/light.otf') + font-weight normal + font-style normal +@font-face + font-family "HomizioNova" + src url($CDN + 'homizio-nova/light_italic.ttf'),url($CDN + 'homizio-nova/light_italic.otf') + font-weight normal + font-style italic +@font-face + font-family "HomizioNova" + src url($CDN + 'homizio-nova/regular.ttf'),url($CDN + 'homizio-nova/regular.otf') + font-weight bold + font-style normal +@font-face + font-family "HomizioNova" + src url($CDN + 'homizio-nova/italic.ttf'),url($CDN + 'homizio-nova/italic.otf') + font-weight bold + font-style italic +@font-face + font-family 'icomoon' + src url($CDN + 'icomoon/icomoon.eot?e2xg5y'), url('./fonts/icomoon/icomoon.eot?e2xg5y') + src url($CDN + 'icomoon/icomoon.eot?#iefixe2xg5y') format('embedded-opentype'), + url($CDN + 'icomoon/icomoon.woff?e2xg5y') format('woff'), + url($CDN + 'icomoon/icomoon.ttf?e2xg5y') format('truetype'), + url($CDN + 'icomoon/icomoon.svg?e2xg5y#icomoon') format('svg'), + url('./fonts/icomoon/icomoon.eot?#iefixe2xg5y') format('embedded-opentype'), + url('./fonts/icomoon/icomoon.woff?e2xg5y') format('woff'), + url('./fonts/icomoon/icomoon.ttf?e2xg5y') format('truetype'), + url('./fonts/icomoon/icomoon.svg?e2xg5y#icomoon') format('svg') + font-weight normal + font-style normal +[class^="icon-"],[class*=" icon-"] + font-family 'icomoon' + speak none + font-style normal + font-weight normal + font-variant normal + text-transform none + line-height 1 + -webkit-font-smoothing antialiased + -moz-osx-font-smoothing grayscale +.icon-home:before + content "\e900" +.icon-office:before + content "\e903" +.icon-newspaper:before + content "\e904" +.icon-profile:before + content "\e923" +.icon-files-empty:before + content "\e925" +.icon-price-tags:before + content "\e936" +.icon-envelop:before + content "\e945" +.icon-bubble:before + content "\e96b" +.icon-comment:before + content "\e96d" +.icon-about:before + content "\e976" +.icon-cogs:before + content "\e995" +.icon-paragraph-justify:before + content "\ea7a" +.icon-lab:before + content "\ea80" +.icon-github:before + content "\eab1" \ No newline at end of file diff --git a/themes/hexo-theme-xups/source/css/_base/global.styl b/themes/hexo-theme-xups/source/css/_base/global.styl new file mode 100644 index 0000000..aacc1b8 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_base/global.styl @@ -0,0 +1,51 @@ +/*! + * 全局样式 + */ +.container + max-width 1180px + _width 1180px + background-color c-fff + margin 0 auto 10px + text-left() +.home + //margin-top 78px + background-color c-eee +.btn + background-color #ff5e52 + border 0 + color c-fff + opacity .8 + box-sizing border-box + &:hover + opacity .75 +.btn-ok + background-color #ff5e52 +.btn-cancel + background-color #51cc87 +.form-control + box-sizing border-box + +.browsehappy + padding 8px 0 + background #fbe3e4 + color #8a1f11 + text-align center +.loading-mask + position fixed + top 0 + right 0 + left 0 + bottom 0 + display block + width 100% + height 100% + background-color rgb(255, 255, 255) + opacity .8 + .loading-icon + position relative + top 50% + left 50% + width 50px + height 50px + margin-top -25px + margin-left -25px diff --git a/themes/hexo-theme-xups/source/css/_base/normalize.styl b/themes/hexo-theme-xups/source/css/_base/normalize.styl new file mode 100644 index 0000000..55d6f68 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_base/normalize.styl @@ -0,0 +1,157 @@ +html + font-family sans-serif + -ms-text-size-adjust 100% + -webkit-text-size-adjust 100% +body + margin: 0 +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary + display block + +audio, +canvas, +progress, +video + display inline-block + vertical-align baseline + +audio:not([controls]) + display none + height 0 +[hidden], +template + display none +a + background-color transparent + +a:active, +a:hover + outline: 0 +abbr[title] + border-bottom 1px dotted + +b, +strong + font-weight bold +dfn + font-style italic +h1 + font-size 2em + margin 0.67em 0 + +mark + background #ff0 + color #000 +small + font-size 80% +sub, +sup + font-size 75% + line-height 0 + position relative + vertical-align baseline +sup + top -0.5em +sub + bottom -0.25em +img + border 0 +svg:not(:root) + overflow hidden + +figure + margin 1em 40px + +hr + -moz-box-sizing content-box + box-sizing content-box + height 0 +pre + overflow auto +code, +kbd, +pre, +samp + font-family monospace, monospace + font-size 1em + +button, +input, +optgroup, +select, +textarea + color inherit /* 1 */ + font inherit /* 2 */ + margin 0 /* 3 */ + +button + overflow visible + +button, +select + text-transform none + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] + -webkit-appearance button /* 2 */ + cursor pointer /* 3 */ + +button[disabled], +html input[disabled] + cursor default + +button::-moz-focus-inner, +input::-moz-focus-inner + border 0 + padding 0 +input + line-height normal +input[type="checkbox"], +input[type="radio"] + box-sizing border-box /* 1 */ + padding 0 /* 2 */ +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button + height auto + +input[type="search"] + -webkit-appearance textfield /* 1 */ + -moz-box-sizing content-box + -webkit-box-sizing content-box /* 2 */ + box-sizing content-box +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration + -webkit-appearance none + +fieldset + border 1px solid #c0c0c0 + margin 0 2px + padding 0.35em 0.625em 0.75em +legend + border 0 + padding 0 +textarea + overflow auto + +optgroup + font-weight: bold + +table + border-collapse collapse + border-spacing 0 +td, +th + padding 0 diff --git a/themes/hexo-theme-xups/source/css/_base/reset.styl b/themes/hexo-theme-xups/source/css/_base/reset.styl new file mode 100644 index 0000000..daa7118 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_base/reset.styl @@ -0,0 +1,48 @@ +/*! + * Reset css + */ +::selection + color c-fff + background-color #f99 + opacity .8 +::-webkit-scrollbar + width 7px + height 4px +::-webkit-scrollbar-thumb + border-radius 4px + background rgba(0, 0, 0, .15) +::-webkit-scrollbar-track + background rgba(0, 0, 0, .06) +body + font 14px/1.5 "Microsoft Yahei", "微软雅黑", Arial, "宋体" + color c-666 + -webkit-overflow-scrolling touch // iOS下支持弹性滚动 + -webkit-font-smoothing antialiased // 优化字体渲染、让页面字体更精更清楚 + -webkit-text-size-adjust 100% + -ms-text-size-adjust 100% + text-rendering optimizelegibility +a + color c-666 + text-decoration none + &:link, + &:visited, + &:active + color c-666 + &:hover + color #ff5e52 +hr + border-top 1px solid c-eee +.fl + float left +.fr + float right +.text-center + text-center() +.clearfix + zoom 1 + &:after + display block + width 100% + height 0 + content " " + clear both \ No newline at end of file diff --git a/themes/hexo-theme-xups/source/css/_extend.styl b/themes/hexo-theme-xups/source/css/_extend.styl new file mode 100644 index 0000000..9455d7d --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_extend.styl @@ -0,0 +1,65 @@ +$base-style + h1 + font-size: 2em + h2 + font-size: 1.6em + h3 + font-size: 1.4em + h4 + font-size: 1.2em + h5 + font-size: 1em + h6 + font-size: 1em + color: #999 + hr + border: 1px dashed #ddd + strong + font-weight: bold + em, cite + font-style: italic + sup, sub + font-size: 0.75em + line-height: 0 + position: relative + vertical-align: baseline + sup + top: -0.5em + sub + bottom: -0.2em + small + font-size: 0.85em + acronym, abbr + border-bottom: 1px dotted + ul, ol, dl + margin: 0 20px + padding: 0 + line-height: line-height + ul, ol + ul, ol + margin-top: 0 + margin-bottom: 0 + ul + list-style: disc + ol + list-style: decimal + dt + font-weight: bold + table + display: table; + font-size: 12px; + background-color: transparent; + border: 1px solid #ddd; + box-sizing: border-box; + word-wrap: break-word; + th, td + border-bottom: solid 1px #ddd; + border-right: solid 1px #ddd; + padding: 5px 10px; + thead tr + background-color: #f6f6f6; + blockquote + margin 1em 0 + padding 5px 10px + color #666 + border-left 2px solid #eee diff --git a/themes/hexo-theme-xups/source/css/_markdown.styl b/themes/hexo-theme-xups/source/css/_markdown.styl new file mode 100644 index 0000000..812bf3e --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_markdown.styl @@ -0,0 +1,699 @@ +@font-face { + font-family: octicons-link; + src: url("data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==") format('woff'); +} +$markdown-style + .markdown-body + -ms-text-size-adjust 100%; + -webkit-text-size-adjust: 100%; + line-height: 1.5; + color: #24292e; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-size: 16px; + line-height: 1.5; + word-wrap: break-word; + + .markdown-body .pl-c { + color: #6a737d; + } + + .markdown-body .pl-c1, + .markdown-body .pl-s .pl-v { + color: #005cc5; + } + + .markdown-body .pl-e, + .markdown-body .pl-en { + color: #6f42c1; + } + + .markdown-body .pl-smi, + .markdown-body .pl-s .pl-s1 { + color: #24292e; + } + + .markdown-body .pl-ent { + color: #22863a; + } + + .markdown-body .pl-k { + color: #d73a49; + } + + .markdown-body .pl-s, + .markdown-body .pl-pds, + .markdown-body .pl-s .pl-pse .pl-s1, + .markdown-body .pl-sr, + .markdown-body .pl-sr .pl-cce, + .markdown-body .pl-sr .pl-sre, + .markdown-body .pl-sr .pl-sra { + color: #032f62; + } + + .markdown-body .pl-v, + .markdown-body .pl-smw { + color: #e36209; + } + + .markdown-body .pl-bu { + color: #b31d28; + } + + .markdown-body .pl-ii { + color: #fafbfc; + background-color: #b31d28; + } + + .markdown-body .pl-c2 { + color: #fafbfc; + background-color: #d73a49; + } + + .markdown-body .pl-c2::before { + content: "^M"; + } + + .markdown-body .pl-sr .pl-cce { + font-weight: bold; + color: #22863a; + } + + .markdown-body .pl-ml { + color: #735c0f; + } + + .markdown-body .pl-mh, + .markdown-body .pl-mh .pl-en, + .markdown-body .pl-ms { + font-weight: bold; + color: #005cc5; + } + + .markdown-body .pl-mi { + font-style: italic; + color: #24292e; + } + + .markdown-body .pl-mb { + font-weight: bold; + color: #24292e; + } + + .markdown-body .pl-md { + color: #b31d28; + background-color: #ffeef0; + } + + .markdown-body .pl-mi1 { + color: #22863a; + background-color: #f0fff4; + } + + .markdown-body .pl-mc { + color: #e36209; + background-color: #ffebda; + } + + .markdown-body .pl-mi2 { + color: #f6f8fa; + background-color: #005cc5; + } + + .markdown-body .pl-mdr { + font-weight: bold; + color: #6f42c1; + } + + .markdown-body .pl-ba { + color: #586069; + } + + .markdown-body .pl-sg { + color: #959da5; + } + + .markdown-body .pl-corl { + text-decoration: underline; + color: #032f62; + } + + .markdown-body .octicon { + display: inline-block; + vertical-align: text-top; + fill: currentColor; + } + + .markdown-body a { + background-color: transparent; + -webkit-text-decoration-skip: objects; + } + + .markdown-body a:active, + .markdown-body a:hover { + outline-width: 0; + } + + .markdown-body strong { + font-weight: inherit; + } + + .markdown-body strong { + font-weight: bolder; + } + + .markdown-body h1 { + font-size: 2em; + margin: 0.67em 0; + } + + .markdown-body img { + border-style: none; + } + + .markdown-body svg:not(:root) { + overflow: hidden; + } + + .markdown-body code, + .markdown-body kbd, + .markdown-body pre { + font-family: monospace, monospace; + font-size: 1em; + } + + .markdown-body hr { + box-sizing: content-box; + height: 0; + overflow: visible; + } + + .markdown-body input { + font: inherit; + margin: 0; + } + + .markdown-body input { + overflow: visible; + } + + .markdown-body [type="checkbox"] { + box-sizing: border-box; + padding: 0; + } + + .markdown-body * { + box-sizing: border-box; + } + + .markdown-body input { + font-family: inherit; + font-size: inherit; + line-height: inherit; + } + + .markdown-body a { + color: #0366d6; + text-decoration: none; + } + + .markdown-body a:hover { + text-decoration: underline; + } + + .markdown-body strong { + font-weight: 600; + } + + .markdown-body hr { + height: 0; + margin: 15px 0; + overflow: hidden; + background: transparent; + border: 0; + border-bottom: 1px solid #dfe2e5; + } + + .markdown-body hr::before { + display: table; + content: ""; + } + + .markdown-body hr::after { + display: table; + clear: both; + content: ""; + } + + .markdown-body table { + border-spacing: 0; + border-collapse: collapse; + } + + .markdown-body td, + .markdown-body th { + padding: 0; + } + + .markdown-body h1, + .markdown-body h2, + .markdown-body h3, + .markdown-body h4, + .markdown-body h5, + .markdown-body h6 { + margin-top: 0; + margin-bottom: 0; + } + + .markdown-body h1 { + font-size: 32px; + font-weight: 600; + } + + .markdown-body h2 { + font-size: 24px; + font-weight: 600; + } + + .markdown-body h3 { + font-size: 20px; + font-weight: 600; + } + + .markdown-body h4 { + font-size: 16px; + font-weight: 600; + } + + .markdown-body h5 { + font-size: 14px; + font-weight: 600; + } + + .markdown-body h6 { + font-size: 12px; + font-weight: 600; + } + + .markdown-body p { + margin-top: 0; + margin-bottom: 10px; + } + + .markdown-body blockquote { + margin: 0; + } + + .markdown-body ul, + .markdown-body ol { + padding-left: 0; + margin-top: 0; + margin-bottom: 0; + } + + .markdown-body ol ol, + .markdown-body ul ol { + list-style-type: lower-roman; + } + + .markdown-body ul ul ol, + .markdown-body ul ol ol, + .markdown-body ol ul ol, + .markdown-body ol ol ol { + list-style-type: lower-alpha; + } + + .markdown-body dd { + margin-left: 0; + } + + .markdown-body code { + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 12px; + } + + .markdown-body pre { + margin-top: 0; + margin-bottom: 0; + font: 12px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + } + + .markdown-body .octicon { + vertical-align: text-bottom; + } + + .markdown-body .pl-0 { + padding-left: 0 !important; + } + + .markdown-body .pl-1 { + padding-left: 4px !important; + } + + .markdown-body .pl-2 { + padding-left: 8px !important; + } + + .markdown-body .pl-3 { + padding-left: 16px !important; + } + + .markdown-body .pl-4 { + padding-left: 24px !important; + } + + .markdown-body .pl-5 { + padding-left: 32px !important; + } + + .markdown-body .pl-6 { + padding-left: 40px !important; + } + + .markdown-body::before { + display: table; + content: ""; + } + + .markdown-body::after { + display: table; + clear: both; + content: ""; + } + + .markdown-body>*:first-child { + margin-top: 0 !important; + } + + .markdown-body>*:last-child { + margin-bottom: 0 !important; + } + + .markdown-body a:not([href]) { + color: inherit; + text-decoration: none; + } + + .markdown-body .anchor { + float: left; + padding-right: 4px; + margin-left: -20px; + line-height: 1; + } + + .markdown-body .anchor:focus { + outline: none; + } + + .markdown-body p, + .markdown-body blockquote, + .markdown-body ul, + .markdown-body ol, + .markdown-body dl, + .markdown-body table, + .markdown-body pre { + margin-top: 0; + margin-bottom: 16px; + } + + .markdown-body hr { + height: 0.25em; + padding: 0; + margin: 24px 0; + background-color: #e1e4e8; + border: 0; + } + + .markdown-body blockquote { + padding: 0 1em; + color: #6a737d; + border-left: 0.25em solid #dfe2e5; + } + + .markdown-body blockquote>:first-child { + margin-top: 0; + } + + .markdown-body blockquote>:last-child { + margin-bottom: 0; + } + + .markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font-size: 11px; + line-height: 10px; + color: #444d56; + vertical-align: middle; + background-color: #fafbfc; + border: solid 1px #c6cbd1; + border-bottom-color: #959da5; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #959da5; + } + + .markdown-body h1, + .markdown-body h2, + .markdown-body h3, + .markdown-body h4, + .markdown-body h5, + .markdown-body h6 { + margin-top: 24px; + margin-bottom: 16px; + font-weight: 600; + line-height: 1.25; + } + + .markdown-body h1 .octicon-link, + .markdown-body h2 .octicon-link, + .markdown-body h3 .octicon-link, + .markdown-body h4 .octicon-link, + .markdown-body h5 .octicon-link, + .markdown-body h6 .octicon-link { + color: #1b1f23; + vertical-align: middle; + visibility: hidden; + } + + .markdown-body h1:hover .anchor, + .markdown-body h2:hover .anchor, + .markdown-body h3:hover .anchor, + .markdown-body h4:hover .anchor, + .markdown-body h5:hover .anchor, + .markdown-body h6:hover .anchor { + text-decoration: none; + } + + .markdown-body h1:hover .anchor .octicon-link, + .markdown-body h2:hover .anchor .octicon-link, + .markdown-body h3:hover .anchor .octicon-link, + .markdown-body h4:hover .anchor .octicon-link, + .markdown-body h5:hover .anchor .octicon-link, + .markdown-body h6:hover .anchor .octicon-link { + visibility: visible; + } + + .markdown-body h1 { + padding-bottom: 0.3em; + font-size: 2em; + border-bottom: 1px solid #eaecef; + } + + .markdown-body h2 { + padding-bottom: 0.3em; + font-size: 1.5em; + border-bottom: 1px solid #eaecef; + } + + .markdown-body h3 { + font-size: 1.25em; + } + + .markdown-body h4 { + font-size: 1em; + } + + .markdown-body h5 { + font-size: 0.875em; + } + + .markdown-body h6 { + font-size: 0.85em; + color: #6a737d; + } + + .markdown-body ul, + .markdown-body ol { + padding-left: 2em; + } + + .markdown-body ul ul, + .markdown-body ul ol, + .markdown-body ol ol, + .markdown-body ol ul { + margin-top: 0; + margin-bottom: 0; + } + + .markdown-body li>p { + margin-top: 16px; + } + + .markdown-body li+li { + margin-top: 0.25em; + } + + .markdown-body dl { + padding: 0; + } + + .markdown-body dl dt { + padding: 0; + margin-top: 16px; + font-size: 1em; + font-style: italic; + font-weight: 600; + } + + .markdown-body dl dd { + padding: 0 16px; + margin-bottom: 16px; + } + + .markdown-body table { + display: block; + width: 100%; + overflow: auto; + } + + .markdown-body table th { + font-weight: 600; + } + + .markdown-body table th, + .markdown-body table td { + padding: 6px 13px; + border: 1px solid #dfe2e5; + } + + .markdown-body table tr { + background-color: #fff; + border-top: 1px solid #c6cbd1; + } + + .markdown-body table tr:nth-child(2n) { + background-color: #f6f8fa; + } + + .markdown-body img { + max-width: 100%; + box-sizing: content-box; + background-color: #fff; + } + + .markdown-body code { + padding: 0; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; + font-size: 85%; + background-color: rgba(27,31,35,0.05); + border-radius: 3px; + } + + .markdown-body code::before, + .markdown-body code::after { + letter-spacing: -0.2em; + content: "\00a0"; + } + + .markdown-body pre { + word-wrap: normal; + } + + .markdown-body pre>code { + padding: 0; + margin: 0; + font-size: 100%; + word-break: normal; + white-space: pre; + background: transparent; + border: 0; + } + + .markdown-body .highlight { + margin-bottom: 16px; + } + + .markdown-body .highlight pre { + margin-bottom: 0; + word-break: normal; + } + + .markdown-body .highlight pre, + .markdown-body pre { + padding: 16px; + overflow: auto; + font-size: 85%; + line-height: 1.45; + background-color: #f6f8fa; + border-radius: 3px; + } + + .markdown-body pre code { + display: inline; + max-width: auto; + padding: 0; + margin: 0; + overflow: visible; + line-height: inherit; + word-wrap: normal; + background-color: transparent; + border: 0; + } + + .markdown-body pre code::before, + .markdown-body pre code::after { + content: normal; + } + + .markdown-body .full-commit .btn-outline:not(:disabled):hover { + color: #005cc5; + border-color: #005cc5; + } + + .markdown-body kbd { + display: inline-block; + padding: 3px 5px; + font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + line-height: 10px; + color: #444d56; + vertical-align: middle; + background-color: #fafbfc; + border: solid 1px #d1d5da; + border-bottom-color: #c6cbd1; + border-radius: 3px; + box-shadow: inset 0 -1px 0 #c6cbd1; + } + + .markdown-body :checked+.radio-label { + position: relative; + z-index: 1; + border-color: #0366d6; + } + + .markdown-body .task-list-item { + list-style-type: none; + } + + .markdown-body .task-list-item+.task-list-item { + margin-top: 3px; + } + + .markdown-body .task-list-item input { + margin: 0 0.2em 0.25em -1.6em; + vertical-align: middle; + } + + .markdown-body hr { + border-bottom-color: #eee; + } diff --git a/themes/hexo-theme-xups/source/css/_partial/article.styl b/themes/hexo-theme-xups/source/css/_partial/article.styl new file mode 100644 index 0000000..4be61fd --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/article.styl @@ -0,0 +1,75 @@ +/*! + * Article + */ +.article-nav + padding-bottom 10px + color #888 +.article-share + padding 0 0 15px + .share-area + height 24px + line-height 24px + margin 0 auto + padding-left 10px + text-align left + border-left 3px solid rgba(255, 153, 153, .8) + .share-txt + float left + height 24px + line-height 24px + margin-right 5px + font-size 12px + color c-999 + .share-icon + float left + display inline-block + width 24px + height 24px + margin-right 10px + background url(../img/share.png) no-repeat 0 0 + opacity .9 + &:hover + opacity .7 + &.weibo + background-position 0 0 + &.wechat + background-position 0 -32px + &.qqzone + background-position 0 -65px + &.qq + background-position 0 -98px + &.douban + background-position 0 -324px +.body + box-shadow 0 1px 5px rgba(0, 0, 0, .08) +.article + padding-top 0 !important + padding-bottom 10px + border-bottom 0 +.comments + margin-top 20px +.page-navigator + margin 1em 0 + padding 0 20px + list-style none + .extend + .page-number + display inline-block + margin-right 10px + padding 3px 10px + background-color c-eee + opacity .8 + &.current + color c-fff + background-color #ff5e52 + cursor not-allowed + .extend + a.page-number + transition .5s linear + &:hover + color c-444 + background-color c-ccc + .space + display inline-block + margin-right 10px + padding 3px 0 diff --git a/themes/hexo-theme-xups/source/css/_partial/comment.styl b/themes/hexo-theme-xups/source/css/_partial/comment.styl new file mode 100644 index 0000000..2800bfe --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/comment.styl @@ -0,0 +1,203 @@ +.comment + margin-top 10px + box-sizing border-box + .box + position relative + width 100% + .com-avatar + position absolute + top 2px + left 0 + width 40px + height 40px + img + width 100% + height 100% + border none + border-radius 50% + .com-text + position relative + margin-left 45px + height 120px + border 2px solid c-eee + box-sizing border-box + border-radius 2px + .switch + position absolute + right -2px + top -2px + width 81px + height 10px + line-height 10px + padding 5px 0 + .switch-item + float left + width 40px + height @height + color c-999 + text-center() + font-size 10px + cursor pointer + opacity .8 + :first-child + border-right 1px solid c-ccc + .on + color #ff5e52 + .main + margin 0 + padding 0 + .text-area-edited + display none + width 100% + height 116px + padding 10px + border none + box-sizing border-box + outline none + resize none + .text-area-preview + display none + width 100% + height 116px + padding 10px + border none + box-sizing border-box + overflow auto + @extend $base-style + p + margin 0 + .show + display block + .button + position absolute + bottom -2px + right -2px + width 100px + height 30px + line-height @height + border-radius 0 0 2px 0 + color c-fff + background-color #ff5e52 + text-align center + opacity .8 + cursor pointer + .button:hover + opacity .7 + .sign-bar + height 30px + line-height @height + text-align right + font-size 12px + .sign-link + margin-left 5px + color #ff5e52 + cursor pointer + border none + .sign-txt + color c-999 + .tips + height 30px + line-height @height + margin-left 45px + font-size 12px + color c-999 + .init + color c-999 + float right + .list-wrap + margin-top 10px + .list-header + margin 0 + padding 0 0 0 15px + font-size 12px + border-left 2px solid c-eee + .comments-num + color #ff5e52 + font-size 14px + .list + list-style-type none + margin 0 + padding 0 + .item + position relative + margin 10px 0 + border-bottom 1px solid c-eee + .user-avatar + position absolute + top 0 + left 0 + width 40px + height 40px + img + width 100% + height 100% + border none + border-radius 50% + a + border none + .user-comment + min-height 50px + margin-left 50px + .user-comment-body + margin 5px 0 + color c-666 + word-wrap break-word + word-break normal + @extend $base-style + p + margin 0 + a + border none + color #ff5e52 + .user-comment-header + color c-aaa + position relative + span + margin-right 5px + .post-name + font-size 12px + .post-time + font-size 10px + .like + font-size 10px + color #ff5e52 + cursor pointer + .like.liked + color c-aaa + .like-num + font-size 10px + .reply + position absolute + display none + right 0 + top 3px + font-size 10px + cursor pointer + &:hover + .user-comment-header + .reply + display block + .page-nav + margin-top 10px + text-align right + .item + display inline-block + height 10px + line-height @height + margin 0 2px + padding 8px 10px + font-size 10px + background-color c-eee + opacity .8 + text-align center + border none + .item.current + color c-fff + background-color #ff5e52 + cursor not-allowed + .more + height 10px + line-height @height + padding 8px 5px + font-size 10px + text-align center diff --git a/themes/hexo-theme-xups/source/css/_partial/footer.styl b/themes/hexo-theme-xups/source/css/_partial/footer.styl new file mode 100644 index 0000000..bc442b0 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/footer.styl @@ -0,0 +1,31 @@ +/*! + * 底部 + */ +.footer + padding 30px + color c-aaa + background-color c-444 + font-size 12px + text-center() + opacity .9 + a + color c-aaa +.back-to-top { + display: none; + width: 40px; + height: 39px; + border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + background: #000 url(../img/scrolltoparrow.png) no-repeat center center; + position: fixed; + _position: absolute; + right: 20px; + bottom: 50px; + cursor: pointer; + opacity: .20; + filter: Alpha(opacity=20) !important; + text-indent: -9999px; + overflow: hidden; + z-index: 5 +} \ No newline at end of file diff --git a/themes/hexo-theme-xups/source/css/_partial/header.styl b/themes/hexo-theme-xups/source/css/_partial/header.styl new file mode 100644 index 0000000..b7e45e6 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/header.styl @@ -0,0 +1,160 @@ +/*! + * 头部样式 + */ +.header + width 100% + background-color c-fff + box-shadow 1px 1px 5px rgba(0, 0, 0, .1) + margin-bottom 10px + .header-main + position relative + height 68px + margin-bottom 0 +.header .logo + float left + width 260px +.logo + a + position relative + display block + height 68px + line-height @height + color c-fff + background-color #ff5e52 + opacity .85 + text-center() + overflow hidden + .cover + position absolute + display block + top 0 + left 0 + width 100% + transition top .5s + .name + display block + height 100% + font-size 28px + font-family "HomizioNova", "Microsoft Yahei" + font-style italic + .description + display block + height 100% + color c-fff + background-color #51cc87 + opacity .85 + &:hover .cover + top -100% +.header .menu + margin 0 + padding 10px + float left + list-style-type none +.menu + .item + float left + padding 0 20px + height 48px + line-height @height + font-size 16px + a + color c-666 + &:hover + color #ff5e52 + .current a + color #ff5e52 +.header .profile + position absolute + right 0 + top 0 + height 68px +.profile + .avatar + width 50px + height 50px + margin 8px 0 + border 1px solid c-ddd + border-radius 3px + > img + width 46px + height 46px + margin 2px + .feeds + height 68px + padding 0 10px + color c-666 + font-size 12px + text-right() + .links + margin 5px 0 0 + padding 10px 0 3px + .sns + margin 0 0 5px 0 + padding 2px 0 10px + line-height 14px + a + margin-left 5px + .sinaweibo + b + color #ff5e52 + font-size 14px + &:hover + color #ff5e52 + .qqweibo + b + color #1faeff + font-size 14px + &:hover + color #1faeff + .wechat + position relative + b + color #4bc916 + font-size 14px + .popover + position absolute + display none + top 28px + left 50% + width 120px + height @width + margin-left -60px + border 1px solid c-ddd + background-color c-fff + border-radius 5px + z-index 9 + img + width 120px + height @width + border 0 + border-radius 5px + .arrow + position absolute + display block + top -10px + left 50% + width 0 + height 0 + margin-left -10px + border-width 10px + border-color transparent + border-style solid + border-top-width 0 + border-bottom-color c-ddd + &:after + position absolute + content " " + top 1px + left 50% + margin-left -9px + border-width 9px + border-color transparent + border-style solid + border-top-width 0 + border-bottom-color c-fff + &:hover + color #4bc916 + .popover + display block +.dropnav + display none \ No newline at end of file diff --git a/themes/hexo-theme-xups/source/css/_partial/highlight.styl b/themes/hexo-theme-xups/source/css/_partial/highlight.styl new file mode 100644 index 0000000..bb9bb6c --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/highlight.styl @@ -0,0 +1,140 @@ +// https://github.com/chriskempson/tomorrow-theme +$code-block + background: highlight-background + margin: 20px 0 + padding: 15px + overflow: auto + font-size: $code-font-size + color: highlight-foreground + line-height: $line-height-code-block + +$line-numbers + color: #666 + +pre, code + font-family: $code-font-family +code + word-break: break-all + background: $gainsboro + text-shadow: 0 1px #fff + padding: 0 0.3em +pre + @extend $code-block + code + background: none + text-shadow: none + padding: 0 +.highlight + @extend $code-block + pre + border: none !important + margin: 0 + padding: 1px + table + margin: 0 !important + width: auto !important + border: none !important + td + border: none !important + padding: 0 !important + figcaption + clearfix() + font-size: 0.85em + color: highlight-comment + line-height: 1em + margin-bottom: 1em + a + float: right + .gutter pre + @extend $line-numbers + text-align: right + padding-right: 20px + .line + height: 20px +.gist + margin: 20px 0 + border-style: solid + border-color: $border-color + border-width: 1px 0 + background: highlight-background + padding: 15px $content-desktop-padding 15px 15px + .gist-file + border: none + font-family: $font-family-monospace + margin: 0 + .gist-data + background: none + border: none + .line-numbers + @extend $line-numbers + background: none + border: none + padding: 0 20px 0 0 + .line-data + padding: 0 !important + .highlight + margin: 0 + padding: 0 + border: none + .gist-meta + background: highlight-background + color: highlight-comment + font: 13px $font-family-base + text-shadow: 0 0 + padding: 0 + margin-top: 1em + margin-left: $content-desktop-padding + a + color: color-link + font-weight: normal + &:hover + text-decoration: underline + +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 + color: highlight-orange + .ruby .class .title + .css .rules .attribute + color: highlight-green + .string + .value + .inheritance + .header + .ruby .symbol + .xml .cdata + 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 diff --git a/themes/hexo-theme-xups/source/css/_partial/post.styl b/themes/hexo-theme-xups/source/css/_partial/post.styl new file mode 100644 index 0000000..389fb8c --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/post.styl @@ -0,0 +1,117 @@ +/*! + * 正文内容 + */ +.content + float left + width 100% + min-height 689px +.content-main + margin-right 350px + padding 20px +/*! + * Post + */ +.post + padding 25px 0 + border-bottom 1px solid c-eee + overflow hidden + header + margin 0 0 10px 0 + > a + position relative + display inline-block + margin-right 6px + padding 4px 7px + top -3px + color c-fff + background-color #ff5e52 + font-size 12px + vertical-align baseline + opacity .85 + &:after + position absolute + display block + top 9px + right -4px + width 0 + height 0 + content " " + border-left 4px solid #ff5e52 + border-top 4px solid transparent + border-bottom 4px solid transparent + .post-title + display inline + font-size 20px + font-weight normal + a:hover + border-bottom 1px dotted #ff5e52 + .post-meta + color #888 + font-size 12px + .post-views, + .post-cat, + .post-comments + margin-right 15px + .post-content + position relative + color c-666 + img + max-width 100% + .post-excerpt + position relative + min-height 140px + margin-right 210px + overflow hidden + .post-thumbnail + position absolute + top 0 + right 0 + width 200px + height 140px + overflow hidden + .thumbnail + width 200px + height 140px + border 0 + transition .5s + a:after + content "" + position absolute + left -70px + top 0 + width 140px + height 140px + background-image -moz-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255,.5),rgba(255,255,255,0)) + background-image -webkit-linear-gradient(0deg,rgba(255,255,255,0),rgba(255,255,255,.5),rgba(255,255,255,0)) + transform skewx(-25deg) + -o-transform skewx(-25deg) + -moz-transform skewx(-25deg) + -webkit-transform skewx(-25deg) + &:hover a:after + left 130px + -webkit-transition all .3s ease-in-out + -moz-transition all .3s ease-in-out + -o-transition all .3s ease-in-out + transition all .3s ease-in-out + @extend $base-style + a + border-bottom 1px dotted #ff5e52 + .more a + position absolute + display inline-block + right 0 + bottom 0 + padding 3px 7px + border none + color c-fff + background-color #51cc87 + opacity .8 + &:hover + opacity .75 + blockquote + margin 1em 0 + padding 5px 10px + color c-666 + border-left 4px solid c-eee + p + margin 0 diff --git a/themes/hexo-theme-xups/source/css/_partial/responsive.styl b/themes/hexo-theme-xups/source/css/_partial/responsive.styl new file mode 100644 index 0000000..8fd6955 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/responsive.styl @@ -0,0 +1,104 @@ +/*! + * 响应式媒体查询 + */ +@media screen and (min-width: 1440px) + .container + max-width 1340px + .content + min-height 500px +@media screen and (max-width: 1000px) and (min-width: 960px) + .container + max-width 952px + .content + min-height 500px +@media screen and (max-width: 959px) + .container + margin-bottom 10px + padding 0 10px + .content + min-height 500px + .sidebar + display none + .content-main + margin-right 0 + padding 20px 10px + .header + .header-main + height auto + padding-bottom 10px + .logo + float none + width auto + .profile + display none + .menu + float none + padding 8px 10px + border 1px solid rgba(0, 0, 0, .1) + background-color #fff + border-top 0 + overflow hidden + .item + width 50% + height auto + line-height 1 + padding 8px 0 + font-size 14px + .hidden + display none + .dropnav + position absolute + display block + top 12px + right 20px + width 40px + height @width + padding 0 2px + line-height @height + font-size @height + color #efe0ce + border 2px solid @color + border-radius 2px + z-index 3 + cursor pointer + &:hover + opacity .8 + .post + header .post-title + font-size 15px + .post-meta + text-center() + .post-content + .post-excerpt + margin-right 0 + .post-thumbnail + display none + .more a + position relative + display block + padding 6px + text-center() + .page-navigator + padding-left 0 + .page-number + .space + .extend + margin-right 6px + .page-navigator li + display inline-block + margin-right 7px + opacity .8 + + .page-navigator li a + display block + padding 2px 8px + background-color #eee + .comment + .list-wrap + .list + .user-comment + .user-comment-header + .reply + display block + .page-nav .more + display none diff --git a/themes/hexo-theme-xups/source/css/_partial/searchform.styl b/themes/hexo-theme-xups/source/css/_partial/searchform.styl new file mode 100644 index 0000000..bcc26a8 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/searchform.styl @@ -0,0 +1,22 @@ +/*! + * 搜索框 + */ +.search-form + position relative + padding 10px 70px 0 0 + .form-control + display block + width 100% + padding 5px 5px 5px 10px + border 2px solid c-ddd + border-right 0 + outline 0 + box-shadow 2px 2px 4px rgba(0, 0, 0, .07) inset + .btn + position absolute + top 10px + right 0 + width 70px + padding 7px 0 + &:hover + opacity .75 \ No newline at end of file diff --git a/themes/hexo-theme-xups/source/css/_partial/sidebar.styl b/themes/hexo-theme-xups/source/css/_partial/sidebar.styl new file mode 100644 index 0000000..ec100b8 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/sidebar.styl @@ -0,0 +1,90 @@ +/*! + * Sidebar + */ +.sidebar + float left + width 330px + margin-left -350px + padding-top 20px + padding-bottom 20px + .widget + position relative + margin-bottom 20px + clear both +.widget + ul + margin 0 + padding 0 + .widget-hd + margin 0 + padding 0 + border-bottom 2px solid c-eee + strong + position relative + display inline-block + bottom -2px + color #444 + border-bottom 2px solid #ff5e52 + font-weight normal + .logout + position relative + bottom -2px + font-size 14px + font-weight normal + text-decoration underline + &:hover + text-decoration none + .widget-bd + margin 0 + padding 0 + list-style none + li + display block + padding 10px 0 + line-height 1.5 + border-bottom 1px solid c-eee + font-size 12px + overflow hidden + text-overflow ellipsis + white-space nowrap + a .avatar + float left + width 36px + height 36px + margin-right 10px + border-radius 50% + transform rotate(0) + transition .5s + a:hover .avatar + transform rotate(360deg) + opacity .85 + p + margin 0 + padding 0 + .tag-item + float left + width 32.6666% + margin 0 1% 1% 0 + padding 0 8px + line-height 29px + font-size 12px + color c-999 + background-color #f6f6f6 + -webkit-box-sizing border-box + box-sizing border-box + text-overflow ellipsis + overflow hidden + white-space nowrap + -webkit-transition .5s + -ms-transition .5s + -moz-transition .5s + transition .5s + &:hover + color #fff + background-color #ff5e52 + opacity .85; + .tag-item:nth-child(3n+0) + margin-right 0 + .tag-wrap + padding 10px 0 0 + overflow hidden diff --git a/themes/hexo-theme-xups/source/css/_partial/theme.styl b/themes/hexo-theme-xups/source/css/_partial/theme.styl new file mode 100644 index 0000000..ef23b15 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_partial/theme.styl @@ -0,0 +1,74 @@ +$theme_config = hexo-config("highlight_theme") +/*! + * 高亮样式 + */ + +if $theme_config == "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 + +if $theme_config == "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 + +if $theme_config == "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 + +if $theme_config == "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 + +if $theme_config == "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 diff --git a/themes/hexo-theme-xups/source/css/_variables.styl b/themes/hexo-theme-xups/source/css/_variables.styl new file mode 100644 index 0000000..b894a98 --- /dev/null +++ b/themes/hexo-theme-xups/source/css/_variables.styl @@ -0,0 +1,55 @@ +// 公共变量 +c-333 = #333 +c-444 = #444 +c-555 = #555 +c-666 = #666 +c-999 = #999 +c-aaa = #aaa +c-ccc = #ccc +c-ddd = #ddd +c-eee = #eee +c-fff = #fff +// 公共函数 +text-center() + text-align center +text-left() + text-align left +text-right() + text-align right +box-sizing() + -ms-box-sizing arguments + -moz-box-sizing arguments + -webkit-box-sizing arguments + -o-box-sizing arguments + box-sizing arguments +transition() + -ms-transition: arguments + -moz-transition arguments + -webkit-transition arguments + -o-transition arguments + transition arguments +border-radius() + -ms-border-radius arguments + -moz-border-radius arguments + -webkit-border-radius arguments + -o-border-radius arguments + border-radius arguments +transform() + -ms-transform arguments + -moz-transform arguments + -webkit-transform arguments + -o-transform arguments + transform arguments +clearfix() + clear both + zoom 1 + +// 高亮样式变量 +$code-font-size = 13px +$line-height-code-block = 1.6 +$code-font-family = "Input Mono", "PT Mono", Consolas, Monaco, Menlo, monospace +$gainsboro = #eee +$border-color = #ccc +$content-desktop-padding = 15px +$font-family-base = Consolas, Monaco, Menlo, monospace +$font-family-monospace = monospace \ No newline at end of file diff --git a/themes/hexo-theme-xups/source/css/fonts/homizio-nova/italic.otf b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/italic.otf new file mode 100644 index 0000000..92d20bb Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/italic.otf differ diff --git a/themes/hexo-theme-xups/source/css/fonts/homizio-nova/italic.ttf b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/italic.ttf new file mode 100644 index 0000000..390a8de Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/italic.ttf differ diff --git a/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light.otf b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light.otf new file mode 100644 index 0000000..368e36f Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light.otf differ diff --git a/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light.ttf b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light.ttf new file mode 100644 index 0000000..e632ca4 Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light.ttf differ diff --git a/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light_italic.otf b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light_italic.otf new file mode 100644 index 0000000..0ed703e Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light_italic.otf differ diff --git a/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light_italic.ttf b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light_italic.ttf new file mode 100644 index 0000000..5ce39a9 Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/light_italic.ttf differ diff --git a/themes/hexo-theme-xups/source/css/fonts/homizio-nova/regular.otf b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/regular.otf new file mode 100644 index 0000000..65eea05 Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/regular.otf differ diff --git a/themes/hexo-theme-xups/source/css/fonts/homizio-nova/regular.ttf b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/regular.ttf new file mode 100644 index 0000000..0fdd240 Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/homizio-nova/regular.ttf differ diff --git a/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.eot b/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.eot new file mode 100644 index 0000000..d2dbb05 Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.eot differ diff --git a/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.svg b/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.svg new file mode 100644 index 0000000..fc2717a --- /dev/null +++ b/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.svg @@ -0,0 +1,24 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.ttf b/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.ttf new file mode 100644 index 0000000..e69de29 diff --git a/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.woff b/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.woff new file mode 100644 index 0000000..f823fda Binary files /dev/null and b/themes/hexo-theme-xups/source/css/fonts/icomoon/icomoon.woff differ diff --git a/themes/hexo-theme-xups/source/css/style.styl b/themes/hexo-theme-xups/source/css/style.styl new file mode 100644 index 0000000..49ff2cb --- /dev/null +++ b/themes/hexo-theme-xups/source/css/style.styl @@ -0,0 +1,58 @@ +@charset "UTF-8" +@import "_variables" +@import "_extend" +$comment_config = hexo-config("comment.enable") + +// 字体样式 +//----------------------------------------------- +@import "_base/font" + +// Normalize +//----------------------------------------------- +@import "_base/normalize" + +// Reset +//----------------------------------------------- +@import "_base/reset" + +// Global +//----------------------------------------------- +@import "_base/global" + +// 头部样式 +//----------------------------------------------- +@import "_partial/header" + +// 文章列表样式 +//----------------------------------------------- +@import "_partial/post" + +// 代码高亮样式 +//----------------------------------------------- +@import "_partial/theme" +@import "_partial/highlight" + +// 搜索框样式 +//----------------------------------------------- +@import "_partial/searchform" + +// 侧栏样式 +//----------------------------------------------- +@import "_partial/sidebar" + +// 文章正文样式 +//----------------------------------------------- +@import "_partial/article" + +// 博客底部样式 +//----------------------------------------------- +@import "_partial/footer" + +// 评论框样式 +//----------------------------------------------- +if $comment_config + @import "_partial/comment" + +// 响应式样式 +//----------------------------------------------- +@import "_partial/responsive" diff --git a/themes/hexo-theme-xups/source/img/default.png b/themes/hexo-theme-xups/source/img/default.png new file mode 100644 index 0000000..168a11c Binary files /dev/null and b/themes/hexo-theme-xups/source/img/default.png differ diff --git a/themes/hexo-theme-xups/source/img/jelon.jpg b/themes/hexo-theme-xups/source/img/jelon.jpg new file mode 100644 index 0000000..c565927 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/jelon.jpg differ diff --git a/themes/hexo-theme-xups/source/img/lab/banner.jpg b/themes/hexo-theme-xups/source/img/lab/banner.jpg new file mode 100644 index 0000000..29f025c Binary files /dev/null and b/themes/hexo-theme-xups/source/img/lab/banner.jpg differ diff --git a/themes/hexo-theme-xups/source/img/loading.gif b/themes/hexo-theme-xups/source/img/loading.gif new file mode 100644 index 0000000..227509e Binary files /dev/null and b/themes/hexo-theme-xups/source/img/loading.gif differ diff --git a/themes/hexo-theme-xups/source/img/no_found.png b/themes/hexo-theme-xups/source/img/no_found.png new file mode 100644 index 0000000..4cb97e6 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/no_found.png differ diff --git a/themes/hexo-theme-xups/source/img/scrolltoparrow.png b/themes/hexo-theme-xups/source/img/scrolltoparrow.png new file mode 100644 index 0000000..1ebad0d Binary files /dev/null and b/themes/hexo-theme-xups/source/img/scrolltoparrow.png differ diff --git a/themes/hexo-theme-xups/source/img/share.png b/themes/hexo-theme-xups/source/img/share.png new file mode 100644 index 0000000..fe727fa Binary files /dev/null and b/themes/hexo-theme-xups/source/img/share.png differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/0.jpg b/themes/hexo-theme-xups/source/img/thumbnail/0.jpg new file mode 100644 index 0000000..26626df Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/0.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/1.jpg b/themes/hexo-theme-xups/source/img/thumbnail/1.jpg new file mode 100644 index 0000000..70bcbca Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/1.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/2.jpg b/themes/hexo-theme-xups/source/img/thumbnail/2.jpg new file mode 100644 index 0000000..126c8e6 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/2.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/3.jpg b/themes/hexo-theme-xups/source/img/thumbnail/3.jpg new file mode 100644 index 0000000..1776cfd Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/3.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/4.jpg b/themes/hexo-theme-xups/source/img/thumbnail/4.jpg new file mode 100644 index 0000000..042fbfa Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/4.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/5.jpg b/themes/hexo-theme-xups/source/img/thumbnail/5.jpg new file mode 100644 index 0000000..cc20743 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/5.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/6.jpg b/themes/hexo-theme-xups/source/img/thumbnail/6.jpg new file mode 100644 index 0000000..e095679 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/6.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/7.jpg b/themes/hexo-theme-xups/source/img/thumbnail/7.jpg new file mode 100644 index 0000000..eca60f6 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/7.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/8.jpg b/themes/hexo-theme-xups/source/img/thumbnail/8.jpg new file mode 100644 index 0000000..622e588 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/8.jpg differ diff --git a/themes/hexo-theme-xups/source/img/thumbnail/9.jpg b/themes/hexo-theme-xups/source/img/thumbnail/9.jpg new file mode 100644 index 0000000..8c706e6 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/thumbnail/9.jpg differ diff --git a/themes/hexo-theme-xups/source/img/unsigned_avatar.jpg b/themes/hexo-theme-xups/source/img/unsigned_avatar.jpg new file mode 100644 index 0000000..2667d09 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/unsigned_avatar.jpg differ diff --git a/themes/hexo-theme-xups/source/img/url.png b/themes/hexo-theme-xups/source/img/url.png new file mode 100644 index 0000000..610fecd Binary files /dev/null and b/themes/hexo-theme-xups/source/img/url.png differ diff --git a/themes/hexo-theme-xups/source/img/wechat_jelon.png b/themes/hexo-theme-xups/source/img/wechat_jelon.png new file mode 100644 index 0000000..7cddc1e Binary files /dev/null and b/themes/hexo-theme-xups/source/img/wechat_jelon.png differ diff --git a/themes/hexo-theme-xups/source/img/wechat_mp.jpg b/themes/hexo-theme-xups/source/img/wechat_mp.jpg new file mode 100644 index 0000000..2ec298e Binary files /dev/null and b/themes/hexo-theme-xups/source/img/wechat_mp.jpg differ diff --git a/themes/hexo-theme-xups/source/img/wechat_pay.png b/themes/hexo-theme-xups/source/img/wechat_pay.png new file mode 100644 index 0000000..a05d213 Binary files /dev/null and b/themes/hexo-theme-xups/source/img/wechat_pay.png differ diff --git a/themes/hexo-theme-xups/source/js/comment.js b/themes/hexo-theme-xups/source/js/comment.js new file mode 100644 index 0000000..484ebed --- /dev/null +++ b/themes/hexo-theme-xups/source/js/comment.js @@ -0,0 +1,943 @@ +if (!window['String']['prototype']['trim']) { + window['String']['prototype']['trim'] = function () { + return this.replace(/^\s+|\s+$/g, ''); + }; +} +var JELON = window.JELON || {}; +;(function (JL) { + var constants = { + ACCESS_TOKEN_KEY: 'xups-github-comments-token', // access_token key + USER_INFO_KEY: 'xups-github-user-info', // 登录用户信息 key + PER_PAGE: 5, // 每页的评论数 + API_HOST: 'https://api.github.com' + }; + var queryUrl = function (key, url, uncode) { + url = url || location.href; + var reg = new RegExp('(\\?|&|#|&)' + key + '=([^?&#]*)'); + var result = url.match(reg); + if (uncode) { + return result ? result[2] : ''; + } + return result ? decodeURIComponent(result[2]) : ''; + }; + var $ = JL.$ || function(str) { + return /^(\[object HTML)[a-zA-Z]*(Element\])$/.test(Object.prototype.toString.call(str)) ? str : document.getElementById(str); + }; + var addClass = function (elem, className) { + if (!elem) return; + var classNames; + var setClass; + var i, l, cl; + if (elem instanceof Array) { + for (i = 0, l = elem.length; i < l; i++) { + elem[i] = arguments.callee.call(this, elem[i], className); + } + } else if (typeof elem.item === 'function') { + var result = []; + for (i = 0, l = elem.length; i < l; i++) { + result.push(arguments.callee.call(this, elem.item(i), className)); + } + elem = result; + } else { + elem = $(elem); + if (!elem) return; + if (className && typeof className === 'string') { + classNames = className.split(/\s+/); + if (elem.nodeType === 1) { + if (!elem.className && classNames.length === 1) { + elem.className = className; + } else { + setClass = ' ' + elem.className + ' '; + for (i = 0, cl = classNames.length; i < cl; i++) { + if (setClass.indexOf(' ' + classNames[i] + ' ') < 0) { + setClass += classNames[i] + ' '; + } + } + elem.className = setClass.trim(); + } + } + } + } + return elem; + }; + var removeClass = function (elem, className) { + if (!elem) return; + var classNames, i, l, c, cl; + if (elem instanceof Array) { + for (i = 0, l = elem.length; i < l; i++) { + elem[i] = arguments.callee.call(this, elem[i], className); + } + } else if (typeof elem.item === 'function') { + var result = []; + for (i = 0, l = elem.length; i < l; i++) { + result.push(arguments.callee.call(this, elem.item(i), className)); + } + elem = result; + } else { + elem = $(elem); + if (!elem) return; + if ((className && typeof className === 'string') || className === undefined) { + classNames = (className || '').split(/\s+/); + if (elem.nodeType === 1 && elem.className) { + if (className) { + className = (' ' + elem.className + ' ').replace(/[\n\t\r]/g, ' '); + for (c = 0, cl = classNames.length; c < cl; c++) { + className = className.replace(' ' + classNames[c] + ' ', ' '); + } + elem.className = className.trim(); + } else { + elem.className = ''; + } + } + } + } + return elem; + }; + /** + * 格式化日期文本,如 yyyy-MM-dd hh:mm:ss + */ + var formatDate = function (format, date) { + if (!date) return ''; + if (typeof date == 'number') date = new Date(date * 1000); + var o = { + 'M+': date.getMonth() + 1, + 'd+': date.getDate(), + 'h+': date.getHours(), + 'm+': date.getMinutes(), + 's+': date.getSeconds(), + 'q+': Math.floor((date.getMonth() + 3) / 3), + 'S': date.getMilliseconds(), + 'w': '日一二三四五六'.charAt(date.getDay()) + }; + format = format.replace(/y{4}/, date.getFullYear()).replace(/y{2}/, date.getFullYear().toString().substring(2)); + for (var k in o) { + var reg = new RegExp(k); + format = format.replace(reg, match); + } + function match(m) { + return m.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length); + } + return format; + }; + var htmlEncode = function (str) { + if (typeof str !== 'string') return; + str = str.replace(/&/g, '&') + .replace(//g, '>') + .replace(/\"/g, '"') + .replace(/\'/g, ''') + .replace(/ /g, ' '); + return str; + }; + + /** + * 封装ajax函数 + * @param {String} opt.method 连接的方式,包括POST和GET两种方式 + * @param {String} opt.url 发送请求的url + * @param {Boolean} opt.async 是否为异步请求,true为异步的,false为同步的 + * @param {Object} opt.data 发送的参数,格式为对象类型 + * @param {Function} opt.success 发送并接收成功调用的回调函数 + * @param {Function} opt.fail 失败回调 + */ + var ajax = function (opt) { + opt = opt || {}; + opt.method = opt.method.toUpperCase() || 'POST'; + opt.url = opt.url || ''; + opt.async = opt.async || true; + opt.data = opt.data || null; + opt.success = opt.success || function () {}; + var xhr = null; + if (window.XMLHttpRequest) { + xhr = new XMLHttpRequest(); + } else { + xhr = new ActiveXObject('Microsoft.XMLHTTP'); + } + var params = []; + var token = window.localStorage.getItem(constants.ACCESS_TOKEN_KEY); + + for (var key in opt.data) { + params.push(key + '=' + opt.data[key]); + } + var postData = params.join('&'); + if (opt.method.toUpperCase() === 'POST') { + xhr.open(opt.method, opt.url, opt.async); + if (window.JSON) { + postData = JSON.stringify(opt.data); + xhr.setRequestHeader('Content-Type', 'application/json;charset=utf-8'); + } else { + xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=utf-8'); + } + if (opt.headers && opt.headers['Accept']) { + xhr.setRequestHeader('Accept', opt.headers['Accept']); + } else { + xhr.setRequestHeader('Accept', 'application/vnd.github.squirrel-girl-preview, application/vnd.github.html+json'); + } + // 登录校验 + if (token) { + xhr.setRequestHeader('Authorization', 'token ' + token); + } + xhr.send(postData); + } else if (opt.method.toUpperCase() === 'GET') { + xhr.open(opt.method, opt.url + '?' + postData, opt.async); + xhr.setRequestHeader('Accept', 'application/vnd.github.squirrel-girl-preview, application/vnd.github.html+json'); + // 登录校验 + if (token) { + xhr.setRequestHeader('Authorization', 'token ' + token); + } + xhr.send(null); + } + + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + if (xhr.status >= 200 && xhr.status < 300) { + opt.success && opt.success(xhr.responseText); + } else { + opt.fail && opt.fail(xhr.status) + } + } + }; + xhr.onerror = function () { + opt.fail && opt.fail({ message: '请求错误!' }); + }; + }; + JL.issueComments = 0; + JL.issueNumber = 0; + JL.Utils = { + ajax: ajax, + queryUrl: queryUrl, + addClass: addClass, + removeClass: removeClass, + formatDate: formatDate + }; + JL.Renders = { + box: { + tpl: [ + '
', + '
avatar
', + '
', + '
', + '', + '
', + '
', + '
', + '
编辑
', + '
预览
', + '
', + '
提交
', + '
', + '
' + ].join(''), + update: function () { + var userInfo = localStorage.getItem(constants.USER_INFO_KEY); + if (userInfo) { + userInfo = JSON.parse(userInfo); + } else { + userInfo = {}; + } + // 默认头像路径 /img/jelon.jpg + $('JELON__loginAvatar').src = userInfo.avatar_url || '/img/unsigned_avatar.jpg'; + } + }, + list: { + tpl: [ + '
', + '
正在加载评论
', + '
' + ].join(''), + /** + * 评论列表模块视图更新 + * @param {Number} page 评论列表当前页码 + * @param {Number} comments 当前文章下所有评论总数 + * @param {Number} list 当前列表下评论列表数据 + * @param {Function} callback 回调 + * @return void(0) + */ + update: function (page, comments, list, callback) { + var perNavPageMaxSize = 5; + var html = ''; + var htmlList = []; + var pageList = []; + var allPages = Math.ceil(comments / constants.PER_PAGE); + if (comments === 0) { + html = '
暂无评论
'; + } else { + var item = ''; + var pageItem = ''; + for (var i = 0, len = list.length; i < len; i++) { + item = [ + '
  • ', + '
    ', + '', + 'user-avatar', + '', + '
    ', + '
    ', + '
    ', + '' + list[i].user.login + '', + '' + formatDate('yyyy-MM-dd hh:mm', new Date(list[i].created_at)) + '', + '', + '', + '回复', + '
    ', + '
    ' + (list[i].body_html || list[i].body) + '
    ', + '
    ', + '
  • ' + ].join(''); + htmlList.push(item); + } + if (allPages === 1) { + pageItem = '' + page + ''; + pageList.push(pageItem); + } else if (allPages <= perNavPageMaxSize) { + for (var i = 1; i <= allPages; i++) { + if (i === page) { + pageItem = '' + page + ''; + } else { + pageItem = '' + i + ''; + } + pageList.push(pageItem); + } + if (page !== 1) { + pageList.unshift('上页'); + } + if (page !== allPages) { + pageList.push('下页'); + } + } else if (allPages > perNavPageMaxSize) { + if (page <= perNavPageMaxSize) { + for (var i = 1; i <= perNavPageMaxSize; i++) { + if (i === page) { + pageItem = '' + page + ''; + } else { + pageItem = '' + i + ''; + } + pageList.push(pageItem); + } + if (page !== 1) { + pageList.unshift('上页'); + } + pageList.push('...'); + pageList.push('下页'); + pageList.push('末页'); + } else if (page > perNavPageMaxSize && page <= allPages - perNavPageMaxSize) { + var mod = page % perNavPageMaxSize; + var start = Math.floor(page / perNavPageMaxSize) * perNavPageMaxSize + 1; + var end = Math.ceil(page / perNavPageMaxSize) * perNavPageMaxSize; + pageList.push('首页'); + pageList.push('上页'); + for (var i = start; i <= end; i++) { + if (i === page) { + pageItem = '' + page + ''; + } else { + pageItem = '' + i + ''; + } + pageList.push(pageItem); + } + + pageList.push('...'); + pageList.push('下页'); + pageList.push('末页'); + } else if (page > perNavPageMaxSize && page > allPages - perNavPageMaxSize) { + var start = allPages - perNavPageMaxSize + 1; + var end = allPages; + pageList.push('首页'); + pageList.push('上页'); + for (var i = start; i <= end; i++) { + if (i === page) { + pageItem = '' + page + ''; + } else { + pageItem = '' + i + ''; + } + pageList.push(pageItem); + } + if (page !== allPages) { + pageList.push('下页'); + } + } + } + html = [ + '
    总共 ' + JL.issueComments + ' 条评论
    ', + '', + '' + ].join(''); + } + $('JELON__commentList').innerHTML = html; + if (localStorage.getItem(constants.USER_INFO_KEY)) { + callback && callback(); + } + }, + reactionUpdate: function (commentId, reactions) { + var userInfo = localStorage.getItem(constants.USER_INFO_KEY); + if (userInfo) { + userInfo = JSON.parse(userInfo); + } else { + return; + } + var userId = userInfo.id; + for (var i = 0, len = reactions.length; i < len; i++) { + if (userId === reactions[i].user.id) { + console.log(userId, reactions[i].user.id); + addClass($('JELON__comment_' + commentId + '_reactions').getElementsByClassName('like')[0], 'liked'); + $('JELON__comment_' + commentId + '_reactions').getElementsByClassName('like')[0].innerHTML = '已赞'; + break; + } + } + }, + addOne: function (data) { + var oLi = document.createElement('li'); + oLi.className = 'item'; + var item = [ + '
    ', + '', + 'user-avatar', + '', + '
    ', + '
    ', + '
    ', + '' + data.user.login + '', + '' + formatDate('yyyy-MM-dd hh:mm', new Date(data.created_at)) + '', + '', + '', + '回复', + '
    ', + '
    ' + (data.body_html || data.body) + '
    ', + '
    ' + ].join(''); + oLi.innerHTML = item; + var oUl = $('JELON__commentList').getElementsByTagName('ul')[0]; + if (oUl) { + oUl.insertBefore(oLi, oUl.firstChild); + $('JELON__commentsNum').innerHTML = JL.issueComments + 1; + } else { + $('JELON__commentList').innerHTML = [ + '
    总共 ' + (JL.issueComments + 1) + ' 条评论
    ', + '' + ].join(''); + } + } + }, + signBar: { + tpl: [ + '
    ', + '
    ' + ].join(''), + update: function () { + var token = localStorage.getItem(constants.ACCESS_TOKEN_KEY); + var userInfo = localStorage.getItem(constants.USER_INFO_KEY); + var html = ''; + if (token && userInfo) { + userInfo = JSON.parse(userInfo); + html = [ + 'GitHub 已登录!', + '退出' + ].join(''); + } else { + html = [ + 'GitHub 未登录?', + '', + '登录', + '' + ].join(''); + } + $('JELON__commentSignBar').innerHTML = html; + } + }, + tips: { + tpl: '
    注:评论支持 markdown 语法!
    ', + update: function () { + var userInfo = localStorage.getItem(constants.USER_INFO_KEY); + var handler = ''; + // 如果文章还没关联 issue 并且登录账号是自己时 + if (userInfo && JSON.parse(userInfo).login === JL.options.owner && JL.issueNumber === 0) { + handler = '初始化评论'; + } + $('JELON__comment_tips').innerHTML = handler + '注:评论支持 markdown 语法!'; + } + }, + flashTitle: function (title) { + var counter = 0; + document.title = title + '...'; + var timer = setInterval(function () { + counter++; + if (counter % 3 === 0) { + document.title = title + '...'; + } else if (counter % 3 === 1) { + document.title = title + '..'; + } else if (counter % 3 === 2) { + document.title = title + '.'; + } + }, 100); + }, + loading: { + create: function (oParent) { + oParent = oParent || document.body; + var oLoading = document.createElement('div'); + oLoading.className = 'loading-mask'; + oLoading.id = 'JELON__loadingMask'; + oLoading.innerHTML = '
    加载中
    '; + oParent.appendChild(oLoading); + }, + remove: function () { + var oLoading = $('JELON__loadingMask'); + oLoading.parentNode.removeChild(oLoading); + } + } + }; + JL.Actions = { + init: function () { + var code = queryUrl('code'); + JL.Renders.signBar.update(); + JL.Renders.box.update(); + // if code,继续GitHub 授权 + if (code) { + JL.Renders.loading.create(); + JL.Renders.flashTitle('登录中'); + JL.Requests.getAccessToken({ + client_id: JL.options.clientId, + client_secret: JL.options.clientSecret, + code: code + }, function (res) { + if (res.access_token || res.data) { + if (res.data) { + res.access_token = res.data.access_token; + } + localStorage.setItem(constants.ACCESS_TOKEN_KEY, res.access_token); // 保存 access_token 至 localStorage + JL.Requests.getUserInfo({ access_token: res.access_token }, function (res) { + if (res.login) { + localStorage.setItem(constants.USER_INFO_KEY, JSON.stringify(res)); // 保存用户信息到 localStorage + location.href = location.href.substring(0, location.href.indexOf('?')); + JL.Renders.loading.remove(); + } + }); + } else { + // 登录失败 + location.href = location.href.substring(0, location.href.indexOf('?')); + JL.Renders.loading.remove(); + } + }); + } else { + JL.Requests.getIssueNumberByLabel(JL.options.label, function (res) { + if (res.length > 0) { + var number = res[0].number; + var comments = res[0].comments; // 该 issue 下所有评论数 + JL.issueNumber = number; + JL.issueComments = comments; + JL.Requests.getCommentListByIssueNumber(number, { + page: 1, + per_page: constants.PER_PAGE + }, function (list) { + JL.Renders.list.update(1, comments, list, function () { + for (var i = 0, len = list.length; i < len; i++) { + (function (commentId) { + JL.Requests.getReactionsByCommentId(commentId, { content: 'heart' }, function (reactions) { + JL.Renders.list.reactionUpdate(commentId, reactions); + }); + }(list[i].id)); + } + }); + }); + } else { + // 授权码失效 + if (typeof res !== 'object') { + localStorage.removeItem(constants.ACCESS_TOKEN_KEY); + localStorage.removeItem(constants.USER_INFO_KEY); + JL.Renders.signBar.update(); + JL.Renders.box.update(); + console.warn('登录失败,请稍后刷新再试'); + } else { + JL.Renders.list.update(1, 0, []); + JL.Renders.tips.update(); + } + } + }); + } + }, + signOut: function () { + localStorage.removeItem(constants.ACCESS_TOKEN_KEY); + localStorage.removeItem(constants.USER_INFO_KEY); + JL.Renders.signBar.update(); + JL.Renders.box.update(); + }, + pageJump: function (page) { + JL.Requests.getCommentListByIssueNumber(JL.issueNumber, { + page: Number(page), + per_page: constants.PER_PAGE + }, function (list) { + JL.Renders.list.update(page, JL.issueComments, list, function () { + for (var i = 0, len = list.length; i < len; i++) { + (function (commentId) { + JL.Requests.getReactionsByCommentId(commentId, { content: 'heart' }, function (reactions) { + JL.Renders.list.reactionUpdate(commentId, reactions); + }); + }(list[i].id)); + } + }); + }); + }, + editPreviewSwitch: function (flag) { + if (flag === 'edit') { + removeClass('JELON__previewSwitcher', 'on'); + addClass('JELON__editSwitcher', 'on'); + removeClass('JELON__previewBox', 'show'); + addClass('JELON__editBox', 'show'); + } else { + removeClass('JELON__editSwitcher', 'on'); + addClass('JELON__previewSwitcher', 'on'); + removeClass('JELON__editBox', 'show'); + addClass('JELON__previewBox', 'show'); + var text = $('JELON__editBox').value.trim(); + // 安全转义 + text = htmlEncode(text); + if (text) { + JL.Requests.markdown({ + text: text, + mode: 'markdown', + context: 'github/gollum' + }, function (res) { + $('JELON__previewBox').innerHTML = res; + }); + } else { + $('JELON__previewBox').innerHTML = ''; + } + } + }, + postComment: function () { + var accessToken = localStorage.getItem(constants.ACCESS_TOKEN_KEY); + var userInfo = localStorage.getItem(constants.USER_INFO_KEY); + if (!accessToken || !userInfo) { + alert('请先登录哦..!^_^'); + return; + } + var body = $('JELON__editBox').value.trim(); + // 安全转义 + body = htmlEncode(body); + if (body) { + JL.Renders.loading.create(); + if (JL.issueNumber !== 0) { + JL.Requests.createComment(JL.issueNumber, { + body: body + }, function (res) { + if (res.id) { + JL.Renders.list.addOne(res); + JL.issueComments++; + $('JELON__editBox').value = ''; + $('JELON__previewBox').innerHTML = ''; + } + JL.Renders.loading.remove(); + }); + } else { + // 如果还没有创建 issue,先创建 issue + JL.Requests.createIssue({ + title: document.title, + body: location.href, + labels: [ (JL.options.label || location.href) ] + }, function (res) { + if (res.number) { + JL.issueNumber = res.number + JL.Requests.createComment(JL.issueNumber, { + body: body + }, function (json) { + if (res.id) { + JL.Renders.list.addOne(json); + JL.issueComments++; + $('JELON__editBox').value = ''; + $('JELON__previewBox').innerHTML = ''; + } + JL.Renders.loading.remove(); + }); + } + }); + } + } + }, + like: function (commentId) { + var oLiked = $('JELON__comment_' + commentId + '_reactions').getElementsByClassName('liked'); + var oLike = $('JELON__comment_' + commentId + '_reactions').getElementsByClassName('like')[0]; + var oNum = $('JELON__comment_' + commentId + '_reactions').getElementsByClassName('like-num')[0]; + var accessToken = localStorage.getItem(constants.ACCESS_TOKEN_KEY); + var userInfo = localStorage.getItem(constants.USER_INFO_KEY); + if (oLiked.length) { + return false; + } else { + if (accessToken && userInfo) { + JL.Requests.createReaction(commentId, { content: 'heart' }, function (res) { + if (res.content === 'heart') { + addClass(oLike, 'liked'); + oLike.innerHTML = '已赞'; + oNum.innerHTML = Number(oNum.innerHTML) + 1; + } + }); + } + } + }, + createIssue: function () { + JL.Renders.loading.create(); + JL.Requests.createIssue({ + title: document.title, + body: location.href, + labels: [ (JL.options.label || location.href) ] + }, function (json) { + if (json.number) { + JL.issueNumber = json.number; + JL.Renders.tips.update(); + } + JL.Renders.loading.remove(); + }); + }, + reply: function (people, content) { + var accessToken = localStorage.getItem(constants.ACCESS_TOKEN_KEY); + var userInfo = localStorage.getItem(constants.USER_INFO_KEY); + if (!accessToken || !userInfo) { + return; + } + JL.Actions.editPreviewSwitch('edit'); + $('JELON__editBox').value = ''; + $('JELON__editBox').focus(); + $('JELON__editBox').value = [ + '@' + people + '\n', + '> ' + content + '\n', + '\n' + ].join(''); + $('JELON__previewBox').innerHTML = ''; + } + }; + JL.Requests = { + getIssueNumberByLabel: function (label, callback) { + ajax({ + url: constants.API_HOST + '/repos/' + JL.options.owner + '/' + JL.options.repo + '/issues', + method: 'GET', + data: { + labels: [ label ], + rnd: Math.random() + }, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + createIssue: function (data, callback) { + ajax({ + url: constants.API_HOST + '/repos/' + JL.options.owner + '/' + JL.options.repo + '/issues', + method: 'POST', + data: data, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + getCommentListByIssueNumber: function (number, data, callback) { + ajax({ + url: constants.API_HOST + '/repos/' + JL.options.owner + '/' + JL.options.repo + '/issues/' + number + '/comments', + method: 'GET', + data: data, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + getReactionsByCommentId: function (id, data, callback) { + if (typeof data === 'object' && !data.rnd) { + data.rnd = Math.random(); + } + ajax({ + url: constants.API_HOST + '/repos/' + JL.options.owner + '/' + JL.options.repo + '/issues/comments/' + id + '/reactions', + method: 'GET', + data: data, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + editIssue: function (number, data, callback) { + ajax({ + url: constants.API_HOST + '/repos/' + JL.options.owner + '/' + JL.options.owner + '/issues/' + number, + method: 'POST', + data: data, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + markdown: function (data, callback) { + ajax({ + url: constants.API_HOST + '/markdown', + method: 'POST', + data: data, + success: function (res) { + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + getAccessToken: function (data, callback) { + ajax({ + // url: 'https://gh-oauth.imsun.net/', + url: 'https://cors-anywhere.herokuapp.com/https://github.com/login/oauth/access_token', + method: 'POST', + headers: { + 'Accept': 'application/json' + }, + data: data, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + getUserInfo: function (data, callback) { + ajax({ + url: constants.API_HOST + '/user', + method: 'GET', + data: data, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + createComment: function (number, data, callback) { + ajax({ + url: constants.API_HOST + '/repos/' + JL.options.owner + '/' + JL.options.repo + '/issues/' + number + '/comments', + method: 'POST', + data: data, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + }, + createReaction: function (commentId, data, callback) { + ajax({ + url: constants.API_HOST + '/repos/' + JL.options.owner + '/' + JL.options.repo + '/issues/comments/' + commentId + '/reactions', + method: 'POST', + data: data, + success: function (res) { + if (typeof res === 'string') { + if (window.JSON) { + res = JSON.parse(res); + } else { + res = eval('(' + res + ')'); + } + } + callback && callback(res); + }, + fail: function (err) { + callback && callback(err); + } + }); + } + }; + JL.Comment = function (options) { + JL.options = options || {}; + var $container = $('comments'); + if (options.container) { + if (typeof options.container === 'object') { + $container = options.container; + } else if (typeof options.container === 'string') { + if (/^#/.test(options.container)) { + $container = $(options.container.replace(/^#/, '')); + } else { + $container = $(options.container); + } + } else { + $container = $('comments'); + } + } + $container.innerHTML = [ + this.Renders.signBar.tpl, + this.Renders.box.tpl, + this.Renders.tips.tpl, + this.Renders.list.tpl + ].join(''); + JL.Actions.init(); + }; +})(JELON); diff --git a/themes/hexo-theme-xups/source/js/html5.js b/themes/hexo-theme-xups/source/js/html5.js new file mode 100644 index 0000000..e1297a2 --- /dev/null +++ b/themes/hexo-theme-xups/source/js/html5.js @@ -0,0 +1 @@ +(function(a,b){function h(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function i(){var a=l.elements;return typeof a=="string"?a.split(" "):a}function j(a){var b={},c=a.createElement,f=a.createDocumentFragment,g=f();a.createElement=function(a){if(!l.shivMethods)return c(a);var f;return b[a]?f=b[a].cloneNode():e.test(a)?f=(b[a]=c(a)).cloneNode():f=c(a),f.canHaveChildren&&!d.test(a)?g.appendChild(f):f},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(a){return c(a),g.createElement(a),'c("'+a+'")'})+");return n}")(l,g)}function k(a){var b;return a.documentShived?a:(l.shivCSS&&!f&&(b=!!h(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),g||(b=!j(a)),b&&(a.documentShived=b),a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,f,g;(function(){var c=b.createElement("a");c.innerHTML="",f="hidden"in c,f&&typeof injectElementWithStyles=="function"&&injectElementWithStyles("#modernizr{}",function(b){b.hidden=!0,f=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).display=="none"}),g=c.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var l={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:k};a.html5=l,k(b)})(this,document) \ No newline at end of file diff --git a/themes/hexo-theme-xups/source/js/main.js b/themes/hexo-theme-xups/source/js/main.js new file mode 100644 index 0000000..c44d0ea --- /dev/null +++ b/themes/hexo-theme-xups/source/js/main.js @@ -0,0 +1,210 @@ +/*! echo-js v1.7.3 | (c) 2016 @toddmotto | https://github.com/toddmotto/echo */ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + define(function() { + return factory(root); + }); + } else if (typeof exports === 'object') { + module.exports = factory; + } else { + root.echo = factory(root); + } +})(this, function(root) { + + 'use strict'; + + var echo = {}; + + var callback = function() {}; + + var offset, poll, delay, useDebounce, unload; + + var isHidden = function(element) { + return (element.offsetParent === null); + }; + + var inView = function(element, view) { + if (isHidden(element)) { + return false; + } + + var box = element.getBoundingClientRect(); + return (box.right >= view.l && box.bottom >= view.t && box.left <= view.r && box.top <= view.b); + }; + + var debounceOrThrottle = function() { + if (!useDebounce && !!poll) { + return; + } + clearTimeout(poll); + poll = setTimeout(function() { + echo.render(); + poll = null; + }, delay); + }; + + echo.init = function(opts) { + opts = opts || {}; + var offsetAll = opts.offset || 0; + var offsetVertical = opts.offsetVertical || offsetAll; + var offsetHorizontal = opts.offsetHorizontal || offsetAll; + var optionToInt = function(opt, fallback) { + return parseInt(opt || fallback, 10); + }; + offset = { + t: optionToInt(opts.offsetTop, offsetVertical), + b: optionToInt(opts.offsetBottom, offsetVertical), + l: optionToInt(opts.offsetLeft, offsetHorizontal), + r: optionToInt(opts.offsetRight, offsetHorizontal) + }; + delay = optionToInt(opts.throttle, 250); + useDebounce = opts.debounce !== false; + unload = !!opts.unload; + callback = opts.callback || callback; + echo.render(); + if (document.addEventListener) { + root.addEventListener('scroll', debounceOrThrottle, false); + root.addEventListener('load', debounceOrThrottle, false); + } else { + root.attachEvent('onscroll', debounceOrThrottle); + root.attachEvent('onload', debounceOrThrottle); + } + }; + + echo.render = function() { + var nodes = document.querySelectorAll('img[data-echo], [data-echo-background]'); + var length = nodes.length; + var src, elem; + var view = { + l: 0 - offset.l, + t: 0 - offset.t, + b: (root.innerHeight || document.documentElement.clientHeight) + offset.b, + r: (root.innerWidth || document.documentElement.clientWidth) + offset.r + }; + for (var i = 0; i < length; i++) { + elem = nodes[i]; + if (inView(elem, view)) { + + if (unload) { + elem.setAttribute('data-echo-placeholder', elem.src); + } + + if (elem.getAttribute('data-echo-background') !== null) { + elem.style.backgroundImage = "url(" + elem.getAttribute('data-echo-background') + ")"; + } else { + elem.src = elem.getAttribute('data-echo'); + } + + if (!unload) { + elem.removeAttribute('data-echo'); + elem.removeAttribute('data-echo-background'); + } + + callback(elem, 'load'); + } else if (unload && !!(src = elem.getAttribute('data-echo-placeholder'))) { + + if (elem.getAttribute('data-echo-background') !== null) { + elem.style.backgroundImage = "url(" + src + ")"; + } else { + elem.src = src; + } + + elem.removeAttribute('data-echo-placeholder'); + callback(elem, 'unload'); + } + } + if (!length) { + echo.detach(); + } + }; + + echo.detach = function() { + if (document.removeEventListener) { + root.removeEventListener('scroll', debounceOrThrottle); + } else { + root.detachEvent('onscroll', debounceOrThrottle); + } + clearTimeout(poll); + }; + + return echo; + +}); +function deepCopy(c, p) { + var c = c || {}; + for (var i in p) { +  if (typeof p[i] === 'object') { +   c[i] = (p[i].constructor === Array) ? [] : {}; +   deepCopy(p[i], c[i]); +  } else { +   c[i] = p[i]; +  } + } + return c; +} +/** + * 网站js + * @author Jelon + * @type {{init, toggleMenu}} + */ +var JELON = window.JELON || {}; +JELON = deepCopy(JELON, { + name: 'JELON', + version: '0.0.2', + init: function() { + this.toggleMenu(); + this.backToTop(); + + echo.init({ + offset: 50, + throttle: 250, + unload: false, + callback: function(element, op) { + console.log(element, 'has been', op + 'ed') + } + }); + }, + $: function(str) { + return /^(\[object HTML)[a-zA-Z]*(Element\])$/.test(Object.prototype.toString.call(str)) ? str : document.getElementById(str); + }, + toggleMenu: function() { + var _this = this, + $menu = _this.$(_this.name + '__menu'); + _this.$(_this.name + '__btnDropNav').onclick = function() { + if ($menu.className.indexOf('hidden') === -1) { + $menu.className += ' hidden'; + } else { + $menu.className = $menu.className.replace(/\s*hidden\s*/, ''); + } + + }; + }, + backToTop: function() { + var _this = this; + if (typeof _this.$(_this.name + '__backToTop') === 'undefined') return; + window.onscroll = window.onresize = function() { + if (document.documentElement.scrollTop + document.body.scrollTop > 0) { + _this.$(_this.name + '__backToTop').style.display = 'block'; + } else { + _this.$(_this.name + '__backToTop').style.display = 'none'; + } + }; + _this.$(_this.name + '__backToTop').onclick = function() { + var Timer = setInterval(GoTop, 10); + + function GoTop() { + if (document.documentElement.scrollTop + document.body.scrollTop < 1) { + clearInterval(Timer) + } else { + document.documentElement.scrollTop /= 1.1; + document.body.scrollTop /= 1.1 + } + } + }; + } +}); + +/** + * 程序入口 + */ +JELON.init(); diff --git a/themes/landscape/.gitignore b/themes/landscape/.gitignore new file mode 100644 index 0000000..6e3a08a --- /dev/null +++ b/themes/landscape/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +tmp \ No newline at end of file diff --git a/themes/landscape/Gruntfile.js b/themes/landscape/Gruntfile.js new file mode 100644 index 0000000..59fd5df --- /dev/null +++ b/themes/landscape/Gruntfile.js @@ -0,0 +1,46 @@ +module.exports = function(grunt){ + grunt.initConfig({ + gitclone: { + fontawesome: { + options: { + repository: 'https://github.com/FortAwesome/Font-Awesome.git', + directory: 'tmp/fontawesome' + }, + }, + fancybox: { + options: { + repository: 'https://github.com/fancyapps/fancyBox.git', + directory: 'tmp/fancybox' + } + } + }, + copy: { + fontawesome: { + expand: true, + cwd: 'tmp/fontawesome/fonts/', + src: ['**'], + dest: 'source/css/fonts/' + }, + fancybox: { + expand: true, + cwd: 'tmp/fancybox/source/', + src: ['**'], + dest: 'source/fancybox/' + } + }, + _clean: { + tmp: ['tmp'], + fontawesome: ['source/css/fonts'], + fancybox: ['source/fancybox'] + } + }); + + require('load-grunt-tasks')(grunt); + + grunt.renameTask('clean', '_clean'); + + grunt.registerTask('fontawesome', ['gitclone:fontawesome', 'copy:fontawesome', '_clean:tmp']); + grunt.registerTask('fancybox', ['gitclone:fancybox', 'copy:fancybox', '_clean:tmp']); + grunt.registerTask('default', ['gitclone', 'copy', '_clean:tmp']); + grunt.registerTask('clean', ['_clean']); +}; \ No newline at end of file diff --git a/themes/landscape/LICENSE b/themes/landscape/LICENSE new file mode 100644 index 0000000..9ce4d32 --- /dev/null +++ b/themes/landscape/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2013 Tommy Chen + +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. \ No newline at end of file diff --git a/themes/landscape/README.md b/themes/landscape/README.md new file mode 100644 index 0000000..90ecccd --- /dev/null +++ b/themes/landscape/README.md @@ -0,0 +1,112 @@ +# Landscape + +A brand new default theme for [Hexo]. + +- [Preview](http://hexo.io/hexo-theme-landscape/) + +## Installation + +### Install + +``` bash +$ git clone https://github.com/hexojs/hexo-theme-landscape.git themes/landscape +``` + +**Landscape requires Hexo 2.4 and above.** If you would like to enable the RSS, the [hexo-generate-feed] plugin is also required. + +### Enable + +Modify `theme` setting in `_config.yml` to `landscape`. + +### Update + +``` bash +cd themes/landscape +git pull +``` + +## Configuration + +``` yml +# Header +menu: + Home: / + Archives: /archives +rss: /atom.xml + +# Content +excerpt_link: Read More +fancybox: true + +# Sidebar +sidebar: right +widgets: +- category +- tag +- tagcloud +- archives +- recent_posts + +# Miscellaneous +google_analytics: +favicon: /favicon.png +twitter: +google_plus: +``` + +- **menu** - Navigation menu +- **rss** - RSS link +- **excerpt_link** - "Read More" link at the bottom of excerpted articles. `false` to hide the link. +- **fancybox** - Enable [Fancybox] +- **sidebar** - Sidebar style. You can choose `left`, `right`, `bottom` or `false`. +- **widgets** - Widgets displaying in sidebar +- **google_analytics** - Google Analytics ID +- **favicon** - Favicon path +- **twitter** - Twiiter ID +- **google_plus** - Google+ ID + +## Features + +### Fancybox + +Landscape uses [Fancybox] to showcase your photos. You can use Markdown syntax or fancybox tag plugin to add your photos. + +``` +![img caption](img url) + +{% fancybox img_url [img_thumbnail] [img_caption] %} +``` + +### Sidebar + +You can put your sidebar in left side, right side or bottom of your site by editing `sidebar` setting. + +Landscape provides 5 built-in widgets: + +- category +- tag +- tagcloud +- archives +- recent_posts + +All of them are enabled by default. You can edit them in `widget` setting. + +## Development + +### Requirements + +- [Grunt] 0.4+ +- Hexo 2.4+ + +### Grunt tasks + +- **default** - Download [Fancybox] and [Font Awesome]. +- **fontawesome** - Only download [Font Awesome]. +- **fancybox** - Only download [Fancybox]. +- **clean** - Clean temporarily files and downloaded files. + +[Hexo]: https://hexo.io/ +[Fancybox]: http://fancyapps.com/fancybox/ +[Font Awesome]: http://fontawesome.io/ +[Grunt]: http://gruntjs.com/ +[hexo-generate-feed]: https://github.com/hexojs/hexo-generator-feed diff --git a/themes/landscape/_config.yml b/themes/landscape/_config.yml new file mode 100644 index 0000000..ca22374 --- /dev/null +++ b/themes/landscape/_config.yml @@ -0,0 +1,37 @@ +# Header +menu: + Home: / + Archives: /archives +rss: /atom.xml + +# Content +excerpt_link: Read More +fancybox: true + +# Sidebar +sidebar: right +widgets: +- category +- tag +- tagcloud +- archive +- recent_posts + +# display widgets at the bottom of index pages (pagination == 2) +index_widgets: +# - category +# - tagcloud +# - archive + +# widget behavior +archive_type: 'monthly' +show_count: false + +# Miscellaneous +google_analytics: +gauges_analytics: +favicon: /favicon.png +twitter: +google_plus: +fb_admins: +fb_app_id: diff --git a/themes/landscape/languages/de.yml b/themes/landscape/languages/de.yml new file mode 100644 index 0000000..630055f --- /dev/null +++ b/themes/landscape/languages/de.yml @@ -0,0 +1,19 @@ +categories: Kategorien +search: Suche +tags: Tags +tagcloud: Tag Cloud +tweets: Tweets +prev: zurück +next: weiter +comment: Kommentare +archive_a: Archiv +archive_b: "Archive: %s" +page: Seite %d +recent_posts: letzter Beitrag +newer: Neuer +older: Älter +share: Teilen +powered_by: Powered by +rss_feed: RSS Feed +category: Kategorie +tag: Tag diff --git a/themes/landscape/languages/default.yml b/themes/landscape/languages/default.yml new file mode 100644 index 0000000..3ef7e92 --- /dev/null +++ b/themes/landscape/languages/default.yml @@ -0,0 +1,19 @@ +categories: Categories +search: Search +tags: Tags +tagcloud: Tag Cloud +tweets: Tweets +prev: Prev +next: Next +comment: Comments +archive_a: Archives +archive_b: "Archives: %s" +page: Page %d +recent_posts: Recent Posts +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/es.yml b/themes/landscape/languages/es.yml new file mode 100644 index 0000000..d862e87 --- /dev/null +++ b/themes/landscape/languages/es.yml @@ -0,0 +1,19 @@ +categories: Categorías +search: Buscar +tags: Tags +tagcloud: Nube de Tags +tweets: Tweets +prev: Previo +next: Siguiente +comment: Comentarios +archive_a: Archivos +archive_b: "Archivos: %s" +page: Página %d +recent_posts: Posts recientes +newer: Nuevo +older: Viejo +share: Compartir +powered_by: Construido por +rss_feed: RSS +category: Categoría +tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/fr.yml b/themes/landscape/languages/fr.yml new file mode 100644 index 0000000..c84f51b --- /dev/null +++ b/themes/landscape/languages/fr.yml @@ -0,0 +1,19 @@ +categories: Catégories +search: Rechercher +tags: Mot-clés +tagcloud: Nuage de mot-clés +tweets: Tweets +prev: Précédent +next: Suivant +comment: Commentaires +archive_a: Archives +archive_b: "Archives: %s" +page: Page %d +recent_posts: Articles récents +newer: Récent +older: Ancien +share: Partager +powered_by: Propulsé par +rss_feed: Flux RSS +category: Catégorie +tag: Mot-clé diff --git a/themes/landscape/languages/ja.yml b/themes/landscape/languages/ja.yml new file mode 100644 index 0000000..af0f7fe --- /dev/null +++ b/themes/landscape/languages/ja.yml @@ -0,0 +1,19 @@ +categories: カテゴリ +search: 検索 +tags: タグ +tagcloud: タグクラウド +tweets: ツイート +prev: 戻る +next: 次へ +comment: コメント +archive_a: アーカイブ +archive_b: "アーカイブ: %s" +page: ページ %d +recent_posts: 最近の投稿 +newer: 次の記事 +older: 前の記事 +share: 共有 +powered_by: Powered by +rss_feed: RSSフィード +category: カテゴリ +tag: タグ diff --git a/themes/landscape/languages/ko.yml b/themes/landscape/languages/ko.yml new file mode 100644 index 0000000..1d27b43 --- /dev/null +++ b/themes/landscape/languages/ko.yml @@ -0,0 +1,19 @@ +categories: 카테고리 +search: 검색 +tags: 태그 +tagcloud: 태그 클라우드 +tweets: 트윗 +prev: 이전 +next: 다음 +comment: 댓글 +archive_a: 아카이브 +archive_b: "아카이브: %s" +page: 페이지 %d +recent_posts: 최근 포스트 +newer: 최신 +older: 이전 +share: 공유 +powered_by: Powered by +rss_feed: RSS Feed +category: 카테고리 +tag: 태그 diff --git a/themes/landscape/languages/nl.yml b/themes/landscape/languages/nl.yml new file mode 100644 index 0000000..568d33e --- /dev/null +++ b/themes/landscape/languages/nl.yml @@ -0,0 +1,20 @@ + +categories: Categorieën +search: Zoeken +tags: Labels +tagcloud: Tag Cloud +tweets: Tweets +prev: Vorige +next: Volgende +comment: Commentaren +archive_a: Archieven +archive_b: "Archieven: %s" +page: Pagina %d +recent_posts: Recente berichten +newer: Nieuwer +older: Ouder +share: Delen +powered_by: Powered by +rss_feed: RSS Feed +category: Categorie +tag: Label diff --git a/themes/landscape/languages/no.yml b/themes/landscape/languages/no.yml new file mode 100644 index 0000000..b997691 --- /dev/null +++ b/themes/landscape/languages/no.yml @@ -0,0 +1,19 @@ +categories: Kategorier +search: Søk +tags: Tags +tagcloud: Tag Cloud +tweets: Tweets +prev: Forrige +next: Neste +comment: Kommentarer +archive_a: Arkiv +archive_b: "Arkiv: %s" +page: Side %d +recent_posts: Siste innlegg +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/pt.yml b/themes/landscape/languages/pt.yml new file mode 100644 index 0000000..3d74af3 --- /dev/null +++ b/themes/landscape/languages/pt.yml @@ -0,0 +1,19 @@ +categories: Categorias +search: Buscar +tags: Tags +tagcloud: Nuvem de Tags +tweets: Tweets +prev: Anterior +next: Próximo +comment: Comentários +archive_a: Arquivos +archive_b: "Arquivos: %s" +page: Página %d +recent_posts: Postagens Recentes +newer: Mais Recente +older: Mais Antigo +share: Compartilhar +powered_by: Desenvolvido por +rss_feed: Feed RSS +category: Categoria +tag: Tag diff --git a/themes/landscape/languages/ru.yml b/themes/landscape/languages/ru.yml new file mode 100644 index 0000000..625a83c --- /dev/null +++ b/themes/landscape/languages/ru.yml @@ -0,0 +1,19 @@ +categories: Категории +search: Поиск +tags: Метки +tagcloud: Облако меток +tweets: Твиты +prev: Назад +next: Вперед +comment: Комментарии +archive_a: Архив +archive_b: "Архив: %s" +page: Страница %d +recent_posts: Недавние записи +newer: Следующий +older: Предыдущий +share: Поделиться +powered_by: Создано с помощью +rss_feed: RSS-каналы +category: Категория +tag: Метка \ No newline at end of file diff --git a/themes/landscape/languages/zh-CN.yml b/themes/landscape/languages/zh-CN.yml new file mode 100644 index 0000000..51e1321 --- /dev/null +++ b/themes/landscape/languages/zh-CN.yml @@ -0,0 +1,19 @@ +categories: 分类 +search: 搜索 +tags: 标签 +tagcloud: 标签云 +tweets: 推文 +prev: 上一页 +next: 下一页 +comment: 留言 +archive_a: 归档 +archive_b: 归档:%s +page: 第 %d 页 +recent_posts: 最新文章 +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag \ No newline at end of file diff --git a/themes/landscape/languages/zh-TW.yml b/themes/landscape/languages/zh-TW.yml new file mode 100644 index 0000000..76d2916 --- /dev/null +++ b/themes/landscape/languages/zh-TW.yml @@ -0,0 +1,19 @@ +categories: 分類 +search: 搜尋 +tags: 標籤 +tagcloud: 標籤雲 +tweets: 推文 +prev: 上一頁 +next: 下一頁 +comment: 留言 +archive_a: 彙整 +archive_b: 彙整:%s +page: 第 %d 頁 +recent_posts: 最新文章 +newer: Newer +older: Older +share: Share +powered_by: Powered by +rss_feed: RSS Feed +category: Category +tag: Tag \ No newline at end of file diff --git a/themes/landscape/layout/_partial/after-footer.ejs b/themes/landscape/layout/_partial/after-footer.ejs new file mode 100644 index 0000000..ff2d509 --- /dev/null +++ b/themes/landscape/layout/_partial/after-footer.ejs @@ -0,0 +1,25 @@ +<% if (config.disqus_shortname){ %> + +<% } %> + + + +<% if (theme.fancybox){ %> + <%- css('fancybox/jquery.fancybox') %> + <%- js('fancybox/jquery.fancybox.pack') %> +<% } %> + +<%- js('js/script') %> +<%- partial('gauges-analytics') %> diff --git a/themes/landscape/layout/_partial/archive-post.ejs b/themes/landscape/layout/_partial/archive-post.ejs new file mode 100644 index 0000000..36f2cc3 --- /dev/null +++ b/themes/landscape/layout/_partial/archive-post.ejs @@ -0,0 +1,8 @@ +
    +
    +
    + <%- partial('post/date', {class_name: 'archive-article-date', date_format: 'MMM D'}) %> + <%- partial('post/title', {class_name: 'archive-article-title'}) %> +
    +
    +
    \ No newline at end of file diff --git a/themes/landscape/layout/_partial/archive.ejs b/themes/landscape/layout/_partial/archive.ejs new file mode 100644 index 0000000..9da934a --- /dev/null +++ b/themes/landscape/layout/_partial/archive.ejs @@ -0,0 +1,34 @@ +<% if (pagination == 2){ %> + <% page.posts.each(function(post){ %> + <%- partial('article', {post: post, index: true}) %> + <% }) %> +<% } else { %> + <% var last; %> + <% page.posts.each(function(post, i){ %> + <% var year = post.date.year(); %> + <% if (last != year){ %> + <% if (last != null){ %> + + <% } %> + <% last = year; %> +
    + +
    + <% } %> + <%- partial('archive-post', {post: post, even: i % 2 == 0}) %> + <% }) %> + <% if (page.posts.length){ %> +
    + <% } %> +<% } %> +<% if (page.total > 1){ %> + +<% } %> diff --git a/themes/landscape/layout/_partial/article.ejs b/themes/landscape/layout/_partial/article.ejs new file mode 100644 index 0000000..0f951a9 --- /dev/null +++ b/themes/landscape/layout/_partial/article.ejs @@ -0,0 +1,44 @@ +
    + +
    + <%- partial('post/gallery') %> + <% if (post.link || post.title){ %> +
    + <%- partial('post/title', {class_name: 'article-title'}) %> +
    + <% } %> +
    + <% if (post.excerpt && index){ %> + <%- post.excerpt %> + <% if (theme.excerpt_link){ %> +

    + <%= theme.excerpt_link %> +

    + <% } %> + <% } else { %> + <%- post.content %> + <% } %> +
    + +
    + <% if (!index){ %> + <%- partial('post/nav') %> + <% } %> +
    + +<% if (!index && post.comments && config.disqus_shortname){ %> +
    +
    + +
    +
    +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/footer.ejs b/themes/landscape/layout/_partial/footer.ejs new file mode 100644 index 0000000..3aca618 --- /dev/null +++ b/themes/landscape/layout/_partial/footer.ejs @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/themes/landscape/layout/_partial/gauges-analytics.ejs b/themes/landscape/layout/_partial/gauges-analytics.ejs new file mode 100644 index 0000000..d64be38 --- /dev/null +++ b/themes/landscape/layout/_partial/gauges-analytics.ejs @@ -0,0 +1,18 @@ +<% if (theme.gauges_analytics){ %> + + + +<% } %> diff --git a/themes/landscape/layout/_partial/google-analytics.ejs b/themes/landscape/layout/_partial/google-analytics.ejs new file mode 100644 index 0000000..84e75f0 --- /dev/null +++ b/themes/landscape/layout/_partial/google-analytics.ejs @@ -0,0 +1,14 @@ +<% if (theme.google_analytics){ %> + + + +<% } %> diff --git a/themes/landscape/layout/_partial/head.ejs b/themes/landscape/layout/_partial/head.ejs new file mode 100644 index 0000000..43d5f93 --- /dev/null +++ b/themes/landscape/layout/_partial/head.ejs @@ -0,0 +1,36 @@ + + + + + <%- partial('google-analytics') %> + <% + var title = page.title; + + if (is_archive()){ + title = __('archive_a'); + + if (is_month()){ + title += ': ' + page.year + '/' + page.month; + } else if (is_year()){ + title += ': ' + page.year; + } + } else if (is_category()){ + title = __('category') + ': ' + page.category; + } else if (is_tag()){ + title = __('tag') + ': ' + page.tag; + } + %> + <% if (title){ %><%= title %> | <% } %><%= config.title %> + + <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> + <% if (theme.rss){ %> + + <% } %> + <% if (theme.favicon){ %> + + <% } %> + <% if (config.highlight.enable){ %> + + <% } %> + <%- css('css/style') %> + diff --git a/themes/landscape/layout/_partial/header.ejs b/themes/landscape/layout/_partial/header.ejs new file mode 100644 index 0000000..e8a305e --- /dev/null +++ b/themes/landscape/layout/_partial/header.ejs @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/themes/landscape/layout/_partial/mobile-nav.ejs b/themes/landscape/layout/_partial/mobile-nav.ejs new file mode 100644 index 0000000..7c1d2af --- /dev/null +++ b/themes/landscape/layout/_partial/mobile-nav.ejs @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/category.ejs b/themes/landscape/layout/_partial/post/category.ejs new file mode 100644 index 0000000..db2ed48 --- /dev/null +++ b/themes/landscape/layout/_partial/post/category.ejs @@ -0,0 +1,10 @@ +<% if (post.categories && post.categories.length){ %> +
    + <%- list_categories(post.categories, { + show_count: false, + class: 'article-category', + style: 'none', + separator: '►' + }) %> +
    +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/date.ejs b/themes/landscape/layout/_partial/post/date.ejs new file mode 100644 index 0000000..3f49613 --- /dev/null +++ b/themes/landscape/layout/_partial/post/date.ejs @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/gallery.ejs b/themes/landscape/layout/_partial/post/gallery.ejs new file mode 100644 index 0000000..886c8ec --- /dev/null +++ b/themes/landscape/layout/_partial/post/gallery.ejs @@ -0,0 +1,11 @@ +<% if (post.photos && post.photos.length){ %> +
    +
    + <% post.photos.forEach(function(photo, i){ %> + + + + <% }) %> +
    +
    +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/nav.ejs b/themes/landscape/layout/_partial/post/nav.ejs new file mode 100644 index 0000000..720798a --- /dev/null +++ b/themes/landscape/layout/_partial/post/nav.ejs @@ -0,0 +1,22 @@ +<% if (post.prev || post.next){ %> + +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/tag.ejs b/themes/landscape/layout/_partial/post/tag.ejs new file mode 100644 index 0000000..e0f327f --- /dev/null +++ b/themes/landscape/layout/_partial/post/tag.ejs @@ -0,0 +1,6 @@ +<% if (post.tags && post.tags.length){ %> + <%- list_tags(post.tags, { + show_count: false, + class: 'article-tag' + }) %> +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/post/title.ejs b/themes/landscape/layout/_partial/post/title.ejs new file mode 100644 index 0000000..69d646f --- /dev/null +++ b/themes/landscape/layout/_partial/post/title.ejs @@ -0,0 +1,15 @@ +<% if (post.link){ %> +

    + +

    +<% } else if (post.title){ %> + <% if (index){ %> +

    + <%= post.title %> +

    + <% } else { %> +

    + <%= post.title %> +

    + <% } %> +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_partial/sidebar.ejs b/themes/landscape/layout/_partial/sidebar.ejs new file mode 100644 index 0000000..c1e48e5 --- /dev/null +++ b/themes/landscape/layout/_partial/sidebar.ejs @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/themes/landscape/layout/_widget/archive.ejs b/themes/landscape/layout/_widget/archive.ejs new file mode 100644 index 0000000..a20c58c --- /dev/null +++ b/themes/landscape/layout/_widget/archive.ejs @@ -0,0 +1,8 @@ +<% if (site.posts.length){ %> +
    +

    <%= __('archive_a') %>

    +
    + <%- list_archives({show_count: theme.show_count, type: theme.archive_type}) %> +
    +
    +<% } %> diff --git a/themes/landscape/layout/_widget/category.ejs b/themes/landscape/layout/_widget/category.ejs new file mode 100644 index 0000000..8d9e5e9 --- /dev/null +++ b/themes/landscape/layout/_widget/category.ejs @@ -0,0 +1,8 @@ +<% if (site.categories.length){ %> +
    +

    <%= __('categories') %>

    +
    + <%- list_categories({show_count: theme.show_count}) %> +
    +
    +<% } %> diff --git a/themes/landscape/layout/_widget/recent_posts.ejs b/themes/landscape/layout/_widget/recent_posts.ejs new file mode 100644 index 0000000..7a38547 --- /dev/null +++ b/themes/landscape/layout/_widget/recent_posts.ejs @@ -0,0 +1,14 @@ +<% if (site.posts.length){ %> +
    +

    <%= __('recent_posts') %>

    +
    + +
    +
    +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/_widget/tag.ejs b/themes/landscape/layout/_widget/tag.ejs new file mode 100644 index 0000000..ea5fb2c --- /dev/null +++ b/themes/landscape/layout/_widget/tag.ejs @@ -0,0 +1,8 @@ +<% if (site.tags.length){ %> +
    +

    <%= __('tags') %>

    +
    + <%- list_tags({show_count: theme.show_count}) %> +
    +
    +<% } %> diff --git a/themes/landscape/layout/_widget/tagcloud.ejs b/themes/landscape/layout/_widget/tagcloud.ejs new file mode 100644 index 0000000..5feb435 --- /dev/null +++ b/themes/landscape/layout/_widget/tagcloud.ejs @@ -0,0 +1,8 @@ +<% if (site.tags.length){ %> +
    +

    <%= __('tagcloud') %>

    +
    + <%- tagcloud() %> +
    +
    +<% } %> \ No newline at end of file diff --git a/themes/landscape/layout/archive.ejs b/themes/landscape/layout/archive.ejs new file mode 100644 index 0000000..52f9b21 --- /dev/null +++ b/themes/landscape/layout/archive.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.archive, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/category.ejs b/themes/landscape/layout/category.ejs new file mode 100644 index 0000000..3ffe252 --- /dev/null +++ b/themes/landscape/layout/category.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.category, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/index.ejs b/themes/landscape/layout/index.ejs new file mode 100644 index 0000000..60a2c68 --- /dev/null +++ b/themes/landscape/layout/index.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: 2, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/layout/layout.ejs b/themes/landscape/layout/layout.ejs new file mode 100644 index 0000000..cf88daf --- /dev/null +++ b/themes/landscape/layout/layout.ejs @@ -0,0 +1,18 @@ +<%- partial('_partial/head') %> + +
    +
    + <%- partial('_partial/header', null, {cache: !config.relative_link}) %> +
    +
    <%- body %>
    + <% if (theme.sidebar && theme.sidebar !== 'bottom'){ %> + <%- partial('_partial/sidebar', null, {cache: !config.relative_link}) %> + <% } %> +
    + <%- partial('_partial/footer', null, {cache: !config.relative_link}) %> +
    + <%- partial('_partial/mobile-nav', null, {cache: !config.relative_link}) %> + <%- partial('_partial/after-footer') %> +
    + + \ No newline at end of file diff --git a/themes/landscape/layout/page.ejs b/themes/landscape/layout/page.ejs new file mode 100644 index 0000000..bea6318 --- /dev/null +++ b/themes/landscape/layout/page.ejs @@ -0,0 +1 @@ +<%- partial('_partial/article', {post: page, index: false}) %> \ No newline at end of file diff --git a/themes/landscape/layout/post.ejs b/themes/landscape/layout/post.ejs new file mode 100644 index 0000000..bea6318 --- /dev/null +++ b/themes/landscape/layout/post.ejs @@ -0,0 +1 @@ +<%- partial('_partial/article', {post: page, index: false}) %> \ No newline at end of file diff --git a/themes/landscape/layout/tag.ejs b/themes/landscape/layout/tag.ejs new file mode 100644 index 0000000..048cdb0 --- /dev/null +++ b/themes/landscape/layout/tag.ejs @@ -0,0 +1 @@ +<%- partial('_partial/archive', {pagination: config.tag, index: true}) %> \ No newline at end of file diff --git a/themes/landscape/package.json b/themes/landscape/package.json new file mode 100644 index 0000000..ac0df3d --- /dev/null +++ b/themes/landscape/package.json @@ -0,0 +1,12 @@ +{ + "name": "hexo-theme-landscape", + "version": "0.0.2", + "private": true, + "devDependencies": { + "grunt": "~0.4.2", + "load-grunt-tasks": "~0.2.0", + "grunt-git": "~0.2.2", + "grunt-contrib-clean": "~0.5.0", + "grunt-contrib-copy": "~0.4.1" + } +} diff --git a/themes/landscape/scripts/fancybox.js b/themes/landscape/scripts/fancybox.js new file mode 100644 index 0000000..83f1fdc --- /dev/null +++ b/themes/landscape/scripts/fancybox.js @@ -0,0 +1,24 @@ +var rUrl = /((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/; + +/** +* Fancybox tag +* +* Syntax: +* {% fancybox /path/to/image [/path/to/thumbnail] [title] %} +*/ + +hexo.extend.tag.register('fancybox', function(args){ + var original = args.shift(), + thumbnail = ''; + + if (args.length && rUrl.test(args[0])){ + thumbnail = args.shift(); + } + + var title = args.join(' '); + + return '' + + '' + title + '' + '' + + (title ? '' + title + '' : ''); +}); \ No newline at end of file diff --git a/themes/landscape/source/css/_extend.styl b/themes/landscape/source/css/_extend.styl new file mode 100644 index 0000000..96a1817 --- /dev/null +++ b/themes/landscape/source/css/_extend.styl @@ -0,0 +1,63 @@ +$block-caption + text-decoration: none + text-transform: uppercase + letter-spacing: 2px + color: color-grey + margin-bottom: 1em + margin-left: 5px + line-height: 1em + text-shadow: 0 1px #fff + font-weight: bold + +$block + background: #fff + box-shadow: 1px 2px 3px #ddd + border: 1px solid color-border + border-radius: 3px + +$base-style + h1 + font-size: 2em + h2 + font-size: 1.5em + h3 + font-size: 1.3em + h4 + font-size: 1.2em + h5 + font-size: 1em + h6 + font-size: 1em + color: color-grey + hr + border: 1px dashed color-border + strong + font-weight: bold + em, cite + font-style: italic + sup, sub + font-size: 0.75em + line-height: 0 + position: relative + vertical-align: baseline + sup + top: -0.5em + sub + bottom: -0.2em + small + font-size: 0.85em + acronym, abbr + border-bottom: 1px dotted + ul, ol, dl + margin: 0 20px + line-height: line-height + ul, ol + ul, ol + margin-top: 0 + margin-bottom: 0 + ul + list-style: disc + ol + list-style: decimal + dt + font-weight: bold \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/archive.styl b/themes/landscape/source/css/_partial/archive.styl new file mode 100644 index 0000000..90ef053 --- /dev/null +++ b/themes/landscape/source/css/_partial/archive.styl @@ -0,0 +1,80 @@ +.archives-wrap + margin: block-margin 0 + +.archives + clearfix() + +.archive-year-wrap + margin-bottom: 1em + +.archive-year + @extend $block-caption + +.archives + column-gap: 10px + @media mq-tablet + column-count: 2 + @media mq-normal + column-count: 3 + +.archive-article + avoid-column-break() + +.archive-article-inner + @extend $block + padding: 10px + margin-bottom: 15px + +.archive-article-title + text-decoration: none + font-weight: bold + color: color-default + transition: color 0.2s + line-height: line-height + &:hover + color: color-link + +.archive-article-footer + margin-top: 1em + +.archive-article-date + color: color-grey + text-decoration: none + font-size: 0.85em + line-height: 1em + margin-bottom: 0.5em + display: block + +#page-nav + clearfix() + margin: block-margin auto + background: #fff + box-shadow: 1px 2px 3px #ddd + border: 1px solid color-border + border-radius: 3px + text-align: center + color: color-grey + overflow: hidden + a, span + padding: 10px 20px + line-height: 1 + height: 2ex + a + color: color-grey + text-decoration: none + &:hover + background: color-grey + color: #fff + .prev + float: left + .next + float: right + .page-number + display: inline-block + @media mq-mobile + display: none + .current + color: color-default + font-weight: bold + .space + color: color-border \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/article.styl b/themes/landscape/source/css/_partial/article.styl new file mode 100644 index 0000000..46094f9 --- /dev/null +++ b/themes/landscape/source/css/_partial/article.styl @@ -0,0 +1,357 @@ +.article + margin: block-margin 0 + +.article-inner + @extend $block + overflow: hidden + +.article-meta + clearfix() + +.article-date + @extend $block-caption + float: left + +.article-category + float: left + line-height: 1em + color: #ccc + text-shadow: 0 1px #fff + margin-left: 8px + &:before + content: "\2022" + +.article-category-link + @extend $block-caption + margin: 0 12px 1em + +.article-header + padding: article-padding article-padding 0 + +.article-title + text-decoration: none + font-size: 2em + font-weight: bold + color: color-default + line-height: line-height-title + transition: color 0.2s + a&:hover + color: color-link + +.article-entry + @extend $base-style + clearfix() + color: color-default + padding: 0 article-padding + p, table + line-height: line-height + margin: line-height 0 + h1, h2, h3, h4, h5, h6 + font-weight: bold + h1, h2, h3, h4, h5, h6 + line-height: line-height-title + margin: line-height-title 0 + a + color: color-link + text-decoration: none + &:hover + text-decoration: underline + ul, ol, dl + margin-top: line-height + margin-bottom: line-height + img, video + max-width: 100% + height: auto + display: block + margin: auto + iframe + border: none + table + width: 100% + border-collapse: collapse + border-spacing: 0 + th + font-weight: bold + border-bottom: 3px solid color-border + padding-bottom: 0.5em + td + border-bottom: 1px solid color-border + padding: 10px 0 + blockquote + font-family: font-serif + font-size: 1.4em + margin: line-height 20px + text-align: center + footer + font-size: font-size + margin: line-height 0 + font-family: font-sans + cite + &:before + content: "—" + padding: 0 0.5em + .pullquote + text-align: left + width: 45% + margin: 0 + &.left + margin-left: 0.5em + margin-right: 1em + &.right + margin-right: 0.5em + margin-left: 1em + .caption + color: color-grey + display: block + font-size: 0.9em + margin-top: 0.5em + position: relative + text-align: center + // http://webdesignerwall.com/tutorials/css-elastic-videos + .video-container + position: relative + padding-top: (9 / 16 * 100)% // 16:9 ratio + height: 0 + overflow: hidden + iframe, object, embed + position: absolute + top: 0 + left: 0 + width: 100% + height: 100% + margin-top: 0 + +.article-more-link a + display: inline-block + line-height: 1em + padding: 6px 15px + border-radius: 15px + background: color-background + color: color-grey + text-shadow: 0 1px #fff + text-decoration: none + &:hover + background: color-link + color: #fff + text-decoration: none + text-shadow: 0 1px darken(color-link, 20%) + +.article-footer + clearfix() + font-size: 0.85em + line-height: line-height + border-top: 1px solid color-border + padding-top: line-height + margin: 0 article-padding article-padding + a + color: color-grey + text-decoration: none + &:hover + color: color-default + +.article-tag-list-item + float: left + margin-right: 10px + +.article-tag-list-link + &:before + content: "#" + +.article-comment-link + float: right + &:before + content: "\f075" + font-family: font-icon + padding-right: 8px + +.article-share-link + cursor: pointer + float: right + margin-left: 20px + &:before + content: "\f064" + font-family: font-icon + padding-right: 6px + +#article-nav + clearfix() + position: relative + @media mq-normal + margin: block-margin 0 + &:before + absolute-center(8px) + content: "" + border-radius: 50% + background: color-border + box-shadow: 0 1px 2px #fff + +.article-nav-link-wrap + text-decoration: none + text-shadow: 0 1px #fff + color: color-grey + box-sizing: border-box + margin-top: block-margin + text-align: center + display: block + &:hover + color: color-default + @media mq-normal + width: 50% + margin-top: 0 + +#article-nav-newer + @media mq-normal + float: left + text-align: right + padding-right: 20px + +#article-nav-older + @media mq-normal + float: right + text-align: left + padding-left: 20px + +.article-nav-caption + text-transform: uppercase + letter-spacing: 2px + color: color-border + line-height: 1em + font-weight: bold + #article-nav-newer & + margin-right: -2px + +.article-nav-title + font-size: 0.85em + line-height: line-height + margin-top: 0.5em + +.article-share-box + position: absolute + display: none + background: #fff + box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.2) + border-radius: 3px + margin-left: -145px + overflow: hidden + z-index: 1 + &.on + display: block + +.article-share-input + width: 100% + background: none + box-sizing: border-box + font: 14px font-sans + padding: 0 15px + color: color-default + outline: none + border: 1px solid color-border + border-radius: 3px 3px 0 0 + height: 36px + line-height: 36px + +.article-share-links + clearfix() + background: color-background + +$article-share-link + width: 50px + height: 36px + display: block + float: left + position: relative + color: #999 + text-shadow: 0 1px #fff + &:before + font-size: 20px + font-family: font-icon + absolute-center(@font-size) + text-align: center + &:hover + color: #fff + +.article-share-twitter + @extend $article-share-link + &:before + content: "\f099" + &:hover + background: color-twitter + text-shadow: 0 1px darken(color-twitter, 20%) + +.article-share-facebook + @extend $article-share-link + &:before + content: "\f09a" + &:hover + background: color-facebook + text-shadow: 0 1px darken(color-facebook, 20%) + +.article-share-pinterest + @extend $article-share-link + &:before + content: "\f0d2" + &:hover + background: color-pinterest + text-shadow: 0 1px darken(color-pinterest, 20%) + +.article-share-google + @extend $article-share-link + &:before + content: "\f0d5" + &:hover + background: color-google + text-shadow: 0 1px darken(color-google, 20%) + +.article-gallery + background: #000 + position: relative + +.article-gallery-photos + position: relative + overflow: hidden + +.article-gallery-img + display: none + max-width: 100% + &:first-child + display: block + &.loaded + position: absolute + display: block + img + display: block + max-width: 100% + margin: 0 auto +/* +$article-gallery-ctrl + position: absolute + top: 0 + height: 100% + width: 60px + color: #fff + text-shadow: 0 0 3px rgba(0, 0, 0, 0.3) + opacity: 0.3 + transition: opacity 0.2s + cursor: pointer + &:hover + opacity: 0.8 + &:before + font-size: 30px + font-family: font-icon + position: absolute + top: 50% + margin-top: @font-size * -0.5 + +.article-gallery-prev + @extend $article-gallery-ctrl + left: 0 + &:before + content: "\f053" + left: 15px + +.article-gallery-next + @extend $article-gallery-ctrl + right: 0 + &:before + content: "\f054" + right: 15px*/ \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/comment.styl b/themes/landscape/source/css/_partial/comment.styl new file mode 100644 index 0000000..296b7dd --- /dev/null +++ b/themes/landscape/source/css/_partial/comment.styl @@ -0,0 +1,9 @@ +#comments + background: #fff + box-shadow: 1px 2px 3px #ddd + padding: article-padding + border: 1px solid color-border + border-radius: 3px + margin: block-margin 0 + a + color: color-link \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/footer.styl b/themes/landscape/source/css/_partial/footer.styl new file mode 100644 index 0000000..fe2fd24 --- /dev/null +++ b/themes/landscape/source/css/_partial/footer.styl @@ -0,0 +1,14 @@ +#footer + background: color-footer-background + padding: 50px 0 + border-top: 1px solid color-border + color: color-grey + a + color: color-link + text-decoration: none + &:hover + text-decoration: underline + +#footer-info + line-height: line-height + font-size: 0.85em \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/header.styl b/themes/landscape/source/css/_partial/header.styl new file mode 100644 index 0000000..d18ebc8 --- /dev/null +++ b/themes/landscape/source/css/_partial/header.styl @@ -0,0 +1,165 @@ +#header + height: banner-height + position: relative + border-bottom: 1px solid color-border + &:before, &:after + content: "" + position: absolute + left: 0 + right: 0 + height: 40px + &:before + top: 0 + background: linear-gradient(rgba(0, 0, 0, 0.2), transparent) + &:after + bottom: 0 + background: linear-gradient(transparent, rgba(0, 0, 0, 0.2)) + +#header-outer + height: 100% + position: relative + +#header-inner + position: relative + overflow: hidden + +#banner + position: absolute + top: 0 + left: 0 + width: 100% + height: 100% + background: url(banner-url) center #000 + background-size: cover + z-index: -1 + +#header-title + text-align: center + height: logo-size + position: absolute + top: 50% + left: 0 + margin-top: logo-size * -0.5 + +$logo-text + text-decoration: none + color: #fff + font-weight: 300 + text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) + +#logo + @extend $logo-text + font-size: logo-size + line-height: logo-size + letter-spacing: 2px + +#subtitle + @extend $logo-text + font-size: subtitle-size + line-height: subtitle-size + letter-spacing: 1px + +#subtitle-wrap + margin-top: subtitle-size + +#main-nav + float: left + margin-left: -15px + +$nav-link + float: left + color: #fff + opacity: 0.6 + text-decoration: none + text-shadow: 0 1px rgba(0, 0, 0, 0.2) + transition: opacity 0.2s + display: block + padding: 20px 15px + &:hover + opacity: 1 + +.nav-icon + @extend $nav-link + font-family: font-icon + text-align: center + font-size: font-size + width: font-size + height: font-size + padding: 20px 15px + position: relative + cursor: pointer + +.main-nav-link + @extend $nav-link + font-weight: 300 + letter-spacing: 1px + @media mq-mobile + display: none + +#main-nav-toggle + display: none + &:before + content: "\f0c9" + @media mq-mobile + display: block + +#sub-nav + float: right + margin-right: -15px + +#nav-rss-link + &:before + content: "\f09e" + +#nav-search-btn + &:before + content: "\f002" + +#search-form-wrap + position: absolute + top: 15px + width: 150px + height: 30px + right: -150px + opacity: 0 + transition: 0.2s ease-out + &.on + opacity: 1 + right: 0 + @media mq-mobile + width: 100% + right: -100% + +.search-form + position: absolute + top: 0 + left: 0 + right: 0 + background: #fff + padding: 5px 15px + border-radius: 15px + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) + +.search-form-input + border: none + background: none + color: color-default + width: 100% + font: 13px font-sans + outline: none + &::-webkit-search-results-decoration + &::-webkit-search-cancel-button + -webkit-appearance: none + +.search-form-submit + position: absolute + top: 50% + right: 10px + margin-top: -7px + font: 13px font-icon + border: none + background: none + color: #bbb + cursor: pointer + &:hover, &:focus + color: #777 \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/highlight.styl b/themes/landscape/source/css/_partial/highlight.styl new file mode 100644 index 0000000..c932ec3 --- /dev/null +++ b/themes/landscape/source/css/_partial/highlight.styl @@ -0,0 +1,158 @@ +// https://github.com/chriskempson/tomorrow-theme +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 + +$code-block + background: highlight-background + margin: 0 article-padding * -1 + padding: 15px article-padding + border-style: solid + border-color: color-border + border-width: 1px 0 + overflow: auto + color: highlight-foreground + line-height: font-size * line-height + +$line-numbers + color: #666 + font-size: 0.85em + +.article-entry + pre, code + font-family: font-mono + code + background: color-background + text-shadow: 0 1px #fff + padding: 0 0.3em + pre + @extend $code-block + code + background: none + text-shadow: none + padding: 0 + .highlight + @extend $code-block + pre + border: none + margin: 0 + padding: 0 + table + margin: 0 + width: auto + td + border: none + padding: 0 + figcaption + clearfix() + font-size: 0.85em + color: highlight-comment + line-height: 1em + margin-bottom: 1em + a + float: right + .gutter pre + @extend $line-numbers + text-align: right + padding-right: 20px + .line + height: font-size * line-height + .line.marked + background: highlight-selection + .gist + margin: 0 article-padding * -1 + border-style: solid + border-color: color-border + border-width: 1px 0 + background: highlight-background + padding: 15px article-padding 15px 0 + .gist-file + border: none + font-family: font-mono + margin: 0 + .gist-data + background: none + border: none + .line-numbers + @extend $line-numbers + background: none + border: none + padding: 0 20px 0 0 + .line-data + padding: 0 !important + .highlight + margin: 0 + padding: 0 + border: none + .gist-meta + background: highlight-background + color: highlight-comment + font: 0.85em font-sans + text-shadow: 0 0 + padding: 0 + margin-top: 1em + margin-left: article-padding + a + color: color-link + font-weight: normal + &:hover + text-decoration: underline + +pre + .comment + .title + 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 + color: highlight-orange + .class + .ruby .class .title + .css .rules .attribute + color: highlight-green + .string + .value + .inheritance + .header + .ruby .symbol + .xml .cdata + color: highlight-green + .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 diff --git a/themes/landscape/source/css/_partial/mobile.styl b/themes/landscape/source/css/_partial/mobile.styl new file mode 100644 index 0000000..eb68b3a --- /dev/null +++ b/themes/landscape/source/css/_partial/mobile.styl @@ -0,0 +1,19 @@ +@media mq-mobile + #mobile-nav + position: absolute + top: 0 + left: 0 + width: mobile-nav-width + height: 100% + background: color-mobile-nav-background + border-right: 1px solid #fff + +@media mq-mobile + .mobile-nav-link + display: block + color: color-grey + text-decoration: none + padding: 15px 20px + font-weight: bold + &:hover + color: #fff diff --git a/themes/landscape/source/css/_partial/sidebar-aside.styl b/themes/landscape/source/css/_partial/sidebar-aside.styl new file mode 100644 index 0000000..838b167 --- /dev/null +++ b/themes/landscape/source/css/_partial/sidebar-aside.styl @@ -0,0 +1,27 @@ +#sidebar + @media mq-normal + column(sidebar-column) + +.widget-wrap + margin: block-margin 0 + +.widget-title + @extend $block-caption + +.widget + color: color-sidebar-text + text-shadow: 0 1px #fff + background: color-widget-background + box-shadow: 0 -1px 4px color-widget-border inset + border: 1px solid color-widget-border + padding: 15px + border-radius: 3px + a + color: color-link + text-decoration: none + &:hover + text-decoration: underline + ul, ol, dl + ul, ol, dl + margin-left: 15px + list-style: disc \ No newline at end of file diff --git a/themes/landscape/source/css/_partial/sidebar-bottom.styl b/themes/landscape/source/css/_partial/sidebar-bottom.styl new file mode 100644 index 0000000..e2403fd --- /dev/null +++ b/themes/landscape/source/css/_partial/sidebar-bottom.styl @@ -0,0 +1,27 @@ +.widget-wrap + margin-bottom: block-margin !important + @media mq-normal + column(main-column) + +.widget-title + color: #ccc + text-transform: uppercase + letter-spacing: 2px + margin-bottom: .5em + line-height: 1em + font-weight: bold + +.widget + color: color-grey + ul, ol + li + display: inline-block + zoom:1 + *display:inline + padding-right: .75em +/* Having problems getting balanced white space between items + li:before + content: " | " + li:first-child:before + content: none + */ diff --git a/themes/landscape/source/css/_partial/sidebar.styl b/themes/landscape/source/css/_partial/sidebar.styl new file mode 100644 index 0000000..e43d66a --- /dev/null +++ b/themes/landscape/source/css/_partial/sidebar.styl @@ -0,0 +1,35 @@ +if sidebar is bottom + @import "sidebar-bottom" +else + @import "sidebar-aside" + +.widget + @extend $base-style + line-height: line-height + word-wrap: break-word + font-size: 0.9em + ul, ol + list-style: none + margin: 0 + ul, ol + margin: 0 20px + ul + list-style: disc + ol + list-style: decimal + +.category-list-count +.tag-list-count +.archive-list-count + padding-left: 5px + color: color-grey + font-size: 0.85em + &:before + content: "(" + &:after + content: ")" + +.tagcloud + a + margin-right: 5px + display: inline-block diff --git a/themes/landscape/source/css/_util/grid.styl b/themes/landscape/source/css/_util/grid.styl new file mode 100644 index 0000000..2a14dd2 --- /dev/null +++ b/themes/landscape/source/css/_util/grid.styl @@ -0,0 +1,38 @@ +///////////////// +// Semantic.gs // for Stylus: http://learnboost.github.com/stylus/ +///////////////// + +// Utility function — you should never need to modify this +// _gridsystem-width = (column-width + gutter-width) * columns +gridsystem-width(_columns = columns) + (column-width + gutter-width) * _columns + +// Set @total-width to 100% for a fluid layout +// total-width = gridsystem-width(columns) +total-width = 100% + +////////// +// GRID // +////////// + +body + clearfix() + width: 100% + +row(_columns = columns) + clearfix() + display: block + width: total-width * ((gutter-width + gridsystem-width(_columns)) / gridsystem-width(_columns)) + margin: 0 total-width * (((gutter-width * .5) / gridsystem-width(_columns)) * -1) + +column(x, _columns = columns) + display: inline + float: left + width: total-width * ((((gutter-width + column-width) * x) - gutter-width) / gridsystem-width(_columns)) + margin: 0 total-width * ((gutter-width * .5) / gridsystem-width(_columns)) + +push(offset = 1) + margin-left: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) + +pull(offset = 1) + margin-right: total-width * (((gutter-width + column-width) * offset) / gridsystem-width(columns)) \ No newline at end of file diff --git a/themes/landscape/source/css/_util/mixin.styl b/themes/landscape/source/css/_util/mixin.styl new file mode 100644 index 0000000..b56f037 --- /dev/null +++ b/themes/landscape/source/css/_util/mixin.styl @@ -0,0 +1,31 @@ +// http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ +hide-text() + text-indent: 100% + white-space: nowrap + overflow: hidden + +// http://codepen.io/shshaw/full/gEiDt +absolute-center(width, height = width) + // margin: auto + // position: absolute + // top: 50% + // top: 0 + // left: 0 + // bottom: 0 + // right: 0 + // width: width + // height: height + // overflow: auto + width: width + height: height + position: absolute + top: 50% + left: 50% + margin-top: width * -0.5 + margin-left: height * -0.5 + +avoid-column-break() + vendor("column-break-inside", avoid, only: webkit) + page-break-inside: avoid // for firefox + overflow: hidden // fix for firefox + break-inside: avoid-column diff --git a/themes/landscape/source/css/_variables.styl b/themes/landscape/source/css/_variables.styl new file mode 100644 index 0000000..4562911 --- /dev/null +++ b/themes/landscape/source/css/_variables.styl @@ -0,0 +1,63 @@ +// Config +support-for-ie = false +vendor-prefixes = webkit moz ms official + +// Colors +color-default = #555 +color-grey = #999 +color-border = #ddd +color-link = #258fb8 +color-background = #eee +color-sidebar-text = #777 +color-widget-background = #ddd +color-widget-border = #ccc +color-footer-background = #262a30 +color-mobile-nav-background = #191919 +color-twitter = #00aced +color-facebook = #3b5998 +color-pinterest = #cb2027 +color-google = #dd4b39 + +// Fonts +font-sans = -apple-system, BlinkMacSystemFont, + "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", + "Fira Sans", "Droid Sans", "Helvetica Neue", + sans-serif +font-serif = Georgia, "Times New Roman", serif +font-mono = "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace +font-icon = FontAwesome +font-icon-path = "fonts/fontawesome-webfont" +font-icon-version = "4.0.3" +font-size = 14px +line-height = 1.6em +line-height-title = 1.1em + +// Header +logo-size = 40px +subtitle-size = 16px +banner-height = 300px +banner-url = "images/banner.jpg" + +sidebar = hexo-config("sidebar") + +// Layout +block-margin = 50px +article-padding = 20px +mobile-nav-width = 280px +main-column = 9 +sidebar-column = 3 + +if sidebar and sidebar isnt bottom + _sidebar-column = sidebar-column +else + _sidebar-column = 0 + +// Grids +column-width = 80px +gutter-width = 20px +columns = main-column + _sidebar-column + +// Media queries +mq-mobile = "screen and (max-width: 479px)" +mq-tablet = "screen and (min-width: 480px) and (max-width: 767px)" +mq-normal = "screen and (min-width: 768px)" \ No newline at end of file diff --git a/themes/landscape/source/css/fonts/FontAwesome.otf b/themes/landscape/source/css/fonts/FontAwesome.otf new file mode 100644 index 0000000..8b0f54e Binary files /dev/null and b/themes/landscape/source/css/fonts/FontAwesome.otf differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.eot b/themes/landscape/source/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..7c79c6a Binary files /dev/null and b/themes/landscape/source/css/fonts/fontawesome-webfont.eot differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.svg b/themes/landscape/source/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..45fdf33 --- /dev/null +++ b/themes/landscape/source/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.ttf b/themes/landscape/source/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..e89738d Binary files /dev/null and b/themes/landscape/source/css/fonts/fontawesome-webfont.ttf differ diff --git a/themes/landscape/source/css/fonts/fontawesome-webfont.woff b/themes/landscape/source/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..8c1748a Binary files /dev/null and b/themes/landscape/source/css/fonts/fontawesome-webfont.woff differ diff --git a/themes/landscape/source/css/images/banner.jpg b/themes/landscape/source/css/images/banner.jpg new file mode 100644 index 0000000..b963e06 Binary files /dev/null and b/themes/landscape/source/css/images/banner.jpg differ diff --git a/themes/landscape/source/css/style.styl b/themes/landscape/source/css/style.styl new file mode 100644 index 0000000..c51f8e4 --- /dev/null +++ b/themes/landscape/source/css/style.styl @@ -0,0 +1,89 @@ +@import "nib" +@import "_variables" +@import "_util/mixin" +@import "_util/grid" + +global-reset() + +input, button + margin: 0 + padding: 0 + &::-moz-focus-inner + border: 0 + padding: 0 + +@font-face + font-family: FontAwesome + font-style: normal + font-weight: normal + src: url(font-icon-path + ".eot?v=#" + font-icon-version) + src: url(font-icon-path + ".eot?#iefix&v=#" + font-icon-version) format("embedded-opentype"), + url(font-icon-path + ".woff?v=#" + font-icon-version) format("woff"), + url(font-icon-path + ".ttf?v=#" + font-icon-version) format("truetype"), + url(font-icon-path + ".svg#fontawesomeregular?v=#" + font-icon-version) format("svg") + +html, body, #container + height: 100% + +body + background: color-background + font: font-size font-sans + -webkit-text-size-adjust: 100% + +.outer + clearfix() + max-width: (column-width + gutter-width) * columns + gutter-width + margin: 0 auto + padding: 0 gutter-width + +.inner + column(columns) + +.left, .alignleft + float: left + +.right, .alignright + float: right + +.clear + clear: both + +#container + position: relative + +.mobile-nav-on + overflow: hidden + +#wrap + height: 100% + width: 100% + position: absolute + top: 0 + left: 0 + transition: 0.2s ease-out + z-index: 1 + background: color-background + .mobile-nav-on & + left: mobile-nav-width + +if sidebar and sidebar isnt bottom + #main + @media mq-normal + column(main-column) + +if sidebar is left + @media mq-normal + #main + float: right + +@import "_extend" +@import "_partial/header" +@import "_partial/article" +@import "_partial/comment" +@import "_partial/archive" +@import "_partial/footer" +@import "_partial/highlight" +@import "_partial/mobile" + +if sidebar + @import "_partial/sidebar" \ No newline at end of file diff --git a/themes/landscape/source/fancybox/blank.gif b/themes/landscape/source/fancybox/blank.gif new file mode 100644 index 0000000..35d42e8 Binary files /dev/null and b/themes/landscape/source/fancybox/blank.gif differ diff --git a/themes/landscape/source/fancybox/fancybox_loading.gif b/themes/landscape/source/fancybox/fancybox_loading.gif new file mode 100644 index 0000000..a03a40c Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_loading.gif differ diff --git a/themes/landscape/source/fancybox/fancybox_loading@2x.gif b/themes/landscape/source/fancybox/fancybox_loading@2x.gif new file mode 100644 index 0000000..9205aeb Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_loading@2x.gif differ diff --git a/themes/landscape/source/fancybox/fancybox_overlay.png b/themes/landscape/source/fancybox/fancybox_overlay.png new file mode 100644 index 0000000..a439139 Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_overlay.png differ diff --git a/themes/landscape/source/fancybox/fancybox_sprite.png b/themes/landscape/source/fancybox/fancybox_sprite.png new file mode 100644 index 0000000..fd8d5ca Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_sprite.png differ diff --git a/themes/landscape/source/fancybox/fancybox_sprite@2x.png b/themes/landscape/source/fancybox/fancybox_sprite@2x.png new file mode 100644 index 0000000..d0e4779 Binary files /dev/null and b/themes/landscape/source/fancybox/fancybox_sprite@2x.png differ diff --git a/themes/landscape/source/fancybox/helpers/fancybox_buttons.png b/themes/landscape/source/fancybox/helpers/fancybox_buttons.png new file mode 100644 index 0000000..0787207 Binary files /dev/null and b/themes/landscape/source/fancybox/helpers/fancybox_buttons.png differ diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css new file mode 100644 index 0000000..a26273a --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.css @@ -0,0 +1,97 @@ +#fancybox-buttons { + position: fixed; + left: 0; + width: 100%; + z-index: 8050; +} + +#fancybox-buttons.top { + top: 10px; +} + +#fancybox-buttons.bottom { + bottom: 10px; +} + +#fancybox-buttons ul { + display: block; + width: 166px; + height: 30px; + margin: 0 auto; + padding: 0; + list-style: none; + border: 1px solid #111; + border-radius: 3px; + -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); + background: rgb(50,50,50); + background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); + background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); +} + +#fancybox-buttons ul li { + float: left; + margin: 0; + padding: 0; +} + +#fancybox-buttons a { + display: block; + width: 30px; + height: 30px; + text-indent: -9999px; + background-color: transparent; + background-image: url('fancybox_buttons.png'); + background-repeat: no-repeat; + outline: none; + opacity: 0.8; +} + +#fancybox-buttons a:hover { + opacity: 1; +} + +#fancybox-buttons a.btnPrev { + background-position: 5px 0; +} + +#fancybox-buttons a.btnNext { + background-position: -33px 0; + border-right: 1px solid #3e3e3e; +} + +#fancybox-buttons a.btnPlay { + background-position: 0 -30px; +} + +#fancybox-buttons a.btnPlayOn { + background-position: -30px -30px; +} + +#fancybox-buttons a.btnToggle { + background-position: 3px -60px; + border-left: 1px solid #111; + border-right: 1px solid #3e3e3e; + width: 35px +} + +#fancybox-buttons a.btnToggleOn { + background-position: -27px -60px; +} + +#fancybox-buttons a.btnClose { + border-left: 1px solid #111; + width: 35px; + background-position: -56px 0px; +} + +#fancybox-buttons a.btnDisabled { + opacity : 0.4; + cursor: default; +} \ No newline at end of file diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js new file mode 100644 index 0000000..352bb5f --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-buttons.js @@ -0,0 +1,122 @@ + /*! + * Buttons helper for fancyBox + * version: 1.0.5 (Mon, 15 Oct 2012) + * @requires fancyBox v2.0 or later + * + * Usage: + * $(".fancybox").fancybox({ + * helpers : { + * buttons: { + * position : 'top' + * } + * } + * }); + * + */ +;(function ($) { + //Shortcut for fancyBox object + var F = $.fancybox; + + //Add helper object + F.helpers.buttons = { + defaults : { + skipSingle : false, // disables if gallery contains single image + position : 'top', // 'top' or 'bottom' + tpl : '
    ' + }, + + list : null, + buttons: null, + + beforeLoad: function (opts, obj) { + //Remove self if gallery do not have at least two items + + if (opts.skipSingle && obj.group.length < 2) { + obj.helpers.buttons = false; + obj.closeBtn = true; + + return; + } + + //Increase top margin to give space for buttons + obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; + }, + + onPlayStart: function () { + if (this.buttons) { + this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); + } + }, + + onPlayEnd: function () { + if (this.buttons) { + this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); + } + }, + + afterShow: function (opts, obj) { + var buttons = this.buttons; + + if (!buttons) { + this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); + + buttons = { + prev : this.list.find('.btnPrev').click( F.prev ), + next : this.list.find('.btnNext').click( F.next ), + play : this.list.find('.btnPlay').click( F.play ), + toggle : this.list.find('.btnToggle').click( F.toggle ), + close : this.list.find('.btnClose').click( F.close ) + } + } + + //Prev + if (obj.index > 0 || obj.loop) { + buttons.prev.removeClass('btnDisabled'); + } else { + buttons.prev.addClass('btnDisabled'); + } + + //Next / Play + if (obj.loop || obj.index < obj.group.length - 1) { + buttons.next.removeClass('btnDisabled'); + buttons.play.removeClass('btnDisabled'); + + } else { + buttons.next.addClass('btnDisabled'); + buttons.play.addClass('btnDisabled'); + } + + this.buttons = buttons; + + this.onUpdate(opts, obj); + }, + + onUpdate: function (opts, obj) { + var toggle; + + if (!this.buttons) { + return; + } + + toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); + + //Size toggle button + if (obj.canShrink) { + toggle.addClass('btnToggleOn'); + + } else if (!obj.canExpand) { + toggle.addClass('btnDisabled'); + } + }, + + beforeClose: function () { + if (this.list) { + this.list.remove(); + } + + this.list = null; + this.buttons = null; + } + }; + +}(jQuery)); diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js new file mode 100644 index 0000000..62737a5 --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-media.js @@ -0,0 +1,199 @@ +/*! + * Media helper for fancyBox + * version: 1.0.6 (Fri, 14 Jun 2013) + * @requires fancyBox v2.0 or later + * + * Usage: + * $(".fancybox").fancybox({ + * helpers : { + * media: true + * } + * }); + * + * Set custom URL parameters: + * $(".fancybox").fancybox({ + * helpers : { + * media: { + * youtube : { + * params : { + * autoplay : 0 + * } + * } + * } + * } + * }); + * + * Or: + * $(".fancybox").fancybox({, + * helpers : { + * media: true + * }, + * youtube : { + * autoplay: 0 + * } + * }); + * + * Supports: + * + * Youtube + * http://www.youtube.com/watch?v=opj24KnzrWo + * http://www.youtube.com/embed/opj24KnzrWo + * http://youtu.be/opj24KnzrWo + * http://www.youtube-nocookie.com/embed/opj24KnzrWo + * Vimeo + * http://vimeo.com/40648169 + * http://vimeo.com/channels/staffpicks/38843628 + * http://vimeo.com/groups/surrealism/videos/36516384 + * http://player.vimeo.com/video/45074303 + * Metacafe + * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ + * http://www.metacafe.com/watch/7635964/ + * Dailymotion + * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people + * Twitvid + * http://twitvid.com/QY7MD + * Twitpic + * http://twitpic.com/7p93st + * Instagram + * http://instagr.am/p/IejkuUGxQn/ + * http://instagram.com/p/IejkuUGxQn/ + * Google maps + * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 + * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 + * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 + */ +;(function ($) { + "use strict"; + + //Shortcut for fancyBox object + var F = $.fancybox, + format = function( url, rez, params ) { + params = params || ''; + + if ( $.type( params ) === "object" ) { + params = $.param(params, true); + } + + $.each(rez, function(key, value) { + url = url.replace( '$' + key, value || '' ); + }); + + if (params.length) { + url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; + } + + return url; + }; + + //Add helper object + F.helpers.media = { + defaults : { + youtube : { + matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, + params : { + autoplay : 1, + autohide : 1, + fs : 1, + rel : 0, + hd : 1, + wmode : 'opaque', + enablejsapi : 1 + }, + type : 'iframe', + url : '//www.youtube.com/embed/$3' + }, + vimeo : { + matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, + params : { + autoplay : 1, + hd : 1, + show_title : 1, + show_byline : 1, + show_portrait : 0, + fullscreen : 1 + }, + type : 'iframe', + url : '//player.vimeo.com/video/$1' + }, + metacafe : { + matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, + params : { + autoPlay : 'yes' + }, + type : 'swf', + url : function( rez, params, obj ) { + obj.swf.flashVars = 'playerVars=' + $.param( params, true ); + + return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; + } + }, + dailymotion : { + matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, + params : { + additionalInfos : 0, + autoStart : 1 + }, + type : 'swf', + url : '//www.dailymotion.com/swf/video/$1' + }, + twitvid : { + matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, + params : { + autoplay : 0 + }, + type : 'iframe', + url : '//www.twitvid.com/embed.php?guid=$1' + }, + twitpic : { + matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, + type : 'image', + url : '//twitpic.com/show/full/$1/' + }, + instagram : { + matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, + type : 'image', + url : '//$1/p/$2/media/?size=l' + }, + google_maps : { + matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, + type : 'iframe', + url : function( rez ) { + return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); + } + } + }, + + beforeLoad : function(opts, obj) { + var url = obj.href || '', + type = false, + what, + item, + rez, + params; + + for (what in opts) { + if (opts.hasOwnProperty(what)) { + item = opts[ what ]; + rez = url.match( item.matcher ); + + if (rez) { + type = item.type; + params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); + + url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); + + break; + } + } + } + + if (type) { + obj.href = url; + obj.type = type; + + obj.autoHeight = false; + } + } + }; + +}(jQuery)); \ No newline at end of file diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css new file mode 100644 index 0000000..63d2943 --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.css @@ -0,0 +1,55 @@ +#fancybox-thumbs { + position: fixed; + left: 0; + width: 100%; + overflow: hidden; + z-index: 8050; +} + +#fancybox-thumbs.bottom { + bottom: 2px; +} + +#fancybox-thumbs.top { + top: 2px; +} + +#fancybox-thumbs ul { + position: relative; + list-style: none; + margin: 0; + padding: 0; +} + +#fancybox-thumbs ul li { + float: left; + padding: 1px; + opacity: 0.5; +} + +#fancybox-thumbs ul li.active { + opacity: 0.75; + padding: 0; + border: 1px solid #fff; +} + +#fancybox-thumbs ul li:hover { + opacity: 1; +} + +#fancybox-thumbs ul li a { + display: block; + position: relative; + overflow: hidden; + border: 1px solid #222; + background: #111; + outline: none; +} + +#fancybox-thumbs ul li img { + display: block; + position: relative; + border: 0; + padding: 0; + max-width: none; +} \ No newline at end of file diff --git a/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js new file mode 100644 index 0000000..58c9719 --- /dev/null +++ b/themes/landscape/source/fancybox/helpers/jquery.fancybox-thumbs.js @@ -0,0 +1,165 @@ + /*! + * Thumbnail helper for fancyBox + * version: 1.0.7 (Mon, 01 Oct 2012) + * @requires fancyBox v2.0 or later + * + * Usage: + * $(".fancybox").fancybox({ + * helpers : { + * thumbs: { + * width : 50, + * height : 50 + * } + * } + * }); + * + */ +;(function ($) { + //Shortcut for fancyBox object + var F = $.fancybox; + + //Add helper object + F.helpers.thumbs = { + defaults : { + width : 50, // thumbnail width + height : 50, // thumbnail height + position : 'bottom', // 'top' or 'bottom' + source : function ( item ) { // function to obtain the URL of the thumbnail image + var href; + + if (item.element) { + href = $(item.element).find('img').attr('src'); + } + + if (!href && item.type === 'image' && item.href) { + href = item.href; + } + + return href; + } + }, + + wrap : null, + list : null, + width : 0, + + init: function (opts, obj) { + var that = this, + list, + thumbWidth = opts.width, + thumbHeight = opts.height, + thumbSource = opts.source; + + //Build list structure + list = ''; + + for (var n = 0; n < obj.group.length; n++) { + list += '
  • '; + } + + this.wrap = $('
    ').addClass(opts.position).appendTo('body'); + this.list = $('').appendTo(this.wrap); + + //Load each thumbnail + $.each(obj.group, function (i) { + var el = obj.group[ i ], + href = thumbSource( el ); + + if (!href) { + return; + } + + $("").load(function () { + var width = this.width, + height = this.height, + widthRatio, heightRatio, parent; + + if (!that.list || !width || !height) { + return; + } + + //Calculate thumbnail width/height and center it + widthRatio = width / thumbWidth; + heightRatio = height / thumbHeight; + + parent = that.list.children().eq(i).find('a'); + + if (widthRatio >= 1 && heightRatio >= 1) { + if (widthRatio > heightRatio) { + width = Math.floor(width / heightRatio); + height = thumbHeight; + + } else { + width = thumbWidth; + height = Math.floor(height / widthRatio); + } + } + + $(this).css({ + width : width, + height : height, + top : Math.floor(thumbHeight / 2 - height / 2), + left : Math.floor(thumbWidth / 2 - width / 2) + }); + + parent.width(thumbWidth).height(thumbHeight); + + $(this).hide().appendTo(parent).fadeIn(300); + + }) + .attr('src', href) + .attr('title', el.title); + }); + + //Set initial width + this.width = this.list.children().eq(0).outerWidth(true); + + this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); + }, + + beforeLoad: function (opts, obj) { + //Remove self if gallery do not have at least two items + if (obj.group.length < 2) { + obj.helpers.thumbs = false; + + return; + } + + //Increase bottom margin to give space for thumbs + obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); + }, + + afterShow: function (opts, obj) { + //Check if exists and create or update list + if (this.list) { + this.onUpdate(opts, obj); + + } else { + this.init(opts, obj); + } + + //Set active element + this.list.children().removeClass('active').eq(obj.index).addClass('active'); + }, + + //Center list + onUpdate: function (opts, obj) { + if (this.list) { + this.list.stop(true).animate({ + 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) + }, 150); + } + }, + + beforeClose: function () { + if (this.wrap) { + this.wrap.remove(); + } + + this.wrap = null; + this.list = null; + this.width = 0; + } + } + +}(jQuery)); \ No newline at end of file diff --git a/themes/landscape/source/fancybox/jquery.fancybox.css b/themes/landscape/source/fancybox/jquery.fancybox.css new file mode 100644 index 0000000..c75d051 --- /dev/null +++ b/themes/landscape/source/fancybox/jquery.fancybox.css @@ -0,0 +1,273 @@ +/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ +.fancybox-wrap, +.fancybox-skin, +.fancybox-outer, +.fancybox-inner, +.fancybox-image, +.fancybox-wrap iframe, +.fancybox-wrap object, +.fancybox-nav, +.fancybox-nav span, +.fancybox-tmp +{ + padding: 0; + margin: 0; + border: 0; + outline: none; + vertical-align: top; +} + +.fancybox-wrap { + position: absolute; + top: 0; + left: 0; + z-index: 8020; +} + +.fancybox-skin { + position: relative; + background: #f9f9f9; + color: #444; + text-shadow: none; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.fancybox-opened { + z-index: 8030; +} + +.fancybox-opened .fancybox-skin { + -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); + box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); +} + +.fancybox-outer, .fancybox-inner { + position: relative; +} + +.fancybox-inner { + overflow: hidden; +} + +.fancybox-type-iframe .fancybox-inner { + -webkit-overflow-scrolling: touch; +} + +.fancybox-error { + color: #444; + font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; + margin: 0; + padding: 15px; + white-space: nowrap; +} + +.fancybox-image, .fancybox-iframe { + display: block; + width: 100%; + height: 100%; +} + +.fancybox-image { + max-width: 100%; + max-height: 100%; +} + +#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { + background-image: url(fancybox_sprite.png); +} + +#fancybox-loading { + position: fixed; + top: 50%; + left: 50%; + margin-top: -22px; + margin-left: -22px; + background-position: 0 -108px; + opacity: 0.8; + cursor: pointer; + z-index: 8060; +} + +#fancybox-loading div { + width: 44px; + height: 44px; + background: url(fancybox_loading.gif) center center no-repeat; +} + +.fancybox-close { + position: absolute; + top: -18px; + right: -18px; + width: 36px; + height: 36px; + cursor: pointer; + z-index: 8040; +} + +.fancybox-nav { + position: absolute; + top: 0; + width: 40%; + height: 100%; + cursor: pointer; + text-decoration: none; + background: transparent url(blank.gif); /* helps IE */ + -webkit-tap-highlight-color: rgba(0,0,0,0); + z-index: 8040; +} + +.fancybox-prev { + left: 0; +} + +.fancybox-next { + right: 0; +} + +.fancybox-nav span { + position: absolute; + top: 50%; + width: 36px; + height: 34px; + margin-top: -18px; + cursor: pointer; + z-index: 8040; + visibility: hidden; +} + +.fancybox-prev span { + left: 10px; + background-position: 0 -36px; +} + +.fancybox-next span { + right: 10px; + background-position: 0 -72px; +} + +.fancybox-nav:hover span { + visibility: visible; +} + +.fancybox-tmp { + position: absolute; + top: -99999px; + left: -99999px; + max-width: 99999px; + max-height: 99999px; + overflow: visible !important; +} + +/* Overlay helper */ + +.fancybox-lock { + overflow: visible !important; + width: auto; +} + +.fancybox-lock body { + overflow: hidden !important; +} + +.fancybox-lock-test { + overflow-y: hidden !important; +} + +.fancybox-overlay { + position: absolute; + top: 0; + left: 0; + overflow: hidden; + display: none; + z-index: 8010; + background: url(fancybox_overlay.png); +} + +.fancybox-overlay-fixed { + position: fixed; + bottom: 0; + right: 0; +} + +.fancybox-lock .fancybox-overlay { + overflow: auto; + overflow-y: scroll; +} + +/* Title helper */ + +.fancybox-title { + visibility: hidden; + font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; + position: relative; + text-shadow: none; + z-index: 8050; +} + +.fancybox-opened .fancybox-title { + visibility: visible; +} + +.fancybox-title-float-wrap { + position: absolute; + bottom: 0; + right: 50%; + margin-bottom: -35px; + z-index: 8050; + text-align: center; +} + +.fancybox-title-float-wrap .child { + display: inline-block; + margin-right: -100%; + padding: 2px 20px; + background: transparent; /* Fallback for web browsers that doesn't support RGBa */ + background: rgba(0, 0, 0, 0.8); + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; + text-shadow: 0 1px 2px #222; + color: #FFF; + font-weight: bold; + line-height: 24px; + white-space: nowrap; +} + +.fancybox-title-outside-wrap { + position: relative; + margin-top: 10px; + color: #fff; +} + +.fancybox-title-inside-wrap { + padding-top: 10px; +} + +.fancybox-title-over-wrap { + position: absolute; + bottom: 0; + left: 0; + color: #fff; + padding: 10px; + background: #000; + background: rgba(0, 0, 0, .8); +} + +/*Retina graphics!*/ +@media only screen and (-webkit-min-device-pixel-ratio: 1.5), + only screen and (min--moz-device-pixel-ratio: 1.5), + only screen and (min-device-pixel-ratio: 1.5){ + + #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { + background-image: url(fancybox_sprite@2x.png); + background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ + } + + #fancybox-loading div { + background-image: url(fancybox_loading@2x.gif); + background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ + } +} \ No newline at end of file diff --git a/themes/landscape/source/fancybox/jquery.fancybox.js b/themes/landscape/source/fancybox/jquery.fancybox.js new file mode 100644 index 0000000..7a0f8ac --- /dev/null +++ b/themes/landscape/source/fancybox/jquery.fancybox.js @@ -0,0 +1,2017 @@ +/*! + * fancyBox - jQuery Plugin + * version: 2.1.5 (Fri, 14 Jun 2013) + * requires jQuery v1.6 or later + * + * Examples at http://fancyapps.com/fancybox/ + * License: www.fancyapps.com/fancybox/#license + * + * Copyright 2012 Janis Skarnelis - janis@fancyapps.com + * + */ + +;(function (window, document, $, undefined) { + "use strict"; + + var H = $("html"), + W = $(window), + D = $(document), + F = $.fancybox = function () { + F.open.apply( this, arguments ); + }, + IE = navigator.userAgent.match(/msie/i), + didUpdate = null, + isTouch = document.createTouch !== undefined, + + isQuery = function(obj) { + return obj && obj.hasOwnProperty && obj instanceof $; + }, + isString = function(str) { + return str && $.type(str) === "string"; + }, + isPercentage = function(str) { + return isString(str) && str.indexOf('%') > 0; + }, + isScrollable = function(el) { + return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); + }, + getScalar = function(orig, dim) { + var value = parseInt(orig, 10) || 0; + + if (dim && isPercentage(orig)) { + value = F.getViewport()[ dim ] / 100 * value; + } + + return Math.ceil(value); + }, + getValue = function(value, dim) { + return getScalar(value, dim) + 'px'; + }; + + $.extend(F, { + // The current version of fancyBox + version: '2.1.5', + + defaults: { + padding : 15, + margin : 20, + + width : 800, + height : 600, + minWidth : 100, + minHeight : 100, + maxWidth : 9999, + maxHeight : 9999, + pixelRatio: 1, // Set to 2 for retina display support + + autoSize : true, + autoHeight : false, + autoWidth : false, + + autoResize : true, + autoCenter : !isTouch, + fitToView : true, + aspectRatio : false, + topRatio : 0.5, + leftRatio : 0.5, + + scrolling : 'auto', // 'auto', 'yes' or 'no' + wrapCSS : '', + + arrows : true, + closeBtn : true, + closeClick : false, + nextClick : false, + mouseWheel : true, + autoPlay : false, + playSpeed : 3000, + preload : 3, + modal : false, + loop : true, + + ajax : { + dataType : 'html', + headers : { 'X-fancyBox': true } + }, + iframe : { + scrolling : 'auto', + preload : true + }, + swf : { + wmode: 'transparent', + allowfullscreen : 'true', + allowscriptaccess : 'always' + }, + + keys : { + next : { + 13 : 'left', // enter + 34 : 'up', // page down + 39 : 'left', // right arrow + 40 : 'up' // down arrow + }, + prev : { + 8 : 'right', // backspace + 33 : 'down', // page up + 37 : 'right', // left arrow + 38 : 'down' // up arrow + }, + close : [27], // escape key + play : [32], // space - start/stop slideshow + toggle : [70] // letter "f" - toggle fullscreen + }, + + direction : { + next : 'left', + prev : 'right' + }, + + scrollOutside : true, + + // Override some properties + index : 0, + type : null, + href : null, + content : null, + title : null, + + // HTML templates + tpl: { + wrap : '
    ', + image : '', + iframe : '', + error : '

    The requested content cannot be loaded.
    Please try again later.

    ', + closeBtn : '', + next : '', + prev : '' + }, + + // Properties for each animation type + // Opening fancyBox + openEffect : 'fade', // 'elastic', 'fade' or 'none' + openSpeed : 250, + openEasing : 'swing', + openOpacity : true, + openMethod : 'zoomIn', + + // Closing fancyBox + closeEffect : 'fade', // 'elastic', 'fade' or 'none' + closeSpeed : 250, + closeEasing : 'swing', + closeOpacity : true, + closeMethod : 'zoomOut', + + // Changing next gallery item + nextEffect : 'elastic', // 'elastic', 'fade' or 'none' + nextSpeed : 250, + nextEasing : 'swing', + nextMethod : 'changeIn', + + // Changing previous gallery item + prevEffect : 'elastic', // 'elastic', 'fade' or 'none' + prevSpeed : 250, + prevEasing : 'swing', + prevMethod : 'changeOut', + + // Enable default helpers + helpers : { + overlay : true, + title : true + }, + + // Callbacks + onCancel : $.noop, // If canceling + beforeLoad : $.noop, // Before loading + afterLoad : $.noop, // After loading + beforeShow : $.noop, // Before changing in current item + afterShow : $.noop, // After opening + beforeChange : $.noop, // Before changing gallery item + beforeClose : $.noop, // Before closing + afterClose : $.noop // After closing + }, + + //Current state + group : {}, // Selected group + opts : {}, // Group options + previous : null, // Previous element + coming : null, // Element being loaded + current : null, // Currently loaded element + isActive : false, // Is activated + isOpen : false, // Is currently open + isOpened : false, // Have been fully opened at least once + + wrap : null, + skin : null, + outer : null, + inner : null, + + player : { + timer : null, + isActive : false + }, + + // Loaders + ajaxLoad : null, + imgPreload : null, + + // Some collections + transitions : {}, + helpers : {}, + + /* + * Static methods + */ + + open: function (group, opts) { + if (!group) { + return; + } + + if (!$.isPlainObject(opts)) { + opts = {}; + } + + // Close if already active + if (false === F.close(true)) { + return; + } + + // Normalize group + if (!$.isArray(group)) { + group = isQuery(group) ? $(group).get() : [group]; + } + + // Recheck if the type of each element is `object` and set content type (image, ajax, etc) + $.each(group, function(i, element) { + var obj = {}, + href, + title, + content, + type, + rez, + hrefParts, + selector; + + if ($.type(element) === "object") { + // Check if is DOM element + if (element.nodeType) { + element = $(element); + } + + if (isQuery(element)) { + obj = { + href : element.data('fancybox-href') || element.attr('href'), + title : $('
    ').text( element.data('fancybox-title') || element.attr('title') ).html(), + isDom : true, + element : element + }; + + if ($.metadata) { + $.extend(true, obj, element.metadata()); + } + + } else { + obj = element; + } + } + + href = opts.href || obj.href || (isString(element) ? element : null); + title = opts.title !== undefined ? opts.title : obj.title || ''; + + content = opts.content || obj.content; + type = content ? 'html' : (opts.type || obj.type); + + if (!type && obj.isDom) { + type = element.data('fancybox-type'); + + if (!type) { + rez = element.prop('class').match(/fancybox\.(\w+)/); + type = rez ? rez[1] : null; + } + } + + if (isString(href)) { + // Try to guess the content type + if (!type) { + if (F.isImage(href)) { + type = 'image'; + + } else if (F.isSWF(href)) { + type = 'swf'; + + } else if (href.charAt(0) === '#') { + type = 'inline'; + + } else if (isString(element)) { + type = 'html'; + content = element; + } + } + + // Split url into two pieces with source url and content selector, e.g, + // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" + if (type === 'ajax') { + hrefParts = href.split(/\s+/, 2); + href = hrefParts.shift(); + selector = hrefParts.shift(); + } + } + + if (!content) { + if (type === 'inline') { + if (href) { + content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 + + } else if (obj.isDom) { + content = element; + } + + } else if (type === 'html') { + content = href; + + } else if (!type && !href && obj.isDom) { + type = 'inline'; + content = element; + } + } + + $.extend(obj, { + href : href, + type : type, + content : content, + title : title, + selector : selector + }); + + group[ i ] = obj; + }); + + // Extend the defaults + F.opts = $.extend(true, {}, F.defaults, opts); + + // All options are merged recursive except keys + if (opts.keys !== undefined) { + F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; + } + + F.group = group; + + return F._start(F.opts.index); + }, + + // Cancel image loading or abort ajax request + cancel: function () { + var coming = F.coming; + + if (coming && false === F.trigger('onCancel')) { + return; + } + + F.hideLoading(); + + if (!coming) { + return; + } + + if (F.ajaxLoad) { + F.ajaxLoad.abort(); + } + + F.ajaxLoad = null; + + if (F.imgPreload) { + F.imgPreload.onload = F.imgPreload.onerror = null; + } + + if (coming.wrap) { + coming.wrap.stop(true, true).trigger('onReset').remove(); + } + + F.coming = null; + + // If the first item has been canceled, then clear everything + if (!F.current) { + F._afterZoomOut( coming ); + } + }, + + // Start closing animation if is open; remove immediately if opening/closing + close: function (event) { + F.cancel(); + + if (false === F.trigger('beforeClose')) { + return; + } + + F.unbindEvents(); + + if (!F.isActive) { + return; + } + + if (!F.isOpen || event === true) { + $('.fancybox-wrap').stop(true).trigger('onReset').remove(); + + F._afterZoomOut(); + + } else { + F.isOpen = F.isOpened = false; + F.isClosing = true; + + $('.fancybox-item, .fancybox-nav').remove(); + + F.wrap.stop(true, true).removeClass('fancybox-opened'); + + F.transitions[ F.current.closeMethod ](); + } + }, + + // Manage slideshow: + // $.fancybox.play(); - toggle slideshow + // $.fancybox.play( true ); - start + // $.fancybox.play( false ); - stop + play: function ( action ) { + var clear = function () { + clearTimeout(F.player.timer); + }, + set = function () { + clear(); + + if (F.current && F.player.isActive) { + F.player.timer = setTimeout(F.next, F.current.playSpeed); + } + }, + stop = function () { + clear(); + + D.unbind('.player'); + + F.player.isActive = false; + + F.trigger('onPlayEnd'); + }, + start = function () { + if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { + F.player.isActive = true; + + D.bind({ + 'onCancel.player beforeClose.player' : stop, + 'onUpdate.player' : set, + 'beforeLoad.player' : clear + }); + + set(); + + F.trigger('onPlayStart'); + } + }; + + if (action === true || (!F.player.isActive && action !== false)) { + start(); + } else { + stop(); + } + }, + + // Navigate to next gallery item + next: function ( direction ) { + var current = F.current; + + if (current) { + if (!isString(direction)) { + direction = current.direction.next; + } + + F.jumpto(current.index + 1, direction, 'next'); + } + }, + + // Navigate to previous gallery item + prev: function ( direction ) { + var current = F.current; + + if (current) { + if (!isString(direction)) { + direction = current.direction.prev; + } + + F.jumpto(current.index - 1, direction, 'prev'); + } + }, + + // Navigate to gallery item by index + jumpto: function ( index, direction, router ) { + var current = F.current; + + if (!current) { + return; + } + + index = getScalar(index); + + F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; + F.router = router || 'jumpto'; + + if (current.loop) { + if (index < 0) { + index = current.group.length + (index % current.group.length); + } + + index = index % current.group.length; + } + + if (current.group[ index ] !== undefined) { + F.cancel(); + + F._start(index); + } + }, + + // Center inside viewport and toggle position type to fixed or absolute if needed + reposition: function (e, onlyAbsolute) { + var current = F.current, + wrap = current ? current.wrap : null, + pos; + + if (wrap) { + pos = F._getPosition(onlyAbsolute); + + if (e && e.type === 'scroll') { + delete pos.position; + + wrap.stop(true, true).animate(pos, 200); + + } else { + wrap.css(pos); + + current.pos = $.extend({}, current.dim, pos); + } + } + }, + + update: function (e) { + var type = (e && e.originalEvent && e.originalEvent.type), + anyway = !type || type === 'orientationchange'; + + if (anyway) { + clearTimeout(didUpdate); + + didUpdate = null; + } + + if (!F.isOpen || didUpdate) { + return; + } + + didUpdate = setTimeout(function() { + var current = F.current; + + if (!current || F.isClosing) { + return; + } + + F.wrap.removeClass('fancybox-tmp'); + + if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { + F._setDimension(); + } + + if (!(type === 'scroll' && current.canShrink)) { + F.reposition(e); + } + + F.trigger('onUpdate'); + + didUpdate = null; + + }, (anyway && !isTouch ? 0 : 300)); + }, + + // Shrink content to fit inside viewport or restore if resized + toggle: function ( action ) { + if (F.isOpen) { + F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; + + // Help browser to restore document dimensions + if (isTouch) { + F.wrap.removeAttr('style').addClass('fancybox-tmp'); + + F.trigger('onUpdate'); + } + + F.update(); + } + }, + + hideLoading: function () { + D.unbind('.loading'); + + $('#fancybox-loading').remove(); + }, + + showLoading: function () { + var el, viewport; + + F.hideLoading(); + + el = $('
    ').click(F.cancel).appendTo('body'); + + // If user will press the escape-button, the request will be canceled + D.bind('keydown.loading', function(e) { + if ((e.which || e.keyCode) === 27) { + e.preventDefault(); + + F.cancel(); + } + }); + + if (!F.defaults.fixed) { + viewport = F.getViewport(); + + el.css({ + position : 'absolute', + top : (viewport.h * 0.5) + viewport.y, + left : (viewport.w * 0.5) + viewport.x + }); + } + + F.trigger('onLoading'); + }, + + getViewport: function () { + var locked = (F.current && F.current.locked) || false, + rez = { + x: W.scrollLeft(), + y: W.scrollTop() + }; + + if (locked && locked.length) { + rez.w = locked[0].clientWidth; + rez.h = locked[0].clientHeight; + + } else { + // See http://bugs.jquery.com/ticket/6724 + rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); + rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); + } + + return rez; + }, + + // Unbind the keyboard / clicking actions + unbindEvents: function () { + if (F.wrap && isQuery(F.wrap)) { + F.wrap.unbind('.fb'); + } + + D.unbind('.fb'); + W.unbind('.fb'); + }, + + bindEvents: function () { + var current = F.current, + keys; + + if (!current) { + return; + } + + // Changing document height on iOS devices triggers a 'resize' event, + // that can change document height... repeating infinitely + W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); + + keys = current.keys; + + if (keys) { + D.bind('keydown.fb', function (e) { + var code = e.which || e.keyCode, + target = e.target || e.srcElement; + + // Skip esc key if loading, because showLoading will cancel preloading + if (code === 27 && F.coming) { + return false; + } + + // Ignore key combinations and key events within form elements + if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { + $.each(keys, function(i, val) { + if (current.group.length > 1 && val[ code ] !== undefined) { + F[ i ]( val[ code ] ); + + e.preventDefault(); + return false; + } + + if ($.inArray(code, val) > -1) { + F[ i ] (); + + e.preventDefault(); + return false; + } + }); + } + }); + } + + if ($.fn.mousewheel && current.mouseWheel) { + F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { + var target = e.target || null, + parent = $(target), + canScroll = false; + + while (parent.length) { + if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { + break; + } + + canScroll = isScrollable( parent[0] ); + parent = $(parent).parent(); + } + + if (delta !== 0 && !canScroll) { + if (F.group.length > 1 && !current.canShrink) { + if (deltaY > 0 || deltaX > 0) { + F.prev( deltaY > 0 ? 'down' : 'left' ); + + } else if (deltaY < 0 || deltaX < 0) { + F.next( deltaY < 0 ? 'up' : 'right' ); + } + + e.preventDefault(); + } + } + }); + } + }, + + trigger: function (event, o) { + var ret, obj = o || F.coming || F.current; + + if (obj) { + if ($.isFunction( obj[event] )) { + ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); + } + + if (ret === false) { + return false; + } + + if (obj.helpers) { + $.each(obj.helpers, function (helper, opts) { + if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { + F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); + } + }); + } + } + + D.trigger(event); + }, + + isImage: function (str) { + return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); + }, + + isSWF: function (str) { + return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); + }, + + _start: function (index) { + var coming = {}, + obj, + href, + type, + margin, + padding; + + index = getScalar( index ); + obj = F.group[ index ] || null; + + if (!obj) { + return false; + } + + coming = $.extend(true, {}, F.opts, obj); + + // Convert margin and padding properties to array - top, right, bottom, left + margin = coming.margin; + padding = coming.padding; + + if ($.type(margin) === 'number') { + coming.margin = [margin, margin, margin, margin]; + } + + if ($.type(padding) === 'number') { + coming.padding = [padding, padding, padding, padding]; + } + + // 'modal' propery is just a shortcut + if (coming.modal) { + $.extend(true, coming, { + closeBtn : false, + closeClick : false, + nextClick : false, + arrows : false, + mouseWheel : false, + keys : null, + helpers: { + overlay : { + closeClick : false + } + } + }); + } + + // 'autoSize' property is a shortcut, too + if (coming.autoSize) { + coming.autoWidth = coming.autoHeight = true; + } + + if (coming.width === 'auto') { + coming.autoWidth = true; + } + + if (coming.height === 'auto') { + coming.autoHeight = true; + } + + /* + * Add reference to the group, so it`s possible to access from callbacks, example: + * afterLoad : function() { + * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); + * } + */ + + coming.group = F.group; + coming.index = index; + + // Give a chance for callback or helpers to update coming item (type, title, etc) + F.coming = coming; + + if (false === F.trigger('beforeLoad')) { + F.coming = null; + + return; + } + + type = coming.type; + href = coming.href; + + if (!type) { + F.coming = null; + + //If we can not determine content type then drop silently or display next/prev item if looping through gallery + if (F.current && F.router && F.router !== 'jumpto') { + F.current.index = index; + + return F[ F.router ]( F.direction ); + } + + return false; + } + + F.isActive = true; + + if (type === 'image' || type === 'swf') { + coming.autoHeight = coming.autoWidth = false; + coming.scrolling = 'visible'; + } + + if (type === 'image') { + coming.aspectRatio = true; + } + + if (type === 'iframe' && isTouch) { + coming.scrolling = 'scroll'; + } + + // Build the neccessary markup + coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); + + $.extend(coming, { + skin : $('.fancybox-skin', coming.wrap), + outer : $('.fancybox-outer', coming.wrap), + inner : $('.fancybox-inner', coming.wrap) + }); + + $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { + coming.skin.css('padding' + v, getValue(coming.padding[ i ])); + }); + + F.trigger('onReady'); + + // Check before try to load; 'inline' and 'html' types need content, others - href + if (type === 'inline' || type === 'html') { + if (!coming.content || !coming.content.length) { + return F._error( 'content' ); + } + + } else if (!href) { + return F._error( 'href' ); + } + + if (type === 'image') { + F._loadImage(); + + } else if (type === 'ajax') { + F._loadAjax(); + + } else if (type === 'iframe') { + F._loadIframe(); + + } else { + F._afterLoad(); + } + }, + + _error: function ( type ) { + $.extend(F.coming, { + type : 'html', + autoWidth : true, + autoHeight : true, + minWidth : 0, + minHeight : 0, + scrolling : 'no', + hasError : type, + content : F.coming.tpl.error + }); + + F._afterLoad(); + }, + + _loadImage: function () { + // Reset preload image so it is later possible to check "complete" property + var img = F.imgPreload = new Image(); + + img.onload = function () { + this.onload = this.onerror = null; + + F.coming.width = this.width / F.opts.pixelRatio; + F.coming.height = this.height / F.opts.pixelRatio; + + F._afterLoad(); + }; + + img.onerror = function () { + this.onload = this.onerror = null; + + F._error( 'image' ); + }; + + img.src = F.coming.href; + + if (img.complete !== true) { + F.showLoading(); + } + }, + + _loadAjax: function () { + var coming = F.coming; + + F.showLoading(); + + F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { + url: coming.href, + error: function (jqXHR, textStatus) { + if (F.coming && textStatus !== 'abort') { + F._error( 'ajax', jqXHR ); + + } else { + F.hideLoading(); + } + }, + success: function (data, textStatus) { + if (textStatus === 'success') { + coming.content = data; + + F._afterLoad(); + } + } + })); + }, + + _loadIframe: function() { + var coming = F.coming, + iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) + .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) + .attr('src', coming.href); + + // This helps IE + $(coming.wrap).bind('onReset', function () { + try { + $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); + } catch (e) {} + }); + + if (coming.iframe.preload) { + F.showLoading(); + + iframe.one('load', function() { + $(this).data('ready', 1); + + // iOS will lose scrolling if we resize + if (!isTouch) { + $(this).bind('load.fb', F.update); + } + + // Without this trick: + // - iframe won't scroll on iOS devices + // - IE7 sometimes displays empty iframe + $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); + + F._afterLoad(); + }); + } + + coming.content = iframe.appendTo( coming.inner ); + + if (!coming.iframe.preload) { + F._afterLoad(); + } + }, + + _preloadImages: function() { + var group = F.group, + current = F.current, + len = group.length, + cnt = current.preload ? Math.min(current.preload, len - 1) : 0, + item, + i; + + for (i = 1; i <= cnt; i += 1) { + item = group[ (current.index + i ) % len ]; + + if (item.type === 'image' && item.href) { + new Image().src = item.href; + } + } + }, + + _afterLoad: function () { + var coming = F.coming, + previous = F.current, + placeholder = 'fancybox-placeholder', + current, + content, + type, + scrolling, + href, + embed; + + F.hideLoading(); + + if (!coming || F.isActive === false) { + return; + } + + if (false === F.trigger('afterLoad', coming, previous)) { + coming.wrap.stop(true).trigger('onReset').remove(); + + F.coming = null; + + return; + } + + if (previous) { + F.trigger('beforeChange', previous); + + previous.wrap.stop(true).removeClass('fancybox-opened') + .find('.fancybox-item, .fancybox-nav') + .remove(); + } + + F.unbindEvents(); + + current = coming; + content = coming.content; + type = coming.type; + scrolling = coming.scrolling; + + $.extend(F, { + wrap : current.wrap, + skin : current.skin, + outer : current.outer, + inner : current.inner, + current : current, + previous : previous + }); + + href = current.href; + + switch (type) { + case 'inline': + case 'ajax': + case 'html': + if (current.selector) { + content = $('
    ').html(content).find(current.selector); + + } else if (isQuery(content)) { + if (!content.data(placeholder)) { + content.data(placeholder, $('
    ').insertAfter( content ).hide() ); + } + + content = content.show().detach(); + + current.wrap.bind('onReset', function () { + if ($(this).find(content).length) { + content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); + } + }); + } + break; + + case 'image': + content = current.tpl.image.replace(/\{href\}/g, href); + break; + + case 'swf': + content = ''; + embed = ''; + + $.each(current.swf, function(name, val) { + content += ''; + embed += ' ' + name + '="' + val + '"'; + }); + + content += ''; + break; + } + + if (!(isQuery(content) && content.parent().is(current.inner))) { + current.inner.append( content ); + } + + // Give a chance for helpers or callbacks to update elements + F.trigger('beforeShow'); + + // Set scrolling before calculating dimensions + current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); + + // Set initial dimensions and start position + F._setDimension(); + + F.reposition(); + + F.isOpen = false; + F.coming = null; + + F.bindEvents(); + + if (!F.isOpened) { + $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); + + } else if (previous.prevMethod) { + F.transitions[ previous.prevMethod ](); + } + + F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); + + F._preloadImages(); + }, + + _setDimension: function () { + var viewport = F.getViewport(), + steps = 0, + canShrink = false, + canExpand = false, + wrap = F.wrap, + skin = F.skin, + inner = F.inner, + current = F.current, + width = current.width, + height = current.height, + minWidth = current.minWidth, + minHeight = current.minHeight, + maxWidth = current.maxWidth, + maxHeight = current.maxHeight, + scrolling = current.scrolling, + scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, + margin = current.margin, + wMargin = getScalar(margin[1] + margin[3]), + hMargin = getScalar(margin[0] + margin[2]), + wPadding, + hPadding, + wSpace, + hSpace, + origWidth, + origHeight, + origMaxWidth, + origMaxHeight, + ratio, + width_, + height_, + maxWidth_, + maxHeight_, + iframe, + body; + + // Reset dimensions so we could re-check actual size + wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); + + wPadding = getScalar(skin.outerWidth(true) - skin.width()); + hPadding = getScalar(skin.outerHeight(true) - skin.height()); + + // Any space between content and viewport (margin, padding, border, title) + wSpace = wMargin + wPadding; + hSpace = hMargin + hPadding; + + origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; + origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; + + if (current.type === 'iframe') { + iframe = current.content; + + if (current.autoHeight && iframe.data('ready') === 1) { + try { + if (iframe[0].contentWindow.document.location) { + inner.width( origWidth ).height(9999); + + body = iframe.contents().find('body'); + + if (scrollOut) { + body.css('overflow-x', 'hidden'); + } + + origHeight = body.outerHeight(true); + } + + } catch (e) {} + } + + } else if (current.autoWidth || current.autoHeight) { + inner.addClass( 'fancybox-tmp' ); + + // Set width or height in case we need to calculate only one dimension + if (!current.autoWidth) { + inner.width( origWidth ); + } + + if (!current.autoHeight) { + inner.height( origHeight ); + } + + if (current.autoWidth) { + origWidth = inner.width(); + } + + if (current.autoHeight) { + origHeight = inner.height(); + } + + inner.removeClass( 'fancybox-tmp' ); + } + + width = getScalar( origWidth ); + height = getScalar( origHeight ); + + ratio = origWidth / origHeight; + + // Calculations for the content + minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); + maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); + + minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); + maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); + + // These will be used to determine if wrap can fit in the viewport + origMaxWidth = maxWidth; + origMaxHeight = maxHeight; + + if (current.fitToView) { + maxWidth = Math.min(viewport.w - wSpace, maxWidth); + maxHeight = Math.min(viewport.h - hSpace, maxHeight); + } + + maxWidth_ = viewport.w - wMargin; + maxHeight_ = viewport.h - hMargin; + + if (current.aspectRatio) { + if (width > maxWidth) { + width = maxWidth; + height = getScalar(width / ratio); + } + + if (height > maxHeight) { + height = maxHeight; + width = getScalar(height * ratio); + } + + if (width < minWidth) { + width = minWidth; + height = getScalar(width / ratio); + } + + if (height < minHeight) { + height = minHeight; + width = getScalar(height * ratio); + } + + } else { + width = Math.max(minWidth, Math.min(width, maxWidth)); + + if (current.autoHeight && current.type !== 'iframe') { + inner.width( width ); + + height = inner.height(); + } + + height = Math.max(minHeight, Math.min(height, maxHeight)); + } + + // Try to fit inside viewport (including the title) + if (current.fitToView) { + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + // Real wrap dimensions + width_ = wrap.width(); + height_ = wrap.height(); + + if (current.aspectRatio) { + while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { + if (steps++ > 19) { + break; + } + + height = Math.max(minHeight, Math.min(maxHeight, height - 10)); + width = getScalar(height * ratio); + + if (width < minWidth) { + width = minWidth; + height = getScalar(width / ratio); + } + + if (width > maxWidth) { + width = maxWidth; + height = getScalar(width / ratio); + } + + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + width_ = wrap.width(); + height_ = wrap.height(); + } + + } else { + width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); + height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); + } + } + + if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { + width += scrollOut; + } + + inner.width( width ).height( height ); + + wrap.width( width + wPadding ); + + width_ = wrap.width(); + height_ = wrap.height(); + + canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; + canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); + + $.extend(current, { + dim : { + width : getValue( width_ ), + height : getValue( height_ ) + }, + origWidth : origWidth, + origHeight : origHeight, + canShrink : canShrink, + canExpand : canExpand, + wPadding : wPadding, + hPadding : hPadding, + wrapSpace : height_ - skin.outerHeight(true), + skinSpace : skin.height() - height + }); + + if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { + inner.height('auto'); + } + }, + + _getPosition: function (onlyAbsolute) { + var current = F.current, + viewport = F.getViewport(), + margin = current.margin, + width = F.wrap.width() + margin[1] + margin[3], + height = F.wrap.height() + margin[0] + margin[2], + rez = { + position: 'absolute', + top : margin[0], + left : margin[3] + }; + + if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { + rez.position = 'fixed'; + + } else if (!current.locked) { + rez.top += viewport.y; + rez.left += viewport.x; + } + + rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); + rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); + + return rez; + }, + + _afterZoomIn: function () { + var current = F.current; + + if (!current) { + return; + } + + F.isOpen = F.isOpened = true; + + F.wrap.css('overflow', 'visible').addClass('fancybox-opened').hide().show(0); + + F.update(); + + // Assign a click event + if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { + F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { + if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { + e.preventDefault(); + + F[ current.closeClick ? 'close' : 'next' ](); + } + }); + } + + // Create a close button + if (current.closeBtn) { + $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { + e.preventDefault(); + + F.close(); + }); + } + + // Create navigation arrows + if (current.arrows && F.group.length > 1) { + if (current.loop || current.index > 0) { + $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); + } + + if (current.loop || current.index < F.group.length - 1) { + $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); + } + } + + F.trigger('afterShow'); + + // Stop the slideshow if this is the last item + if (!current.loop && current.index === current.group.length - 1) { + + F.play( false ); + + } else if (F.opts.autoPlay && !F.player.isActive) { + F.opts.autoPlay = false; + + F.play(true); + } + }, + + _afterZoomOut: function ( obj ) { + obj = obj || F.current; + + $('.fancybox-wrap').trigger('onReset').remove(); + + $.extend(F, { + group : {}, + opts : {}, + router : false, + current : null, + isActive : false, + isOpened : false, + isOpen : false, + isClosing : false, + wrap : null, + skin : null, + outer : null, + inner : null + }); + + F.trigger('afterClose', obj); + } + }); + + /* + * Default transitions + */ + + F.transitions = { + getOrigPosition: function () { + var current = F.current, + element = current.element, + orig = current.orig, + pos = {}, + width = 50, + height = 50, + hPadding = current.hPadding, + wPadding = current.wPadding, + viewport = F.getViewport(); + + if (!orig && current.isDom && element.is(':visible')) { + orig = element.find('img:first'); + + if (!orig.length) { + orig = element; + } + } + + if (isQuery(orig)) { + pos = orig.offset(); + + if (orig.is('img')) { + width = orig.outerWidth(); + height = orig.outerHeight(); + } + + } else { + pos.top = viewport.y + (viewport.h - height) * current.topRatio; + pos.left = viewport.x + (viewport.w - width) * current.leftRatio; + } + + if (F.wrap.css('position') === 'fixed' || current.locked) { + pos.top -= viewport.y; + pos.left -= viewport.x; + } + + pos = { + top : getValue(pos.top - hPadding * current.topRatio), + left : getValue(pos.left - wPadding * current.leftRatio), + width : getValue(width + wPadding), + height : getValue(height + hPadding) + }; + + return pos; + }, + + step: function (now, fx) { + var ratio, + padding, + value, + prop = fx.prop, + current = F.current, + wrapSpace = current.wrapSpace, + skinSpace = current.skinSpace; + + if (prop === 'width' || prop === 'height') { + ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); + + if (F.isClosing) { + ratio = 1 - ratio; + } + + padding = prop === 'width' ? current.wPadding : current.hPadding; + value = now - padding; + + F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); + F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); + } + }, + + zoomIn: function () { + var current = F.current, + startPos = current.pos, + effect = current.openEffect, + elastic = effect === 'elastic', + endPos = $.extend({opacity : 1}, startPos); + + // Remove "position" property that breaks older IE + delete endPos.position; + + if (elastic) { + startPos = this.getOrigPosition(); + + if (current.openOpacity) { + startPos.opacity = 0.1; + } + + } else if (effect === 'fade') { + startPos.opacity = 0.1; + } + + F.wrap.css(startPos).animate(endPos, { + duration : effect === 'none' ? 0 : current.openSpeed, + easing : current.openEasing, + step : elastic ? this.step : null, + complete : F._afterZoomIn + }); + }, + + zoomOut: function () { + var current = F.current, + effect = current.closeEffect, + elastic = effect === 'elastic', + endPos = {opacity : 0.1}; + + if (elastic) { + endPos = this.getOrigPosition(); + + if (current.closeOpacity) { + endPos.opacity = 0.1; + } + } + + F.wrap.animate(endPos, { + duration : effect === 'none' ? 0 : current.closeSpeed, + easing : current.closeEasing, + step : elastic ? this.step : null, + complete : F._afterZoomOut + }); + }, + + changeIn: function () { + var current = F.current, + effect = current.nextEffect, + startPos = current.pos, + endPos = { opacity : 1 }, + direction = F.direction, + distance = 200, + field; + + startPos.opacity = 0.1; + + if (effect === 'elastic') { + field = direction === 'down' || direction === 'up' ? 'top' : 'left'; + + if (direction === 'down' || direction === 'right') { + startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); + endPos[ field ] = '+=' + distance + 'px'; + + } else { + startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); + endPos[ field ] = '-=' + distance + 'px'; + } + } + + // Workaround for http://bugs.jquery.com/ticket/12273 + if (effect === 'none') { + F._afterZoomIn(); + + } else { + F.wrap.css(startPos).animate(endPos, { + duration : current.nextSpeed, + easing : current.nextEasing, + complete : F._afterZoomIn + }); + } + }, + + changeOut: function () { + var previous = F.previous, + effect = previous.prevEffect, + endPos = { opacity : 0.1 }, + direction = F.direction, + distance = 200; + + if (effect === 'elastic') { + endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; + } + + previous.wrap.animate(endPos, { + duration : effect === 'none' ? 0 : previous.prevSpeed, + easing : previous.prevEasing, + complete : function () { + $(this).trigger('onReset').remove(); + } + }); + } + }; + + /* + * Overlay helper + */ + + F.helpers.overlay = { + defaults : { + closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay + speedOut : 200, // duration of fadeOut animation + showEarly : true, // indicates if should be opened immediately or wait until the content is ready + css : {}, // custom CSS properties + locked : !isTouch, // if true, the content will be locked into overlay + fixed : true // if false, the overlay CSS position property will not be set to "fixed" + }, + + overlay : null, // current handle + fixed : false, // indicates if the overlay has position "fixed" + el : $('html'), // element that contains "the lock" + + // Public methods + create : function(opts) { + var parent; + + opts = $.extend({}, this.defaults, opts); + + if (this.overlay) { + this.close(); + } + + parent = F.coming ? F.coming.parent : opts.parent; + + this.overlay = $('
    ').appendTo( parent && parent.lenth ? parent : 'body' ); + this.fixed = false; + + if (opts.fixed && F.defaults.fixed) { + this.overlay.addClass('fancybox-overlay-fixed'); + + this.fixed = true; + } + }, + + open : function(opts) { + var that = this; + + opts = $.extend({}, this.defaults, opts); + + if (this.overlay) { + this.overlay.unbind('.overlay').width('auto').height('auto'); + + } else { + this.create(opts); + } + + if (!this.fixed) { + W.bind('resize.overlay', $.proxy( this.update, this) ); + + this.update(); + } + + if (opts.closeClick) { + this.overlay.bind('click.overlay', function(e) { + if ($(e.target).hasClass('fancybox-overlay')) { + if (F.isActive) { + F.close(); + } else { + that.close(); + } + + return false; + } + }); + } + + this.overlay.css( opts.css ).show(); + }, + + close : function() { + W.unbind('resize.overlay'); + + if (this.el.hasClass('fancybox-lock')) { + $('.fancybox-margin').removeClass('fancybox-margin'); + + this.el.removeClass('fancybox-lock'); + + W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); + } + + $('.fancybox-overlay').remove().hide(); + + $.extend(this, { + overlay : null, + fixed : false + }); + }, + + // Private, callbacks + + update : function () { + var width = '100%', offsetWidth; + + // Reset width/height so it will not mess + this.overlay.width(width).height('100%'); + + // jQuery does not return reliable result for IE + if (IE) { + offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); + + if (D.width() > offsetWidth) { + width = D.width(); + } + + } else if (D.width() > W.width()) { + width = D.width(); + } + + this.overlay.width(width).height(D.height()); + }, + + // This is where we can manipulate DOM, because later it would cause iframes to reload + onReady : function (opts, obj) { + var overlay = this.overlay; + + $('.fancybox-overlay').stop(true, true); + + if (!overlay) { + this.create(opts); + } + + if (opts.locked && this.fixed && obj.fixed) { + obj.locked = this.overlay.append( obj.wrap ); + obj.fixed = false; + } + + if (opts.showEarly === true) { + this.beforeShow.apply(this, arguments); + } + }, + + beforeShow : function(opts, obj) { + if (obj.locked && !this.el.hasClass('fancybox-lock')) { + if (this.fixPosition !== false) { + $('*').filter(function(){ + return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); + }).addClass('fancybox-margin'); + } + + this.el.addClass('fancybox-margin'); + + this.scrollV = W.scrollTop(); + this.scrollH = W.scrollLeft(); + + this.el.addClass('fancybox-lock'); + + W.scrollTop( this.scrollV ).scrollLeft( this.scrollH ); + } + + this.open(opts); + }, + + onUpdate : function() { + if (!this.fixed) { + this.update(); + } + }, + + afterClose: function (opts) { + // Remove overlay if exists and fancyBox is not opening + // (e.g., it is not being open using afterClose callback) + if (this.overlay && !F.coming) { + this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); + } + } + }; + + /* + * Title helper + */ + + F.helpers.title = { + defaults : { + type : 'float', // 'float', 'inside', 'outside' or 'over', + position : 'bottom' // 'top' or 'bottom' + }, + + beforeShow: function (opts) { + var current = F.current, + text = current.title, + type = opts.type, + title, + target; + + if ($.isFunction(text)) { + text = text.call(current.element, current); + } + + if (!isString(text) || $.trim(text) === '') { + return; + } + + title = $('
    ' + text + '
    '); + + switch (type) { + case 'inside': + target = F.skin; + break; + + case 'outside': + target = F.wrap; + break; + + case 'over': + target = F.inner; + break; + + default: // 'float' + target = F.skin; + + title.appendTo('body'); + + if (IE) { + title.width( title.width() ); + } + + title.wrapInner(''); + + //Increase bottom margin so this title will also fit into viewport + F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); + break; + } + + title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); + } + }; + + // jQuery plugin initialization + $.fn.fancybox = function (options) { + var index, + that = $(this), + selector = this.selector || '', + run = function(e) { + var what = $(this).blur(), idx = index, relType, relVal; + + if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { + relType = options.groupAttr || 'data-fancybox-group'; + relVal = what.attr(relType); + + if (!relVal) { + relType = 'rel'; + relVal = what.get(0)[ relType ]; + } + + if (relVal && relVal !== '' && relVal !== 'nofollow') { + what = selector.length ? $(selector) : that; + what = what.filter('[' + relType + '="' + relVal + '"]'); + idx = what.index(this); + } + + options.index = idx; + + // Stop an event from bubbling if everything is fine + if (F.open(what, options) !== false) { + e.preventDefault(); + } + } + }; + + options = options || {}; + index = options.index || 0; + + if (!selector || options.live === false) { + that.unbind('click.fb-start').bind('click.fb-start', run); + + } else { + D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); + } + + this.filter('[data-fancybox-start=1]').trigger('click'); + + return this; + }; + + // Tests that need a body at doc ready + D.ready(function() { + var w1, w2; + + if ( $.scrollbarWidth === undefined ) { + // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth + $.scrollbarWidth = function() { + var parent = $('
    ').appendTo('body'), + child = parent.children(), + width = child.innerWidth() - child.height( 99 ).innerWidth(); + + parent.remove(); + + return width; + }; + } + + if ( $.support.fixedPosition === undefined ) { + $.support.fixedPosition = (function() { + var elem = $('
    ').appendTo('body'), + fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); + + elem.remove(); + + return fixed; + }()); + } + + $.extend(F.defaults, { + scrollbarWidth : $.scrollbarWidth(), + fixed : $.support.fixedPosition, + parent : $('body') + }); + + //Get real width of page scroll-bar + w1 = $(window).width(); + + H.addClass('fancybox-lock-test'); + + w2 = $(window).width(); + + H.removeClass('fancybox-lock-test'); + + $("").appendTo("head"); + }); + +}(window, document, jQuery)); \ No newline at end of file diff --git a/themes/landscape/source/fancybox/jquery.fancybox.pack.js b/themes/landscape/source/fancybox/jquery.fancybox.pack.js new file mode 100644 index 0000000..2db1280 --- /dev/null +++ b/themes/landscape/source/fancybox/jquery.fancybox.pack.js @@ -0,0 +1,46 @@ +/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ +(function(s,H,f,w){var K=f("html"),q=f(s),p=f(H),b=f.fancybox=function(){b.open.apply(this,arguments)},J=navigator.userAgent.match(/msie/i),C=null,t=H.createTouch!==w,u=function(a){return a&&a.hasOwnProperty&&a instanceof f},r=function(a){return a&&"string"===f.type(a)},F=function(a){return r(a)&&0
    ',image:'',iframe:'",error:'

    The requested content cannot be loaded.
    Please try again later.

    ',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, +openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, +isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=u(a)?f(a).get():[a]),f.each(a,function(e,c){var l={},g,h,k,n,m;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),u(c)?(l={href:c.data("fancybox-href")||c.attr("href"),title:f("
    ").text(c.data("fancybox-title")||c.attr("title")).html(),isDom:!0,element:c}, +f.metadata&&f.extend(!0,l,c.metadata())):l=c);g=d.href||l.href||(r(c)?c:null);h=d.title!==w?d.title:l.title||"";n=(k=d.content||l.content)?"html":d.type||l.type;!n&&l.isDom&&(n=c.data("fancybox-type"),n||(n=(n=c.prop("class").match(/fancybox\.(\w+)/))?n[1]:null));r(g)&&(n||(b.isImage(g)?n="image":b.isSWF(g)?n="swf":"#"===g.charAt(0)?n="inline":r(c)&&(n="html",k=c)),"ajax"===n&&(m=g.split(/\s+/,2),g=m.shift(),m=m.shift()));k||("inline"===n?g?k=f(r(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):l.isDom&&(k=c): +"html"===n?k=g:n||g||!l.isDom||(n="inline",k=c));f.extend(l,{href:g,type:n,content:k,title:h,selector:m});a[e]=l}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==w&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1===b.trigger("onCancel")||(b.hideLoading(),a&&(b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(), +b.coming=null,b.current||b._afterZoomOut(a)))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(b.isOpen&&!0!==a?(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]()):(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&& +(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};!0===a||!b.player.isActive&&!1!==a?b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==w&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,l;c&&(l=b._getPosition(d),a&&"scroll"===a.type?(delete l.position,c.stop(!0,!0).animate(l,200)):(c.css(l),e.pos=f.extend({},e.dim,l)))}, +update:function(a){var d=a&&a.originalEvent&&a.originalEvent.type,e=!d||"orientationchange"===d;e&&(clearTimeout(C),C=null);b.isOpen&&!C&&(C=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),C=null)},e&&!t?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,t&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"), +b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
    ').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){27===(a.which||a.keyCode)&&(a.preventDefault(),b.cancel())});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}));b.trigger("onLoading")},getViewport:function(){var a=b.current&& +b.current.locked||!1,d={x:q.scrollLeft(),y:q.scrollTop()};a&&a.length?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=t&&s.innerWidth?s.innerWidth:q.width(),d.h=t&&s.innerHeight?s.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&u(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(t?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c= +e.which||e.keyCode,l=e.target||e.srcElement;if(27===c&&b.coming)return!1;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||l&&(l.type||f(l).is("[contenteditable]"))||f.each(d,function(d,l){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();0!==c&&!k&&1g||0>l)&&b.next(0>g?"up":"right"),d.preventDefault())}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&& +b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)})}p.trigger(a)},isImage:function(a){return r(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return r(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=m(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c, +c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"=== +c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&t&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(t?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady"); +if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= +this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming, +d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",t?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);t||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload|| +b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,l,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); +b.unbindEvents();e=a.content;c=a.type;l=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
    ").html(e).find(a.selector):u(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
    ').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", +!1)}));break;case "image":e=a.tpl.image.replace(/\{href\}/g,g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}u(e)&&e.parent().is(a.inner)||a.inner.append(e);b.trigger("beforeShow"); +a.inner.css("overflow","yes"===l?"scroll":"no"===l?"hidden":l);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(!b.isOpened)f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();else if(d.prevMethod)b.transitions[d.prevMethod]();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,l=b.skin,g=b.inner,h=b.current,c=h.width,k=h.height,n=h.minWidth,v=h.minHeight,p=h.maxWidth, +q=h.maxHeight,t=h.scrolling,r=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,z=m(y[1]+y[3]),s=m(y[0]+y[2]),w,A,u,D,B,G,C,E,I;e.add(l).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=m(l.outerWidth(!0)-l.width());w=m(l.outerHeight(!0)-l.height());A=z+y;u=s+w;D=F(c)?(a.w-A)*m(c)/100:c;B=F(k)?(a.h-u)*m(k)/100:k;if("iframe"===h.type){if(I=h.content,h.autoHeight&&1===I.data("ready"))try{I[0].contentWindow.document.location&&(g.width(D).height(9999),G=I.contents().find("body"),r&&G.css("overflow-x", +"hidden"),B=G.outerHeight(!0))}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=m(D);k=m(B);E=D/B;n=m(F(n)?m(n,"w")-A:n);p=m(F(p)?m(p,"w")-A:p);v=m(F(v)?m(v,"h")-u:v);q=m(F(q)?m(q,"h")-u:q);G=p;C=q;h.fitToView&&(p=Math.min(a.w-A,p),q=Math.min(a.h-u,q));A=a.w-z;s=a.h-s;h.aspectRatio?(c>p&&(c=p,k=m(c/E)),k>q&&(k=q,c=m(k*E)),cA||z>s)&&c>n&&k>v&&!(19p&&(c=p,k=m(c/E)),g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height();else c=Math.max(n,Math.min(c,c-(a-A))),k=Math.max(v,Math.min(k,k-(z-s)));r&&"auto"===t&&kA||z>s)&&c>n&&k>v;c=h.aspectRatio?cv&&k
    ').appendTo(d&&d.lenth?d:"body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay", +function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){q.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%"); +J?(b=Math.max(H.documentElement.offsetWidth,H.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>q.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&this.fixed&&b.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&f("*").filter(function(){return"fixed"=== +f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=q.scrollTop(),this.scrollH=q.scrollLeft(),this.el.addClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float", +position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(r(e)&&""!==f.trim(e)){d=f('
    '+e+"
    ");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),J&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(m(d.css("margin-bottom")))}d["top"===a.position?"prependTo": +"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",l=function(g){var h=f(this).blur(),k=d,l,m;g.ctrlKey||g.altKey||g.shiftKey||g.metaKey||h.is(".fancybox-wrap")||(l=a.groupAttr||"data-fancybox-group",m=h.attr(l),m||(l="rel",m=h.get(0)[l]),m&&""!==m&&"nofollow"!==m&&(h=c.length?f(c):e,h=h.filter("["+l+'="'+m+'"]'),k=h.index(this)),a.index=k,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;c&&!1!==a.live?p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')", +"click.fb-start",l):e.unbind("click.fb-start").bind("click.fb-start",l);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===w&&(f.scrollbarWidth=function(){var a=f('
    ').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});f.support.fixedPosition===w&&(f.support.fixedPosition=function(){var a=f('
    ').appendTo("body"), +b=20===a[0].offsetTop||15===a[0].offsetTop;a.remove();return b}());f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(s).width();K.addClass("fancybox-lock-test");d=f(s).width();K.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery); \ No newline at end of file diff --git a/themes/landscape/source/js/script.js b/themes/landscape/source/js/script.js new file mode 100644 index 0000000..1e58767 --- /dev/null +++ b/themes/landscape/source/js/script.js @@ -0,0 +1,137 @@ +(function($){ + // Search + var $searchWrap = $('#search-form-wrap'), + isSearchAnim = false, + searchAnimDuration = 200; + + var startSearchAnim = function(){ + isSearchAnim = true; + }; + + var stopSearchAnim = function(callback){ + setTimeout(function(){ + isSearchAnim = false; + callback && callback(); + }, searchAnimDuration); + }; + + $('#nav-search-btn').on('click', function(){ + if (isSearchAnim) return; + + startSearchAnim(); + $searchWrap.addClass('on'); + stopSearchAnim(function(){ + $('.search-form-input').focus(); + }); + }); + + $('.search-form-input').on('blur', function(){ + startSearchAnim(); + $searchWrap.removeClass('on'); + stopSearchAnim(); + }); + + // Share + $('body').on('click', function(){ + $('.article-share-box.on').removeClass('on'); + }).on('click', '.article-share-link', function(e){ + e.stopPropagation(); + + var $this = $(this), + url = $this.attr('data-url'), + encodedUrl = encodeURIComponent(url), + id = 'article-share-box-' + $this.attr('data-id'), + offset = $this.offset(); + + if ($('#' + id).length){ + var box = $('#' + id); + + if (box.hasClass('on')){ + box.removeClass('on'); + return; + } + } else { + var html = [ + '
    ', + '', + '
    ', + '', + '', + '', + '', + '
    ', + '
    ' + ].join(''); + + var box = $(html); + + $('body').append(box); + } + + $('.article-share-box.on').hide(); + + box.css({ + top: offset.top + 25, + left: offset.left + }).addClass('on'); + }).on('click', '.article-share-box', function(e){ + e.stopPropagation(); + }).on('click', '.article-share-box-input', function(){ + $(this).select(); + }).on('click', '.article-share-box-link', function(e){ + e.preventDefault(); + e.stopPropagation(); + + window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450'); + }); + + // Caption + $('.article-entry').each(function(i){ + $(this).find('img').each(function(){ + if ($(this).parent().hasClass('fancybox')) return; + + var alt = this.alt; + + if (alt) $(this).after('' + alt + ''); + + $(this).wrap(''); + }); + + $(this).find('.fancybox').each(function(){ + $(this).attr('rel', 'article' + i); + }); + }); + + if ($.fancybox){ + $('.fancybox').fancybox(); + } + + // Mobile nav + var $container = $('#container'), + isMobileNavAnim = false, + mobileNavAnimDuration = 200; + + var startMobileNavAnim = function(){ + isMobileNavAnim = true; + }; + + var stopMobileNavAnim = function(){ + setTimeout(function(){ + isMobileNavAnim = false; + }, mobileNavAnimDuration); + } + + $('#main-nav-toggle').on('click', function(){ + if (isMobileNavAnim) return; + + startMobileNavAnim(); + $container.toggleClass('mobile-nav-on'); + stopMobileNavAnim(); + }); + + $('#wrap').on('click', function(){ + if (isMobileNavAnim || !$container.hasClass('mobile-nav-on')) return; + + $container.removeClass('mobile-nav-on'); + }); +})(jQuery); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..0bd5756 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,1751 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +JSONStream@^1.0.7: + version "1.3.2" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + +a-sync-waterfall@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/a-sync-waterfall/-/a-sync-waterfall-1.0.0.tgz#38e8319d79379e24628845b53b96722b29e0e47c" + +abbrev@1, abbrev@^1.0.7: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + +accepts@~1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +asap@^2.0.3: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async@~0.2.6: + version "0.2.10" + resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +basic-auth@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.0.tgz#015db3f353e02e56377755f962742e8981e7bbba" + dependencies: + safe-buffer "5.1.1" + +binary-extensions@^1.0.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + +bluebird@^3.0.6, bluebird@^3.2.2, bluebird@^3.4.0: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-fingerprint@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/browser-fingerprint/-/browser-fingerprint-0.0.1.tgz#8df3cdca25bf7d5b3542d61545d730053fce604a" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + +camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.3.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +cheerio@0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash.assignin "^4.0.9" + lodash.bind "^4.1.4" + lodash.defaults "^4.0.1" + lodash.filter "^4.4.0" + lodash.flatten "^4.2.0" + lodash.foreach "^4.3.0" + lodash.map "^4.4.0" + lodash.merge "^4.4.0" + lodash.pick "^4.2.1" + lodash.reduce "^4.4.0" + lodash.reject "^4.4.0" + lodash.some "^4.4.0" + +chokidar@^1.5.2, chokidar@^1.6.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +chownr@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.0.3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +command-exists@^1.2.0: + version "1.2.6" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.6.tgz#577f8e5feb0cb0f159cd557a51a9be1bdd76e09e" + +compressible@~2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9" + dependencies: + mime-db ">= 1.33.0 < 2" + +compression@^1.6.0: + version "1.7.2" + resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69" + dependencies: + accepts "~1.3.4" + bytes "3.0.0" + compressible "~2.0.13" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.1" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +connect@3.x: + version "3.6.6" + resolved "https://registry.yarnpkg.com/connect/-/connect-3.6.6.tgz#09eff6c55af7236e137135a72574858b6786f524" + dependencies: + debug "2.6.9" + finalhandler "1.1.0" + parseurl "~1.3.2" + utils-merge "1.0.1" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +core-js@^1.1.1: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cross-spawn@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +css-parse@1.7.x: + version "1.7.0" + resolved "https://registry.yarnpkg.com/css-parse/-/css-parse-1.7.0.tgz#321f6cf73782a6ff751111390fc05e2c657d8c9b" + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" + +cuid@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/cuid/-/cuid-1.3.8.tgz#4b875e0969bad764f7ec0706cf44f5fb0831f6b7" + dependencies: + browser-fingerprint "0.0.1" + core-js "^1.1.1" + node-fingerprint "0.0.2" + +debug@*: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +debug@2.6.9, debug@^2.1.2: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +depd@~1.1.1, depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + +dom-serializer@0, dom-serializer@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@1, domelementtype@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259" + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + dependencies: + dom-serializer "0" + domelementtype "1" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +ejs@^2.3.4: + version "2.5.9" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.9.tgz#7ba254582a560d267437109a68354112475b0ce5" + +encodeurl@~1.0.1, encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + +entities@^1.1.1, entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.0.tgz#ce0b6855b45853e791b2fcc680046d88253dd7f5" + dependencies: + debug "2.6.9" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.3.1" + unpipe "~1.0.0" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + dependencies: + minipass "^2.2.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.3.tgz#08292982e7059f6674c93d8b829c1e8604979ac0" + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.9.0" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@7.0.x: + version "7.0.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^6.0.1: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.5: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.4: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hexo-bunyan@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/hexo-bunyan/-/hexo-bunyan-1.0.0.tgz#b2106b26547b232f0195db863cb5d5ff8527fd36" + optionalDependencies: + moment "^2.10.6" + mv "~2" + safe-json-stringify "~1" + +hexo-cli@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/hexo-cli/-/hexo-cli-1.1.0.tgz#496d238d4646dbfd1cf047b6dc5271bfb5cb798f" + dependencies: + abbrev "^1.0.7" + bluebird "^3.4.0" + chalk "^1.1.3" + command-exists "^1.2.0" + hexo-fs "^0.2.0" + hexo-log "^0.2.0" + hexo-util "^0.6.0" + minimist "^1.2.0" + object-assign "^4.1.0" + resolve "^1.5.0" + tildify "^1.2.0" + +hexo-front-matter@^0.2.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/hexo-front-matter/-/hexo-front-matter-0.2.3.tgz#c7ca8ef420ea36bd85e8408a2e8c9bf49efa605e" + dependencies: + js-yaml "^3.6.1" + +hexo-fs@^0.2.0: + version "0.2.3" + resolved "https://registry.yarnpkg.com/hexo-fs/-/hexo-fs-0.2.3.tgz#c3a81b46e457dfafc56d87c78ef114104f4a3e41" + dependencies: + bluebird "^3.4.0" + chokidar "^1.5.2" + escape-string-regexp "^1.0.5" + graceful-fs "^4.1.4" + +hexo-generator-archive@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/hexo-generator-archive/-/hexo-generator-archive-0.1.5.tgz#a979214cdddee2693e0551809c294bedadbb69b3" + dependencies: + hexo-pagination "0.0.2" + object-assign "^2.0.0" + +hexo-generator-category@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/hexo-generator-category/-/hexo-generator-category-0.1.3.tgz#b9e6a5862530a83bdd7da4c819c1b9f3e4ccb4b2" + dependencies: + hexo-pagination "0.0.2" + object-assign "^2.0.0" + +hexo-generator-index@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/hexo-generator-index/-/hexo-generator-index-0.2.1.tgz#9042229fcac79aaf700575da19332bf3f7ee5c5d" + dependencies: + hexo-pagination "0.0.2" + object-assign "^4.0.1" + +hexo-generator-tag@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/hexo-generator-tag/-/hexo-generator-tag-0.2.0.tgz#c5715846bb41e57d9c20c1d66d7db21a1abf7a62" + dependencies: + hexo-pagination "0.0.2" + object-assign "^4.0.1" + +hexo-i18n@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/hexo-i18n/-/hexo-i18n-0.2.1.tgz#84f141432bf09d8b558ed878c728164b6d1cd6de" + dependencies: + sprintf-js "^1.0.2" + +hexo-log@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/hexo-log/-/hexo-log-0.2.0.tgz#d30fd45e1a12a83c88033586640485efc5df5a6f" + dependencies: + chalk "^1.1.1" + hexo-bunyan "^1.0.0" + +hexo-pagination@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/hexo-pagination/-/hexo-pagination-0.0.2.tgz#8cf470c7db0de5b18a3926a76deb194015df7f2b" + dependencies: + utils-merge "^1.0.0" + +hexo-renderer-ejs@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/hexo-renderer-ejs/-/hexo-renderer-ejs-0.3.1.tgz#c0c1a3757532d47e5b7d9dc908b5dfd98c94be2c" + dependencies: + ejs "^2.3.4" + object-assign "^4.0.1" + +hexo-renderer-marked@^0.3.0: + version "0.3.2" + resolved "https://registry.yarnpkg.com/hexo-renderer-marked/-/hexo-renderer-marked-0.3.2.tgz#d6a37af9ff195e30f9ef6ede1a06ea1fe4322966" + dependencies: + hexo-util "^0.6.2" + marked "^0.3.9" + object-assign "^4.1.1" + strip-indent "^2.0.0" + +hexo-renderer-stylus@^0.3.1: + version "0.3.3" + resolved "https://registry.yarnpkg.com/hexo-renderer-stylus/-/hexo-renderer-stylus-0.3.3.tgz#c54ea27e1fd8e3c8a9a7a84cfba8ad354122ca7f" + dependencies: + nib "^1.1.2" + stylus "^0.54.5" + +hexo-server@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/hexo-server/-/hexo-server-0.2.2.tgz#592686b554b8bfe09a19bc86c0f003ac3e8c19b9" + dependencies: + bluebird "^3.0.6" + chalk "^1.1.1" + compression "^1.6.0" + connect "3.x" + mime "^1.3.4" + morgan "^1.6.1" + object-assign "^4.0.1" + opn "^4.0.0" + serve-static "^1.10.0" + +hexo-util@^0.6.0, hexo-util@^0.6.2, hexo-util@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/hexo-util/-/hexo-util-0.6.3.tgz#16a2ade457bef955af0dfd22a3fe6f0a49a9137c" + dependencies: + bluebird "^3.4.0" + camel-case "^3.0.0" + cross-spawn "^4.0.0" + highlight.js "^9.4.0" + html-entities "^1.2.0" + striptags "^2.1.1" + +hexo@^3.2.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/hexo/-/hexo-3.7.1.tgz#0381874e67891b521b9e3023ef4db85a62337f96" + dependencies: + abbrev "^1.0.7" + archy "^1.0.0" + bluebird "^3.4.0" + chalk "^2.3.1" + cheerio "0.22.0" + hexo-cli "^1.1.0" + hexo-front-matter "^0.2.2" + hexo-fs "^0.2.0" + hexo-i18n "^0.2.1" + hexo-log "^0.2.0" + hexo-util "^0.6.3" + js-yaml "^3.6.1" + lodash "^4.17.5" + minimatch "^3.0.4" + moment "^2.19.4" + moment-timezone "^0.5.14" + nunjucks "^3.1.2" + pretty-hrtime "^1.0.2" + resolve "^1.5.0" + strip-ansi "^4.0.0" + strip-indent "^2.0.0" + swig-extras "0.0.1" + swig-templates "^2.0.2" + text-table "^0.2.0" + tildify "^1.2.0" + titlecase "^1.1.2" + warehouse "^2.2.0" + +highlight.js@^9.4.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e" + +html-entities@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" + +htmlparser2@^3.9.1: + version "3.9.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" + dependencies: + domelementtype "^1.3.0" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^2.0.2" + +http-errors@~1.6.2: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +iconv-lite@^0.4.4: + version "0.4.21" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" + dependencies: + safer-buffer "^2.1.0" + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + dependencies: + minimatch "^3.0.4" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + dependencies: + kind-of "^3.0.2" + +is-plain-object@^2.0.1: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + +js-yaml@^3.6.1: + version "3.11.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsonparse@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +lodash.assignin@^4.0.9: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" + +lodash.bind@^4.1.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" + +lodash.defaults@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + +lodash.filter@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" + +lodash.flatten@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + +lodash.foreach@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + +lodash.map@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" + +lodash.merge@^4.4.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.reduce@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" + +lodash.reject@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" + +lodash.some@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + +lodash@^4.17.5, lodash@^4.2.1: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +lower-case@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + +lru-cache@^4.0.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +markdown@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/markdown/-/markdown-0.5.0.tgz#28205b565a8ae7592de207463d6637dc182722b2" + dependencies: + nopt "~2.1.1" + +marked@^0.3.9: + version "0.3.19" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + +mime-types@~2.1.18: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + +mime@^1.3.4: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + +"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +minipass@^2.2.1, minipass@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40" + dependencies: + safe-buffer "^5.1.1" + yallist "^3.0.0" + +minizlib@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" + dependencies: + minipass "^2.2.1" + +mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +moment-timezone@^0.5.14: + version "0.5.16" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.16.tgz#661717d5f55b4d2c2e002262d726c83785192a5a" + dependencies: + moment ">= 2.9.0" + +"moment@>= 2.9.0", moment@^2.10.6, moment@^2.19.4: + version "2.22.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.1.tgz#529a2e9bf973f259c9643d237fda84de3a26e8ad" + +morgan@^1.6.1: + version "1.9.0" + resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.9.0.tgz#d01fa6c65859b76fcf31b3cb53a3821a311d8051" + dependencies: + basic-auth "~2.0.0" + debug "2.6.9" + depd "~1.1.1" + on-finished "~2.3.0" + on-headers "~1.0.1" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +mv@~2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/mv/-/mv-2.1.1.tgz#ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2" + dependencies: + mkdirp "~0.5.1" + ncp "~2.0.0" + rimraf "~2.4.0" + +nan@^2.9.2: + version "2.10.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + +ncp@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" + +needle@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +nib@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/nib/-/nib-1.1.2.tgz#6a69ede4081b95c0def8be024a4c8ae0c2cbb6c7" + dependencies: + stylus "0.54.5" + +no-case@^2.2.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + dependencies: + lower-case "^1.1.1" + +node-fingerprint@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/node-fingerprint/-/node-fingerprint-0.0.2.tgz#31cbabeb71a67ae7dd5a7dc042e51c3c75868501" + +node-pre-gyp@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz#f11c07516dd92f87199dbc7e1838eab7cd56c9e0" + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.0" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.1.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +nopt@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-2.1.2.tgz#6cccd977b80132a07731d6e8ce58c2c8303cf9af" + dependencies: + abbrev "1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + +npm-packlist@^1.1.6: + version "1.1.10" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +nth-check@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4" + dependencies: + boolbase "~1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +nunjucks@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/nunjucks/-/nunjucks-3.1.2.tgz#85945a66bb8239bb37ecef83dab4cc1f152aabb9" + dependencies: + a-sync-waterfall "^1.0.0" + asap "^2.0.3" + postinstall-build "^5.0.1" + yargs "^3.32.0" + optionalDependencies: + chokidar "^1.6.0" + +object-assign@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" + +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +opn@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +optimist@~0.6: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +postinstall-build@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postinstall-build/-/postinstall-build-5.0.1.tgz#b917a9079b26178d9a24af5a5cd8cb4a991d11b9" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-hrtime@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +randomatic@^1.1.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +rc@^1.1.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.7.tgz#8a10ca30d588d00464360372b890d06dacd02297" + dependencies: + deep-extend "^0.5.1" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^2.0.2, readable-stream@^2.0.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +resolve@^1.5.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + dependencies: + path-parse "^1.0.5" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.6.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +rimraf@~2.4.0: + version "2.4.5" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.4.5.tgz#ee710ce5d93a8fdb856fb5ea8ff0e2d75934b2da" + dependencies: + glob "^6.0.1" + +safe-buffer@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + +safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +safe-json-stringify@~1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-json-stringify/-/safe-json-stringify-1.1.0.tgz#bd2b6dad1ebafab3c24672a395527f01804b7e19" + +safer-buffer@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + +sax@0.5.x: + version "0.5.8" + resolved "https://registry.yarnpkg.com/sax/-/sax-0.5.8.tgz#d472db228eb331c2506b0e8c15524adb939d12c1" + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + +semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.4.0" + +serve-static@^1.10.0: + version "1.13.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.2" + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +source-map@0.1.x: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +sprintf-js@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.1.tgz#36be78320afe5801f6cea3ee78b6e5aab940ea0c" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + +statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +statuses@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +striptags@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-2.2.1.tgz#4c450b708d41b8bf39cf24c49ff234fc6aabfd32" + +stylus@0.54.5, stylus@^0.54.5: + version "0.54.5" + resolved "https://registry.yarnpkg.com/stylus/-/stylus-0.54.5.tgz#42b9560931ca7090ce8515a798ba9e6aa3d6dc79" + dependencies: + css-parse "1.7.x" + debug "*" + glob "7.0.x" + mkdirp "0.5.x" + sax "0.5.x" + source-map "0.1.x" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^5.3.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + dependencies: + has-flag "^3.0.0" + +swig-extras@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/swig-extras/-/swig-extras-0.0.1.tgz#b503fede372ab9c24c6ac68caf656bcef1872328" + dependencies: + markdown "~0.5.0" + +swig-templates@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/swig-templates/-/swig-templates-2.0.2.tgz#d2502a7303019356f4ea76ea9065d4f58af6ab75" + dependencies: + optimist "~0.6" + uglify-js "2.6.0" + +tar@^4: + version "4.4.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.2.tgz#60685211ba46b38847b1ae7ee1a24d744a2cd462" + dependencies: + chownr "^1.0.1" + fs-minipass "^1.2.5" + minipass "^2.2.4" + minizlib "^1.1.0" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +"through@>=2.2.7 <3": + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +tildify@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + dependencies: + os-homedir "^1.0.0" + +titlecase@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/titlecase/-/titlecase-1.1.2.tgz#78113d1108086b8326331a3247dea8f5a49ea853" + +uglify-js@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.6.0.tgz#25eaa1cc3550e39410ceefafd1cfbb6b6d15f001" + dependencies: + async "~0.2.6" + source-map "~0.5.1" + uglify-to-browserify "~1.0.0" + yargs "~3.10.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +upper-case@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +utils-merge@1.0.1, utils-merge@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + +warehouse@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/warehouse/-/warehouse-2.2.0.tgz#5d09d64942992be667d8f7c86a09c2b8aea04062" + dependencies: + JSONStream "^1.0.7" + bluebird "^3.2.2" + cuid "~1.3.8" + graceful-fs "^4.1.3" + is-plain-object "^2.0.1" + lodash "^4.2.1" + +which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +window-size@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +y18n@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + +yargs@^3.32.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + dependencies: + camelcase "^2.0.1" + cliui "^3.0.3" + decamelize "^1.1.1" + os-locale "^1.4.0" + string-width "^1.0.1" + window-size "^0.1.4" + y18n "^3.2.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0"