Permalink
Browse files

initial commit

  • Loading branch information...
pixelmatseriks committed Oct 13, 2015
0 parents commit a5dd3fb5f0e4d9dabf89f9f1fdd0b98c782db266
Showing with 1,107 additions and 0 deletions.
  1. +3 −0 .bowerrc
  2. +33 −0 .csslintrc
  3. +15 −0 .editorconfig
  4. +1 −0 .gitattributes
  5. +12 −0 .gitignore
  6. +3 −0 .gitmodules
  7. +13 −0 .htmlhintrc
  8. +36 −0 .jscsrc
  9. +13 −0 .jshintrc
  10. +22 −0 Gruntfile.js
  11. +4 −0 README.md
  12. +7 −0 bower.json
  13. +85 −0 dev/customizer.js
  14. +232 −0 dev/customizer.less
  15. +120 −0 dev/customizerBody.hbs
  16. +23 −0 dev/customizerHead.hbs
  17. +2 −0 dev/customizerScripts.hbs
  18. +77 −0 grunt/aliases.yaml
  19. +17 −0 grunt/assemble.js
  20. +14 −0 grunt/buildcontrol.js
  21. +19 −0 grunt/clean.js
  22. +27 −0 grunt/concurrent.js
  23. +22 −0 grunt/connect.js
  24. +87 −0 grunt/copy.js
  25. +46 −0 grunt/import.js
  26. +12 −0 grunt/jscs.js
  27. +13 −0 grunt/jshint.js
  28. +18 −0 grunt/less.js
  29. +12 −0 grunt/notify.js
  30. +52 −0 grunt/replace.js
  31. +25 −0 grunt/watch.js
  32. +8 −0 init
  33. +34 −0 package.json
@@ -0,0 +1,3 @@
{
"directory": "dev/bower_components"
}
@@ -0,0 +1,33 @@
{
"important":false,
"adjoining-classes": false,
"known-properties": false,
"box-sizing": false,
"box-model": false,
"overqualified-elements": true,
"display-property-grouping": false,
"bulletproof-font-face": false,
"compatible-vendor-prefixes": false,
"regex-selectors": false,
"duplicate-background-images": true,
"duplicate-properties": false,
"empty-rules": 2,
"gradients": false,
"fallback-colors": false,
"font-sizes": false,
"font-faces": true,
"floats": false,
"star-property-hack": 2,
"outline-none": false,
"import": false,
"ids": false,
"underscore-property-hack": 2,
"qualified-headings": false,
"shorthand": false,
"text-indent": false,
"unique-headings": false,
"universal-selector": true,
"unqualified-attributes": true,
"vendor-prefix": false,
"zero-units": 2
}
@@ -0,0 +1,15 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
@@ -0,0 +1 @@
* text=auto
@@ -0,0 +1,12 @@
node_modules
site
.tmp
temp
.sass-cache
dev/bower_components
bower_components
.DS_Store
npm-debug.log
*.sublime-*
validation-status.json
.idea
@@ -0,0 +1,3 @@
[submodule "felayout_name"]
path = felayout_name
url = git@github.com:pixelant/felayout_name.git
@@ -0,0 +1,13 @@
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": false,
"doctype-first": true,
"tag-pair": true,
"spec-char-escape": true,
"id-unique": false,
"src-not-empty": true,
"img-alt-require": true,
"doctype-html5": true,
"id-class-value": true
}
36 .jscsrc
@@ -0,0 +1,36 @@
{
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch", "case", "default"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInFunctionExpression": { "beforeOpeningRoundBrace": true },
"disallowEmptyBlocks": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireParenthesesAroundIIFE": true,
"validateQuoteMarks": "'",
"disallowTrailingWhitespace": true,
"requireSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"requireCapitalizedConstructors": true,
"disallowSpaceAfterObjectKeys": true,
"requireOperatorBeforeLineBreak": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireSpaceBeforeBinaryOperators": [ "=", "+", "-", "/", "*", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireSpaceAfterBinaryOperators": [ "=", "+", "-", "/", "*", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,
"disallowKeywordsOnNewLine": ["else"],
"requireLineFeedAtFileEnd": true,
"safeContextKeyword": "that",
"requireDotNotation": true,
"validateIndentation": 4,
"excludeFiles": ["node_modules/**", "jquery.js"]
}
@@ -0,0 +1,13 @@
{
"node": true,
"esnext": true,
"browser": true,
"eqeqeq": true,
"latedef": true,
"undef": true,
"unused": true,
"jquery": true,
"nonew": true,
"expr": true,
"multistr": true
}
@@ -0,0 +1,22 @@
var remoteBranch = 'gh-pages';
var remoteRepo = 'git@github.com:pixelant/theme_name_customizer.git';
module.exports = function(grunt) {
require('time-grunt')(grunt);
require('load-grunt-config')(grunt, {
data: {
dev: 'felayout_name/dev',
temp: 'temp',
bc: 'felayout_name/dev/bower_components',
remoteRepo: remoteRepo,
remoteBranch: remoteBranch
},
jitGrunt: {
staticMappings: {
replace: 'grunt-text-replace',
buildcontrol: 'grunt-build-control'
}
}
});
grunt.loadNpmTasks('assemble');
grunt.loadNpmTasks('grunt-notify');
};
@@ -0,0 +1,4 @@
##theme_name_customizer
info about this repo
@@ -0,0 +1,7 @@
{
"name": "customizer",
"devDependencies": {
"spectrum": "1.7.1",
"less": "2.5.3"
}
}
@@ -0,0 +1,85 @@
/* global less */
/* global lessObj */
/* global lessObj:true */
var lessvar;
jQuery(function($) {
var $body = $('body');
var $customizer = $('.js__customizer');
var $customizerHideBtn = $('.js__customizer__hide-btn');
var $colorPicker = $('.js__color-picker__val');
var $customizerFooterBtn = $('.js__customizer__footer-btn');
var $customizerFooterBtnClearCache = $('.js__customizer__footer-btn-clear-cache');
var $customizerModal = $('.js__customizer-modal-overlay');
var $customizerModalInput = $('.js__customizer-modal__text');
$customizerHideBtn.on('click', function(e) {
e.preventDefault();
$customizer .toggleClass('_hide-customizer');
});
$colorPicker.spectrum({
showInput: true,
preferredFormat: 'hex',
showPalette: true,
palette: ['#ffffff'],
showSelectionPalette: true,
maxSelectionSize: 12,
showInitial: true,
localStorageKey: 'spectrum.customizer'
});
$colorPicker.on('move.spectrum', function(e, color) {
e.preventDefault();
$(this).css('background-color', color.toHexString());
lessvar = $(this).data('lessvar');
lessObj[lessvar] = color.toHexString();
less.modifyVars(lessObj);
localStorage.setItem('lessObj', JSON.stringify(lessObj));
});
$('.js__customizer__body-item-label-val').on('change', function(e) {
e.preventDefault();
// $(this).css('background-color', color.toHexString());
lessvar = $(this).data('lessvar');
lessObj[lessvar] = $(this).val();
less.modifyVars(lessObj);
});
$customizerFooterBtnClearCache.on('click', function(e) {
e.preventDefault();
localStorage.removeItem('lessObj');
lessObj = {};
less.modifyVars(lessObj);
});
$customizerFooterBtn.on('click', function(e) {
e.preventDefault();
$body.toggleClass('_freeze-body');
// $customizerModal.show();
var lessObjStr = JSON.stringify(lessObj);
lessObjStr = lessObjStr.replace(/(-)\w{1}/g, function(v) { return v.toUpperCase(); });
var mapLessObj = {
':': ' = ',
'{': '',
'}': '',
'"': '',
'-': '',
',': '\n',
'@': 'themes.configuration.colors.'
};
lessObjStr = lessObjStr.replace(/({|}|-|:|"|,|@)/gi, function(matched) {
return mapLessObj[matched];
});
$customizerModalInput.val(lessObjStr);
});
$customizerModal.on('click', function() {
$body.toggleClass('_freeze-body');
return false;
});
});
Oops, something went wrong.

0 comments on commit a5dd3fb

Please sign in to comment.