mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-26 15:59:29 +08:00
Improve building process (es6 bundle)
This commit is contained in:
parent
8967bc3817
commit
0a2b826f71
16 changed files with 1279 additions and 1317 deletions
|
@ -1,10 +1,12 @@
|
|||
|
||||
# transifex
|
||||
tx pull -a
|
||||
|
||||
# dependencies checker
|
||||
npm-check --skip-unused
|
||||
|
||||
# dependencies locker
|
||||
npm shrinkwrap --dev
|
||||
|
||||
# code validation
|
||||
# js code validation
|
||||
gulp v
|
||||
|
563
.eslintrc.js
563
.eslintrc.js
|
@ -1,281 +1,282 @@
|
|||
|
||||
module.exports = {
|
||||
'extends': 'eslint:recommended',
|
||||
'ecmaFeatures': {
|
||||
'modules': true
|
||||
},
|
||||
'parserOptions': {
|
||||
'ecmaVersion': 6,
|
||||
'sourceType': 'module'
|
||||
},
|
||||
'env': {
|
||||
'node': true,
|
||||
'commonjs': true,
|
||||
'es6': true,
|
||||
'browser': true
|
||||
},
|
||||
'globals': {
|
||||
'RL_COMMUNITY': true
|
||||
},
|
||||
// http://eslint.org/docs/rules/
|
||||
'rules': {
|
||||
|
||||
// errors
|
||||
'no-cond-assign': [2, 'always'],
|
||||
'no-console': 2,
|
||||
'no-constant-condition': 2,
|
||||
'no-control-regex': 2,
|
||||
'no-debugger': 2,
|
||||
'no-dupe-args': 2,
|
||||
'no-dupe-keys': 2,
|
||||
'no-duplicate-case': 2,
|
||||
'no-empty': 2,
|
||||
'no-empty-character-class': 2,
|
||||
'no-ex-assign': 2,
|
||||
'no-extra-boolean-cast': 2,
|
||||
// 'no-extra-parens': 2,
|
||||
'no-extra-semi': 2,
|
||||
'no-func-assign': 2,
|
||||
'no-inner-declarations': 2,
|
||||
'no-invalid-regexp': 2,
|
||||
'no-irregular-whitespace': 2,
|
||||
'no-negated-in-lhs': 2,
|
||||
'no-obj-calls': 2,
|
||||
'no-prototype-builtins': 2,
|
||||
'no-regex-spaces': 2,
|
||||
'no-sparse-arrays': 2,
|
||||
'no-unexpected-multiline': 2,
|
||||
'no-unreachable': 2,
|
||||
'no-unsafe-finally': 2,
|
||||
'use-isnan': 2,
|
||||
// 'valid-jsdoc': [2, {
|
||||
// 'requireParamDescription': false,
|
||||
// 'requireReturnDescription': false
|
||||
// }],
|
||||
'valid-typeof': 2,
|
||||
|
||||
// best practices
|
||||
'accessor-pairs': 2,
|
||||
'array-callback-return': 2,
|
||||
'block-scoped-var': 2,
|
||||
// 'complexity': 2,
|
||||
'consistent-return': 2,
|
||||
'curly': 2,
|
||||
'default-case': 2,
|
||||
'dot-location': [2, 'property'],
|
||||
'dot-notation': 2,
|
||||
'eqeqeq': 2,
|
||||
'guard-for-in': 2,
|
||||
'no-alert': 2,
|
||||
'no-caller': 2,
|
||||
'no-case-declarations': 2,
|
||||
'no-div-regex': 2,
|
||||
'no-else-return': 2,
|
||||
'no-empty-function': 2,
|
||||
'no-empty-pattern': 2,
|
||||
'no-eq-null': 2,
|
||||
'no-eval': 2,
|
||||
'no-extend-native': 2,
|
||||
'no-extra-bind': 2,
|
||||
'no-extra-label': 2,
|
||||
'no-fallthrough': 2,
|
||||
'no-floating-decimal': 2,
|
||||
'no-implicit-coercion': [2, {'allow': ['!!', '+']}],
|
||||
'no-implicit-globals': 2,
|
||||
'no-implied-eval': 2,
|
||||
// 'no-invalid-this': 2,
|
||||
'no-iterator': 2,
|
||||
'no-labels': 2,
|
||||
'no-lone-blocks': 2,
|
||||
'no-loop-func': 2,
|
||||
// 'no-magic-numbers': [2, {
|
||||
// 'ignore': [-1, 0, 1],
|
||||
// 'ignoreArrayIndexes': true
|
||||
// }],
|
||||
'no-multi-spaces': 2,
|
||||
'no-multi-str': 2,
|
||||
'no-native-reassign': 2,
|
||||
'no-new': 2,
|
||||
'no-new-func': 2,
|
||||
'no-new-wrappers': 2,
|
||||
'no-octal': 2,
|
||||
'no-octal-escape': 2,
|
||||
// 'no-param-reassign': 2,
|
||||
'no-proto': 2,
|
||||
'no-redeclare': 2,
|
||||
'no-return-assign': 2,
|
||||
'no-script-url': 2,
|
||||
'no-self-assign': 2,
|
||||
'no-self-compare': 2,
|
||||
'no-sequences': 2,
|
||||
'no-throw-literal': 2,
|
||||
'no-unmodified-loop-condition': 2,
|
||||
'no-unused-expressions': 2,
|
||||
'no-unused-labels': 2,
|
||||
'no-useless-call': 2,
|
||||
'no-useless-concat': 2,
|
||||
'no-useless-escape': 2,
|
||||
'no-void': 2,
|
||||
'no-warning-comments': 2,
|
||||
'no-with': 2,
|
||||
'radix': 2,
|
||||
// 'vars-on-top': 2,
|
||||
'wrap-iife': 2,
|
||||
'yoda': [2, 'always'],
|
||||
|
||||
// strict mode
|
||||
'strict': 2,
|
||||
|
||||
// variables
|
||||
'init-declarations': 2,
|
||||
'no-catch-shadow': 2,
|
||||
'no-delete-var': 2,
|
||||
'no-label-var': 2,
|
||||
'no-restricted-globals': 2,
|
||||
'no-shadow': 2,
|
||||
'no-shadow-restricted-names': 2,
|
||||
'no-undef': 2,
|
||||
'no-undef-init': 2,
|
||||
'no-undefined': 2,
|
||||
'no-unused-vars': 2,
|
||||
'no-use-before-define': 2,
|
||||
|
||||
// node.js and commonjs
|
||||
'callback-return': 2,
|
||||
// 'global-require': 2,
|
||||
'handle-callback-err': 2,
|
||||
// 'no-mixed-requires': 2,
|
||||
'no-new-require': 2,
|
||||
'no-path-concat': 2,
|
||||
'no-process-env': 2,
|
||||
'no-process-exit': 2,
|
||||
'no-restricted-modules': 2,
|
||||
// 'no-sync': 2,
|
||||
|
||||
// stylistic issues
|
||||
'array-bracket-spacing': 2,
|
||||
'block-spacing': [2, 'never'],
|
||||
// 'brace-style': [2, 'allman'],
|
||||
'camelcase': 2,
|
||||
'comma-dangle': [2, 'never'],
|
||||
'comma-spacing': 2,
|
||||
'comma-style': 2,
|
||||
'computed-property-spacing': 2,
|
||||
'consistent-this': [2, 'self'],
|
||||
'eol-last': 2,
|
||||
'func-names': [2, 'never'],
|
||||
// 'func-style': 2,
|
||||
'id-blacklist': [2, 'x'],
|
||||
'id-length': [2, {'min': 1, 'max': 50}],
|
||||
'id-match': 2,
|
||||
'indent': [2, 'tab', {
|
||||
'SwitchCase': 1,
|
||||
'VariableDeclarator': {
|
||||
'var': 1,
|
||||
'let': 1,
|
||||
'const': 1
|
||||
}
|
||||
}],
|
||||
'jsx-quotes': 2,
|
||||
'key-spacing': 2,
|
||||
'keyword-spacing': 2,
|
||||
'linebreak-style': [2, 'unix'],
|
||||
// 'lines-around-comment': 2,
|
||||
'max-depth': [2, 10],
|
||||
'max-len': [2, 200],
|
||||
// 'max-lines': 2,
|
||||
'max-nested-callbacks': [2, 5],
|
||||
// 'max-params': 2,
|
||||
// 'max-statements': [2, {'max': 10}, {'ignoreTopLevelFunctions': true}],
|
||||
'max-statements-per-line': 2,
|
||||
'new-cap': 2,
|
||||
'new-parens': 2,
|
||||
// 'newline-after-var': 2,
|
||||
// 'newline-before-return': 2,
|
||||
// 'newline-per-chained-call': 2,
|
||||
'no-array-constructor': 2,
|
||||
'no-bitwise': 2,
|
||||
'no-continue': 2,
|
||||
// 'no-inline-comments': 2,
|
||||
// 'no-lonely-if': 2,
|
||||
// 'no-mixed-operators': 2,
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
'no-multiple-empty-lines': [2, {
|
||||
"max": 1,
|
||||
"maxEOF": 1,
|
||||
"maxBOF": 1
|
||||
}],
|
||||
// 'no-negated-condition': 2,
|
||||
// 'no-nested-ternary': 2,
|
||||
'no-new-object': 2,
|
||||
'no-plusplus': [2, {
|
||||
'allowForLoopAfterthoughts': true
|
||||
}],
|
||||
'no-restricted-syntax': 2,
|
||||
'no-spaced-func': 2,
|
||||
'no-ternary': 0,
|
||||
'no-trailing-spaces': 2, // disallow trailing whitespace at the end of lines
|
||||
// 'no-underscore-dangle': 2, // disallow dangling underscores in identifiers
|
||||
'no-unneeded-ternary': 2, // disallow ternary operators when simpler alternatives exist
|
||||
'no-whitespace-before-property': 2,
|
||||
// 'object-curly-newline': 2,
|
||||
'object-curly-spacing': [2, 'never'],
|
||||
'object-property-newline': [2, {'allowMultiplePropertiesPerLine': true}],
|
||||
// 'one-var': [2, {
|
||||
// 'var': 'always',
|
||||
// 'let': 'always',
|
||||
// 'const': 'always'
|
||||
// }],
|
||||
'one-var-declaration-per-line': [2, 'always'],
|
||||
'operator-assignment': 2,
|
||||
'operator-linebreak': [2, 'after'],
|
||||
// 'padded-blocks': [2, 'never'],
|
||||
// 'quote-props': [2, 'as-needed'],
|
||||
'quotes': [2, 'single'],
|
||||
'require-jsdoc': 2,
|
||||
'semi': [2, 'always'],
|
||||
'semi-spacing': 2,
|
||||
// 'sort-vars': 2,
|
||||
'space-before-blocks': 2,
|
||||
'space-before-function-paren': [2, 'never'],
|
||||
'space-in-parens': 2,
|
||||
'space-infix-ops': 2,
|
||||
'space-unary-ops': 2,
|
||||
'spaced-comment': 2,
|
||||
'unicode-bom': [2, 'never'],
|
||||
'wrap-regex': 2,
|
||||
|
||||
// es6
|
||||
'arrow-body-style': [2, 'as-needed'],
|
||||
'arrow-parens': 2,
|
||||
'arrow-spacing': 2,
|
||||
'constructor-super': 2,
|
||||
'generator-star-spacing': 2,
|
||||
'no-class-assign': 2,
|
||||
'no-confusing-arrow': [2, {'allowParens': true}],
|
||||
'no-const-assign': 2,
|
||||
'no-dupe-class-members': 2,
|
||||
'no-duplicate-imports': 2,
|
||||
'no-new-symbol': 2,
|
||||
'no-restricted-imports': 2,
|
||||
'no-this-before-super': 2,
|
||||
'no-useless-computed-key': 2,
|
||||
'no-useless-constructor': 2,
|
||||
'no-useless-rename': 2,
|
||||
// 'no-var': 2,
|
||||
// 'object-shorthand': 2,
|
||||
// 'prefer-arrow-callback': 2,
|
||||
'prefer-const': 2,
|
||||
// 'prefer-reflect': 2,
|
||||
|
||||
'prefer-rest-params': 2,
|
||||
'prefer-spread': 2,
|
||||
|
||||
// 'prefer-template': 2,
|
||||
'require-yield': 2,
|
||||
'rest-spread-spacing': 2,
|
||||
'sort-imports': 0, // off
|
||||
'template-curly-spacing': 2,
|
||||
'yield-star-spacing': 2
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
'extends': 'eslint:recommended',
|
||||
'ecmaFeatures': {
|
||||
'modules': true
|
||||
},
|
||||
'parserOptions': {
|
||||
'ecmaVersion': 6,
|
||||
'sourceType': 'module'
|
||||
},
|
||||
'env': {
|
||||
'node': true,
|
||||
'commonjs': true,
|
||||
'es6': true,
|
||||
'browser': true
|
||||
},
|
||||
'globals': {
|
||||
'RL_COMMUNITY': true,
|
||||
'RL_ES6': true
|
||||
},
|
||||
// http://eslint.org/docs/rules/
|
||||
'rules': {
|
||||
|
||||
// errors
|
||||
'no-cond-assign': [2, 'always'],
|
||||
'no-console': 2,
|
||||
'no-constant-condition': 2,
|
||||
'no-control-regex': 2,
|
||||
'no-debugger': 2,
|
||||
'no-dupe-args': 2,
|
||||
'no-dupe-keys': 2,
|
||||
'no-duplicate-case': 2,
|
||||
'no-empty': 2,
|
||||
'no-empty-character-class': 2,
|
||||
'no-ex-assign': 2,
|
||||
'no-extra-boolean-cast': 2,
|
||||
// 'no-extra-parens': 2,
|
||||
'no-extra-semi': 2,
|
||||
'no-func-assign': 2,
|
||||
'no-inner-declarations': 2,
|
||||
'no-invalid-regexp': 2,
|
||||
'no-irregular-whitespace': 2,
|
||||
'no-negated-in-lhs': 2,
|
||||
'no-obj-calls': 2,
|
||||
'no-prototype-builtins': 2,
|
||||
'no-regex-spaces': 2,
|
||||
'no-sparse-arrays': 2,
|
||||
'no-unexpected-multiline': 2,
|
||||
'no-unreachable': 2,
|
||||
'no-unsafe-finally': 2,
|
||||
'use-isnan': 2,
|
||||
// 'valid-jsdoc': [2, {
|
||||
// 'requireParamDescription': false,
|
||||
// 'requireReturnDescription': false
|
||||
// }],
|
||||
'valid-typeof': 2,
|
||||
|
||||
// best practices
|
||||
'accessor-pairs': 2,
|
||||
'array-callback-return': 2,
|
||||
'block-scoped-var': 2,
|
||||
// 'complexity': 2,
|
||||
'consistent-return': 2,
|
||||
'curly': 2,
|
||||
'default-case': 2,
|
||||
'dot-location': [2, 'property'],
|
||||
'dot-notation': 2,
|
||||
'eqeqeq': 2,
|
||||
'guard-for-in': 2,
|
||||
'no-alert': 2,
|
||||
'no-caller': 2,
|
||||
'no-case-declarations': 2,
|
||||
'no-div-regex': 2,
|
||||
'no-else-return': 2,
|
||||
'no-empty-function': 2,
|
||||
'no-empty-pattern': 2,
|
||||
'no-eq-null': 2,
|
||||
'no-eval': 2,
|
||||
'no-extend-native': 2,
|
||||
'no-extra-bind': 2,
|
||||
'no-extra-label': 2,
|
||||
'no-fallthrough': 2,
|
||||
'no-floating-decimal': 2,
|
||||
'no-implicit-coercion': [2, {'allow': ['!!', '+']}],
|
||||
'no-implicit-globals': 2,
|
||||
'no-implied-eval': 2,
|
||||
// 'no-invalid-this': 2,
|
||||
'no-iterator': 2,
|
||||
'no-labels': 2,
|
||||
'no-lone-blocks': 2,
|
||||
'no-loop-func': 2,
|
||||
// 'no-magic-numbers': [2, {
|
||||
// 'ignore': [-1, 0, 1],
|
||||
// 'ignoreArrayIndexes': true
|
||||
// }],
|
||||
'no-multi-spaces': 2,
|
||||
'no-multi-str': 2,
|
||||
'no-native-reassign': 2,
|
||||
'no-new': 2,
|
||||
'no-new-func': 2,
|
||||
'no-new-wrappers': 2,
|
||||
'no-octal': 2,
|
||||
'no-octal-escape': 2,
|
||||
// 'no-param-reassign': 2,
|
||||
'no-proto': 2,
|
||||
'no-redeclare': 2,
|
||||
'no-return-assign': 2,
|
||||
'no-script-url': 2,
|
||||
'no-self-assign': 2,
|
||||
'no-self-compare': 2,
|
||||
'no-sequences': 2,
|
||||
'no-throw-literal': 2,
|
||||
'no-unmodified-loop-condition': 2,
|
||||
'no-unused-expressions': 2,
|
||||
'no-unused-labels': 2,
|
||||
'no-useless-call': 2,
|
||||
'no-useless-concat': 2,
|
||||
'no-useless-escape': 2,
|
||||
'no-void': 2,
|
||||
'no-warning-comments': 2,
|
||||
'no-with': 2,
|
||||
'radix': 2,
|
||||
// 'vars-on-top': 2,
|
||||
'wrap-iife': 2,
|
||||
'yoda': [2, 'always'],
|
||||
|
||||
// strict mode
|
||||
'strict': 2,
|
||||
|
||||
// variables
|
||||
'init-declarations': 2,
|
||||
'no-catch-shadow': 2,
|
||||
'no-delete-var': 2,
|
||||
'no-label-var': 2,
|
||||
'no-restricted-globals': 2,
|
||||
'no-shadow': 2,
|
||||
'no-shadow-restricted-names': 2,
|
||||
'no-undef': 2,
|
||||
'no-undef-init': 2,
|
||||
'no-undefined': 2,
|
||||
'no-unused-vars': 2,
|
||||
'no-use-before-define': 2,
|
||||
|
||||
// node.js and commonjs
|
||||
'callback-return': 2,
|
||||
// 'global-require': 2,
|
||||
'handle-callback-err': 2,
|
||||
// 'no-mixed-requires': 2,
|
||||
'no-new-require': 2,
|
||||
'no-path-concat': 2,
|
||||
'no-process-env': 2,
|
||||
'no-process-exit': 2,
|
||||
'no-restricted-modules': 2,
|
||||
// 'no-sync': 2,
|
||||
|
||||
// stylistic issues
|
||||
'array-bracket-spacing': 2,
|
||||
'block-spacing': [2, 'never'],
|
||||
// 'brace-style': [2, 'allman'],
|
||||
'camelcase': 2,
|
||||
'comma-dangle': [2, 'never'],
|
||||
'comma-spacing': 2,
|
||||
'comma-style': 2,
|
||||
'computed-property-spacing': 2,
|
||||
'consistent-this': [2, 'self'],
|
||||
'eol-last': 2,
|
||||
'func-names': [2, 'never'],
|
||||
// 'func-style': 2,
|
||||
'id-blacklist': [2, 'x'],
|
||||
'id-length': [2, {'min': 1, 'max': 50}],
|
||||
'id-match': 2,
|
||||
'indent': [2, 'tab', {
|
||||
'SwitchCase': 1,
|
||||
'VariableDeclarator': {
|
||||
'var': 1,
|
||||
'let': 1,
|
||||
'const': 1
|
||||
}
|
||||
}],
|
||||
'jsx-quotes': 2,
|
||||
'key-spacing': 2,
|
||||
'keyword-spacing': 2,
|
||||
'linebreak-style': [2, 'unix'],
|
||||
// 'lines-around-comment': 2,
|
||||
'max-depth': [2, 10],
|
||||
'max-len': [2, 200],
|
||||
// 'max-lines': 2,
|
||||
'max-nested-callbacks': [2, 5],
|
||||
// 'max-params': 2,
|
||||
// 'max-statements': [2, {'max': 10}, {'ignoreTopLevelFunctions': true}],
|
||||
'max-statements-per-line': 2,
|
||||
'new-cap': 2,
|
||||
'new-parens': 2,
|
||||
// 'newline-after-var': 2,
|
||||
// 'newline-before-return': 2,
|
||||
// 'newline-per-chained-call': 2,
|
||||
'no-array-constructor': 2,
|
||||
'no-bitwise': 2,
|
||||
'no-continue': 2,
|
||||
// 'no-inline-comments': 2,
|
||||
// 'no-lonely-if': 2,
|
||||
// 'no-mixed-operators': 2,
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
'no-multiple-empty-lines': [2, {
|
||||
"max": 1,
|
||||
"maxEOF": 1,
|
||||
"maxBOF": 1
|
||||
}],
|
||||
// 'no-negated-condition': 2,
|
||||
// 'no-nested-ternary': 2,
|
||||
'no-new-object': 2,
|
||||
'no-plusplus': [2, {
|
||||
'allowForLoopAfterthoughts': true
|
||||
}],
|
||||
'no-restricted-syntax': 2,
|
||||
'no-spaced-func': 2,
|
||||
'no-ternary': 0,
|
||||
'no-trailing-spaces': 2, // disallow trailing whitespace at the end of lines
|
||||
// 'no-underscore-dangle': 2, // disallow dangling underscores in identifiers
|
||||
'no-unneeded-ternary': 2, // disallow ternary operators when simpler alternatives exist
|
||||
'no-whitespace-before-property': 2,
|
||||
// 'object-curly-newline': 2,
|
||||
'object-curly-spacing': [2, 'never'],
|
||||
'object-property-newline': [2, {'allowMultiplePropertiesPerLine': true}],
|
||||
// 'one-var': [2, {
|
||||
// 'var': 'always',
|
||||
// 'let': 'always',
|
||||
// 'const': 'always'
|
||||
// }],
|
||||
'one-var-declaration-per-line': [2, 'always'],
|
||||
'operator-assignment': 2,
|
||||
'operator-linebreak': [2, 'after'],
|
||||
// 'padded-blocks': [2, 'never'],
|
||||
// 'quote-props': [2, 'as-needed'],
|
||||
'quotes': [2, 'single'],
|
||||
'require-jsdoc': 2,
|
||||
'semi': [2, 'always'],
|
||||
'semi-spacing': 2,
|
||||
// 'sort-vars': 2,
|
||||
'space-before-blocks': 2,
|
||||
'space-before-function-paren': [2, 'never'],
|
||||
'space-in-parens': 2,
|
||||
'space-infix-ops': 2,
|
||||
'space-unary-ops': 2,
|
||||
'spaced-comment': 2,
|
||||
'unicode-bom': [2, 'never'],
|
||||
'wrap-regex': 2,
|
||||
|
||||
// es6
|
||||
'arrow-body-style': [2, 'as-needed'],
|
||||
'arrow-parens': 2,
|
||||
'arrow-spacing': 2,
|
||||
'constructor-super': 2,
|
||||
'generator-star-spacing': 2,
|
||||
'no-class-assign': 2,
|
||||
'no-confusing-arrow': [2, {'allowParens': true}],
|
||||
'no-const-assign': 2,
|
||||
'no-dupe-class-members': 2,
|
||||
'no-duplicate-imports': 2,
|
||||
'no-new-symbol': 2,
|
||||
'no-restricted-imports': 2,
|
||||
'no-this-before-super': 2,
|
||||
'no-useless-computed-key': 2,
|
||||
'no-useless-constructor': 2,
|
||||
'no-useless-rename': 2,
|
||||
// 'no-var': 2,
|
||||
// 'object-shorthand': 2,
|
||||
// 'prefer-arrow-callback': 2,
|
||||
'prefer-const': 2,
|
||||
// 'prefer-reflect': 2,
|
||||
|
||||
'prefer-rest-params': 2,
|
||||
'prefer-spread': 2,
|
||||
|
||||
// 'prefer-template': 2,
|
||||
'require-yield': 2,
|
||||
'rest-spread-spacing': 2,
|
||||
'sort-imports': 0, // off
|
||||
'template-curly-spacing': 2,
|
||||
'yield-star-spacing': 2
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
tx pull -a
|
|
@ -17,6 +17,46 @@ window.__rlah_clear = () => clearHash();
|
|||
window.__rlah_data = () => RL_APP_DATA_STORAGE;
|
||||
/* eslint-enable */
|
||||
|
||||
const useJsNextBundle = (function() {
|
||||
|
||||
if (!RL_ES6)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* eslint-disable */
|
||||
try {
|
||||
|
||||
eval(`
|
||||
// let + const
|
||||
const x = 5; let y = 4; var z = 4;
|
||||
|
||||
// Arrow Function
|
||||
const f = () => 'rainloop';
|
||||
|
||||
// Default + Rest + Spread
|
||||
const d = (test = 1, ...t) => 'rainloop';
|
||||
d(...[1, 2, 3]);
|
||||
|
||||
// Destructuring
|
||||
let [a, b] = [1, 2];
|
||||
({a, b} = {a: 1, b: 2});
|
||||
|
||||
// Class
|
||||
class Q1 { constructor() {} }
|
||||
|
||||
// Class extends + super
|
||||
class Q2 extends Q1 { constructor() { super() } }
|
||||
|
||||
`);
|
||||
return true;
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
return false;
|
||||
/* eslint-enable */
|
||||
}());
|
||||
|
||||
/**
|
||||
* @param {string} id
|
||||
* @param {string} name
|
||||
|
@ -184,7 +224,7 @@ function runApp()
|
|||
const appData = window.__rlah_data();
|
||||
|
||||
if (window.jassl && progressJs && appData && appData.TemplatesLink && appData.LangLink &&
|
||||
appData.StaticLibJsLink && appData.StaticAppJsLink && appData.StaticEditorJsLink)
|
||||
appData.StaticLibJsLink && appData.StaticAppJsLink && appData.StaticAppJsNextLink && appData.StaticEditorJsLink)
|
||||
{
|
||||
const p = progressJs;
|
||||
|
||||
|
@ -214,7 +254,7 @@ function runApp()
|
|||
Promise.all([libs, common])
|
||||
.then(() => {
|
||||
p.set(30);
|
||||
return window.jassl(appData.StaticAppJsLink);
|
||||
return window.jassl(useJsNextBundle ? appData.StaticAppJsNextLink : appData.StaticAppJsLink);
|
||||
})
|
||||
.then(() => {
|
||||
p.set(50);
|
||||
|
@ -280,12 +320,17 @@ window.__runBoot = function() {
|
|||
window.document.location.replace('./?/NoCookie');
|
||||
}
|
||||
|
||||
const root = document.documentElement;
|
||||
if ('none' !== getComputedStyle('rl-check', 'display'))
|
||||
{
|
||||
const root = document.documentElement;
|
||||
root.className += ' no-css';
|
||||
}
|
||||
|
||||
if (useJsNextBundle)
|
||||
{
|
||||
root.className += ' js-next';
|
||||
}
|
||||
|
||||
if (includeLayout())
|
||||
{
|
||||
includeAppScr(getRainloopBootData());
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
import window from 'window';
|
||||
import _ from '_';
|
||||
import ko from 'ko';
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Common/Enums'),
|
||||
Utils = require('Common/Utils'),
|
||||
Links = require('Common/Links'),
|
||||
|
|
207
gulpfile.js
207
gulpfile.js
|
@ -22,20 +22,17 @@ var
|
|||
zipFile: '',
|
||||
zipFileShort: '',
|
||||
|
||||
paths: {},
|
||||
uglify: {
|
||||
mangle: true,
|
||||
compress: true
|
||||
}
|
||||
paths: {}
|
||||
},
|
||||
|
||||
_ = require('lodash'),
|
||||
fs = require('node-fs'),
|
||||
path = require('path'),
|
||||
notifier = require('node-notifier'),
|
||||
runSequence = require('run-sequence'),
|
||||
|
||||
webpack = require('webpack'),
|
||||
webpackCfg = require('./webpack.config.js'),
|
||||
webpackCfgBuilder = require('./webpack.config.builder.js'),
|
||||
|
||||
argv = require('yargs').argv,
|
||||
|
||||
|
@ -53,25 +50,68 @@ var
|
|||
livereload = require('gulp-livereload'),
|
||||
eslint = require('gulp-eslint'),
|
||||
cache = require('gulp-cached'),
|
||||
ignore = require('gulp-ignore'),
|
||||
filter = require('gulp-filter'),
|
||||
gutil = require('gulp-util')
|
||||
;
|
||||
|
||||
cfg.community = !argv.pro;
|
||||
cfg.next = !!argv.next;
|
||||
|
||||
// webpack
|
||||
if (webpackCfg && webpackCfg.output)
|
||||
function initWebpackCfg(wpCfg)
|
||||
{
|
||||
webpackCfg.output.publicPath = cfg.paths.staticJS;
|
||||
if (wpCfg)
|
||||
{
|
||||
if (wpCfg.output)
|
||||
{
|
||||
wpCfg.output.publicPath = cfg.paths.staticJS;
|
||||
}
|
||||
|
||||
if (wpCfg.plugins)
|
||||
{
|
||||
wpCfg.plugins.push(new webpack.DefinePlugin({
|
||||
'RL_COMMUNITY': cfg.community,
|
||||
'RL_ES6': cfg.next,
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
return wpCfg;
|
||||
}
|
||||
|
||||
if (webpackCfg && webpackCfg.plugins)
|
||||
function webpackCallback(callback)
|
||||
{
|
||||
webpackCfg.plugins.push(new webpack.DefinePlugin({
|
||||
'RL_COMMUNITY': !!cfg.community,
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"'
|
||||
return function(err, stats) {
|
||||
|
||||
if (err)
|
||||
{
|
||||
if (cfg.watch)
|
||||
{
|
||||
webpackError(err);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new gutil.PluginError('webpack', err);
|
||||
}
|
||||
}
|
||||
}));
|
||||
else if (stats && stats.compilation && stats.compilation.errors && stats.compilation.errors[0])
|
||||
{
|
||||
if (cfg.watch)
|
||||
{
|
||||
_.each(stats.compilation.errors, webpackError);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new gutil.PluginError('webpack', stats.compilation.errors[0]);
|
||||
}
|
||||
}
|
||||
|
||||
callback();
|
||||
};
|
||||
}
|
||||
|
||||
function webpackError(err) {
|
||||
|
@ -95,18 +135,6 @@ function getHead()
|
|||
return !cfg.community ? head.rainloop : head.agpl;
|
||||
}
|
||||
|
||||
function regOtherMinTask(sName, sPath, sInc, sOut, sHeader)
|
||||
{
|
||||
gulp.task(sName, function() {
|
||||
return gulp.src(sPath + sInc)
|
||||
.pipe(uglify())
|
||||
.pipe(header(sHeader || ''))
|
||||
.pipe(rename(sOut))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(sPath));
|
||||
});
|
||||
}
|
||||
|
||||
function zipDir(sSrcDir, sDestDir, sFileName)
|
||||
{
|
||||
return gulp.src(sSrcDir + '**/*')
|
||||
|
@ -170,7 +198,6 @@ cfg.paths.momentLocales = 'rainloop/v/' + cfg.devVersion + '/app/localization/mo
|
|||
|
||||
cfg.paths.less = {
|
||||
main: {
|
||||
name: 'less.css',
|
||||
src: 'dev/Styles/@Main.less',
|
||||
watch: ['dev/Styles/*.less'],
|
||||
options: {
|
||||
|
@ -198,8 +225,7 @@ cfg.paths.css = {
|
|||
'node_modules/lightgallery/dist/css/lightgallery.min.css',
|
||||
'node_modules/lightgallery/dist/css/lg-transitions.min.css',
|
||||
'node_modules/Progress.js/minified/progressjs.min.css',
|
||||
'dev/Styles/_progressjs.css',
|
||||
cfg.paths.staticCSS + cfg.paths.less.main.name
|
||||
'dev/Styles/_progressjs.css'
|
||||
]
|
||||
},
|
||||
social: {
|
||||
|
@ -278,48 +304,42 @@ cfg.paths.js = {
|
|||
};
|
||||
|
||||
// CSS
|
||||
gulp.task('less:main', function() {
|
||||
var less = require('gulp-less');
|
||||
|
||||
return gulp.src(cfg.paths.less.main.src)
|
||||
gulp.task('css:clean', function() {
|
||||
return cleanDir(cfg.paths.staticCSS + '/*.css');
|
||||
});
|
||||
|
||||
gulp.task('css:main', function() {
|
||||
var autoprefixer = require('gulp-autoprefixer'),
|
||||
less = require('gulp-less'),
|
||||
lessFilter = filter('**/*.less', {restore: true}),
|
||||
src = cfg.paths.css.main.src.concat([cfg.paths.less.main.src]);
|
||||
|
||||
return gulp.src(src)
|
||||
.pipe(lessFilter)
|
||||
.pipe(gulpif(cfg.watch, plumber({errorHandler: notify.onError("Error: <%= error.message %>")})))
|
||||
.pipe(less({
|
||||
'paths': cfg.paths.less.main.options.paths
|
||||
}))
|
||||
.pipe(rename(cfg.paths.less.main.name))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(cfg.paths.staticCSS))
|
||||
.on('error', gutil.log);
|
||||
});
|
||||
|
||||
gulp.task('css:social', function() {
|
||||
var autoprefixer = require('gulp-autoprefixer');
|
||||
return gulp.src(cfg.paths.css.social.src)
|
||||
.pipe(concat(cfg.paths.css.social.name))
|
||||
.pipe(autoprefixer('last 3 versions', '> 1%', 'ie 9', 'Firefox ESR', 'Opera 12.1'))
|
||||
.pipe(replace(/\.\.\/(img|images|fonts|svg)\//g, '$1/'))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(cfg.paths.staticCSS));
|
||||
});
|
||||
|
||||
gulp.task('css:main-begin', ['less:main', 'css:social'], function() {
|
||||
var autoprefixer = require('gulp-autoprefixer');
|
||||
return gulp.src(cfg.paths.css.main.src)
|
||||
.pipe(lessFilter.restore)
|
||||
.pipe(concat(cfg.paths.css.main.name))
|
||||
.pipe(autoprefixer('last 3 versions', '> 1%', 'ie 9', 'Firefox ESR', 'Opera 12.1'))
|
||||
.pipe(autoprefixer('last 3 versions', '> 1%', 'ie 9', 'ie 10', 'ie 11', 'Firefox ESR'))
|
||||
.pipe(replace(/\.\.\/(img|images|fonts|svg)\//g, '$1/'))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(cfg.paths.staticCSS))
|
||||
.pipe(livereload());
|
||||
});
|
||||
|
||||
gulp.task('css:clear-less', ['css:main-begin'], function() {
|
||||
return gulp.src(cfg.paths.staticCSS + cfg.paths.less.main.name, {read: false})
|
||||
.pipe(require('gulp-rimraf')());
|
||||
gulp.task('css:social', function() {
|
||||
var autoprefixer = require('gulp-autoprefixer');
|
||||
return gulp.src(cfg.paths.css.social.src)
|
||||
.pipe(concat(cfg.paths.css.social.name))
|
||||
.pipe(autoprefixer('last 3 versions', '> 1%', 'ie 9', 'ie 10', 'ie 11', 'Firefox ESR'))
|
||||
.pipe(replace(/\.\.\/(img|images|fonts|svg)\//g, '$1/'))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(cfg.paths.staticCSS));
|
||||
});
|
||||
|
||||
gulp.task('css:main', ['css:clear-less']);
|
||||
|
||||
gulp.task('css:main:min', ['css:main'], function() {
|
||||
var cleanCSS = require('gulp-clean-css');
|
||||
return gulp.src(cfg.paths.staticCSS + cfg.paths.css.main.name)
|
||||
|
@ -355,11 +375,11 @@ gulp.task('js:openpgpworker', function() {
|
|||
.pipe(gulp.dest(cfg.paths.staticMinJS));
|
||||
});
|
||||
|
||||
gulp.task('js:moment:locales-clear', function() {
|
||||
gulp.task('moment:locales-clear', function() {
|
||||
return cleanDir('rainloop/v/' + cfg.devVersion + '/app/localization/moment/*.js');
|
||||
});
|
||||
|
||||
gulp.task('js:moment:locales', ['js:moment:locales-clear'], function() {
|
||||
gulp.task('moment:locales', ['moment:locales-clear'], function() {
|
||||
return gulp.src(cfg.paths.js.moment.locales)
|
||||
.pipe(gulp.dest(cfg.paths.momentLocales));
|
||||
});
|
||||
|
@ -383,36 +403,27 @@ gulp.task('js:ckeditor:beautify', function() {
|
|||
.pipe(gulp.dest(cfg.paths.static + 'ckeditor/'));
|
||||
});
|
||||
|
||||
gulp.task('js:webpack', function(callback) {
|
||||
webpack(webpackCfg, function(err, stats) {
|
||||
|
||||
if (err)
|
||||
{
|
||||
if (cfg.watch)
|
||||
{
|
||||
webpackError(err);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new gutil.PluginError('webpack', err);
|
||||
}
|
||||
}
|
||||
else if (stats && stats.compilation && stats.compilation.errors && stats.compilation.errors[0])
|
||||
{
|
||||
if (cfg.watch)
|
||||
{
|
||||
_.each(stats.compilation.errors, webpackError);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new gutil.PluginError('webpack', stats.compilation.errors[0]);
|
||||
}
|
||||
}
|
||||
|
||||
callback();
|
||||
});
|
||||
gulp.task('js:clean', function() {
|
||||
return cleanDir(cfg.paths.staticJS + '/**/*.js');
|
||||
});
|
||||
|
||||
gulp.task('js:webpack:main', function(callback) {
|
||||
webpack(initWebpackCfg(webpackCfgBuilder()), webpackCallback(callback));
|
||||
});
|
||||
|
||||
gulp.task('js:webpack:next', function(callback) {
|
||||
if (cfg.next)
|
||||
{
|
||||
webpack(initWebpackCfg(webpackCfgBuilder(true)), webpackCallback(callback));
|
||||
}
|
||||
else
|
||||
{
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
gulp.task('js:webpack', ['js:webpack:main', 'js:webpack:next']);
|
||||
|
||||
gulp.task('js:app', ['js:webpack'], function() {
|
||||
return gulp.src(cfg.paths.staticJS + cfg.paths.js.app.name)
|
||||
.pipe(header(getHead() + '\n'))
|
||||
|
@ -432,8 +443,12 @@ gulp.task('js:admin', ['js:webpack'], function() {
|
|||
// - min
|
||||
gulp.task('js:min', ['js:app', 'js:admin', 'js:validate'], function() {
|
||||
return gulp.src(cfg.paths.staticJS + '*.js')
|
||||
.pipe(ignore.exclude('*.next.js'))
|
||||
.pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
|
||||
.pipe(uglify(cfg.uglify))
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true
|
||||
}))
|
||||
.pipe(eol('\n', true))
|
||||
.pipe(gulp.dest(cfg.paths.staticMinJS))
|
||||
.on('error', gutil.log);
|
||||
|
@ -640,10 +655,20 @@ gulp.task('rainloop:owncloud:shortname', ['rainloop:owncloud:zip'], function(cal
|
|||
gulp.task('rainloop:owncloud:sign', ['rainloop:owncloud:shortname'], signFileTask);
|
||||
|
||||
// MAIN
|
||||
gulp.task('js:pgp', ['js:openpgp', 'js:openpgpworker']);
|
||||
gulp.task('js:moment', ['js:moment:locales']);
|
||||
gulp.task('moment', ['moment:locales']);
|
||||
gulp.task('openpgp', ['js:openpgp', 'js:openpgpworker']);
|
||||
|
||||
gulp.task('js', ['js:libs', 'js:min']);
|
||||
gulp.task('css', ['css:min']);
|
||||
|
||||
gulp.task('vendors', ['moment', 'openpgp', 'ckeditor', 'fontastic', 'lightgallery']);
|
||||
|
||||
gulp.task('clean', ['js:clean', 'css:clean']);
|
||||
|
||||
gulp.task('default', function(callback) {
|
||||
runSequence('clean', ['js', 'css', 'vendors'], callback);
|
||||
});
|
||||
|
||||
gulp.task('default', ['js:libs', 'js:pgp', 'js:moment', 'js:min', 'css:min', 'ckeditor', 'fontastic', 'lightgallery']);
|
||||
gulp.task('fast', ['js:app', 'js:admin', 'css:main']);
|
||||
|
||||
gulp.task('rainloop:start', ['rainloop:copy', 'rainloop:setup']);
|
||||
|
|
608
npm-shrinkwrap.json
generated
608
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load diff
10
package.json
10
package.json
|
@ -53,8 +53,7 @@
|
|||
"babel-loader": "^6.1.0",
|
||||
"babel-plugin-transform-runtime": "^6.9.0",
|
||||
"babel-preset-es2015": "^6.13.2",
|
||||
"babel-preset-es2015-loose": "^7.0.0",
|
||||
"babel-preset-es2015-loose-native-modules": "^1.0.0",
|
||||
"babel-preset-es2016": "^6.11.3",
|
||||
"babel-preset-stage-0": "^6.5.0",
|
||||
"babel-runtime": "^6.1.18",
|
||||
"es6-promise-polyfill": "^1.2.0",
|
||||
|
@ -66,9 +65,11 @@
|
|||
"gulp-concat-util": "^0.5.5",
|
||||
"gulp-eol": "^0.1.2",
|
||||
"gulp-eslint": "^3.0.1",
|
||||
"gulp-header": "^1.8.7",
|
||||
"gulp-filter": "^4.0.0",
|
||||
"gulp-header": "^1.8.8",
|
||||
"gulp-if": "^2.0.1",
|
||||
"gulp-less": "1.3.6",
|
||||
"gulp-ignore": "^2.0.1",
|
||||
"gulp-less": "^3.1.0",
|
||||
"gulp-livereload": "~3.8.0",
|
||||
"gulp-notify": "~2.2.0",
|
||||
"gulp-plumber": "^1.1.0",
|
||||
|
@ -105,6 +106,7 @@
|
|||
"raw-loader": "^0.5.1",
|
||||
"rifraf": "^2.0.2",
|
||||
"rimraf": "^2.5.4",
|
||||
"run-sequence": "^1.2.2",
|
||||
"simplestatemanager": "^3.1.3",
|
||||
"tinycon": "github:tommoor/tinycon",
|
||||
"underscore": "^1.8.3",
|
||||
|
|
|
@ -1947,6 +1947,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
|
|||
|
||||
$aResult['StaticLibJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').'libs.js');
|
||||
$aResult['StaticAppJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').($bAdmin ? 'admin' : 'app').'.js');
|
||||
$aResult['StaticAppJsNextLink'] = $this->StaticPath('js/'.($bAdmin ? 'admin' : 'app').'.next.js'); // todo min
|
||||
$aResult['StaticEditorJsLink'] = $this->StaticPath('ckeditor/ckeditor.js');
|
||||
|
||||
$aResult['EditorDefaultType'] = \in_array($aResult['EditorDefaultType'], array('Plain', 'Html', 'HtmlForced', 'PlainForced')) ?
|
||||
|
|
1
vendors/bootstrap/.code-changed
vendored
Normal file
1
vendors/bootstrap/.code-changed
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
939
vendors/bootstrap/less/navbar.less
vendored
939
vendors/bootstrap/less/navbar.less
vendored
|
@ -1,469 +1,470 @@
|
|||
//
|
||||
// Navbars (Redux)
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// COMMON STYLES
|
||||
// -------------
|
||||
|
||||
// Base class and wrapper
|
||||
.navbar {
|
||||
overflow: visible;
|
||||
margin-bottom: @baseLineHeight;
|
||||
color: @navbarText;
|
||||
|
||||
// Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
|
||||
*position: relative;
|
||||
*z-index: 2;
|
||||
}
|
||||
|
||||
// Inner for background effects
|
||||
// Gradient is applied to its own element because overflow visible is not honored by IE when filter is present
|
||||
.navbar-inner {
|
||||
min-height: @navbarHeight;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
#gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
|
||||
border: 1px solid @navbarBorder;
|
||||
.border-radius(4px);
|
||||
.box-shadow(0 1px 4px rgba(0,0,0,.065));
|
||||
}
|
||||
|
||||
// Set width to auto for default container
|
||||
// We then reset it for fixed navbars in the #gridSystem mixin
|
||||
.navbar .container {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
// Override the default collapsed state
|
||||
.nav-collapse.collapse {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
// Brand: website or project name
|
||||
// -------------------------
|
||||
.navbar .brand {
|
||||
float: left;
|
||||
display: block;
|
||||
// Vertically center the text given @navbarHeight
|
||||
padding: ((@navbarHeight - @baseLineHeight) / 2) 20px ((@navbarHeight - @baseLineHeight) / 2);
|
||||
margin-left: -20px; // negative indent to left-align the text down the page
|
||||
font-size: 20px;
|
||||
font-weight: 200;
|
||||
color: @navbarBrandColor;
|
||||
text-shadow: 0 1px 0 @navbarBackgroundHighlight;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Plain text in topbar
|
||||
// -------------------------
|
||||
.navbar-text {
|
||||
margin-bottom: 0;
|
||||
line-height: @navbarHeight;
|
||||
}
|
||||
|
||||
// Janky solution for now to account for links outside the .nav
|
||||
// -------------------------
|
||||
.navbar-link {
|
||||
color: @navbarLinkColor;
|
||||
&:hover {
|
||||
color: @navbarLinkColorHover;
|
||||
}
|
||||
}
|
||||
|
||||
// Dividers in navbar
|
||||
// -------------------------
|
||||
.navbar .divider-vertical {
|
||||
height: @navbarHeight;
|
||||
margin: 0 9px;
|
||||
border-left: 1px solid @navbarBackground;
|
||||
border-right: 1px solid @navbarBackgroundHighlight;
|
||||
}
|
||||
|
||||
// Buttons in navbar
|
||||
// -------------------------
|
||||
.navbar .btn,
|
||||
.navbar .btn-group {
|
||||
.navbarVerticalAlign(28px); // Vertically center in navbar
|
||||
}
|
||||
.navbar .btn-group .btn {
|
||||
margin: 0; // then undo the margin here so we don't accidentally double it
|
||||
}
|
||||
|
||||
// Navbar forms
|
||||
.navbar-form {
|
||||
margin-bottom: 0; // remove default bottom margin
|
||||
.clearfix();
|
||||
input,
|
||||
select,
|
||||
.radio,
|
||||
.checkbox {
|
||||
.navbarVerticalAlign(30px); // Vertically center in navbar
|
||||
}
|
||||
input,
|
||||
select,
|
||||
.btn {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
input[type="image"],
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
margin-top: 3px;
|
||||
}
|
||||
.input-append,
|
||||
.input-prepend {
|
||||
margin-top: 6px;
|
||||
white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
|
||||
input {
|
||||
margin-top: 0; // remove the margin on top since it's on the parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Navbar search
|
||||
.navbar-search {
|
||||
position: relative;
|
||||
float: left;
|
||||
.navbarVerticalAlign(30px); // Vertically center in navbar
|
||||
margin-bottom: 0;
|
||||
.search-query {
|
||||
margin-bottom: 0;
|
||||
padding: 4px 14px;
|
||||
#font > .sans-serif(13px, normal, 1);
|
||||
.border-radius(15px); // redeclare because of specificity of the type attribute
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Static navbar
|
||||
// -------------------------
|
||||
|
||||
.navbar-static-top {
|
||||
position: static;
|
||||
width: 100%;
|
||||
margin-bottom: 0; // remove 18px margin for default navbar
|
||||
.navbar-inner {
|
||||
.border-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Fixed navbar
|
||||
// -------------------------
|
||||
|
||||
// Shared (top/bottom) styles
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: @zindexFixedNavbar;
|
||||
margin-bottom: 0; // remove 18px margin for default navbar
|
||||
}
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom,
|
||||
.navbar-static-top {
|
||||
.navbar-inner {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
.navbar-fixed-top .navbar-inner,
|
||||
.navbar-fixed-bottom .navbar-inner {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
.border-radius(0);
|
||||
}
|
||||
|
||||
// Reset container width
|
||||
// Required here as we reset the width earlier on and the grid mixins don't override early enough
|
||||
.navbar-static-top .container,
|
||||
.navbar-fixed-top .container,
|
||||
.navbar-fixed-bottom .container {
|
||||
#grid > .core > .span(@gridColumns);
|
||||
}
|
||||
|
||||
// Fixed to top
|
||||
.navbar-fixed-top {
|
||||
top: 0;
|
||||
}
|
||||
.navbar-fixed-top,
|
||||
.navbar-static-top {
|
||||
.navbar-inner {
|
||||
.box-shadow(~"inset 0 -1px 0 rgba(0,0,0,.1), 0 1px 10px rgba(0,0,0,.1)");
|
||||
}
|
||||
}
|
||||
|
||||
// Fixed to bottom
|
||||
.navbar-fixed-bottom {
|
||||
bottom: 0;
|
||||
.navbar-inner {
|
||||
.box-shadow(~"inset 0 1px 0 rgba(0,0,0,.1), 0 -1px 10px rgba(0,0,0,.1)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// NAVIGATION
|
||||
// ----------
|
||||
|
||||
.navbar .nav {
|
||||
position: relative;
|
||||
left: 0;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
.navbar .nav.pull-right {
|
||||
float: right; // redeclare due to specificity
|
||||
}
|
||||
.navbar .nav > li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
// Links
|
||||
.navbar .nav > li > a {
|
||||
float: none;
|
||||
// Vertically center the text given @navbarHeight
|
||||
padding: ((@navbarHeight - @baseLineHeight) / 2) 15px ((@navbarHeight - @baseLineHeight) / 2);
|
||||
color: @navbarLinkColor;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 1px 0 @navbarBackgroundHighlight;
|
||||
}
|
||||
.navbar .nav .dropdown-toggle .caret {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
// Hover
|
||||
.navbar .nav > li > a:focus,
|
||||
.navbar .nav > li > a:hover {
|
||||
background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
|
||||
color: @navbarLinkColorHover;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Active nav items
|
||||
.navbar .nav > .active > a,
|
||||
.navbar .nav > .active > a:hover,
|
||||
.navbar .nav > .active > a:focus {
|
||||
color: @navbarLinkColorActive;
|
||||
text-decoration: none;
|
||||
background-color: @navbarLinkBackgroundActive;
|
||||
-webkit-box-shadow: inset 0 3px 8px rgba(0,0,0,.125);
|
||||
-moz-box-shadow: inset 0 3px 8px rgba(0,0,0,.125);
|
||||
box-shadow: inset 0 3px 8px rgba(0,0,0,.125);
|
||||
}
|
||||
|
||||
// Navbar button for toggling navbar items in responsive layouts
|
||||
// These definitions need to come after '.navbar .btn'
|
||||
.navbar .btn-navbar {
|
||||
display: none;
|
||||
float: right;
|
||||
padding: 7px 10px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
.buttonBackground(darken(@navbarBackgroundHighlight, 5%), darken(@navbarBackground, 5%));
|
||||
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)");
|
||||
}
|
||||
.navbar .btn-navbar .icon-bar {
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 2px;
|
||||
background-color: #f5f5f5;
|
||||
.border-radius(1px);
|
||||
.box-shadow(0 1px 0 rgba(0,0,0,.25));
|
||||
}
|
||||
.btn-navbar .icon-bar + .icon-bar {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Dropdown menus
|
||||
// --------------
|
||||
|
||||
// Menu position and menu carets
|
||||
.navbar .nav > li > .dropdown-menu {
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-bottom-color: @dropdownBorder;
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 9px;
|
||||
}
|
||||
&:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid @dropdownBackground;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
// Menu position and menu caret support for dropups via extra dropup class
|
||||
.navbar-fixed-bottom .nav > li > .dropdown-menu {
|
||||
&:before {
|
||||
border-top: 7px solid #ccc;
|
||||
border-top-color: @dropdownBorder;
|
||||
border-bottom: 0;
|
||||
bottom: -7px;
|
||||
top: auto;
|
||||
}
|
||||
&:after {
|
||||
border-top: 6px solid @dropdownBackground;
|
||||
border-bottom: 0;
|
||||
bottom: -6px;
|
||||
top: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove background color from open dropdown
|
||||
.navbar .nav li.dropdown.open > .dropdown-toggle,
|
||||
.navbar .nav li.dropdown.active > .dropdown-toggle,
|
||||
.navbar .nav li.dropdown.open.active > .dropdown-toggle {
|
||||
background-color: @navbarLinkBackgroundActive;
|
||||
color: @navbarLinkColorActive;
|
||||
}
|
||||
.navbar .nav li.dropdown > .dropdown-toggle .caret {
|
||||
border-top-color: @navbarLinkColor;
|
||||
border-bottom-color: @navbarLinkColor;
|
||||
}
|
||||
.navbar .nav li.dropdown.open > .dropdown-toggle .caret,
|
||||
.navbar .nav li.dropdown.active > .dropdown-toggle .caret,
|
||||
.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
|
||||
border-top-color: @navbarLinkColorActive;
|
||||
border-bottom-color: @navbarLinkColorActive;
|
||||
}
|
||||
|
||||
// Right aligned menus need alt position
|
||||
.navbar .pull-right > li > .dropdown-menu,
|
||||
.navbar .nav > li > .dropdown-menu.pull-right {
|
||||
left: auto;
|
||||
right: 0;
|
||||
&:before {
|
||||
left: auto;
|
||||
right: 12px;
|
||||
}
|
||||
&:after {
|
||||
left: auto;
|
||||
right: 13px;
|
||||
}
|
||||
.dropdown-menu {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
margin-left: 0;
|
||||
margin-right: -1px;
|
||||
.border-radius(6px 0 6px 6px);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Inverted navbar
|
||||
// -------------------------
|
||||
|
||||
.navbar-inverse {
|
||||
color: @navbarInverseText;
|
||||
|
||||
.navbar-inner {
|
||||
#gradient > .vertical(@navbarInverseBackgroundHighlight, @navbarInverseBackground);
|
||||
border-color: @navbarInverseBorder;
|
||||
}
|
||||
|
||||
.brand,
|
||||
.nav > li > a {
|
||||
color: @navbarInverseLinkColor;
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
||||
&:hover {
|
||||
color: @navbarInverseLinkColorHover;
|
||||
}
|
||||
}
|
||||
|
||||
.nav > li > a:focus,
|
||||
.nav > li > a:hover {
|
||||
background-color: @navbarInverseLinkBackgroundHover;
|
||||
color: @navbarInverseLinkColorHover;
|
||||
}
|
||||
|
||||
.nav .active > a,
|
||||
.nav .active > a:hover,
|
||||
.nav .active > a:focus {
|
||||
color: @navbarInverseLinkColorActive;
|
||||
background-color: @navbarInverseLinkBackgroundActive;
|
||||
}
|
||||
|
||||
// Inline text links
|
||||
.navbar-link {
|
||||
color: @navbarInverseLinkColor;
|
||||
&:hover {
|
||||
color: @navbarInverseLinkColorHover;
|
||||
}
|
||||
}
|
||||
|
||||
// Dividers in navbar
|
||||
.divider-vertical {
|
||||
border-left-color: @navbarInverseBackground;
|
||||
border-right-color: @navbarInverseBackgroundHighlight;
|
||||
}
|
||||
|
||||
// Dropdowns
|
||||
.nav li.dropdown.open > .dropdown-toggle,
|
||||
.nav li.dropdown.active > .dropdown-toggle,
|
||||
.nav li.dropdown.open.active > .dropdown-toggle {
|
||||
background-color: @navbarInverseLinkBackgroundActive;
|
||||
color: @navbarInverseLinkColorActive;
|
||||
}
|
||||
.nav li.dropdown > .dropdown-toggle .caret {
|
||||
border-top-color: @navbarInverseLinkColor;
|
||||
border-bottom-color: @navbarInverseLinkColor;
|
||||
}
|
||||
.nav li.dropdown.open > .dropdown-toggle .caret,
|
||||
.nav li.dropdown.active > .dropdown-toggle .caret,
|
||||
.nav li.dropdown.open.active > .dropdown-toggle .caret {
|
||||
border-top-color: @navbarInverseLinkColorActive;
|
||||
border-bottom-color: @navbarInverseLinkColorActive;
|
||||
}
|
||||
|
||||
// Navbar search
|
||||
.navbar-search {
|
||||
.search-query {
|
||||
color: @white;
|
||||
background-color: @navbarInverseSearchBackground;
|
||||
border-color: @navbarInverseSearchBorder;
|
||||
.box-shadow(~"inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15)");
|
||||
.transition(none);
|
||||
.placeholder(@navbarInverseSearchPlaceholderColor);
|
||||
|
||||
// Focus states (we use .focused since IE7-8 and down doesn't support :focus)
|
||||
&:focus,
|
||||
&.focused {
|
||||
padding: 5px 15px;
|
||||
color: @grayDark;
|
||||
text-shadow: 0 1px 0 @white;
|
||||
background-color: @navbarInverseSearchBackgroundFocus;
|
||||
border: 0;
|
||||
.box-shadow(0 0 3px rgba(0,0,0,.15));
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Navbar collapse button
|
||||
.btn-navbar {
|
||||
.buttonBackground(darken(@navbarInverseBackgroundHighlight, 5%), darken(@navbarInverseBackground, 5%));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Navbars (Redux)
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// COMMON STYLES
|
||||
// -------------
|
||||
|
||||
// Base class and wrapper
|
||||
.navbar {
|
||||
overflow: visible;
|
||||
margin-bottom: @baseLineHeight;
|
||||
color: @navbarText;
|
||||
|
||||
// Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
|
||||
*position: relative;
|
||||
*z-index: 2;
|
||||
}
|
||||
|
||||
// Inner for background effects
|
||||
// Gradient is applied to its own element because overflow visible is not honored by IE when filter is present
|
||||
.navbar-inner {
|
||||
min-height: @navbarHeight;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
#gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
|
||||
border: 1px solid @navbarBorder;
|
||||
.border-radius(4px);
|
||||
.box-shadow(0 1px 4px rgba(0,0,0,.065));
|
||||
}
|
||||
|
||||
// Set width to auto for default container
|
||||
// We then reset it for fixed navbars in the #gridSystem mixin
|
||||
.navbar .container {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
// Override the default collapsed state
|
||||
.nav-collapse.collapse {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
// Brand: website or project name
|
||||
// -------------------------
|
||||
.navbar .brand {
|
||||
float: left;
|
||||
display: block;
|
||||
// Vertically center the text given @navbarHeight
|
||||
padding: ((@navbarHeight - @baseLineHeight) / 2) 20px ((@navbarHeight - @baseLineHeight) / 2);
|
||||
margin-left: -20px; // negative indent to left-align the text down the page
|
||||
font-size: 20px;
|
||||
font-weight: 200;
|
||||
color: @navbarBrandColor;
|
||||
text-shadow: 0 1px 0 @navbarBackgroundHighlight;
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Plain text in topbar
|
||||
// -------------------------
|
||||
.navbar-text {
|
||||
margin-bottom: 0;
|
||||
line-height: @navbarHeight;
|
||||
}
|
||||
|
||||
// Janky solution for now to account for links outside the .nav
|
||||
// -------------------------
|
||||
.navbar-link {
|
||||
color: @navbarLinkColor;
|
||||
&:hover {
|
||||
color: @navbarLinkColorHover;
|
||||
}
|
||||
}
|
||||
|
||||
// Dividers in navbar
|
||||
// -------------------------
|
||||
.navbar .divider-vertical {
|
||||
height: @navbarHeight;
|
||||
margin: 0 9px;
|
||||
border-left: 1px solid @navbarBackground;
|
||||
border-right: 1px solid @navbarBackgroundHighlight;
|
||||
}
|
||||
|
||||
// Buttons in navbar
|
||||
// -------------------------
|
||||
.navbar .btn,
|
||||
.navbar .btn-group {
|
||||
.navbarVerticalAlign(28px); // Vertically center in navbar
|
||||
}
|
||||
.navbar .btn-group .btn {
|
||||
margin: 0; // then undo the margin here so we don't accidentally double it
|
||||
}
|
||||
|
||||
// Navbar forms
|
||||
.navbar-form {
|
||||
margin-bottom: 0; // remove default bottom margin
|
||||
.clearfix();
|
||||
input,
|
||||
select,
|
||||
.radio,
|
||||
.checkbox {
|
||||
.navbarVerticalAlign(30px); // Vertically center in navbar
|
||||
}
|
||||
input,
|
||||
select,
|
||||
.btn {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
input[type="image"],
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
margin-top: 3px;
|
||||
}
|
||||
.input-append,
|
||||
.input-prepend {
|
||||
margin-top: 6px;
|
||||
white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
|
||||
input {
|
||||
margin-top: 0; // remove the margin on top since it's on the parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Navbar search
|
||||
.navbar-search {
|
||||
position: relative;
|
||||
float: left;
|
||||
.navbarVerticalAlign(30px); // Vertically center in navbar
|
||||
margin-bottom: 0;
|
||||
.search-query {
|
||||
margin-bottom: 0;
|
||||
padding: 4px 14px;
|
||||
#font > .sans-serif(13px, normal, 1);
|
||||
.border-radius(15px); // redeclare because of specificity of the type attribute
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Static navbar
|
||||
// -------------------------
|
||||
|
||||
.navbar-static-top {
|
||||
position: static;
|
||||
width: 100%;
|
||||
margin-bottom: 0; // remove 18px margin for default navbar
|
||||
.navbar-inner {
|
||||
.border-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Fixed navbar
|
||||
// -------------------------
|
||||
|
||||
// Shared (top/bottom) styles
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: @zindexFixedNavbar;
|
||||
margin-bottom: 0; // remove 18px margin for default navbar
|
||||
}
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom,
|
||||
.navbar-static-top {
|
||||
.navbar-inner {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
.navbar-fixed-top .navbar-inner,
|
||||
.navbar-fixed-bottom .navbar-inner {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
.border-radius(0);
|
||||
}
|
||||
|
||||
// Reset container width
|
||||
// Required here as we reset the width earlier on and the grid mixins don't override early enough
|
||||
.navbar-static-top .container,
|
||||
.navbar-fixed-top .container,
|
||||
.navbar-fixed-bottom .container {
|
||||
// #grid > .core > .span(@gridColumns); // (less 1.3.6 > 3.1.0)
|
||||
width: (@gridColumnWidth * @gridColumns) + (@gridGutterWidth * (@gridColumns - 1));
|
||||
}
|
||||
|
||||
// Fixed to top
|
||||
.navbar-fixed-top {
|
||||
top: 0;
|
||||
}
|
||||
.navbar-fixed-top,
|
||||
.navbar-static-top {
|
||||
.navbar-inner {
|
||||
.box-shadow(~"inset 0 -1px 0 rgba(0,0,0,.1), 0 1px 10px rgba(0,0,0,.1)");
|
||||
}
|
||||
}
|
||||
|
||||
// Fixed to bottom
|
||||
.navbar-fixed-bottom {
|
||||
bottom: 0;
|
||||
.navbar-inner {
|
||||
.box-shadow(~"inset 0 1px 0 rgba(0,0,0,.1), 0 -1px 10px rgba(0,0,0,.1)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// NAVIGATION
|
||||
// ----------
|
||||
|
||||
.navbar .nav {
|
||||
position: relative;
|
||||
left: 0;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
.navbar .nav.pull-right {
|
||||
float: right; // redeclare due to specificity
|
||||
}
|
||||
.navbar .nav > li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
// Links
|
||||
.navbar .nav > li > a {
|
||||
float: none;
|
||||
// Vertically center the text given @navbarHeight
|
||||
padding: ((@navbarHeight - @baseLineHeight) / 2) 15px ((@navbarHeight - @baseLineHeight) / 2);
|
||||
color: @navbarLinkColor;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 1px 0 @navbarBackgroundHighlight;
|
||||
}
|
||||
.navbar .nav .dropdown-toggle .caret {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
// Hover
|
||||
.navbar .nav > li > a:focus,
|
||||
.navbar .nav > li > a:hover {
|
||||
background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
|
||||
color: @navbarLinkColorHover;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Active nav items
|
||||
.navbar .nav > .active > a,
|
||||
.navbar .nav > .active > a:hover,
|
||||
.navbar .nav > .active > a:focus {
|
||||
color: @navbarLinkColorActive;
|
||||
text-decoration: none;
|
||||
background-color: @navbarLinkBackgroundActive;
|
||||
-webkit-box-shadow: inset 0 3px 8px rgba(0,0,0,.125);
|
||||
-moz-box-shadow: inset 0 3px 8px rgba(0,0,0,.125);
|
||||
box-shadow: inset 0 3px 8px rgba(0,0,0,.125);
|
||||
}
|
||||
|
||||
// Navbar button for toggling navbar items in responsive layouts
|
||||
// These definitions need to come after '.navbar .btn'
|
||||
.navbar .btn-navbar {
|
||||
display: none;
|
||||
float: right;
|
||||
padding: 7px 10px;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
.buttonBackground(darken(@navbarBackgroundHighlight, 5%), darken(@navbarBackground, 5%));
|
||||
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)");
|
||||
}
|
||||
.navbar .btn-navbar .icon-bar {
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 2px;
|
||||
background-color: #f5f5f5;
|
||||
.border-radius(1px);
|
||||
.box-shadow(0 1px 0 rgba(0,0,0,.25));
|
||||
}
|
||||
.btn-navbar .icon-bar + .icon-bar {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Dropdown menus
|
||||
// --------------
|
||||
|
||||
// Menu position and menu carets
|
||||
.navbar .nav > li > .dropdown-menu {
|
||||
&:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-bottom-color: @dropdownBorder;
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 9px;
|
||||
}
|
||||
&:after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid @dropdownBackground;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
// Menu position and menu caret support for dropups via extra dropup class
|
||||
.navbar-fixed-bottom .nav > li > .dropdown-menu {
|
||||
&:before {
|
||||
border-top: 7px solid #ccc;
|
||||
border-top-color: @dropdownBorder;
|
||||
border-bottom: 0;
|
||||
bottom: -7px;
|
||||
top: auto;
|
||||
}
|
||||
&:after {
|
||||
border-top: 6px solid @dropdownBackground;
|
||||
border-bottom: 0;
|
||||
bottom: -6px;
|
||||
top: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove background color from open dropdown
|
||||
.navbar .nav li.dropdown.open > .dropdown-toggle,
|
||||
.navbar .nav li.dropdown.active > .dropdown-toggle,
|
||||
.navbar .nav li.dropdown.open.active > .dropdown-toggle {
|
||||
background-color: @navbarLinkBackgroundActive;
|
||||
color: @navbarLinkColorActive;
|
||||
}
|
||||
.navbar .nav li.dropdown > .dropdown-toggle .caret {
|
||||
border-top-color: @navbarLinkColor;
|
||||
border-bottom-color: @navbarLinkColor;
|
||||
}
|
||||
.navbar .nav li.dropdown.open > .dropdown-toggle .caret,
|
||||
.navbar .nav li.dropdown.active > .dropdown-toggle .caret,
|
||||
.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
|
||||
border-top-color: @navbarLinkColorActive;
|
||||
border-bottom-color: @navbarLinkColorActive;
|
||||
}
|
||||
|
||||
// Right aligned menus need alt position
|
||||
.navbar .pull-right > li > .dropdown-menu,
|
||||
.navbar .nav > li > .dropdown-menu.pull-right {
|
||||
left: auto;
|
||||
right: 0;
|
||||
&:before {
|
||||
left: auto;
|
||||
right: 12px;
|
||||
}
|
||||
&:after {
|
||||
left: auto;
|
||||
right: 13px;
|
||||
}
|
||||
.dropdown-menu {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
margin-left: 0;
|
||||
margin-right: -1px;
|
||||
.border-radius(6px 0 6px 6px);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Inverted navbar
|
||||
// -------------------------
|
||||
|
||||
.navbar-inverse {
|
||||
color: @navbarInverseText;
|
||||
|
||||
.navbar-inner {
|
||||
#gradient > .vertical(@navbarInverseBackgroundHighlight, @navbarInverseBackground);
|
||||
border-color: @navbarInverseBorder;
|
||||
}
|
||||
|
||||
.brand,
|
||||
.nav > li > a {
|
||||
color: @navbarInverseLinkColor;
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
||||
&:hover {
|
||||
color: @navbarInverseLinkColorHover;
|
||||
}
|
||||
}
|
||||
|
||||
.nav > li > a:focus,
|
||||
.nav > li > a:hover {
|
||||
background-color: @navbarInverseLinkBackgroundHover;
|
||||
color: @navbarInverseLinkColorHover;
|
||||
}
|
||||
|
||||
.nav .active > a,
|
||||
.nav .active > a:hover,
|
||||
.nav .active > a:focus {
|
||||
color: @navbarInverseLinkColorActive;
|
||||
background-color: @navbarInverseLinkBackgroundActive;
|
||||
}
|
||||
|
||||
// Inline text links
|
||||
.navbar-link {
|
||||
color: @navbarInverseLinkColor;
|
||||
&:hover {
|
||||
color: @navbarInverseLinkColorHover;
|
||||
}
|
||||
}
|
||||
|
||||
// Dividers in navbar
|
||||
.divider-vertical {
|
||||
border-left-color: @navbarInverseBackground;
|
||||
border-right-color: @navbarInverseBackgroundHighlight;
|
||||
}
|
||||
|
||||
// Dropdowns
|
||||
.nav li.dropdown.open > .dropdown-toggle,
|
||||
.nav li.dropdown.active > .dropdown-toggle,
|
||||
.nav li.dropdown.open.active > .dropdown-toggle {
|
||||
background-color: @navbarInverseLinkBackgroundActive;
|
||||
color: @navbarInverseLinkColorActive;
|
||||
}
|
||||
.nav li.dropdown > .dropdown-toggle .caret {
|
||||
border-top-color: @navbarInverseLinkColor;
|
||||
border-bottom-color: @navbarInverseLinkColor;
|
||||
}
|
||||
.nav li.dropdown.open > .dropdown-toggle .caret,
|
||||
.nav li.dropdown.active > .dropdown-toggle .caret,
|
||||
.nav li.dropdown.open.active > .dropdown-toggle .caret {
|
||||
border-top-color: @navbarInverseLinkColorActive;
|
||||
border-bottom-color: @navbarInverseLinkColorActive;
|
||||
}
|
||||
|
||||
// Navbar search
|
||||
.navbar-search {
|
||||
.search-query {
|
||||
color: @white;
|
||||
background-color: @navbarInverseSearchBackground;
|
||||
border-color: @navbarInverseSearchBorder;
|
||||
.box-shadow(~"inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15)");
|
||||
.transition(none);
|
||||
.placeholder(@navbarInverseSearchPlaceholderColor);
|
||||
|
||||
// Focus states (we use .focused since IE7-8 and down doesn't support :focus)
|
||||
&:focus,
|
||||
&.focused {
|
||||
padding: 5px 15px;
|
||||
color: @grayDark;
|
||||
text-shadow: 0 1px 0 @white;
|
||||
background-color: @navbarInverseSearchBackgroundFocus;
|
||||
border: 0;
|
||||
.box-shadow(0 0 3px rgba(0,0,0,.15));
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Navbar collapse button
|
||||
.btn-navbar {
|
||||
.buttonBackground(darken(@navbarInverseBackgroundHighlight, 5%), darken(@navbarInverseBackground, 5%));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
1
vendors/inputosaurus/.code-changed
vendored
Normal file
1
vendors/inputosaurus/.code-changed
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
vendors/jquery-nanoscroller/.code-changed
vendored
Normal file
1
vendors/jquery-nanoscroller/.code-changed
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
1
vendors/keymaster/.code-changed
vendored
Normal file
1
vendors/keymaster/.code-changed
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
|
125
webpack.config.builder.js
Normal file
125
webpack.config.builder.js
Normal file
|
@ -0,0 +1,125 @@
|
|||
|
||||
var
|
||||
path = require('path'),
|
||||
webpack = require('webpack'),
|
||||
devPath = path.resolve(__dirname, 'dev');
|
||||
|
||||
module.exports = function(es6) {
|
||||
return {
|
||||
entry: es6 ? {
|
||||
'app.next': __dirname + '/dev/app.jsx',
|
||||
'admin.next': __dirname + '/dev/admin.jsx'
|
||||
} : {
|
||||
'boot': __dirname + '/dev/boot.jsx',
|
||||
'app': __dirname + '/dev/app.jsx',
|
||||
'admin': __dirname + '/dev/admin.jsx'
|
||||
},
|
||||
output: {
|
||||
pathinfo: true,
|
||||
path: __dirname + '/rainloop/v/0.0.0/static/js/',
|
||||
filename: '[name].js',
|
||||
publicPath: 'rainloop/v/0.0.0/static/js/'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.OccurrenceOrderPlugin()
|
||||
],
|
||||
resolve: {
|
||||
modules: [devPath, 'node_modules'],
|
||||
extensions: ['', '.js', '.jsx'],
|
||||
alias: {
|
||||
'Opentip': __dirname + '/dev/External/Opentip.js',
|
||||
'ko': __dirname + '/dev/External/ko.js'
|
||||
}
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
loader: 'babel',
|
||||
include: [devPath],
|
||||
query: !es6 ? {
|
||||
cacheDirectory: true,
|
||||
presets: [['es2015', {loose: true, modules: false}], 'es2016', 'stage-0'],
|
||||
plugins: ['transform-runtime']
|
||||
} : {
|
||||
cacheDirectory: true,
|
||||
plugins: [
|
||||
// es2015
|
||||
["transform-es2015-template-literals", {loose: true}],
|
||||
"transform-es2015-literals",
|
||||
"transform-es2015-function-name",
|
||||
// ["transform-es2015-arrow-functions")],
|
||||
"transform-es2015-block-scoped-functions",
|
||||
// ["transform-es2015-classes", loose],
|
||||
// "transform-es2015-object-super",
|
||||
"transform-es2015-shorthand-properties",
|
||||
"transform-es2015-duplicate-keys",
|
||||
["transform-es2015-computed-properties", {loose: true}],
|
||||
["transform-es2015-for-of", {loose: true}],
|
||||
"transform-es2015-sticky-regex",
|
||||
"transform-es2015-unicode-regex",
|
||||
// "check-es2015-constants",
|
||||
//["transform-es2015-spread", {loose: true}],
|
||||
// "transform-es2015-parameters",
|
||||
//["transform-es2015-destructuring", {loose: true}],
|
||||
// "transform-es2015-block-scoping",
|
||||
"transform-es2015-typeof-symbol",
|
||||
// ["transform-regenerator", { async: false, asyncGenerators: false }],
|
||||
|
||||
// es2016
|
||||
"transform-exponentiation-operator",
|
||||
|
||||
// stage-0
|
||||
"transform-do-expressions",
|
||||
"transform-function-bind",
|
||||
|
||||
// stage-1
|
||||
"transform-class-constructor-call",
|
||||
"transform-export-extensions",
|
||||
|
||||
// stage-2
|
||||
"transform-class-properties",
|
||||
"transform-object-rest-spread",
|
||||
"transform-decorators",
|
||||
|
||||
// stage-3
|
||||
"syntax-trailing-function-commas",
|
||||
"transform-async-to-generator",
|
||||
"transform-exponentiation-operator",
|
||||
|
||||
// runtime
|
||||
'transform-runtime'
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(html|css)$/,
|
||||
loader: 'raw',
|
||||
include: [devPath]
|
||||
},
|
||||
{
|
||||
test: /\.json$/,
|
||||
loader: 'json',
|
||||
include: [devPath]
|
||||
}
|
||||
]
|
||||
},
|
||||
externals: {
|
||||
'window': 'window',
|
||||
'progressJs': 'window.progressJs',
|
||||
'moment': 'window.moment',
|
||||
'ifvisible': 'window.ifvisible',
|
||||
'crossroads': 'window.crossroads',
|
||||
'hasher': 'window.hasher',
|
||||
'Jua': 'window.Jua',
|
||||
'Autolinker': 'window.Autolinker',
|
||||
'Tinycon': 'window.Tinycon',
|
||||
'ssm': 'window.ssm',
|
||||
'key': 'window.key',
|
||||
'_': 'window._',
|
||||
'qr': 'window.qr',
|
||||
'Promise': 'window.Promise',
|
||||
'$': 'window.jQuery'
|
||||
}
|
||||
}
|
||||
};
|
|
@ -1,73 +0,0 @@
|
|||
|
||||
var
|
||||
path = require('path'),
|
||||
webpack = require('webpack'),
|
||||
jsLoaderQuery = {
|
||||
cacheDirectory: true,
|
||||
presets: ['es2015-loose-native-modules', 'stage-0']
|
||||
}
|
||||
;
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
'boot': __dirname + '/dev/boot.jsx',
|
||||
'app': __dirname + '/dev/app.jsx',
|
||||
'admin': __dirname + '/dev/admin.jsx'
|
||||
},
|
||||
output: {
|
||||
pathinfo: true,
|
||||
path: __dirname + '/rainloop/v/0.0.0/static/js/',
|
||||
filename: '[name].js',
|
||||
publicPath: 'rainloop/v/0.0.0/static/js/'
|
||||
},
|
||||
// devtool: "#source-map",
|
||||
plugins: [
|
||||
// new webpack.optimize.CommonsChunkPlugin('common.js'),
|
||||
new webpack.optimize.OccurrenceOrderPlugin()
|
||||
],
|
||||
resolve: {
|
||||
modules: [path.resolve(__dirname, 'dev'), 'node_modules'],
|
||||
extensions: ['', '.js', '.jsx'],
|
||||
alias: {
|
||||
'Opentip': __dirname + '/dev/External/Opentip.js',
|
||||
'ko': __dirname + '/dev/External/ko.js'
|
||||
}
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.(html|css)$/,
|
||||
loader: 'raw',
|
||||
exclude: /(node_modules|bower_components|vendors)/
|
||||
},
|
||||
{
|
||||
test: /\.json$/,
|
||||
loader: 'json',
|
||||
exclude: /(node_modules|bower_components|vendors)/
|
||||
},
|
||||
{
|
||||
test: /\.jsx$/,
|
||||
loader: 'babel',
|
||||
exclude: /(node_modules|bower_components|vendors)/,
|
||||
query: jsLoaderQuery
|
||||
}
|
||||
]
|
||||
},
|
||||
externals: {
|
||||
'window': 'window',
|
||||
'progressJs': 'window.progressJs',
|
||||
'moment': 'window.moment',
|
||||
'ifvisible': 'window.ifvisible',
|
||||
'crossroads': 'window.crossroads',
|
||||
'hasher': 'window.hasher',
|
||||
'Jua': 'window.Jua',
|
||||
'Autolinker': 'window.Autolinker',
|
||||
'Tinycon': 'window.Tinycon',
|
||||
'ssm': 'window.ssm',
|
||||
'key': 'window.key',
|
||||
'_': 'window._',
|
||||
'qr': 'window.qr',
|
||||
'Promise': 'window.Promise',
|
||||
'$': 'window.jQuery'
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue