commit a412f9f6748b1b9bce811156ef793689a8c0484e Author: Linus Miller Date: Tue Nov 26 12:54:17 2013 +0100 initial commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c308ed0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# http://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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d446adb --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/js/ +/css/ +/img/ +/.sass-cache/ +/src/source_maps/ +/node_modules/ +/bower_components/ diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..4a89fda --- /dev/null +++ b/.jshintrc @@ -0,0 +1,27 @@ +{ + "node": true, + "esnext": true, + "bitwise": true, + "camelcase": true, + "curly": true, + "eqeqeq": true, + "immed": true, + "indent": 4, + "latedef": true, + "newcap": true, + "noarg": true, + "quotmark": "single", + "regexp": true, + "undef": true, + "unused": true, + "globalstrict": true, + "trailing": true, + "smarttabs": true, + "white": true, + "globals": { + "define": false, + "require": false, + "requirejs": false, + "$": false + } +} diff --git a/GruntFile.js b/GruntFile.js new file mode 100644 index 0000000..f9f3267 --- /dev/null +++ b/GruntFile.js @@ -0,0 +1,180 @@ +module.exports = function (grunt) { + 'use strict'; + // Configuration + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + compass: { + config: 'config.rb' + }, + jshint: { + options: grunt.file.readJSON('.jshintrc'), + files: ['src/js/**/*.js'] + }, + uglify: { + options: { + sourceMap: function (script) { + return 'src/source_maps/' + script + '.map'; + }, + sourceMapRoot: '/whitemill/', + // in a live environment when website is in www.[name].com, use the below sourceMapRoot if sourceMaps are still needed + //sourceMapRoot: '/', + sourceMappingURL: function (script) { + //return '../src/source_maps/' + script.replace(/^.+\//, "") + '.map'; + return '../src/source_maps/' + script + '.map'; + } + }, + src: { + files: [{ + expand: true, + cwd: 'src/js/', + src: ['**/*.js', '!rjs/**/*.js'], + dest: 'js/', + //ext: '.min.js', //commenting out for now + }] + }, + modernizr: { + files: [{ // Dictionary of files + expand: true, // Enable dynamic expansion. + cwd: 'bower_components/modernizr', // Src matches are relative to this path. + src: ['**/*.js', '!**/grunt*', '!test/**/*.js'], // Actual pattern(s) to match. + dest: 'js/libs/' // Destination path prefix. + //ext: '.js' // Dest filepaths will have this extension. + }], + options: { + sourceMappingURL: function (script) { + //return '../src/source_maps/' + script.replace(/^.+\//, "") + '.map'; + return '../../src/source_maps/' + script + '.map'; + } + } + }, + respond: { + files: [{ // Dictionary of files + expand: true, // Enable dynamic expansion. + cwd: 'bower_components/respond', // Src matches are relative to this path. + src: ['respond.src.js', '!test/**/*.js', '!cross-domain/**/*.js'], // Actual pattern(s) to match. + dest: 'js/libs/' // Destination path prefix. + //ext: '.js' // Dest filepaths will have this extension. + }], + options: { + sourceMappingURL: function (script) { + //return '../src/source_maps/' + script.replace(/^.+\//, "") + '.map'; + return '../../src/source_maps/' + script + '.map'; + } + } + }, + requirejs: { + files: [{ // Dictionary of files + expand: true, // Enable dynamic expansion. + cwd: 'bower_components/requirejs', // Src matches are relative to this path. + src: ['require.js'], // Actual pattern(s) to match. + dest: 'js/libs/' // Destination path prefix. + //ext: '.js' // Dest filepaths will have this extension. + }], + options: { + sourceMappingURL: function (script) { + //return '../src/source_maps/' + script.replace(/^.+\//, "") + '.map'; + return '../../src/source_maps/' + script + '.map'; + } + } + } + }, + requirejs: { + compile: { + options: { + mainConfigFile: 'src/js/rjs/config.js' + //name: 'main', + //baseUrl: 'src/js/', + //out: 'js/requirejs.js' + //baseUrl: 'js', + //paths: { + // jquery: 'https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min', + //} + } + } + }, + svgmin: { // Task + options: { // Configuration that will be passed directly to SVGO + plugins: [{ + removeViewBox: false + }] + }, + dist: { // Target + files: [{ // Dictionary of files + expand: true, // Enable dynamic expansion. + cwd: 'src/svg', // Src matches are relative to this path. + src: ['**/*.svg'], // Actual pattern(s) to match. + dest: 'img/', // Destination path prefix. + //ext: '.svg' // Dest filepaths will have this extension. + }] + } + }, + smushit: { + path: { + src: 'img/' + } + }, + watch: { + options: { + nospawn: true + }, + js: { + files: ['src/js/**/*.js', '!src/js/rjs/**/*.js'], + tasks: ['uglify:src'] + }, + requirejs: { + files: ['src/js/rjs/**/*.js'], + tasks: ['requirejs'] + }, + svg: { + files: ['src/svg/**/*.svg'], + tasks: ['svgmin'] + }, + img: { + files: ['img/**/*.png', 'img/**/*.jpg'], + tasks: ['smushit'] + }, + sass: { + files: ['src/sass/**/*.scss'], + tasks: ['compass'], + options: { + nospawn: true + } + }, + } + + }); + // Plugins + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-compass'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-svgmin'); + grunt.loadNpmTasks('grunt-smushit'); + + grunt.loadNpmTasks('grunt-contrib-requirejs'); + + // Tasks + grunt.registerTask('default', ['jshint', 'uglify', 'requirejs']); + grunt.registerTask('image', ['smushit', 'svgmin']); + grunt.event.on('watch', function (action, filepath, target) { + //change the ource and destination in the uglify task at run time so that it affects the changed file only + var destFilePath; + if (target === 'js') { + destFilePath = filepath.replace(/src\/(.+)$/, '$1'); + grunt.config('uglify.src.src', filepath); + grunt.config('uglify.src.dest', destFilePath); + } else if (target === 'svg') { + destFilePath = filepath.replace(/src\/svg\/(.+)$/, 'img/$1'); + grunt.config('svgmin.dist.src', filepath); + grunt.config('svgmin.dist.dest', destFilePath); + + } else if (target === 'markdown') { + destFilePath = filepath.replace(/src\/markdown\/([^.]+).+$/, 'application/views/pages/$1.php'); + grunt.config('markdown.dist.src', filepath); + grunt.config('markdown.dist.dest', destFilePath); + + } else if (target === 'img') { + grunt.config('smushit.path.src', filepath); + } + }); +}; diff --git a/application/.htaccess b/application/.htaccess new file mode 100644 index 0000000..14249c5 --- /dev/null +++ b/application/.htaccess @@ -0,0 +1 @@ +Deny from all \ No newline at end of file diff --git a/application/cache/.htaccess b/application/cache/.htaccess new file mode 100644 index 0000000..3418e55 --- /dev/null +++ b/application/cache/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/application/cache/index.html b/application/cache/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/application/cache/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/config/autoload.php b/application/config/autoload.php new file mode 100644 index 0000000..5c2ca9c --- /dev/null +++ b/application/config/autoload.php @@ -0,0 +1,116 @@ + '', + 'xhtml1-strict' => '', + 'xhtml1-trans' => '', + 'xhtml1-frame' => '', + 'html5' => '', + 'html4-strict' => '', + 'html4-trans' => '', + 'html4-frame' => '' + ); + +/* End of file doctypes.php */ +/* Location: ./application/config/doctypes.php */ \ No newline at end of file diff --git a/application/config/foreign_chars.php b/application/config/foreign_chars.php new file mode 100644 index 0000000..14b0d73 --- /dev/null +++ b/application/config/foreign_chars.php @@ -0,0 +1,64 @@ + 'ae', + '/ö|œ/' => 'oe', + '/ü/' => 'ue', + '/Ä/' => 'Ae', + '/Ü/' => 'Ue', + '/Ö/' => 'Oe', + '/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ/' => 'A', + '/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª/' => 'a', + '/Ç|Ć|Ĉ|Ċ|Č/' => 'C', + '/ç|ć|ĉ|ċ|č/' => 'c', + '/Ð|Ď|Đ/' => 'D', + '/ð|ď|đ/' => 'd', + '/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě/' => 'E', + '/è|é|ê|ë|ē|ĕ|ė|ę|ě/' => 'e', + '/Ĝ|Ğ|Ġ|Ģ/' => 'G', + '/ĝ|ğ|ġ|ģ/' => 'g', + '/Ĥ|Ħ/' => 'H', + '/ĥ|ħ/' => 'h', + '/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ/' => 'I', + '/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı/' => 'i', + '/Ĵ/' => 'J', + '/ĵ/' => 'j', + '/Ķ/' => 'K', + '/ķ/' => 'k', + '/Ĺ|Ļ|Ľ|Ŀ|Ł/' => 'L', + '/ĺ|ļ|ľ|ŀ|ł/' => 'l', + '/Ñ|Ń|Ņ|Ň/' => 'N', + '/ñ|ń|ņ|ň|ʼn/' => 'n', + '/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ/' => 'O', + '/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º/' => 'o', + '/Ŕ|Ŗ|Ř/' => 'R', + '/ŕ|ŗ|ř/' => 'r', + '/Ś|Ŝ|Ş|Š/' => 'S', + '/ś|ŝ|ş|š|ſ/' => 's', + '/Ţ|Ť|Ŧ/' => 'T', + '/ţ|ť|ŧ/' => 't', + '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ/' => 'U', + '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ/' => 'u', + '/Ý|Ÿ|Ŷ/' => 'Y', + '/ý|ÿ|ŷ/' => 'y', + '/Ŵ/' => 'W', + '/ŵ/' => 'w', + '/Ź|Ż|Ž/' => 'Z', + '/ź|ż|ž/' => 'z', + '/Æ|Ǽ/' => 'AE', + '/ß/'=> 'ss', + '/IJ/' => 'IJ', + '/ij/' => 'ij', + '/Œ/' => 'OE', + '/ƒ/' => 'f' +); + +/* End of file foreign_chars.php */ +/* Location: ./application/config/foreign_chars.php */ \ No newline at end of file diff --git a/application/config/hooks.php b/application/config/hooks.php new file mode 100644 index 0000000..a4ad2be --- /dev/null +++ b/application/config/hooks.php @@ -0,0 +1,16 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/config/migration.php b/application/config/migration.php new file mode 100644 index 0000000..df42a3c --- /dev/null +++ b/application/config/migration.php @@ -0,0 +1,41 @@ +migration->latest() this is the version that schema will +| be upgraded / downgraded to. +| +*/ +$config['migration_version'] = 0; + + +/* +|-------------------------------------------------------------------------- +| Migrations Path +|-------------------------------------------------------------------------- +| +| Path to your migrations folder. +| Typically, it will be within your application path. +| Also, writing permission is required within the migrations path. +| +*/ +$config['migration_path'] = APPPATH . 'migrations/'; + + +/* End of file migration.php */ +/* Location: ./application/config/migration.php */ \ No newline at end of file diff --git a/application/config/mimes.php b/application/config/mimes.php new file mode 100644 index 0000000..100f7d4 --- /dev/null +++ b/application/config/mimes.php @@ -0,0 +1,106 @@ + 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel'), + 'bin' => 'application/macbinary', + 'dms' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'exe' => array('application/octet-stream', 'application/x-msdownload'), + 'class' => 'application/octet-stream', + 'psd' => 'application/x-photoshop', + 'so' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => array('application/pdf', 'application/x-download'), + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'), + 'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'), + 'wbxml' => 'application/wbxml', + 'wmlc' => 'application/wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'gz' => 'application/x-gzip', + 'php' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'js' => 'application/x-javascript', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => array('application/x-tar', 'application/x-gzip-compressed'), + 'xhtml' => 'application/xhtml+xml', + 'xht' => 'application/xhtml+xml', + 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'), + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'), + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'rv' => 'video/vnd.rn-realvideo', + 'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'), + 'bmp' => array('image/bmp', 'image/x-windows-bmp'), + 'gif' => 'image/gif', + 'jpeg' => array('image/jpeg', 'image/pjpeg'), + 'jpg' => array('image/jpeg', 'image/pjpeg'), + 'jpe' => array('image/jpeg', 'image/pjpeg'), + 'png' => array('image/png', 'image/x-png'), + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'log' => array('text/plain', 'text/x-log'), + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'doc' => 'application/msword', + 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip'), + 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip'), + 'word' => array('application/msword', 'application/octet-stream'), + 'xl' => 'application/excel', + 'eml' => 'message/rfc822', + 'json' => array('application/json', 'text/json') + ); + + +/* End of file mimes.php */ +/* Location: ./application/config/mimes.php */ diff --git a/application/config/ms.php b/application/config/ms.php new file mode 100644 index 0000000..20d2433 --- /dev/null +++ b/application/config/ms.php @@ -0,0 +1,8 @@ + + array('grin.gif', '19', '19', 'grin'), + ':lol:' => array('lol.gif', '19', '19', 'LOL'), + ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), + ':)' => array('smile.gif', '19', '19', 'smile'), + ';-)' => array('wink.gif', '19', '19', 'wink'), + ';)' => array('wink.gif', '19', '19', 'wink'), + ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), + ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), + ':-S' => array('confused.gif', '19', '19', 'confused'), + ':wow:' => array('surprise.gif', '19', '19', 'surprised'), + ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), + ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), + '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), + ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), + ':P' => array('raspberry.gif', '19', '19', 'raspberry'), + ':blank:' => array('blank.gif', '19', '19', 'blank stare'), + ':long:' => array('longface.gif', '19', '19', 'long face'), + ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), + ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), + ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), + '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), + ':down:' => array('downer.gif', '19', '19', 'downer'), + ':red:' => array('embarrassed.gif', '19', '19', 'red face'), + ':sick:' => array('sick.gif', '19', '19', 'sick'), + ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), + ':-/' => array('hmm.gif', '19', '19', 'hmmm'), + '>:(' => array('mad.gif', '19', '19', 'mad'), + ':mad:' => array('mad.gif', '19', '19', 'mad'), + '>:-(' => array('angry.gif', '19', '19', 'angry'), + ':angry:' => array('angry.gif', '19', '19', 'angry'), + ':zip:' => array('zip.gif', '19', '19', 'zipper'), + ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), + ':ahhh:' => array('shock.gif', '19', '19', 'shock'), + ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), + ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), + ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), + ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), + ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), + ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), + ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), + ':snake:' => array('snake.gif', '19', '19', 'snake'), + ':exclaim:' => array('exclaim.gif', '19', '19', 'excaim'), + ':question:' => array('question.gif', '19', '19', 'question') // no comma after last item + + ); + +/* End of file smileys.php */ +/* Location: ./application/config/smileys.php */ \ No newline at end of file diff --git a/application/config/template.php b/application/config/template.php new file mode 100644 index 0000000..ab3d350 --- /dev/null +++ b/application/config/template.php @@ -0,0 +1,89 @@ + array( +| 'content' => array('

Welcome

','

Hello World

'), +| 'name' => 'Page Header', +| 'wrapper' => '
', +| 'attributes' => array('id' => 'header', 'class' => 'clearfix') +| ) +| ); +| +*/ + +/* +|-------------------------------------------------------------------------- +| Default Template Configuration (adjust this or create your own) +|-------------------------------------------------------------------------- +*/ + +$template['default']['template'] = 'masters/default'; +$template['default']['regions'] = array( + 'title', + 'content', +); +$template['default']['has_logic'] = FALSE; +$template['default']['js_folder'] = 'js'; +$template['default']['js'] = array('main', 'modernizr'); +$template['default']['css_folder'] = 'css'; +$template['default']['css'] = array('main'); +$template['default']['parser'] = 'parser'; +$template['default']['parser_method'] = 'parse'; +$template['default']['parse_template'] = FALSE; +$template['default']['controller'] = FALSE; + +$template['ms']['template'] = 'templates/ms'; +$template['ms']['regions'] = array( + 'title', + 'content', +); +$template['ms']['has_logic'] = FALSE; +$template['ms']['js_folder'] = 'js'; +$template['ms']['js'] = array('modernizr'); +$template['ms']['css_folder'] = 'css'; +$template['ms']['css'] = array('ms'); +$template['ms']['parser'] = 'parser'; +$template['ms']['parser_method'] = 'parse'; +$template['ms']['parse_template'] = FALSE; +$template['ms']['controller'] = FALSE; +/* End of file template.php */ +/* Location: ./system/application/config/template.php */ diff --git a/application/config/user_agents.php b/application/config/user_agents.php new file mode 100644 index 0000000..e2d3c3a --- /dev/null +++ b/application/config/user_agents.php @@ -0,0 +1,178 @@ + 'Windows Longhorn', + 'windows nt 5.2' => 'Windows 2003', + 'windows nt 5.0' => 'Windows 2000', + 'windows nt 5.1' => 'Windows XP', + 'windows nt 4.0' => 'Windows NT 4.0', + 'winnt4.0' => 'Windows NT 4.0', + 'winnt 4.0' => 'Windows NT', + 'winnt' => 'Windows NT', + 'windows 98' => 'Windows 98', + 'win98' => 'Windows 98', + 'windows 95' => 'Windows 95', + 'win95' => 'Windows 95', + 'windows' => 'Unknown Windows OS', + 'os x' => 'Mac OS X', + 'ppc mac' => 'Power PC Mac', + 'freebsd' => 'FreeBSD', + 'ppc' => 'Macintosh', + 'linux' => 'Linux', + 'debian' => 'Debian', + 'sunos' => 'Sun Solaris', + 'beos' => 'BeOS', + 'apachebench' => 'ApacheBench', + 'aix' => 'AIX', + 'irix' => 'Irix', + 'osf' => 'DEC OSF', + 'hp-ux' => 'HP-UX', + 'netbsd' => 'NetBSD', + 'bsdi' => 'BSDi', + 'openbsd' => 'OpenBSD', + 'gnu' => 'GNU/Linux', + 'unix' => 'Unknown Unix OS' + ); + + +// The order of this array should NOT be changed. Many browsers return +// multiple browser types so we want to identify the sub-type first. +$browsers = array( + 'Flock' => 'Flock', + 'Chrome' => 'Chrome', + 'Opera' => 'Opera', + 'MSIE' => 'Internet Explorer', + 'Internet Explorer' => 'Internet Explorer', + 'Shiira' => 'Shiira', + 'Firefox' => 'Firefox', + 'Chimera' => 'Chimera', + 'Phoenix' => 'Phoenix', + 'Firebird' => 'Firebird', + 'Camino' => 'Camino', + 'Netscape' => 'Netscape', + 'OmniWeb' => 'OmniWeb', + 'Safari' => 'Safari', + 'Mozilla' => 'Mozilla', + 'Konqueror' => 'Konqueror', + 'icab' => 'iCab', + 'Lynx' => 'Lynx', + 'Links' => 'Links', + 'hotjava' => 'HotJava', + 'amaya' => 'Amaya', + 'IBrowse' => 'IBrowse' + ); + +$mobiles = array( + // legacy array, old values commented out + 'mobileexplorer' => 'Mobile Explorer', +// 'openwave' => 'Open Wave', +// 'opera mini' => 'Opera Mini', +// 'operamini' => 'Opera Mini', +// 'elaine' => 'Palm', + 'palmsource' => 'Palm', +// 'digital paths' => 'Palm', +// 'avantgo' => 'Avantgo', +// 'xiino' => 'Xiino', + 'palmscape' => 'Palmscape', +// 'nokia' => 'Nokia', +// 'ericsson' => 'Ericsson', +// 'blackberry' => 'BlackBerry', +// 'motorola' => 'Motorola' + + // Phones and Manufacturers + 'motorola' => "Motorola", + 'nokia' => "Nokia", + 'palm' => "Palm", + 'iphone' => "Apple iPhone", + 'ipad' => "iPad", + 'ipod' => "Apple iPod Touch", + 'sony' => "Sony Ericsson", + 'ericsson' => "Sony Ericsson", + 'blackberry' => "BlackBerry", + 'cocoon' => "O2 Cocoon", + 'blazer' => "Treo", + 'lg' => "LG", + 'amoi' => "Amoi", + 'xda' => "XDA", + 'mda' => "MDA", + 'vario' => "Vario", + 'htc' => "HTC", + 'samsung' => "Samsung", + 'sharp' => "Sharp", + 'sie-' => "Siemens", + 'alcatel' => "Alcatel", + 'benq' => "BenQ", + 'ipaq' => "HP iPaq", + 'mot-' => "Motorola", + 'playstation portable' => "PlayStation Portable", + 'hiptop' => "Danger Hiptop", + 'nec-' => "NEC", + 'panasonic' => "Panasonic", + 'philips' => "Philips", + 'sagem' => "Sagem", + 'sanyo' => "Sanyo", + 'spv' => "SPV", + 'zte' => "ZTE", + 'sendo' => "Sendo", + + // Operating Systems + 'symbian' => "Symbian", + 'SymbianOS' => "SymbianOS", + 'elaine' => "Palm", + 'palm' => "Palm", + 'series60' => "Symbian S60", + 'windows ce' => "Windows CE", + + // Browsers + 'obigo' => "Obigo", + 'netfront' => "Netfront Browser", + 'openwave' => "Openwave Browser", + 'mobilexplorer' => "Mobile Explorer", + 'operamini' => "Opera Mini", + 'opera mini' => "Opera Mini", + + // Other + 'digital paths' => "Digital Paths", + 'avantgo' => "AvantGo", + 'xiino' => "Xiino", + 'novarra' => "Novarra Transcoder", + 'vodafone' => "Vodafone", + 'docomo' => "NTT DoCoMo", + 'o2' => "O2", + + // Fallback + 'mobile' => "Generic Mobile", + 'wireless' => "Generic Mobile", + 'j2me' => "Generic Mobile", + 'midp' => "Generic Mobile", + 'cldc' => "Generic Mobile", + 'up.link' => "Generic Mobile", + 'up.browser' => "Generic Mobile", + 'smartphone' => "Generic Mobile", + 'cellphone' => "Generic Mobile" + ); + +// There are hundreds of bots but these are the most common. +$robots = array( + 'googlebot' => 'Googlebot', + 'msnbot' => 'MSNBot', + 'slurp' => 'Inktomi Slurp', + 'yahoo' => 'Yahoo', + 'askjeeves' => 'AskJeeves', + 'fastcrawler' => 'FastCrawler', + 'infoseek' => 'InfoSeek Robot 1.0', + 'lycos' => 'Lycos' + ); + +/* End of file user_agents.php */ +/* Location: ./application/config/user_agents.php */ \ No newline at end of file diff --git a/application/controllers/ajax/dictionary.php b/application/controllers/ajax/dictionary.php new file mode 100644 index 0000000..10e3e96 --- /dev/null +++ b/application/controllers/ajax/dictionary.php @@ -0,0 +1,27 @@ +load->model('dictionary_model'); + } + public function en_search_all() { + $word = trim($_POST['word']); + $data['result'] = $this->dictionary_model->en_search_all($word); + if(count($data['result']) > 0) { + $this->load->view('dictionary/result', $data); + } else { + echo 'No results were found!!!'; + } + } + public function search() { + $language_abbr = $_POST['language']; + $word = trim($_POST['word']); + $data['result'] = $this->dictionary_model->search($language_abbr, $word); + if(count($data['result']) > 0) { + $this->load->view('dictionary/result', $data); + } else { + echo 'No results were found!!!'; + } + } +} +?> diff --git a/application/controllers/ajax/ms.php b/application/controllers/ajax/ms.php new file mode 100644 index 0000000..ae46557 --- /dev/null +++ b/application/controllers/ajax/ms.php @@ -0,0 +1,71 @@ +load->helper('form'); + $this->load->library('form_validation'); + $this->form_validation->set_error_delimiters('', ''); + } + public function login() { + $this->form_validation->set_rules('username', 'lang:username', 'trim|required|alpha_numeric|max_length[32]'); + $this->form_validation->set_rules('password', 'lang:password', 'trim|required'); + if($this->form_validation->run() == TRUE) { + $username = $_POST['username']; + $password = $_POST['password']; + if($this->ms->login($username, $password)) { + $this->load->view('ms/block-login-success'); + } else { + $data['login_error'] = true; + $this->load->view('ms/block-login-frm', $data); + } + } else { + $this->load->view('ms/block-login-frm'); + } + } + public function update_user() { + $this->form_validation->set_rules('username', 'Username', 'trim|required'); + $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email'); + $this->form_validation->set_rules('first_name', 'First Name', 'trim|required'); + $this->form_validation->set_rules('last_name', 'Last Name', 'trim|required'); + //$this->form_validation->set_rules('mobile', 'Mobile Number', 'trim|required'); + $this->form_validation->set_rules('social_security', 'Social Security', 'trim|required|numeric|exact_length[12]'); + if($this->form_validation->run() == true) { + $user_id = $this->session->userdata('user_id'); + $username = $_POST['username']; + $first_name = $_POST['first_name']; + $last_name = $_POST['last_name']; + $email = $_POST['email']; + $mobile = $_POST['mobile']; + $social_security = $_POST['social_security']; + $result = $this->ms->update_user($user_id, $username, $first_name, $last_name, $email, $mobile, $social_security); + if($result > 0) { + $this->load->view('block-success'); + } else { + $data['db_error'] = true; + $this->load->view('ms/block-frm-details', $data); + } + } else { + $this->load->view('ms/block-frm-details'); + } + } + public function update_user_password() { + $this->form_validation->set_rules('old_password', 'Old Password', 'trim|required'); + $this->form_validation->set_rules('new_password', 'New Password', 'trim|required|min_length[10]'); + $this->form_validation->set_rules('new_password_conf', 'Password Confirmation', 'trim|required|matches[new_password]'); + if($this->form_validation->run() == true) { + $user_id = $this->session->userdata('user_id'); + $old_password = $this->ms->generate_password_hash($_POST['old_password']); + $new_password = $this->ms->generate_password_hash($_POST['new_password']); + $result = $this->ms->update_user_password($user_id, $old_password, $new_password); + if($result > 0) { + $this->load->view('block-success'); + } else { + $data['login_error'] = true; + $this->load->view('ms/block-frm-password', $data); + } + } else { + $this->load->view('ms/block-frm-password'); + } + } +} +?> diff --git a/application/controllers/index.html b/application/controllers/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/application/controllers/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/controllers/ms.php b/application/controllers/ms.php new file mode 100644 index 0000000..9e1462c --- /dev/null +++ b/application/controllers/ms.php @@ -0,0 +1,20 @@ +load->helper('form'); + $this->load->library('form_validation'); + } + public function login() { + if($this->ms->is_authenticated()) { + redirect('', 'refresh'); + } + $data['content'] = $this->load->view('ms/block-login-frm', '', true); + $this->load->view('masters/login', $data); + } + public function logout() { + $this->ms->logout(); + redirect('login', 'refresh'); + } +} +?> diff --git a/application/controllers/pages.php b/application/controllers/pages.php new file mode 100644 index 0000000..456e0e5 --- /dev/null +++ b/application/controllers/pages.php @@ -0,0 +1,48 @@ +ms->is_authenticated()) { + // redirect('login', 'refresh'); + //} + $this->load->helper('form'); + } + public function index(){ + self::view(); + } + public function view($page = 'start'){ + $data = array(); + if($page == 'start') { + $data['languages'] = $this->dictionary_model->lang_get_active(); + } + $data['content'] = $this->load->view('pages/' . $page, $data, true); + $this->load->view('masters/default', $data); + } + public function learn($page) { + $data['content'] = $this->load->view('pages/learn/' . $page, null, true); + preg_match('/^[^-]+/', $page, $matches); + $data['current'] = $matches[0]; + + $data['content'] = $this->load->view('templates/learn', $data, true); + $data['current'] = 'learn'; + $this->load->view('masters/default', $data); + } + public function projects($page) { + $data['content'] = $this->load->view('pages/projects/' . $page, null, true); + preg_match('/^[^-]+/', $page, $matches); + $data['current'] = $matches[0]; + + $data['content'] = $this->load->view('templates/projects', $data, true); + $data['current'] = 'projects'; + $this->load->view('masters/default', $data); + } + public function resources($page) { + $data['learning'] = $this->load->view('pages/resources/learning', null, true); + $data['inspiration'] = $this->load->view('pages/resources/inspiration', null, true); + + $data['content'] = $this->load->view('templates/resources', $data, true); + $data['current'] = 'resources'; + $this->load->view('masters/default', $data); + } +} +?> diff --git a/application/controllers/user.php b/application/controllers/user.php new file mode 100644 index 0000000..118f95f --- /dev/null +++ b/application/controllers/user.php @@ -0,0 +1,30 @@ +ms->is_authenticated()) { + redirect('login', 'refresh'); + } + $this->load->helper('form'); + $this->load->library('form_validation'); + } + public function profile() { + $data['user'] = $this->ms->get_user_by_id($this->session->userdata('user_id')); + $data['password_form'] = $this->load->view('ms/block-frm-password', '', true); + $data['details_form'] = $this->load->view('ms/block-frm-details', $data, true); + $data['content'] = $this->load->view('ms/page-user_profile', $data, true); + $data['current'] = null; + $this->load->view('masters/default', $data); + } + public function password() { + $hash = '7b49817170bc2f7a6c9e75f301615acb2a8ce671'; + $array = $this->ms->update_user_password(1, 'new', $hash); + //print_r($array); + echo reset($array); + } + public function logout() { + $this->ms->logout(); + redirect('login', 'refresh'); + } +} +?> diff --git a/application/controllers/util.php b/application/controllers/util.php new file mode 100644 index 0000000..fdf4302 --- /dev/null +++ b/application/controllers/util.php @@ -0,0 +1,39 @@ +' . $i . '
'; + $sql = 'SELECT * FROM en_definitions LIMIT ?,10000'; + $params = array($i * 10000); + $query = $this->db->query($sql, $params); + $result = $query->result_array(); + foreach($result as $r) { + $id = $r['id']; + $def = $r['definition']; + preg_match_all('/\[\[.+?\]\]/', $def, $matches); + foreach($matches[0] as $m) { + $sql = 'SELECT * FROM en_words WHERE name=?'; + $params = array(trim($m, '[]')); + $query = $this->db->query($sql, $params); + $result = $query->row_array(); + if(isset($result['id'])) { + $sql = 'INSERT IGNORE INTO en_synonyms (definition_id, word_id) VALUES(?,?)'; + $params = array($id, $result['id']); + try { + $query = $this->db->query($sql, $params); + echo $this->db->affected_rows() > 0 ? ' Worked ' : ' Did not work '; + } catch(Exception $e) { + echo '
ERROR. Defintion: ' . $id . ' Word: ' . $result['id'] . '
'; + } + } + } + echo ' ROW '; + } + } + echo '

END!!!! YAY!!!'; + } +} +?> diff --git a/application/controllers/welcome.php b/application/controllers/welcome.php new file mode 100644 index 0000000..21bef43 --- /dev/null +++ b/application/controllers/welcome.php @@ -0,0 +1,27 @@ + + * @see http://codeigniter.com/user_guide/general/urls.html + */ + public function index() + { + $this->load->view('welcome_message'); + } +} + +/* End of file welcome.php */ +/* Location: ./application/controllers/welcome.php */ \ No newline at end of file diff --git a/application/core/index.html b/application/core/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/application/core/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/errors/error_404.php b/application/errors/error_404.php new file mode 100644 index 0000000..792726a --- /dev/null +++ b/application/errors/error_404.php @@ -0,0 +1,62 @@ + + + +404 Page Not Found + + + +
+

+ +
+ + \ No newline at end of file diff --git a/application/errors/error_db.php b/application/errors/error_db.php new file mode 100644 index 0000000..b396cda --- /dev/null +++ b/application/errors/error_db.php @@ -0,0 +1,62 @@ + + + +Database Error + + + +
+

+ +
+ + \ No newline at end of file diff --git a/application/errors/error_general.php b/application/errors/error_general.php new file mode 100644 index 0000000..fd63ce2 --- /dev/null +++ b/application/errors/error_general.php @@ -0,0 +1,62 @@ + + + +Error + + + +
+

+ +
+ + \ No newline at end of file diff --git a/application/errors/error_php.php b/application/errors/error_php.php new file mode 100644 index 0000000..f085c20 --- /dev/null +++ b/application/errors/error_php.php @@ -0,0 +1,10 @@ +
+ +

A PHP Error was encountered

+ +

Severity:

+

Message:

+

Filename:

+

Line Number:

+ +
\ No newline at end of file diff --git a/application/errors/index.html b/application/errors/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/application/errors/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/helpers/index.html b/application/helpers/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/application/helpers/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/hooks/index.html b/application/hooks/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/application/hooks/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/index.html b/application/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/application/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/language/english/index.html b/application/language/english/index.html new file mode 100644 index 0000000..c942a79 --- /dev/null +++ b/application/language/english/index.html @@ -0,0 +1,10 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + \ No newline at end of file diff --git a/application/libraries/Ms.php b/application/libraries/Ms.php new file mode 100644 index 0000000..02c3955 --- /dev/null +++ b/application/libraries/Ms.php @@ -0,0 +1,180 @@ +CI =& get_instance(); + + // Load the template config file and setup our master template and regions + include(APPPATH.'config/ms'.EXT); + if (isset($ms)) + { + $this->config = $ms; + } + } + public function is_authenticated() { + return $this->CI->session->userdata('is_authenticated') == true; + } + public function is_in_role($role_id) { + return in_array($role_id, $this->CI->session->userdata('roles')); + } + public function get_user_login_information($username) { + $sql = 'CALL ms_get_user_login_information(?)'; + $params = array($username); + $query = $this->CI->db->query($sql, $params); + return $query->row_array(); + } + public function get_user_by_id($username) { + $sql = 'CALL ms_get_user_by_id(?)'; + $params = array($username); + $query = $this->CI->db->query($sql, $params); + return $query->row_array(); + } + public function get_user_by_username($username) { + $sql = 'CALL ms_get_user_by_username(?)'; + $params = array($username); + $query = $this->CI->db->query($sql, $params); + return $query->row_array(); + } + public function get_roles_by_user_id($user_id) { + $sql = 'CALL ms_get_roles_by_user_id(?)'; + $params = array($user_id); + $query = $this->CI->db->query($sql, $params); + $result = $query->result_array(); + $array = array(); + foreach($result as $r) { + array_push($array, $r['id']); + } + return $array; + } + public function get_all_users() { + $sql = 'CALL ms_get_all_users()'; + $query = $this->CI->db->query($sql); + return $query->result_array(); + } + public function update_user($user_id, $username, $first_name, $last_name, $email, $mobile, $social_security) { + $first_name = $first_name == "" ? null : $first_name; + $last_name = $last_name == "" ? null : $last_name; + $mobile = $mobile == "" ? null : $mobile; + $social_security = $social_security == "" ? null : $social_security; + $sql = 'CALL ms_update_user(?,?,?,?,?,?,?)'; + $params = array($user_id, $username, $email, $first_name, $last_name, $mobile, $social_security); + $query = $this->CI->db->query($sql, $params); + return $this->CI->db->affected_rows(); + } + public function update_user_password($user_id, $old_password, $new_password) { + $sql = 'CALL ms_update_user_password(?,?,?)'; + $params = array($user_id, $old_password, $new_password); + $query = $this->CI->db->query($sql, $params); + return reset($query->row_array()); + } + public function login($username, $password) { + if($this->CI->ms->is_authenticated()) { + return true; + } + $user = self::authenticate_user($username,self::generate_password_hash($password)); + if($user != null) { + $user_data = array( + 'is_authenticated' => true, + 'user_id' => $user['id'], + 'username' => $username, + 'roles' => self::get_roles_by_user_id($user['id']) + ); + $this->CI->session->set_userdata($user_data); + $sql = 'CALL ms_update_user_last_login (?)'; + $params = array($user['id']); + $query = $this->CI->db->query($sql, $params); + return true; + } else { + return false; + } + } + public function authenticate_user($username, $password) { + $user = self::get_user_login_information($username); + if(count($user) > 0) { + if($user['pass'] == $password) { + return $user; + } else { + return null; + } + } else { + return null; + } + } + public function logout() { + $user_data = array( + 'is_authenticated' => '', + 'user_id' => '', + 'username' => '', + 'roles' => '' + ); + $this->CI->session->unset_userdata($user_data); + return true; + } + public function generate_password_hash($password){ + $this->CI->load->helper('security'); + return do_hash($this->CI->config->item('salt') . $password); + } + public function block_login() { + $this->CI->load->library('form_validation'); + $this->CI->form_validation->set_error_delimiters('', ''); + $this->CI->form_validation->set_rules('username', 'lang:username', 'trim|required|alpha_numeric|max_length[32]'); + $this->CI->form_validation->set_rules('password', 'lang:password', 'trim|required'); + if($this->CI->form_validation->run() == TRUE) { + $username = $_POST['username']; + $password = $_POST['password']; + if($this->CI->ms->login($username, $password)) { + return $this->CI->load->view('ms/block-login-success', '', true); + } else { + return $this->CI->load->view('ms/block-login-frm', '', true); + } + } else { + return $this->CI->load->view('ms/block-login-frm', '', true); + } + } +} +// END MS Class + +/* End of file Ms.php */ +/* Location: ./system/application/libraries/MS.php */ +?> diff --git a/application/libraries/Template.php b/application/libraries/Template.php new file mode 100644 index 0000000..ee3a998 --- /dev/null +++ b/application/libraries/Template.php @@ -0,0 +1,687 @@ + array(), + '_css' => array(), + ); + var $output; + var $js = array(); + var $css = array(); + var $parser = 'parser'; + var $parser_method = 'parse'; + var $parse_template = FALSE; + + /** + * Constructor + * + * Loads template configuration, template regions, and validates existence of + * default template + * + * @access public + */ + + function CI_Template() + { + // Copy an instance of CI so we can use the entire framework. + $this->CI =& get_instance(); + + // Load the template config file and setup our master template and regions + include(APPPATH.'config/template'.EXT); + if (isset($template)) + { + $this->config = $template; + $this->set_template($template['active_template']); + } + } + + // -------------------------------------------------------------------- + + /** + * Use given template settings + * + * @access public + * @param string array key to access template settings + * @return void + */ + + function set_template($group) + { + if (isset($this->config[$group])) + { + $this->template = $this->config[$group]; + $this->js = array(); + $this->css = array(); + } + else + { + show_error('The "'. $group .'" template group does not exist. Provide a valid group name or add the group first.'); + } + $this->initialize($this->template); + } + + // -------------------------------------------------------------------- + + /** + * Set master template + * + * @access public + * @param string filename of new master template file + * @return void + */ + + function set_master_template($filename) + { + if (file_exists(APPPATH .'views/'. $filename) or file_exists(APPPATH .'views/'. $filename . EXT)) + { + $this->master = $filename; + } + else + { + show_error('The filename provided does not exist in '. APPPATH .'views. Remember to include the extension if other than ".php"'); + } + } + + // -------------------------------------------------------------------- + + /** + * Dynamically add a template and optionally switch to it + * + * @access public + * @param string array key to access template settings + * @param array properly formed + * @return void + */ + + function add_template($group, $template, $activate = FALSE) + { + if ( ! isset($this->config[$group])) + { + $this->config[$group] = $template; + if ($activate === TRUE) + { + $this->initialize($template); + } + } + else + { + show_error('The "'. $group .'" template group already exists. Use a different group name.'); + } + } + + // -------------------------------------------------------------------- + + /** + * Initialize class settings using config settings + * + * @access public + * @param array configuration array + * @return void + */ + + function initialize($props) + { + // Set master template + if (isset($props['template']) + && (file_exists(APPPATH .'views/'. $props['template']) or file_exists(APPPATH .'views/'. $props['template'] . EXT))) + { + $this->master = $props['template']; + } + else + { + // Master template must exist. Throw error. + show_error('Either you have not provided a master template or the one provided does not exist in '. APPPATH .'views. Remember to include the extension if other than ".php"'); + } + + // Load our regions + if (isset($props['regions'])) + { + $this->set_regions($props['regions']); + } + // LM: Load any styles + if (isset($props['css'])) { + foreach($props['css'] as $s) { + self::add_css($s, 'link', FALSE); + } + } + // LM: Load any scripts + if (isset($props['js'])) { + foreach($props['js'] as $s) { + self::add_js($s, 'import', FALSE); + } + } + // Set parser and parser method + if (isset($props['parser'])) + { + $this->set_parser($props['parser']); + } + if (isset($props['parser_method'])) + { + $this->set_parser_method($props['parser_method']); + } + + // Set master template parser instructions + $this->parse_template = isset($props['parse_template']) ? $props['parse_template'] : FALSE; + + // LM: Set template controller + $this->has_logic = isset($props['has_logic']) ? $props['has_logic'] : FALSE; + } + + // -------------------------------------------------------------------- + + /** + * Set regions for writing to + * + * @access public + * @param array properly formed regions array + * @return void + */ + + function set_regions($regions) + { + if (count($regions)) + { + $this->regions = array( + '_js' => array(), + '_css' => array(), + ); + foreach ($regions as $key => $region) + { + // Regions must be arrays, but we take the burden off the template + // developer and insure it here + if ( ! is_array($region)) + { + $this->add_region($region); + } + else { + $this->add_region($key, $region); + } + } + } + } + + // -------------------------------------------------------------------- + + /** + * Dynamically add region to the currently set template + * + * @access public + * @param string Name to identify the region + * @param array Optional array with region defaults + * @return void + */ + + function add_region($name, $props = array()) + { + if ( ! is_array($props)) + { + $props = array(); + } + + if ( ! isset($this->regions[$name])) + { + $this->regions[$name] = $props; + } + else + { + show_error('The "'. $name .'" region has already been defined.'); + } + } + + // -------------------------------------------------------------------- + + /** + * Empty a region's content + * + * @access public + * @param string Name to identify the region + * @return void + */ + + function empty_region($name) + { + if (isset($this->regions[$name]['content'])) + { + $this->regions[$name]['content'] = array(); + } + else + { + show_error('The "'. $name .'" region is undefined.'); + } + } + + // -------------------------------------------------------------------- + + /** + * Set parser + * + * @access public + * @param string name of parser class to load and use for parsing methods + * @return void + */ + + function set_parser($parser, $method = NULL) + { + $this->parser = $parser; + $this->CI->load->library($parser); + + if ($method) + { + $this->set_parser_method($method); + } + } + + // -------------------------------------------------------------------- + + /** + * Set parser method + * + * @access public + * @param string name of parser class member function to call when parsing + * @return void + */ + + function set_parser_method($method) + { + $this->parser_method = $method; + } + + // -------------------------------------------------------------------- + + /** + * Write contents to a region + * + * @access public + * @param string region to write to + * @param string what to write + * @param boolean FALSE to append to region, TRUE to overwrite region + * @return void + */ + + function write($region, $content, $overwrite = FALSE) + { + if (isset($this->regions[$region])) + { + if ($overwrite === TRUE) // Should we append the content or overwrite it + { + $this->regions[$region]['content'] = array($content); + } else { + $this->regions[$region]['content'][] = $content; + } + } + + // Regions MUST be defined + else + { + show_error("Cannot write to the '{$region}' region. The region is undefined."); + } + } + + // -------------------------------------------------------------------- + + /** + * Write content from a View to a region. 'Views within views' + * + * @access public + * @param string region to write to + * @param string view file to use + * @param array variables to pass into view + * @param boolean FALSE to append to region, TRUE to overwrite region + * @return void + */ + + function write_view($region, $view, $data = NULL, $overwrite = FALSE) + { + $args = func_get_args(); + + // Get rid of non-views + unset($args[0], $args[2], $args[3]); + + // Do we have more view suggestions? + if (count($args) > 1) + { + foreach ($args as $suggestion) + { + if (file_exists(APPPATH .'views/'. $suggestion . EXT) or file_exists(APPPATH .'views/'. $suggestion)) + { + // Just change the $view arg so the rest of our method works as normal + $view = $suggestion; + break; + } + } + } + + $content = $this->CI->load->view($view, $data, TRUE); + $this->write($region, $content, $overwrite); + + } + + // -------------------------------------------------------------------- + + /** + * Parse content from a View to a region with the Parser Class + * + * @access public + * @param string region to write to + * @param string view file to parse + * @param array variables to pass into view for parsing + * @param boolean FALSE to append to region, TRUE to overwrite region + * @return void + */ + + function parse_view($region, $view, $data = NULL, $overwrite = FALSE) + { + $this->CI->load->library('parser'); + + $args = func_get_args(); + + // Get rid of non-views + unset($args[0], $args[2], $args[3]); + + // Do we have more view suggestions? + if (count($args) > 1) + { + foreach ($args as $suggestion) + { + if (file_exists(APPPATH .'views/'. $suggestion . EXT) or file_exists(APPPATH .'views/'. $suggestion)) + { + // Just change the $view arg so the rest of our method works as normal + $view = $suggestion; + break; + } + } + } + + $content = $this->CI->{$this->parser}->{$this->parser_method}($view, $data, TRUE); + $this->write($region, $content, $overwrite); + + } + + // -------------------------------------------------------------------- + + /** + * Dynamically include javascript in the template + * + * NOTE: This function does NOT check for existence of .js file + * + * @access public + * @param string script to import or embed + * @param string 'import' to load external file or 'embed' to add as-is + * @param boolean TRUE to use 'defer' attribute, FALSE to exclude it + * @return TRUE on success, FALSE otherwise + */ + + function add_js($script, $type = 'import', $defer = FALSE) + { + $success = TRUE; + $js = NULL; + $js_folder = $this->CI->config->item('js_folder'); + + $this->CI->load->helper('url'); + + switch ($type) + { + case 'import': + $filepath = base_url($js_folder . '/' . $script . '.js'); + $js = "\t + + + + + + + + + + +
+
+ + + + +
+
+
+ Copyright Whitemill AB 2013 + Site credits | Terms of Use +
+
+
+ + + + diff --git a/application/views/masters/login.php b/application/views/masters/login.php new file mode 100644 index 0000000..b5720d3 --- /dev/null +++ b/application/views/masters/login.php @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

config->item('site_name') ?>

+
+
+ +
+
+ + diff --git a/application/views/ms/block-frm-details.php b/application/views/ms/block-frm-details.php new file mode 100644 index 0000000..63c9928 --- /dev/null +++ b/application/views/ms/block-frm-details.php @@ -0,0 +1,53 @@ + 'frm-details')) ?> +
+ +
+ + Oh my god. Something failed with the database. And we dont know why... :( + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + diff --git a/application/views/ms/block-frm-password.php b/application/views/ms/block-frm-password.php new file mode 100644 index 0000000..690f51a --- /dev/null +++ b/application/views/ms/block-frm-password.php @@ -0,0 +1,42 @@ + 'frm-password')) ?> +
+ +
+ + You have given the wrong password!!! + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + diff --git a/application/views/ms/block-login-frm.php b/application/views/ms/block-login-frm.php new file mode 100644 index 0000000..89a84c1 --- /dev/null +++ b/application/views/ms/block-login-frm.php @@ -0,0 +1,48 @@ + 'frm-login')) ?> +
+
+

Login

+
+
+ +
+
+ + You have given the wrong username or password!!! + +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+ + diff --git a/application/views/ms/block-login-success.php b/application/views/ms/block-login-success.php new file mode 100644 index 0000000..409983c --- /dev/null +++ b/application/views/ms/block-login-success.php @@ -0,0 +1,4 @@ +
+

Du är nu inloggad

+ +
diff --git a/application/views/ms/page-user_profile.php b/application/views/ms/page-user_profile.php new file mode 100644 index 0000000..3f3dcad --- /dev/null +++ b/application/views/ms/page-user_profile.php @@ -0,0 +1,35 @@ +
+
+

Profile

+ +
+

Change Your Details

+
+ +
+
+
+

Change Your Password

+
+ +
+
+
+
+

Information

+ +
+ Last Login: + Last Activity: + Date Created + Date Modified +
+
+
+

Projects

+ +
+

This section is not functional.

+
+
+
diff --git a/application/views/pages/hasher.php b/application/views/pages/hasher.php new file mode 100644 index 0000000..1df98ca --- /dev/null +++ b/application/views/pages/hasher.php @@ -0,0 +1,29 @@ +
+
+ + + +
+
+

What would you like to hash?

+
+
+ +
+
+ +
+
+ +
+
+

This is the resault:

+
+ms->generate_password_hash($_POST['string']);
+	else
+		echo "Nothing to hash";
+?>
+		
+
diff --git a/application/views/pages/peeps.php b/application/views/pages/peeps.php new file mode 100644 index 0000000..29831c3 --- /dev/null +++ b/application/views/pages/peeps.php @@ -0,0 +1,12 @@ +
+
+
+ Username Name Mobile + + + + + + +
+
diff --git a/application/views/pages/start.php b/application/views/pages/start.php new file mode 100644 index 0000000..361b6e5 --- /dev/null +++ b/application/views/pages/start.php @@ -0,0 +1,48 @@ +
+
+
+
+

WordyGo

+
+
+ 'frm-search')) ?> +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+ diff --git a/application/views/templates/learn.php b/application/views/templates/learn.php new file mode 100644 index 0000000..5cbde8a --- /dev/null +++ b/application/views/templates/learn.php @@ -0,0 +1,130 @@ +
+
+ +
+
+ ' . $current . '' : '' ?> + +
+
diff --git a/application/views/templates/projects.php b/application/views/templates/projects.php new file mode 100644 index 0000000..9e80956 --- /dev/null +++ b/application/views/templates/projects.php @@ -0,0 +1,15 @@ +
+
+ +
+
+ + +
+
diff --git a/application/views/templates/projects.php! b/application/views/templates/projects.php! new file mode 100644 index 0000000..b5cad75 --- /dev/null +++ b/application/views/templates/projects.php! @@ -0,0 +1,14 @@ +
+
+ +
+
+ ' . $current . '' : '' ?> + +
+
diff --git a/application/views/templates/resources.php b/application/views/templates/resources.php new file mode 100644 index 0000000..d0f6dea --- /dev/null +++ b/application/views/templates/resources.php @@ -0,0 +1,13 @@ +
+ +
+ +
+
+ +
+
diff --git a/application/views/templates/wrapper.php b/application/views/templates/wrapper.php new file mode 100644 index 0000000..55815e2 --- /dev/null +++ b/application/views/templates/wrapper.php @@ -0,0 +1,5 @@ +
+
+ +
+
diff --git a/application/views/welcome_message.php b/application/views/welcome_message.php new file mode 100644 index 0000000..0bf5a8d --- /dev/null +++ b/application/views/welcome_message.php @@ -0,0 +1,88 @@ + + + + + Welcome to CodeIgniter + + + + + +
+

Welcome to CodeIgniter!

+ +
+

The page you are looking at is being generated dynamically by CodeIgniter.

+ +

If you would like to edit this page you'll find it located at:

+ application/views/welcome_message.php + +

The corresponding controller for this page is found at:

+ application/controllers/welcome.php + +

If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide.

+
+ + +
+ + + \ No newline at end of file diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..e8e4714 --- /dev/null +++ b/bower.json @@ -0,0 +1,18 @@ +{ + "name": "wordwordgo", + "version": "0.1.0", + "description": "A Clever Dictionary.", + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "modernizr": "~2.6.2", + "respond": "~1.3.0", + "requirejs": "~2.1.9" + } +} diff --git a/config.rb b/config.rb new file mode 100644 index 0000000..7528d5f --- /dev/null +++ b/config.rb @@ -0,0 +1,26 @@ +require 'animation' +# Require any additional compass plugins here. + + +# Set this to the root of your project when deployed: +http_path = "/" +css_dir = "css" +sass_dir = "src/sass" +images_dir = "img" +javascripts_dir = "src/js" + +# You can select your preferred output style here (can be overridden via the command line): +# output_style = :expanded or :nested or :compact or :compressed +output_style = :compact + +# To enable relative paths to assets via compass helper functions. Uncomment: +# relative_assets = true + +# To disable debugging comments that display the original location of your selectors. Uncomment: +line_comments = false + +# If you prefer the indented syntax, you might want to regenerate this +# project again passing --syntax sass, or you can uncomment this: +# preferred_syntax = :sass +# and then run: +# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass diff --git a/index.php b/index.php new file mode 100644 index 0000000..f4ac11a --- /dev/null +++ b/index.php @@ -0,0 +1,205 @@ + a:not(.-a)').next('ul').addClass('-m'); + var navDud = $('nav.m div.d'); + var navCurrent = $('nav.m a.-c'); + + if (navCurrent.length > 0) { + var navDudPos = $('nav.m a.-c').parent().get(0).offsetLeft + 15; + var navDudWidth = $('nav.m a.-c').parent().width(); + navDud.css({ + width: navDudWidth, + left: navDudPos + }); + } + $('nav.m a').hover(function () { + var pos = $(this).parent().get(0).offsetLeft + 15; + var width = $(this).parent().width(); + navDud.css({ + width: width, + left: pos + }); + }, function () { + navDud.css({ + width: navDudWidth, + left: navDudPos + }); + }); + $('nav.side li.dd > a').click(function (ev) { + ev.preventDefault(); + if ($(this).hasClass('-a')) { + if (!$(this).hasClass('-c')) { + $(this).removeClass('-a').next('ul').addClass('-m'); + $('nav.side li > a.-c').addClass('-a').next('ul').removeClass('-m'); + } + } else { + $('nav.side li > a.-a').removeClass('-a').next('ul').addClass('-m'); + $(this).addClass('-a').next('ul').removeClass('-m'); + } + }); + $('#pwd_update').addClass('-m'); + $('#pwd_update-toggle').click(function (ev) { + ev.preventDefault(); + $('#pwd_update').toggleClass('-m'); + }); + $('.A').addClass('on'); +}); diff --git a/src/js/rjs/config.js b/src/js/rjs/config.js new file mode 100644 index 0000000..e54c176 --- /dev/null +++ b/src/js/rjs/config.js @@ -0,0 +1,9 @@ +requirejs.config({ + baseUrl: './', + optimize: 'uglify2', + name: 'main', + out: '../../../js/main.js', + //paths: { + // 'jquery': 'empty:' + //} +}); diff --git a/src/js/rjs/main.js b/src/js/rjs/main.js new file mode 100644 index 0000000..a010ed5 --- /dev/null +++ b/src/js/rjs/main.js @@ -0,0 +1,8 @@ +'use strict'; +//requirejs.config({ +// paths: { +// 'jquery': '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min' +// } +//}); +define(function () { +}); diff --git a/src/sass/_content.scss b/src/sass/_content.scss new file mode 100644 index 0000000..322f42c --- /dev/null +++ b/src/sass/_content.scss @@ -0,0 +1,6 @@ +// import all content files from content folder here, or right it straight in +@import "content/start"; +@import "content/resources"; +@import "content/learn"; +@import "content/user"; +@import "content/peeps"; diff --git a/src/sass/_corrections.scss b/src/sass/_corrections.scss new file mode 100644 index 0000000..1ad67b6 --- /dev/null +++ b/src/sass/_corrections.scss @@ -0,0 +1,2 @@ +// place corrections using modernizr classes here, such as +// html.no-svg .img { background: url('_.png'); } diff --git a/src/sass/_fonts.scss b/src/sass/_fonts.scss new file mode 100644 index 0000000..4e8978d --- /dev/null +++ b/src/sass/_fonts.scss @@ -0,0 +1,2 @@ +@import url(http://fonts.googleapis.com/css?family=Roboto+Slab:700,400); +@import url(http://fonts.googleapis.com/css?family=Inconsolata:400,700); diff --git a/src/sass/_keyframes.scss b/src/sass/_keyframes.scss new file mode 100644 index 0000000..7d45481 --- /dev/null +++ b/src/sass/_keyframes.scss @@ -0,0 +1 @@ +// place all keyframes for animations here diff --git a/src/sass/_layout.scss b/src/sass/_layout.scss new file mode 100644 index 0000000..c740ba8 --- /dev/null +++ b/src/sass/_layout.scss @@ -0,0 +1,223 @@ +// general layout, including header, navigation mm +@media #{$wm-screen} { + header { + padding-bottom: 20px; + ._t { + margin: 10px 0; + } + .company { + color: #666; + float: left; + > .address { + display: none; + } + > .logo { + margin-bottom: 5px; + } + > .slogan { + text-align: right; + font-size: emCalc(12px); + text-transform: lowercase; + } + } + .user_info { + text-align: right; + p { + line-height: 1; + margin: 0; + &.name { + margin-bottom: 4px; + } + &.menu { + font-size: emCalc(12px); + } + } + } + } + nav { + ul { + list-style-type: none; + margin: 0; + > li { + line-height: 1; + } + } + &.m { + position: relative; + > .d { + position: absolute; + z-index: 1; + //left: $wm-column-gutter / 2 + 900; + top: 1px; + height: 36px; + width: 0px; + background: #eee; + &.A.on { + @include transition(left 0.2s, width 0.2s); + } + } + > ul { + position: relative; + z-index: 2; + border: 1px none #666; + border-top-style: solid; + border-bottom-style: solid; + @include pie-clearfix; + > li { + float: left; + > a { + text-align: center; + display: block; + padding: 10px; + @include transition(all 0.2s); + &.-c { + font-weight: bold; + } + } + } + } + } + &.side { + > ul { + border-bottom: 1px solid #666; + > li { + > a { + color: #666; + display: block; + padding: 10px; + padding-left: 17px; + border: 1px solid #666; + border-bottom: none; + background: #eee; + position: relative; + &.A.on { + @include transition(all 0.5s); + } + &:hover, &.-a { + color: #555; + background: #ccc; + } + // &.-c { + // //background: desaturate(lighten($c-main-1,30%), 30%) !important; + // background: #aaa !important; + // color: #444 !important; + // } + } + > ul { + border-left: 1px solid #999; + border-right: 1px solid #999; + margin: 0; + overflow: hidden; + &.A.on { + @include transition(height 0.5s); + } + &.-m { + height: 0px !important; + } + > li { + &:first-child { + border-top: 1px solid #666; + } + > a { + padding: 7px 10px; + display: block; + font-size: emCalc(16px); + } + } + } + &.dd { + > a { + &:before { + content: ""; + display: block; + position: absolute; + top: 13px; + left: 6px; + @include css-triangle($triangle-height:5px,$triangle-direction:right,$triangle-color:#777); + } + &.-a { + &:before { + @include transform(rotate(90deg)); + } + } + &.A.on { + &:before { + @include transition(transform 0.5s); + } + } + } + } + } + } + } + } + section { + position: relative; + background: white; + display: block; + width: 100%; + padding: 15px; + border: 1px solid #ccc; + margin-bottom: 30px; + //@include box-shadow(0px 0px 5px 0px rgba(0,0,0,0.3)); + > h1 { + //@include border-top-left-radius(20px); + font-size: emCalc(16px); + //display: block; + //width: 100px; + //height: 40px; + //background: red; + } + + &:before{ + @include transform(skew(0deg, -4deg)); + @include box-shadow(5px -5px 5px rgba(0,0,0,0.3)); + position:absolute; + background-color:rgba(0,0,0,0.3); + top:4px; + content:''; + z-index:-6; + width:60px; + height:10px; + right:9px; + } + &:after{ + @include transform(skew(0deg, 4deg)); + @include box-shadow(5px 5px 5px rgba(0,0,0,0.3)); + position:absolute; + background-color:rgba(0,0,0,0.3); + bottom:4px; + content:''; + z-index:-6; + width:60px; + height:10px; + right:9px; + } + } + footer { + .p { + @include pie-clearfix; + margin-top: 20px; + border-top: 1px solid #666; + padding: 15px 0; + } + span { + font-size: emCalc(12px); + } + } +/* + +Google Code style (c) Aahan Krish + +*/ + + table { + td { + padding: 10px; + } + } +} +@media #{$wm-small-max} { +} +@media #{$wm-medium-min} { +} diff --git a/src/sass/_styles.scss b/src/sass/_styles.scss new file mode 100644 index 0000000..89f4291 --- /dev/null +++ b/src/sass/_styles.scss @@ -0,0 +1,72 @@ +// general styles that are not included in codewhite/components/global or codewhite/components/type +@media #{$wm-screen} { + p > a { + text-decoration: underline; + @include transition(all 0.4s); + } + li > .description { + color: #666; + font-size: emCalc(12px); + } + .logo { + text-align: center; + text-transform: lowercase; + > span { + display: inline-block; + font-size:30px; + padding:10px 0; + width:46px; + margin-left:5px; + color:#000; + background: red; + @for $i from 1 through 7 { + &:nth-of-type(#{$i}) { + @include transform(rotate(5deg * $i)); + background: adjust-hue($c-main-1, 30deg * ($i - 1)); + } + } + } + font-size: emCalc(45px); + font-family: 'Roboto Slab', sans-serif; + font-weight: 700; + } + pre.text, pre.command { + padding: 15px; + overflow: auto; + } + div.success { + border: 1px solid $c-success; + padding: 10px 20px 10px 78px; + min-height: 82px; + background: lighten($c-success, 45%) url('../img/trophy.svg') no-repeat 10px 10px; + + h1, h2, h3, h4, h5, h6, p, span { + color: $c-success; + } + p { + &:last-child { + margin-bottom: 0; + } + } + } + + .align { + width: 100%; + + > span { + padding: 5px 0; + display: block; + width: 50%; + &:not(.end) { + border-bottom: 1px solid #ccc; + } + &.lbl { + float: left; + } + &.val { + text-align: right; + float: right; + } + } + } +} diff --git a/src/sass/_utilities.scss b/src/sass/_utilities.scss new file mode 100644 index 0000000..e329c13 --- /dev/null +++ b/src/sass/_utilities.scss @@ -0,0 +1,10 @@ +// Import helpers here... such as the following + +@import "compass/utilities/general"; +@import "compass/css3"; + +@import "animation"; +@import "codewhite/animate/bouncing"; + +@import "codewhite/mixins/headers"; +@import "codewhite/mixins/navigation"; diff --git a/src/sass/codewhite/_animate.scss b/src/sass/codewhite/_animate.scss new file mode 100644 index 0000000..8545883 --- /dev/null +++ b/src/sass/codewhite/_animate.scss @@ -0,0 +1,28 @@ +// --------------------------------------------------------------------------- +// Animations from Animate.css +// Author : Dan Eden +// URL : http://daneden.me/animate/ +// +// Attention seekers +// - flash bounce shake tada swing wobble pulse +// Fading entrances +// - fadeIn fadeInUp fadeInDown fadeInLeft fadeInRight fadeInUpBig fadeInDownBig fadeInLeftBig fadeInRightBig +// Fading exits +// - fadeOut fadeOutUp fadeOutDown fadeOutLeft fadeOutRight fadeOutUpBig fadeOutDownBig fadeOutLeftBig fadeOutRightBig +// Bouncing entrances +// - bounceIn bounceInDown bounceInUp bounceInLeft bounceInRight +// Bouncing exits +// - bounceOut bounceOutDown bounceOutUp bounceOutLeft bounceOutRight +// Rotating entrances +// - rotateIn rotateInDownLeft rotateInDownRight rotateInUpLeft rotateInUpRight +// Rotating exits +// - rotateOut rotateOutDownLeft rotateOutDownRight rotateOutUpLeft rotateOutUpRight +// Specials +// - hinge rollIn rollOut +// --------------------------------------------------------------------------- +@import "animate/fading"; +@import "animate/bouncing"; +@import "animate/rotating"; +@import "animate/flippers"; +@import "animate/attention-seekers"; +@import "animate/specials"; diff --git a/src/sass/codewhite/_base.scss b/src/sass/codewhite/_base.scss new file mode 100644 index 0000000..47eb26f --- /dev/null +++ b/src/sass/codewhite/_base.scss @@ -0,0 +1,10 @@ +// this must be imported before functions, as some functions use variables set here. +@import "variables/base"; + +// this needs to be imported before are set media queries so they can be calculated correctly. +@import "functions"; + +@import "user_variables"; +@import "variables/media_queries"; +@import "variables/visibility"; + diff --git a/src/sass/codewhite/_functions.scss b/src/sass/codewhite/_functions.scss new file mode 100644 index 0000000..14773ce --- /dev/null +++ b/src/sass/codewhite/_functions.scss @@ -0,0 +1,81 @@ +// It strips the unit of measure and returns it +@function strip-unit($num) { + @return $num / ($num * 0 + 1); +} + +// Converts "px" to "em" using the ($)em-base +@function convert-to-em($value) { + $value: strip-unit($value) / strip-unit($wm-em-base) * 1em; + @if ($value == 0em) { $value: 0; } // Turn 0em into 0 + @return $value; +} + +// Working in ems is annoying. Think in pixels by using this handy function, emCalc(#) +// Just enter the number, no need to mention "px" +@function emCalc($values...) { + $max: length($values); // Get the total number of parameters passed + + // If there is only 1 parameter, then return it as an integer. + // This is done because a list can't be multiplied or divided even if it contains a single value + @if $max == 1 { @return convert-to-em(nth($values, 1)); } + + $emValues: (); // This will eventually store the converted $values in a list + @for $i from 1 through $max { + $emValues: append($emValues, convert-to-em(nth($values, $i))); + } + @return $emValues; +} + +// +// Grid Calc Function +// + +@function gridCalc($colNumber, $totalColumns) { + @return percentage(($colNumber / $totalColumns)); +} + +@mixin css-triangle($triangle-height, $triangle-direction, $triangle-width:2*$triangle-height, $triangle-color:$c-main-1) { + width: 0; + height: 0; + @if ($triangle-direction == top) { + border-left: $triangle-width / 2 solid transparent; + border-bottom: $triangle-height solid $triangle-color; + border-right: $triangle-width / 2 solid transparent; + } + @if ($triangle-direction == bottom) { + border-left: $triangle-width / 2 solid transparent; + border-top: $triangle-height solid $triangle-color; + border-right: $triangle-width / 2 solid transparent; + } + @if ($triangle-direction == left) { + border-top: $triangle-width / 2 solid transparent; + border-right: $triangle-height solid $triangle-color; + border-bottom: $triangle-width / 2 solid transparent; + } + @if ($triangle-direction == right) { + border-top: $triangle-width / 2 solid transparent; + border-left: $triangle-height solid $triangle-color; + border-bottom: $triangle-width / 2 solid transparent; + } +} +@mixin css-right_angle-triangle($triangle-size, $triangle-color, $triangle-direction) { +width: 0; +height: 0; +border: inset $triangle-size; +@if ($triangle-direction == top) { +border-color: $triangle-color transparent transparent transparent; +border-top-style: solid; +} +@if ($triangle-direction == bottom) { +border-color: transparent transparent $triangle-color transparent; +border-bottom-style: solid; +} +@if ($triangle-direction == left) { +border-color: transparent transparent transparent $triangle-color; +border-left-style: solid; +} +@if ($triangle-direction == right) { +border-color: transparent $triangle-color transparent transparent; +border-right-style: solid; +} +} diff --git a/src/sass/codewhite/_user_variables.scss b/src/sass/codewhite/_user_variables.scss new file mode 100644 index 0000000..f3f49e6 --- /dev/null +++ b/src/sass/codewhite/_user_variables.scss @@ -0,0 +1,397 @@ +// USER VARIABLES +// + +// +// Base Variables +// + +// The default font-size is set to 100% of the browser style sheet (usually 16px) +// for compatibility with brower-based text zoom or user-set defaults. + +// Since the typical default browser font-size is 16px, that makes the calculation for grid size. +// If you want your base font-size to be different and not have it effect the grid breakpoints, +// set $wm-em-base to $wm-base-font-size and make sure $wm-base-font-size is a px value. +// $wm-base-font-size: 100%; + +// $wm-base-line-height is 24px while $wm-base-font-size is 16px +// $wm-base-line-height: 150%; + +// This is the default html and body font-size for the base em value. +// $wm-em-base: 16; + +// We use these to control various global styles +// $wm-body-bg: #fff; +// $wm-body-font-color: #222; +$wm-body-font-family: Georgia, serif; +// $wm-body-font-weight: normal; +// $wm-body-font-style: normal; + +// We use this to control font-smoothing +// $wm-font-smoothing: subpixel-antialiased; + +// We use these to control text direction settings +// $wm-text-direction: ltr; + +// NOTE: No need to change this conditional statement, $wm-text-direction variable controls it all. +// $wm-default-float: left; +// $wm-opposite-direction: right; +// @if $wm-text-direction == ltr { +// $wm-default-float: left; +// $wm-opposite-direction: right; +// } @else { +// $wm-default-float: right; +// $wm-opposite-direction: left; +// } + +// We use this to control whether or not CSS classes come through in the gem files. +// $wm-include-html-classes: true; +// $wm-include-print-styles: true; +// $wm-include-html-global-classes: $wm-include-html-classes; + +// +// Global Variables +// + +// We use these as default colors throughout + +// vl - very light +// l - light +// d - dark +// vd - very dark + +$c-main-1: #2ba6cb; +$c-main-1-vl: lighten($c-main-1, 20%); +$c-main-1-l: lighten($c-main-1, 10%); +$c-main-1-d: darken($c-main-1, 10%); +$c-main-1-vd: darken($c-main-1, 20%); +// $c-main-2: #2bcb88; +// $c-main-2-vl: lighten($c-main-2, 20%); +// $c-main-2-l: lighten($c-main-2, 10%); +// $c-main-2-d: darken($c-main-2, 10%); +// $c-main-2-vd: darken($c-main-2, 20%); +// $c-main-3: #cb512b; +// $c-main-3-vl: lighten($c-main-3, 20%); +// $c-main-3-l: lighten($c-main-3, 10%); +// $c-main-3-d: darken($c-main-3, 10%); +// $c-main-3-vd: darken($c-main-3, 20%); +// $c-grey: #e9e9e9; +// $c-grey-vl: lighten($c-grey, 20%); +// $c-grey-l: lighten($c-grey, 10%); +// $c-grey-d: darken($c-grey, 10%); +// $c-grey-vd: darken($c-grey, 20%); +// $c-alert: #c60f13; +// $c-alert-vl: lighten($c-alert, 20%); +// $c-alert-l: lighten($c-alert, 10%); +// $c-alert-d: darken($c-alert, 10%); +// $c-alert-vd: darken($c-alert, 20%); +// $c-success: #5da423; +// $c-success-vl: lighten($c-success, 20%); +// $c-success-l: lighten($c-success, 10%); +// $c-success-d: darken($c-success, 10%); +// $c-success-vd: darken($c-success, 20%); + +// We use these to make sure border radius matches unless we want it different. +// $wm-global-radius: 3px; +// $wm-global-rounded: 1000px; + +// We use these to control inset shadow shiny edges and depressions. +// $wm-shiny-edge-size: 0 1px 0; +// $wm-shiny-edge-color: rgba(#fff, .5); +// $wm-shiny-edge-active-color: rgba(#000, .2); + +//We use this as cursors values for enabling the option of having custom cursors in the whole site's stylesheet +// $wm-cursor-crosshair-value: crosshair; +// $wm-cursor-default-value: default; +// $wm-cursor-pointer-value: pointer; +// $wm-cursor-help-value: help; +// $wm-cursor-text-value: text; + +// +// Typography Variables +// + +// $wm-include-html-type-classes: $wm-include-html-classes; + +// We use these to control header font styles +$wm-header-font-family: 'Roboto Slab', sans-serif; +// $wm-header-font-weight: bold; +// $wm-header-font-style: normal; +$wm-header-font-color: $c-main-1; +// $wm-header-line-height: 1.4; +// $wm-header-top-margin: .2em; +// $wm-header-bottom-margin: .5em; +// $wm-header-text-rendering: optimizeLegibility; + +// We use these to control header font sizes +// $wm-h1-font-size: emCalc(44); +// $wm-h2-font-size: emCalc(37); +// $wm-h3-font-size: emCalc(27); +// $wm-h4-font-size: emCalc(23); +// $wm-h5-font-size: emCalc(18); +// $wm-h6-font-size: 1em; + +// These control how subheaders are styled. +// $wm-subheader-line-height: 1.4; +// $wm-subheader-font-color: lighten($wm-header-font-color, 30%); +// $wm-subheader-font-weight: 300; +// $wm-subheader-top-margin: .2em; +// $wm-subheader-bottom-margin: .5em; + +// A general styling +// $wm-small-font-size: 60%; +// $wm-small-font-color: lighten($wm-header-font-color, 30%); + +// We use these to style paragraphs +// $wm-paragraph-font-family: inherit; +// $wm-paragraph-font-weight: normal; +// $wm-paragraph-font-size: 1em; +// $wm-paragraph-line-height: 1.6; +// $wm-paragraph-margin-bottom: emCalc(20); +// $wm-paragraph-aside-font-size: emCalc(14); +// $wm-paragraph-aside-line-height: 1.35; +// $wm-paragraph-aside-font-style: italic; +// $wm-paragraph-text-rendering: optimizeLegibility; + +// We use these to style tags +$wm-code-color: #333; +$wm-code-font-family: 'Inconsolata', Consolas, 'Liberation Mono', Courier, monospace; +$wm-code-font-weight: 400; + +// We use these to style anchors +// $wm-anchor-text-decoration: none; +// $wm-anchor-font-color: $c-main-1; +$wm-anchor-font-color-hover: $c-main-1-vl; + +// We use these to style the
element +// $wm-hr-border-width: 1px; +// $wm-hr-border-style: solid; +// $wm-hr-border-color: #ddd; +// $wm-hr-margin: emCalc(20); + +// We use these to style lists +// $wm-ulist-style-type: disc; +// $wm-ulist-style-position: outside; +// $wm-ulist-side-margin: emCalc(20px); +// $wm-ulist-nested-margin: emCalc(20px); +// $wm-olist-style-type: decimal; +// $wm-olist-style-position: outside; +// $wm-olist-side-margin: emCalc(25px); +// $wm-olist-nested-margin: emCalc(25px); +// $wm-dlist-header-weight: bold; +// $wm-dlist-header-margin-bottom: .3em; +// $wm-dlist-margin-bottom: emCalc(12); + +// We use these to style blockquotes +// $wm-blockquote-font-color: lighten($wm-header-font-color, 30%); +// $wm-blockquote-padding: emCalc(9, 20, 0, 19); +// $wm-blockquote-border: 1px solid #ddd; +// $wm-blockquote-cite-font-size: emCalc(13); +// $wm-blockquote-cite-font-color: lighten($wm-header-font-color, 20%); +// $wm-blockquote-cite-link-color: $wm-blockquote-cite-font-color; + +// Acronym styles +// $wm-acronym-underline: 1px dotted #ddd; + +// We use these to control padding and margin +// $wm-microformat-padding: emCalc(10, 12); +// $wm-microformat-margin: emCalc(0, 0, 20, 0); + +// We use these to control the border styles +// $wm-microformat-border-width: 1px; +// $wm-microformat-border-style: solid; +// $wm-microformat-border-color: #ddd; + +// We use these to control full name font styles +// $wm-microformat-fullname-font-weight: bold; +// $wm-microformat-fullname-font-size: emCalc(15); + +// We use this to control the summary font styles +// $wm-microformat-summary-font-weight: bold; + +// We use this to control abbr padding +// $wm-microformat-abbr-padding: emCalc(0, 1); + +// We use this to control abbr font styles +// $wm-microformat-abbr-font-weight: bold; +// $wm-microformat-abbr-font-decoration: none; + +// Control code in

+$wm-include-code-classes: true;
+
+// This code control the color in the code
+// $c-code-pre-bg: #111;
+// $c-code-1-n: $c-main-1;
+// $c-code-1-vl: lighten($c-code-1-n, 10%);
+// $c-code-1-l: lighten($c-code-1-n, 5%);
+// $c-code-1-d: darken($c-code-1-n, 5%);
+// $c-code-1-vd: darken($c-code-1-n, 10%);
+// $c-code-2-n: $c-main-2;
+// $c-code-2-vl: lighten($c-code-2-n, 30%);
+// $c-code-2-l: lighten($c-code-2-n, 15%);
+// $c-code-2-d: darken($c-code-2-n, 15%);
+// $c-code-2-vd: darken($c-code-2-n, 30%);
+// $c-code-3-n: $c-main-3;
+// $c-code-3-vl: lighten($c-code-3-n, 30%);
+// $c-code-3-l: lighten($c-code-3-n, 15%);
+// $c-code-3-d: darken($c-code-3-n, 15%);
+// $c-code-3-vd: darken($c-code-3-n, 30%);
+
+//
+// Media Queries
+//
+
+// $wm-small-screen-min: 0px;
+// $wm-medium-screen-min: 640px;
+// $wm-large-screen-min: 1024px;
+// $wm-xlarge-screen-min: 1440px;
+
+// $wm-small-screen-max: $wm-medium-screen-min - 1;
+// $wm-medium-screen-max: $wm-large-screen-min - 1;
+// $wm-large-screen-max: $wm-xlarge-screen-min - 1;
+
+// $wm-screen: "only screen";
+// $wm-small-only: "only screen and (min-width: #{$wm-small-screen-min}) and (max-width: #{$wm-small-screen-max})";
+// $wm-small-min: "only screen and (min-width: #{$wm-small-screen-min})";
+// $wm-small-max: "only screen and (max-width: #{$wm-small-screen-max})";
+// $wm-medium-only: "only screen and (min-width: #{$wm-medium-screen-min}) and (max-width: #{$wm-medium-screen-max})";
+// $wm-medium-min: "only screen and (min-width: #{$wm-medium-screen-min})";
+// $wm-medium-max: "only screen and (max-width: #{$wm-medium-screen-max})";
+// $wm-large-only: "only screen and (min-width: #{$wm-large-screen-min}) and (max-width: #{$wm-large-screen-max})";
+// $wm-large-min: "only screen and (min-width: #{$wm-large-screen-min})";
+// $wm-large-max: "only screen and (max-width: #{$wm-large-screen-max})";
+// $wm-xlarge-only: "only screen and (min-width: #{$wm-xlarge-screen-min})";
+// $wm-xlarge-min: "only screen and (min-width: #{$wm-xlarge-screen-min})";
+// $wm-landscape: "only screen and (orientation: landscape)";
+// $wm-portrait: "only screen and (orientation: portrait)";
+
+//
+// Grid Variables
+//
+
+// $wm-include-html-grid-classes: true;
+$wm-row-width: emCalc(1200px);
+// $wm-column-gutter: emCalc(30px);
+// $wm-total-columns: 12;
+
+//
+// Button Variables
+//
+
+// $wm-include-html-button-classes: $wm-include-html-classes;
+
+// We use these to build padding for buttons.
+// $wm-button-med: emCalc(12);
+// $wm-button-tny: emCalc(7);
+// $wm-button-sml: emCalc(9);
+// $wm-button-lrg: emCalc(16);
+
+// We use this to control the display property.
+// $wm-button-display: inline-block;
+// $wm-button-margin-bottom: emCalc(20);
+
+// We use these to control button text styles.
+// $wm-button-font-family: inherit;
+// $wm-button-font-color: #fff;
+// $wm-button-font-color-alt: #333;
+// $wm-button-font-med: emCalc(16);
+// $wm-button-font-tny: emCalc(11);
+// $wm-button-font-sml: emCalc(13);
+// $wm-button-font-lrg: emCalc(20);
+// $wm-button-font-weight: bold;
+// $wm-button-font-align: center;
+
+// We use these to control various hover effects.
+// $wm-button-function-factor: 10%;
+
+// We use these to control button border styles.
+// $wm-button-border-width: 1px;
+// $wm-button-border-style: solid;
+
+// We use this to set the default radius used throughout the core.
+// $wm-button-radius: $wm-global-radius;
+// $wm-button-round: $wm-global-rounded;
+
+// We use this to set default opacity for disabled buttons.
+// $wm-button-disabled-opacity: 0.6;
+
+//
+// Form Variables
+//
+
+// $wm-include-html-form-classes: $wm-include-html-classes;
+
+// We use this to set the base for lots of form spacing and positioning styles
+// $wm-form-spacing: emCalc(16);
+
+// We use these to style the labels in different ways
+// $wm-form-label-pointer: pointer;
+// $wm-form-label-font-size: emCalc(14);
+// $wm-form-label-font-weight: 500;
+// $wm-form-label-font-color: lighten(#000, 30%);
+// $wm-form-label-bottom-margin: emCalc(3);
+// $wm-input-font-family: inherit;
+// $wm-input-font-color: rgba(0,0,0,0.75);
+// $wm-input-font-size: emCalc(14);
+// $wm-input-bg-color: #fff;
+// $wm-input-focus-bg-color: darken(#fff, 2%);
+// $wm-input-border-color: darken(#fff, 20%);
+// $wm-input-focus-border-color: darken(#fff, 40%);
+// $wm-input-border-style: solid;
+// $wm-input-border-width: 1px;
+// $wm-input-disabled-bg: #ddd;
+// $wm-input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
+// $wm-input-include-glowing-effect: true;
+
+// We use these to style the select form element.
+// $wm-select-bg: #fff;
+// $wm-select-fade-to-color: #f3f3f3;
+// $wm-select-border-color: $wm-input-border-color;
+// $wm-select-triangle-color: #aaa;
+// $wm-select-triangle-color-open: #222;
+// $wm-select-height: emCalc(13) + ($wm-form-spacing * 1.5);
+// $wm-select-margin-bottom: emCalc(20);
+// $wm-select-font-color-selected: #141414;
+// $wm-select-disabled-color: #888;
+// $wm-select-font-size: $wm-input-font-size;
+// $wm-select-width-small: 134px;
+// $wm-select-width-medium: 254px;
+// $wm-select-width-large: 434px;
+
+// We use these to style the fieldset border and spacing.
+// $wm-fieldset-border-style: solid;
+// $wm-fieldset-border-width: 1px;
+// $wm-fieldset-border-color: #ddd;
+// $wm-fieldset-padding: emCalc(20);
+// $wm-fieldset-margin: emCalc(18, 0);
+
+// We use these to style the legends when you use them
+// $wm-legend-bg: #fff;
+// $wm-legend-font-weight: bold;
+// $wm-legend-padding: emCalc(0, 3);
+
+// We use these to style the prefix and postfix input elements
+// $wm-input-prefix-bg: darken(#fff, 5%);
+// $wm-input-prefix-border-color: darken(#fff, 20%);
+// $wm-input-prefix-border-size: 1px;
+// $wm-input-prefix-border-type: solid;
+// $wm-input-prefix-overflow: hidden;
+// $wm-input-prefix-font-color: #333;
+// $wm-input-prefix-font-color-alt: #fff;
+
+// We use these to style the error states for inputs and labels
+// $wm-input-error-message-padding: emCalc(6, 4);
+// $wm-input-error-message-top: -($wm-form-spacing) - emCalc(5);
+// $wm-input-error-message-font-size: emCalc(12);
+// $wm-input-error-message-font-weight: bold;
+// $wm-input-error-message-font-color: #fff;
+// $wm-input-error-message-font-color-alt: #333;
+
+// We use this to style the glowing effect of inputs when focused
+// $wm-glowing-effect-fade-time: 0.45s;
+// $wm-glowing-effect-color: $wm-input-focus-border-color;
+
+//
+// Visibility
+//
+
+// $wm-include-html-visibility-classes: $wm-include-html-classes;
diff --git a/src/sass/codewhite/animate/_attention-seekers.scss b/src/sass/codewhite/animate/_attention-seekers.scss
new file mode 100644
index 0000000..ec4f59b
--- /dev/null
+++ b/src/sass/codewhite/animate/_attention-seekers.scss
@@ -0,0 +1,126 @@
+// ---------------------------------------------------------------------------
+@include keyframes(flash) {
+  0% {
+    opacity: 1; }
+  25% {
+    opacity: 0; }
+  50% {
+    opacity: 1; }
+  75% {
+    opacity: 0; }
+  100% {
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(bounce) {
+  0% {
+    @include translateY(0); }
+  20% {
+    @include translateY(0); }
+  40% {
+    @include translateY(-30px); }
+  50% {
+    @include translateY(0); }
+  60% {
+    @include translateY(-15px); }
+  80% {
+    @include translateY(0); }
+  100% {
+    @include translateY(0); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(shake) {
+  0% {
+    @include translateX(0); }
+  10% {
+    @include translateX(-10px); }
+  20% {
+    @include translateX(10px); }
+  30% {
+    @include translateX(-10px); }
+  40% {
+    @include translateX(10px); }
+  50% {
+    @include translateX(-10px); }
+  60% {
+    @include translateX(10px); }
+  70% {
+    @include translateX(-10px); }
+  80% {
+    @include translateX(10px); }
+  90% {
+    @include translateX(-10px); }
+  100% {
+    @include translateX(0); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(tada) {
+  0% {
+    @include scale(1); }
+  10% {
+    @include transform(scale(0.9) rotate(-3deg)); }
+  20% {
+    @include transform(scale(0.9) rotate(-3deg)); }
+  30% {
+    @include transform(scale(1.1) rotate(3deg)); }
+  40% {
+    @include transform(scale(1.1) rotate(-3deg)); }
+  50% {
+    @include transform(scale(1.1) rotate(3deg)); }
+  60% {
+    @include transform(scale(1.1) rotate(-3deg)); }
+  70% {
+    @include transform(scale(1.1) rotate(3deg)); }
+  80% {
+    @include transform(scale(1.1) rotate(-3deg)); }
+  90% {
+    @include transform(scale(1.1) rotate(3deg)); }
+  100% {
+    @include transform(scale(1) rotate(0)); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(swing) {
+  20%, 40%, 60%, 80%, 100% {
+    @include transform-origin(top center); }
+  20% {
+    @include rotate(15deg); }
+  40% {
+    @include rotate(-10deg); }
+  60% {
+    @include rotate(5deg); }
+  80% {
+    @include rotate(-5deg); }
+  100% {
+    @include rotate(0deg); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(wobble) {
+  0% {
+    @include translateX(0%); }
+  15% {
+    @include transform(translateX(-25%) rotate(-5deg)); }
+  30% {
+    @include transform(translateX(20%) rotate(3deg)); }
+  45% {
+    @include transform(translateX(-15%) rotate(-3deg)); }
+  60% {
+    @include transform(translateX(10%) rotate(2deg)); }
+  75% {
+    @include transform(translateX(-5%) rotate(-1deg)); }
+  100% {
+    @include transform(translateX(0%)); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(pulse) {
+  0% {
+    @include scale(1); }
+  50% {
+    @include scale(1.1); }
+  100% {
+    @include scale(1); } }
diff --git a/src/sass/codewhite/animate/_bouncing.scss b/src/sass/codewhite/animate/_bouncing.scss
new file mode 100644
index 0000000..8ec60ff
--- /dev/null
+++ b/src/sass/codewhite/animate/_bouncing.scss
@@ -0,0 +1,147 @@
+// ---------------------------------------------------------------------------
+@mixin bounceIn() {
+	@include keyframes(bounceIn) {
+		0% {
+			opacity: 0;
+			@include scale(0.3);
+		}
+		50% {
+			opacity: 1;
+			@include scale(1.05); 
+		}
+		70% {
+			@include scale(0.9); 
+		}
+		100% {
+			@include scale(1);
+		}
+	}
+}
+
+
+@mixin bounceInDown {
+@include keyframes(bounceInDown) {
+  0% {
+    opacity: 0;
+    @include translateY(-2000px); }
+  60% {
+    opacity: 1;
+    @include translateY(30px); }
+  80% {
+    @include translateY(-10px); }
+  100% {
+    @include translateY(0); } }
+}
+
+
+
+
+@mixin bounceInUp {
+@include keyframes(bounceInUp) {
+  0% {
+    opacity: 0;
+    @include translateY(2000px); }
+  60% {
+    opacity: 1;
+    @include translateY(-30px); }
+  80% {
+    @include translateY(10px); }
+  100% {
+    @include translateY(0); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin bounceInRight {
+@include keyframes(bounceInRight) {
+  0% {
+    opacity: 0;
+    @include translateX(2000px); }
+  60% {
+    opacity: 1;
+    @include translateX(-30px); }
+  80% {
+    @include translateX(10px); }
+  100% {
+    @include translateX(0); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin bounceInLeft {
+@include keyframes(bounceInLeft) {
+  0% {
+    opacity: 0;
+    @include translateX(-2000px); }
+  60% {
+    opacity: 1;
+    @include translateX(30px); }
+  80% {
+    @include translateX(-10px); }
+  100% {
+    @include translateX(0); } }
+}
+// ---------------------------------------------------------------------------
+@mixin bounceOut {
+@include keyframes(bounceOut) {
+  0% {
+    @include scale(1); }
+  25% {
+    @include scale(0.95); }
+  50% {
+    opacity: 1;
+    @include scale(1.1); }
+  100% {
+    opacity: 0;
+    @include scale(0.3); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin bounceOutUp {
+@include keyframes(bounceOutUp) {
+  0% {
+    @include translateY(0); }
+  20% {
+    opacity: 1;
+    @include translateY(20px); }
+  100% {
+    opacity: 0;
+    @include translateY(-2000px); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin bounceOutDown {
+@include keyframes(bounceOutDown) {
+  0% {
+    @include translateY(0); }
+  20% {
+    opacity: 1;
+    @include translateY(-20px); }
+  100% {
+    opacity: 0;
+    @include translateY(2000px); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin bounceOutLeft {
+@include keyframes(bounceOutLeft) {
+  0% {
+    @include translateX(0); }
+  20% {
+    opacity: 1;
+    @include translateX(20px); }
+  100% {
+    opacity: 0;
+    @include translateX(-2000px); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin bounceOutRight {
+@include keyframes(bounceOutRight) {
+  0% {
+    @include translateX(0); }
+  20% {
+    opacity: 1;
+    @include translateX(-20px); }
+  100% {
+    opacity: 0;
+    @include translateX(2000px); } }
+}
diff --git a/src/sass/codewhite/animate/_classes.scss b/src/sass/codewhite/animate/_classes.scss
new file mode 100644
index 0000000..f898bff
--- /dev/null
+++ b/src/sass/codewhite/animate/_classes.scss
@@ -0,0 +1,21 @@
+// .animated and .animated.hinge classes for external use
+.animated {
+  @include animation(1s ease both); }
+
+.animated.hinge {
+  @include animation(2s ease both); }
+
+// Animations list
+$animations: flash, shake, bounce, tada, swing, wobble, pulse, flip, flipInX, flipOutX, flipInY, flipOutY, fadeIn, fadeInUp, fadeInDown, fadeInLeft, fadeInRight, fadeInUpBig, fadeInDownBig, fadeInLeftBig, fadeInRightBig, fadeOut, fadeOutUp, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUpBig, fadeOutDownBig, fadeOutLeftBig, fadeOutRightBig, bounceIn, bounceInDown, bounceInUp, bounceInLeft, bounceInRight, bounceOut, bounceOutDown, bounceOutUp, bounceOutLeft, bounceOutRight, rotateIn, rotateInDownLeft, rotateInDownRight, rotateInUpLeft, rotateInUpRight, rotateOut, rotateOutDownLeft, rotateOutDownRight, rotateOutUpLeft, rotateOutUpRight, hinge, rollIn, rollOut;
+
+// Animations that require backface-visibility
+$backface: flip, flipInX, flipOutX, flipInY, flipOutY;
+
+// Creation of the different classes
+@each $anim in $animations {
+  .#{$anim} {
+    @if index($backface, $anim) {
+      @include backface-visibility(visible); }
+    @if $anim == "swing" {
+      @include transform-origin(top, center); }
+    @include animation-name($anim); } }
diff --git a/src/sass/codewhite/animate/_fading.scss b/src/sass/codewhite/animate/_fading.scss
new file mode 100644
index 0000000..5850bc4
--- /dev/null
+++ b/src/sass/codewhite/animate/_fading.scss
@@ -0,0 +1,190 @@
+// ---------------------------------------------------------------------------
+@mixin fadeIn {
+@include keyframes(fadeIn) {
+  0% {
+    opacity: 0; }
+  100% {
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeInUp {
+@include keyframes(fadeInUp) {
+  0% {
+    @include translateY(20px);
+    opacity: 0; }
+  100% {
+    @include translateY(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeInDown {
+@include keyframes(fadeInDown) {
+  0% {
+    @include translateY(-20px);
+    opacity: 0; }
+  100% {
+    @include translateY(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeInRight {
+@include keyframes(fadeInRight) {
+  0% {
+    @include translateX(20px);
+    opacity: 0; }
+  100% {
+    @include translateX(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeInLeft {
+@include keyframes(fadeInLeft) {
+  0% {
+    @include translateX(-20px);
+    opacity: 0; }
+  100% {
+    @include translateX(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeInUpBig {
+@include keyframes(fadeInUpBig) {
+  0% {
+    @include translateY(2000px);
+    opacity: 0; }
+  100% {
+    @include translateY(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeInDownBig {
+@include keyframes(fadeInDownBig) {
+  0% {
+    opacity: 0;
+    @include translateY(-2000px); }
+  100% {
+    opacity: 1;
+    @include translateY(0); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeInRightBig {
+@include keyframes(fadeInRightBig) {
+  0% {
+    opacity: 0;
+    @include translateX(2000px); }
+  100% {
+    opacity: 1;
+    @include translateX(0); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeInLeftBig {
+@include keyframes(fadeInLeftBig) {
+  0% {
+    opacity: 0;
+    @include translateX(-2000px); }
+  100% {
+    opacity: 1;
+    @include translateX(0); } }
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOut) {
+  0% {
+    opacity: 1; }
+  100% {
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeOutUp {
+@include keyframes(fadeOutUp) {
+  0% {
+    @include translateY(0);
+    opacity: 1; }
+  100% {
+    @include translateY(-20px);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeOutDown {
+@include keyframes(fadeOutDown) {
+  0% {
+    @include translateY(0);
+    opacity: 1; }
+  100% {
+    @include translateY(20px);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeOutRight {
+@include keyframes(fadeOutRight) {
+  0% {
+    @include translateX(0);
+    opacity: 1; }
+  100% {
+    @include translateX(20px);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeOutLeft {
+@include keyframes(fadeOutLeft) {
+  0% {
+    @include translateX(0);
+    opacity: 1; }
+  100% {
+    @include translateX(-20px);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeOutUpBig {
+@include keyframes(fadeOutUpBig) {
+  0% {
+    @include translateY(0);
+    opacity: 1; }
+  100% {
+    @include translateY(-2000px);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeOutDownBig {
+@include keyframes(fadeOutDownBig) {
+  0% {
+    opacity: 1;
+    @include translateY(0); }
+  100% {
+    opacity: 0;
+    @include translateY(2000px); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeOutRightBig {
+@include keyframes(fadeOutRightBig) {
+  0% {
+    opacity: 1;
+    @include translateX(0); }
+  100% {
+    opacity: 0;
+    @include translateX(2000px); } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin fadeOutLeftBig {
+@include keyframes(fadeOutLeftBig) {
+  0% {
+    opacity: 1;
+    @include translateX(0); }
+  100% {
+    opacity: 0;
+    @include translateX(-2000px); } }
+}
diff --git a/src/sass/codewhite/animate/_flippers.scss b/src/sass/codewhite/animate/_flippers.scss
new file mode 100644
index 0000000..6cad90d
--- /dev/null
+++ b/src/sass/codewhite/animate/_flippers.scss
@@ -0,0 +1,93 @@
+// ---------------------------------------------------------------------------
+@mixin flip {
+	@include keyframes(flip) {
+		0% {
+			@include transform(perspective(400px) rotateY(0));
+			@include animation-timing-function(ease-out);
+		}
+		40% {
+			@include transform(perspective(400px) translateZ(150px) rotateY(170deg));
+			@include animation-timing-function(ease-out);
+		}
+		50% {
+			@include transform(perspective(400px) translateZ(150px) rotateY(190deg) scale(1));
+			@include animation-timing-function(ease-in);
+		}
+		80% {
+			@include transform(perspective(400px) rotateY(360deg) scale(0.95));
+			@include animation-timing-function(ease-in);
+		}
+		100% {
+			@include transform(perspective(400px) scale(1));
+			@include animation-timing-function(ease-in);
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+@mixin flipInX {
+	@include keyframes(flipInX) {
+		0% {
+			@include transform(perspective(400px) rotateX(90deg));
+			@include opacity(0);
+		}
+		40% {
+			@include transform(perspective(400px) rotateX(-10deg));
+		}
+		70% {
+			@include transform(perspective(400px) rotateX(10deg));
+		}
+		100% {
+			@include transform(perspective(400px) rotateX(0deg));
+			@include opacity(1);
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+@mixin flipOutX {
+	@include keyframes(flipOutX) {
+		0% {
+			@include transform(perspective(400px) rotateX(0deg));
+			@include opacity(1);
+		}
+		100% {
+			@include transform(perspective(400px) rotateX(90deg));
+			@include opacity(0);
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+@mixin flipInY {
+	@include keyframes(flipInY) {
+		0% {
+			@include transform(perspective(400px) rotateY(90deg));
+			@include opacity(0);
+		}
+		40% {
+			@include transform(perspective(400px) rotateY(-10deg));
+		}
+		70% {
+			@include transform(perspective(400px) rotateY(10deg));
+		}
+		100% {
+			@include transform(perspective(400px) rotateY(0deg));
+			@include opacity(1);
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+@mixin flipOutY {
+	@include keyframes(flipOutY) {
+		0% {
+			@include transform(perspective(400px) rotateY(0deg));
+			@include opacity(1);
+		}
+		100% {
+			@include transform(perspective(400px) rotateY(90deg));
+			@include opacity(0);
+		}
+	}
+}
diff --git a/src/sass/codewhite/animate/_rotating.scss b/src/sass/codewhite/animate/_rotating.scss
new file mode 100644
index 0000000..3f17552
--- /dev/null
+++ b/src/sass/codewhite/animate/_rotating.scss
@@ -0,0 +1,126 @@
+// ---------------------------------------------------------------------------
+@mixin rotateIn {
+@include keyframes(rotateIn) {
+  0% {
+    @include transform-origin(center center);
+    @include rotate(-200deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(center center);
+    @include rotate(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin rotateInDownLeft {
+@include keyframes(rotateInDownLeft) {
+  0% {
+    @include transform-origin(left bottom);
+    @include rotate(-90deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(left bottom);
+    @include rotate(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin rotateInUpLeft {
+@include keyframes(rotateInUpLeft) {
+  0% {
+    @include transform-origin(left bottom);
+    @include rotate(90deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(left bottom);
+    @include rotate(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin rotateInUpRight {
+@include keyframes(rotateInUpRight) {
+  0% {
+    @include transform-origin(right bottom);
+    @include rotate(-90deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(right bottom);
+    @include rotate(0);
+    opacity: 1; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin rotateInDownRight {
+@include keyframes(rotateInDownRight) {
+  0% {
+    @include transform-origin(right bottom);
+    @include rotate(90deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(right bottom);
+    @include rotate(0);
+    opacity: 1; } }
+// ---------------------------------------------------------------------------
+@include keyframes(rotateOut) {
+  0% {
+    @include transform-origin(center center);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(center center);
+    @include rotate(200deg);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin rotateOutDownLeft {
+@include keyframes(rotateOutDownLeft) {
+  0% {
+    @include transform-origin(left bottom);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(left bottom);
+    @include rotate(90deg);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin rotateOutUpLeft {
+@include keyframes(rotateOutUpLeft) {
+  0% {
+    @include transform-origin(left bottom);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(left bottom);
+    @include rotate(-90deg);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin rotateOutDownRight {
+@include keyframes(rotateOutDownRight) {
+  0% {
+    @include transform-origin(right bottom);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(right bottom);
+    @include rotate(-90deg);
+    opacity: 0; } }
+}
+
+// ---------------------------------------------------------------------------
+@mixin rotateOutUpRight {
+@include keyframes(rotateOutUpRight) {
+  0% {
+    @include transform-origin(right bottom);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(right bottom);
+    @include rotate(90deg);
+    opacity: 0; } }
+}
diff --git a/src/sass/codewhite/animate/_specials.scss b/src/sass/codewhite/animate/_specials.scss
new file mode 100644
index 0000000..a4df7ed
--- /dev/null
+++ b/src/sass/codewhite/animate/_specials.scss
@@ -0,0 +1,58 @@
+// ---------------------------------------------------------------------------
+@mixin hinge {
+	@include keyframes(hinge) {
+		0% {
+			@include rotate(0);
+			@include transform-origin(top left);
+			@include animation-timing-function(ease-in-out); 
+		}
+		20%, 60% {
+			@include rotate(80deg);
+			@include transform-origin(top left);
+			@include animation-timing-function(ease-in-out); 
+		}
+		40% {
+			@include rotate(60deg);
+			@include transform-origin(top left);
+			@include animation-timing-function(ease-in-out); 
+		}
+		80% {
+			@include transform(rotate(60deg) translateY(0));
+			@include opacity(1);
+			@include transform-origin(top left);
+			@include animation-timing-function(ease-in-out); 
+		}
+		100% {
+			@include translateY(700px);
+			@include opacity(0);
+		}
+	}
+}
+
+// ---------------------------------------------------------------------------
+@mixin rollIn {
+	@include keyframes(rollIn) {
+		0% {
+			@include opacity(0);
+			@include transform(translateX(-100%) rotate(-120deg)); 
+		}
+		100% {
+			@include opacity(1);
+			@include transform(translateX(0px) rotate(0deg)); 
+		} 
+	}
+}
+
+// ---------------------------------------------------------------------------
+@mixin rollOut {
+	@include keyframes(rollOut) {
+		0% {
+			@include opacity(1);
+			@include transform(translateX(0px) rotate(0deg));
+		}
+		100% {
+			@include opacity(0);
+			@include transform(translateX(-100%) rotate(-120deg)); 
+		} 
+	}
+}
diff --git a/src/sass/codewhite/animate/fading/_fading-entrances.scss b/src/sass/codewhite/animate/fading/_fading-entrances.scss
new file mode 100644
index 0000000..c1c3108
--- /dev/null
+++ b/src/sass/codewhite/animate/fading/_fading-entrances.scss
@@ -0,0 +1,86 @@
+// ---------------------------------------------------------------------------
+@include keyframes(fadeIn) {
+  0% {
+    opacity: 0; }
+  100% {
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeInUp) {
+  0% {
+    @include translateY(20px);
+    opacity: 0; }
+  100% {
+    @include translateY(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeInDown) {
+  0% {
+    @include translateY(-20px);
+    opacity: 0; }
+  100% {
+    @include translateY(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeInRight) {
+  0% {
+    @include translateX(20px);
+    opacity: 0; }
+  100% {
+    @include translateX(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeInLeft) {
+  0% {
+    @include translateX(-20px);
+    opacity: 0; }
+  100% {
+    @include translateX(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeInUpBig) {
+  0% {
+    @include translateY(2000px);
+    opacity: 0; }
+  100% {
+    @include translateY(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeInDownBig) {
+  0% {
+    opacity: 0;
+    @include translateY(-2000px); }
+  100% {
+    opacity: 1;
+    @include translateY(0); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeInRightBig) {
+  0% {
+    opacity: 0;
+    @include translateX(2000px); }
+  100% {
+    opacity: 1;
+    @include translateX(0); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeInLeftBig) {
+  0% {
+    opacity: 0;
+    @include translateX(-2000px); }
+  100% {
+    opacity: 1;
+    @include translateX(0); } }
diff --git a/src/sass/codewhite/animate/fading/_fading-exits.scss b/src/sass/codewhite/animate/fading/_fading-exits.scss
new file mode 100644
index 0000000..c53b85a
--- /dev/null
+++ b/src/sass/codewhite/animate/fading/_fading-exits.scss
@@ -0,0 +1,86 @@
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOut) {
+  0% {
+    opacity: 1; }
+  100% {
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOutUp) {
+  0% {
+    @include translateY(0);
+    opacity: 1; }
+  100% {
+    @include translateY(-20px);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOutDown) {
+  0% {
+    @include translateY(0);
+    opacity: 1; }
+  100% {
+    @include translateY(20px);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOutRight) {
+  0% {
+    @include translateX(0);
+    opacity: 1; }
+  100% {
+    @include translateX(20px);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOutLeft) {
+  0% {
+    @include translateX(0);
+    opacity: 1; }
+  100% {
+    @include translateX(-20px);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOutUpBig) {
+  0% {
+    @include translateY(0);
+    opacity: 1; }
+  100% {
+    @include translateY(-2000px);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOutDownBig) {
+  0% {
+    opacity: 1;
+    @include translateY(0); }
+  100% {
+    opacity: 0;
+    @include translateY(2000px); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOutRightBig) {
+  0% {
+    opacity: 1;
+    @include translateX(0); }
+  100% {
+    opacity: 0;
+    @include translateX(2000px); } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(fadeOutLeftBig) {
+  0% {
+    opacity: 1;
+    @include translateX(0); }
+  100% {
+    opacity: 0;
+    @include translateX(-2000px); } }
diff --git a/src/sass/codewhite/animate/rotating/_rotating-entrances.scss b/src/sass/codewhite/animate/rotating/_rotating-entrances.scss
new file mode 100644
index 0000000..5a4de38
--- /dev/null
+++ b/src/sass/codewhite/animate/rotating/_rotating-entrances.scss
@@ -0,0 +1,58 @@
+// ---------------------------------------------------------------------------
+@include keyframes(rotateIn) {
+  0% {
+    @include transform-origin(center center);
+    @include rotate(-200deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(center center);
+    @include rotate(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(rotateInDownLeft) {
+  0% {
+    @include transform-origin(left bottom);
+    @include rotate(-90deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(left bottom);
+    @include rotate(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(rotateInUpLeft) {
+  0% {
+    @include transform-origin(left bottom);
+    @include rotate(90deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(left bottom);
+    @include rotate(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(rotateInUpRight) {
+  0% {
+    @include transform-origin(right bottom);
+    @include rotate(-90deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(right bottom);
+    @include rotate(0);
+    opacity: 1; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(rotateInDownRight) {
+  0% {
+    @include transform-origin(right bottom);
+    @include rotate(90deg);
+    opacity: 0; }
+  100% {
+    @include transform-origin(right bottom);
+    @include rotate(0);
+    opacity: 1; } }
diff --git a/src/sass/codewhite/animate/rotating/_rotating-exits.scss b/src/sass/codewhite/animate/rotating/_rotating-exits.scss
new file mode 100644
index 0000000..6c42f00
--- /dev/null
+++ b/src/sass/codewhite/animate/rotating/_rotating-exits.scss
@@ -0,0 +1,58 @@
+// ---------------------------------------------------------------------------
+@include keyframes(rotateOut) {
+  0% {
+    @include transform-origin(center center);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(center center);
+    @include rotate(200deg);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(rotateOutDownLeft) {
+  0% {
+    @include transform-origin(left bottom);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(left bottom);
+    @include rotate(90deg);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(rotateOutUpLeft) {
+  0% {
+    @include transform-origin(left bottom);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(left bottom);
+    @include rotate(-90deg);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(rotateOutDownRight) {
+  0% {
+    @include transform-origin(right bottom);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(right bottom);
+    @include rotate(-90deg);
+    opacity: 0; } }
+
+
+// ---------------------------------------------------------------------------
+@include keyframes(rotateOutUpRight) {
+  0% {
+    @include transform-origin(right bottom);
+    @include rotate(0);
+    opacity: 1; }
+  100% {
+    @include transform-origin(right bottom);
+    @include rotate(90deg);
+    opacity: 0; } }
diff --git a/src/sass/codewhite/components/_buttons.scss b/src/sass/codewhite/components/_buttons.scss
new file mode 100644
index 0000000..6a8414c
--- /dev/null
+++ b/src/sass/codewhite/components/_buttons.scss
@@ -0,0 +1,71 @@
+//
+// Button Classes
+//
+
+// initially copied from Foundation 4.3.1
+
+@import "../mixins/buttons";
+
+// Only include these classes if the variable is true, otherwise they'll be left out.
+@if $wm-include-html-button-classes != false {
+
+  // Default styles applied outside of media query
+  input[type="submit"], button, .button {
+    @include button-base;
+    @include button-size;
+    @include button-style;
+
+    &.secondary { @include button-style($bg:$c-grey); }
+    &.success   { @include button-style($bg:$c-success); }
+    &.alert     { @include button-style($bg:$c-alert); }
+
+    &.-t   { @include button-size($padding:$wm-button-tny); }
+    &.-s  { @include button-size($padding:$wm-button-sml); }
+    &.-l  { @include button-size($padding:$wm-button-lrg); }
+    &.expand { @include button-size($padding:null,$full-width:true); }
+
+    &.-tl { text-indent: emCalc(12); }
+    &.-tr { padding-right: emCalc(12); }
+
+    &.disabled, &[disabled] { @include button-style($bg:$c-main-1, $disabled:true);
+      &.secondary { @include button-style($bg:$c-main-2, $disabled:true); }
+      &.success { @include button-style($bg:$c-alert, $disabled:true); }
+      &.alert { @include button-style($bg:$c-alert, $disabled:true); }
+    }
+  }
+
+  input[type="submit"], button, .button {
+    @include button-size($padding:false, $is-input:$wm-button-med);
+    &.tiny { @include button-size($padding:false, $is-input:$wm-button-tny); }
+    &.small { @include button-size($padding:false, $is-input:$wm-button-sml); }
+    &.large { @include button-size($padding:false, $is-input:$wm-button-lrg); }
+  }
+
+  // Styles for any browser or device that support media queries
+  @media only screen {
+
+    input[type="submit"], button, .button {
+      @include box-shadow($wm-shiny-edge-size $wm-shiny-edge-color inset);
+      @include single-transition(background-color);
+
+      &.large  { @include button-size($padding:false, $full-width:false); }
+      &.small  { @include button-size($padding:false, $full-width:false); }
+      &.tiny   { @include button-size($padding:false, $full-width:false); }
+
+      &.radius { @include button-style($bg:false, $radius:true); }
+      &.round  { @include button-style($bg:false, $radius:$wm-button-round); }
+    }
+
+  }
+
+  // Additional styles for screens larger than 768px
+  @media #{$wm-small-max} {
+
+    input[type="submit"], button, .button {
+      @include button-base($style:false, $display:inline-block);
+      @include button-size($padding:false, $full-width:false);
+    }
+
+  }
+
+}
diff --git a/src/sass/codewhite/components/_forms.scss b/src/sass/codewhite/components/_forms.scss
new file mode 100644
index 0000000..045d9f4
--- /dev/null
+++ b/src/sass/codewhite/components/_forms.scss
@@ -0,0 +1,182 @@
+//
+// Form Classes
+//
+
+// Copied by LKM from Foundation 4.3.1 2013-09-09 15:14
+
+@import '../mixins/forms';
+
+// Only include these classes if the variable is true, otherwise they'll be left out.
+@if $wm-include-html-form-classes != false {
+	@include form-reset;
+	/* Standard Forms */
+	//form { margin: 0 0 $wm-form-spacing; }
+
+	/* Using forms within rows, we need to set some defaults */
+	form .row { @include form-row-base; }
+
+	/* Label Styles */
+	label {
+		@include form-label;
+
+		&.right { @include form-label(right,false); }
+		&.inline { @include form-label(inline,false); }
+
+		/* Styles for required inputs */
+		small {
+			text-transform: capitalize;
+			color: lighten($wm-form-label-font-color, 10%);
+		}
+	}
+
+	/* Attach elements to the beginning or end of an input */
+	.prefix,
+	.postfix { @include prefix-postfix-base; }
+
+	/* Adjust padding, alignment and radius if pre/post element is a button */
+	.postfix.button { @include button-size(false,false,false); @include postfix(false,true); }
+	.prefix.button { @include button-size(false,false,false); @include prefix(false,true); }
+
+	.prefix.button.radius { @include border-radius(0); @include border-left-radius($wm-button-radius); }
+	.postfix.button.radius { @include border-radius(0); @include border-right-radius($wm-button-radius); }
+	.prefix.button.round { @include border-radius(0); @include border-left-radius($wm-button-round); }
+	.postfix.button.round { @include border-radius(0); @include border-right-radius($wm-button-round); }
+
+	/* Separate prefix and postfix styles when on span or label so buttons keep their own */
+	span.prefix,label.prefix {
+		@include prefix();
+		&.radius { @include border-radius(0); @include border-left-radius($wm-global-radius); }
+	}
+	span.postfix,label.postfix {
+		@include postfix();
+		&.radius { @include border-radius(0); @include border-right-radius($wm-global-radius); }
+	}
+
+	/* Input groups will automatically style first and last elements of the group */
+	.input-group {
+		@if $wm-default-float == left {
+			&.round {
+				&>*:first-child,  &>*:first-child * {
+					@include border-left-radius($wm-button-round);
+				}
+				&>*:last-child, &>*:last-child * {
+					@include border-right-radius($wm-button-round);
+				}
+			}
+			&.radius {
+				&>*:first-child,  &>*:first-child * {
+					@include border-left-radius($wm-global-radius);
+				}
+				&>*:last-child, &>*:last-child * {
+					@include border-right-radius($wm-global-radius);
+				}
+			}
+		} @else {
+			&.round {
+				&>*:first-child,  &>*:first-child * {
+					@include border-right-radius($wm-button-round);
+				}
+				&>*:last-child, &>*:last-child * {
+					@include border-left-radius($wm-button-round);
+				}
+			}
+			&.radius {
+				&>*:first-child,  &>*:first-child * {
+					@include border-right-radius($wm-global-radius);
+				}
+				&>*:last-child, &>*:last-child * {
+					@include border-left-radius($wm-global-radius);
+				}
+			}
+		}
+	}
+
+	/* We use this to get basic styling on all basic form elements */
+	input[type="text"],
+	input[type="password"],
+	input[type="date"],
+	input[type="datetime"],
+	input[type="datetime-local"],
+	input[type="month"],
+	input[type="week"],
+	input[type="email"],
+	input[type="number"],
+	input[type="search"],
+	input[type="tel"],
+	input[type="time"],
+	input[type="url"],
+	textarea {
+		@include form-element;
+		@if not $wm-input-include-glowing-effect {
+			@include single-transition(all, 0.15s, linear);
+		}
+	}
+
+	select {
+		@include form-select;
+	}
+
+	/* Adjust margin for form elements below */
+	input[type="file"],
+	input[type="checkbox"],
+	input[type="radio"],
+	select {
+		margin: 0 0 $wm-form-spacing 0;
+	}
+
+	/* Normalize file input width */
+	input[type="file"] {
+		width:100%;
+	}
+
+	/* We add basic fieldset styling */
+	fieldset {
+		@include fieldset;
+	}
+
+/* Error Handling */
+
+	[data-abide] {
+		.error small.error, span.error, small.error {
+			@include form-error-message;
+			margin-top: 0;
+		}
+		span.error, small.error { display: none; }
+	}
+
+	span.error, small.error {
+		@include form-error-message;
+	}
+	.error {
+		input,
+		textarea,
+		select {
+			@include form-error-color;
+			margin-bottom: 0;
+		}
+
+		label,
+		label.error {
+			@include form-label-error-color;
+		}
+
+		small.error {
+			@include form-error-message;
+		}
+
+		span.error-message {
+			display: block;
+		}
+	}
+
+	input.error,
+	textarea.error {
+		@include form-error-color;
+	}
+
+	.error select {
+		@include form-error-color;
+	}
+
+	label.error { @include form-label-error-color; }
+}
diff --git a/src/sass/codewhite/components/_global.scss b/src/sass/codewhite/components/_global.scss
new file mode 100644
index 0000000..f8fe9be
--- /dev/null
+++ b/src/sass/codewhite/components/_global.scss
@@ -0,0 +1,4 @@
+@import "../mixins/global";
+@if $wm-include-html-global-classes {
+	@include global-base;
+}
diff --git a/src/sass/codewhite/components/_grid-nr.scss b/src/sass/codewhite/components/_grid-nr.scss
new file mode 100644
index 0000000..6684221
--- /dev/null
+++ b/src/sass/codewhite/components/_grid-nr.scss
@@ -0,0 +1,56 @@
+//
+// Whitemill Grid
+//
+// Copied by LKM from Foundation 4.3.1 2013-09-09 15:14
+//
+// @version
+//   0.1.0
+//
+// @title
+//   Grid
+//
+// @description
+//   With a default "small-#" grid, a 640-1024px "medium-#" grid, and a 1024+ "large-#" grid, we've got you covered for any layout you can think of.
+//
+
+
+@import "../mixins/grid";
+
+// Right and Left "auto" for grid
+%right-auto { #{$wm-opposite-direction}: auto; }
+%left-auto { #{$wm-default-float}: auto; }
+
+@if $wm-include-html-grid-classes != false {
+	/* Grid HTML Classes */
+	.row {
+		@include grid-row($responsive:false);
+
+		&.collapse {
+			.column,
+			.columns { @include grid-column($collapse:true,$responsive:false); }
+		}
+
+		.row { @include grid-row($behavior:nest,$responsive:false);
+			&.collapse { @include grid-row($behavior:nest-collapse,$responsive:false); }
+		}
+	}
+
+	.column,
+	.columns { @include grid-column($columns:$wm-total-columns, $include-position-relative: true, $responsive:true); }
+
+
+	@for $i from 1 through $wm-total-columns {
+		.medium#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false,$responsive:false); }
+	}
+
+	.column.medium-centered,
+	.columns.medium-centered { @include grid-column($center:true, $collapse:null, $float:false,$responsive:false); }
+
+	.column.medium-uncentered,
+	.columns.medium-uncentered {
+		margin-#{$wm-default-float}: 0;
+		margin-#{$wm-opposite-direction}: 0;
+		float: $wm-default-float !important;
+	}
+
+}
diff --git a/src/sass/codewhite/components/_grid-nr.scss! b/src/sass/codewhite/components/_grid-nr.scss!
new file mode 100644
index 0000000..d1a2698
--- /dev/null
+++ b/src/sass/codewhite/components/_grid-nr.scss!
@@ -0,0 +1,65 @@
+//
+// Whitemill Grid
+//
+// Copied by LKM from Foundation 4.3.1 2013-09-09 15:14
+//
+// @version
+//   0.1.0
+//
+// @title
+//   Grid
+//
+// @description
+//   With a default "small-#" grid, a 640-1024px "medium-#" grid, and a 1024+ "large-#" grid, we've got you covered for any layout you can think of.
+//
+
+
+@import "../mixins/grid-5";
+
+// Right and Left "auto" for grid
+%right-auto { #{$wm-opposite-direction}: auto; }
+%left-auto { #{$wm-default-float}: auto; }
+
+@if $wm-include-html-grid-classes != false {
+	/* Grid HTML Classes */
+	.row {
+		@include grid-row($responsive:false);
+
+		&.collapse {
+			.column,
+			.columns { @include grid-column($collapse:true,$responsive:false); }
+		}
+
+		.row { @include grid-row($behavior:nest,$responsive:false);
+			&.collapse { @include grid-row($behavior:nest-collapse,$responsive:false); }
+		}
+	}
+
+	.column,
+	.columns { @include grid-column($columns:$wm-total-columns, $include-position-relative: true, $responsive:true); }
+
+
+	@for $i from 1 through $wm-total-columns {
+		.medium#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false,$responsive:false); }
+	}
+
+	@for $i from 0 through $wm-total-columns - 1 {
+		.medium-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false,$responsive:false); }
+	}
+
+	@for $i from 1 through $wm-total-columns - 1 {
+		.medium-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false,$responsive:false,$responsive:false); }
+		.medium-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false,$responsive:false); }
+	}
+
+	.column.medium-centered,
+	.columns.medium-centered { @include grid-column($center:true, $collapse:null, $float:false,$responsive:false); }
+
+	.column.medium-uncentered,
+	.columns.medium-uncentered {
+		margin-#{$wm-default-float}: 0;
+		margin-#{$wm-opposite-direction}: 0;
+		float: $wm-default-float !important;
+	}
+
+}
diff --git a/src/sass/codewhite/components/_grid.scss b/src/sass/codewhite/components/_grid.scss
new file mode 100644
index 0000000..d67deaf
--- /dev/null
+++ b/src/sass/codewhite/components/_grid.scss
@@ -0,0 +1,102 @@
+//
+// Whitemill Grid
+//
+// Copied by LKM from Foundation 4.3.1 2013-09-09 15:14
+//
+// @version
+//   0.1.0
+//
+// @title
+//   Grid
+//
+
+
+@import "../mixins/grid";
+
+// Right and Left "auto" for grid
+%right-auto { #{$wm-opposite-direction}: auto; }
+%left-auto { #{$wm-default-float}: auto; }
+
+@if $wm-include-html-grid-classes != false {
+	/* Grid HTML Classes */
+	.r {
+		@include grid-row;
+
+		&.-c {
+			.c { @include grid-column($collapse:true); }
+		}
+
+		.r { @include grid-row($behavior:nest);
+			&.-c { @include grid-row($behavior:nest-collapse); }
+		}
+	}
+
+	.c { @include grid-column($columns:$wm-total-columns, $include-position-relative: true); }
+
+	@media #{$wm-screen} {
+
+		@for $i from 1 through $wm-total-columns {
+			.-s#{$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
+		}
+
+		@for $i from 0 through $wm-total-columns - 2 {
+			.small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
+		}
+
+		[class*="column"] + [class*="column"]:last-child { float: $wm-opposite-direction; }
+		[class*="column"] + [class*="column"]._e { float: $wm-default-float; }
+
+		.c.-s_c { @include grid-column($center:true, $collapse:null, $float:false); }
+	}
+
+	@media #{$wm-medium-min} {
+
+		@for $i from 1 through $wm-total-columns {
+			.-m#{$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
+		}
+
+		@for $i from 0 through $wm-total-columns - 1 {
+			.medium-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
+		}
+
+		@for $i from 1 through $wm-total-columns - 1 {
+			.medium-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
+			.medium-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
+		}
+
+		.c.-m_c { @include grid-column($center:true, $collapse:null, $float:false); }
+
+		.c.-m_uc {
+			margin-#{$wm-default-float}: 0;
+			margin-#{$wm-opposite-direction}: 0;
+			float: $wm-default-float !important;
+		}
+
+	}
+
+	@media #{$wm-large-min} {
+
+		@for $i from 1 through $wm-total-columns {
+			.-l#{$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
+		}
+
+		@for $i from 0 through $wm-total-columns - 1 {
+			.large-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
+		}
+
+		@for $i from 1 through $wm-total-columns - 1 {
+			.large-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
+			.large-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
+		}
+
+		.c.-l_c { @include grid-column($center:true, $collapse:null, $float:false); }
+
+		.c.-l_uc {
+			margin-#{$wm-default-float}: 0;
+			margin-#{$wm-opposite-direction}: 0;
+			float: $wm-default-float !important;
+		}
+
+	}
+
+}
diff --git a/src/sass/codewhite/components/_ie6.scss b/src/sass/codewhite/components/_ie6.scss
new file mode 100644
index 0000000..bf26661
--- /dev/null
+++ b/src/sass/codewhite/components/_ie6.scss
@@ -0,0 +1,86 @@
+
+//
+// Whitemill Grid
+//
+// Copied by LKM from Foundation 4.3.1 2013-09-09 15:14
+//
+// @version
+//   0.1.0
+//
+// @title
+//   Grid
+//
+// @description
+//   With a default "small-#" grid, a 640-1024px "medium-#" grid, and a 1024+ "large-#" grid, we've got you covered for any layout you can think of.
+//
+/* ----------------- GENERAL --------------------- */
+@import "../mixins/grid-5";
+
+* {
+	@include box-sizing(content-box);
+}
+
+
+// Right and Left "auto" for grid
+%right-auto { #{$wm-opposite-direction}: auto; }
+%left-auto { #{$wm-default-float}: auto; }
+
+@if $wm-include-html-grid-classes != false {
+	/* Grid HTML Classes */
+	.row {
+		@include grid-row;
+
+		&.collapse {
+			.column,
+			.columns { @include grid-column($collapse:true); }
+		}
+
+		.row {
+			@include grid-row($behavior:nest);
+			&.collapse {
+				@include grid-row($behavior:nest-collapse);
+			}
+		}
+	}
+
+	.column,
+	.columns { @include grid-column($columns:$wm-total-columns, $include-position-relative: true); }
+
+	@for $i from 1 through $wm-total-columns {
+		.small#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
+	}
+
+	@for $i from 0 through $wm-total-columns - 2 {
+		.small-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
+	}
+
+	[class*="column"] + [class*="column"]:last-child { float: $wm-opposite-direction; }
+	[class*="column"] + [class*="column"].end { float: $wm-default-float; }
+
+	.column.small-centered,
+	.columns.small-centered { @include grid-column($center:true, $collapse:null, $float:false); }
+
+
+	@for $i from 1 through $wm-total-columns {
+		.medium#{-$i} { @include grid-column($columns:$i,$collapse:null,$float:false); }
+	}
+
+	@for $i from 0 through $wm-total-columns - 1 {
+		.medium-offset-#{$i} { @include grid-column($offset:$i, $collapse:null,$float:false); }
+	}
+
+	@for $i from 1 through $wm-total-columns - 1 {
+		.medium-push#{-$i} { @include grid-column($push:$i, $collapse:null, $float:false); }
+		.medium-pull#{-$i} { @include grid-column($pull:$i, $collapse:null, $float:false); }
+	}
+
+	.column.medium-centered,
+	.columns.medium-centered { @include grid-column($center:true, $collapse:null, $float:false); }
+
+	.column.medium-uncentered,
+	.columns.medium-uncentered {
+		margin-#{$wm-default-float}: 0;
+		margin-#{$wm-opposite-direction}: 0;
+		float: $wm-default-float !important;
+	}
+}
diff --git a/src/sass/codewhite/components/_type.scss b/src/sass/codewhite/components/_type.scss
new file mode 100644
index 0000000..945d30c
--- /dev/null
+++ b/src/sass/codewhite/components/_type.scss
@@ -0,0 +1,25 @@
+@import "../mixins/type";
+//
+// Typography Placeholders
+//
+
+// These will throw a deprecation warning if used within a media query.
+%lead {
+	font-size: $wm-paragraph-font-size + emCalc(3.5);
+	line-height: 1.6;
+}
+
+%subheader {
+	line-height: $wm-subheader-line-height;
+	color: $wm-subheader-font-color;
+	font-weight: $wm-subheader-font-weight;
+	margin-top: $wm-subheader-top-margin;
+	margin-bottom: $wm-subheader-bottom-margin;
+}
+
+@if $wm-include-html-type-classes != false {
+	@include type-base;
+	@if $wm-include-code-classes != false {
+		@include code-base;
+	}
+}
diff --git a/src/sass/codewhite/components/_visibility.scss b/src/sass/codewhite/components/_visibility.scss
new file mode 100644
index 0000000..89e78d1
--- /dev/null
+++ b/src/sass/codewhite/components/_visibility.scss
@@ -0,0 +1,322 @@
+//
+// Foundation Visibility Classes
+// Copied from foundation 4.3.1, to change media cuery
+
+
+@if $wm-include-html-visibility-classes != false {
+
+  /* Foundation Visibility HTML Classes */
+  .show-for-small,
+  .show-for-medium-down,
+  .show-for-large-down { display: inherit !important; }
+  
+  .show-for-medium,
+  .show-for-medium-up,
+  .show-for-large,
+  .show-for-large-up,
+  .show-for-xlarge { display: none !important; }
+  
+  .hide-for-medium,
+  .hide-for-medium-up,
+  .hide-for-large,
+  .hide-for-large-up,
+  .hide-for-xlarge { display: inherit !important; }
+  
+  .hide-for-small,
+  .hide-for-medium-down,
+  .hide-for-large-down { display: none !important; }
+  
+  /* Specific visilbity for tables */
+  table {
+    &.show-for-small,
+    &.show-for-medium-down,
+    &.show-for-large-down,
+    &.hide-for-medium,
+    &.hide-for-medium-up,
+    &.hide-for-large,
+    &.hide-for-large-up,
+    &.hide-for-xlarge { display: table; }
+  }
+  thead {
+    &.show-for-small,
+    &.show-for-medium-down,
+    &.show-for-large-down,
+    &.hide-for-medium,
+    &.hide-for-medium-up,
+    &.hide-for-large,
+    &.hide-for-large-up,
+    &.hide-for-xlarge { display: table-header-group !important; }
+  }
+  tbody {
+    &.show-for-small,
+    &.show-for-medium-down,
+    &.show-for-large-down,
+    &.hide-for-medium,
+    &.hide-for-medium-up,
+    &.hide-for-large,
+    &.hide-for-large-up,
+    &.hide-for-xlarge { display: table-row-group !important; }
+  }
+  tr {
+    &.show-for-small,
+    &.show-for-medium-down,
+    &.show-for-large-down,
+    &.hide-for-medium,
+    &.hide-for-medium-up,
+    &.hide-for-large,
+    &.hide-for-large-up,
+    &.hide-for-xlarge { display: table-row !important; }
+  }
+  td,
+  th {
+    &.show-for-small,
+    &.show-for-medium-down,
+    &.show-for-large-down,
+    &.hide-for-medium,
+    &.hide-for-medium-up,
+    &.hide-for-large,
+    &.hide-for-large-up,
+    &.hide-for-xlarge { display: table-cell !important; }
+  }
+  
+  /* Medium Displays: 640px - 1023px */
+  @media #{$wm-medium-min} {
+    .show-for-medium,
+    .show-for-medium-up { display: inherit !important; }
+  
+    .show-for-small { display: none !important; }
+  
+    .hide-for-small { display: inherit !important; }
+  
+    .hide-for-medium,
+    .hide-for-medium-up { display: none !important; }
+  
+    /* Specific visilbity for tables */
+    table {
+      &.show-for-medium,
+      &.show-for-medium-up,
+      &.hide-for-small { display: table; }
+    }
+    thead {
+      &.show-for-medium,
+      &.show-for-medium-up,
+      &.hide-for-small { display: table-header-group !important; }
+    }
+    tbody {
+      &.show-for-medium,
+      &.show-for-medium-up,
+      &.hide-for-small { display: table-row-group !important; }
+    }
+    tr {
+      &.show-for-medium,
+      &.show-for-medium-up,
+      &.hide-for-small { display: table-row !important; }
+    }
+    td,
+    th {
+      &.show-for-medium,
+      &.show-for-medium-up,
+      &.hide-for-small { display: table-cell !important; }
+    }
+  }
+  
+  /* Large Displays: 1024px - 1440px */
+  @media #{$wm-large-min} {
+    .show-for-large,
+    .show-for-large-up { display: inherit !important; }
+  
+    .show-for-medium,
+    .show-for-medium-down { display: none !important; }
+  
+    .hide-for-medium,
+    .hide-for-medium-down { display: inherit !important; }
+  
+    .hide-for-large,
+    .hide-for-large-up { display: none !important; }
+  
+    /* Specific visilbity for tables */
+    table {
+      &.show-for-large,
+      &.show-for-large-up,
+      &.hide-for-medium,
+      &.hide-for-medium-down { display: table; }
+    }
+    thead {
+      &.show-for-large,
+      &.show-for-large-up,
+      &.hide-for-medium,
+      &.hide-for-medium-down { display: table-header-group !important; }
+    }
+    tbody {
+      &.show-for-large,
+      &.show-for-large-up,
+      &.hide-for-medium,
+      &.hide-for-medium-down { display: table-row-group !important; }
+    }
+    tr {
+      &.show-for-large,
+      &.show-for-large-up,
+      &.hide-for-medium,
+      &.hide-for-medium-down { display: table-row !important; }
+    }
+    td,
+    th {
+      &.show-for-large,
+      &.show-for-large-up,
+      &.hide-for-medium,
+      &.hide-for-medium-down { display: table-cell !important; }
+    }
+  }
+  
+  /* X-Large Displays: 1400px and up */
+  @media #{$wm-xlarge-min} {
+    .show-for-xlarge { display: inherit !important; }
+  
+    .show-for-large,
+    .show-for-large-down { display: none !important; }
+  
+    .hide-for-large,
+    .hide-for-large-down { display: inherit !important; }
+  
+    .hide-for-xlarge { display: none !important; }
+  
+    /* Specific visilbity for tables */
+    table {
+      &.show-for-xlarge,
+      &.hide-for-large,
+      &.hide-for-large-down { display: table; }
+    }
+    thead {
+      &.show-for-xlarge,
+      &.hide-for-large,
+      &.hide-for-large-down { display: table-header-group !important; }
+    }
+    tbody {
+      &.show-for-xlarge,
+      &.hide-for-large,
+      &.hide-for-large-down { display: table-row-group !important; }
+    }
+    tr {
+      &.show-for-xlarge,
+      &.hide-for-large,
+      &.hide-for-large-down { display: table-row !important; }
+    }
+    td,
+    th {
+      &.show-for-xlarge,
+      &.hide-for-large,
+      &.hide-for-large-down { display: table-cell !important; }
+    }
+  }
+  
+  
+  /* Orientation targeting */
+  .show-for-landscape,
+  .hide-for-portrait { display: inherit !important; }
+  .hide-for-landscape,
+  .show-for-portrait { display: none !important; }
+  
+  /* Specific visilbity for tables */
+  table {
+    &.hide-for-landscape,
+    &.show-for-portrait { display: table; }
+  }
+  thead {
+    &.hide-for-landscape,
+    &.show-for-portrait { display: table-header-group !important; }
+  }
+  tbody {
+    &.hide-for-landscape,
+    &.show-for-portrait { display: table-row-group !important; }
+  }
+  tr {
+    &.hide-for-landscape,
+    &.show-for-portrait { display: table-row !important; }
+  }
+  td,
+  th {
+    &.hide-for-landscape,
+    &.show-for-portrait { display: table-cell !important; }
+  }
+  
+  @media #{$wm-landscape} {
+    .show-for-landscape,
+    .hide-for-portrait { display: inherit !important; }
+    .hide-for-landscape,
+    .show-for-portrait { display: none !important; }
+  
+    /* Specific visilbity for tables */
+    table {
+      &.show-for-landscape,
+      &.hide-for-portrait { display: table; }
+    }
+    thead {
+      &.show-for-landscape,
+      &.hide-for-portrait { display: table-header-group !important; }
+    }
+    tbody {
+      &.show-for-landscape,
+      &.hide-for-portrait { display: table-row-group !important; }
+    }
+    tr {
+      &.show-for-landscape,
+      &.hide-for-portrait { display: table-row !important; }
+    }
+    td,
+    th {
+      &.show-for-landscape,
+      &.hide-for-portrait { display: table-cell !important; }
+    }
+  }
+  
+  @media #{$wm-portrait} {
+    .show-for-portrait,
+    .hide-for-landscape { display: inherit !important; }
+    .hide-for-portrait,
+    .show-for-landscape { display: none !important; }
+  
+    /* Specific visilbity for tables */
+    table {
+      &.show-for-portrait,
+      &.hide-for-landscape { display: table; }
+    }
+    thead {
+      &.show-for-portrait,
+      &.hide-for-landscape { display: table-header-group !important; }
+    }
+    tbody {
+      &.show-for-portrait,
+      &.hide-for-landscape { display: table-row-group !important; }
+    }
+    tr {
+      &.show-for-portrait,
+      &.hide-for-landscape { display: table-row !important; }
+    }
+    td,
+    th {
+      &.show-for-portrait,
+      &.hide-for-landscape { display: table-cell !important; }
+    }
+  }
+  
+  /* Touch-enabled device targeting */
+  .show-for-touch { display: none !important; }
+  .hide-for-touch { display: inherit !important; }
+  .touch .show-for-touch { display: inherit !important; }
+  .touch .hide-for-touch { display: none !important; }
+  
+  /* Specific visilbity for tables */
+  table.hide-for-touch { display: table; }
+  .touch table.show-for-touch { display: table; }
+  thead.hide-for-touch { display: table-header-group !important; }
+  .touch thead.show-for-touch { display: table-header-group !important; }
+  tbody.hide-for-touch { display: table-row-group !important; }
+  .touch tbody.show-for-touch { display: table-row-group !important; }
+  tr.hide-for-touch { display: table-row !important; }
+  .touch tr.show-for-touch { display: table-row !important; }
+  td.hide-for-touch { display: table-cell !important; }
+  .touch td.show-for-touch { display: table-cell !important; }
+  th.hide-for-touch { display: table-cell !important; }
+  .touch th.show-for-touch { display: table-cell !important; }
+
+}
diff --git a/src/sass/codewhite/components/navigation/_mdmotor.scss b/src/sass/codewhite/components/navigation/_mdmotor.scss
new file mode 100644
index 0000000..946f76f
--- /dev/null
+++ b/src/sass/codewhite/components/navigation/_mdmotor.scss
@@ -0,0 +1,17 @@
+@media #{$wm-medium-min} {
+	nav {
+		float: right;
+		@include bar-mdmotor-base();
+		@include bar-mdmotor-size($small-font-size:12px);
+		@include bar-mdmotor-style();
+	}
+	nav.main {
+	}
+		//@include navigation-mdmotor($border-top:3px,$link-tag:span,$height:40px,$font-size:12px);
+	nav.sub {
+		@include bar-mdmotor-size($border-top:3px,$height:40px,$font-size:12px,$small-font-size:0px);
+	}
+	nav.green {
+		@include bar-mdmotor-style($color:green);
+	}
+}
diff --git a/src/sass/codewhite/mixins/_buttons.scss b/src/sass/codewhite/mixins/_buttons.scss
new file mode 100644
index 0000000..acaae8a
--- /dev/null
+++ b/src/sass/codewhite/mixins/_buttons.scss
@@ -0,0 +1,159 @@
+//
+// Button Variables
+//
+
+$wm-include-html-button-classes: $wm-include-html-classes !default;
+
+// We use these to build padding for buttons.
+$wm-button-med: emCalc(12) !default;
+$wm-button-tny: emCalc(7) !default;
+$wm-button-sml: emCalc(9) !default;
+$wm-button-lrg: emCalc(16) !default;
+
+// We use this to control the display property.
+$wm-button-display: inline-block !default;
+$wm-button-margin-bottom: emCalc(20) !default;
+
+// We use these to control button text styles.
+$wm-button-font-family: inherit !default;
+$wm-button-font-color: #fff !default;
+$wm-button-font-color-alt: #333 !default;
+$wm-button-font-med: emCalc(16) !default;
+$wm-button-font-tny: emCalc(11) !default;
+$wm-button-font-sml: emCalc(13) !default;
+$wm-button-font-lrg: emCalc(20) !default;
+$wm-button-font-weight: bold !default;
+$wm-button-font-align: center !default;
+
+// We use these to control various hover effects.
+$wm-button-function-factor: 10% !default;
+
+// We use these to control button border styles.
+$wm-button-border-width: 1px !default;
+$wm-button-border-style: solid !default;
+
+// We use this to set the default radius used throughout the core.
+$wm-button-radius: $wm-global-radius !default;
+$wm-button-round: $wm-global-rounded !default;
+
+// We use this to set default opacity for disabled buttons.
+$wm-button-disabled-opacity: 0.6 !default;
+
+//
+// Button Mixins
+//
+
+// We use this mixin to create a default button base.
+@mixin button-base($style:true, $display:$wm-button-display) {
+  @if $style {
+    border-style: $wm-button-border-style;
+    border-width: $wm-button-border-width;
+    cursor: $wm-cursor-pointer-value;
+    font-family: $wm-button-font-family;
+    font-weight: $wm-button-font-weight;
+    line-height: 1;
+    margin: 0 0 $wm-button-margin-bottom;
+    position: relative;
+    text-decoration: none;
+    text-align: $wm-button-font-align;
+  }
+  @if $display { display: $display; }
+}
+
+// We use this mixin to add button size styles
+@mixin button-size($padding:$wm-button-med, $full-width:false, $is-input:false) {
+
+  // We control which padding styles come through,
+  // these can be turned off by setting $padding:false
+  @if $padding {
+    padding-top: $padding;
+    padding-#{$wm-opposite-direction}: $padding * 2;
+    padding-bottom: $padding + emCalc(1);
+    padding-#{$wm-default-float}: $padding * 2;
+
+    // We control the font-size based on mixin input.
+    @if      $padding == $wm-button-med { font-size: $wm-button-font-med; }
+    @else if $padding == $wm-button-tny { font-size: $wm-button-font-tny; }
+    @else if $padding == $wm-button-sml { font-size: $wm-button-font-sml; }
+    @else if $padding == $wm-button-lrg { font-size: $wm-button-font-lrg; }
+    @else                            { font-size: $padding - emCalc(2); }
+  }
+
+  // We can set $full-width:true to remove side padding extend width.
+  @if $full-width {
+    // We still need to check if $padding is set.
+    @if $padding {
+    padding-top: $padding;
+    padding-bottom: $padding + emCalc(1);
+    } @else if $padding == false {
+      padding-top:0;
+      padding-bottom:0;
+    }
+    padding-right: 0px;
+    padding-left: 0px;
+    width: 100%;
+  }
+
+  // 's and ";
+	}
+}
+
+// ------------------------------------------------------------------------
+
+/**
+ * Form Label Tag
+ *
+ * @access	public
+ * @param	string	The text to appear onscreen
+ * @param	string	The id the label applies to
+ * @param	string	Additional attributes
+ * @return	string
+ */
+if ( ! function_exists('form_label'))
+{
+	function form_label($label_text = '', $id = '', $attributes = array())
+	{
+
+		$label = ' 0)
+		{
+			foreach ($attributes as $key => $val)
+			{
+				$label .= ' '.$key.'="'.$val.'"';
+			}
+		}
+
+		$label .= ">$label_text";
+
+		return $label;
+	}
+}
+
+// ------------------------------------------------------------------------
+/**
+ * Fieldset Tag
+ *
+ * Used to produce 
text. To close fieldset + * use form_fieldset_close() + * + * @access public + * @param string The legend text + * @param string Additional attributes + * @return string + */ +if ( ! function_exists('form_fieldset')) +{ + function form_fieldset($legend_text = '', $attributes = array()) + { + $fieldset = "".$extra; + } +} + +// ------------------------------------------------------------------------ + +/** + * Form Close Tag + * + * @access public + * @param string + * @return string + */ +if ( ! function_exists('form_close')) +{ + function form_close($extra = '') + { + return "".$extra; + } +} + +// ------------------------------------------------------------------------ + +/** + * Form Prep + * + * Formats text so that it can be safely placed in a form field in the event it has HTML tags. + * + * @access public + * @param string + * @return string + */ +if ( ! function_exists('form_prep')) +{ + function form_prep($str = '', $field_name = '') + { + static $prepped_fields = array(); + + // if the field name is an array we do this recursively + if (is_array($str)) + { + foreach ($str as $key => $val) + { + $str[$key] = form_prep($val); + } + + return $str; + } + + if ($str === '') + { + return ''; + } + + // we've already prepped a field with this name + // @todo need to figure out a way to namespace this so + // that we know the *exact* field and not just one with + // the same name + if (isset($prepped_fields[$field_name])) + { + return $str; + } + + $str = htmlspecialchars($str); + + // In case htmlspecialchars misses these. + $str = str_replace(array("'", '"'), array("'", """), $str); + + if ($field_name != '') + { + $prepped_fields[$field_name] = $field_name; + } + + return $str; + } +} + +// ------------------------------------------------------------------------ + +/** + * Form Value + * + * Grabs a value from the POST array for the specified field so you can + * re-populate an input field or textarea. If Form Validation + * is active it retrieves the info from the validation class + * + * @access public + * @param string + * @return mixed + */ +if ( ! function_exists('set_value')) +{ + function set_value($field = '', $default = '') + { + if (FALSE === ($OBJ =& _get_validation_object())) + { + if ( ! isset($_POST[$field])) + { + return $default; + } + + return form_prep($_POST[$field], $field); + } + + return form_prep($OBJ->set_value($field, $default), $field); + } +} + +// ------------------------------------------------------------------------ + +/** + * Set Select + * + * Let's you set the selected value of a