-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yanishevskiy Aleksandr
committed
Mar 24, 2020
0 parents
commit d7102a3
Showing
1,146 changed files
with
42,605 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["env"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
||
indent_style = space | ||
indent_size = 2 | ||
|
||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/** | ||
.git | ||
.hg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,239 @@ | ||
{ | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"experimentalObjectRestSpread": false | ||
} | ||
}, | ||
|
||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"commonjs": true, | ||
"es6": true | ||
}, | ||
|
||
"rules": { | ||
"comma-dangle": ["error", "never"], | ||
"no-cond-assign": ["error", "always"], | ||
"no-console": "error", | ||
"no-constant-condition": "error", | ||
"no-control-regex": "error", | ||
"no-debugger": "error", | ||
"no-dupe-args": "error", | ||
"no-dupe-keys": "error", | ||
"no-duplicate-case": "error", | ||
"no-empty": "error", | ||
"no-empty-character-class": "error", | ||
"no-ex-assign": "error", | ||
"no-extra-boolean-cast": "error", | ||
"no-extra-parens": ["warn", "all"], | ||
"no-extra-semi": "error", | ||
"no-func-assign": "error", | ||
"no-inner-declarations": ["error", "functions"], | ||
"no-invalid-regexp": "error", | ||
"no-irregular-whitespace": "error", | ||
"no-negated-in-lhs": "error", | ||
"no-obj-calls": "error", | ||
"no-prototype-builtins": "warn", | ||
"no-regex-spaces": "error", | ||
"no-sparse-arrays": "error", | ||
"no-unexpected-multiline": "error", | ||
"no-unreachable": "error", | ||
"use-isnan": "error", | ||
"valid-jsdoc": "warn", | ||
"valid-typeof": "error", | ||
|
||
"accessor-pairs": "warn", | ||
"array-callback-return": "error", | ||
"block-scoped-var": "error", | ||
"complexity": "off", | ||
"consistent-return": "error", | ||
"curly": ["error", "all"], | ||
"default-case": "warn", | ||
"dot-location": ["error", "property"], | ||
"dot-notation": "warn", | ||
"eqeqeq": ["error", "smart"], | ||
"guard-for-in": "warn", | ||
"no-alert": "error", | ||
"no-caller": "error", | ||
"no-case-declarations": "error", | ||
"no-div-regex": "error", | ||
"no-else-return": "warn", | ||
"no-empty-function": "off", | ||
"no-empty-pattern": "error", | ||
"no-eq-null": "off", | ||
"no-eval": "error", | ||
"no-extend-native": "error", | ||
"no-extra-bind": "error", | ||
"no-extra-label": "error", | ||
"no-fallthrough": "warn", | ||
"no-floating-decimal": "error", | ||
"no-implicit-coercion": "error", | ||
"no-implicit-globals": "error", | ||
"no-implied-eval": "error", | ||
"no-invalid-this": "error", | ||
"no-iterator": "error", | ||
"no-labels": "error", | ||
"no-lone-blocks": "error", | ||
"no-loop-func": "warn", | ||
"no-magic-numbers": "warn", | ||
"no-multi-spaces": "error", | ||
"no-multi-str": "error", | ||
"no-native-reassign": "error", | ||
"no-new": "error", | ||
"no-new-func": "error", | ||
"no-new-wrappers": "error", | ||
"no-octal": "error", | ||
"no-octal-escape": "error", | ||
"no-param-reassign": ["error", { "props": true }], | ||
"no-proto": "error", | ||
"no-redeclare": ["warn", { "builtinGlobals": true }], | ||
"no-return-assign": ["error", "always"], | ||
"no-script-url": "error", | ||
"no-self-compare": "error", | ||
"no-sequences": "error", | ||
"no-throw-literal": "error", | ||
"no-unmodified-loop-condition": "warn", | ||
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }], | ||
"no-unused-labels": "warn", | ||
"no-useless-call": "warn", | ||
"no-useless-concat": "warn", | ||
"no-useless-escape": "warn", | ||
"no-void": "warn", | ||
"no-warning-comments": ["warn", { "terms": ["todo", "fixme"], "location": "anywhere" }], | ||
"no-with": "error", | ||
"radix": "error", | ||
"vars-on-top": "warn", | ||
"wrap-iife": ["error", "any"], | ||
"yoda": "off", | ||
|
||
"strict": ["error", "function"], | ||
|
||
"init-declarations": "off", | ||
"no-catch-shadow": "error", | ||
"no-delete-var": "error", | ||
"no-label-var": "error", | ||
"no-restricted-globals": "error", | ||
"no-shadow": ["error", { "builtinGlobals": true, "hoist": "all" }], | ||
"no-shadow-restricted-names": "error", | ||
"no-undef": "error", | ||
"no-undef-init": "error", | ||
"no-undefined": "error", | ||
"no-unused-vars": "error", | ||
"no-use-before-define": "error", | ||
|
||
"callback-return": ["warn", ["callback", "cb", "next"]], | ||
"global-require": "error", | ||
"handle-callback-err": "error", | ||
"no-mixed-requires": "warn", | ||
"no-new-require": "error", | ||
"no-path-concat": "error", | ||
"no-process-env": "warn", | ||
"no-process-exit": "warn", | ||
"no-restricted-modules": "off", | ||
"no-sync": "off", | ||
|
||
"array-bracket-spacing": ["error", "always"], | ||
"block-spacing": ["error", "always"], | ||
"brace-style": ["warn", "tbs", { "allowSingleLine": true }], | ||
"camelcase": ["error", { "properties": "always" }], | ||
"comma-spacing": ["error", { "before": false, "after": true }], | ||
"comma-style": ["error", "last"], | ||
"computed-property-spacing": ["error", "never"], | ||
"consistent-this": "warn", | ||
"eol-last": "error", | ||
"func-names": "warn", | ||
"func-style": "off", | ||
"id-blacklist": "off", | ||
"id-length": ["warn", { "min": "error", "properties": "always", "exceptions": ["i", "j"] }], | ||
"id-match": "off", | ||
"indent": ["error", 2], | ||
"jsx-quotes": ["error", "prefer-double"], | ||
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }], | ||
"keyword-spacing": ["error", { "before": true, "after": true }], | ||
"linebreak-style": ["error", "unix"], | ||
"lines-around-comment": ["warn", { "beforeBlockComment": true, "afterBlockComment": false, "beforeLineComment": true, "afterLineComment": false }], | ||
"max-depth": "off", | ||
"max-len": ["error", { "code": 80, "tabWidth": 2, "ignoreComments": true, "ignoreUrls": true }], | ||
"max-nested-callbacks": ["warn", 3], | ||
"max-params": "off", | ||
"max-statements": "off", | ||
"max-statements-per-line": "off", | ||
"new-cap": "warn", | ||
"new-parens": "error", | ||
"newline-after-var": ["error", "always"], | ||
"newline-before-return": "warn", | ||
"newline-per-chained-call": "warn", | ||
"no-array-constructor": "error", | ||
"no-bitwise": "error", | ||
"no-continue": "warn", | ||
"no-inline-comments": "warn", | ||
"no-lonely-if": "warn", | ||
"no-mixed-spaces-and-tabs": "error", | ||
"no-multiple-empty-lines": ["error", { "max": "error" }], | ||
"no-negated-condition": "warn", | ||
"no-nested-ternary": "error", | ||
"no-new-object": "error", | ||
"no-plusplus": "off", | ||
"no-restricted-syntax": "off", | ||
"no-spaced-func": "error", | ||
"no-ternary": "off", | ||
"no-trailing-spaces": "error", | ||
"no-underscore-dangle": "warn", | ||
"no-unneeded-ternary": "error", | ||
"no-whitespace-before-property": "error", | ||
"object-curly-spacing": ["error", "always"], | ||
"object-property-newline": "off", | ||
"one-var": "off", | ||
"one-var-declaration-per-line": "warn", | ||
"operator-assignment": "off", | ||
"operator-linebreak": ["error", "after"], | ||
"padded-blocks": ["error", "never"], | ||
"quote-props": "off", | ||
"quotes": ["error", "single", "avoid-escape"], | ||
"require-jsdoc": "off", | ||
"semi": ["error", "always"], | ||
"semi-spacing": ["error", { "before": false, "after": true }], | ||
"sort-vars": "off", | ||
"space-before-blocks": ["error", "always"], | ||
"space-before-function-paren": ["error", { "anonymous": "never", "named": "always" }], | ||
"space-in-parens": ["error", "always"], | ||
"space-infix-ops": ["error", { "int32Hint": false }], | ||
"space-unary-ops": ["warn", { "words": true, "nonwords": false }], | ||
"spaced-line-comment": ["error", "always", { "exceptions": ["-", "+", "/"] }], | ||
"unicode-bom": "off", | ||
"wrap-regex": "warn", | ||
|
||
"arrow-body-style": ["warn", "as-needed"], | ||
"arrow-parens": ["error", "always"], | ||
"arrow-spacing": ["error", { "before": true, "after": true }], | ||
"constructor-super": "error", | ||
"generator-star-spacing": ["error", { "before": false, "after": true }], | ||
"no-class-assign": "error", | ||
"no-confusing-arrow": "warn", | ||
"no-const-assign": "error", | ||
"no-dupe-class-members": "error", | ||
"no-duplicate-imports": "error", | ||
"no-new-symbol": "error", | ||
"no-restricted-imports": "off", | ||
"no-this-before-super": "error", | ||
"no-useless-computed-key": "error", | ||
"no-useless-constructor": "error", | ||
"no-useless-rename": "warn", | ||
"no-var": "error", | ||
"object-shorthand": "warn", | ||
"prefer-arrow-callback": "warn", | ||
"prefer-const": "error", | ||
"prefer-reflect": "warn", | ||
"prefer-rest-params": "warn", | ||
"prefer-spread": "warn", | ||
"prefer-template": "warn", | ||
"require-yield": "error", | ||
"sort-imports": "off", | ||
"template-curly-spacing": ["error", "never"], | ||
"yield-star-spacing": ["error", "after"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/.hg | ||
|
||
*.log | ||
*.map | ||
*.orig | ||
.sass* | ||
*.swp | ||
*~ | ||
*.iws | ||
._* | ||
*.sublime-project | ||
*.sublime-workspace | ||
.sublime- | ||
sftp-config.json | ||
thumbs.db | ||
.project | ||
.DS_Store | ||
.idea | ||
.phpintel | ||
license.txt | ||
readme.html | ||
sitemap*.xml | ||
sitemap*.xml.gz | ||
Desktop.ini | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
node_modules | ||
node_modules/** | ||
node_modules_bck | ||
_gsdata_ | ||
wordpress/_gsdata_/ | ||
wordpress/wordpress.zip | ||
wp-content/advanced-cache.php | ||
wp-content/backup-db/ | ||
wp-content/backups/ | ||
wp-content/blogs.dir/ | ||
wp-content/cache/ | ||
wp-content/upgrade/ | ||
wp-content/wp-cache-config.php | ||
wp-content/db.php | ||
/wordpress/wordpress.zip | ||
/package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Jelastic Signup Widget | ||
|
||
This widget is created specifically for easy installation on any page and does not require any additional dependencies. It bases on usual HTML, js, and CSS installed in all modern browsers. The initialization of the widget is in the background and does not appear at the page load speed. User email validation based on [default HTML5 email validation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#Validation). | ||
|
||
# Widget Installation | ||
|
||
Insert this code anywhere on the page, where you want to display the widget: | ||
```html | ||
<div class="jlc-wrapper"></div> | ||
``` | ||
|
||
Get `jlcwidget.css` and `jlcwidget.js` files in the `dist` folder and put it in your template folder on the server. | ||
|
||
Replace `PATH_TO_TEMPLATE` in the example below with your theme template path and insert it after `<head>` and before `</body>` tag anywhere in your theme template. | ||
|
||
```html | ||
<script async src="PATH_TO_TEMPLATE/jlcwidget.js"></script> | ||
<link rel="stylesheet" href="PATH_TO_TEMPLATE/jlcwidget.css" media="none" onload="if(media!='all')media='all'"> | ||
``` | ||
|
||
# Widget Customisation | ||
|
||
You can add the following attributes to `<div class="jlc-wrapper"></div>` to redefine localization and target platform: | ||
|
||
- `data-text` - main button label | ||
- `data-tx-success` - success text | ||
- `data-tx-error` - error text | ||
- `data-key` - hoster domain | ||
|
||
```html | ||
<div class="jlc-wrapper" data-text="GET STARTED FOR FREE" data-tx-success="CHECK YOUR EMAIL" data-tx-error="An error has occurred, please try again later" data-key="jelastichosting.nl"></div> | ||
``` | ||
|
||
The default localization and hoster domain values are defined in the "main variables" section of the `assets/js/jlcwidget.js` file: | ||
|
||
```JavaScript | ||
const jlc_button_text = wrapper.getAttribute('data-text') || 'GET STARTED FOR FREE'; | ||
|
||
const jlc_text_error = wrapper.getAttribute('data-tx-error') || 'An error has occurred, please try again later', | ||
jlc_text_success = wrapper.getAttribute('data-tx-success') || 'CHECK YOUR EMAIL', | ||
jlc_hoster_domain = wrapper.getAttribute('data-key') || 'jelastichosting.nl'; | ||
``` | ||
|
||
You can customize this widget with a build system based on Gulp with [SCSS](https://sass-lang.com) preprocessor. | ||
|
||
### Features | ||
* CSS Autoprefixing | ||
* Built-in preview server with BrowserSync | ||
* Compile Sass with libsass | ||
* Lint and minifyscripts | ||
* Image optimization | ||
|
||
### Getting Started | ||
|
||
Requires [Node.js](https://nodejs.org/) v6+ and [Gulp](https://gulpjs.com/) v4+ to run. | ||
|
||
- Install Gulp: `npm install gulp --global` | ||
- [Clone localy](https://confluence.atlassian.com/bitbucket/clone-a-repository-223217891.html) `git clone https://github.com/jelastic/jelastic-widget.git` | ||
- Go to project folder `cd jelastic-widget` | ||
- Install dependencies `npm install -d` | ||
- Run `gulp serve` to start the server and watch for changes | ||
- Run `gulp default` to build for production environments | ||
|
||
You can change CSS in the `assets/css/jlcwidget.scss` file, for example default variables: | ||
|
||
```scss | ||
$color-blue : #0088fb; // default color (blue) | ||
$color-green : #00bea7; // default color for green button | ||
$color-gray : #efefef; | ||
$color-medium : #6b758a; | ||
$color-dark : #5e6981; | ||
$color-red : red; // default error color | ||
|
||
$bdrs: 10px; // button border radius | ||
$width: 280px; // default button size (if you change it, pay attention to font-size of the `.jlc-btn` and `.jlc-input` selectors) | ||
$font-family: 'Open Sans', sans-serif; | ||
``` | ||
|
||
After the build, you will have the following files in the `dist` folder: | ||
|
||
- `index.html` example with widget initialization selector | ||
- `jlcwidget.js` minified JavaScript | ||
- `jlcwidget.css` minified CSS | ||
|
||
#### Change images | ||
|
||
For the best performance all images saved in the SVG format, optimized with [svgomg service](https://jakearchibald.github.io/svgomg/) and included to the CSS/SCSS with BASE64 technology via [base64encode.org](https://www.base64encode.org/). | ||
|
||
Non converted images you can find in `assets/img/` folder. |
Oops, something went wrong.