├── .eslintrc.json ├── .gitignore ├── .travis.yml ├── README.md ├── docs ├── cli │ ├── author.md │ ├── compile.md │ ├── index.md │ ├── init.md │ ├── install.md │ ├── login.md │ ├── publish.md │ ├── tag.md │ ├── uninstall.md │ └── unpublish.md ├── getting-started │ └── index.md └── index.yml ├── package-lock.json ├── package.json ├── sierra-github.css ├── sierra-npm.css ├── sierra.css ├── src ├── cli │ ├── diamond-author.js │ ├── diamond-compile.js │ ├── diamond-config.js │ ├── diamond-init.js │ ├── diamond-install.js │ ├── diamond-login.js │ ├── diamond-publish.js │ ├── diamond-tag.js │ ├── diamond-uninstall.js │ ├── diamond-unpublish.js │ └── diamond.js ├── exports.js ├── functions │ ├── autoload.js │ ├── compile │ │ ├── index.js │ │ ├── less.js │ │ ├── sass.js │ │ └── stylus.js │ ├── error.js │ ├── install │ │ ├── diamond.js │ │ ├── github.js │ │ ├── gitlab.js │ │ ├── index.js │ │ └── npm.js │ ├── loadConfig.js │ ├── parsePackageObject.js │ └── parsePackageString.js ├── importers │ └── index.js ├── misc │ └── userAgent.js └── views │ ├── error.html │ └── success.html └── test ├── npm.sh ├── sierra-github ├── test.css ├── test.less ├── test.less.css ├── test.sass ├── test.sass.css ├── test.styl └── test.styl.css ├── sierra-npm ├── test.css ├── test.less ├── test.less.css ├── test.sass ├── test.sass.css ├── test.styl └── test.styl.css ├── sierra ├── test.css ├── test.less ├── test.less.css ├── test.sass ├── test.sass.css ├── test.styl └── test.styl.css ├── test.js └── test.sh /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "airbnb-base", 3 | "plugins": [ 4 | "import" 5 | ], 6 | "parserOptions": { 7 | "emcaVersion": 6 8 | }, 9 | "env": { 10 | "es6": true, 11 | "node": true 12 | }, 13 | "rules": { 14 | "strict": 0, 15 | "no-restricted-syntax": 0, 16 | "no-loop-func": 0, 17 | "no-continue": 0, 18 | "global-require": 0, 19 | "import/no-dynamic-require": 0, 20 | "no-console": 2, 21 | "no-param-reassign": 0, 22 | "class-methods-use-this": 0, 23 | "guard-for-in": 0, 24 | "no-return-assign": 0, 25 | "comma-dangle": ["error", { 26 | "arrays": "always-multiline", 27 | "objects": "always-multiline", 28 | "imports": "always-multiline", 29 | "exports": "always-multiline", 30 | "functions": "ignore" 31 | }] 32 | } 33 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | diamond 2 | node_modules 3 | npm-debug.log* 4 | .diaignore 5 | diamond-config.yml 6 | diamond.json -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "4" 4 | - "5" 5 | - "6" 6 | - "7" 7 | before_install: bash test/npm.sh 8 | install: 9 | - npm i 10 | - npm link 11 | cache: 12 | directories: 13 | - node_modules 14 | - /home/travis/.diamond 15 | matrix: 16 | include: 17 | - node_js: "8" 18 | env: 19 | - CXX=g++-4.8 20 | addons: 21 | apt: 22 | sources: 23 | - ubuntu-toolchain-r-test 24 | packages: 25 | - g++-4.8 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | 5 | diamond 6 | 7 |

8 |
9 |

Logo by @aemino

10 |

11 | Build status 12 | 13 | Node Version 14 | npm Version 15 |

16 |

17 | 18 |

19 |
20 | 21 | ## Supported Environments 22 | diamond supports node 4, 5, 6, 7 and 8 **with npm 3, 4, or 5** (Note: node 4 comes with npm **2**) 23 | 24 | ## Introduction 25 | diamond is a package manager for Sass and Less. diamond allows you to mix and match (most of the time) Sass and 26 | Less packages. You can also ship custom functions to be run after compiling, or even Less plugins and Sass importers 27 | and functions. 28 | 29 | ## Usage 30 | Read the [Getting Started Docs](https://diamondpkg.org/#/docs/getting-started) and [CLI Docs](https://diamondpkg.org/#/docs/cli). 31 | 32 | ## Prior Art 33 | diamond was inspired by 34 | * [yarn](https://yarnpkg.org) 35 | * [npm](https://npmjs.com) -------------------------------------------------------------------------------- /docs/cli/author.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | ``` 3 | diamond author ls 4 | diamond author add 5 | diamond author rm 6 | ``` 7 | 8 | ## Description 9 | Add, remove, or list authors of a package. 10 | 11 | 12 | ## Commands 13 | ### `diamond author ls ` 14 | 15 | Lists a package's authors. 16 | 17 | ``` 18 | diamond author ls caramel 19 | ``` 20 | 21 | ``` 22 | hackzzila 23 | ``` 24 | 25 | ### `diamond author add ` 26 | 27 | Adds a package author. 28 | 29 | ``` 30 | diamond author add caramel kurisubrooks 31 | ``` 32 | 33 | ``` 34 | diamond author ls caramel 35 | ``` 36 | 37 | ``` 38 | hackzzila 39 | kurisubrooks 40 | ``` 41 | 42 | ### `diamond author rm ` 43 | 44 | Removes an author. 45 | 46 | 47 | ``` 48 | diamond author rm kurisubrooks 49 | ``` 50 | 51 | ``` 52 | diamond author ls caramel 53 | ``` 54 | 55 | ``` 56 | hackzzila 57 | ``` -------------------------------------------------------------------------------- /docs/cli/compile.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | ``` 3 | diamond compile 4 | diamond compile --output 5 | 6 | alias: diamond c 7 | common options: [-o|--output] [--output-style] [-w|--watch] 8 | ``` 9 | 10 | ## Description 11 | This command compiles a file with full diamond support (importers, functions, etc.). 12 | 13 | ## Commands 14 | ### **`diamond compile `** 15 | 16 | Compile the input file and print the resulting CSS to `stdout`. 17 | 18 | #### Example: 19 | ``` 20 | diamond compile in.sass 21 | ``` 22 | 23 | 24 | ### **`diamond compile --output `** 25 | 26 | Compile the input file and put the resulting CSS in the output file. 27 | 28 | #### Example: 29 | ``` 30 | diamond compile --output out.css in.sass 31 | ``` 32 | 33 | 34 | 35 | ## Args 36 | ### **`-o | --output`** 37 | 38 | The file to save the output CSS to. 39 | 40 | 41 | ### **`-w | --watch`** 42 | 43 | Watches and compiles the file on any changes. Must be used with `--output` arg. 44 | 45 | 46 | ### **`--output-style`** Sass only 47 | 48 | The output style for the file, can be one of: `nested, expanded, compact, compressed`. -------------------------------------------------------------------------------- /docs/cli/index.md: -------------------------------------------------------------------------------- 1 | Most functions in diamond are done over the CLI. 2 | 3 | The most popular commands are: 4 | * `diamond install`: installs a package 5 | * `diamond compile`: compiles a file -------------------------------------------------------------------------------- /docs/cli/init.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | ``` 3 | diamond init 4 | ``` 5 | 6 | ## Description 7 | Creates or updates a `diamond.json` file. 8 | 9 | 10 | ## Commands 11 | ### `diamond init` 12 | 13 | This walks you through creating a `diamond.json` file. 14 | 15 | ``` 16 | diamond init 17 | ``` 18 | 19 | ``` 20 | prompt: name: (diamond-site) awesome-package 21 | prompt: version: (1.0.0) 22 | prompt: description: A package by me 23 | prompt: main file: (index.sass) 24 | ``` 25 | 26 | This creates the following file. 27 | 28 | ``` 29 | { 30 | "name": "awesome-package", 31 | "version": "1.0.0", 32 | "description": "A package by me", 33 | "main": "index.sass" 34 | } 35 | ``` 36 | 37 | If you already have a `diamond.json` file, it will use those entries as defaults. -------------------------------------------------------------------------------- /docs/cli/install.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | ``` 3 | diamond install (with no args, in package dir) 4 | diamond install 5 | diamond install @ 6 | diamond install @ 7 | diamond install @ 8 | diamond install npm: 9 | diamond install /[#] 10 | diamond install gitlab:/[#] 11 | 12 | alias: diamond i 13 | common options: [--no-save] [--no-cache] 14 | ``` 15 | 16 | ## Description 17 | This command installs a package, and any packages that it depends on. 18 | 19 | A **package** is: 20 | 21 | * a) a folder containing a program described by a diamond.json or package.json file 22 | * b) a [package](https://docs.npmjs.com/how-npm-works/packages) on the [npm registry](https://docs.npmjs.com/misc/registry) 23 | * c) a **`@`** that is published on the diamond registry with (a) 24 | * d) a **`@`** that points to (c) 25 | * e) a **``** that has a "latest" tag satisfying (d) 26 | * f) a **`/[<#ref>]`** that resolves to (a) 27 | * g) a **`gitlab:/[<#ref>]`** that resolves to (a) 28 | 29 | ## Commands 30 | ### **`diamond install`** (in package directory, no arguments) 31 | 32 | Install the dependencies in the local diamond folder. 33 | 34 | By default, **`diamond install`** will install all modules listed as dependencies in diamond.json. 35 | 36 | 37 | 38 | ### **`diamond install `** 39 | 40 | Do a **`@`** install, where **``** is **`latest`**. 41 | 42 | #### Example: 43 | ``` 44 | diamond install sierra 45 | ``` 46 | 47 | 48 | ### **`diamond install @`** 49 | 50 | Install the version of the package that is referenced by the specified tag. If the tag does not exist in the registry data for that package, then this will fail. 51 | 52 | #### Example: 53 | ``` 54 | diamond install sierra@latest 55 | ``` 56 | 57 | 58 | 59 | ### **`diamond install @`** 60 | 61 | Install the specified version of the package. This will fail if the version has not been published to the registry. 62 | 63 | #### Example: 64 | ``` 65 | diamond install sierra@2.0.0 66 | ``` 67 | 68 | 69 | 70 | ### **`diamond install @`** 71 | 72 | Install a version of the package matching the specified version range. This will follow the same rules for resolving dependencies described in diamond.json. 73 | 74 | Note that most version ranges must be put in quotes so that your shell will treat it as a single argument. 75 | 76 | #### Example: 77 | ``` 78 | diamond install sierra@">=2.0.0 <3.0.0" 79 | ``` 80 | 81 | 82 | 83 | ### **`diamond install npm:`** 84 | 85 | Install a package from the [npm registry](https://docs.npmjs.com/misc/registry). 86 | 87 | #### Example: 88 | ``` 89 | diamond install npm:bootstrap 90 | ``` 91 | 92 | 93 | ### **`diamond install /[#]`** 94 | 95 | ### **`diamond install gh:/[#]`** 96 | 97 | ### **`diamond install github:/[#]`** 98 | 99 | Install the package at **`https://github.com/githubname/githubrepo`** by downloading the archive. 100 | 101 | If you don't specify a **`ref`** then **`master`** will be used. 102 | 103 | #### Examples: 104 | ``` 105 | diamond install mygithubuser/myproject 106 | diamond install mygithubuser/myproject#master 107 | diamond install mygithubuser/myproject#beffcd31cd20f41125ca2ff03d42e902c3935e18 108 | diamond install mygithubuser/myproject#1.0.0 109 | diamond install gh:mygithubuser/myproject 110 | diamond install github:mygithubuser/myproject 111 | ``` 112 | 113 | 114 | 115 | ### **`diamond install gl:/[#]`** 116 | ### **`diamond install gitlab:/[#]`** 117 | 118 | Install the package at **`https://gitlab.com/gitlabname/gitlabrepo`** by downloading the archive. 119 | 120 | If you don't specify a **`ref`** then **`master`** will be used. 121 | 122 | #### Examples: 123 | ``` 124 | diamond install gl:mygitlabuser/myproject 125 | diamond install gitlab:mygitlabuser/myproject 126 | diamond install gitlab:mygitlabuser/myproject#master 127 | diamond install gitlab:mygitlabuser/myproject#beffcd31cd20f41125ca2ff03d42e902c3935e18 128 | diamond install gitlab:mygitlabuser/myproject#1.0.0 129 | ``` 130 | 131 | You may install multiple packages at once. 132 | 133 | #### Example: 134 | ``` 135 | diamond i sierra kurisubrooks/caramel 136 | ``` 137 | 138 | ## Args 139 | ### **`--no-save`** 140 | 141 | If specified, the package won't be saved to your **`diamond.json`**. 142 | 143 | 144 | 145 | ### **`--no-cache`** 146 | 147 | If specified, the package will not be pulled from the cache, and the cache will be updated after installation. -------------------------------------------------------------------------------- /docs/cli/login.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | ``` 3 | diamond login 4 | ``` 5 | 6 | ## Description 7 | Log in to the diamond registry. 8 | 9 | 10 | ## Commands 11 | ### `diamond login` 12 | 13 | Logs you into the diamond registry so you can do actions such as publishing packages. 14 | 15 | ``` 16 | diamond login 17 | ``` 18 | 19 | ``` 20 | prompt: username: hackzzila 21 | prompt: email: admin@hackzzila.com 22 | prompt: password: 23 | prompt: verify password: 24 | dia info logged in as hackzzila 25 | ``` -------------------------------------------------------------------------------- /docs/cli/publish.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | ``` 3 | diamond publish 4 | ``` 5 | 6 | ## Description 7 | Publishes a package to the diamond registry. 8 | 9 | 10 | ## Commands 11 | ### `diamond publish` 12 | 13 | Publishes the the package defined by `diamond.json` or `package.json` in the current directory. -------------------------------------------------------------------------------- /docs/cli/tag.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | ``` 3 | diamond tag ls 4 | diamond tag set 5 | diamond tag rm 6 | ``` 7 | 8 | ## Description 9 | Set, remove, or list tags on a package. 10 | 11 | 12 | ## What are tags? 13 | 14 | Tags (also known as dist-tags and distribution tags) are a way of labeling versions of your package. Users can install your package with this label instead of a version number. 15 | 16 | For example, if you have a beta version of your package you could use tags and allow the user to install like so. 17 | ``` 18 | diamond install package@latest 19 | diamond install package@beta 20 | ``` 21 | 22 | ## Commands 23 | ### `diamond tag ls ` 24 | 25 | Lists a package's tags and their corresponding versions. 26 | 27 | ``` 28 | diamond tag ls caramel 29 | ``` 30 | 31 | ``` 32 | latest: 1.6.0 33 | ``` 34 | 35 | ### `diamond tag set ` 36 | 37 | Sets a tag to a specific version. 38 | 39 | ``` 40 | diamond tag set caramel test 1.6.0 41 | ``` 42 | 43 | ``` 44 | diamond tag ls caramel 45 | ``` 46 | 47 | ``` 48 | latest: 1.6.0 49 | test: 1.6.0 50 | ``` 51 | 52 | ### `diamond tag rm ` 53 | 54 | Removes a tag. 55 | 56 |
57 | The latest tag cannot be removed. 58 |
59 | 60 | ``` 61 | diamond tag rm caramel test 62 | ``` 63 | 64 | ``` 65 | diamond tag ls caramel 66 | ``` 67 | 68 | ``` 69 | latest: 1.6.0 70 | ``` -------------------------------------------------------------------------------- /docs/cli/uninstall.md: -------------------------------------------------------------------------------- 1 | ## Synopsis 2 | ``` 3 | diamond uninstall 4 | 5 | alias: diamond u 6 | ``` 7 | 8 | ## Description 9 | Uninstalls a package and removes it from your `diamond.json` file. 10 | 11 | 12 | ## Commands 13 | ### `diamond uninstall ` 14 | 15 | Uninstalls a package and removes it from your `diamond.json` file. 16 | 17 | ``` 18 | diamond uninstall sierra 19 | ``` -------------------------------------------------------------------------------- /docs/cli/unpublish.md: -------------------------------------------------------------------------------- 1 |
2 | Use with caution. Unpublishing a package many people depend on could be devastating to the community. 3 |
4 | 5 | ## Synopsis 6 | ``` 7 | diamond unpublish 8 | diamond unpublish 9 | ``` 10 | 11 | ## Description 12 | Unpublishes a package version or a whole package. 13 | 14 | 15 | ## Commands 16 | ### `diamond unpublish ` 17 | 18 | Unpublishes the whole package named `` 19 | 20 | ### `diamond unpublish ` 21 | 22 | Unpublishes the `@` -------------------------------------------------------------------------------- /docs/getting-started/index.md: -------------------------------------------------------------------------------- 1 | diamond is a package manager for Sass, Less, Stylus, and CSS. It allows you to quickly install and import packages from other developers, such as frameworks like Sierra. 2 | 3 | ## Installation 4 | 5 | ### npm 6 | To install diamond through npm, run the following command. 7 | ``` 8 | npm i -g diamondpkg 9 | ``` 10 | 11 | ### yarn 12 | diamond can also be installed through yarn. 13 | ``` 14 | yarn global add diamondpkg 15 | ``` 16 | 17 | ## Usage 18 | Once you have installed diamond, you are good to go. 19 | 20 | ### Starting a new project 21 | ``` 22 | diamond init 23 | ``` 24 | 25 | ### Installing a package 26 | ``` 27 | diamond install 28 | diamond install @ 29 | diamond install @ 30 | ``` 31 | 32 | ### Installing all dependencies 33 | ``` 34 | diamond install 35 | ``` 36 | 37 | ### Importing a package 38 | In Sass and Less, you can import like so. 39 | ```sass 40 | @import '~package'; 41 | ``` 42 | 43 | In Stylus, you have to use the `import` function provided by Unify. 44 | ```styl 45 | @import import('~package'); 46 | ``` 47 | 48 | ### Using with CSS 49 | To use with CSS, simply link the generated `diamond/autoload.css` file. 50 | 51 | ### Compiling a file 52 | ``` 53 | diamond compile --output out.css in.sass 54 | ``` -------------------------------------------------------------------------------- /docs/index.yml: -------------------------------------------------------------------------------- 1 | getting-started: 2 | - title: Getting Started 3 | path: index 4 | cli: 5 | - title: CLI Introduction 6 | path: index 7 | - title: diamond author 8 | path: author 9 | - title: diamond compile 10 | path: compile 11 | - title: diamond init 12 | path: init 13 | - title: diamond install 14 | path: install 15 | - title: diamond login 16 | path: login 17 | - title: diamond publish 18 | path: publish 19 | - title: diamond tag 20 | path: tag 21 | - title: diamond uninstall 22 | path: uninstall 23 | - title: diamond unpublish 24 | path: unpublish -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "diamondpkg", 3 | "version": "0.10.2", 4 | "description": "Dependency management built for Sass, Less, Stylus, and CSS.", 5 | "main": "src/exports.js", 6 | "preferGlobal": true, 7 | "engines": { 8 | "npm": ">=3.0.0", 9 | "node": ">=4.0.0" 10 | }, 11 | "scripts": { 12 | "depcheck": "depcheck", 13 | "lint": "eslint src/*", 14 | "test": "npm run depcheck && npm run lint && jest" 15 | }, 16 | "bin": { 17 | "diamond": "src/cli/diamond.js" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "git+https://github.com/diamondpkg/diamond.git" 22 | }, 23 | "keywords": [ 24 | "diamond", 25 | "package manager", 26 | "css", 27 | "sass", 28 | "scss", 29 | "less", 30 | "stylus" 31 | ], 32 | "author": "Hackzzila", 33 | "license": "MIT", 34 | "bugs": { 35 | "url": "https://github.com/diamondpkg/diamond/issues" 36 | }, 37 | "homepage": "https://github.com/diamondpkg/diamond#readme", 38 | "dependencies": { 39 | "archy": "^1.0.0", 40 | "async": "^2.1.4", 41 | "chalk": "^1.1.3", 42 | "chokidar": "^1.7.0", 43 | "css-to-stylus-converter": "github:diamondpkg/css-to-stylus-converter", 44 | "fs-extra": "^2.0.0", 45 | "fstream": "^1.0.11", 46 | "ignore-file": "^1.1.2", 47 | "js-yaml": "^3.8.3", 48 | "less": "^2.7.2", 49 | "node-sass": "^4.4.0", 50 | "npmlog": "^4.0.2", 51 | "os-name": "^2.0.1", 52 | "prompt": "^1.0.0", 53 | "proper-lockfile": "^2.0.0", 54 | "raven": "^1.2.1", 55 | "semver": "^5.3.0", 56 | "stylus": "^0.54.5", 57 | "superagent": "^3.3.1", 58 | "tar": "^2.2.1", 59 | "tar-fs": "^1.15.2", 60 | "unifycss": "github:diamondpkg/unify", 61 | "validate-npm-package-name": "^3.0.0", 62 | "yargs": "^8.0.1" 63 | }, 64 | "devDependencies": { 65 | "depcheck": "^0.6.7", 66 | "eslint": "^3.19.0", 67 | "eslint-config-airbnb-base": "^11.1.3", 68 | "eslint-plugin-import": "^2.2.0", 69 | "jest": "^20.0.4" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /sierra-npm.css: -------------------------------------------------------------------------------- 1 | .visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.tags :after{clear:both;content:'';display:table}.full-width{margin-left:-15px;margin-right:-15px;width:auto}abbr,address,article,aside,audio,b,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,ins,kbd,label,legend,li,mark,menu,nav,object,ol,p,pre,q,samp,section,small,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,time,tr,ul,var,video{background:transparent;border:0;font-size:100%;margin:0;outline:0;padding:0;vertical-align:baseline}article,aside,figure,footer,header,main,nav,section{display:block}*,:after,:before{box-sizing:border-box;outline:none}body{background-color:#2c3e50;min-height:100%;overflow-x:hidden;position:relative}body,p{font-weight:400}img{max-width:100%}strong{font-weight:600}ul{margin-bottom:1em}li{list-style:none;margin-bottom:.5em}pre{margin-bottom:2em!important}.background-primary{background-color:#1abc9c}.background-dark{background-color:#18232f}.background-secondary{background-color:#9b59b6}.background-white{background-color:#fff}.background-success{background-color:#4caf50}.background-info{background-color:#5bc0de}.background-warning{background-color:#f0ad4e}.background-error{background-color:#e74c3c}.background-gray{background-color:#dee6ea}.background-gray-light{background-color:#edf3f6}.background-rating1{background-color:#dd2c00}.background-rating2{background-color:#ff5722}.background-rating3{background-color:#ff9800}.background-rating4{background-color:#ffc107}.background-rating5{background-color:#f5dc00}.background-rating6{background-color:#cddc39}.background-rating7{background-color:#8bc34a}.background-rating8{background-color:#4caf50}.background-rating9{background-color:#43a047}.background-rating10{background-color:#388e3c}.badges-list{margin-bottom:20px}.badges-list-item{background-color:#34495e;border-radius:3px;color:#fff;display:inline-block;line-height:1.2em;padding:.2em .7em}.badge-rounded{border-radius:50px}.badge-lg{font-size:1.3em}.badge-xs{font-size:.7em}.badge-primary{background-color:#1abc9c}.badge-secondary{background-color:#9b59b6}.badge-dark{background-color:#18232f}.badge-gray{background-color:#dee6ea}.badge-success{background-color:#4caf50}.badge-error{background-color:#e74c3c}.badge-warning{background-color:#f0ad4e}button{background-color:transparent;border:0;cursor:pointer}.button{background-color:#64829f;border:1px solid #2c3e50;border-radius:2em;display:inline-block;font-family:Lato,sans-serif;font-size:12px;font-weight:700;line-height:1.5em;margin:10px;padding:10px 20px;text-align:center;text-decoration:none;text-transform:uppercase;transition:opacity .2s ease-in-out;white-space:nowrap}.button,.button:active,.button:focus,.button:hover{color:#fff}.button:hover{cursor:pointer;opacity:.8;text-decoration:none}.button:active{opacity:1}.button:first-child{margin-left:0}.button:last-child{margin-right:0}.button.button-big{border-radius:2em;font-size:16px;line-height:1.5em;padding:10px 30px}.button.button-small{border-radius:2em;font-size:11px;line-height:1.273em;padding:6px 20px}.button.button-huge{border-radius:2em;font-size:16px;line-height:1.5em;padding:15px 30px}.button.button-huge i{font-size:20px}.button.button-large{display:block;margin-left:auto;margin-right:auto;max-width:400px;width:100%}.button.button-primary{background-color:#1abc9c;border:1px solid #1abc9c;color:#fff}.button.button-primary:hover{color:#fff}.button.button-secondary{background-color:#9b59b6;border:1px solid #9b59b6;color:#fff}.button.button-secondary:hover{color:#fff}.button.button-transparent{background-color:transparent;border:1px solid transparent}.button.button-white{background-color:#fff;border:1px solid #fff;color:#1abc9c}.button.button-green{background-color:#4caf50;border-color:#4caf50;color:#fff}.button.button-red{background-color:#e74c3c;border-color:#e74c3c;color:#fff}.button.button-outlined{background-color:transparent;border:1px solid #1abc9c;color:#1abc9c}.button.button-disabled{cursor:default;opacity:.4}.button.button-only-icon{height:43px;line-height:43px;padding:0;width:43px}.button.button-only-icon i{margin-left:0;margin-right:0}.button i{margin-bottom:-2%;margin-left:.8em;margin-right:.8em;position:relative;transition:all .3s ease}.button i:last-child{margin-right:0}.button i:first-child{margin-left:0}.button i:before{float:left}.button i.fa-lg{margin-bottom:0}.button-link{color:#1abc9c;font-family:Lato,sans-serif;font-size:12px;font-weight:700;text-transform:uppercase}.button-link i{font-size:18px;line-height:14px;margin-bottom:-2px;margin-left:4px;margin-right:8px;transition:all .3s ease}.button-link i:before{float:left}.button-link.button-link-rotated i{transform:rotate(-180deg)}.button-group{white-space:nowrap}.button-group .button{display:inline-block;margin:0}.button-group .button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group .button:not(:last-child){border-bottom-right-radius:0;border-right:0;border-top-right-radius:0}input,textarea{appearance:none}label{display:block;font-weight:400}input:-webkit-autofill{box-shadow:inset 0 0 0 1000px #34495e}select{-moz-appearance:window;-webkit-appearance:none}input[type=text],select,textarea{border-radius:3px;font-size:14px;line-height:1.5em;transition:background-color .2s ease-in-out}.input,.select,.textarea{border:0;border:1px solid #465f78;border-radius:3px;box-shadow:none;display:block;font-weight:400;margin-bottom:20px}.input :focus,.select :focus,.textarea :focus{outline:none}.input.error,.select.error,.textarea.error{border:1px solid #e74c3c;margin-bottom:0}.input.small,.select.small,.textarea.small{font-size:13px;padding:4px 6px}.has-error .input,.has-error .select,.has-error .textarea{border:1px solid #1abc9c}.has-error .control-label{color:#1abc9c}label.error{color:#e74c3c;font-size:13px;line-height:13px;position:absolute;right:0;top:-16px}input[type=checkbox]{appearance:checkbox}input[type=radio]{appearance:radio}.select{background-color:#34495e;display:inline-block;margin-right:10px;padding:0;position:relative}.select.full-width{display:inline-block;margin-left:0;margin-right:0;width:100%}.select:last-child{margin-right:0}.select .fa-angle-down{color:#969da6;font-size:25px;margin-top:-12px}.select .fa-angle-down,.select .icon-angle-down{height:30px;position:absolute;right:10px;top:50%;z-index:1}.select .icon-angle-down{color:#1abc9c;font-size:1.2em;margin-top:-10px}.select select{appearance:none;background-color:transparent;border:0;color:#fff;height:44px;margin-right:20px;padding-left:10px;padding-right:30px;position:relative;width:100%;z-index:2}.select select:active,.select select:focus{background-color:#3d566e;border:0;outline:none}.select select:active+i,.select select:focus+i{z-index:2}.select select option{background-color:#34495e;color:#fff;height:30px}.select.select-small{max-width:150px}.select.select-small select{font-size:14px!important;height:24px;line-height:24px;padding:0 5px;padding-right:27px}select::-ms-expand{display:none}.select-link{border:0;color:#1abc9c}.textarea{background-color:#34495e;padding:0;width:100%}.textarea textarea{background:transparent;border:0;color:#fff;display:block;font-family:Lato,sans-serif;padding:10px 15px;width:100%}.textarea textarea:active,.textarea textarea:focus{border:0;outline:none;background-color:#3d566e}textarea{min-height:120px}.form-button-wrap{text-align:center}.checkbox,.radio{margin:0;margin-bottom:5px;margin-right:20px;padding-left:25px;position:relative}input[type=checkbox]+label,input[type=radio]+label{display:block;overflow:hidden;padding-left:5px;text-overflow:ellipsis;white-space:nowrap}input[type=checkbox],input[type=radio]{display:none}input[type=checkbox]+label:after,input[type=checkbox]+label:before,input[type=radio]+label:after,input[type=radio]+label:before{display:block;position:absolute;font-size:14px;height:18px;line-height:18px;margin-top:-9px;top:50%;width:18px;left:0}input[type=checkbox]+label:after,input[type=radio]+label:after{background-color:#34495e;border:1px solid #465f78;border-radius:3px;content:''}input[type=radio]+label:after{border-radius:99px}input[type=checkbox]+label:before{content:"\f00c";font-family:FontAwesome;left:2px;top:11px;transform:scale(0);z-index:1}input[type=radio]+label:before{background-color:#1abc9c;border-radius:99px;content:'';display:block;height:8px;left:5px;margin-top:-4px;top:50%;transform:scale(0);width:8px;z-index:1}input[type=checkbox]:checked+label,input[type=radio]:checked+label{color:#1abc9c}input[type=checkbox]:checked+label:before,input[type=radio]:checked+label:before{animation:a .25s;color:#1abc9c;transform:scale(1)}@keyframes a{0%{transform:scale(0)}50%{transform:scale(1.5)}to{transform:scale(1)}}.input{background-color:#34495e;display:inline-block;margin-right:10px;padding:0;position:relative}.input :active,.input :focus{background-color:#3d566e}.input.full-width{display:inline-block;margin-left:0;margin-right:0;width:100%}.input input{background:transparent;border:0;box-shadow:none;color:#fff;height:44px;line-height:44px;margin-bottom:0;outline:none;padding-left:10px;padding-right:10px;width:100%}.input-with-icon{position:relative}.input-with-icon input{padding-right:42px}.input-with-icon .input-icon{color:#969da6;margin-top:-6px;position:absolute;right:12px;top:50%}.input-with-icon .input-icon.fa-search{color:#1abc9c;margin-top:-7px}.input-with-icon button.input-icon{background:none;border:0;cursor:pointer;padding:0}.input-icon input{padding:0;width:0}.input-icon i{padding:14px 15px 14px 12px}.input-group{margin-bottom:20px}.input-group .input,.input-group .select,.input-group .textarea{margin-bottom:0}.form-group{background-color:#34495e;border:1px solid #465f78;border-radius:3px;display:inline-block;margin-bottom:20px}.form-group .input,.form-group .select,.form-group .textarea{margin-bottom:0}.form-group .form-group-item{border:0;border-radius:0;margin-right:0}.form-group .form-group-item:last-child{border-right:0}.form-row{margin-left:-3px!important;margin-right:-3px!important}.form-row div[class^=col]{padding-left:3px;padding-right:3px}.form-collapse{display:flex;margin-bottom:20px}.form-collapse .item-main{flex:1}.form-collapse .item{border-radius:0;font-size:15px;margin:0}.form-collapse .item:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}.form-collapse .item:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.form-collapse .item:not(:last-child){border-right:0}.aligner{display:flex}.aligner-space-between{display:flex;justify-content:space-between;width:100%}.aligner-space-around{display:flex;justify-content:space-around;width:100%}.aligner-center-vertical{align-items:center;display:flex}.aligner-center-horitzontal{display:flex;justify-content:center}.content-start{display:flex;justify-content:flex-start}.content-end{display:flex;justify-content:flex-end}.aligner-item-top{align-self:flex-start}.aligner-item-bottom{align-self:flex-end}.flex-grow{flex-grow:1}.fleft{float:left}.fright{float:right}.cf:after,.cf:before{content:'';display:table}.cf:after{clear:both}.align-center{text-align:center}.align-right{text-align:right}.align-left{text-align:left}.align-bottom{vertical-align:bottom}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.ellipsis,.ellipsis-block{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis-block{display:block}.word-break{word-break:break-all}.text-indent{padding-left:24px}.bordered{border:1px solid #465f78}.border-bottom{border-bottom:1px solid #465f78}.border-left{border-left:1px solid #465f78}.border-right{border-right:1px solid #465f78}.border-top{border-top:1px solid #465f78}.display-block{display:block}.display-inline{display:inline}.hidden{display:none}.no-margin{margin:0!important}.no-wrap{white-space:nowrap}.overflow-hidden{overflow:hidden}.opacity-low{opacity:.5}.icon-rounded,.rounded-corners{border-radius:15%}.rounded{border-radius:100%}.hide-small{display:none}.hide-small-inline-block{display:none!important}.hide-medium{display:block}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.section{padding-bottom:20px;padding-top:20px}.section:after,.section:before{content:'';display:table}.section:after{clear:both}.container{max-width:1380px;width:100%}.container,.container-medium{margin:0 auto;padding-left:15px;padding-right:15px}.container-medium{max-width:944px}.container-small{margin:0 auto;max-width:400px;padding-left:15px;padding-right:15px}.separator{border-bottom:1px solid #465f78}.main-wrap{transition:padding .25s ease-in-out}.main-content,.main-wrap{overflow:hidden;position:relative}.main-content{float:right;margin-left:0;width:100%}.main-content:after,.main-content:before{clear:none}.loading-bar{height:4px;left:0;overflow:hidden;position:fixed;right:0;top:0;width:100%;z-index:3}.loading-bar:before{animation:b 2s linear infinite;background-color:#1abc9c;content:'';display:block;height:4px;left:-200px;position:absolute;width:200px}@keyframes b{0%{left:-200px}0%,50%{width:30%}70%{width:70%}80%{left:50%}95%{left:120%}to{left:100%}}.loading-spinner{animation:c 4s infinite;animation-timing-function:ease-in-out;display:block;height:30px;left:50%;margin-left:-15px;margin-top:-15px;position:fixed;top:50%;width:30px;z-index:3}.loading-spinner span{animation-timing-function:ease-in-out;background-color:#fff;border-radius:100%;display:block;height:9px;position:absolute;width:9px}.loading-spinner span:nth-child(1){animation:d 1s infinite;left:0;top:0;transform:translate3d(5px,5px,0)}.loading-spinner span:nth-child(2){animation:e 1s infinite;right:0;top:0}.loading-spinner span:nth-child(3){animation:f 1s infinite;bottom:0;right:0}.loading-spinner span:nth-child(4){animation:g 1s infinite;bottom:0;left:0}.loading-spinner.is-relative{display:inline-block;left:auto;margin:0;position:relative;top:auto;z-index:1}@keyframes c{0%{transform:rotate(0)}25%{transform:rotate(90deg)}50%{transform:rotate(180deg)}75%{transform:rotate(270deg)}to{transform:rotate(1turn)}}@keyframes d{0%{transform:translateZ(0)}50%{transform:translate3d(4px,4px,0)}to{transform:translateZ(0)}}@keyframes e{0%{transform:translateZ(0)}50%{transform:translate3d(-4px,4px,0)}to{transform:translateZ(0)}}@keyframes f{0%{transform:translateZ(0)}50%{transform:translate3d(-4px,-4px,0)}to{transform:translateZ(0)}}@keyframes g{0%{transform:translateZ(0)}50%{transform:translate3d(4px,-4px,0)}to{transform:translateZ(0)}}.message-bar{border-radius:3px;margin-bottom:1em;padding:1em}.message-bar p:last-child{margin-bottom:0}.paginator-list .paginator-list-item{margin-right:5px;padding:0;display:inline-block}.paginator-list .paginator-list-item:first-child i{margin-right:.5em}.paginator-list .paginator-list-item:last-child i{margin-left:.5em}.paginator-list .paginator-list-item .paginator-list-link{background-color:#34495e;border:1px solid #2c3e50;border-radius:3px;color:#fff;display:block;padding:.5em 1em;transition:background-color .2s ease-in-out}.paginator-list .paginator-list-item .paginator-list-link:hover{background-color:#46637f}.paginator-list .paginator-list-item .paginator-list-link.active{background-color:#1abc9c;color:#fff}.paginator-list.paginator-compact{display:flex}.paginator-list.paginator-compact .paginator-list-item{margin-right:0}.paginator-list.paginator-compact .paginator-list-item:not(:last-child){border-right:1px solid #2c3e50}.paginator-list.paginator-compact .paginator-list-item .paginator-list-link{border-radius:0}.paginator-list.paginator-compact .paginator-list-item:first-child .paginator-list-link{border-bottom-left-radius:3px;border-top-left-radius:3px}.paginator-list.paginator-compact .paginator-list-item:last-child .paginator-list-link{border-bottom-right-radius:3px;border-top-right-radius:3px}.paginator-list.paginator-center{justify-content:center;text-align:center}.rating-circle{background-color:#d7d7d7;border-radius:50%;display:inline-block;height:100px;margin:0 auto;overflow:hidden;position:relative;width:100px}.rating-circle.rating-color-1{color:#dd2c00}.rating-circle.rating-color-1 .circle-fill{background-color:#dd2c00}.rating-circle.rating-color-2{color:#ff5722}.rating-circle.rating-color-2 .circle-fill{background-color:#ff5722}.rating-circle.rating-color-3{color:#ff9800}.rating-circle.rating-color-3 .circle-fill{background-color:#ff9800}.rating-circle.rating-color-4{color:#ffc107}.rating-circle.rating-color-4 .circle-fill{background-color:#ffc107}.rating-circle.rating-color-5{color:#f5dc00}.rating-circle.rating-color-5 .circle-fill{background-color:#f5dc00}.rating-circle.rating-color-6{color:#cddc39}.rating-circle.rating-color-6 .circle-fill{background-color:#cddc39}.rating-circle.rating-color-7{color:#8bc34a}.rating-circle.rating-color-7 .circle-fill{background-color:#8bc34a}.rating-circle.rating-color-8{color:#4caf50}.rating-circle.rating-color-8 .circle-fill{background-color:#4caf50}.rating-circle.rating-color-9{color:#43a047}.rating-circle.rating-color-9 .circle-fill{background-color:#43a047}.rating-circle.rating-color-10{color:#388e3c}.rating-circle.rating-color-10 .circle-fill{background-color:#388e3c}.rating-circle .circle .circle-fill,.rating-circle .circle .circle-mask{border-radius:50%;height:100px;position:absolute;transition:all 1s;width:100px;backface-visibility:hidden}.rating-circle .circle .circle-fill.reanimate,.rating-circle .circle .circle-mask.reanimate{transition:transform 0s}.rating-circle .circle .circle-fill.reset,.rating-circle .circle .circle-mask.reset{transform:rotate(0deg)!important}.rating-circle .circle .circle-mask{clip:rect(0,100px,100px,50px);overflow:hidden}.rating-circle .circle .circle-mask .circle-fill{clip:rect(0,50px,100px,0)}.rating-circle .circle-inset{background-color:#34495e;border-radius:50%;height:94px;left:50%;margin-left:-47px;margin-top:-47px;position:absolute;text-align:center;top:50%;width:94px}.rating-circle .circle-inset .circle-rating-number{font-size:36px;font-weight:400;line-height:94px}.rating-circle.circle-small,.rating-circle.circle-small .circle .circle-fill,.rating-circle.circle-small .circle .circle-mask{width:80px;height:80px}.rating-circle.circle-small .circle-mask{clip:rect(0,80px,80px,40px)}.rating-circle.circle-small .circle-mask .circle-fill{clip:rect(0,40px,80px,0)}.rating-circle.circle-small .circle-inset{border-radius:50%;height:74px;left:50%;margin-left:-37px;margin-top:-37px;position:absolute;text-align:center;top:50%;width:74px}.rating-circle.circle-small .circle-inset .circle-rating-number{font-size:24px;font-weight:400;left:0;line-height:74px;margin:0!important;position:absolute;top:0;width:74px}.rating-color-1 .circle-fill,.rating-color-1 .circle-full{transform:rotate(18deg)}.rating-color-2 .circle-fill,.rating-color-2 .circle-full{transform:rotate(36deg)}.rating-color-3 .circle-fill,.rating-color-3 .circle-full{transform:rotate(54deg)}.rating-color-4 .circle-fill,.rating-color-4 .circle-full{transform:rotate(72deg)}.rating-color-5 .circle-fill,.rating-color-5 .circle-full{transform:rotate(90deg)}.rating-color-6 .circle-fill,.rating-color-6 .circle-full{transform:rotate(108deg)}.rating-color-7 .circle-fill,.rating-color-7 .circle-full{transform:rotate(126deg)}.rating-color-8 .circle-fill,.rating-color-8 .circle-full{transform:rotate(144deg)}.rating-color-9 .circle-fill,.rating-color-9 .circle-full{transform:rotate(162deg)}.rating-color-10 .circle-fill,.rating-color-10 .circle-full{transform:rotate(180deg)}.table{background-color:#34495e;border:1px solid #465f78;border-collapse:collapse;border-radius:3px;color:#fff;margin-bottom:20px;max-width:100%;width:100%}.table td,.table th{border-bottom:1px solid #465f78;padding:10px}.table td{padding:14px;position:relative}.table thead,.table tr{border-bottom:1px solid #465f78}.table th{background-color:#2c3e50;color:#969da6;font-weight:400;padding:5px 14px;white-space:nowrap}.table-vertical-center td{vertical-align:middle}.table-responsive th{display:none}.table-responsive td{display:block}.table-responsive td:first-child{border-top:1px solid #465f78;padding-top:14px}.table-responsive td:last-child{padding-bottom:14px}.table-responsive td:before{content:attr(data-th) ": ";display:block;font-weight:400}.table-responsive td,.table-responsive th{text-align:left}.table-responsive.table-break-medium tr{border-top:1px solid #465f78}.table-responsive.table-break-medium td:last-child{padding-bottom:14px}.table-responsive.table-break-small tr{border-top:1px solid #465f78}.table-responsive.table-break-small td:last-child{padding-bottom:14px}.tabs{border-bottom:1px solid #465f78;margin-bottom:30px;text-align:center}.tabs .tab{border-bottom:3px solid transparent;color:#969da6;display:inline-block;line-height:50px;margin:0;margin-right:30px;min-width:70px;position:relative}.tabs .tab:hover{color:#1abc9c;text-decoration:none}.tabs .tab.active{border-bottom:3px solid #1abc9c;color:#1abc9c}.tab-content{display:none}.tab-content.selected{display:block}.tags{margin-bottom:20px}.tags:last-child{margin-bottom:0}.tags li{margin:0 25px 10px 0}.tags .tag,.tags li{display:inline-block}.tags .tag{background-color:#34495e;border-radius:3px 0 0 3px;color:#fff;float:left;line-height:34px;padding:0 10px;position:relative}.tags .tag:before{border-bottom:17px solid transparent;border-left:10px solid #34495e;border-top:17px solid transparent;content:'';height:0;position:absolute;right:-10px;top:0;width:0}.tags .tag:after{background:#2c3e50;border-radius:6px;content:'';float:left;height:5px;position:absolute;right:-3px;top:14px;width:5px}.tags a.tag{color:#fff;display:inline-block;text-decoration:none}.tags a.tag:hover{background-color:#46637f;text-decoration:none}.tags a.tag:hover:before{border-left:10px solid #46637f}body{font:400 14px/1.5em Lato,sans-serif;color:#fff}img{font-size:12px;line-height:1.3em}p{line-height:1.5em;margin-bottom:1.5em}a{color:#1abc9c;text-decoration:none}a:hover{color:rgba(26,188,156,.8)}a:focus{color:#1abc9c}.text-big,.text-huge,.text-medium,.text-small,label.label{line-height:1.3em;margin-bottom:1em;margin-top:1.5em}.text-big:first-child,.text-huge:first-child,.text-medium:first-child,.text-small:first-child,label.label:first-child{margin-top:.5em}.text-huge{font-size:30px}.text-big,.text-huge{font-family:Lato,sans-serif;font-weight:300;text-transform:none}.text-big{font-size:24px}.text-medium{font-family:Lato,sans-serif;font-size:20px;font-weight:300;text-transform:none}.text-small,label.label{font-size:12px}.text-body{font-size:14px;line-height:1.5em}.text-primary{color:#1abc9c}.text-dark{color:#18232f}.text-secondary{color:#9b59b6}.text-success{color:#4caf50}.text-info{color:#5bc0de}.text-warning{color:#f0ad4e}.text-error{color:#e74c3c}.table-responsive td:before,.text-gray,label.label{color:#dee6ea}.text-gray-light{color:#edf3f6}.text-rating1{color:#dd2c00}.text-rating2{color:#ff5722}.text-rating3{color:#ff9800}.text-rating4{color:#ffc107}.text-rating5{color:#f5dc00}.text-rating6{color:#cddc39}.text-rating7{color:#8bc34a}.text-rating8{color:#4caf50}.text-rating9{color:#43a047}.text-rating10{color:#388e3c}.text-white{color:#fff}.table-responsive td:before,.text-gray,a.text-gray,button.text-gray,label.label{color:#969da6}.text-light{font-weight:300}.text-normal{font-weight:400}.text-line-through{text-decoration:line-through}.text-italic{font-style:italic}.text-uppercase{text-transform:uppercase}.text-transform-none{text-transform:none}.text-center{text-align:center}.text-lato{font-family:Lato,sans-serif}.text-with-subtitle{margin-bottom:0!important}.text-with-subtitle+.text-big,.text-with-subtitle+.text-huge,.text-with-subtitle+.text-medium,.text-with-subtitle+.text-small,.text-with-subtitle+label.label{margin-top:.5em}h1,h2,h3,h4{font-weight:300}.container{margin-right:auto;margin-left:auto}.container:after,.container:before{content:'';display:table}.container:after{clear:both}.container-fluid{margin-right:auto;margin-left:auto}.container-fluid:after,.container-fluid:before{content:'';display:table}.container-fluid:after{clear:both}.row{margin-left:-15px;margin-right:-15px}.row:after,.row:before{content:'';display:table}.row:after{clear:both}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-1{width:8.33333%}.col-xs-2{width:16.66667%}.col-xs-3{width:25%}.col-xs-4{width:33.33333%}.col-xs-5{width:41.66667%}.col-xs-6{width:50%}.col-xs-7{width:58.33333%}.col-xs-8{width:66.66667%}.col-xs-9{width:75%}.col-xs-10{width:83.33333%}.col-xs-11{width:91.66667%}.col-xs-12{width:100%}.col-xs-pull-0{right:auto}.col-xs-pull-1{right:8.33333%}.col-xs-pull-2{right:16.66667%}.col-xs-pull-3{right:25%}.col-xs-pull-4{right:33.33333%}.col-xs-pull-5{right:41.66667%}.col-xs-pull-6{right:50%}.col-xs-pull-7{right:58.33333%}.col-xs-pull-8{right:66.66667%}.col-xs-pull-9{right:75%}.col-xs-pull-10{right:83.33333%}.col-xs-pull-11{right:91.66667%}.col-xs-pull-12{right:100%}.col-xs-push-0{left:auto}.col-xs-push-1{left:8.33333%}.col-xs-push-2{left:16.66667%}.col-xs-push-3{left:25%}.col-xs-push-4{left:33.33333%}.col-xs-push-5{left:41.66667%}.col-xs-push-6{left:50%}.col-xs-push-7{left:58.33333%}.col-xs-push-8{left:66.66667%}.col-xs-push-9{left:75%}.col-xs-push-10{left:83.33333%}.col-xs-push-11{left:91.66667%}.col-xs-push-12{left:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333%}.col-xs-offset-2{margin-left:16.66667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333%}.col-xs-offset-5{margin-left:41.66667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333%}.col-xs-offset-8{margin-left:66.66667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333%}.col-xs-offset-11{margin-left:91.66667%}.col-xs-offset-12{margin-left:100%}@media (min-width:768px){.full-width{margin-left:-30px;margin-right:-30px}input[type=text],select,textarea{font-size:15px}.select select{padding:8px 15px}.form-button-wrap{text-align:right}.input input{padding:8px 15px}.hidden-medium,.show-small{display:none}.hide-small{display:block}.hide-small-inline-block{display:inline-block!important}.hide-medium{display:none}.section{padding-bottom:40px;padding-top:40px}.container,.container-medium,.container-small{padding-left:30px;padding-right:30px}.rating-circle{margin:0;margin-left:10px}.table-responsive.table-break-medium td:before{display:none}.table-responsive.table-break-medium td,.table-responsive.table-break-medium th{display:table-cell}body{font-size:15px}.text-small,label.label{font-size:14px}.container{width:auto}.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-1{width:8.33333%}.col-sm-2{width:16.66667%}.col-sm-3{width:25%}.col-sm-4{width:33.33333%}.col-sm-5{width:41.66667%}.col-sm-6{width:50%}.col-sm-7{width:58.33333%}.col-sm-8{width:66.66667%}.col-sm-9{width:75%}.col-sm-10{width:83.33333%}.col-sm-11{width:91.66667%}.col-sm-12{width:100%}.col-sm-pull-0{right:auto}.col-sm-pull-1{right:8.33333%}.col-sm-pull-2{right:16.66667%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333%}.col-sm-pull-5{right:41.66667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.33333%}.col-sm-pull-8{right:66.66667%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333%}.col-sm-pull-11{right:91.66667%}.col-sm-pull-12{right:100%}.col-sm-push-0{left:auto}.col-sm-push-1{left:8.33333%}.col-sm-push-2{left:16.66667%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333%}.col-sm-push-5{left:41.66667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.33333%}.col-sm-push-8{left:66.66667%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333%}.col-sm-push-11{left:91.66667%}.col-sm-push-12{left:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333%}.col-sm-offset-2{margin-left:16.66667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333%}.col-sm-offset-5{margin-left:41.66667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333%}.col-sm-offset-8{margin-left:66.66667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333%}.col-sm-offset-11{margin-left:91.66667%}.col-sm-offset-12{margin-left:100%}}@media (min-width:992px){.button.button-big{padding:10px 40px}.button.button-huge{border-radius:2em;font-size:18px;line-height:1.5em;padding:18px 50px}input[type=text],select,textarea{font-size:15px}.hidden-large{display:none}.hidden-medium{display:inline-block}.hide-medium{display:block}.rating-circle,.rating-circle .circle .circle-fill,.rating-circle .circle .circle-mask{height:130px;width:130px}.rating-circle .circle .circle-mask{clip:rect(0,130px,130px,65px)}.rating-circle .circle .circle-mask .circle-fill{clip:rect(0,65px,130px,0)}.rating-circle .circle-inset{height:124px;line-height:124px;margin-left:-62px;margin-top:-62px;width:124px}.rating-circle .circle-inset .circle-rating-number{font-size:50px;line-height:124px}.table td,.table th{padding:10px 20px}body{font-size:15px}.text-huge{font-size:40px}.text-big{font-size:28px}.text-body{font-size:15px}.container{width:auto}.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-1{width:8.33333%}.col-md-2{width:16.66667%}.col-md-3{width:25%}.col-md-4{width:33.33333%}.col-md-5{width:41.66667%}.col-md-6{width:50%}.col-md-7{width:58.33333%}.col-md-8{width:66.66667%}.col-md-9{width:75%}.col-md-10{width:83.33333%}.col-md-11{width:91.66667%}.col-md-12{width:100%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.33333%}.col-md-pull-2{right:16.66667%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333%}.col-md-pull-5{right:41.66667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.33333%}.col-md-pull-8{right:66.66667%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333%}.col-md-pull-11{right:91.66667%}.col-md-pull-12{right:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.33333%}.col-md-push-2{left:16.66667%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333%}.col-md-push-5{left:41.66667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.33333%}.col-md-push-8{left:66.66667%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333%}.col-md-push-11{left:91.66667%}.col-md-push-12{left:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333%}.col-md-offset-2{margin-left:16.66667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333%}.col-md-offset-5{margin-left:41.66667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333%}.col-md-offset-8{margin-left:66.66667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333%}.col-md-offset-11{margin-left:91.66667%}.col-md-offset-12{margin-left:100%}}@media (max-width:480px){.block-mobile{display:block;margin-left:0;margin-right:0;width:100%}.table-responsive.table-break-small td{border:0;padding-bottom:0}}@media (min-width:1280px){.hidden-large{display:inline-block}.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}.main-wrap{padding-left:250px}.text-huge{font-size:48px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-1{width:8.33333%}.col-lg-2{width:16.66667%}.col-lg-3{width:25%}.col-lg-4{width:33.33333%}.col-lg-5{width:41.66667%}.col-lg-6{width:50%}.col-lg-7{width:58.33333%}.col-lg-8{width:66.66667%}.col-lg-9{width:75%}.col-lg-10{width:83.33333%}.col-lg-11{width:91.66667%}.col-lg-12{width:100%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.33333%}.col-lg-pull-2{right:16.66667%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333%}.col-lg-pull-5{right:41.66667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.33333%}.col-lg-pull-8{right:66.66667%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333%}.col-lg-pull-11{right:91.66667%}.col-lg-pull-12{right:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.33333%}.col-lg-push-2{left:16.66667%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333%}.col-lg-push-5{left:41.66667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.33333%}.col-lg-push-8{left:66.66667%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333%}.col-lg-push-11{left:91.66667%}.col-lg-push-12{left:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333%}.col-lg-offset-2{margin-left:16.66667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333%}.col-lg-offset-5{margin-left:41.66667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333%}.col-lg-offset-8{margin-left:66.66667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333%}.col-lg-offset-11{margin-left:91.66667%}.col-lg-offset-12{margin-left:100%}}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1279px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}.hidden-md{display:none!important}}@media (max-width:768px){.table-responsive.table-break-medium td{border:0;padding-bottom:0}}@media (min-width:480px){.table-responsive.table-break-small td:before{display:none}.table-responsive.table-break-small td,.table-responsive.table-break-small th{display:table-cell}} -------------------------------------------------------------------------------- /src/cli/diamond-author.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | const os = require('os'); 5 | const path = require('path'); 6 | const log = require('npmlog'); 7 | const config = require('../functions/loadConfig'); 8 | const superagent = require('superagent'); 9 | 10 | log.heading = 'dia'; 11 | 12 | fs.ensureDirSync(path.join(os.homedir(), '.diamond')); 13 | if (!fs.existsSync(path.join(os.homedir(), '.diamond/auth.json'))) fs.writeFileSync(path.join(os.homedir(), '.diamond/auth.json'), JSON.stringify({})); 14 | const auth = JSON.parse(fs.readFileSync(path.join(os.homedir(), '.diamond/auth.json'))); 15 | 16 | exports.command = 'author [username]'; 17 | exports.desc = 'Adds, removes, or lists authors'; 18 | exports.builder = {}; 19 | 20 | exports.handler = (args) => { 21 | const cmd = args.add; 22 | 23 | if (cmd === 'ls') { 24 | superagent.get(`${config.registry}/package/${args.pkg}`) 25 | .then((res) => { 26 | for (const user of res.body.authors) { 27 | process.stdout.write(`${user.username} <${user.email}>\n`); 28 | } 29 | }) 30 | .catch((res) => { 31 | log.http(res.status, res.response.body.message); 32 | process.exit(1); 33 | }); 34 | } else if (cmd === 'add') { 35 | if (!auth) { 36 | log.error('not logged in', 'please run \'diamond login\''); 37 | process.exit(1); 38 | } 39 | 40 | superagent.post(`${config.registry}/package/${args.pkg}/author/${args.username}`) 41 | .auth(auth.username, auth.password) 42 | .catch((res) => { 43 | log.http(res.status, res.response.body.message); 44 | process.exit(1); 45 | }); 46 | } else if (cmd === 'rm') { 47 | if (!auth) { 48 | log.error('not logged in', 'please run \'diamond login\''); 49 | process.exit(1); 50 | } 51 | 52 | superagent.del(`${config.registry}/package/${args.pkg}/author/${args.username}`) 53 | .auth(auth.username, auth.password) 54 | .catch((res) => { 55 | log.http(res.status, res.response.body.message); 56 | process.exit(1); 57 | }); 58 | } else { 59 | log.error('invalid action', cmd); 60 | process.exit(1); 61 | } 62 | }; 63 | -------------------------------------------------------------------------------- /src/cli/diamond-compile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const log = require('npmlog'); 4 | const fs = require('fs-extra'); 5 | const chokidar = require('chokidar'); 6 | const compile = require('../functions/compile'); 7 | 8 | log.heading = 'dia'; 9 | 10 | exports.command = 'compile '; 11 | exports.desc = 'compile a file'; 12 | exports.aliases = ['c']; 13 | exports.builder = { 14 | output: { 15 | alias: 'o', 16 | desc: 'the file to write to', 17 | }, 18 | watch: { 19 | alias: 'w', 20 | desc: 'compile files on changes', 21 | boolean: true, 22 | }, 23 | 'output-style': { 24 | desc: 'CSS output style', 25 | default: 'nested', 26 | choices: ['nested', 'expanded', 'compact', 'compressed'], 27 | }, 28 | }; 29 | 30 | exports.handler = (args) => { 31 | if (args.watch && !args.output) { 32 | log.error('no output', 'you must provide an output when using \'--watch\''); 33 | log.error('not ok'); 34 | process.exit(1); 35 | } 36 | 37 | if (args.watch) global.cli = false; 38 | 39 | compile(args.file, { outputStyle: args.outputStyle }).then((css) => { 40 | if (args.watch) { 41 | fs.writeFileSync(args.output, css); 42 | log.notice('compiled'); 43 | } else if (args.output) { 44 | fs.writeFileSync(args.output, css); 45 | process.exit(0); 46 | } else { 47 | process.stdout.write(css); 48 | process.exit(0); 49 | } 50 | }) 51 | .catch((err) => { 52 | log.error('compile', err.message); 53 | log.error('compile', err.stack); 54 | }); 55 | 56 | if (args.watch) { 57 | chokidar.watch('.', { 58 | awaitWriteFinish: true, 59 | ignoreInitial: true, 60 | ignored: [ 61 | args.output, 62 | '.git', 63 | ], 64 | }).on('all', () => { 65 | compile(args.file, { outputStyle: args.outputStyle }) 66 | .then((css) => { 67 | fs.writeFileSync(args.output, css); 68 | log.notice('compiled'); 69 | }) 70 | .catch((err) => { 71 | log.error('compile', err.message); 72 | log.error('compile', err.stack); 73 | }); 74 | }); 75 | } 76 | }; 77 | -------------------------------------------------------------------------------- /src/cli/diamond-config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | require('../functions/loadConfig'); 4 | const os = require('os'); 5 | const fs = require('fs-extra'); 6 | const yaml = require('js-yaml'); 7 | const log = require('npmlog'); 8 | const path = require('path'); 9 | 10 | log.heading = 'dia'; 11 | 12 | exports.command = 'config [key] [value]'; 13 | exports.desc = 'Manages your global diamond config'; 14 | exports.builder = {}; 15 | 16 | exports.handler = (args) => { 17 | const cmd = args.set; 18 | const config = yaml.safeLoad(fs.readFileSync(path.join(os.homedir(), '.diamond/config.yml'))); 19 | 20 | if (cmd === 'ls') { 21 | process.stdout.write(`${fs.readFileSync(path.join(os.homedir(), '.diamond/config.yml'))}\n`); 22 | } else if (cmd === 'get') { 23 | process.stdout.write(`${config[args.key]}\n`); 24 | } else if (cmd === 'set') { 25 | config[args.key] = args.value || null; 26 | fs.writeFileSync(path.join(os.homedir(), '.diamond/config.yml'), yaml.safeDump(config)); 27 | process.stdout.write(`${config[args.key]}\n`); 28 | } else if (cmd === 'rm') { 29 | delete config[args.key]; 30 | fs.writeFileSync(path.join(os.homedir(), '.diamond/config.yml'), yaml.safeDump(config)); 31 | } else { 32 | log.error('invalid action', cmd); 33 | process.exit(1); 34 | } 35 | }; 36 | -------------------------------------------------------------------------------- /src/cli/diamond-init.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | const path = require('path'); 5 | const prompt = require('prompt'); 6 | 7 | exports.command = 'init'; 8 | exports.desc = 'setup a diamond.json file'; 9 | exports.builder = {}; 10 | 11 | exports.handler = () => { 12 | let info = {}; 13 | if (fs.existsSync(path.join(process.cwd(), 'diamond.json'))) info = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'diamond.json'))); 14 | 15 | prompt.start(); 16 | 17 | prompt.get([ 18 | { name: 'name', default: info.name || path.parse(process.cwd()).name }, 19 | { name: 'version', default: info.version || '1.0.0' }, 20 | { name: 'description', default: info.description || '' }, 21 | { name: 'main', description: 'main file', default: info.main || 'index.sass' }, 22 | ], (err, result) => { 23 | if (err) throw err; 24 | fs.writeFileSync(path.join(process.cwd(), 'diamond.json'), JSON.stringify(Object.assign(info, result), null, 2)); 25 | }); 26 | }; 27 | -------------------------------------------------------------------------------- /src/cli/diamond-install.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | const log = require('npmlog'); 5 | const async = require('async'); 6 | const archy = require('archy'); 7 | const install = require('../functions/install'); 8 | const autoload = require('../functions/autoload'); 9 | const parsePackageString = require('../functions/parsePackageString'); 10 | const parsePackageObject = require('../functions/parsePackageObject'); 11 | 12 | log.heading = 'dia'; 13 | 14 | exports.command = 'install [pkgs...]'; 15 | exports.desc = 'install one or more packages'; 16 | exports.aliases = ['i']; 17 | exports.builder = { 18 | save: { 19 | boolean: true, 20 | desc: 'Don\'t save packages in your diamond.json', 21 | default: true, 22 | }, 23 | cache: { 24 | boolean: true, 25 | desc: 'Don\'t pull packages from the package cache', 26 | default: true, 27 | }, 28 | }; 29 | 30 | exports.handler = (args) => { 31 | let packageJson; 32 | try { 33 | packageJson = JSON.parse(fs.readFileSync('./diamond.json')); 34 | } catch (err) { 35 | packageJson = {}; 36 | log.info('no diamond.json found'); 37 | } 38 | 39 | packageJson = Object.assign({ dependencies: {} }, packageJson); 40 | 41 | log.enableProgress(); 42 | 43 | const packages = []; 44 | for (const pkg of args.pkgs) { 45 | const source = parsePackageString(pkg); 46 | if (source) { 47 | packages.push({ 48 | name: source.name, 49 | version: source.version, 50 | path: null, 51 | for: null, 52 | source, 53 | }); 54 | } else { 55 | log.error('invalid package', pkg); 56 | log.error('not ok'); 57 | process.exit(1); 58 | } 59 | } 60 | 61 | if (!packages.length) { 62 | for (const source of parsePackageObject(packageJson.dependencies)) { 63 | packages.push({ 64 | name: source.name, 65 | version: source.version, 66 | path: null, 67 | for: null, 68 | source, 69 | }); 70 | } 71 | } 72 | 73 | if (!packages.length) { 74 | log.info('no packages to install'); 75 | process.exit(0); 76 | } 77 | 78 | fs.ensureDirSync('./diamond/packages'); 79 | fs.ensureFileSync('./diamond/.internal/packages.lock'); 80 | 81 | let label; 82 | if (packageJson.name && packageJson.version) { 83 | label = `${packageJson.name}@${packageJson.version} ${process.cwd()}`; 84 | } else if (packageJson.name) { 85 | label = `${packageJson.name} ${process.cwd()}`; 86 | } else { 87 | label = process.cwd(); 88 | } 89 | 90 | const tree = { 91 | label, 92 | nodes: [], 93 | }; 94 | 95 | async.eachLimit(packages, 1, (pkg, done) => { 96 | log.pause(); 97 | log.gauge.enable(); 98 | install(pkg, args).then((data) => { 99 | tree.nodes.push(data[0]); 100 | 101 | pkg = data[1]; 102 | if (args.save) { 103 | if (pkg.source.type === 'diamond') { 104 | packageJson.dependencies[pkg.name] = `^${pkg.version}`; 105 | } else if (pkg.source.type === 'npm') { 106 | packageJson.dependencies[pkg.name] = `npm:${pkg.name}@^${pkg.version}`; 107 | } else { 108 | packageJson.dependencies[pkg.name] = `${pkg.source.type}:${pkg.source.owner}/${pkg.source.repo}${pkg.source.ref ? `#${pkg.source.ref}` : ''}`; 109 | } 110 | } 111 | 112 | done(); 113 | }); 114 | }, () => { 115 | autoload(); 116 | 117 | if (args.save) fs.writeFileSync('./diamond.json', JSON.stringify(packageJson, null, 2)); 118 | 119 | process.stderr.write(`${archy(tree)}\n`); 120 | log.resume(); 121 | process.exit(0); 122 | }); 123 | }; 124 | -------------------------------------------------------------------------------- /src/cli/diamond-login.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const os = require('os'); 4 | const log = require('npmlog'); 5 | const fs = require('fs-extra'); 6 | const path = require('path'); 7 | const prompt = require('prompt'); 8 | const config = require('../functions/loadConfig'); 9 | const superagent = require('superagent'); 10 | 11 | log.heading = 'dia'; 12 | 13 | fs.ensureDirSync(path.join(os.homedir(), '.diamond')); 14 | 15 | exports.command = 'login'; 16 | exports.desc = 'Logs you in or registers'; 17 | exports.builder = {}; 18 | 19 | exports.handler = () => { 20 | prompt.start(); 21 | prompt.get([ 22 | { name: 'username', required: true }, 23 | ], (err, result) => { 24 | if (err) throw err; 25 | 26 | superagent.get(`${config.registry}/user/${result.username}`) 27 | .then(() => { 28 | prompt.get([ 29 | { name: 'password', required: true, hidden: true }, 30 | ], (e, resu) => { 31 | if (e) throw e; 32 | 33 | superagent.get(`${config.registry}/user`) 34 | .auth(result.username, resu.password) 35 | .then((res) => { 36 | const auth = { 37 | username: res.body.username, email: res.body.email, password: resu.password, 38 | }; 39 | fs.writeFileSync(path.join(os.homedir(), '.diamond/auth.json'), JSON.stringify(auth)); 40 | log.info('logged in', `as ${res.body.username}`); 41 | }).catch((res) => { 42 | throw res; 43 | }); 44 | }); 45 | }) 46 | .catch((res) => { 47 | if (res.status !== 404) throw res; 48 | 49 | prompt.get([ 50 | { name: 'email', required: true }, 51 | { name: 'password', required: true, hidden: true }, 52 | { name: 'verify password', required: true, hidden: true }, 53 | ], (e, resu) => { 54 | if (e) throw e; 55 | 56 | if (resu.password !== resu['verify password']) { 57 | log.error('passwords do not match'); 58 | process.exit(1); 59 | } 60 | 61 | superagent.post(`${config.registry}/user`) 62 | .send(Object.assign({}, result, resu)) 63 | .then((r) => { 64 | const auth = { 65 | username: r.body.username, email: r.body.email, password: resu.password, 66 | }; 67 | fs.writeFileSync(path.join(os.homedir(), '.diamond/auth.json'), JSON.stringify(auth)); 68 | log.info('registered', `as ${r.body.username}`); 69 | log.info('check your email for a verification email'); 70 | }) 71 | .catch((r) => { 72 | throw r; 73 | }); 74 | }); 75 | }); 76 | }); 77 | }; 78 | -------------------------------------------------------------------------------- /src/cli/diamond-publish.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | const os = require('os'); 5 | const path = require('path'); 6 | const log = require('npmlog'); 7 | const config = require('../functions/loadConfig'); 8 | const superagent = require('superagent'); 9 | const ignore = require('ignore-file'); 10 | const tar = require('tar-fs'); 11 | const zlib = require('zlib'); 12 | 13 | log.heading = 'dia'; 14 | 15 | exports.command = 'publish'; 16 | exports.desc = 'Publishes the current directory'; 17 | exports.builder = { 18 | readme: { 19 | desc: 'The path to the readme to publish', 20 | }, 21 | }; 22 | 23 | exports.handler = (args) => { 24 | fs.ensureDirSync(path.join(os.homedir(), '.diamond')); 25 | if (!fs.existsSync(path.join(os.homedir(), '.diamond/auth.json'))) fs.writeFileSync(path.join(os.homedir(), '.diamond/auth.json'), JSON.stringify({})); 26 | const auth = JSON.parse(fs.readFileSync(path.join(os.homedir(), '.diamond/auth.json'))); 27 | 28 | if (!auth) { 29 | log.error('not logged in', 'please run \'diamond login\''); 30 | process.exit(1); 31 | } 32 | 33 | let info = {}; 34 | try { 35 | info = JSON.parse(fs.readFileSync('./diamond.json')); 36 | } catch (err) { 37 | let packageJson; 38 | try { 39 | packageJson = JSON.parse(fs.readFileSync('./package.json')); 40 | } catch (e) { 41 | log.error('no \'diamond.json\' or \'package.json\' found'); 42 | process.exit(1); 43 | } 44 | 45 | info.name = packageJson.name; 46 | info.version = packageJson.version; 47 | info.description = packageJson.description; 48 | info.main = packageJson.diamond || packageJson.sass || packageJson.less || 49 | (packageJson.main && !packageJson.main.endsWith('.js') ? packageJson.main : packageJson.style); 50 | 51 | log.warn('using \'package.json\'', 'all fields may not be supported'); 52 | } 53 | 54 | if (!info.name) { 55 | log.error('no \'name\' field'); 56 | process.exit(1); 57 | } else if (!info.version) { 58 | log.error('no \'version\' field'); 59 | process.exit(1); 60 | } else if (!info.description) { 61 | log.error('no \'description\' field'); 62 | process.exit(1); 63 | } else if (!info.main) { 64 | log.warn('no \'main\' field'); 65 | } 66 | 67 | let readme; 68 | if (args.readme) { 69 | if (!fs.existsSync(path.join(process.cwd(), args.readme))) { 70 | log.error('invalid readme', args.readme); 71 | process.exit(1); 72 | } 73 | 74 | readme = fs.readFileSync(path.join(process.cwd(), args.readme)).toString(); 75 | } else if (fs.existsSync(path.join(process.cwd(), 'README.md'))) { 76 | readme = fs.readFileSync(path.join(process.cwd(), 'README.md')).toString(); 77 | } else if (fs.existsSync(path.join(process.cwd(), 'readme.md'))) { 78 | readme = fs.readFileSync(path.join(process.cwd(), 'readme.md')).toString(); 79 | } else { 80 | log.warn('no readme'); 81 | } 82 | 83 | const filter = ignore.sync('.diaignore') || ignore.sync('.gitignore') || ignore.compile(''); 84 | const internalFilter = ignore.compile('node_modules\ndiamond\n.git'); 85 | 86 | const stream = tar.pack('.', { 87 | ignore: name => filter(name) || internalFilter(name), 88 | }).pipe(zlib.createGzip()); 89 | 90 | let file = Buffer.alloc(0); 91 | stream.on('data', (data) => { 92 | file = Buffer.concat([file, data]); 93 | }); 94 | 95 | stream.on('end', () => { 96 | superagent.post(`${config.registry}/package/${info.name}`) 97 | .auth(auth.username, auth.password) 98 | .field('package', JSON.stringify(info)) 99 | .field('readme', readme || '') 100 | .attach('dist', file, 'dist.tar.gz') 101 | .then((res) => { 102 | process.stdout.write(`+ ${res.body.tags.latest}\n`); 103 | }) 104 | .catch((res) => { 105 | log.http(res.status, res.response.body.message); 106 | process.exit(1); 107 | }); 108 | }); 109 | }; 110 | -------------------------------------------------------------------------------- /src/cli/diamond-tag.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | const os = require('os'); 5 | const path = require('path'); 6 | const log = require('npmlog'); 7 | const config = require('../functions/loadConfig'); 8 | const superagent = require('superagent'); 9 | 10 | log.heading = 'dia'; 11 | 12 | fs.ensureDirSync(path.join(os.homedir(), '.diamond')); 13 | if (!fs.existsSync(path.join(os.homedir(), '.diamond/auth.json'))) fs.writeFileSync(path.join(os.homedir(), '.diamond/auth.json'), JSON.stringify({})); 14 | const auth = JSON.parse(fs.readFileSync(path.join(os.homedir(), '.diamond/auth.json'))); 15 | 16 | exports.command = 'tag [tag] [version]'; 17 | exports.desc = 'Sets, removes, or lists tags'; 18 | exports.builder = {}; 19 | 20 | exports.handler = (args) => { 21 | const cmd = args.set; 22 | 23 | if (cmd === 'ls') { 24 | superagent.get(`${config.registry}/package/${args.pkg}`) 25 | .then((res) => { 26 | for (const tag in res.body.tags) { 27 | process.stdout.write(`${tag}: ${res.body.tags[tag]}\n`); 28 | } 29 | }) 30 | .catch((res) => { 31 | log.http(res.status, res.response.body.message); 32 | process.exit(1); 33 | }); 34 | } else if (cmd === 'set') { 35 | if (!auth) { 36 | log.error('not logged in', 'please run \'diamond login\''); 37 | process.exit(1); 38 | } 39 | 40 | superagent.post(`${config.registry}/package/${args.pkg}/tag/${args.tag}`) 41 | .auth(auth.username, auth.password) 42 | .send({ version: args.version }) 43 | .catch((res) => { 44 | log.http(res.status, res.response.body.message); 45 | process.exit(1); 46 | }); 47 | } else if (cmd === 'rm') { 48 | if (!auth) { 49 | log.error('not logged in', 'please run \'diamond login\''); 50 | process.exit(1); 51 | } 52 | 53 | superagent.del(`${config.registry}/package/${args.pkg}/tag/${args.tag}`) 54 | .auth(auth.username, auth.password) 55 | .catch((res) => { 56 | log.http(res.status, res.response.body.message); 57 | process.exit(1); 58 | }); 59 | } else { 60 | log.error('invalid action', cmd); 61 | process.exit(1); 62 | } 63 | }; 64 | -------------------------------------------------------------------------------- /src/cli/diamond-uninstall.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | const log = require('npmlog'); 5 | const path = require('path'); 6 | const lockfile = require('proper-lockfile'); 7 | const autoload = require('../functions/autoload'); 8 | 9 | log.heading = 'dia'; 10 | 11 | exports.command = 'uninstall [pkgs..]'; 12 | exports.desc = 'Uninstall one or more packages'; 13 | exports.aliases = ['u']; 14 | exports.builder = {}; 15 | 16 | exports.handler = (args) => { 17 | fs.ensureDirSync('./diamond/packages'); 18 | fs.ensureFileSync('./diamond/.internal/packages.lock'); 19 | 20 | const release = lockfile.lockSync('./diamond/.internal/packages.lock'); 21 | 22 | let packages; 23 | try { 24 | packages = JSON.parse(fs.readFileSync('./diamond/.internal/packages.lock')); 25 | } catch (err) { 26 | process.exit(0); 27 | } 28 | 29 | for (const name of args.pkgs) { 30 | let index = 0; 31 | const pkg = packages.find((p, i) => { 32 | index = i; 33 | return p.name.toLowerCase() === name.toLowerCase() && !p.for; 34 | }); 35 | if (!pkg) continue; 36 | fs.removeSync(path.join(process.cwd(), 'diamond', 'packages', pkg.path)); 37 | packages.splice(index, 1); 38 | 39 | for (const i in packages) { 40 | const dep = packages[i]; 41 | if (dep.for && dep.for.toLowerCase() !== name.toLowerCase()) continue; 42 | fs.removeSync(path.join(process.cwd(), 'diamond', 'packages', dep.path)); 43 | packages.splice(i, 1); 44 | } 45 | } 46 | 47 | fs.writeFileSync('./diamond/.internal/packages.lock', JSON.stringify(packages)); 48 | 49 | release(); 50 | 51 | autoload(); 52 | }; 53 | -------------------------------------------------------------------------------- /src/cli/diamond-unpublish.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | const os = require('os'); 5 | const path = require('path'); 6 | const log = require('npmlog'); 7 | const config = require('../functions/loadConfig'); 8 | const superagent = require('superagent'); 9 | 10 | log.heading = 'dia'; 11 | 12 | exports.command = 'unpublish [version]'; 13 | exports.desc = 'Unpublishes a version or a whole package'; 14 | exports.builder = {}; 15 | 16 | exports.handler = (args) => { 17 | fs.ensureDirSync(path.join(os.homedir(), '.diamond')); 18 | if (!fs.existsSync(path.join(os.homedir(), '.diamond/auth.json'))) fs.writeFileSync(path.join(os.homedir(), '.diamond/auth.json'), JSON.stringify({})); 19 | const auth = JSON.parse(fs.readFileSync(path.join(os.homedir(), '.diamond/auth.json'))); 20 | 21 | if (!auth) { 22 | log.error('not logged in', 'please run \'diamond login\''); 23 | process.exit(1); 24 | } 25 | 26 | if (args.version) { 27 | superagent.del(`${config.registry}/package/${args.pkg}/${args.version}`) 28 | .auth(auth.username, auth.password) 29 | .then(() => { 30 | process.stdout.write(`- ${args.pkg}@${args.version}\n`); 31 | }) 32 | .catch((res) => { 33 | log.http(res.status, res.response.body.message); 34 | process.exit(1); 35 | }); 36 | } else { 37 | superagent.del(`${config.registry}/package/${args.pkg}`) 38 | .auth(auth.username, auth.password) 39 | .then(() => { 40 | process.stdout.write(`- ${args.pkg}\n`); 41 | }) 42 | .catch((res) => { 43 | log.http(res.status, res.response.body.message); 44 | process.exit(1); 45 | }); 46 | } 47 | }; 48 | -------------------------------------------------------------------------------- /src/cli/diamond.js: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env node 2 | 3 | 'use strict'; 4 | 5 | const log = require('npmlog'); 6 | const yargs = require('yargs'); 7 | const version = require('../../package.json').version; 8 | 9 | log.heading = 'dia'; 10 | global.cli = true; 11 | 12 | yargs.usage('$0 command') // eslint-disable-line no-unused-expressions 13 | .commandDir('.') 14 | .demand(1, 'must provide a valid command') 15 | .help('h') 16 | .alias('h', 'help') 17 | .version(version) 18 | .argv; 19 | 20 | process.on('unhandledRejection', (error) => { 21 | log.resume(); 22 | log.error('error', 'Error'); 23 | log.error('error', ` ${error.stack}`); 24 | log.error('error'); 25 | log.error('error', 'System Information'); 26 | log.error('error', ` Node Version: ${process.version}`); 27 | log.error('error', ` Platform: ${process.platform}`); 28 | log.error('error', ` Version: ${version}`); 29 | log.error('error'); 30 | log.error('error', 'You have encountered an error, please report the information above to the diamond team.'); 31 | log.error('error', 'You can make a new issue here https://github.com/diamondpkg/diamond/issues/new'); 32 | }); 33 | 34 | process.on('uncaughtException', (error) => { 35 | log.resume(); 36 | log.error('error', 'Error'); 37 | log.error('error', ` ${error.stack}`); 38 | log.error('error'); 39 | log.error('error', 'System Information'); 40 | log.error('error', ` Node Version: ${process.version}`); 41 | log.error('error', ` Platform: ${process.platform}`); 42 | log.error('error', ` Version: ${version}`); 43 | log.error('error'); 44 | log.error('error', 'You have encountered an error, please report the information above to the diamond team.'); 45 | log.error('error', 'You can make a new issue here https://github.com/diamondpkg/diamond/issues/new'); 46 | }); 47 | -------------------------------------------------------------------------------- /src/exports.js: -------------------------------------------------------------------------------- 1 | const compile = require('./functions/compile'); 2 | const plugin = require('./importers'); 3 | 4 | global.cli = false; 5 | 6 | module.exports = { compile, plugin }; 7 | -------------------------------------------------------------------------------- /src/functions/autoload.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs-extra'); 4 | const path = require('path'); 5 | const lockfile = require('proper-lockfile'); 6 | 7 | module.exports = () => { 8 | const release = lockfile.lockSync('./diamond/.internal/packages.lock'); 9 | let autoload = ''; 10 | const installed = JSON.parse(fs.readFileSync('./diamond/.internal/packages.lock')); 11 | for (const installedPkg of installed) { 12 | if (!installedPkg.for && fs.existsSync(path.join(process.cwd(), 'diamond/packages', installedPkg.path, 'diamond/dist/main.css'))) { 13 | autoload += `${fs.readFileSync(path.join(process.cwd(), 'diamond/packages', installedPkg.path, 'diamond/dist/main.css'))}\n\n`; 14 | } else if (!installedPkg.for && installedPkg.main.endsWith('.css')) { 15 | autoload += `${fs.readFileSync(path.join(process.cwd(), 'diamond/packages', installedPkg.path, installedPkg.main))}\n\n`; 16 | } 17 | } 18 | 19 | fs.writeFileSync('./diamond/autoload.css', autoload.trim()); 20 | 21 | release(); 22 | }; 23 | -------------------------------------------------------------------------------- /src/functions/compile/index.js: -------------------------------------------------------------------------------- 1 | /* global cli:false */ 2 | 3 | 'use strict'; 4 | 5 | const fs = require('fs-extra'); 6 | const compileSass = require('./sass'); 7 | const compileLess = require('./less'); 8 | const compileStyl = require('./stylus'); 9 | const log = require('npmlog'); 10 | 11 | log.heading = 'dia'; 12 | 13 | module.exports = (file, options) => new Promise((resolve, reject) => { 14 | fs.ensureDirSync('./diamond/packages'); 15 | fs.ensureFileSync('./diamond/.internal/packages.lock'); 16 | 17 | let promise; 18 | if (/\.sass|\.scss/.test(file)) { 19 | promise = compileSass(file, options); 20 | } else if (/\.less/.test(file)) { 21 | promise = compileLess(file, options); 22 | } else if (/\.styl/.test(file)) { 23 | promise = compileStyl(file, options); 24 | } else if (cli) { 25 | log.resume(); 26 | log.error('unsupported file type'); 27 | log.error('not ok'); 28 | process.exit(1); 29 | } else { 30 | reject(new Error('unsupported file type')); 31 | } 32 | 33 | promise.then((css) => { 34 | resolve(css); 35 | }) 36 | .catch(e => reject(e)); 37 | }); 38 | -------------------------------------------------------------------------------- /src/functions/compile/less.js: -------------------------------------------------------------------------------- 1 | /* global cli:false */ 2 | 3 | 'use strict'; 4 | 5 | const less = require('less'); 6 | const path = require('path'); 7 | const log = require('npmlog'); 8 | const fs = require('fs-extra'); 9 | const plugin = require('../../importers'); 10 | 11 | module.exports = filename => new Promise((resolve, reject) => { 12 | let packageJson; 13 | try { 14 | packageJson = JSON.parse(fs.readFileSync('./diamond.json')); 15 | } catch (err) { 16 | packageJson = {}; 17 | if (cli) log.info('no diamond.json found'); 18 | } 19 | 20 | const plugins = [plugin.less]; 21 | 22 | if (packageJson && packageJson.unify) { 23 | plugins.push(require(path.join(process.cwd(), packageJson.unify)).less); 24 | } 25 | 26 | less.render(fs.readFileSync(filename).toString(), { filename, plugins }) 27 | .then((result) => { 28 | resolve(result.css.toString()); 29 | }).catch((error) => { 30 | if (cli) { 31 | log.disableProgress(); 32 | log.resume(); 33 | log.error('less', error.message); 34 | log.error('less', error.stack); 35 | log.error('not ok'); 36 | process.exit(1); 37 | } else reject(error); 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /src/functions/compile/sass.js: -------------------------------------------------------------------------------- 1 | /* global cli:false */ 2 | 3 | 'use strict'; 4 | 5 | const sass = require('node-sass'); 6 | const log = require('npmlog'); 7 | const fs = require('fs-extra'); 8 | const path = require('path'); 9 | const async = require('async'); 10 | const plugin = require('../../importers'); 11 | 12 | global.compileCommand = true; 13 | 14 | module.exports = (file, options) => new Promise((resolve, reject) => { 15 | if (!options) options = {}; 16 | Object.assign(options, { outputStyle: 'nested' }); 17 | 18 | let packages; 19 | try { 20 | packages = JSON.parse(fs.readFileSync('./diamond/.internal/packages.lock')); 21 | } catch (err) { 22 | packages = []; 23 | } 24 | 25 | let packageJson; 26 | try { 27 | packageJson = JSON.parse(fs.readFileSync('./diamond.json')); 28 | } catch (err) { 29 | packageJson = {}; 30 | if (cli) log.info('no diamond.json found'); 31 | } 32 | 33 | const functions = {}; 34 | if (packageJson.sass && packageJson.sass.functions) { 35 | if (typeof packageJson.sass.functions === 'string') { 36 | Object.assign(functions, 37 | require(path.join(process.cwd(), packageJson.sass.functions))); 38 | } else { 39 | for (const func in packageJson.sass.functions) { 40 | functions[func] = require(path.join(process.cwd(), 41 | packageJson.sass.functions[func])); 42 | } 43 | } 44 | } 45 | 46 | packages.filter(o => !!o.functions) 47 | .forEach((o) => { 48 | if (typeof o.functions === 'string') { 49 | Object.assign(functions, require(path.join(process.cwd(), 'diamond/packages', o.path, o.functions))); 50 | } else { 51 | for (const func in o.functions) { 52 | functions[func] = require(path.join(process.cwd(), 'diamond/packages', o.path, o.functions[func])); 53 | } 54 | } 55 | }); 56 | 57 | const postProcessors = packages.filter(o => !!o.postProcessor).map(o => require(path.join(process.cwd(), 'diamond/packages', o.path, o.postProcessor))) 58 | .concat( 59 | packageJson.postProcessor ? 60 | [require(path.join(process.cwd(), packageJson.postProcessor))] : 61 | [] 62 | ); 63 | 64 | let importers = packages.filter(o => !!o.importer).map(o => require(path.join(process.cwd(), 'diamond/packages', o.path, o.importer))) 65 | .concat( 66 | packageJson && packageJson.importer ? 67 | [require(path.join(process.cwd(), packageJson.importer))] : 68 | [] 69 | ); 70 | 71 | if (packageJson && packageJson.unify) { 72 | const plug = require(path.join(process.cwd(), packageJson.unify)).sass; 73 | importers = importers.concat(plug.importers); 74 | Object.assign(functions, plug.functions); 75 | } 76 | 77 | sass.render({ 78 | file, 79 | outputStyle: options.outputStyle, 80 | importer: importers.concat(plugin.sass.importers), 81 | functions, 82 | }, (error, result) => { 83 | if (error) { 84 | if (cli) { 85 | log.disableProgress(); 86 | log.resume(); 87 | log.error('sass', error.message); 88 | log.error('sass', error.stack); 89 | log.error('not ok'); 90 | process.exit(1); 91 | } else return reject(error); 92 | } 93 | 94 | let css = result.css.toString(); 95 | 96 | async.eachLimit(postProcessors, 1, (postProcessor, done) => { 97 | let res; 98 | try { 99 | res = postProcessor(css); 100 | } catch (err) { 101 | if (cli && typeof err === 'string') { 102 | log.disableProgress(); 103 | log.resume(); 104 | log.error('post install', err); 105 | log.error('not ok'); 106 | process.exit(1); 107 | } else if (cli) { 108 | log.disableProgress(); 109 | log.resume(); 110 | log.error('post install', err.message); 111 | log.error('not ok'); 112 | process.exit(1); 113 | } else return reject(err); 114 | } 115 | 116 | Promise.resolve(res).then((newCss) => { 117 | css = newCss; 118 | done(); 119 | }).catch((err) => { 120 | if (cli && typeof err === 'string') { 121 | log.disableProgress(); 122 | log.resume(); 123 | log.error('post install', err); 124 | log.error('not ok'); 125 | process.exit(1); 126 | } else if (cli) { 127 | log.disableProgress(); 128 | log.resume(); 129 | log.error('post install', err.message); 130 | log.error('not ok'); 131 | process.exit(1); 132 | } else return reject(err); 133 | return undefined; 134 | }); 135 | 136 | return undefined; 137 | }, () => { 138 | resolve(css); 139 | }); 140 | 141 | return undefined; 142 | }); 143 | }); 144 | -------------------------------------------------------------------------------- /src/functions/compile/stylus.js: -------------------------------------------------------------------------------- 1 | /* global cli:false */ 2 | 3 | 'use strict'; 4 | 5 | const stylus = require('stylus'); 6 | const log = require('npmlog'); 7 | const fs = require('fs-extra'); 8 | const path = require('path'); 9 | const async = require('async'); 10 | const plugin = require('../../importers'); 11 | 12 | global.compileCommand = true; 13 | 14 | module.exports = file => new Promise((resolve, reject) => { 15 | let packages; 16 | try { 17 | packages = JSON.parse(fs.readFileSync('./diamond/.internal/packages.lock')); 18 | } catch (err) { 19 | packages = []; 20 | } 21 | 22 | let packageJson; 23 | try { 24 | packageJson = JSON.parse(fs.readFileSync('./diamond.json')); 25 | } catch (err) { 26 | packageJson = {}; 27 | if (cli) log.info('no diamond.json found'); 28 | } 29 | 30 | const plugins = [plugin.stylus]; 31 | 32 | if (packageJson && packageJson.unify) { 33 | plugins.push(require(path.join(process.cwd(), packageJson.unify)).stylus); 34 | } 35 | 36 | const postProcessors = packages.filter(o => !!o.postProcessor).map(o => require(path.join(process.cwd(), 'diamond/packages', o.path, o.postProcessor))) 37 | .concat( 38 | packageJson.postProcessor ? 39 | [require(path.join(process.cwd(), packageJson.postProcessor))] : 40 | [] 41 | ); 42 | 43 | const style = stylus(fs.readFileSync(file).toString()) 44 | .set('filename', file); 45 | 46 | for (const plug of plugins) { 47 | style.use(plug); 48 | } 49 | 50 | style.render((error, css) => { 51 | if (error) { 52 | if (cli) { 53 | log.disableProgress(); 54 | log.resume(); 55 | log.error('styl', error.message); 56 | log.error('styl', error.stack); 57 | log.error('not ok'); 58 | process.exit(1); 59 | } else return reject(error); 60 | } 61 | 62 | async.eachLimit(postProcessors, 1, (postProcessor, done) => { 63 | let res; 64 | try { 65 | res = postProcessor(css); 66 | } catch (err) { 67 | if (cli && typeof err === 'string') { 68 | log.disableProgress(); 69 | log.resume(); 70 | log.error('post install', err); 71 | log.error('not ok'); 72 | process.exit(1); 73 | } else if (cli) { 74 | log.disableProgress(); 75 | log.resume(); 76 | log.error('post install', err.message); 77 | log.error('not ok'); 78 | process.exit(1); 79 | } else return reject(err); 80 | } 81 | 82 | Promise.resolve(res).then((newCss) => { 83 | css = newCss; 84 | done(); 85 | }).catch((err) => { 86 | if (cli && typeof err === 'string') { 87 | log.disableProgress(); 88 | log.resume(); 89 | log.error('post install', err); 90 | log.error('not ok'); 91 | process.exit(1); 92 | } else if (cli) { 93 | log.disableProgress(); 94 | log.resume(); 95 | log.error('post install', err.message); 96 | log.error('not ok'); 97 | process.exit(1); 98 | } else return reject(err); 99 | 100 | return undefined; 101 | }); 102 | 103 | return undefined; 104 | }, () => { 105 | resolve(css); 106 | }); 107 | 108 | return undefined; 109 | }); 110 | }); 111 | -------------------------------------------------------------------------------- /src/functions/error.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const os = require('os'); 4 | const osName = require('os-name'); 5 | const raven = require('raven'); 6 | const log = require('npmlog'); 7 | 8 | log.heading = 'dia'; 9 | 10 | raven.config('https://f2be20d7c4d84c7fa384e602c0b32103@sentry.io/158014', { 11 | release: require('../../package.json').version, 12 | captureUnhandledRejections: true, 13 | extra: { 14 | arch: os.arch(), 15 | osName: osName(os.platform(), os.release()), 16 | osRelease: os.release(), 17 | osType: os.platform(), 18 | nodeVersion: process.version, 19 | }, 20 | }).install(() => { 21 | log.error('internal error', 'this error has been forwarded to the diamond team'); 22 | log.error('internal error', 'please try again later'); 23 | }); 24 | 25 | raven.disableConsoleAlerts(); 26 | 27 | exports = raven; 28 | -------------------------------------------------------------------------------- /src/functions/install/diamond.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const userAgent = require('../../misc/userAgent'); 4 | const superagent = require('superagent'); 5 | const semver = require('semver'); 6 | const log = require('npmlog'); 7 | const config = require('../loadConfig'); 8 | 9 | module.exports = (packages, pkg) => new Promise((resolve) => { 10 | superagent.get(`${config.registry}/package/${pkg.name}`) 11 | .set(userAgent.superagent) 12 | .then((res) => { 13 | let version; 14 | if (pkg.source.tag && res.body.tags[pkg.source.tag] 15 | && res.body.versions[res.body.tags[pkg.source.tag]]) { 16 | version = res.body.versions[res.body.tags[pkg.source.tag]]; 17 | } else if (pkg.source.tag) { 18 | log.disableProgress(); 19 | log.resume(); 20 | log.error(`invalid tag ${pkg.source.tag}`, pkg.name); 21 | log.error('not ok'); 22 | process.exit(1); 23 | } else { 24 | const versions = Object.keys(res.body.versions) 25 | .filter(v => semver.satisfies(v, pkg.version)) 26 | .sort(semver.compare) 27 | .reverse(); 28 | if (versions.length) { 29 | version = res.body.versions[versions[0]]; 30 | } else { 31 | log.disableProgress(); 32 | log.resume(); 33 | log.error(`no versions match ${pkg.version}`, pkg.name); 34 | log.error('not ok'); 35 | process.exit(1); 36 | } 37 | } 38 | 39 | resolve([version.data, version.dist.url, version.dist.shasum]); 40 | }) 41 | .catch((res) => { 42 | log.disableProgress(); 43 | log.resume(); 44 | if (res.status) log.error(`registry error: ${res.status}`, pkg.name); 45 | else throw res; 46 | log.error('not ok'); 47 | process.exit(1); 48 | }); 49 | }); 50 | -------------------------------------------------------------------------------- /src/functions/install/github.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const superagent = require('superagent'); 4 | const userAgent = require('../../misc/userAgent'); 5 | const log = require('npmlog'); 6 | 7 | module.exports = (packages, pkg) => new Promise((resolve) => { 8 | superagent.get(`https://raw.githubusercontent.com/${pkg.source.owner}/${pkg.source.repo}/${pkg.source.ref}/diamond.json`) 9 | .set(userAgent.superagent) 10 | .then((res) => { 11 | let info; 12 | try { 13 | info = JSON.parse(res.text); 14 | } catch (err) { 15 | info = null; 16 | } 17 | 18 | resolve([info, `https://github.com/${pkg.source.owner}/${pkg.source.repo}/archive/${pkg.source.ref}.tar.gz`]); 19 | }) 20 | .catch((res) => { 21 | if (res.status === 404) { 22 | resolve([null, `https://github.com/${pkg.source.owner}/${pkg.source.repo}/archive/${pkg.source.ref}.tar.gz`]); 23 | } else { 24 | log.disableProgress(); 25 | log.resume(); 26 | log.error(`error downloading diamond.json: ${res.status}`, `${pkg.source.owner}/${pkg.source.repo}#${pkg.source.ref}`); 27 | log.error('not ok'); 28 | process.exit(1); 29 | } 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /src/functions/install/gitlab.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const superagent = require('superagent'); 4 | const userAgent = require('../../misc/userAgent'); 5 | const log = require('npmlog'); 6 | 7 | module.exports = (packages, pkg) => new Promise((resolve) => { 8 | superagent.get(`https://gitlab.com/api/v3/projects/${pkg.source.owner}%2F${pkg.source.repo}/repository/blobs/${pkg.source.ref}?filepath=diamond.json`) 9 | .set(userAgent.superagent) 10 | .then((res) => { 11 | let info; 12 | try { 13 | info = JSON.parse(res.text); 14 | } catch (err) { 15 | info = null; 16 | } 17 | 18 | resolve([info, `https://gitlab.com/api/v4/projects/${pkg.source.owner}%2F${pkg.source.repo}/repository/archive?sha=${pkg.source.ref}`]); 19 | }) 20 | .catch((res) => { 21 | if (res.status === 404) { 22 | resolve([null, `https://gitlab.com/api/v4/projects/${pkg.source.owner}%2F${pkg.source.repo}/repository/archive?sha=${pkg.source.ref}`]); 23 | } else { 24 | log.disableProgress(); 25 | log.resume(); 26 | log.error(`error downloading diamond.json: ${res.status}`, `${pkg.source.owner}/${pkg.source.repo}#${pkg.source.ref}`); 27 | log.error('not ok'); 28 | process.exit(1); 29 | } 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /src/functions/install/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const npm = require('./npm'); 4 | const github = require('./github'); 5 | const gitlab = require('./gitlab'); 6 | const diamond = require('./diamond'); 7 | const os = require('os'); 8 | const fs = require('fs-extra'); 9 | const stream = require('stream'); 10 | const path = require('path'); 11 | const childProcess = require('child_process'); 12 | const log = require('npmlog'); 13 | const lockfile = require('proper-lockfile'); 14 | const chalk = require('chalk'); 15 | const async = require('async'); 16 | const superagent = require('superagent'); 17 | const tar = require('tar'); 18 | const zlib = require('zlib'); 19 | const crypto = require('crypto'); 20 | const fstream = require('fstream'); 21 | const userAgent = require('../../misc/userAgent'); 22 | const compile = require('../compile'); 23 | const parsePackageObject = require('../parsePackageObject'); 24 | const convertStylus = require('css-to-stylus-converter'); 25 | 26 | module.exports = (pkg, options) => new Promise((resolve) => { 27 | let packages; 28 | const node = { nodes: [] }; 29 | 30 | const release = lockfile.lockSync('./diamond/.internal/packages.lock'); 31 | 32 | try { 33 | packages = JSON.parse(fs.readFileSync('./diamond/.internal/packages.lock')); 34 | } catch (err) { 35 | packages = []; 36 | } 37 | 38 | let promise; 39 | if (pkg.source.type === 'npm') { 40 | promise = npm(packages, pkg); 41 | } else if (pkg.source.type === 'github') { 42 | promise = github(packages, pkg); 43 | } else if (pkg.source.type === 'gitlab') { 44 | promise = gitlab(packages, pkg); 45 | } else if (pkg.source.type === 'diamond') { 46 | promise = diamond(packages, pkg); 47 | } 48 | 49 | promise.then((data) => { 50 | const info = data[0]; 51 | const url = data[1]; 52 | const shasum = data[2]; 53 | 54 | if (info && pkg.source.type !== 'npm') { 55 | pkg.name = pkg.name || info.name || pkg.source.repo; 56 | pkg.version = info.version; 57 | pkg.main = info.main; 58 | pkg.postProcessor = info.postProcessor; 59 | pkg.functions = info.sass ? info.sass.functions : null; 60 | pkg.importer = info.sass ? info.sass.importer : null; 61 | pkg.dependencies = info.dependencies || {}; 62 | } else if (pkg.source.type === 'npm') { 63 | pkg.name = pkg.name || info.name; 64 | pkg.version = info.version; 65 | pkg.main = info.diamond || info.sass || info.less || (info.main && !info.main.endsWith('.js') ? info.main : info.style); 66 | } else { 67 | pkg.name = pkg.name || pkg.source.repo; 68 | } 69 | 70 | let index = 0; 71 | const newPkg = !packages.find(p => p.name === pkg.name); 72 | 73 | const old = packages.find((p, i) => { 74 | index = i; 75 | return p.path === pkg.name; 76 | }); 77 | 78 | if (old && old.for && !old.version !== pkg.version) { 79 | fs.ensureDirSync(`./diamond/packages/${old.for}/diamond/packages`); 80 | fs.renameSync(`./diamond/packages/${old.name}`, `./diamond/packages/${old.for}/diamond/packages/${old.name}`); 81 | old.path = `${old.for}/diamond/packages/${old.name}`; 82 | packages[index] = old; 83 | } else if (old) { 84 | packages.splice(index, 1); 85 | } 86 | 87 | index = 0; 88 | const found = packages.find((p, i) => { 89 | index = i; 90 | return p.name === pkg.name && p.for === pkg.for; 91 | }); 92 | 93 | if (pkg.for && found) { 94 | fs.ensureDirSync(`./diamond/packages/${pkg.for}/diamond/packages`); 95 | fs.removeSync(`./diamond/packages/${pkg.for}/diamond/packages/${pkg.name}`); 96 | packages.splice(index, 1); 97 | pkg.path = `${pkg.for}/diamond/packages/${pkg.name}`; 98 | } else { 99 | fs.removeSync(`./diamond/packages/${pkg.name}`); 100 | if (found) { 101 | packages.splice(index, 1); 102 | } 103 | pkg.path = pkg.name; 104 | } 105 | 106 | packages.push(pkg); 107 | 108 | let verString = ''; 109 | if (pkg.version) verString = `@${pkg.version}`; 110 | else if (pkg.ref) verString = `#${pkg.ref}`; 111 | 112 | if (pkg.source.type === 'diamond' && options.cache && fs.existsSync(path.join(os.homedir(), '.diamond/package-cache', `${pkg.name}${verString}.tar.gz`))) { 113 | const extract = tar.Extract({ path: path.join('./diamond/packages') }); 114 | 115 | log.setGaugeTemplate([ 116 | { type: 'activityIndicator', kerning: 1, length: 1 }, 117 | { type: 'section', default: '' }, 118 | ':', 119 | { type: 'logline', kerning: 1, default: '' }, 120 | ]); 121 | log.enableProgress(); 122 | 123 | extract.on('entry', (entry) => { 124 | log.gauge.show({ section: 'extract', logline: entry.path }); 125 | log.gauge.pulse(); 126 | }); 127 | 128 | extract.on('end', () => { 129 | log.disableProgress(); 130 | log.setGaugeTemplate([ 131 | { type: 'progressbar', length: 20 }, 132 | { type: 'activityIndicator', kerning: 1, length: 1 }, 133 | { type: 'section', default: '' }, 134 | ':', 135 | { type: 'logline', kerning: 1, default: '' }, 136 | ]); 137 | 138 | fs.writeFileSync('./diamond/.internal/packages.lock', JSON.stringify(packages)); 139 | 140 | const dependencies = []; 141 | for (const source of parsePackageObject(pkg.dependencies)) { 142 | dependencies.push({ 143 | name: source.name, 144 | version: source.version, 145 | path: null, 146 | for: pkg.path, 147 | source, 148 | }); 149 | } 150 | 151 | release(); 152 | 153 | async.eachLimit(dependencies, 1, (dep, cb) => { 154 | module.exports(dep, options).then((d) => { 155 | node.nodes.push(d[0]); 156 | cb(); 157 | }); 158 | }, () => { 159 | if (pkg.name && pkg.version) { 160 | node.label = `${pkg.name}@${pkg.version}`; 161 | } else if (pkg.name && pkg.ref) { 162 | node.label = `${pkg.name}#${pkg.ref}`; 163 | } else { 164 | node.label = `${pkg.name}`; 165 | } 166 | 167 | node.label = newPkg ? chalk.green(node.label) : chalk.yellow(node.label); 168 | node.label = `${node.label} ${chalk.cyan('(from cache)')}`; 169 | 170 | resolve([node, pkg]); 171 | }); 172 | }); 173 | 174 | fs.createReadStream(path.join(os.homedir(), '.diamond/package-cache', `${pkg.name}${verString}.tar.gz`)) 175 | .pipe(zlib.createGunzip()) 176 | .pipe(extract); 177 | } else { 178 | const req = superagent.get(url) 179 | .set(userAgent.superagent); 180 | const passthrough = new stream.PassThrough(); 181 | const gzip = zlib.createGunzip(); 182 | const extract = tar.Extract({ 183 | path: path.join('./diamond/packages', pkg.path), 184 | strip: pkg.source.type === 'diamond' ? 0 : 1, 185 | }); 186 | 187 | let contents = Buffer.alloc(0); 188 | 189 | req.on('response', (r) => { 190 | if (!r.ok) { 191 | log.disableProgress(); 192 | log.resume(); 193 | log.error(`error downloading: ${r.status}`, pkg.name); 194 | log.error('not ok'); 195 | process.exit(1); 196 | } else if (!info) { 197 | log.warn('no diamond.json', `${pkg.source.owner}/${pkg.source.repo}#${pkg.source.ref}`); 198 | } 199 | }); 200 | 201 | passthrough.on('data', (buf) => { 202 | contents = Buffer.concat([contents, buf]); 203 | gzip.write(buf); 204 | }); 205 | 206 | passthrough.on('end', () => gzip.end()); 207 | 208 | log.setGaugeTemplate([ 209 | { type: 'activityIndicator', kerning: 1, length: 1 }, 210 | { type: 'section', default: '' }, 211 | ':', 212 | { type: 'logline', kerning: 1, default: '' }, 213 | ]); 214 | log.enableProgress(); 215 | 216 | extract.on('entry', (entry) => { 217 | log.gauge.show({ section: 'extract', logline: entry.path }); 218 | log.gauge.pulse(); 219 | }); 220 | 221 | extract.on('end', () => { 222 | log.disableProgress(); 223 | log.setGaugeTemplate([ 224 | { type: 'progressbar', length: 20 }, 225 | { type: 'activityIndicator', kerning: 1, length: 1 }, 226 | { type: 'section', default: '' }, 227 | ':', 228 | { type: 'logline', kerning: 1, default: '' }, 229 | ]); 230 | 231 | if (shasum && shasum !== crypto.createHash(pkg.source.type === 'diamond' ? 'sha256' : 'sha1') 232 | .update(contents, 'utf8').digest('hex')) { 233 | log.disableProgress(); 234 | log.resume(); 235 | fs.removeSync(path.join('./diamond/packages'), pkg.path); 236 | log.error('shasum does not match', pkg.name); 237 | log.error('not ok'); 238 | process.exit(1); 239 | } 240 | 241 | fs.writeFileSync('./diamond/.internal/packages.lock', JSON.stringify(packages)); 242 | 243 | fs.ensureDirSync(path.join('./diamond/packages', pkg.path, 'diamond/dist')); 244 | 245 | log.setGaugeTemplate([ 246 | { type: 'activityIndicator', kerning: 1, length: 1 }, 247 | { type: 'section', default: '' }, 248 | ':', 249 | { type: 'logline', kerning: 1, default: '' }, 250 | ]); 251 | 252 | if (pkg.postProcessor || pkg.functions || pkg.importer) { 253 | try { 254 | childProcess.execSync('npm i', { cwd: path.join('./diamond/packages', pkg.path), stdio: 'inherit' }); 255 | } catch (err) { 256 | log.disableProgress(); 257 | log.resume(); 258 | lockfile.unlockSync('./diamond/.internal/packages.lock'); 259 | log.error('npm', err.message); 260 | log.error('not ok'); 261 | process.exit(1); 262 | } 263 | } 264 | 265 | fs.writeFileSync('./diamond/.internal/packages.lock', JSON.stringify(packages)); 266 | 267 | const dependencies = []; 268 | for (const source of parsePackageObject(pkg.dependencies)) { 269 | dependencies.push({ 270 | name: source.name, 271 | version: source.version, 272 | path: null, 273 | for: pkg.path, 274 | source, 275 | }); 276 | } 277 | 278 | release(); 279 | 280 | async.eachLimit(dependencies, 1, (dep, cb) => { 281 | module.exports(dep, options).then((d) => { 282 | node.nodes.push(d[0]); 283 | cb(); 284 | }); 285 | }, () => { 286 | const pulse = () => log.gauge.pulse(); 287 | new Promise((rsolve) => { 288 | if (/\.sass|\.scss|\.less|\.styl/.test(pkg.main)) { 289 | log.enableProgress(); 290 | setInterval(pulse, 100); 291 | log.gauge.show({ section: 'compiling', logline: pkg.main }, 0); 292 | compile(path.join(process.cwd(), 'diamond/packages', pkg.path, pkg.main), { outputStyle: 'compressed' }) 293 | .then((css) => { 294 | fs.writeFileSync(path.join('./diamond/packages', pkg.path, 'diamond/dist/main.css'), css); 295 | fs.writeFileSync(path.join('./diamond/packages', pkg.path, 'diamond/dist/main.scss'), css); 296 | fs.writeFileSync(path.join('./diamond/packages', pkg.path, 'diamond/dist/main.styl'), convertStylus(css)); 297 | log.gauge.show({ section: 'compiling', logline: pkg.main }, 1); 298 | rsolve(); 299 | }); 300 | } else rsolve(); 301 | }).then(() => { 302 | clearInterval(pulse); 303 | log.disableProgress(); 304 | log.setGaugeTemplate([ 305 | { type: 'progressbar', length: 20 }, 306 | { type: 'activityIndicator', kerning: 1, length: 1 }, 307 | { type: 'section', default: '' }, 308 | ':', 309 | { type: 'logline', kerning: 1, default: '' }, 310 | ]); 311 | 312 | if (pkg.main.endsWith('.css')) { 313 | fs.writeFileSync(path.join('./diamond/packages', pkg.path, 'diamond/dist/main.scss'), fs.readFileSync(path.join('./diamond/packages', pkg.path, pkg.main), 'utf8')); 314 | fs.writeFileSync(path.join('./diamond/packages', pkg.path, 'diamond/dist/main.styl'), convertStylus(fs.readFileSync(path.join('./diamond/packages', pkg.path, pkg.main), 'utf8'))); 315 | } 316 | 317 | const finish = () => { 318 | if (pkg.name && pkg.version) { 319 | node.label = `${pkg.name}@${pkg.version}`; 320 | } else if (pkg.name && pkg.ref) { 321 | node.label = `${pkg.name}#${pkg.ref}`; 322 | } else { 323 | node.label = `${pkg.name}`; 324 | } 325 | 326 | node.label = newPkg ? chalk.green(node.label) : chalk.yellow(node.label); 327 | 328 | resolve([node, pkg]); 329 | }; 330 | 331 | if (pkg.source.type === 'diamond') { 332 | fs.ensureDirSync(path.join(os.homedir(), '.diamond/package-cache')); 333 | 334 | const writeStream = fs.createWriteStream(path.join(os.homedir(), '.diamond/package-cache', `${pkg.name}${verString}.tar.gz`)) 335 | .on('finish', finish); 336 | 337 | fstream.Reader({ path: path.join('./diamond/packages', pkg.path), type: 'Directory' }) 338 | .pipe(tar.Pack({ noProprietary: true })) 339 | .pipe(zlib.createGzip()) 340 | .pipe(writeStream); 341 | } else finish(); 342 | }); 343 | }); 344 | }); 345 | 346 | gzip.pipe(extract); 347 | req.pipe(passthrough); 348 | } 349 | }); 350 | }); 351 | -------------------------------------------------------------------------------- /src/functions/install/npm.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const userAgent = require('../../misc/userAgent'); 4 | const superagent = require('superagent'); 5 | const semver = require('semver'); 6 | const log = require('npmlog'); 7 | 8 | module.exports = (packages, pkg) => new Promise((resolve) => { 9 | superagent.get(`https://registry.npmjs.org/${pkg.name}`) 10 | .set(userAgent.superagent) 11 | .then((res) => { 12 | let version; 13 | if (pkg.source.tag && res.body['dist-tags'][pkg.source.tag] && res.body.versions[res.body['dist-tags'][pkg.source.tag]]) { 14 | version = res.body.versions[res.body['dist-tags'][pkg.source.tag]]; 15 | } else if (pkg.source.tag) { 16 | log.disableProgress(); 17 | log.resume(); 18 | log.error(`invalid tag ${pkg.source.tag}`, pkg.name); 19 | log.error('not ok'); 20 | process.exit(1); 21 | } else { 22 | const versions = Object.keys(res.body.versions) 23 | .filter(v => semver.satisfies(v, pkg.version)) 24 | .sort(semver.compare) 25 | .reverse(); 26 | if (versions.length) { 27 | version = res.body.versions[versions[0]]; 28 | } else { 29 | log.disableProgress(); 30 | log.resume(); 31 | log.error(`no versions match ${pkg.version}`, pkg.name); 32 | log.error('not ok'); 33 | process.exit(1); 34 | } 35 | } 36 | 37 | resolve([version, version.dist.tarball, version.dist.shasum]); 38 | }) 39 | .catch((res) => { 40 | log.disableProgress(); 41 | log.resume(); 42 | if (res.status) log.error(`registry error: ${res.status}`, pkg.name); 43 | else throw res; 44 | log.error('not ok'); 45 | process.exit(1); 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /src/functions/loadConfig.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const os = require('os'); 4 | const fs = require('fs-extra'); 5 | const yaml = require('js-yaml'); 6 | const log = require('npmlog'); 7 | const path = require('path'); 8 | 9 | log.heading = 'dia'; 10 | 11 | const defaults = { registry: 'https://registry.diamondpkg.org' }; 12 | 13 | fs.ensureDirSync(path.join(os.homedir(), '.diamond')); 14 | if (!fs.existsSync(path.join(os.homedir(), '.diamond/config.yml'))) fs.writeFileSync(path.join(os.homedir(), '.diamond/config.yml'), yaml.safeDump(defaults)); 15 | const global = yaml.safeLoad(fs.readFileSync(path.join(os.homedir(), '.diamond/config.yml'))); 16 | 17 | let local = {}; 18 | if (fs.existsSync(path.join(process.cwd(), 'diamond-config.yml'))) local = yaml.safeLoad(fs.readFileSync(path.join(process.cwd(), 'diamond-config.yml'))); 19 | 20 | module.exports = Object.assign(global, local); 21 | -------------------------------------------------------------------------------- /src/functions/parsePackageObject.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const semver = require('semver'); 4 | const npmValidate = require('validate-npm-package-name'); 5 | const log = require('npmlog'); 6 | 7 | module.exports = (dependencies) => { 8 | const deps = []; 9 | 10 | for (const dep in dependencies) { 11 | if (/^(gitlab:|gl:)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i.test(dependencies[dep])) { 12 | const match = dependencies[dep].match(/^(gitlab:|gl:)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i); 13 | deps.push({ 14 | type: 'gitlab', 15 | owner: match[2], 16 | repo: match[3], 17 | name: dep, 18 | ref: match[6] || 'master', 19 | }); 20 | } else if (/^(bitbucket:|bb:)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i.test(dependencies[dep])) { 21 | const match = dependencies[dep].match(/^(bitbucket:|bb:)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i); 22 | deps.push({ 23 | type: 'bitbucket', 24 | owner: match[2], 25 | repo: match[3], 26 | name: dep, 27 | ref: match[6] || 'master', 28 | }); 29 | } else if (/^(github:|gh:|)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i.test(dependencies[dep])) { 30 | const match = dependencies[dep].match(/^(github:|gh:|)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i); 31 | deps.push({ 32 | type: 'github', 33 | owner: match[2], 34 | repo: match[3], 35 | name: dep, 36 | ref: match[6] || 'master', 37 | }); 38 | } else if (/^npm:([^/@]+?)(@([^/]+))?$/i.test(dependencies[dep]) && npmValidate( 39 | dependencies[dep].match(/^npm:([^/@]+?)(@([^/]+))?$/i)[1]).validForOldPackages) { 40 | const match = dependencies[dep].match(/^npm:([^/@]+?)(@([^/]+))?$/i); 41 | if (semver.validRange(match[3])) { 42 | deps.push({ 43 | type: 'npm', 44 | name: match[1], 45 | version: match[3], 46 | }); 47 | } else { 48 | deps.push({ 49 | type: 'npm', 50 | name: match[1], 51 | tag: match[3] || 'latest', 52 | }); 53 | } 54 | } else if (npmValidate(dep).validForOldPackages && semver.validRange(dependencies[dep])) { 55 | deps.push({ 56 | type: 'diamond', 57 | name: dep, 58 | version: dependencies[dep], 59 | }); 60 | } else if (npmValidate(dep).validForOldPackages) { 61 | deps.push({ 62 | type: 'diamond', 63 | name: dep, 64 | tag: dependencies[dep] || 'latest', 65 | }); 66 | } else { 67 | log.disableProgress(); 68 | log.resume(); 69 | log.error('invalid package', `${dep}: ${dependencies[dep]}`); 70 | log.error('not ok'); 71 | process.exit(1); 72 | } 73 | } 74 | 75 | return deps; 76 | }; 77 | -------------------------------------------------------------------------------- /src/functions/parsePackageString.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const semver = require('semver'); 4 | const npmValidate = require('validate-npm-package-name'); 5 | 6 | module.exports = (pkg) => { 7 | if (/^(gitlab:|gl:)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i.test(pkg)) { 8 | const match = pkg.match(/^(gitlab:|gl:)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i); 9 | return { 10 | type: 'gitlab', 11 | owner: match[2], 12 | repo: match[3], 13 | ref: match[6] || 'master', 14 | }; 15 | } else if (/^(bitbucket:|bb:)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i.test(pkg)) { 16 | const match = pkg.match(/^(bitbucket:|bb:)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i); 17 | return { 18 | type: 'bitbucket', 19 | owner: match[2], 20 | repo: match[3], 21 | ref: match[6] || 'master', 22 | }; 23 | } else if (/^(github:|gh:|)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i.test(pkg)) { 24 | const match = pkg.match(/^(github:|gh:|)([^#@\s]+)\/([^#@\s]+)((#|@)(.+))?$/i); 25 | return { 26 | type: 'github', 27 | owner: match[2], 28 | repo: match[3], 29 | ref: match[6] || 'master', 30 | }; 31 | } else if (/^npm:([^/@]+?)(@([^/]+))?$/i.test(pkg) && npmValidate( 32 | pkg.match(/^npm:([^/@]+?)(@([^/]+))?$/i)[1]).validForOldPackages) { 33 | const match = pkg.match(/^npm:([^/@]+?)(@([^/]+))?$/i); 34 | if (semver.validRange(match[3])) { 35 | return { 36 | type: 'npm', 37 | name: match[1], 38 | version: match[3], 39 | }; 40 | } 41 | return { 42 | type: 'npm', 43 | name: match[1], 44 | tag: match[3] || 'latest', 45 | }; 46 | } else if (/^([^/@]+?)(@([^/]+))?$/i.test(pkg) && npmValidate( 47 | pkg.match(/^([^/@]+?)(@([^/]+))?$/i)[1]).validForOldPackages) { 48 | const match = pkg.match(/^([^/@]+?)(@([^/]+))?$/i); 49 | if (semver.validRange(match[3])) { 50 | return { 51 | type: 'diamond', 52 | name: match[1], 53 | version: match[3], 54 | }; 55 | } 56 | return { 57 | type: 'diamond', 58 | name: match[1], 59 | tag: match[3] || 'latest', 60 | }; 61 | } 62 | 63 | return null; 64 | }; 65 | -------------------------------------------------------------------------------- /src/importers/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const unify = require('unifycss'); 4 | const fs = require('fs-extra'); 5 | const path = require('path'); 6 | const lockfile = require('proper-lockfile'); 7 | 8 | const plugin = new unify.PluginManager(); 9 | 10 | const regex = { 11 | less: /\.less$/, 12 | sass: /\.sass|\.scss$/, 13 | stylus: /\.styl$/, 14 | }; 15 | 16 | function packagePath(pkg) { 17 | if (pkg.current) return ''; 18 | return path.join('diamond/packages', pkg.path); 19 | } 20 | 21 | class Importer extends unify.ImportController { 22 | supports(name) { 23 | return /^~([^\s/]+)(.*)$/.test(name); 24 | } 25 | 26 | handler(lang, filename, cd) { 27 | fs.ensureDirSync('./diamond/.staging'); 28 | fs.ensureDirSync('./diamond/packages'); 29 | fs.ensureFileSync('./diamond/.internal/packages.lock'); 30 | 31 | const release = lockfile.lockSync('./diamond/.internal/packages.lock'); 32 | 33 | let packages; 34 | 35 | try { 36 | packages = JSON.parse(fs.readFileSync('./diamond/.internal/packages.lock')); 37 | } catch (err) { 38 | packages = []; 39 | } 40 | 41 | let current; 42 | try { 43 | current = JSON.parse(fs.readFileSync('./diamond.json')); 44 | } catch (err) { 45 | try { 46 | current = JSON.parse(fs.readFileSync('./package.json')); 47 | } catch (_) { 48 | current = {}; 49 | } 50 | } 51 | 52 | if (current.name) { 53 | packages.push({ 54 | name: current.name, 55 | current: true, 56 | version: current.version, 57 | main: current.diamond || current.sass || current.less || (current.main && !current.main.endsWith('.js') ? current.main : current.style), 58 | }); 59 | } 60 | 61 | if (!packages.length) { 62 | release(); 63 | return Promise.reject(new Error('no packages installed')); 64 | } 65 | 66 | const match = filename.match(/^~([^\s/]+)(.*)$/); 67 | 68 | let pkg; 69 | if (/^packages\/([^/]+).+/.test(path.relative(__dirname, cd))) { 70 | pkg = packages.find((p) => { 71 | const currentPkg = path.relative(__dirname, cd).match(/^packages\/([^/]+).+/)[1]; 72 | return p.path === `${currentPkg}/diamond/packages/${match[1]}`; 73 | }) || packages.find(p => p.path === match[1]); 74 | } else { 75 | pkg = packages.find(p => p.path === match[1]) || 76 | packages.find(p => p.current && p.name === match[1]); 77 | } 78 | 79 | if (!pkg) { 80 | release(); 81 | return Promise.reject(new Error(`could not find package '${match[1]}'`)); 82 | } 83 | 84 | let p; 85 | if (match[2]) { 86 | release(); 87 | try { 88 | fs.accessSync(path.join(process.cwd(), packagePath(pkg), match[2])); 89 | } catch (err) { 90 | return Promise.reject(new Error(`could not find file '${path.join(match[1], match[2])}'`)); 91 | } 92 | 93 | p = path.join(process.cwd(), packagePath(pkg), match[2]); 94 | } else if (pkg.main) { 95 | release(); 96 | try { 97 | fs.accessSync(path.join(process.cwd(), packagePath(pkg), pkg.main)); 98 | } catch (err) { 99 | return Promise.reject(new Error(`could not find file '${path.join(match[1], pkg.main)}' this is likely a problem with the package itself`)); 100 | } 101 | 102 | if (regex[lang].test(pkg.main) || (/\.css/.test(pkg.main) && lang === 'less')) { 103 | p = path.join(process.cwd(), packagePath(pkg), pkg.main); 104 | } else { 105 | let ext = 'css'; 106 | if (lang === 'sass') ext = 'scss'; 107 | else if (lang === 'stylus') ext = 'styl'; 108 | 109 | try { 110 | fs.accessSync(path.join(process.cwd(), packagePath(pkg), 'diamond/dist', `main.${ext}`)); 111 | } catch (err) { 112 | return Promise.reject(new Error('could not find dist files, try reinstalling')); 113 | } 114 | 115 | p = path.join(process.cwd(), packagePath(pkg), 'diamond/dist', `main.${ext}`); 116 | } 117 | } else { 118 | release(); 119 | return Promise.reject(new Error('the package has no mainfile! you need to import files from this package manually')); 120 | } 121 | 122 | return p; 123 | } 124 | } 125 | 126 | plugin.add(new Importer()); 127 | 128 | module.exports = plugin; 129 | -------------------------------------------------------------------------------- /src/misc/userAgent.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const diamondVersion = require('../../package.json').version; 4 | const superagentVersion = require('superagent/package.json').version; 5 | 6 | module.exports = { 7 | superagent: { 8 | 'User-Agent': `diamond/v${diamondVersion} superagent/${superagentVersion} node/${process.version}`, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /src/views/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Error 6 | 7 | 82 | 83 | 84 | 89 | 90 |
91 | 92 | 93 | 94 | 95 | 96 |

{{error}}

97 |
98 | 99 | -------------------------------------------------------------------------------- /src/views/success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Authorized 6 | 7 | 82 | 83 | 84 | 89 | 90 |
91 | 92 | 93 | 94 | 95 |

Authorized

96 |
97 | 98 | -------------------------------------------------------------------------------- /test/npm.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Exit on errors 4 | set -e 5 | 6 | if [ "$TRAVIS_NODE_VERSION" == "4" ]; then 7 | printf "Installing Latest npm\n" 8 | npm i -g npm 9 | printf "npm Version: " 10 | npm -v 11 | printf "\n\n" 12 | fi -------------------------------------------------------------------------------- /test/sierra-github/test.less: -------------------------------------------------------------------------------- 1 | @import "~sierra"; 2 | 3 | #foo { 4 | color: #fff; 5 | } -------------------------------------------------------------------------------- /test/sierra-github/test.sass: -------------------------------------------------------------------------------- 1 | @import "~sierra" 2 | 3 | #foo 4 | color: #fff 5 | -------------------------------------------------------------------------------- /test/sierra-github/test.styl: -------------------------------------------------------------------------------- 1 | @import import('~sierra'); 2 | 3 | #foo { 4 | color: #fff; 5 | } -------------------------------------------------------------------------------- /test/sierra-npm/test.css: -------------------------------------------------------------------------------- 1 | .visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.tags :after{clear:both;content:'';display:table}.full-width{margin-left:-15px;margin-right:-15px;width:auto}abbr,address,article,aside,audio,b,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,ins,kbd,label,legend,li,mark,menu,nav,object,ol,p,pre,q,samp,section,small,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,time,tr,ul,var,video{background:transparent;border:0;font-size:100%;margin:0;outline:0;padding:0;vertical-align:baseline}article,aside,figure,footer,header,main,nav,section{display:block}*,:after,:before{box-sizing:border-box;outline:none}body{background-color:#2c3e50;min-height:100%;overflow-x:hidden;position:relative}body,p{font-weight:400}img{max-width:100%}strong{font-weight:600}ul{margin-bottom:1em}li{list-style:none;margin-bottom:.5em}pre{margin-bottom:2em!important}.background-primary{background-color:#1abc9c}.background-dark{background-color:#18232f}.background-secondary{background-color:#9b59b6}.background-white{background-color:#fff}.background-success{background-color:#4caf50}.background-info{background-color:#5bc0de}.background-warning{background-color:#f0ad4e}.background-error{background-color:#e74c3c}.background-gray{background-color:#dee6ea}.background-gray-light{background-color:#edf3f6}.background-rating1{background-color:#dd2c00}.background-rating2{background-color:#ff5722}.background-rating3{background-color:#ff9800}.background-rating4{background-color:#ffc107}.background-rating5{background-color:#f5dc00}.background-rating6{background-color:#cddc39}.background-rating7{background-color:#8bc34a}.background-rating8{background-color:#4caf50}.background-rating9{background-color:#43a047}.background-rating10{background-color:#388e3c}.badges-list{margin-bottom:20px}.badges-list-item{background-color:#34495e;border-radius:3px;color:#fff;display:inline-block;line-height:1.2em;padding:.2em .7em}.badge-rounded{border-radius:50px}.badge-lg{font-size:1.3em}.badge-xs{font-size:.7em}.badge-primary{background-color:#1abc9c}.badge-secondary{background-color:#9b59b6}.badge-dark{background-color:#18232f}.badge-gray{background-color:#dee6ea}.badge-success{background-color:#4caf50}.badge-error{background-color:#e74c3c}.badge-warning{background-color:#f0ad4e}button{background-color:transparent;border:0;cursor:pointer}.button{background-color:#64829f;border:1px solid #2c3e50;border-radius:2em;display:inline-block;font-family:Lato,sans-serif;font-size:12px;font-weight:700;line-height:1.5em;margin:10px;padding:10px 20px;text-align:center;text-decoration:none;text-transform:uppercase;transition:opacity .2s ease-in-out;white-space:nowrap}.button,.button:active,.button:focus,.button:hover{color:#fff}.button:hover{cursor:pointer;opacity:.8;text-decoration:none}.button:active{opacity:1}.button:first-child{margin-left:0}.button:last-child{margin-right:0}.button.button-big{border-radius:2em;font-size:16px;line-height:1.5em;padding:10px 30px}.button.button-small{border-radius:2em;font-size:11px;line-height:1.273em;padding:6px 20px}.button.button-huge{border-radius:2em;font-size:16px;line-height:1.5em;padding:15px 30px}.button.button-huge i{font-size:20px}.button.button-large{display:block;margin-left:auto;margin-right:auto;max-width:400px;width:100%}.button.button-primary{background-color:#1abc9c;border:1px solid #1abc9c;color:#fff}.button.button-primary:hover{color:#fff}.button.button-secondary{background-color:#9b59b6;border:1px solid #9b59b6;color:#fff}.button.button-secondary:hover{color:#fff}.button.button-transparent{background-color:transparent;border:1px solid transparent}.button.button-white{background-color:#fff;border:1px solid #fff;color:#1abc9c}.button.button-green{background-color:#4caf50;border-color:#4caf50;color:#fff}.button.button-red{background-color:#e74c3c;border-color:#e74c3c;color:#fff}.button.button-outlined{background-color:transparent;border:1px solid #1abc9c;color:#1abc9c}.button.button-disabled{cursor:default;opacity:.4}.button.button-only-icon{height:43px;line-height:43px;padding:0;width:43px}.button.button-only-icon i{margin-left:0;margin-right:0}.button i{margin-bottom:-2%;margin-left:.8em;margin-right:.8em;position:relative;transition:all .3s ease}.button i:last-child{margin-right:0}.button i:first-child{margin-left:0}.button i:before{float:left}.button i.fa-lg{margin-bottom:0}.button-link{color:#1abc9c;font-family:Lato,sans-serif;font-size:12px;font-weight:700;text-transform:uppercase}.button-link i{font-size:18px;line-height:14px;margin-bottom:-2px;margin-left:4px;margin-right:8px;transition:all .3s ease}.button-link i:before{float:left}.button-link.button-link-rotated i{transform:rotate(-180deg)}.button-group{white-space:nowrap}.button-group .button{display:inline-block;margin:0}.button-group .button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group .button:not(:last-child){border-bottom-right-radius:0;border-right:0;border-top-right-radius:0}input,textarea{appearance:none}label{display:block;font-weight:400}input:-webkit-autofill{box-shadow:inset 0 0 0 1000px #34495e}select{-moz-appearance:window;-webkit-appearance:none}input[type=text],select,textarea{border-radius:3px;font-size:14px;line-height:1.5em;transition:background-color .2s ease-in-out}.input,.select,.textarea{border:0;border:1px solid #465f78;border-radius:3px;box-shadow:none;display:block;font-weight:400;margin-bottom:20px}.input :focus,.select :focus,.textarea :focus{outline:none}.input.error,.select.error,.textarea.error{border:1px solid #e74c3c;margin-bottom:0}.input.small,.select.small,.textarea.small{font-size:13px;padding:4px 6px}.has-error .input,.has-error .select,.has-error .textarea{border:1px solid #1abc9c}.has-error .control-label{color:#1abc9c}label.error{color:#e74c3c;font-size:13px;line-height:13px;position:absolute;right:0;top:-16px}input[type=checkbox]{appearance:checkbox}input[type=radio]{appearance:radio}.select{background-color:#34495e;display:inline-block;margin-right:10px;padding:0;position:relative}.select.full-width{display:inline-block;margin-left:0;margin-right:0;width:100%}.select:last-child{margin-right:0}.select .fa-angle-down{color:#969da6;font-size:25px;margin-top:-12px}.select .fa-angle-down,.select .icon-angle-down{height:30px;position:absolute;right:10px;top:50%;z-index:1}.select .icon-angle-down{color:#1abc9c;font-size:1.2em;margin-top:-10px}.select select{appearance:none;background-color:transparent;border:0;color:#fff;height:44px;margin-right:20px;padding-left:10px;padding-right:30px;position:relative;width:100%;z-index:2}.select select:active,.select select:focus{background-color:#3d566e;border:0;outline:none}.select select:active+i,.select select:focus+i{z-index:2}.select select option{background-color:#34495e;color:#fff;height:30px}.select.select-small{max-width:150px}.select.select-small select{font-size:14px!important;height:24px;line-height:24px;padding:0 5px;padding-right:27px}select::-ms-expand{display:none}.select-link{border:0;color:#1abc9c}.textarea{background-color:#34495e;padding:0;width:100%}.textarea textarea{background:transparent;border:0;color:#fff;display:block;font-family:Lato,sans-serif;padding:10px 15px;width:100%}.textarea textarea:active,.textarea textarea:focus{border:0;outline:none;background-color:#3d566e}textarea{min-height:120px}.form-button-wrap{text-align:center}.checkbox,.radio{margin:0;margin-bottom:5px;margin-right:20px;padding-left:25px;position:relative}input[type=checkbox]+label,input[type=radio]+label{display:block;overflow:hidden;padding-left:5px;text-overflow:ellipsis;white-space:nowrap}input[type=checkbox],input[type=radio]{display:none}input[type=checkbox]+label:after,input[type=checkbox]+label:before,input[type=radio]+label:after,input[type=radio]+label:before{display:block;position:absolute;font-size:14px;height:18px;line-height:18px;margin-top:-9px;top:50%;width:18px;left:0}input[type=checkbox]+label:after,input[type=radio]+label:after{background-color:#34495e;border:1px solid #465f78;border-radius:3px;content:''}input[type=radio]+label:after{border-radius:99px}input[type=checkbox]+label:before{content:"\f00c";font-family:FontAwesome;left:2px;top:11px;transform:scale(0);z-index:1}input[type=radio]+label:before{background-color:#1abc9c;border-radius:99px;content:'';display:block;height:8px;left:5px;margin-top:-4px;top:50%;transform:scale(0);width:8px;z-index:1}input[type=checkbox]:checked+label,input[type=radio]:checked+label{color:#1abc9c}input[type=checkbox]:checked+label:before,input[type=radio]:checked+label:before{animation:a .25s;color:#1abc9c;transform:scale(1)}@keyframes a{0%{transform:scale(0)}50%{transform:scale(1.5)}to{transform:scale(1)}}.input{background-color:#34495e;display:inline-block;margin-right:10px;padding:0;position:relative}.input :active,.input :focus{background-color:#3d566e}.input.full-width{display:inline-block;margin-left:0;margin-right:0;width:100%}.input input{background:transparent;border:0;box-shadow:none;color:#fff;height:44px;line-height:44px;margin-bottom:0;outline:none;padding-left:10px;padding-right:10px;width:100%}.input-with-icon{position:relative}.input-with-icon input{padding-right:42px}.input-with-icon .input-icon{color:#969da6;margin-top:-6px;position:absolute;right:12px;top:50%}.input-with-icon .input-icon.fa-search{color:#1abc9c;margin-top:-7px}.input-with-icon button.input-icon{background:none;border:0;cursor:pointer;padding:0}.input-icon input{padding:0;width:0}.input-icon i{padding:14px 15px 14px 12px}.input-group{margin-bottom:20px}.input-group .input,.input-group .select,.input-group .textarea{margin-bottom:0}.form-group{background-color:#34495e;border:1px solid #465f78;border-radius:3px;display:inline-block;margin-bottom:20px}.form-group .input,.form-group .select,.form-group .textarea{margin-bottom:0}.form-group .form-group-item{border:0;border-radius:0;margin-right:0}.form-group .form-group-item:last-child{border-right:0}.form-row{margin-left:-3px!important;margin-right:-3px!important}.form-row div[class^=col]{padding-left:3px;padding-right:3px}.form-collapse{display:flex;margin-bottom:20px}.form-collapse .item-main{flex:1}.form-collapse .item{border-radius:0;font-size:15px;margin:0}.form-collapse .item:first-child{border-bottom-left-radius:3px;border-top-left-radius:3px}.form-collapse .item:last-child{border-bottom-right-radius:3px;border-top-right-radius:3px}.form-collapse .item:not(:last-child){border-right:0}.aligner{display:flex}.aligner-space-between{display:flex;justify-content:space-between;width:100%}.aligner-space-around{display:flex;justify-content:space-around;width:100%}.aligner-center-vertical{align-items:center;display:flex}.aligner-center-horitzontal{display:flex;justify-content:center}.content-start{display:flex;justify-content:flex-start}.content-end{display:flex;justify-content:flex-end}.aligner-item-top{align-self:flex-start}.aligner-item-bottom{align-self:flex-end}.flex-grow{flex-grow:1}.fleft{float:left}.fright{float:right}.cf:after,.cf:before{content:'';display:table}.cf:after{clear:both}.align-center{text-align:center}.align-right{text-align:right}.align-left{text-align:left}.align-bottom{vertical-align:bottom}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.ellipsis,.ellipsis-block{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ellipsis-block{display:block}.word-break{word-break:break-all}.text-indent{padding-left:24px}.bordered{border:1px solid #465f78}.border-bottom{border-bottom:1px solid #465f78}.border-left{border-left:1px solid #465f78}.border-right{border-right:1px solid #465f78}.border-top{border-top:1px solid #465f78}.display-block{display:block}.display-inline{display:inline}.hidden{display:none}.no-margin{margin:0!important}.no-wrap{white-space:nowrap}.overflow-hidden{overflow:hidden}.opacity-low{opacity:.5}.icon-rounded,.rounded-corners{border-radius:15%}.rounded{border-radius:100%}.hide-small{display:none}.hide-small-inline-block{display:none!important}.hide-medium{display:block}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.section{padding-bottom:20px;padding-top:20px}.section:after,.section:before{content:'';display:table}.section:after{clear:both}.container{max-width:1380px;width:100%}.container,.container-medium{margin:0 auto;padding-left:15px;padding-right:15px}.container-medium{max-width:944px}.container-small{margin:0 auto;max-width:400px;padding-left:15px;padding-right:15px}.separator{border-bottom:1px solid #465f78}.main-wrap{transition:padding .25s ease-in-out}.main-content,.main-wrap{overflow:hidden;position:relative}.main-content{float:right;margin-left:0;width:100%}.main-content:after,.main-content:before{clear:none}.loading-bar{height:4px;left:0;overflow:hidden;position:fixed;right:0;top:0;width:100%;z-index:3}.loading-bar:before{animation:b 2s linear infinite;background-color:#1abc9c;content:'';display:block;height:4px;left:-200px;position:absolute;width:200px}@keyframes b{0%{left:-200px}0%,50%{width:30%}70%{width:70%}80%{left:50%}95%{left:120%}to{left:100%}}.loading-spinner{animation:c 4s infinite;animation-timing-function:ease-in-out;display:block;height:30px;left:50%;margin-left:-15px;margin-top:-15px;position:fixed;top:50%;width:30px;z-index:3}.loading-spinner span{animation-timing-function:ease-in-out;background-color:#fff;border-radius:100%;display:block;height:9px;position:absolute;width:9px}.loading-spinner span:nth-child(1){animation:d 1s infinite;left:0;top:0;transform:translate3d(5px,5px,0)}.loading-spinner span:nth-child(2){animation:e 1s infinite;right:0;top:0}.loading-spinner span:nth-child(3){animation:f 1s infinite;bottom:0;right:0}.loading-spinner span:nth-child(4){animation:g 1s infinite;bottom:0;left:0}.loading-spinner.is-relative{display:inline-block;left:auto;margin:0;position:relative;top:auto;z-index:1}@keyframes c{0%{transform:rotate(0)}25%{transform:rotate(90deg)}50%{transform:rotate(180deg)}75%{transform:rotate(270deg)}to{transform:rotate(1turn)}}@keyframes d{0%{transform:translateZ(0)}50%{transform:translate3d(4px,4px,0)}to{transform:translateZ(0)}}@keyframes e{0%{transform:translateZ(0)}50%{transform:translate3d(-4px,4px,0)}to{transform:translateZ(0)}}@keyframes f{0%{transform:translateZ(0)}50%{transform:translate3d(-4px,-4px,0)}to{transform:translateZ(0)}}@keyframes g{0%{transform:translateZ(0)}50%{transform:translate3d(4px,-4px,0)}to{transform:translateZ(0)}}.message-bar{border-radius:3px;margin-bottom:1em;padding:1em}.message-bar p:last-child{margin-bottom:0}.paginator-list .paginator-list-item{margin-right:5px;padding:0;display:inline-block}.paginator-list .paginator-list-item:first-child i{margin-right:.5em}.paginator-list .paginator-list-item:last-child i{margin-left:.5em}.paginator-list .paginator-list-item .paginator-list-link{background-color:#34495e;border:1px solid #2c3e50;border-radius:3px;color:#fff;display:block;padding:.5em 1em;transition:background-color .2s ease-in-out}.paginator-list .paginator-list-item .paginator-list-link:hover{background-color:#46637f}.paginator-list .paginator-list-item .paginator-list-link.active{background-color:#1abc9c;color:#fff}.paginator-list.paginator-compact{display:flex}.paginator-list.paginator-compact .paginator-list-item{margin-right:0}.paginator-list.paginator-compact .paginator-list-item:not(:last-child){border-right:1px solid #2c3e50}.paginator-list.paginator-compact .paginator-list-item .paginator-list-link{border-radius:0}.paginator-list.paginator-compact .paginator-list-item:first-child .paginator-list-link{border-bottom-left-radius:3px;border-top-left-radius:3px}.paginator-list.paginator-compact .paginator-list-item:last-child .paginator-list-link{border-bottom-right-radius:3px;border-top-right-radius:3px}.paginator-list.paginator-center{justify-content:center;text-align:center}.rating-circle{background-color:#d7d7d7;border-radius:50%;display:inline-block;height:100px;margin:0 auto;overflow:hidden;position:relative;width:100px}.rating-circle.rating-color-1{color:#dd2c00}.rating-circle.rating-color-1 .circle-fill{background-color:#dd2c00}.rating-circle.rating-color-2{color:#ff5722}.rating-circle.rating-color-2 .circle-fill{background-color:#ff5722}.rating-circle.rating-color-3{color:#ff9800}.rating-circle.rating-color-3 .circle-fill{background-color:#ff9800}.rating-circle.rating-color-4{color:#ffc107}.rating-circle.rating-color-4 .circle-fill{background-color:#ffc107}.rating-circle.rating-color-5{color:#f5dc00}.rating-circle.rating-color-5 .circle-fill{background-color:#f5dc00}.rating-circle.rating-color-6{color:#cddc39}.rating-circle.rating-color-6 .circle-fill{background-color:#cddc39}.rating-circle.rating-color-7{color:#8bc34a}.rating-circle.rating-color-7 .circle-fill{background-color:#8bc34a}.rating-circle.rating-color-8{color:#4caf50}.rating-circle.rating-color-8 .circle-fill{background-color:#4caf50}.rating-circle.rating-color-9{color:#43a047}.rating-circle.rating-color-9 .circle-fill{background-color:#43a047}.rating-circle.rating-color-10{color:#388e3c}.rating-circle.rating-color-10 .circle-fill{background-color:#388e3c}.rating-circle .circle .circle-fill,.rating-circle .circle .circle-mask{border-radius:50%;height:100px;position:absolute;transition:all 1s;width:100px;backface-visibility:hidden}.rating-circle .circle .circle-fill.reanimate,.rating-circle .circle .circle-mask.reanimate{transition:transform 0s}.rating-circle .circle .circle-fill.reset,.rating-circle .circle .circle-mask.reset{transform:rotate(0deg)!important}.rating-circle .circle .circle-mask{clip:rect(0,100px,100px,50px);overflow:hidden}.rating-circle .circle .circle-mask .circle-fill{clip:rect(0,50px,100px,0)}.rating-circle .circle-inset{background-color:#34495e;border-radius:50%;height:94px;left:50%;margin-left:-47px;margin-top:-47px;position:absolute;text-align:center;top:50%;width:94px}.rating-circle .circle-inset .circle-rating-number{font-size:36px;font-weight:400;line-height:94px}.rating-circle.circle-small,.rating-circle.circle-small .circle .circle-fill,.rating-circle.circle-small .circle .circle-mask{width:80px;height:80px}.rating-circle.circle-small .circle-mask{clip:rect(0,80px,80px,40px)}.rating-circle.circle-small .circle-mask .circle-fill{clip:rect(0,40px,80px,0)}.rating-circle.circle-small .circle-inset{border-radius:50%;height:74px;left:50%;margin-left:-37px;margin-top:-37px;position:absolute;text-align:center;top:50%;width:74px}.rating-circle.circle-small .circle-inset .circle-rating-number{font-size:24px;font-weight:400;left:0;line-height:74px;margin:0!important;position:absolute;top:0;width:74px}.rating-color-1 .circle-fill,.rating-color-1 .circle-full{transform:rotate(18deg)}.rating-color-2 .circle-fill,.rating-color-2 .circle-full{transform:rotate(36deg)}.rating-color-3 .circle-fill,.rating-color-3 .circle-full{transform:rotate(54deg)}.rating-color-4 .circle-fill,.rating-color-4 .circle-full{transform:rotate(72deg)}.rating-color-5 .circle-fill,.rating-color-5 .circle-full{transform:rotate(90deg)}.rating-color-6 .circle-fill,.rating-color-6 .circle-full{transform:rotate(108deg)}.rating-color-7 .circle-fill,.rating-color-7 .circle-full{transform:rotate(126deg)}.rating-color-8 .circle-fill,.rating-color-8 .circle-full{transform:rotate(144deg)}.rating-color-9 .circle-fill,.rating-color-9 .circle-full{transform:rotate(162deg)}.rating-color-10 .circle-fill,.rating-color-10 .circle-full{transform:rotate(180deg)}.table{background-color:#34495e;border:1px solid #465f78;border-collapse:collapse;border-radius:3px;color:#fff;margin-bottom:20px;max-width:100%;width:100%}.table td,.table th{border-bottom:1px solid #465f78;padding:10px}.table td{padding:14px;position:relative}.table thead,.table tr{border-bottom:1px solid #465f78}.table th{background-color:#2c3e50;color:#969da6;font-weight:400;padding:5px 14px;white-space:nowrap}.table-vertical-center td{vertical-align:middle}.table-responsive th{display:none}.table-responsive td{display:block}.table-responsive td:first-child{border-top:1px solid #465f78;padding-top:14px}.table-responsive td:last-child{padding-bottom:14px}.table-responsive td:before{content:attr(data-th) ": ";display:block;font-weight:400}.table-responsive td,.table-responsive th{text-align:left}.table-responsive.table-break-medium tr{border-top:1px solid #465f78}.table-responsive.table-break-medium td:last-child{padding-bottom:14px}.table-responsive.table-break-small tr{border-top:1px solid #465f78}.table-responsive.table-break-small td:last-child{padding-bottom:14px}.tabs{border-bottom:1px solid #465f78;margin-bottom:30px;text-align:center}.tabs .tab{border-bottom:3px solid transparent;color:#969da6;display:inline-block;line-height:50px;margin:0;margin-right:30px;min-width:70px;position:relative}.tabs .tab:hover{color:#1abc9c;text-decoration:none}.tabs .tab.active{border-bottom:3px solid #1abc9c;color:#1abc9c}.tab-content{display:none}.tab-content.selected{display:block}.tags{margin-bottom:20px}.tags:last-child{margin-bottom:0}.tags li{margin:0 25px 10px 0}.tags .tag,.tags li{display:inline-block}.tags .tag{background-color:#34495e;border-radius:3px 0 0 3px;color:#fff;float:left;line-height:34px;padding:0 10px;position:relative}.tags .tag:before{border-bottom:17px solid transparent;border-left:10px solid #34495e;border-top:17px solid transparent;content:'';height:0;position:absolute;right:-10px;top:0;width:0}.tags .tag:after{background:#2c3e50;border-radius:6px;content:'';float:left;height:5px;position:absolute;right:-3px;top:14px;width:5px}.tags a.tag{color:#fff;display:inline-block;text-decoration:none}.tags a.tag:hover{background-color:#46637f;text-decoration:none}.tags a.tag:hover:before{border-left:10px solid #46637f}body{font:400 14px/1.5em Lato,sans-serif;color:#fff}img{font-size:12px;line-height:1.3em}p{line-height:1.5em;margin-bottom:1.5em}a{color:#1abc9c;text-decoration:none}a:hover{color:rgba(26,188,156,.8)}a:focus{color:#1abc9c}.text-big,.text-huge,.text-medium,.text-small,label.label{line-height:1.3em;margin-bottom:1em;margin-top:1.5em}.text-big:first-child,.text-huge:first-child,.text-medium:first-child,.text-small:first-child,label.label:first-child{margin-top:.5em}.text-huge{font-size:30px}.text-big,.text-huge{font-family:Lato,sans-serif;font-weight:300;text-transform:none}.text-big{font-size:24px}.text-medium{font-family:Lato,sans-serif;font-size:20px;font-weight:300;text-transform:none}.text-small,label.label{font-size:12px}.text-body{font-size:14px;line-height:1.5em}.text-primary{color:#1abc9c}.text-dark{color:#18232f}.text-secondary{color:#9b59b6}.text-success{color:#4caf50}.text-info{color:#5bc0de}.text-warning{color:#f0ad4e}.text-error{color:#e74c3c}.table-responsive td:before,.text-gray,label.label{color:#dee6ea}.text-gray-light{color:#edf3f6}.text-rating1{color:#dd2c00}.text-rating2{color:#ff5722}.text-rating3{color:#ff9800}.text-rating4{color:#ffc107}.text-rating5{color:#f5dc00}.text-rating6{color:#cddc39}.text-rating7{color:#8bc34a}.text-rating8{color:#4caf50}.text-rating9{color:#43a047}.text-rating10{color:#388e3c}.text-white{color:#fff}.table-responsive td:before,.text-gray,a.text-gray,button.text-gray,label.label{color:#969da6}.text-light{font-weight:300}.text-normal{font-weight:400}.text-line-through{text-decoration:line-through}.text-italic{font-style:italic}.text-uppercase{text-transform:uppercase}.text-transform-none{text-transform:none}.text-center{text-align:center}.text-lato{font-family:Lato,sans-serif}.text-with-subtitle{margin-bottom:0!important}.text-with-subtitle+.text-big,.text-with-subtitle+.text-huge,.text-with-subtitle+.text-medium,.text-with-subtitle+.text-small,.text-with-subtitle+label.label{margin-top:.5em}h1,h2,h3,h4{font-weight:300}.container{margin-right:auto;margin-left:auto}.container:after,.container:before{content:'';display:table}.container:after{clear:both}.container-fluid{margin-right:auto;margin-left:auto}.container-fluid:after,.container-fluid:before{content:'';display:table}.container-fluid:after{clear:both}.row{margin-left:-15px;margin-right:-15px}.row:after,.row:before{content:'';display:table}.row:after{clear:both}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-1{width:8.33333%}.col-xs-2{width:16.66667%}.col-xs-3{width:25%}.col-xs-4{width:33.33333%}.col-xs-5{width:41.66667%}.col-xs-6{width:50%}.col-xs-7{width:58.33333%}.col-xs-8{width:66.66667%}.col-xs-9{width:75%}.col-xs-10{width:83.33333%}.col-xs-11{width:91.66667%}.col-xs-12{width:100%}.col-xs-pull-0{right:auto}.col-xs-pull-1{right:8.33333%}.col-xs-pull-2{right:16.66667%}.col-xs-pull-3{right:25%}.col-xs-pull-4{right:33.33333%}.col-xs-pull-5{right:41.66667%}.col-xs-pull-6{right:50%}.col-xs-pull-7{right:58.33333%}.col-xs-pull-8{right:66.66667%}.col-xs-pull-9{right:75%}.col-xs-pull-10{right:83.33333%}.col-xs-pull-11{right:91.66667%}.col-xs-pull-12{right:100%}.col-xs-push-0{left:auto}.col-xs-push-1{left:8.33333%}.col-xs-push-2{left:16.66667%}.col-xs-push-3{left:25%}.col-xs-push-4{left:33.33333%}.col-xs-push-5{left:41.66667%}.col-xs-push-6{left:50%}.col-xs-push-7{left:58.33333%}.col-xs-push-8{left:66.66667%}.col-xs-push-9{left:75%}.col-xs-push-10{left:83.33333%}.col-xs-push-11{left:91.66667%}.col-xs-push-12{left:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333%}.col-xs-offset-2{margin-left:16.66667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333%}.col-xs-offset-5{margin-left:41.66667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333%}.col-xs-offset-8{margin-left:66.66667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333%}.col-xs-offset-11{margin-left:91.66667%}.col-xs-offset-12{margin-left:100%}@media (min-width:768px){.full-width{margin-left:-30px;margin-right:-30px}input[type=text],select,textarea{font-size:15px}.select select{padding:8px 15px}.form-button-wrap{text-align:right}.input input{padding:8px 15px}.hidden-medium,.show-small{display:none}.hide-small{display:block}.hide-small-inline-block{display:inline-block!important}.hide-medium{display:none}.section{padding-bottom:40px;padding-top:40px}.container,.container-medium,.container-small{padding-left:30px;padding-right:30px}.rating-circle{margin:0;margin-left:10px}.table-responsive.table-break-medium td:before{display:none}.table-responsive.table-break-medium td,.table-responsive.table-break-medium th{display:table-cell}body{font-size:15px}.text-small,label.label{font-size:14px}.container{width:auto}.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-1{width:8.33333%}.col-sm-2{width:16.66667%}.col-sm-3{width:25%}.col-sm-4{width:33.33333%}.col-sm-5{width:41.66667%}.col-sm-6{width:50%}.col-sm-7{width:58.33333%}.col-sm-8{width:66.66667%}.col-sm-9{width:75%}.col-sm-10{width:83.33333%}.col-sm-11{width:91.66667%}.col-sm-12{width:100%}.col-sm-pull-0{right:auto}.col-sm-pull-1{right:8.33333%}.col-sm-pull-2{right:16.66667%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333%}.col-sm-pull-5{right:41.66667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.33333%}.col-sm-pull-8{right:66.66667%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333%}.col-sm-pull-11{right:91.66667%}.col-sm-pull-12{right:100%}.col-sm-push-0{left:auto}.col-sm-push-1{left:8.33333%}.col-sm-push-2{left:16.66667%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333%}.col-sm-push-5{left:41.66667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.33333%}.col-sm-push-8{left:66.66667%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333%}.col-sm-push-11{left:91.66667%}.col-sm-push-12{left:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333%}.col-sm-offset-2{margin-left:16.66667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333%}.col-sm-offset-5{margin-left:41.66667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333%}.col-sm-offset-8{margin-left:66.66667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333%}.col-sm-offset-11{margin-left:91.66667%}.col-sm-offset-12{margin-left:100%}}@media (min-width:992px){.button.button-big{padding:10px 40px}.button.button-huge{border-radius:2em;font-size:18px;line-height:1.5em;padding:18px 50px}input[type=text],select,textarea{font-size:15px}.hidden-large{display:none}.hidden-medium{display:inline-block}.hide-medium{display:block}.rating-circle,.rating-circle .circle .circle-fill,.rating-circle .circle .circle-mask{height:130px;width:130px}.rating-circle .circle .circle-mask{clip:rect(0,130px,130px,65px)}.rating-circle .circle .circle-mask .circle-fill{clip:rect(0,65px,130px,0)}.rating-circle .circle-inset{height:124px;line-height:124px;margin-left:-62px;margin-top:-62px;width:124px}.rating-circle .circle-inset .circle-rating-number{font-size:50px;line-height:124px}.table td,.table th{padding:10px 20px}body{font-size:15px}.text-huge{font-size:40px}.text-big{font-size:28px}.text-body{font-size:15px}.container{width:auto}.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-1{width:8.33333%}.col-md-2{width:16.66667%}.col-md-3{width:25%}.col-md-4{width:33.33333%}.col-md-5{width:41.66667%}.col-md-6{width:50%}.col-md-7{width:58.33333%}.col-md-8{width:66.66667%}.col-md-9{width:75%}.col-md-10{width:83.33333%}.col-md-11{width:91.66667%}.col-md-12{width:100%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.33333%}.col-md-pull-2{right:16.66667%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333%}.col-md-pull-5{right:41.66667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.33333%}.col-md-pull-8{right:66.66667%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333%}.col-md-pull-11{right:91.66667%}.col-md-pull-12{right:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.33333%}.col-md-push-2{left:16.66667%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333%}.col-md-push-5{left:41.66667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.33333%}.col-md-push-8{left:66.66667%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333%}.col-md-push-11{left:91.66667%}.col-md-push-12{left:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333%}.col-md-offset-2{margin-left:16.66667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333%}.col-md-offset-5{margin-left:41.66667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333%}.col-md-offset-8{margin-left:66.66667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333%}.col-md-offset-11{margin-left:91.66667%}.col-md-offset-12{margin-left:100%}}@media (max-width:480px){.block-mobile{display:block;margin-left:0;margin-right:0;width:100%}.table-responsive.table-break-small td{border:0;padding-bottom:0}}@media (min-width:1280px){.hidden-large{display:inline-block}.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}.main-wrap{padding-left:250px}.text-huge{font-size:48px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-1{width:8.33333%}.col-lg-2{width:16.66667%}.col-lg-3{width:25%}.col-lg-4{width:33.33333%}.col-lg-5{width:41.66667%}.col-lg-6{width:50%}.col-lg-7{width:58.33333%}.col-lg-8{width:66.66667%}.col-lg-9{width:75%}.col-lg-10{width:83.33333%}.col-lg-11{width:91.66667%}.col-lg-12{width:100%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.33333%}.col-lg-pull-2{right:16.66667%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333%}.col-lg-pull-5{right:41.66667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.33333%}.col-lg-pull-8{right:66.66667%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333%}.col-lg-pull-11{right:91.66667%}.col-lg-pull-12{right:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.33333%}.col-lg-push-2{left:16.66667%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333%}.col-lg-push-5{left:41.66667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.33333%}.col-lg-push-8{left:66.66667%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333%}.col-lg-push-11{left:91.66667%}.col-lg-push-12{left:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333%}.col-lg-offset-2{margin-left:16.66667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333%}.col-lg-offset-5{margin-left:41.66667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333%}.col-lg-offset-8{margin-left:66.66667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333%}.col-lg-offset-11{margin-left:91.66667%}.col-lg-offset-12{margin-left:100%}}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1279px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}.hidden-md{display:none!important}}@media (max-width:768px){.table-responsive.table-break-medium td{border:0;padding-bottom:0}}@media (min-width:480px){.table-responsive.table-break-small td:before{display:none}.table-responsive.table-break-small td,.table-responsive.table-break-small th{display:table-cell}} -------------------------------------------------------------------------------- /test/sierra-npm/test.less: -------------------------------------------------------------------------------- 1 | @import "~sierra-library"; 2 | 3 | #foo { 4 | color: #fff; 5 | } -------------------------------------------------------------------------------- /test/sierra-npm/test.sass: -------------------------------------------------------------------------------- 1 | @import "~sierra-library" 2 | 3 | #foo 4 | color: #fff 5 | -------------------------------------------------------------------------------- /test/sierra-npm/test.sass.css: -------------------------------------------------------------------------------- 1 | .visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { 2 | clip: auto; 3 | height: auto; 4 | margin: 0; 5 | overflow: visible; 6 | position: static; 7 | width: auto; } 8 | 9 | .tags :after { 10 | clear: both; 11 | content: ''; 12 | display: table; } 13 | 14 | .full-width { 15 | margin-left: -15px; 16 | margin-right: -15px; 17 | width: auto; } 18 | 19 | abbr, address, article, aside, audio, b, blockquote, body, caption, cite, code, dd, del, dfn, div, dl, dt, em, fieldset, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, ins, kbd, label, legend, li, mark, menu, nav, object, ol, p, pre, q, samp, section, small, span, strong, sub, sup, table, tbody, td, tfoot, th, thead, time, tr, ul, var, video { 20 | background: transparent; 21 | border: 0; 22 | font-size: 100%; 23 | margin: 0; 24 | outline: 0; 25 | padding: 0; 26 | vertical-align: baseline; } 27 | 28 | article, aside, figure, footer, header, main, nav, section { 29 | display: block; } 30 | 31 | *, :after, :before { 32 | box-sizing: border-box; 33 | outline: none; } 34 | 35 | body { 36 | background-color: #2c3e50; 37 | min-height: 100%; 38 | overflow-x: hidden; 39 | position: relative; } 40 | 41 | body, p { 42 | font-weight: 400; } 43 | 44 | img { 45 | max-width: 100%; } 46 | 47 | strong { 48 | font-weight: 600; } 49 | 50 | ul { 51 | margin-bottom: 1em; } 52 | 53 | li { 54 | list-style: none; 55 | margin-bottom: .5em; } 56 | 57 | pre { 58 | margin-bottom: 2em !important; } 59 | 60 | .background-primary { 61 | background-color: #1abc9c; } 62 | 63 | .background-dark { 64 | background-color: #18232f; } 65 | 66 | .background-secondary { 67 | background-color: #9b59b6; } 68 | 69 | .background-white { 70 | background-color: #fff; } 71 | 72 | .background-success { 73 | background-color: #4caf50; } 74 | 75 | .background-info { 76 | background-color: #5bc0de; } 77 | 78 | .background-warning { 79 | background-color: #f0ad4e; } 80 | 81 | .background-error { 82 | background-color: #e74c3c; } 83 | 84 | .background-gray { 85 | background-color: #dee6ea; } 86 | 87 | .background-gray-light { 88 | background-color: #edf3f6; } 89 | 90 | .background-rating1 { 91 | background-color: #dd2c00; } 92 | 93 | .background-rating2 { 94 | background-color: #ff5722; } 95 | 96 | .background-rating3 { 97 | background-color: #ff9800; } 98 | 99 | .background-rating4 { 100 | background-color: #ffc107; } 101 | 102 | .background-rating5 { 103 | background-color: #f5dc00; } 104 | 105 | .background-rating6 { 106 | background-color: #cddc39; } 107 | 108 | .background-rating7 { 109 | background-color: #8bc34a; } 110 | 111 | .background-rating8 { 112 | background-color: #4caf50; } 113 | 114 | .background-rating9 { 115 | background-color: #43a047; } 116 | 117 | .background-rating10 { 118 | background-color: #388e3c; } 119 | 120 | .badges-list { 121 | margin-bottom: 20px; } 122 | 123 | .badges-list-item { 124 | background-color: #34495e; 125 | border-radius: 3px; 126 | color: #fff; 127 | display: inline-block; 128 | line-height: 1.2em; 129 | padding: .2em .7em; } 130 | 131 | .badge-rounded { 132 | border-radius: 50px; } 133 | 134 | .badge-lg { 135 | font-size: 1.3em; } 136 | 137 | .badge-xs { 138 | font-size: .7em; } 139 | 140 | .badge-primary { 141 | background-color: #1abc9c; } 142 | 143 | .badge-secondary { 144 | background-color: #9b59b6; } 145 | 146 | .badge-dark { 147 | background-color: #18232f; } 148 | 149 | .badge-gray { 150 | background-color: #dee6ea; } 151 | 152 | .badge-success { 153 | background-color: #4caf50; } 154 | 155 | .badge-error { 156 | background-color: #e74c3c; } 157 | 158 | .badge-warning { 159 | background-color: #f0ad4e; } 160 | 161 | button { 162 | background-color: transparent; 163 | border: 0; 164 | cursor: pointer; } 165 | 166 | .button { 167 | background-color: #64829f; 168 | border: 1px solid #2c3e50; 169 | border-radius: 2em; 170 | display: inline-block; 171 | font-family: Lato,sans-serif; 172 | font-size: 12px; 173 | font-weight: 700; 174 | line-height: 1.5em; 175 | margin: 10px; 176 | padding: 10px 20px; 177 | text-align: center; 178 | text-decoration: none; 179 | text-transform: uppercase; 180 | transition: opacity .2s ease-in-out; 181 | white-space: nowrap; } 182 | 183 | .button, .button:active, .button:focus, .button:hover { 184 | color: #fff; } 185 | 186 | .button:hover { 187 | cursor: pointer; 188 | opacity: .8; 189 | text-decoration: none; } 190 | 191 | .button:active { 192 | opacity: 1; } 193 | 194 | .button:first-child { 195 | margin-left: 0; } 196 | 197 | .button:last-child { 198 | margin-right: 0; } 199 | 200 | .button.button-big { 201 | border-radius: 2em; 202 | font-size: 16px; 203 | line-height: 1.5em; 204 | padding: 10px 30px; } 205 | 206 | .button.button-small { 207 | border-radius: 2em; 208 | font-size: 11px; 209 | line-height: 1.273em; 210 | padding: 6px 20px; } 211 | 212 | .button.button-huge { 213 | border-radius: 2em; 214 | font-size: 16px; 215 | line-height: 1.5em; 216 | padding: 15px 30px; } 217 | 218 | .button.button-huge i { 219 | font-size: 20px; } 220 | 221 | .button.button-large { 222 | display: block; 223 | margin-left: auto; 224 | margin-right: auto; 225 | max-width: 400px; 226 | width: 100%; } 227 | 228 | .button.button-primary { 229 | background-color: #1abc9c; 230 | border: 1px solid #1abc9c; 231 | color: #fff; } 232 | 233 | .button.button-primary:hover { 234 | color: #fff; } 235 | 236 | .button.button-secondary { 237 | background-color: #9b59b6; 238 | border: 1px solid #9b59b6; 239 | color: #fff; } 240 | 241 | .button.button-secondary:hover { 242 | color: #fff; } 243 | 244 | .button.button-transparent { 245 | background-color: transparent; 246 | border: 1px solid transparent; } 247 | 248 | .button.button-white { 249 | background-color: #fff; 250 | border: 1px solid #fff; 251 | color: #1abc9c; } 252 | 253 | .button.button-green { 254 | background-color: #4caf50; 255 | border-color: #4caf50; 256 | color: #fff; } 257 | 258 | .button.button-red { 259 | background-color: #e74c3c; 260 | border-color: #e74c3c; 261 | color: #fff; } 262 | 263 | .button.button-outlined { 264 | background-color: transparent; 265 | border: 1px solid #1abc9c; 266 | color: #1abc9c; } 267 | 268 | .button.button-disabled { 269 | cursor: default; 270 | opacity: .4; } 271 | 272 | .button.button-only-icon { 273 | height: 43px; 274 | line-height: 43px; 275 | padding: 0; 276 | width: 43px; } 277 | 278 | .button.button-only-icon i { 279 | margin-left: 0; 280 | margin-right: 0; } 281 | 282 | .button i { 283 | margin-bottom: -2%; 284 | margin-left: .8em; 285 | margin-right: .8em; 286 | position: relative; 287 | transition: all .3s ease; } 288 | 289 | .button i:last-child { 290 | margin-right: 0; } 291 | 292 | .button i:first-child { 293 | margin-left: 0; } 294 | 295 | .button i:before { 296 | float: left; } 297 | 298 | .button i.fa-lg { 299 | margin-bottom: 0; } 300 | 301 | .button-link { 302 | color: #1abc9c; 303 | font-family: Lato,sans-serif; 304 | font-size: 12px; 305 | font-weight: 700; 306 | text-transform: uppercase; } 307 | 308 | .button-link i { 309 | font-size: 18px; 310 | line-height: 14px; 311 | margin-bottom: -2px; 312 | margin-left: 4px; 313 | margin-right: 8px; 314 | transition: all .3s ease; } 315 | 316 | .button-link i:before { 317 | float: left; } 318 | 319 | .button-link.button-link-rotated i { 320 | transform: rotate(-180deg); } 321 | 322 | .button-group { 323 | white-space: nowrap; } 324 | 325 | .button-group .button { 326 | display: inline-block; 327 | margin: 0; } 328 | 329 | .button-group .button:not(:first-child) { 330 | border-bottom-left-radius: 0; 331 | border-top-left-radius: 0; } 332 | 333 | .button-group .button:not(:last-child) { 334 | border-bottom-right-radius: 0; 335 | border-right: 0; 336 | border-top-right-radius: 0; } 337 | 338 | input, textarea { 339 | appearance: none; } 340 | 341 | label { 342 | display: block; 343 | font-weight: 400; } 344 | 345 | input:-webkit-autofill { 346 | box-shadow: inset 0 0 0 1000px #34495e; } 347 | 348 | select { 349 | -moz-appearance: window; 350 | -webkit-appearance: none; } 351 | 352 | input[type=text], select, textarea { 353 | border-radius: 3px; 354 | font-size: 14px; 355 | line-height: 1.5em; 356 | transition: background-color .2s ease-in-out; } 357 | 358 | .input, .select, .textarea { 359 | border: 0; 360 | border: 1px solid #465f78; 361 | border-radius: 3px; 362 | box-shadow: none; 363 | display: block; 364 | font-weight: 400; 365 | margin-bottom: 20px; } 366 | 367 | .input :focus, .select :focus, .textarea :focus { 368 | outline: none; } 369 | 370 | .input.error, .select.error, .textarea.error { 371 | border: 1px solid #e74c3c; 372 | margin-bottom: 0; } 373 | 374 | .input.small, .select.small, .textarea.small { 375 | font-size: 13px; 376 | padding: 4px 6px; } 377 | 378 | .has-error .input, .has-error .select, .has-error .textarea { 379 | border: 1px solid #1abc9c; } 380 | 381 | .has-error .control-label { 382 | color: #1abc9c; } 383 | 384 | label.error { 385 | color: #e74c3c; 386 | font-size: 13px; 387 | line-height: 13px; 388 | position: absolute; 389 | right: 0; 390 | top: -16px; } 391 | 392 | input[type=checkbox] { 393 | appearance: checkbox; } 394 | 395 | input[type=radio] { 396 | appearance: radio; } 397 | 398 | .select { 399 | background-color: #34495e; 400 | display: inline-block; 401 | margin-right: 10px; 402 | padding: 0; 403 | position: relative; } 404 | 405 | .select.full-width { 406 | display: inline-block; 407 | margin-left: 0; 408 | margin-right: 0; 409 | width: 100%; } 410 | 411 | .select:last-child { 412 | margin-right: 0; } 413 | 414 | .select .fa-angle-down { 415 | color: #969da6; 416 | font-size: 25px; 417 | margin-top: -12px; } 418 | 419 | .select .fa-angle-down, .select .icon-angle-down { 420 | height: 30px; 421 | position: absolute; 422 | right: 10px; 423 | top: 50%; 424 | z-index: 1; } 425 | 426 | .select .icon-angle-down { 427 | color: #1abc9c; 428 | font-size: 1.2em; 429 | margin-top: -10px; } 430 | 431 | .select select { 432 | appearance: none; 433 | background-color: transparent; 434 | border: 0; 435 | color: #fff; 436 | height: 44px; 437 | margin-right: 20px; 438 | padding-left: 10px; 439 | padding-right: 30px; 440 | position: relative; 441 | width: 100%; 442 | z-index: 2; } 443 | 444 | .select select:active, .select select:focus { 445 | background-color: #3d566e; 446 | border: 0; 447 | outline: none; } 448 | 449 | .select select:active + i, .select select:focus + i { 450 | z-index: 2; } 451 | 452 | .select select option { 453 | background-color: #34495e; 454 | color: #fff; 455 | height: 30px; } 456 | 457 | .select.select-small { 458 | max-width: 150px; } 459 | 460 | .select.select-small select { 461 | font-size: 14px !important; 462 | height: 24px; 463 | line-height: 24px; 464 | padding: 0 5px; 465 | padding-right: 27px; } 466 | 467 | select::-ms-expand { 468 | display: none; } 469 | 470 | .select-link { 471 | border: 0; 472 | color: #1abc9c; } 473 | 474 | .textarea { 475 | background-color: #34495e; 476 | padding: 0; 477 | width: 100%; } 478 | 479 | .textarea textarea { 480 | background: transparent; 481 | border: 0; 482 | color: #fff; 483 | display: block; 484 | font-family: Lato,sans-serif; 485 | padding: 10px 15px; 486 | width: 100%; } 487 | 488 | .textarea textarea:active, .textarea textarea:focus { 489 | border: 0; 490 | outline: none; 491 | background-color: #3d566e; } 492 | 493 | textarea { 494 | min-height: 120px; } 495 | 496 | .form-button-wrap { 497 | text-align: center; } 498 | 499 | .checkbox, .radio { 500 | margin: 0; 501 | margin-bottom: 5px; 502 | margin-right: 20px; 503 | padding-left: 25px; 504 | position: relative; } 505 | 506 | input[type=checkbox] + label, input[type=radio] + label { 507 | display: block; 508 | overflow: hidden; 509 | padding-left: 5px; 510 | text-overflow: ellipsis; 511 | white-space: nowrap; } 512 | 513 | input[type=checkbox], input[type=radio] { 514 | display: none; } 515 | 516 | input[type=checkbox] + label:after, input[type=checkbox] + label:before, input[type=radio] + label:after, input[type=radio] + label:before { 517 | display: block; 518 | position: absolute; 519 | font-size: 14px; 520 | height: 18px; 521 | line-height: 18px; 522 | margin-top: -9px; 523 | top: 50%; 524 | width: 18px; 525 | left: 0; } 526 | 527 | input[type=checkbox] + label:after, input[type=radio] + label:after { 528 | background-color: #34495e; 529 | border: 1px solid #465f78; 530 | border-radius: 3px; 531 | content: ''; } 532 | 533 | input[type=radio] + label:after { 534 | border-radius: 99px; } 535 | 536 | input[type=checkbox] + label:before { 537 | content: "\f00c"; 538 | font-family: FontAwesome; 539 | left: 2px; 540 | top: 11px; 541 | transform: scale(0); 542 | z-index: 1; } 543 | 544 | input[type=radio] + label:before { 545 | background-color: #1abc9c; 546 | border-radius: 99px; 547 | content: ''; 548 | display: block; 549 | height: 8px; 550 | left: 5px; 551 | margin-top: -4px; 552 | top: 50%; 553 | transform: scale(0); 554 | width: 8px; 555 | z-index: 1; } 556 | 557 | input[type=checkbox]:checked + label, input[type=radio]:checked + label { 558 | color: #1abc9c; } 559 | 560 | input[type=checkbox]:checked + label:before, input[type=radio]:checked + label:before { 561 | animation: a .25s; 562 | color: #1abc9c; 563 | transform: scale(1); } 564 | 565 | @keyframes a { 566 | 0% { 567 | transform: scale(0); } 568 | 50% { 569 | transform: scale(1.5); } 570 | to { 571 | transform: scale(1); } } 572 | 573 | .input { 574 | background-color: #34495e; 575 | display: inline-block; 576 | margin-right: 10px; 577 | padding: 0; 578 | position: relative; } 579 | 580 | .input :active, .input :focus { 581 | background-color: #3d566e; } 582 | 583 | .input.full-width { 584 | display: inline-block; 585 | margin-left: 0; 586 | margin-right: 0; 587 | width: 100%; } 588 | 589 | .input input { 590 | background: transparent; 591 | border: 0; 592 | box-shadow: none; 593 | color: #fff; 594 | height: 44px; 595 | line-height: 44px; 596 | margin-bottom: 0; 597 | outline: none; 598 | padding-left: 10px; 599 | padding-right: 10px; 600 | width: 100%; } 601 | 602 | .input-with-icon { 603 | position: relative; } 604 | 605 | .input-with-icon input { 606 | padding-right: 42px; } 607 | 608 | .input-with-icon .input-icon { 609 | color: #969da6; 610 | margin-top: -6px; 611 | position: absolute; 612 | right: 12px; 613 | top: 50%; } 614 | 615 | .input-with-icon .input-icon.fa-search { 616 | color: #1abc9c; 617 | margin-top: -7px; } 618 | 619 | .input-with-icon button.input-icon { 620 | background: none; 621 | border: 0; 622 | cursor: pointer; 623 | padding: 0; } 624 | 625 | .input-icon input { 626 | padding: 0; 627 | width: 0; } 628 | 629 | .input-icon i { 630 | padding: 14px 15px 14px 12px; } 631 | 632 | .input-group { 633 | margin-bottom: 20px; } 634 | 635 | .input-group .input, .input-group .select, .input-group .textarea { 636 | margin-bottom: 0; } 637 | 638 | .form-group { 639 | background-color: #34495e; 640 | border: 1px solid #465f78; 641 | border-radius: 3px; 642 | display: inline-block; 643 | margin-bottom: 20px; } 644 | 645 | .form-group .input, .form-group .select, .form-group .textarea { 646 | margin-bottom: 0; } 647 | 648 | .form-group .form-group-item { 649 | border: 0; 650 | border-radius: 0; 651 | margin-right: 0; } 652 | 653 | .form-group .form-group-item:last-child { 654 | border-right: 0; } 655 | 656 | .form-row { 657 | margin-left: -3px !important; 658 | margin-right: -3px !important; } 659 | 660 | .form-row div[class^=col] { 661 | padding-left: 3px; 662 | padding-right: 3px; } 663 | 664 | .form-collapse { 665 | display: flex; 666 | margin-bottom: 20px; } 667 | 668 | .form-collapse .item-main { 669 | flex: 1; } 670 | 671 | .form-collapse .item { 672 | border-radius: 0; 673 | font-size: 15px; 674 | margin: 0; } 675 | 676 | .form-collapse .item:first-child { 677 | border-bottom-left-radius: 3px; 678 | border-top-left-radius: 3px; } 679 | 680 | .form-collapse .item:last-child { 681 | border-bottom-right-radius: 3px; 682 | border-top-right-radius: 3px; } 683 | 684 | .form-collapse .item:not(:last-child) { 685 | border-right: 0; } 686 | 687 | .aligner { 688 | display: flex; } 689 | 690 | .aligner-space-between { 691 | display: flex; 692 | justify-content: space-between; 693 | width: 100%; } 694 | 695 | .aligner-space-around { 696 | display: flex; 697 | justify-content: space-around; 698 | width: 100%; } 699 | 700 | .aligner-center-vertical { 701 | align-items: center; 702 | display: flex; } 703 | 704 | .aligner-center-horitzontal { 705 | display: flex; 706 | justify-content: center; } 707 | 708 | .content-start { 709 | display: flex; 710 | justify-content: flex-start; } 711 | 712 | .content-end { 713 | display: flex; 714 | justify-content: flex-end; } 715 | 716 | .aligner-item-top { 717 | align-self: flex-start; } 718 | 719 | .aligner-item-bottom { 720 | align-self: flex-end; } 721 | 722 | .flex-grow { 723 | flex-grow: 1; } 724 | 725 | .fleft { 726 | float: left; } 727 | 728 | .fright { 729 | float: right; } 730 | 731 | .cf:after, .cf:before { 732 | content: ''; 733 | display: table; } 734 | 735 | .cf:after { 736 | clear: both; } 737 | 738 | .align-center { 739 | text-align: center; } 740 | 741 | .align-right { 742 | text-align: right; } 743 | 744 | .align-left { 745 | text-align: left; } 746 | 747 | .align-bottom { 748 | vertical-align: bottom; } 749 | 750 | .align-middle { 751 | vertical-align: middle; } 752 | 753 | .align-top { 754 | vertical-align: top; } 755 | 756 | .ellipsis, .ellipsis-block { 757 | overflow: hidden; 758 | white-space: nowrap; 759 | text-overflow: ellipsis; } 760 | 761 | .ellipsis-block { 762 | display: block; } 763 | 764 | .word-break { 765 | word-break: break-all; } 766 | 767 | .text-indent { 768 | padding-left: 24px; } 769 | 770 | .bordered { 771 | border: 1px solid #465f78; } 772 | 773 | .border-bottom { 774 | border-bottom: 1px solid #465f78; } 775 | 776 | .border-left { 777 | border-left: 1px solid #465f78; } 778 | 779 | .border-right { 780 | border-right: 1px solid #465f78; } 781 | 782 | .border-top { 783 | border-top: 1px solid #465f78; } 784 | 785 | .display-block { 786 | display: block; } 787 | 788 | .display-inline { 789 | display: inline; } 790 | 791 | .hidden { 792 | display: none; } 793 | 794 | .no-margin { 795 | margin: 0 !important; } 796 | 797 | .no-wrap { 798 | white-space: nowrap; } 799 | 800 | .overflow-hidden { 801 | overflow: hidden; } 802 | 803 | .opacity-low { 804 | opacity: .5; } 805 | 806 | .icon-rounded, .rounded-corners { 807 | border-radius: 15%; } 808 | 809 | .rounded { 810 | border-radius: 100%; } 811 | 812 | .hide-small { 813 | display: none; } 814 | 815 | .hide-small-inline-block { 816 | display: none !important; } 817 | 818 | .hide-medium { 819 | display: block; } 820 | 821 | .visible-lg, .visible-lg-block, .visible-lg-inline, .visible-lg-inline-block, .visible-md, .visible-md-block, .visible-md-inline, .visible-md-inline-block, .visible-sm, .visible-sm-block, .visible-sm-inline, .visible-sm-inline-block, .visible-xs, .visible-xs-block, .visible-xs-inline, .visible-xs-inline-block { 822 | display: none !important; } 823 | 824 | .section { 825 | padding-bottom: 20px; 826 | padding-top: 20px; } 827 | 828 | .section:after, .section:before { 829 | content: ''; 830 | display: table; } 831 | 832 | .section:after { 833 | clear: both; } 834 | 835 | .container { 836 | max-width: 1380px; 837 | width: 100%; } 838 | 839 | .container, .container-medium { 840 | margin: 0 auto; 841 | padding-left: 15px; 842 | padding-right: 15px; } 843 | 844 | .container-medium { 845 | max-width: 944px; } 846 | 847 | .container-small { 848 | margin: 0 auto; 849 | max-width: 400px; 850 | padding-left: 15px; 851 | padding-right: 15px; } 852 | 853 | .separator { 854 | border-bottom: 1px solid #465f78; } 855 | 856 | .main-wrap { 857 | transition: padding .25s ease-in-out; } 858 | 859 | .main-content, .main-wrap { 860 | overflow: hidden; 861 | position: relative; } 862 | 863 | .main-content { 864 | float: right; 865 | margin-left: 0; 866 | width: 100%; } 867 | 868 | .main-content:after, .main-content:before { 869 | clear: none; } 870 | 871 | .loading-bar { 872 | height: 4px; 873 | left: 0; 874 | overflow: hidden; 875 | position: fixed; 876 | right: 0; 877 | top: 0; 878 | width: 100%; 879 | z-index: 3; } 880 | 881 | .loading-bar:before { 882 | animation: b 2s linear infinite; 883 | background-color: #1abc9c; 884 | content: ''; 885 | display: block; 886 | height: 4px; 887 | left: -200px; 888 | position: absolute; 889 | width: 200px; } 890 | 891 | @keyframes b { 892 | 0% { 893 | left: -200px; } 894 | 0%, 50% { 895 | width: 30%; } 896 | 70% { 897 | width: 70%; } 898 | 80% { 899 | left: 50%; } 900 | 95% { 901 | left: 120%; } 902 | to { 903 | left: 100%; } } 904 | 905 | .loading-spinner { 906 | animation: c 4s infinite; 907 | animation-timing-function: ease-in-out; 908 | display: block; 909 | height: 30px; 910 | left: 50%; 911 | margin-left: -15px; 912 | margin-top: -15px; 913 | position: fixed; 914 | top: 50%; 915 | width: 30px; 916 | z-index: 3; } 917 | 918 | .loading-spinner span { 919 | animation-timing-function: ease-in-out; 920 | background-color: #fff; 921 | border-radius: 100%; 922 | display: block; 923 | height: 9px; 924 | position: absolute; 925 | width: 9px; } 926 | 927 | .loading-spinner span:nth-child(1) { 928 | animation: d 1s infinite; 929 | left: 0; 930 | top: 0; 931 | transform: translate3d(5px, 5px, 0); } 932 | 933 | .loading-spinner span:nth-child(2) { 934 | animation: e 1s infinite; 935 | right: 0; 936 | top: 0; } 937 | 938 | .loading-spinner span:nth-child(3) { 939 | animation: f 1s infinite; 940 | bottom: 0; 941 | right: 0; } 942 | 943 | .loading-spinner span:nth-child(4) { 944 | animation: g 1s infinite; 945 | bottom: 0; 946 | left: 0; } 947 | 948 | .loading-spinner.is-relative { 949 | display: inline-block; 950 | left: auto; 951 | margin: 0; 952 | position: relative; 953 | top: auto; 954 | z-index: 1; } 955 | 956 | @keyframes c { 957 | 0% { 958 | transform: rotate(0); } 959 | 25% { 960 | transform: rotate(90deg); } 961 | 50% { 962 | transform: rotate(180deg); } 963 | 75% { 964 | transform: rotate(270deg); } 965 | to { 966 | transform: rotate(1turn); } } 967 | 968 | @keyframes d { 969 | 0% { 970 | transform: translateZ(0); } 971 | 50% { 972 | transform: translate3d(4px, 4px, 0); } 973 | to { 974 | transform: translateZ(0); } } 975 | 976 | @keyframes e { 977 | 0% { 978 | transform: translateZ(0); } 979 | 50% { 980 | transform: translate3d(-4px, 4px, 0); } 981 | to { 982 | transform: translateZ(0); } } 983 | 984 | @keyframes f { 985 | 0% { 986 | transform: translateZ(0); } 987 | 50% { 988 | transform: translate3d(-4px, -4px, 0); } 989 | to { 990 | transform: translateZ(0); } } 991 | 992 | @keyframes g { 993 | 0% { 994 | transform: translateZ(0); } 995 | 50% { 996 | transform: translate3d(4px, -4px, 0); } 997 | to { 998 | transform: translateZ(0); } } 999 | 1000 | .message-bar { 1001 | border-radius: 3px; 1002 | margin-bottom: 1em; 1003 | padding: 1em; } 1004 | 1005 | .message-bar p:last-child { 1006 | margin-bottom: 0; } 1007 | 1008 | .paginator-list .paginator-list-item { 1009 | margin-right: 5px; 1010 | padding: 0; 1011 | display: inline-block; } 1012 | 1013 | .paginator-list .paginator-list-item:first-child i { 1014 | margin-right: .5em; } 1015 | 1016 | .paginator-list .paginator-list-item:last-child i { 1017 | margin-left: .5em; } 1018 | 1019 | .paginator-list .paginator-list-item .paginator-list-link { 1020 | background-color: #34495e; 1021 | border: 1px solid #2c3e50; 1022 | border-radius: 3px; 1023 | color: #fff; 1024 | display: block; 1025 | padding: .5em 1em; 1026 | transition: background-color .2s ease-in-out; } 1027 | 1028 | .paginator-list .paginator-list-item .paginator-list-link:hover { 1029 | background-color: #46637f; } 1030 | 1031 | .paginator-list .paginator-list-item .paginator-list-link.active { 1032 | background-color: #1abc9c; 1033 | color: #fff; } 1034 | 1035 | .paginator-list.paginator-compact { 1036 | display: flex; } 1037 | 1038 | .paginator-list.paginator-compact .paginator-list-item { 1039 | margin-right: 0; } 1040 | 1041 | .paginator-list.paginator-compact .paginator-list-item:not(:last-child) { 1042 | border-right: 1px solid #2c3e50; } 1043 | 1044 | .paginator-list.paginator-compact .paginator-list-item .paginator-list-link { 1045 | border-radius: 0; } 1046 | 1047 | .paginator-list.paginator-compact .paginator-list-item:first-child .paginator-list-link { 1048 | border-bottom-left-radius: 3px; 1049 | border-top-left-radius: 3px; } 1050 | 1051 | .paginator-list.paginator-compact .paginator-list-item:last-child .paginator-list-link { 1052 | border-bottom-right-radius: 3px; 1053 | border-top-right-radius: 3px; } 1054 | 1055 | .paginator-list.paginator-center { 1056 | justify-content: center; 1057 | text-align: center; } 1058 | 1059 | .rating-circle { 1060 | background-color: #d7d7d7; 1061 | border-radius: 50%; 1062 | display: inline-block; 1063 | height: 100px; 1064 | margin: 0 auto; 1065 | overflow: hidden; 1066 | position: relative; 1067 | width: 100px; } 1068 | 1069 | .rating-circle.rating-color-1 { 1070 | color: #dd2c00; } 1071 | 1072 | .rating-circle.rating-color-1 .circle-fill { 1073 | background-color: #dd2c00; } 1074 | 1075 | .rating-circle.rating-color-2 { 1076 | color: #ff5722; } 1077 | 1078 | .rating-circle.rating-color-2 .circle-fill { 1079 | background-color: #ff5722; } 1080 | 1081 | .rating-circle.rating-color-3 { 1082 | color: #ff9800; } 1083 | 1084 | .rating-circle.rating-color-3 .circle-fill { 1085 | background-color: #ff9800; } 1086 | 1087 | .rating-circle.rating-color-4 { 1088 | color: #ffc107; } 1089 | 1090 | .rating-circle.rating-color-4 .circle-fill { 1091 | background-color: #ffc107; } 1092 | 1093 | .rating-circle.rating-color-5 { 1094 | color: #f5dc00; } 1095 | 1096 | .rating-circle.rating-color-5 .circle-fill { 1097 | background-color: #f5dc00; } 1098 | 1099 | .rating-circle.rating-color-6 { 1100 | color: #cddc39; } 1101 | 1102 | .rating-circle.rating-color-6 .circle-fill { 1103 | background-color: #cddc39; } 1104 | 1105 | .rating-circle.rating-color-7 { 1106 | color: #8bc34a; } 1107 | 1108 | .rating-circle.rating-color-7 .circle-fill { 1109 | background-color: #8bc34a; } 1110 | 1111 | .rating-circle.rating-color-8 { 1112 | color: #4caf50; } 1113 | 1114 | .rating-circle.rating-color-8 .circle-fill { 1115 | background-color: #4caf50; } 1116 | 1117 | .rating-circle.rating-color-9 { 1118 | color: #43a047; } 1119 | 1120 | .rating-circle.rating-color-9 .circle-fill { 1121 | background-color: #43a047; } 1122 | 1123 | .rating-circle.rating-color-10 { 1124 | color: #388e3c; } 1125 | 1126 | .rating-circle.rating-color-10 .circle-fill { 1127 | background-color: #388e3c; } 1128 | 1129 | .rating-circle .circle .circle-fill, .rating-circle .circle .circle-mask { 1130 | border-radius: 50%; 1131 | height: 100px; 1132 | position: absolute; 1133 | transition: all 1s; 1134 | width: 100px; 1135 | backface-visibility: hidden; } 1136 | 1137 | .rating-circle .circle .circle-fill.reanimate, .rating-circle .circle .circle-mask.reanimate { 1138 | transition: transform 0s; } 1139 | 1140 | .rating-circle .circle .circle-fill.reset, .rating-circle .circle .circle-mask.reset { 1141 | transform: rotate(0deg) !important; } 1142 | 1143 | .rating-circle .circle .circle-mask { 1144 | clip: rect(0, 100px, 100px, 50px); 1145 | overflow: hidden; } 1146 | 1147 | .rating-circle .circle .circle-mask .circle-fill { 1148 | clip: rect(0, 50px, 100px, 0); } 1149 | 1150 | .rating-circle .circle-inset { 1151 | background-color: #34495e; 1152 | border-radius: 50%; 1153 | height: 94px; 1154 | left: 50%; 1155 | margin-left: -47px; 1156 | margin-top: -47px; 1157 | position: absolute; 1158 | text-align: center; 1159 | top: 50%; 1160 | width: 94px; } 1161 | 1162 | .rating-circle .circle-inset .circle-rating-number { 1163 | font-size: 36px; 1164 | font-weight: 400; 1165 | line-height: 94px; } 1166 | 1167 | .rating-circle.circle-small, .rating-circle.circle-small .circle .circle-fill, .rating-circle.circle-small .circle .circle-mask { 1168 | width: 80px; 1169 | height: 80px; } 1170 | 1171 | .rating-circle.circle-small .circle-mask { 1172 | clip: rect(0, 80px, 80px, 40px); } 1173 | 1174 | .rating-circle.circle-small .circle-mask .circle-fill { 1175 | clip: rect(0, 40px, 80px, 0); } 1176 | 1177 | .rating-circle.circle-small .circle-inset { 1178 | border-radius: 50%; 1179 | height: 74px; 1180 | left: 50%; 1181 | margin-left: -37px; 1182 | margin-top: -37px; 1183 | position: absolute; 1184 | text-align: center; 1185 | top: 50%; 1186 | width: 74px; } 1187 | 1188 | .rating-circle.circle-small .circle-inset .circle-rating-number { 1189 | font-size: 24px; 1190 | font-weight: 400; 1191 | left: 0; 1192 | line-height: 74px; 1193 | margin: 0 !important; 1194 | position: absolute; 1195 | top: 0; 1196 | width: 74px; } 1197 | 1198 | .rating-color-1 .circle-fill, .rating-color-1 .circle-full { 1199 | transform: rotate(18deg); } 1200 | 1201 | .rating-color-2 .circle-fill, .rating-color-2 .circle-full { 1202 | transform: rotate(36deg); } 1203 | 1204 | .rating-color-3 .circle-fill, .rating-color-3 .circle-full { 1205 | transform: rotate(54deg); } 1206 | 1207 | .rating-color-4 .circle-fill, .rating-color-4 .circle-full { 1208 | transform: rotate(72deg); } 1209 | 1210 | .rating-color-5 .circle-fill, .rating-color-5 .circle-full { 1211 | transform: rotate(90deg); } 1212 | 1213 | .rating-color-6 .circle-fill, .rating-color-6 .circle-full { 1214 | transform: rotate(108deg); } 1215 | 1216 | .rating-color-7 .circle-fill, .rating-color-7 .circle-full { 1217 | transform: rotate(126deg); } 1218 | 1219 | .rating-color-8 .circle-fill, .rating-color-8 .circle-full { 1220 | transform: rotate(144deg); } 1221 | 1222 | .rating-color-9 .circle-fill, .rating-color-9 .circle-full { 1223 | transform: rotate(162deg); } 1224 | 1225 | .rating-color-10 .circle-fill, .rating-color-10 .circle-full { 1226 | transform: rotate(180deg); } 1227 | 1228 | .table { 1229 | background-color: #34495e; 1230 | border: 1px solid #465f78; 1231 | border-collapse: collapse; 1232 | border-radius: 3px; 1233 | color: #fff; 1234 | margin-bottom: 20px; 1235 | max-width: 100%; 1236 | width: 100%; } 1237 | 1238 | .table td, .table th { 1239 | border-bottom: 1px solid #465f78; 1240 | padding: 10px; } 1241 | 1242 | .table td { 1243 | padding: 14px; 1244 | position: relative; } 1245 | 1246 | .table thead, .table tr { 1247 | border-bottom: 1px solid #465f78; } 1248 | 1249 | .table th { 1250 | background-color: #2c3e50; 1251 | color: #969da6; 1252 | font-weight: 400; 1253 | padding: 5px 14px; 1254 | white-space: nowrap; } 1255 | 1256 | .table-vertical-center td { 1257 | vertical-align: middle; } 1258 | 1259 | .table-responsive th { 1260 | display: none; } 1261 | 1262 | .table-responsive td { 1263 | display: block; } 1264 | 1265 | .table-responsive td:first-child { 1266 | border-top: 1px solid #465f78; 1267 | padding-top: 14px; } 1268 | 1269 | .table-responsive td:last-child { 1270 | padding-bottom: 14px; } 1271 | 1272 | .table-responsive td:before { 1273 | content: attr(data-th) ": "; 1274 | display: block; 1275 | font-weight: 400; } 1276 | 1277 | .table-responsive td, .table-responsive th { 1278 | text-align: left; } 1279 | 1280 | .table-responsive.table-break-medium tr { 1281 | border-top: 1px solid #465f78; } 1282 | 1283 | .table-responsive.table-break-medium td:last-child { 1284 | padding-bottom: 14px; } 1285 | 1286 | .table-responsive.table-break-small tr { 1287 | border-top: 1px solid #465f78; } 1288 | 1289 | .table-responsive.table-break-small td:last-child { 1290 | padding-bottom: 14px; } 1291 | 1292 | .tabs { 1293 | border-bottom: 1px solid #465f78; 1294 | margin-bottom: 30px; 1295 | text-align: center; } 1296 | 1297 | .tabs .tab { 1298 | border-bottom: 3px solid transparent; 1299 | color: #969da6; 1300 | display: inline-block; 1301 | line-height: 50px; 1302 | margin: 0; 1303 | margin-right: 30px; 1304 | min-width: 70px; 1305 | position: relative; } 1306 | 1307 | .tabs .tab:hover { 1308 | color: #1abc9c; 1309 | text-decoration: none; } 1310 | 1311 | .tabs .tab.active { 1312 | border-bottom: 3px solid #1abc9c; 1313 | color: #1abc9c; } 1314 | 1315 | .tab-content { 1316 | display: none; } 1317 | 1318 | .tab-content.selected { 1319 | display: block; } 1320 | 1321 | .tags { 1322 | margin-bottom: 20px; } 1323 | 1324 | .tags:last-child { 1325 | margin-bottom: 0; } 1326 | 1327 | .tags li { 1328 | margin: 0 25px 10px 0; } 1329 | 1330 | .tags .tag, .tags li { 1331 | display: inline-block; } 1332 | 1333 | .tags .tag { 1334 | background-color: #34495e; 1335 | border-radius: 3px 0 0 3px; 1336 | color: #fff; 1337 | float: left; 1338 | line-height: 34px; 1339 | padding: 0 10px; 1340 | position: relative; } 1341 | 1342 | .tags .tag:before { 1343 | border-bottom: 17px solid transparent; 1344 | border-left: 10px solid #34495e; 1345 | border-top: 17px solid transparent; 1346 | content: ''; 1347 | height: 0; 1348 | position: absolute; 1349 | right: -10px; 1350 | top: 0; 1351 | width: 0; } 1352 | 1353 | .tags .tag:after { 1354 | background: #2c3e50; 1355 | border-radius: 6px; 1356 | content: ''; 1357 | float: left; 1358 | height: 5px; 1359 | position: absolute; 1360 | right: -3px; 1361 | top: 14px; 1362 | width: 5px; } 1363 | 1364 | .tags a.tag { 1365 | color: #fff; 1366 | display: inline-block; 1367 | text-decoration: none; } 1368 | 1369 | .tags a.tag:hover { 1370 | background-color: #46637f; 1371 | text-decoration: none; } 1372 | 1373 | .tags a.tag:hover:before { 1374 | border-left: 10px solid #46637f; } 1375 | 1376 | body { 1377 | font: 400 14px/1.5em Lato,sans-serif; 1378 | color: #fff; } 1379 | 1380 | img { 1381 | font-size: 12px; 1382 | line-height: 1.3em; } 1383 | 1384 | p { 1385 | line-height: 1.5em; 1386 | margin-bottom: 1.5em; } 1387 | 1388 | a { 1389 | color: #1abc9c; 1390 | text-decoration: none; } 1391 | 1392 | a:hover { 1393 | color: rgba(26, 188, 156, 0.8); } 1394 | 1395 | a:focus { 1396 | color: #1abc9c; } 1397 | 1398 | .text-big, .text-huge, .text-medium, .text-small, label.label { 1399 | line-height: 1.3em; 1400 | margin-bottom: 1em; 1401 | margin-top: 1.5em; } 1402 | 1403 | .text-big:first-child, .text-huge:first-child, .text-medium:first-child, .text-small:first-child, label.label:first-child { 1404 | margin-top: .5em; } 1405 | 1406 | .text-huge { 1407 | font-size: 30px; } 1408 | 1409 | .text-big, .text-huge { 1410 | font-family: Lato,sans-serif; 1411 | font-weight: 300; 1412 | text-transform: none; } 1413 | 1414 | .text-big { 1415 | font-size: 24px; } 1416 | 1417 | .text-medium { 1418 | font-family: Lato,sans-serif; 1419 | font-size: 20px; 1420 | font-weight: 300; 1421 | text-transform: none; } 1422 | 1423 | .text-small, label.label { 1424 | font-size: 12px; } 1425 | 1426 | .text-body { 1427 | font-size: 14px; 1428 | line-height: 1.5em; } 1429 | 1430 | .text-primary { 1431 | color: #1abc9c; } 1432 | 1433 | .text-dark { 1434 | color: #18232f; } 1435 | 1436 | .text-secondary { 1437 | color: #9b59b6; } 1438 | 1439 | .text-success { 1440 | color: #4caf50; } 1441 | 1442 | .text-info { 1443 | color: #5bc0de; } 1444 | 1445 | .text-warning { 1446 | color: #f0ad4e; } 1447 | 1448 | .text-error { 1449 | color: #e74c3c; } 1450 | 1451 | .table-responsive td:before, .text-gray, label.label { 1452 | color: #dee6ea; } 1453 | 1454 | .text-gray-light { 1455 | color: #edf3f6; } 1456 | 1457 | .text-rating1 { 1458 | color: #dd2c00; } 1459 | 1460 | .text-rating2 { 1461 | color: #ff5722; } 1462 | 1463 | .text-rating3 { 1464 | color: #ff9800; } 1465 | 1466 | .text-rating4 { 1467 | color: #ffc107; } 1468 | 1469 | .text-rating5 { 1470 | color: #f5dc00; } 1471 | 1472 | .text-rating6 { 1473 | color: #cddc39; } 1474 | 1475 | .text-rating7 { 1476 | color: #8bc34a; } 1477 | 1478 | .text-rating8 { 1479 | color: #4caf50; } 1480 | 1481 | .text-rating9 { 1482 | color: #43a047; } 1483 | 1484 | .text-rating10 { 1485 | color: #388e3c; } 1486 | 1487 | .text-white { 1488 | color: #fff; } 1489 | 1490 | .table-responsive td:before, .text-gray, a.text-gray, button.text-gray, label.label { 1491 | color: #969da6; } 1492 | 1493 | .text-light { 1494 | font-weight: 300; } 1495 | 1496 | .text-normal { 1497 | font-weight: 400; } 1498 | 1499 | .text-line-through { 1500 | text-decoration: line-through; } 1501 | 1502 | .text-italic { 1503 | font-style: italic; } 1504 | 1505 | .text-uppercase { 1506 | text-transform: uppercase; } 1507 | 1508 | .text-transform-none { 1509 | text-transform: none; } 1510 | 1511 | .text-center { 1512 | text-align: center; } 1513 | 1514 | .text-lato { 1515 | font-family: Lato,sans-serif; } 1516 | 1517 | .text-with-subtitle { 1518 | margin-bottom: 0 !important; } 1519 | 1520 | .text-with-subtitle + .text-big, .text-with-subtitle + .text-huge, .text-with-subtitle + .text-medium, .text-with-subtitle + .text-small, .text-with-subtitle + label.label { 1521 | margin-top: .5em; } 1522 | 1523 | h1, h2, h3, h4 { 1524 | font-weight: 300; } 1525 | 1526 | .container { 1527 | margin-right: auto; 1528 | margin-left: auto; } 1529 | 1530 | .container:after, .container:before { 1531 | content: ''; 1532 | display: table; } 1533 | 1534 | .container:after { 1535 | clear: both; } 1536 | 1537 | .container-fluid { 1538 | margin-right: auto; 1539 | margin-left: auto; } 1540 | 1541 | .container-fluid:after, .container-fluid:before { 1542 | content: ''; 1543 | display: table; } 1544 | 1545 | .container-fluid:after { 1546 | clear: both; } 1547 | 1548 | .row { 1549 | margin-left: -15px; 1550 | margin-right: -15px; } 1551 | 1552 | .row:after, .row:before { 1553 | content: ''; 1554 | display: table; } 1555 | 1556 | .row:after { 1557 | clear: both; } 1558 | 1559 | .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { 1560 | position: relative; 1561 | min-height: 1px; 1562 | padding-left: 15px; 1563 | padding-right: 15px; } 1564 | 1565 | .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { 1566 | float: left; } 1567 | 1568 | .col-xs-1 { 1569 | width: 8.33333%; } 1570 | 1571 | .col-xs-2 { 1572 | width: 16.66667%; } 1573 | 1574 | .col-xs-3 { 1575 | width: 25%; } 1576 | 1577 | .col-xs-4 { 1578 | width: 33.33333%; } 1579 | 1580 | .col-xs-5 { 1581 | width: 41.66667%; } 1582 | 1583 | .col-xs-6 { 1584 | width: 50%; } 1585 | 1586 | .col-xs-7 { 1587 | width: 58.33333%; } 1588 | 1589 | .col-xs-8 { 1590 | width: 66.66667%; } 1591 | 1592 | .col-xs-9 { 1593 | width: 75%; } 1594 | 1595 | .col-xs-10 { 1596 | width: 83.33333%; } 1597 | 1598 | .col-xs-11 { 1599 | width: 91.66667%; } 1600 | 1601 | .col-xs-12 { 1602 | width: 100%; } 1603 | 1604 | .col-xs-pull-0 { 1605 | right: auto; } 1606 | 1607 | .col-xs-pull-1 { 1608 | right: 8.33333%; } 1609 | 1610 | .col-xs-pull-2 { 1611 | right: 16.66667%; } 1612 | 1613 | .col-xs-pull-3 { 1614 | right: 25%; } 1615 | 1616 | .col-xs-pull-4 { 1617 | right: 33.33333%; } 1618 | 1619 | .col-xs-pull-5 { 1620 | right: 41.66667%; } 1621 | 1622 | .col-xs-pull-6 { 1623 | right: 50%; } 1624 | 1625 | .col-xs-pull-7 { 1626 | right: 58.33333%; } 1627 | 1628 | .col-xs-pull-8 { 1629 | right: 66.66667%; } 1630 | 1631 | .col-xs-pull-9 { 1632 | right: 75%; } 1633 | 1634 | .col-xs-pull-10 { 1635 | right: 83.33333%; } 1636 | 1637 | .col-xs-pull-11 { 1638 | right: 91.66667%; } 1639 | 1640 | .col-xs-pull-12 { 1641 | right: 100%; } 1642 | 1643 | .col-xs-push-0 { 1644 | left: auto; } 1645 | 1646 | .col-xs-push-1 { 1647 | left: 8.33333%; } 1648 | 1649 | .col-xs-push-2 { 1650 | left: 16.66667%; } 1651 | 1652 | .col-xs-push-3 { 1653 | left: 25%; } 1654 | 1655 | .col-xs-push-4 { 1656 | left: 33.33333%; } 1657 | 1658 | .col-xs-push-5 { 1659 | left: 41.66667%; } 1660 | 1661 | .col-xs-push-6 { 1662 | left: 50%; } 1663 | 1664 | .col-xs-push-7 { 1665 | left: 58.33333%; } 1666 | 1667 | .col-xs-push-8 { 1668 | left: 66.66667%; } 1669 | 1670 | .col-xs-push-9 { 1671 | left: 75%; } 1672 | 1673 | .col-xs-push-10 { 1674 | left: 83.33333%; } 1675 | 1676 | .col-xs-push-11 { 1677 | left: 91.66667%; } 1678 | 1679 | .col-xs-push-12 { 1680 | left: 100%; } 1681 | 1682 | .col-xs-offset-0 { 1683 | margin-left: 0; } 1684 | 1685 | .col-xs-offset-1 { 1686 | margin-left: 8.33333%; } 1687 | 1688 | .col-xs-offset-2 { 1689 | margin-left: 16.66667%; } 1690 | 1691 | .col-xs-offset-3 { 1692 | margin-left: 25%; } 1693 | 1694 | .col-xs-offset-4 { 1695 | margin-left: 33.33333%; } 1696 | 1697 | .col-xs-offset-5 { 1698 | margin-left: 41.66667%; } 1699 | 1700 | .col-xs-offset-6 { 1701 | margin-left: 50%; } 1702 | 1703 | .col-xs-offset-7 { 1704 | margin-left: 58.33333%; } 1705 | 1706 | .col-xs-offset-8 { 1707 | margin-left: 66.66667%; } 1708 | 1709 | .col-xs-offset-9 { 1710 | margin-left: 75%; } 1711 | 1712 | .col-xs-offset-10 { 1713 | margin-left: 83.33333%; } 1714 | 1715 | .col-xs-offset-11 { 1716 | margin-left: 91.66667%; } 1717 | 1718 | .col-xs-offset-12 { 1719 | margin-left: 100%; } 1720 | 1721 | @media (min-width: 768px) { 1722 | .full-width { 1723 | margin-left: -30px; 1724 | margin-right: -30px; } 1725 | input[type=text], select, textarea { 1726 | font-size: 15px; } 1727 | .select select { 1728 | padding: 8px 15px; } 1729 | .form-button-wrap { 1730 | text-align: right; } 1731 | .input input { 1732 | padding: 8px 15px; } 1733 | .hidden-medium, .show-small { 1734 | display: none; } 1735 | .hide-small { 1736 | display: block; } 1737 | .hide-small-inline-block { 1738 | display: inline-block !important; } 1739 | .hide-medium { 1740 | display: none; } 1741 | .section { 1742 | padding-bottom: 40px; 1743 | padding-top: 40px; } 1744 | .container, .container-medium, .container-small { 1745 | padding-left: 30px; 1746 | padding-right: 30px; } 1747 | .rating-circle { 1748 | margin: 0; 1749 | margin-left: 10px; } 1750 | .table-responsive.table-break-medium td:before { 1751 | display: none; } 1752 | .table-responsive.table-break-medium td, .table-responsive.table-break-medium th { 1753 | display: table-cell; } 1754 | body { 1755 | font-size: 15px; } 1756 | .text-small, label.label { 1757 | font-size: 14px; } 1758 | .container { 1759 | width: auto; } 1760 | .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { 1761 | float: left; } 1762 | .col-sm-1 { 1763 | width: 8.33333%; } 1764 | .col-sm-2 { 1765 | width: 16.66667%; } 1766 | .col-sm-3 { 1767 | width: 25%; } 1768 | .col-sm-4 { 1769 | width: 33.33333%; } 1770 | .col-sm-5 { 1771 | width: 41.66667%; } 1772 | .col-sm-6 { 1773 | width: 50%; } 1774 | .col-sm-7 { 1775 | width: 58.33333%; } 1776 | .col-sm-8 { 1777 | width: 66.66667%; } 1778 | .col-sm-9 { 1779 | width: 75%; } 1780 | .col-sm-10 { 1781 | width: 83.33333%; } 1782 | .col-sm-11 { 1783 | width: 91.66667%; } 1784 | .col-sm-12 { 1785 | width: 100%; } 1786 | .col-sm-pull-0 { 1787 | right: auto; } 1788 | .col-sm-pull-1 { 1789 | right: 8.33333%; } 1790 | .col-sm-pull-2 { 1791 | right: 16.66667%; } 1792 | .col-sm-pull-3 { 1793 | right: 25%; } 1794 | .col-sm-pull-4 { 1795 | right: 33.33333%; } 1796 | .col-sm-pull-5 { 1797 | right: 41.66667%; } 1798 | .col-sm-pull-6 { 1799 | right: 50%; } 1800 | .col-sm-pull-7 { 1801 | right: 58.33333%; } 1802 | .col-sm-pull-8 { 1803 | right: 66.66667%; } 1804 | .col-sm-pull-9 { 1805 | right: 75%; } 1806 | .col-sm-pull-10 { 1807 | right: 83.33333%; } 1808 | .col-sm-pull-11 { 1809 | right: 91.66667%; } 1810 | .col-sm-pull-12 { 1811 | right: 100%; } 1812 | .col-sm-push-0 { 1813 | left: auto; } 1814 | .col-sm-push-1 { 1815 | left: 8.33333%; } 1816 | .col-sm-push-2 { 1817 | left: 16.66667%; } 1818 | .col-sm-push-3 { 1819 | left: 25%; } 1820 | .col-sm-push-4 { 1821 | left: 33.33333%; } 1822 | .col-sm-push-5 { 1823 | left: 41.66667%; } 1824 | .col-sm-push-6 { 1825 | left: 50%; } 1826 | .col-sm-push-7 { 1827 | left: 58.33333%; } 1828 | .col-sm-push-8 { 1829 | left: 66.66667%; } 1830 | .col-sm-push-9 { 1831 | left: 75%; } 1832 | .col-sm-push-10 { 1833 | left: 83.33333%; } 1834 | .col-sm-push-11 { 1835 | left: 91.66667%; } 1836 | .col-sm-push-12 { 1837 | left: 100%; } 1838 | .col-sm-offset-0 { 1839 | margin-left: 0; } 1840 | .col-sm-offset-1 { 1841 | margin-left: 8.33333%; } 1842 | .col-sm-offset-2 { 1843 | margin-left: 16.66667%; } 1844 | .col-sm-offset-3 { 1845 | margin-left: 25%; } 1846 | .col-sm-offset-4 { 1847 | margin-left: 33.33333%; } 1848 | .col-sm-offset-5 { 1849 | margin-left: 41.66667%; } 1850 | .col-sm-offset-6 { 1851 | margin-left: 50%; } 1852 | .col-sm-offset-7 { 1853 | margin-left: 58.33333%; } 1854 | .col-sm-offset-8 { 1855 | margin-left: 66.66667%; } 1856 | .col-sm-offset-9 { 1857 | margin-left: 75%; } 1858 | .col-sm-offset-10 { 1859 | margin-left: 83.33333%; } 1860 | .col-sm-offset-11 { 1861 | margin-left: 91.66667%; } 1862 | .col-sm-offset-12 { 1863 | margin-left: 100%; } } 1864 | 1865 | @media (min-width: 992px) { 1866 | .button.button-big { 1867 | padding: 10px 40px; } 1868 | .button.button-huge { 1869 | border-radius: 2em; 1870 | font-size: 18px; 1871 | line-height: 1.5em; 1872 | padding: 18px 50px; } 1873 | input[type=text], select, textarea { 1874 | font-size: 15px; } 1875 | .hidden-large { 1876 | display: none; } 1877 | .hidden-medium { 1878 | display: inline-block; } 1879 | .hide-medium { 1880 | display: block; } 1881 | .rating-circle, .rating-circle .circle .circle-fill, .rating-circle .circle .circle-mask { 1882 | height: 130px; 1883 | width: 130px; } 1884 | .rating-circle .circle .circle-mask { 1885 | clip: rect(0, 130px, 130px, 65px); } 1886 | .rating-circle .circle .circle-mask .circle-fill { 1887 | clip: rect(0, 65px, 130px, 0); } 1888 | .rating-circle .circle-inset { 1889 | height: 124px; 1890 | line-height: 124px; 1891 | margin-left: -62px; 1892 | margin-top: -62px; 1893 | width: 124px; } 1894 | .rating-circle .circle-inset .circle-rating-number { 1895 | font-size: 50px; 1896 | line-height: 124px; } 1897 | .table td, .table th { 1898 | padding: 10px 20px; } 1899 | body { 1900 | font-size: 15px; } 1901 | .text-huge { 1902 | font-size: 40px; } 1903 | .text-big { 1904 | font-size: 28px; } 1905 | .text-body { 1906 | font-size: 15px; } 1907 | .container { 1908 | width: auto; } 1909 | .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { 1910 | float: left; } 1911 | .col-md-1 { 1912 | width: 8.33333%; } 1913 | .col-md-2 { 1914 | width: 16.66667%; } 1915 | .col-md-3 { 1916 | width: 25%; } 1917 | .col-md-4 { 1918 | width: 33.33333%; } 1919 | .col-md-5 { 1920 | width: 41.66667%; } 1921 | .col-md-6 { 1922 | width: 50%; } 1923 | .col-md-7 { 1924 | width: 58.33333%; } 1925 | .col-md-8 { 1926 | width: 66.66667%; } 1927 | .col-md-9 { 1928 | width: 75%; } 1929 | .col-md-10 { 1930 | width: 83.33333%; } 1931 | .col-md-11 { 1932 | width: 91.66667%; } 1933 | .col-md-12 { 1934 | width: 100%; } 1935 | .col-md-pull-0 { 1936 | right: auto; } 1937 | .col-md-pull-1 { 1938 | right: 8.33333%; } 1939 | .col-md-pull-2 { 1940 | right: 16.66667%; } 1941 | .col-md-pull-3 { 1942 | right: 25%; } 1943 | .col-md-pull-4 { 1944 | right: 33.33333%; } 1945 | .col-md-pull-5 { 1946 | right: 41.66667%; } 1947 | .col-md-pull-6 { 1948 | right: 50%; } 1949 | .col-md-pull-7 { 1950 | right: 58.33333%; } 1951 | .col-md-pull-8 { 1952 | right: 66.66667%; } 1953 | .col-md-pull-9 { 1954 | right: 75%; } 1955 | .col-md-pull-10 { 1956 | right: 83.33333%; } 1957 | .col-md-pull-11 { 1958 | right: 91.66667%; } 1959 | .col-md-pull-12 { 1960 | right: 100%; } 1961 | .col-md-push-0 { 1962 | left: auto; } 1963 | .col-md-push-1 { 1964 | left: 8.33333%; } 1965 | .col-md-push-2 { 1966 | left: 16.66667%; } 1967 | .col-md-push-3 { 1968 | left: 25%; } 1969 | .col-md-push-4 { 1970 | left: 33.33333%; } 1971 | .col-md-push-5 { 1972 | left: 41.66667%; } 1973 | .col-md-push-6 { 1974 | left: 50%; } 1975 | .col-md-push-7 { 1976 | left: 58.33333%; } 1977 | .col-md-push-8 { 1978 | left: 66.66667%; } 1979 | .col-md-push-9 { 1980 | left: 75%; } 1981 | .col-md-push-10 { 1982 | left: 83.33333%; } 1983 | .col-md-push-11 { 1984 | left: 91.66667%; } 1985 | .col-md-push-12 { 1986 | left: 100%; } 1987 | .col-md-offset-0 { 1988 | margin-left: 0; } 1989 | .col-md-offset-1 { 1990 | margin-left: 8.33333%; } 1991 | .col-md-offset-2 { 1992 | margin-left: 16.66667%; } 1993 | .col-md-offset-3 { 1994 | margin-left: 25%; } 1995 | .col-md-offset-4 { 1996 | margin-left: 33.33333%; } 1997 | .col-md-offset-5 { 1998 | margin-left: 41.66667%; } 1999 | .col-md-offset-6 { 2000 | margin-left: 50%; } 2001 | .col-md-offset-7 { 2002 | margin-left: 58.33333%; } 2003 | .col-md-offset-8 { 2004 | margin-left: 66.66667%; } 2005 | .col-md-offset-9 { 2006 | margin-left: 75%; } 2007 | .col-md-offset-10 { 2008 | margin-left: 83.33333%; } 2009 | .col-md-offset-11 { 2010 | margin-left: 91.66667%; } 2011 | .col-md-offset-12 { 2012 | margin-left: 100%; } } 2013 | 2014 | @media (max-width: 480px) { 2015 | .block-mobile { 2016 | display: block; 2017 | margin-left: 0; 2018 | margin-right: 0; 2019 | width: 100%; } 2020 | .table-responsive.table-break-small td { 2021 | border: 0; 2022 | padding-bottom: 0; } } 2023 | 2024 | @media (min-width: 1280px) { 2025 | .hidden-large { 2026 | display: inline-block; } 2027 | .visible-lg { 2028 | display: block !important; } 2029 | table.visible-lg { 2030 | display: table; } 2031 | tr.visible-lg { 2032 | display: table-row !important; } 2033 | td.visible-lg, th.visible-lg { 2034 | display: table-cell !important; } 2035 | .visible-lg-block { 2036 | display: block !important; } 2037 | .visible-lg-inline { 2038 | display: inline !important; } 2039 | .visible-lg-inline-block { 2040 | display: inline-block !important; } 2041 | .hidden-lg { 2042 | display: none !important; } 2043 | .main-wrap { 2044 | padding-left: 250px; } 2045 | .text-huge { 2046 | font-size: 48px; } 2047 | .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { 2048 | float: left; } 2049 | .col-lg-1 { 2050 | width: 8.33333%; } 2051 | .col-lg-2 { 2052 | width: 16.66667%; } 2053 | .col-lg-3 { 2054 | width: 25%; } 2055 | .col-lg-4 { 2056 | width: 33.33333%; } 2057 | .col-lg-5 { 2058 | width: 41.66667%; } 2059 | .col-lg-6 { 2060 | width: 50%; } 2061 | .col-lg-7 { 2062 | width: 58.33333%; } 2063 | .col-lg-8 { 2064 | width: 66.66667%; } 2065 | .col-lg-9 { 2066 | width: 75%; } 2067 | .col-lg-10 { 2068 | width: 83.33333%; } 2069 | .col-lg-11 { 2070 | width: 91.66667%; } 2071 | .col-lg-12 { 2072 | width: 100%; } 2073 | .col-lg-pull-0 { 2074 | right: auto; } 2075 | .col-lg-pull-1 { 2076 | right: 8.33333%; } 2077 | .col-lg-pull-2 { 2078 | right: 16.66667%; } 2079 | .col-lg-pull-3 { 2080 | right: 25%; } 2081 | .col-lg-pull-4 { 2082 | right: 33.33333%; } 2083 | .col-lg-pull-5 { 2084 | right: 41.66667%; } 2085 | .col-lg-pull-6 { 2086 | right: 50%; } 2087 | .col-lg-pull-7 { 2088 | right: 58.33333%; } 2089 | .col-lg-pull-8 { 2090 | right: 66.66667%; } 2091 | .col-lg-pull-9 { 2092 | right: 75%; } 2093 | .col-lg-pull-10 { 2094 | right: 83.33333%; } 2095 | .col-lg-pull-11 { 2096 | right: 91.66667%; } 2097 | .col-lg-pull-12 { 2098 | right: 100%; } 2099 | .col-lg-push-0 { 2100 | left: auto; } 2101 | .col-lg-push-1 { 2102 | left: 8.33333%; } 2103 | .col-lg-push-2 { 2104 | left: 16.66667%; } 2105 | .col-lg-push-3 { 2106 | left: 25%; } 2107 | .col-lg-push-4 { 2108 | left: 33.33333%; } 2109 | .col-lg-push-5 { 2110 | left: 41.66667%; } 2111 | .col-lg-push-6 { 2112 | left: 50%; } 2113 | .col-lg-push-7 { 2114 | left: 58.33333%; } 2115 | .col-lg-push-8 { 2116 | left: 66.66667%; } 2117 | .col-lg-push-9 { 2118 | left: 75%; } 2119 | .col-lg-push-10 { 2120 | left: 83.33333%; } 2121 | .col-lg-push-11 { 2122 | left: 91.66667%; } 2123 | .col-lg-push-12 { 2124 | left: 100%; } 2125 | .col-lg-offset-0 { 2126 | margin-left: 0; } 2127 | .col-lg-offset-1 { 2128 | margin-left: 8.33333%; } 2129 | .col-lg-offset-2 { 2130 | margin-left: 16.66667%; } 2131 | .col-lg-offset-3 { 2132 | margin-left: 25%; } 2133 | .col-lg-offset-4 { 2134 | margin-left: 33.33333%; } 2135 | .col-lg-offset-5 { 2136 | margin-left: 41.66667%; } 2137 | .col-lg-offset-6 { 2138 | margin-left: 50%; } 2139 | .col-lg-offset-7 { 2140 | margin-left: 58.33333%; } 2141 | .col-lg-offset-8 { 2142 | margin-left: 66.66667%; } 2143 | .col-lg-offset-9 { 2144 | margin-left: 75%; } 2145 | .col-lg-offset-10 { 2146 | margin-left: 83.33333%; } 2147 | .col-lg-offset-11 { 2148 | margin-left: 91.66667%; } 2149 | .col-lg-offset-12 { 2150 | margin-left: 100%; } } 2151 | 2152 | @media (max-width: 767px) { 2153 | .visible-xs { 2154 | display: block !important; } 2155 | table.visible-xs { 2156 | display: table; } 2157 | tr.visible-xs { 2158 | display: table-row !important; } 2159 | td.visible-xs, th.visible-xs { 2160 | display: table-cell !important; } 2161 | .visible-xs-block { 2162 | display: block !important; } 2163 | .visible-xs-inline { 2164 | display: inline !important; } 2165 | .visible-xs-inline-block { 2166 | display: inline-block !important; } 2167 | .hidden-xs { 2168 | display: none !important; } } 2169 | 2170 | @media (min-width: 768px) and (max-width: 991px) { 2171 | .visible-sm { 2172 | display: block !important; } 2173 | table.visible-sm { 2174 | display: table; } 2175 | tr.visible-sm { 2176 | display: table-row !important; } 2177 | td.visible-sm, th.visible-sm { 2178 | display: table-cell !important; } 2179 | .visible-sm-block { 2180 | display: block !important; } 2181 | .visible-sm-inline { 2182 | display: inline !important; } 2183 | .visible-sm-inline-block { 2184 | display: inline-block !important; } 2185 | .hidden-sm { 2186 | display: none !important; } } 2187 | 2188 | @media (min-width: 992px) and (max-width: 1279px) { 2189 | .visible-md { 2190 | display: block !important; } 2191 | table.visible-md { 2192 | display: table; } 2193 | tr.visible-md { 2194 | display: table-row !important; } 2195 | td.visible-md, th.visible-md { 2196 | display: table-cell !important; } 2197 | .visible-md-block { 2198 | display: block !important; } 2199 | .visible-md-inline { 2200 | display: inline !important; } 2201 | .visible-md-inline-block { 2202 | display: inline-block !important; } 2203 | .hidden-md { 2204 | display: none !important; } } 2205 | 2206 | @media (max-width: 768px) { 2207 | .table-responsive.table-break-medium td { 2208 | border: 0; 2209 | padding-bottom: 0; } } 2210 | 2211 | @media (min-width: 480px) { 2212 | .table-responsive.table-break-small td:before { 2213 | display: none; } 2214 | .table-responsive.table-break-small td, .table-responsive.table-break-small th { 2215 | display: table-cell; } } 2216 | 2217 | #foo { 2218 | color: #fff; } 2219 | -------------------------------------------------------------------------------- /test/sierra-npm/test.styl: -------------------------------------------------------------------------------- 1 | @import import('~sierra-library'); 2 | 3 | #foo { 4 | color: #fff; 5 | } -------------------------------------------------------------------------------- /test/sierra/test.less: -------------------------------------------------------------------------------- 1 | @import "~sierra"; 2 | 3 | #foo { 4 | color: #fff; 5 | } -------------------------------------------------------------------------------- /test/sierra/test.sass: -------------------------------------------------------------------------------- 1 | @import "~sierra" 2 | 3 | #foo 4 | color: #fff 5 | -------------------------------------------------------------------------------- /test/sierra/test.styl: -------------------------------------------------------------------------------- 1 | @import import('~sierra'); 2 | 3 | #foo { 4 | color: #fff; 5 | } -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | /* eslint-env node, jest */ 2 | 3 | 'use strict'; 4 | 5 | const fs = require('fs'); 6 | const childProcess = require('child_process'); 7 | const diamond = require('..'); 8 | 9 | const libraries = [ 10 | { 11 | name: 'Sierra', 12 | folder: 'sierra', 13 | package: 'sierra', 14 | install: 'sierra@2.0.0', 15 | }, 16 | { 17 | name: 'Sierra (npm)', 18 | folder: 'sierra-npm', 19 | package: 'sierra-library', 20 | install: 'npm:sierra-library@2.0.0', 21 | }, 22 | { 23 | name: 'Sierra (GitHub)', 24 | folder: 'sierra-github', 25 | package: 'sierra', 26 | install: 'github:sierra-library/sierra#3c670118d7e0223f697f55c71623334e243e278d', 27 | }, 28 | ]; 29 | 30 | for (const library of libraries) { 31 | for (const cache of [true, false]) { 32 | describe(`${library.name} (${cache ? 'Cache Enabled' : 'Cache Disabled'})`, () => { 33 | test('install', () => { 34 | const otherArgs = []; 35 | if (!cache) otherArgs.push('--no-cache'); 36 | const result = childProcess.spawnSync('diamond', ['i', '--no-save', library.install].concat(otherArgs)); 37 | if (result.status !== 0) { 38 | throw new Error(`STDOUT:\n${result.stdout}\n\n-----\n\nSTDERR:\n${result.stderr}`); 39 | } 40 | }); 41 | 42 | test('css', () => { 43 | fs.writeFileSync(`${library.folder}.css`, fs.readFileSync('diamond/autoload.css', 'utf8')); 44 | expect(fs.readFileSync(`test/${library.folder}/test.css`, 'utf8')).toBe(fs.readFileSync('diamond/autoload.css', 'utf8')); 45 | }); 46 | 47 | describe('CLI', () => { 48 | for (const lang of ['sass', 'less', 'styl']) { 49 | test(lang, () => { 50 | const result = childProcess.spawnSync('diamond', ['c', `test/${library.folder}/test.${lang}`]); 51 | if (result.status !== 0) { 52 | throw new Error(`STDOUT:\n${result.stdout}\n\n-----\n\nSTDERR:\n${result.stderr}`); 53 | } else { 54 | expect(result.stdout.toString()).toBe(fs.readFileSync(`test/${library.folder}/test.${lang}.css`, 'utf8')); 55 | } 56 | }); 57 | } 58 | }); 59 | 60 | describe('Node.JS API', () => { 61 | for (const lang of ['sass', 'less', 'styl']) { 62 | test(lang, () => { 63 | expect.assertions(1); 64 | return diamond.compile(`test/${library.folder}/test.${lang}`) 65 | .then((css) => { 66 | expect(css).toBe(fs.readFileSync(`test/${library.folder}/test.${lang}.css`, 'utf8')); 67 | }); 68 | }); 69 | } 70 | }); 71 | 72 | describe('uninstall', () => { 73 | test('uninstall', () => { 74 | const result = childProcess.spawnSync('diamond', ['u', library.package]); 75 | if (result.status !== 0) { 76 | throw new Error(`STDOUT:\n${result.stdout}\n\n-----\n\nSTDERR:\n${result.stderr}`); 77 | } else { 78 | expect(fs.existsSync(`diamond/packages/${library.package}`)).toBe(false); 79 | expect(fs.readFileSync('diamond/autoload.css', 'utf8')).toBe(''); 80 | } 81 | }); 82 | }); 83 | }); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /test/test.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Exit on errors 4 | set -e 5 | 6 | if [ "$TRAVIS_NODE_VERSION" == "4" ]; then 7 | printf "Installing Latest npm\n" 8 | npm i -g npm 9 | printf "npm Version: " 10 | npm -v 11 | printf "\n\n" 12 | fi 13 | 14 | # Install 15 | printf "\n\nInstalling npm:bootstrap@4.0.0-alpha.6\n" 16 | diamond install npm:bootstrap@4.0.0-alpha.6 --no-save 17 | 18 | # Test 19 | printf "Compiling Sass..." 20 | output=$(diamond c test/bootstrap.sass) 21 | if [ $? -eq 0 ]; then 22 | printf " \033[0;32mOK\033[0m" 23 | else 24 | printf "\n$output" 25 | fi 26 | 27 | printf "\nCompiling Less..." 28 | output=$(diamond c test/bootstrap.less) 29 | if [ $? -eq 0 ]; then 30 | printf " \033[0;32mOK\033[0m" 31 | else 32 | printf "\n$output" 33 | fi 34 | 35 | printf "\nCompiling Styl..." 36 | output=$(diamond c test/bootstrap.styl) 37 | if [ $? -eq 0 ]; then 38 | printf " \033[0;32mOK\033[0m\n" 39 | else 40 | printf "\n$output" 41 | fi 42 | 43 | # Install 44 | printf "\n\nInstalling npm:bootstrap@4.0.0-alpha.6 (uncached)\n" 45 | diamond install npm:bootstrap@4.0.0-alpha.6 --no-cache --no-save 46 | 47 | # Test 48 | printf "Compiling Sass..." 49 | output=$(diamond c test/bootstrap.sass) 50 | if [ $? -eq 0 ]; then 51 | printf " \033[0;32mOK\033[0m" 52 | else 53 | printf "\n$output" 54 | fi 55 | 56 | printf "\nCompiling Less..." 57 | output=$(diamond c test/bootstrap.less) 58 | if [ $? -eq 0 ]; then 59 | printf " \033[0;32mOK\033[0m" 60 | else 61 | printf "\n$output" 62 | fi 63 | 64 | printf "\nCompiling Styl..." 65 | output=$(diamond c test/bootstrap.styl) 66 | if [ $? -eq 0 ]; then 67 | printf " \033[0;32mOK\033[0m\n" 68 | else 69 | printf "\n$output" 70 | fi 71 | 72 | # Install 73 | printf "\n\nInstalling npm:bootstrap@3.3.7\n" 74 | diamond install npm:bootstrap@3.3.7 --no-save 75 | 76 | # Test 77 | printf "Compiling Sass..." 78 | output=$(diamond c test/bootstrap.sass) 79 | if [ $? -eq 0 ]; then 80 | printf " \033[0;32mOK\033[0m" 81 | else 82 | printf "\n$output" 83 | fi 84 | 85 | printf "\nCompiling Less..." 86 | output=$(diamond c test/bootstrap.less) 87 | if [ $? -eq 0 ]; then 88 | printf " \033[0;32mOK\033[0m" 89 | else 90 | printf "\n$output" 91 | fi 92 | 93 | printf "\nCompiling Styl..." 94 | output=$(diamond c test/bootstrap.styl) 95 | if [ $? -eq 0 ]; then 96 | printf " \033[0;32mOK\033[0m\n" 97 | else 98 | printf "\n$output" 99 | fi 100 | 101 | # Install 102 | printf "\n\nInstalling npm:bootstrap@3.3.7 (uncached)\n" 103 | diamond install npm:bootstrap@3.3.7 --no-cache --no-save 104 | 105 | # Test 106 | printf "Compiling Sass..." 107 | output=$(diamond c test/bootstrap.sass) 108 | if [ $? -eq 0 ]; then 109 | printf " \033[0;32mOK\033[0m" 110 | else 111 | printf "\n$output" 112 | fi 113 | 114 | printf "\nCompiling Less..." 115 | output=$(diamond c test/bootstrap.less) 116 | if [ $? -eq 0 ]; then 117 | printf " \033[0;32mOK\033[0m" 118 | else 119 | printf "\n$output" 120 | fi 121 | 122 | printf "\nCompiling Styl..." 123 | output=$(diamond c test/bootstrap.styl) 124 | if [ $? -eq 0 ]; then 125 | printf " \033[0;32mOK\033[0m\n" 126 | else 127 | printf "\n$output" 128 | fi 129 | 130 | printf "\n\n\033[0;32mTests Complete!\033[0m\n" --------------------------------------------------------------------------------