├── .editorconfig ├── .gitignore ├── .jshintrc ├── LICENSE ├── README.md ├── css ├── style.css ├── style.min.css └── tomorrow-night.css ├── gulpfile.js ├── index.html ├── js ├── highlight.custom.js ├── script.js └── script.min.js ├── package.json ├── simplebinder.gif ├── simplebinder.js ├── simplebinder.min.js └── src ├── scripts ├── __modernizr.custom.js └── main.js └── styles ├── imports ├── __normalize.scss ├── _grid.scss └── _mixins.scss └── z_site.scss /.editorconfig: -------------------------------------------------------------------------------- 1 | ; top-most EditorConfig file 2 | root = true 3 | 4 | ; Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | lib-cov 3 | *.seed 4 | *.log 5 | *.csv 6 | *.dat 7 | *.out 8 | *.pid 9 | *.gz 10 | 11 | pids 12 | logs 13 | results 14 | 15 | npm-debug.log 16 | node_modules 17 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | // Settings 3 | "passfail": false, // Stop on first error. 4 | "maxerr": 100, // Maximum error before stopping. 5 | // Predefined globals whom JSHint will ignore. 6 | "browser": true, // Standard browser globals e.g. `window`, `document`. 7 | "node": false, 8 | "rhino": false, 9 | "couch": false, 10 | "wsh": true, // Windows Scripting Host. 11 | "jquery": true, 12 | "ender": true, 13 | "prototypejs": false, 14 | "mootools": false, 15 | "dojo": false, 16 | "predef": [ // Custom globals. 17 | "Modernizr" 18 | //"anotherCoolGlobal", 19 | //"iLoveDouglas" 20 | ], 21 | // Development. 22 | "debug": false, // Allow debugger statements e.g. browser breakpoints. 23 | "devel": true, // Allow developments statements e.g. `console.log();`. 24 | // ECMAScript 5. 25 | "es5": true, // Allow ECMAScript 5 syntax. 26 | "strict": false, // Require `use strict` pragma in every file. 27 | "globalstrict": false, // Allow global "use strict" (also enables 'strict'). 28 | // The Good Parts. 29 | "asi": true, // Tolerate Automatic Semicolon Insertion (no semicolons). 30 | "laxbreak": true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. 31 | "bitwise": true, // Prohibit bitwise operators (&, |, ^, etc.). 32 | "boss": false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. 33 | "curly": true, // Require {} for every new block or scope. 34 | "eqeqeq": false, // Require triple equals i.e. `===`. 35 | "eqnull": false, // Tolerate use of `== null`. 36 | "evil": false, // Tolerate use of `eval`. 37 | "expr": false, // Tolerate `ExpressionStatement` as Programs. 38 | "forin": false, // Tolerate `for in` loops without `hasOwnPrototype`. 39 | "immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` 40 | "latedef": true, // Prohipit variable use before definition. 41 | "loopfunc": false, // Allow functions to be defined within loops. 42 | "noarg": false, // Prohibit use of `arguments.caller` and `arguments.callee`. 43 | "regexp": true, // Prohibit `.` and `[^...]` in regular expressions. 44 | "regexdash": false, // Tolerate unescaped last dash i.e. `[-...]`. 45 | "scripturl": true, // Tolerate script-targeted URLs. 46 | "shadow": false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. 47 | "supernew": false, // Tolerate `new function () { ... };` and `new Object;`. 48 | "undef": true, // Require all non-global variables be declared before they are used. 49 | 50 | // Personal styling preferences. 51 | "newcap": true, // Require capitalization of all constructor functions e.g. `new F()`. 52 | "noempty": true, // Prohibit use of empty blocks. 53 | "nonew": true, // Prohibit use of constructors for side-effects. 54 | "nomen": true, // Prohibit use of initial or trailing underbars in names. 55 | "onevar": false, // Allow only one `var` statement per function. 56 | "plusplus": false, // Prohibit use of `++` & `--`. 57 | "sub": false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. 58 | "trailing": true, // Prohibit trailing whitespaces. 59 | "white": false, // Check against strict whitespace and indentation rules. 60 | "indent": 2 // Specify indentation spacing 61 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 James Doyle 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | simplebinder 2 | ============ 3 | 4 | simplebinder is a zero dependency one-way databinder for javascript. 5 | 6 | ![simplebinder git](https://raw.githubusercontent.com/james2doyle/simplebinder/master/simplebinder.gif) 7 | 8 | ### Demos, Examples, and Info 9 | 10 | Please check out [the project homepage](http://james2doyle.github.io/simplebinder/) to see all the examples. 11 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | article, aside, details, figcaption, figure, footer, header, hgroup, nav, section, summary { 2 | display: block; } 3 | 4 | audio, canvas, video { 5 | display: inline-block; 6 | *display: inline; 7 | *zoom: 1; } 8 | 9 | audio:not([controls]) { 10 | display: none; 11 | height: 0; } 12 | 13 | [hidden] { 14 | display: none; } 15 | 16 | html { 17 | font-size: 100%; 18 | background: #fff; 19 | color: #000; 20 | -webkit-text-size-adjust: 100%; 21 | -ms-text-size-adjust: 100%; } 22 | 23 | html, button, input, select, textarea { 24 | font-family: sans-serif; } 25 | 26 | body { 27 | margin: 0; } 28 | 29 | a:focus { 30 | outline: thin dotted; } 31 | a:hover, a:active { 32 | outline: 0; } 33 | 34 | h1 { 35 | font-size: 2em; 36 | margin: 0.67em 0; } 37 | 38 | h2 { 39 | font-size: 1.5em; 40 | margin: 0.83em 0; } 41 | 42 | h3 { 43 | font-size: 1.17em; 44 | margin: 1em 0; } 45 | 46 | h4 { 47 | font-size: 1em; 48 | margin: 1.33em 0; } 49 | 50 | h5 { 51 | font-size: 0.83em; 52 | margin: 1.67em 0; } 53 | 54 | h6 { 55 | font-size: 0.75em; 56 | margin: 2.33em 0; } 57 | 58 | abbr[title] { 59 | border-bottom: 1px dotted; } 60 | 61 | b, strong { 62 | font-weight: bold; } 63 | 64 | blockquote { 65 | margin: 1em 40px; } 66 | 67 | dfn { 68 | font-style: italic; } 69 | 70 | mark { 71 | background: #ff0; 72 | color: #000; } 73 | 74 | p, pre { 75 | margin: 1em 0; } 76 | 77 | code, kbd, pre, samp { 78 | font-family: monospace, serif; 79 | _font-family: 'courier new', monospace; 80 | font-size: 1em; } 81 | 82 | pre { 83 | white-space: pre; 84 | white-space: pre-wrap; 85 | word-wrap: break-word; } 86 | 87 | q { 88 | quotes: "\201C" "\201D" "\2018" "\2019"; } 89 | 90 | q { 91 | quotes: none; } 92 | 93 | q:before, q:after { 94 | content: ''; 95 | content: none; } 96 | 97 | small { 98 | font-size: 80%; } 99 | 100 | sub, sup { 101 | font-size: 75%; 102 | line-height: 0; 103 | position: relative; 104 | vertical-align: baseline; } 105 | 106 | sup { 107 | top: -0.5em; } 108 | 109 | sub { 110 | bottom: -0.25em; } 111 | 112 | dl, menu, ol, ul { 113 | margin: 1em 0; } 114 | 115 | dd { 116 | margin: 0 0 0 40px; } 117 | 118 | menu, ol, ul { 119 | padding: 0 0 0 40px; } 120 | 121 | nav ul, nav ol { 122 | list-style-image: none; } 123 | 124 | img { 125 | border: 0; 126 | -ms-interpolation-mode: bicubic; } 127 | 128 | svg:not(:root) { 129 | overflow: hidden; } 130 | 131 | figure { 132 | margin: 0; } 133 | 134 | form { 135 | margin: 0; } 136 | 137 | fieldset { 138 | border: 1px solid #c0c0c0; 139 | margin: 0 2px; 140 | padding: 0.35em 0.625em 0.75em; } 141 | 142 | legend { 143 | border: 0; 144 | padding: 0; 145 | white-space: normal; 146 | *margin-left: -7px; } 147 | 148 | button, input, select, textarea { 149 | font-family: inherit; 150 | font-size: 100%; 151 | margin: 0; 152 | vertical-align: baseline; 153 | *vertical-align: middle; } 154 | 155 | button, input { 156 | line-height: normal; } 157 | 158 | button, select { 159 | text-transform: none; } 160 | 161 | button, html input[type="button"], input[type="reset"], input[type="submit"] { 162 | -webkit-appearance: button; 163 | cursor: pointer; 164 | *overflow: visible; } 165 | 166 | button[disabled], input[disabled] { 167 | cursor: default; } 168 | 169 | input[type="checkbox"], input[type="radio"] { 170 | box-sizing: border-box; 171 | padding: 0; 172 | *height: 13px; 173 | *width: 13px; } 174 | 175 | input[type="search"] { 176 | -webkit-appearance: textfield; 177 | -moz-box-sizing: content-box; 178 | -webkit-box-sizing: content-box; 179 | box-sizing: content-box; } 180 | 181 | input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { 182 | -webkit-appearance: none; } 183 | 184 | button::-moz-focus-inner, input::-moz-focus-inner { 185 | border: 0; 186 | padding: 0; } 187 | 188 | textarea { 189 | overflow: auto; 190 | vertical-align: top; } 191 | 192 | table { 193 | border-collapse: collapse; 194 | border-spacing: 0; } 195 | 196 | [class*='col-'] { 197 | float: left; 198 | padding: 0 10px; } 199 | 200 | .grid { 201 | width: 100%; 202 | max-width: 1400px; 203 | min-width: 755px; 204 | margin: 0 auto; 205 | overflow: hidden; } 206 | .grid:after { 207 | content: ""; 208 | display: table; 209 | clear: both; } 210 | 211 | .grid-pad { 212 | padding: 20px 0 0px 20px; } 213 | 214 | .grid-pad > [class*='col-']:last-of-type { 215 | padding-right: 20px; } 216 | 217 | .push-right { 218 | float: right; } 219 | 220 | /* Content Columns */ 221 | .col-1-1 { 222 | width: 100%; } 223 | 224 | .col-2-3, .col-8-12 { 225 | width: 66.66%; } 226 | 227 | .col-1-2, .col-6-12 { 228 | width: 50%; } 229 | 230 | .col-1-3, .col-4-12 { 231 | width: 33.33%; } 232 | 233 | .col-1-4, .col-3-12 { 234 | width: 25%; } 235 | 236 | .col-1-5 { 237 | width: 20%; } 238 | 239 | .col-1-6, .col-2-12 { 240 | width: 16.667%; } 241 | 242 | .col-1-7 { 243 | width: 14.28%; } 244 | 245 | .col-1-8 { 246 | width: 12.5%; } 247 | 248 | .col-1-9 { 249 | width: 11.1%; } 250 | 251 | .col-1-10 { 252 | width: 10%; } 253 | 254 | .col-1-11 { 255 | width: 9.09%; } 256 | 257 | .col-1-12 { 258 | width: 8.33%; } 259 | 260 | /* Layout Columns */ 261 | .col-11-12 { 262 | width: 91.66%; } 263 | 264 | .col-10-12 { 265 | width: 83.333%; } 266 | 267 | .col-9-12 { 268 | width: 75%; } 269 | 270 | .col-5-12 { 271 | width: 41.66%; } 272 | 273 | .col-7-12 { 274 | width: 58.33%; } 275 | 276 | @media handheld, only screen and (max-width: 767px) { 277 | .grid { 278 | width: 100%; 279 | min-width: 0; 280 | margin-left: 0px; 281 | margin-right: 0px; 282 | padding-left: 0px; 283 | padding-right: 0px; } 284 | [class*='col-'] { 285 | width: auto; 286 | float: none; 287 | margin: 1em 0; 288 | padding-left: 1em; 289 | padding-right: 1em; } 290 | [class*='col-']:last-of-type { 291 | padding-right: 1em; } 292 | [class*='col-'].m-50 { 293 | width: 50%; 294 | float: left; 295 | padding: 0; } } 296 | 297 | html { 298 | min-height: 100%; } 299 | 300 | body { 301 | font: normal normal normal 16px/1.5em 'Averia Sans Libre', sans-serif; 302 | -webkit-font-smoothing: antialiased; 303 | text-rendering: optimizeLegibility; 304 | -moz-osx-font-smoothing: grayscale; 305 | -webkit-tap-highlight-color: transparent; 306 | -webkit-text-size-adjust: 100%; 307 | -ms-text-size-adjust: 100%; 308 | color: #323232; } 309 | 310 | .clearfix { 311 | *zoom: 1; } 312 | .clearfix:before, .clearfix:after { 313 | content: ""; 314 | display: table; } 315 | .clearfix:after { 316 | clear: both; } 317 | 318 | *, *:after, *:before { 319 | -webkit-box-sizing: border-box; 320 | -moz-box-sizing: border-box; 321 | box-sizing: border-box; } 322 | 323 | h1, h2, h3, h4, h5, h6, strong { 324 | font-weight: 700; } 325 | 326 | h1 { 327 | margin: .67em 0; 328 | font-size: 2em; } 329 | 330 | h2 { 331 | margin: .83em 0; 332 | font-size: 1.5em; } 333 | 334 | h3 { 335 | margin: 1em 0; 336 | font-size: 1.17em; } 337 | 338 | h4 { 339 | margin: 1.33em 0; 340 | font-size: 1em; } 341 | 342 | h5 { 343 | margin: 1.67em 0; 344 | font-size: .83em; } 345 | 346 | h6 { 347 | margin: 2.33em 0; 348 | font-size: .75em; } 349 | 350 | hr { 351 | height: 1px; 352 | border: none; 353 | display: inline-block; 354 | vertical-align: top; 355 | margin: 1em 0; 356 | background-color: rgba(0, 0, 0, 0.2); 357 | width: 100%; } 358 | 359 | .container { 360 | margin: 5% auto 0; 361 | max-width: 1140px; 362 | width: 100%; } 363 | 364 | .center { 365 | padding: 0 2em; 366 | text-align: center; } 367 | .center img { 368 | max-width: 100%; 369 | height: auto; } 370 | 371 | .main-title { 372 | font-size: 3em; 373 | color: #6894d1; } 374 | 375 | .demo-dump { 376 | padding: 1em; } 377 | 378 | a { 379 | color: #c93742; } 380 | 381 | input, textarea, p { 382 | font: normal normal normal 1em 'Arial'; } 383 | 384 | input, textarea { 385 | outline: none; 386 | border: 1px solid #ccc; 387 | padding: 0.2em; 388 | background: white; } 389 | -------------------------------------------------------------------------------- /css/style.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * simplebinder - simplebinder is a zero dependency one-way databinder for javascript. 3 | * @version v1.2.0 4 | * @link https://james2doyle.github.io/simplebinder 5 | * @license 6 | * @copyright (c) 9/3/2015 James Doyle (http://ohdoylerules.com/) 7 | */ 8 | html,mark{color:#000}.col-1-1,.grid{width:100%}body,html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}.clearfix:after,.grid:after{clear:both}b,h1,h2,h3,h4,h5,h6,strong{font-weight:700}hr,textarea{vertical-align:top}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;background:#fff;min-height:100%}button,html,input,select,textarea{font-family:sans-serif}body,figure,form{margin:0}a:focus{outline:dotted thin}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}blockquote{margin:1em 40px}dfn{font-style:italic}mark{background:#ff0}dl,menu,ol,p,pre,ul{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:after,q:before{content:'';content:none}.clearfix:after,.clearfix:before,.grid:after{content:"";display:table}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ol,nav ul{list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;vertical-align:baseline}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],input[disabled]{cursor:default}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto}table{border-collapse:collapse;border-spacing:0}[class*=col-]{float:left;padding:0 10px}.grid{max-width:1400px;min-width:755px;margin:0 auto;overflow:hidden}.grid-pad{padding:20px 0 0 20px}.grid-pad>[class*=col-]:last-of-type{padding-right:20px}.push-right{float:right}.col-2-3,.col-8-12{width:66.66%}.col-1-2,.col-6-12{width:50%}.col-1-3,.col-4-12{width:33.33%}.col-1-4,.col-3-12{width:25%}.col-1-5{width:20%}.col-1-6,.col-2-12{width:16.667%}.col-1-7{width:14.28%}.col-1-8{width:12.5%}.col-1-9{width:11.1%}.col-1-10{width:10%}.col-1-11{width:9.09%}.col-1-12{width:8.33%}.col-11-12{width:91.66%}.col-10-12{width:83.333%}.col-9-12{width:75%}.col-5-12{width:41.66%}.col-7-12{width:58.33%}@media handheld,only screen and (max-width:767px){.grid{width:100%;min-width:0;margin-left:0;margin-right:0;padding-left:0;padding-right:0}[class*=col-]{width:auto;float:none;margin:1em 0;padding-left:1em;padding-right:1em}[class*=col-]:last-of-type{padding-right:1em}[class*=col-].m-50{width:50%;float:left;padding:0}}h3,hr{margin:1em 0}body{font:normal normal normal 1pc/1.5em 'Averia Sans Libre',sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;color:#323232}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}h1{margin:.67em 0;font-size:2em}h2{margin:.83em 0;font-size:1.5em}h3{font-size:1.17em}h4{margin:1.33em 0;font-size:1em}h5{margin:1.67em 0;font-size:.83em}h6{margin:2.33em 0;font-size:.75em}hr{height:1px;border:none;display:inline-block;background-color:rgba(0,0,0,.2);width:100%}.container{margin:5% auto 0;max-width:855pt;width:100%}.center{padding:0 2em;text-align:center}.center img{max-width:100%;height:auto}.main-title{font-size:3em;color:#6894d1}.demo-dump{padding:1em}a{color:#c93742}input,p,textarea{font:normal normal normal 1em Arial}input,textarea{outline:0;border:1px solid #ccc;padding:.2em;background:#fff} 9 | .tomorrow-comment,pre .comment,pre .title{color:#969896}.tomorrow-red,pre .attribute,pre .css .class,pre .css .id,pre .css .pseudo,pre .html .doctype,pre .regexp,pre .ruby .constant,pre .tag,pre .variable,pre .xml .doctype,pre .xml .pi,pre .xml .tag .title{color:#c66}.tomorrow-orange,pre .built_in,pre .constant,pre .literal,pre .number,pre .params,pre .preprocessor{color:#de935f}.tomorrow-yellow,pre .css .rules .attribute,pre .ruby .class .title{color:#f0c674}.tomorrow-green,pre .header,pre .inheritance,pre .ruby .symbol,pre .string,pre .value,pre .xml .cdata{color:#b5bd68}.tomorrow-aqua,pre .css .hexcolor{color:#8abeb7}.tomorrow-blue,pre .coffeescript .title,pre .function,pre .javascript .title,pre .perl .sub,pre .python .decorator,pre .python .title,pre .ruby .function .title,pre .ruby .title .keyword{color:#81a2be}.tomorrow-purple,pre .javascript .function,pre .keyword{color:#b294bb}pre code{display:block;background:#1d1f21;color:#c5c8c6;padding:.25em .5em}pre .coffeescript .javascript,pre .javascript .xml,pre .tex .formula,pre .xml .cdata,pre .xml .css,pre .xml .javascript,pre .xml .vbscript{opacity:.5} -------------------------------------------------------------------------------- /css/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | .tomorrow-comment,pre .comment,pre .title{color:#969896}.tomorrow-red,pre .variable,pre .attribute,pre .tag,pre .regexp,pre .ruby .constant,pre .xml .tag .title,pre .xml .pi,pre .xml .doctype,pre .html .doctype,pre .css .id,pre .css .class,pre .css .pseudo{color:#c66}.tomorrow-orange,pre .number,pre .preprocessor,pre .built_in,pre .literal,pre .params,pre .constant{color:#de935f}.tomorrow-yellow,pre .ruby .class .title,pre .css .rules .attribute{color:#f0c674}.tomorrow-green,pre .string,pre .value,pre .inheritance,pre .header,pre .ruby .symbol,pre .xml .cdata{color:#b5bd68}.tomorrow-aqua,pre .css .hexcolor{color:#8abeb7}.tomorrow-blue,pre .function,pre .python .decorator,pre .python .title,pre .ruby .function .title,pre .ruby .title .keyword,pre .perl .sub,pre .javascript .title,pre .coffeescript .title{color:#81a2be}.tomorrow-purple,pre .keyword,pre .javascript .function{color:#b294bb}pre code{display:block;background:#1d1f21;color:#c5c8c6;padding:.25em .5em}pre .coffeescript .javascript,pre .javascript .xml,pre .tex .formula,pre .xml .javascript,pre .xml .vbscript,pre .xml .css,pre .xml .cdata{opacity:.5} -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | /* global require */ 2 | var gulp = require('gulp'); 3 | var sass = require('gulp-sass'); 4 | var concat = require('gulp-concat'); 5 | var cssmin = require('gulp-cssmin'); 6 | var uglify = require('gulp-uglify'); 7 | var livereload = require('gulp-livereload'); 8 | var header = require('gulp-header'); 9 | var autoprefixer = require('gulp-autoprefixer'); 10 | var pkg = require('./package.json'); 11 | 12 | var now = new Date(); 13 | // Create an array with the current month, day and time 14 | var date = [ 15 | now.getMonth() + 1, 16 | now.getDate(), 17 | now.getFullYear() 18 | ].join('/'); 19 | 20 | var banner = ['/*!', 21 | ' * <%= pkg.title || pkg.name %> - <%= pkg.description %>', 22 | ' * @version v<%= pkg.version %>', 23 | ' * @link <%= pkg.homepage %>', 24 | ' * @license <%= pkg.license %>', 25 | ' * @copyright (c) <%= date %> <%= pkg.author.name %> (<%= pkg.author.url %>)', 26 | ' */', 27 | ''].join('\n'); 28 | 29 | var data = { 30 | pkg : pkg, 31 | date: date 32 | }; 33 | 34 | gulp.task('concat', function() { 35 | gulp.src('src/scripts/*.js') 36 | .pipe(concat('script.js')) 37 | .pipe(gulp.dest('js/')) 38 | .pipe(livereload()); 39 | }); 40 | 41 | gulp.task('cssmin', function () { 42 | gulp.src(['css/*.css', '!css/style.min.css']) 43 | .pipe(cssmin()) 44 | .pipe(concat('style.min.css')) 45 | .pipe(header(banner, data)) 46 | .pipe(gulp.dest('css/')); 47 | }); 48 | 49 | gulp.task('sass', function () { 50 | gulp.src('src/styles/*.scss') 51 | .pipe(sass()) 52 | .pipe(concat('style.css')) 53 | .pipe(gulp.dest('css/')) 54 | .pipe(livereload()); 55 | }); 56 | 57 | gulp.task('autoprefixer', function () { 58 | gulp.src('css/style.css') 59 | .pipe(autoprefixer({ 60 | browsers: ['last 4 versions', 'ie 8', 'ie 9'], 61 | cascade: false, 62 | remove: false // keep unneeded prefixes 63 | })) 64 | .pipe(concat('style.css')) 65 | .pipe(gulp.dest('css/')); 66 | }); 67 | 68 | gulp.task('uglify', function() { 69 | gulp.src(['js/*.js', '!js/script.min.js']) 70 | .pipe(uglify()) 71 | .pipe(concat('script.min.js')) 72 | .pipe(header(banner, data)) 73 | .pipe(gulp.dest('js/')); 74 | }); 75 | 76 | gulp.task('reload', function() { 77 | gulp.src('**/*.{php,html}') 78 | .pipe(livereload()); 79 | }); 80 | 81 | gulp.task('watch', function() { 82 | livereload.listen(); 83 | gulp.watch('**/*.{php,html}', ['reload']); 84 | gulp.watch('src/styles/*.scss', ['sass']); 85 | gulp.watch('src/scripts/*.js', ['concat']); 86 | gulp.watch('simplebinder.js', ['reload']); 87 | }); 88 | 89 | gulp.task('build', function() { 90 | gulp.src('simplebinder.js') 91 | .pipe(uglify()) 92 | .pipe(header(banner, data)) 93 | .pipe(concat('simplebinder.min.js')) 94 | .pipe(gulp.dest('./')); 95 | }); 96 | 97 | gulp.task('default', ['sass', 'autoprefixer', 'cssmin', 'concat', 'uglify'], function() { 98 | // fired before 'finished' event 99 | }); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SimpleBinder 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Simple Data Binder

17 | SimpleBinder On Github 18 |
19 |
20 |
21 |
22 |

What is this?!

23 |

This is a zero dependency library to do simple one-way data binding.

24 |
25 |
26 |

Why does this exists?!

27 |

Well, I wanted a way to do data binding without having to include angular.js or jQuery.

28 |
29 |
30 |

How do I use this?!

31 |

Just include simplebinder.js in your page, and copypasta some examples.

32 |
33 |
34 |
35 |
36 |
37 |

Demo

38 |

This is a dump of all the inputs that simplebinder supports.

39 |

Note: there is no checkbox or file input.

40 |
41 |
42 |

number

43 | 44 | 45 |

select

46 | 50 |

area

51 |

area

52 | 53 | 54 |

range

55 | 56 |

radio

57 | 58 | 59 | 60 |

checkbox

61 |

only handles unique names

62 | 63 |

checkbox checked value

64 |

this is checking the "checked" value on the checkbox

65 | 66 |

These inputs have to be valid in order to trigger their events.

67 |

time

68 | 69 |

date

70 | 71 |

color

72 | 73 |

datetime

74 | 75 |

datetime-local

76 | 77 |

week

78 | 79 |
80 |
81 |

Grouped Items

82 |
83 |
84 |

item1

85 | 86 |

item2

87 | 88 |

item3

89 | 90 |
91 |
92 |
93 |
94 |

Examples

95 |

Here are some of the methods and functions that are part of every simplebinder.

96 |
97 |
98 |

Markup required for a simplebinder element.

99 |
<p data-model="number">number</p>
100 | <input type="number" data-controller="number" />
101 |

As you can see, you must have a data-model and a data-controller set on your items. Models are like the destination for the data-controllers value.

102 |

Create a new simplebinder element.

103 |
var sb = SimpleBinder('modelname', function(input, model) {
104 |   console.log(input.value);
105 | });
106 |

Destroy a simplebinder element.

107 |
sb.destroy();
108 |

Add a new controller to a simplebinder element.

109 |
sb.addController('new-controller-name');
110 |

Add a new model to a simplebinder element.

111 |
sb.addModel('new-model-name');
112 |

See all models on a simplebinder element. Returns an arrary of strings with querySelectorAll queries.

113 |
sb.models;
114 |

See all controllers on a simplebinder element. Returns an arrary of strings with querySelectorAll queries.

115 |
sb.controllers;
116 |

Custom events and attributes

117 |
var sb = SimpleBinder('modelname', {
118 |   watch: 'value', // what controller attribute are we watching?
119 |   change: 'className', // the attribute to change on the model, default = textContent
120 |   defaultValue: 'I Am Empty' // the value to put in the model when the controller value is empty
121 | }, function(input, model) {
122 |   console.log(input.value);
123 | });
124 |

Inline Default Values

125 |

You can set a default value directly on the model for when the controller value is empty.

126 |
<p data-model="default-100" data-default="Please Enter A Value">100</p>
127 | <input type="text" data-controller="default-100" />
128 | 
129 |

If a default value is set in the config object when the element is created, the inline default will take priority.

130 |

Multiple Elements

131 |

Markup required for multiple simplebinder elements.

132 |
<p data-model="number">number</p>
133 | <input type="text" data-controller="number" class="collection" />
134 | <p data-model="another-number">another-number</p>
135 | <input type="text" data-controller="another-number" class="collection" />
136 | <p data-model="more-number">more-number</p>
137 | <input type="text" data-controller="more-number" class="collection" />
138 |

You can pass an array of elements to the SimpleBinder function to create multiple elements at the same time. In this example, we passed a NodeList of objects with the class of collection.

139 |
var collection = SimpleBinder(
140 | document.getElementsByClassName('collection'),
141 | function(e, t) {
142 |   console.log(e.value);
143 | });
144 |
145 |
146 |
147 |
148 |

Who made this?!

149 |

I did. You can find me at these fine locations.

150 | 155 |
156 |
157 |

Source, Issues, Supported Browsers

158 |

This library uses querySelectorAll, so if you don't have that... well you're fucked.

159 |

If you find an issue, or want to see the source, check out the github page.

160 | SimpleBinder On Github 161 |
162 |
163 |
164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /js/highlight.custom.js: -------------------------------------------------------------------------------- 1 | var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(//gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+(q.parentNode?q.parentNode.className:"")).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("")}while(o!=u.node);r.splice(q,1);while(q'+M[0]+""}else{r+=M[0]}O=A.lR.lastIndex;M=A.lR.exec(L)}return r+L.substr(O)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return''+r.value+""}function K(){return A.sL!==undefined?z():H()}function J(M,r){var L=M.cN?'':"";if(M.rB){x+=L;w=""}else{if(M.eB){x+=l(r)+L;w=""}else{x+=L;w=r}}A=Object.create(M,{parent:{value:A}})}function D(L,r){w+=L;if(r===undefined){x+=K();return 0}var N=o(r,A);if(N){x+=K();J(N,r);return N.rB?0:r.length}var O=s(A,r);if(O){var M=A;if(!(M.rE||M.eE)){w+=r}x+=K();do{if(A.cN){x+=""}B+=A.r;A=A.parent}while(A!=O.parent);if(M.eE){x+=l(r)}w="";if(O.starts){J(O.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw new Error('Illegal lexem "'+r+'" for mode "'+(A.cN||"")+'"')}w+=r;return r.length||1}var G=e[E];f(G);var A=G;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(F);if(!u){break}q=D(F.substr(p,u.index-p),u[0]);p=u.index+q}D(F.substr(p));return{r:B,keyword_count:v,value:x,language:E}}catch(I){if(I.message.indexOf("Illegal")!=-1){return{r:0,keyword_count:0,value:l(F)}}else{throw I}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s,false);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"
")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v,true):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.bash=function(a){var c={cN:"variable",b:/\$[\w\d#@][\w\d_]*/};var b={cN:"variable",b:/\$\{(.*?)\}/};var e={cN:"string",b:/"/,e:/"/,c:[a.BE,c,b,{cN:"variable",b:/\$\(/,e:/\)/,c:a.BE}],r:0};var d={cN:"string",b:/'/,e:/'/,r:0};return{l:/-?[a-z]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[{cN:"title",b:/\w[\w\d_]*/}],r:0},a.HCM,a.NM,e,d,c,b]}}(hljs);hljs.LANGUAGES.diff=function(a){return{c:[{cN:"chunk",b:"^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$",r:10},{cN:"chunk",b:"^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$",r:10},{cN:"chunk",b:"^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$",r:10},{cN:"header",b:"Index: ",e:"$"},{cN:"header",b:"=====",e:"=====$"},{cN:"header",b:"^\\-\\-\\-",e:"$"},{cN:"header",b:"^\\*{3} ",e:"$"},{cN:"header",b:"^\\+\\+\\+",e:"$"},{cN:"header",b:"\\*{5}",e:"\\*{5}$"},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/;/,sL:"xml"}],r:0},{cN:"function",bWK:true,e:/{/,k:"function",c:[{cN:"title",b:/[A-Za-z$_][0-9A-Za-z$_]*/},{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,r:0,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",r:0,c:[{cN:"title",b:"[^ /><]+"},b]}]}}(hljs);hljs.LANGUAGES.markdown=function(a){return{c:[{cN:"header",b:"^#{1,3}",e:"$"},{cN:"header",b:"^.+?\\n[=-]{2,}$"},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",b:"\\*.+?\\*"},{cN:"emphasis",b:"_.+?_",r:0},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",b:"`.+?`"},{cN:"code",b:"^ ",e:"$",r:0},{cN:"horizontal_rule",b:"^-{3,}",e:"$"},{b:"\\[.+?\\]\\(.+?\\)",rB:true,c:[{cN:"link_label",b:"\\[.+\\]"},{cN:"link_url",b:"\\(",e:"\\)",eB:true,eE:true}]}]}}(hljs);hljs.LANGUAGES.css=function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.http=function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}}(hljs);hljs.LANGUAGES.php=function(a){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var b=[a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),{cN:"string",b:'b"',e:'"',c:[a.BE]},{cN:"string",b:"b'",e:"'",c:[a.BE]}];var c=[a.BNM,a.CNM];var d={cN:"title",b:a.UIR};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return implements parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ enddeclare final try this switch continue endfor endif declare unset true false namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler",c:[a.CLCM,a.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"}]},{cN:"comment",eB:true,b:"__halt_compiler.+?;",eW:true},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[a.BE]},{cN:"preprocessor",b:"<\\?php",r:10},{cN:"preprocessor",b:"\\?>"},e,{cN:"function",bWK:true,e:"{",k:"function",i:"\\$|\\[|%",c:[d,{cN:"params",b:"\\(",e:"\\)",c:["self",e,a.CBLCLM].concat(b).concat(c)}]},{cN:"class",bWK:true,e:"{",k:"class",i:"[:\\(\\$]",c:[{bWK:true,eW:true,k:"extends",c:[d]},d]},{b:"=>"}].concat(b).concat(c)}}(hljs);hljs.LANGUAGES.sql=function(a){return{cI:true,c:[{cN:"operator",b:"(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}],r:0},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}],r:0},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}(hljs);hljs.LANGUAGES.handlebars=function(c){function f(l,k){var g={};for(var j in l){if(j!="contains"){g[j]=l[j]}var m=[];for(var h=0;l.c&&h"},a.QSM]}}(hljs); -------------------------------------------------------------------------------- /js/script.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.7.1 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-multiplebgs-cssanimations-csscolumns-cssgradients-csstransforms-csstransforms3d-localstorage-websockets-webworkers-touch-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-css_calc-css_filters-script_async-script_defer-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},q.multiplebgs=function(){return z("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},q.cssanimations=function(){return F("animationName")},q.csscolumns=function(){return F("columnCount")},q.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return z((a+"-webkit- ".split(" ").join(b+a)+m.join(c+a)).slice(0,-a.length)),C(j.backgroundImage,"gradient")},q.csstransforms=function(){return!!F("transform")},q.csstransforms3d=function(){var a=!!F("perspective");return a&&"webkitPerspective"in g.style&&w("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},q.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},q.webworkers=function(){return!!a.Worker};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f9)}),Modernizr.addTest("scriptasync","async"in document.createElement("script")),Modernizr.addTest("scriptdefer","defer"in document.createElement("script")); 5 | 6 | document.addEventListener('DOMContentLoaded', function() { 7 | hljs.initHighlightingOnLoad(); 8 | var items = ['number', 'select', 'area', 'range', 'radio', 'checkbox', 'time', 'date', 'color', 'datetime', 'datetime-local', 'week', 'file', 'hidden', 'image']; 9 | var sb = []; 10 | for (var i = 0; i < items.length; i++) { 11 | sb[i] = SimpleBinder(items[i], function(e, t) { 12 | console.log(e.value); 13 | }); 14 | } 15 | var checkbox = SimpleBinder('checked', { 16 | watch: 'checked' // what controller attribute are we watching? 17 | }); 18 | var collection = SimpleBinder( 19 | document.getElementsByClassName('groups'), 20 | { defaultValue: 'Default Value' }, 21 | function(e, t) { 22 | console.log(e.value); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /js/script.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * simplebinder - simplebinder is a zero dependency one-way databinder for javascript. 3 | * @version v1.2.0 4 | * @link https://james2doyle.github.io/simplebinder 5 | * @license 6 | * @copyright (c) 9/3/2015 James Doyle (http://ohdoylerules.com/) 7 | */ 8 | var hljs=new function(){function e(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){for(var t=e.firstChild;t;t=t.nextSibling){if("CODE"==t.nodeName)return t;if(3!=t.nodeType||!t.nodeValue.match(/\s+/))break}}function r(e,t){return Array.prototype.map.call(e.childNodes,function(e){return 3==e.nodeType?t?e.nodeValue.replace(/\n/g,""):e.nodeValue:"BR"==e.nodeName?"\n":r(e,t)}).join("")}function a(e){var t=(e.className+" "+(e.parentNode?e.parentNode.className:"")).split(/\s+/);t=t.map(function(e){return e.replace(/^language-/,"")});for(var r=0;r"}for(var s=0,n="",o=[];t.length||r.length;){var l=i().splice(0,1)[0];if(n+=e(a.substr(s,l.offset-s)),s=l.offset,"start"==l.event)n+=c(l.node),o.push(l.node);else if("stop"==l.event){var d,u=o.length;do u--,d=o[u],n+="";while(d!=l.node);for(o.splice(u,1);u'+i[0]+""):r+=i[0],a=v.lR.lastIndex,i=v.lR.exec(t)}return r+t.substr(a)}function p(){if(v.sL&&!h[v.sL])return e(N);var t=v.sL?n(v.sL,N):o(N);return v.r>0&&(_+=t.keyword_count,y+=t.r),''+t.value+""}function f(){return void 0!==v.sL?p():u()}function m(t,r){var a=t.cN?'':"";t.rB?(x+=a,N=""):t.eB?(x+=e(r)+a,N=""):(x+=a,N=r),v=Object.create(t,{parent:{value:v}})}function b(t,r){if(N+=t,void 0===r)return x+=f(),0;var a=i(r,v);if(a)return x+=f(),m(a,r),a.rB?0:r.length;var s=c(v,r);if(s){var n=v;n.rE||n.eE||(N+=r),x+=f();do v.cN&&(x+=""),y+=v.r,v=v.parent;while(v!=s.parent);return n.eE&&(x+=e(r)),N="",s.starts&&m(s.starts,""),n.rE?0:r.length}if(l(r,v))throw new Error('Illegal lexem "'+r+'" for mode "'+(v.cN||"")+'"');return N+=r,r.length||1}var g=h[t];s(g);var v=g,N="",y=0,_=0,x="";try{for(var k,w,E=0;;){if(v.t.lastIndex=E,k=v.t.exec(r),!k)break;w=b(r.substr(E,k.index-E),k[0]),E=k.index+w}return b(r.substr(E)),{r:y,keyword_count:_,value:x,language:t}}catch(z){if(-1!=z.message.indexOf("Illegal"))return{r:0,keyword_count:0,value:e(r)};throw z}}function o(t){var r={keyword_count:0,r:0,value:e(t)},a=r;for(var i in h)if(h.hasOwnProperty(i)){var c=n(i,t,!1);c.language=i,c.keyword_count+c.r>a.keyword_count+a.r&&(a=c),c.keyword_count+c.r>r.keyword_count+r.r&&(a=r,r=c)}return a.language&&(r.second_best=a),r}function l(e,t,r){return t&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,r,a,i){return r.replace(/\t/g,t)})),r&&(e=e.replace(/\n/g,"
")),e}function d(e,t,s){var d=r(e,s),u=a(e);if("no-highlight"!=u){var p=u?n(u,d,!0):o(d);u=p.language;var h=i(e);if(h.length){var f=document.createElement("pre");f.innerHTML=p.value,p.value=c(h,i(f),d)}p.value=l(p.value,t,s);var m=e.className;m.match("(\\s|^)(language-)?"+u+"(\\s|$)")||(m=m?m+" "+u:u),e.innerHTML=p.value,e.className=m,e.result={language:u,kw:p.keyword_count,re:p.r},p.second_best&&(e.second_best={language:p.second_best.language,kw:p.second_best.keyword_count,re:p.second_best.r})}}function u(){u.called||(u.called=!0,Array.prototype.map.call(document.getElementsByTagName("pre"),t).filter(Boolean).forEach(function(e){d(e,hljs.tabReplace)}))}function p(){window.addEventListener("DOMContentLoaded",u,!1),window.addEventListener("load",u,!1)}var h={};this.LANGUAGES=h,this.highlight=n,this.highlightAuto=o,this.fixMarkup=l,this.highlightBlock=d,this.initHighlighting=u,this.initHighlightingOnLoad=p,this.IR="[a-zA-Z][a-zA-Z0-9_]*",this.UIR="[a-zA-Z_][a-zA-Z0-9_]*",this.NR="\\b\\d+(\\.\\d+)?",this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",this.BNR="\\b(0b[01]+)",this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",this.BE={b:"\\\\[\\s\\S]",r:0},this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0},this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0},this.CLCM={cN:"comment",b:"//",e:"$"},this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"},this.HCM={cN:"comment",b:"#",e:"$"},this.NM={cN:"number",b:this.NR,r:0},this.CNM={cN:"number",b:this.CNR,r:0},this.BNM={cN:"number",b:this.BNR,r:0},this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]},this.inherit=function(e,t){var r={};for(var a in e)r[a]=e[a];if(t)for(var a in t)r[a]=t[a];return r}};hljs.LANGUAGES.bash=function(e){var t={cN:"variable",b:/\$[\w\d#@][\w\d_]*/},r={cN:"variable",b:/\$\{(.*?)\}/},a={cN:"string",b:/"/,e:/"/,c:[e.BE,t,r,{cN:"variable",b:/\$\(/,e:/\)/,c:e.BE}],r:0},i={cN:"string",b:/'/,e:/'/,r:0};return{l:/-?[a-z]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[{cN:"title",b:/\w[\w\d_]*/}],r:0},e.HCM,e.NM,a,i,t,r]}}(hljs),hljs.LANGUAGES.diff=function(e){return{c:[{cN:"chunk",b:"^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$",r:10},{cN:"chunk",b:"^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$",r:10},{cN:"chunk",b:"^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$",r:10},{cN:"header",b:"Index: ",e:"$"},{cN:"header",b:"=====",e:"=====$"},{cN:"header",b:"^\\-\\-\\-",e:"$"},{cN:"header",b:"^\\*{3} ",e:"$"},{cN:"header",b:"^\\+\\+\\+",e:"$"},{cN:"header",b:"\\*{5}",e:"\\*{5}$"},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}(hljs),hljs.LANGUAGES.javascript=function(e){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[e.ASM,e.QSM,e.CLCM,e.CBLCLM,e.CNM,{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBLCLM,e.REGEXP_MODE,{b:/;/,sL:"xml"}],r:0},{cN:"function",bWK:!0,e:/{/,k:"function",c:[{cN:"title",b:/[A-Za-z$_][0-9A-Za-z$_]*/},{cN:"params",b:/\(/,e:/\)/,c:[e.CLCM,e.CBLCLM],i:/["'\(]/}],i:/\[|%/}]}}(hljs),hljs.LANGUAGES.xml=function(e){var t="[A-Za-z0-9\\._:-]+",r={eW:!0,r:0,c:[{cN:"attribute",b:t,r:0},{b:'="',rB:!0,e:'"',c:[{cN:"value",b:'"',eW:!0}]},{b:"='",rB:!0,e:"'",c:[{cN:"value",b:"'",eW:!0}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:!0,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[r],starts:{e:"",rE:!0,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[r],starts:{e:"",rE:!0,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",r:0,c:[{cN:"title",b:"[^ /><]+"},r]}]}}(hljs),hljs.LANGUAGES.markdown=function(e){return{c:[{cN:"header",b:"^#{1,3}",e:"$"},{cN:"header",b:"^.+?\\n[=-]{2,}$"},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",b:"\\*.+?\\*"},{cN:"emphasis",b:"_.+?_",r:0},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",b:"`.+?`"},{cN:"code",b:"^ ",e:"$",r:0},{cN:"horizontal_rule",b:"^-{3,}",e:"$"},{b:"\\[.+?\\]\\(.+?\\)",rB:!0,c:[{cN:"link_label",b:"\\[.+\\]"},{cN:"link_url",b:"\\(",e:"\\)",eB:!0,eE:!0}]}]}}(hljs),hljs.LANGUAGES.css=function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]};return{cI:!0,i:"[=/|']",c:[e.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[r,e.ASM,e.QSM,e.NM]}]},{cN:"tag",b:t,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[e.CBLCLM,{cN:"rule",b:"[^\\s]",rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[r,e.NM,e.QSM,e.ASM,e.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs),hljs.LANGUAGES.http=function(e){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}}(hljs),hljs.LANGUAGES.php=function(e){var t={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},r=[e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),{cN:"string",b:'b"',e:'"',c:[e.BE]},{cN:"string",b:"b'",e:"'",c:[e.BE]}],a=[e.BNM,e.CNM],i={cN:"title",b:e.UIR};return{cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return implements parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ enddeclare final try this switch continue endfor endif declare unset true false namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler",c:[e.CLCM,e.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"}]},{cN:"comment",eB:!0,b:"__halt_compiler.+?;",eW:!0},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},{cN:"preprocessor",b:"<\\?php",r:10},{cN:"preprocessor",b:"\\?>"},t,{cN:"function",bWK:!0,e:"{",k:"function",i:"\\$|\\[|%",c:[i,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBLCLM].concat(r).concat(a)}]},{cN:"class",bWK:!0,e:"{",k:"class",i:"[:\\(\\$]",c:[{bWK:!0,eW:!0,k:"extends",c:[i]},i]},{b:"=>"}].concat(r).concat(a)}}(hljs),hljs.LANGUAGES.sql=function(e){return{cI:!0,c:[{cN:"operator",b:"(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b(?!:)",e:";",eW:!0,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}],r:0},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}],r:0},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM]},e.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}(hljs),hljs.LANGUAGES.handlebars=function(e){function t(e,r){var i={};for(var c in e){"contains"!=c&&(i[c]=e[c]);for(var s=[],n=0;e.c&&n"},e.QSM]}}(hljs); 9 | window.Modernizr=function(e,t,n){function r(e){y.cssText=e}function o(e,t){return typeof e===t}function i(e,t){return!!~(""+e).indexOf(t)}function a(e,t){for(var r in e){var o=e[r];if(!i(o,"-")&&y[o]!==n)return"pfx"==t?o:!0}return!1}function c(e,t,r){for(var i in e){var a=t[e[i]];if(a!==n)return r===!1?e[i]:o(a,"function")?a.bind(r||t):a}return!1}function s(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+w.join(r+" ")+r).split(" ");return o(t,"string")||o(t,"undefined")?a(i,t):(i=(e+" "+j.join(r+" ")+r).split(" "),c(i,t,n))}var l,u,d,f="2.7.1",p={},m=!0,h=t.documentElement,g="modernizr",v=t.createElement(g),y=v.style,b=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),E="Webkit Moz O ms",w=E.split(" "),j=E.toLowerCase().split(" "),S={},k=[],x=k.slice,C=function(e,n,r,o){var i,a,c,s,l=t.createElement("div"),u=t.body,d=u||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:g+(r+1),l.appendChild(c);return i=["­",'"].join(""),l.id=g,(u?l:d).innerHTML+=i,d.appendChild(l),u||(d.style.background="",d.style.overflow="hidden",s=h.style.overflow,h.style.overflow="hidden",h.appendChild(d)),a=n(l,e),u?l.parentNode.removeChild(l):(d.parentNode.removeChild(d),h.style.overflow=s),!!a},M={}.hasOwnProperty;d=o(M,"undefined")||o(M.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return M.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=x.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=t.prototype;var i=new o,a=t.apply(i,n.concat(x.call(arguments)));return Object(a)===a?a:i}return t.apply(e,n.concat(x.call(arguments)))};return r}),S.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:C(["@media (",b.join("touch-enabled),("),g,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=9===e.offsetTop}),n},S.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},S.multiplebgs=function(){return r("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(y.background)},S.cssanimations=function(){return s("animationName")},S.csscolumns=function(){return s("columnCount")},S.cssgradients=function(){var e="background-image:",t="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";return r((e+"-webkit- ".split(" ").join(t+e)+b.join(n+e)).slice(0,-e.length)),i(y.backgroundImage,"gradient")},S.csstransforms=function(){return!!s("transform")},S.csstransforms3d=function(){var e=!!s("perspective");return e&&"webkitPerspective"in h.style&&C("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=9===t.offsetLeft&&3===t.offsetHeight}),e},S.localstorage=function(){try{return localStorage.setItem(g,g),localStorage.removeItem(g),!0}catch(e){return!1}},S.webworkers=function(){return!!e.Worker};for(var T in S)d(S,T)&&(u=T.toLowerCase(),p[u]=S[T](),k.push((p[u]?"":"no-")+u));return p.addTest=function(e,t){if("object"==typeof e)for(var r in e)d(e,r)&&p.addTest(r,e[r]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof m&&m&&(h.className+=" "+(t?"":"no-")+e),p[e]=t}return p},r(""),v=l=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=v[e[h]];return t||(t={},g++,e[h]=g,v[g]=t),t}function i(e,n,r){if(n||(n=t),u)return n.createElement(e);r||(r=o(n));var i;return i=r.cache[e]?r.cache[e].cloneNode():m.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!i.canHaveChildren||p.test(e)||i.tagUrn?i:r.frag.appendChild(i)}function a(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||o(e);for(var i=n.frag.cloneNode(),a=0,c=r(),s=c.length;s>a;a++)i.createElement(c[a]);return i}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function s(e){e||(e=t);var r=o(e);return y.shivCSS&&!l&&!r.hasCSS&&(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||c(e,r),e}var l,u,d="3.7.0",f=e.html5||{},p=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,m=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",g=0,v={};!function(){try{var e=t.createElement("a");e.innerHTML="",l="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){l=!0,u=!0}}();var y={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:d,shivCSS:f.shivCSS!==!1,supportsUnknownElements:u,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:s,createElement:i,createDocumentFragment:a};e.html5=y,s(t)}(this,t),p._version=f,p._prefixes=b,p._domPrefixes=j,p._cssomPrefixes=w,p.testProp=function(e){return a([e])},p.testAllProps=s,p.testStyles=C,h.className=h.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(m?" js "+k.join(" "):""),p}(this,this.document),function(e,t,n){function r(e){return"[object Function]"==g.call(e)}function o(e){return"string"==typeof e}function i(){}function a(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function c(){var e=v.shift();y=1,e?e.t?m(function(){("c"==e.t?f.injectCss:f.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),c()):y=0}function s(e,n,r,o,i,s,l){function u(t){if(!p&&a(d.readyState)&&(b.r=p=1,!y&&c(),d.onload=d.onreadystatechange=null,t)){"img"!=e&&m(function(){w.removeChild(d)},50);for(var r in C[n])C[n].hasOwnProperty(r)&&C[n][r].onload()}}var l=l||f.errorTimeout,d=t.createElement(e),p=0,g=0,b={t:r,s:n,e:i,a:s,x:l};1===C[n]&&(g=1,C[n]=[]),"object"==e?d.data=n:(d.src=n,d.type=e),d.width=d.height="0",d.onerror=d.onload=d.onreadystatechange=function(){u.call(this,g)},v.splice(o,0,b),"img"!=e&&(g||2===C[n]?(w.insertBefore(d,E?null:h),m(u,l)):C[n].push(d))}function l(e,t,n,r,i){return y=0,t=t||"j",o(e)?s("c"==t?S:j,e,t,this.i++,n,r,i):(v.splice(this.i++,0,e),1==v.length&&c()),this}function u(){var e=f;return e.loader={load:l,i:0},e}var d,f,p=t.documentElement,m=e.setTimeout,h=t.getElementsByTagName("script")[0],g={}.toString,v=[],y=0,b="MozAppearance"in p.style,E=b&&!!t.createRange().compareNode,w=E?p:h.parentNode,p=e.opera&&"[object Opera]"==g.call(e.opera),p=!!t.attachEvent&&!p,j=b?"object":p?"script":"img",S=p?"script":j,k=Array.isArray||function(e){return"[object Array]"==g.call(e)},x=[],C={},M={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}};f=function(e){function t(e){var t,n,r,e=e.split("!"),o=x.length,i=e.pop(),a=e.length,i={url:i,origUrl:i,prefixes:e};for(n=0;a>n;n++)r=e[n].split("="),(t=M[r.shift()])&&(i=t(i,r));for(n=0;o>n;n++)i=x[n](i);return i}function a(e,o,i,a,c){var s=t(e),l=s.autoCallback;s.url.split(".").pop().split("?").shift(),s.bypass||(o&&(o=r(o)?o:o[e]||o[a]||o[e.split("/").pop().split("?")[0]]),s.instead?s.instead(e,o,i,a,c):(C[s.url]?s.noexec=!0:C[s.url]=1,i.load(s.url,s.forceCSS||!s.forceJS&&"css"==s.url.split(".").pop().split("?").shift()?"c":n,s.noexec,s.attrs,s.timeout),(r(o)||r(l))&&i.load(function(){u(),o&&o(s.origUrl,c,a),l&&l(s.origUrl,c,a),C[s.url]=2})))}function c(e,t){function n(e,n){if(e){if(o(e))n||(d=function(){var e=[].slice.call(arguments);f.apply(this,e),p()}),a(e,d,t,0,l);else if(Object(e)===e)for(s in c=function(){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n}(),e)e.hasOwnProperty(s)&&(!n&&!--c&&(r(d)?d=function(){var e=[].slice.call(arguments);f.apply(this,e),p()}:d[s]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),p()}}(f[s])),a(e[s],d,t,s,l))}else!n&&p()}var c,s,l=!!e.test,u=e.load||e.both,d=e.callback||i,f=d,p=e.complete||i;n(l?e.yep:e.nope,!!u),u&&n(u)}var s,l,d=this.yepnope.loader;if(o(e))a(e,0,d,0);else if(k(e))for(s=0;s9)}),Modernizr.addTest("scriptasync","async"in document.createElement("script")),Modernizr.addTest("scriptdefer","defer"in document.createElement("script")),document.addEventListener("DOMContentLoaded",function(){hljs.initHighlightingOnLoad();for(var e=["number","select","area","range","radio","checkbox","time","date","color","datetime","datetime-local","week","file","hidden","image"],t=[],n=0;n 0) { 65 | targets[i][change] = value; 66 | } else { 67 | targets[i][change] = defaultValue; 68 | } 69 | } 70 | } 71 | if (callback && typeof(callback) === 'function') { 72 | callback(this, targets[i]); 73 | } 74 | } 75 | 76 | binder.prototype.controllers = loadedControllers; 77 | 78 | binder.prototype.models = loadedModels; 79 | 80 | binder.prototype.destroy = function() { 81 | for (var i = 0; i < il; i++) { 82 | inputs[i].removeEventListener(evt, handleChange); 83 | } 84 | }; 85 | 86 | binder.prototype.addModel = function(nmodel) { 87 | newModel(nmodel); 88 | makeInputs(); 89 | }; 90 | 91 | binder.prototype.addController = function(ncontroller) { 92 | newController(ncontroller); 93 | makeInputs(); 94 | }; 95 | 96 | return new binder; 97 | }); 98 | }; 99 | })(); -------------------------------------------------------------------------------- /simplebinder.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * simplebinder - simplebinder is a zero dependency one-way databinder for javascript. 3 | * @version v1.2.0 4 | * @link https://james2doyle.github.io/simplebinder 5 | * @license 6 | * @copyright (c) 9/3/2015 James Doyle (http://ohdoylerules.com/) 7 | */ 8 | !function(){window.SimpleBinder=function(t,e,o){"string"==typeof t&&(t=[t]),Array.prototype.slice.call(t,0).forEach(function(t){function n(){u=document.querySelectorAll(j.join(",")),d=u.length}function r(t){j.push('[data-controller="'+t+'"]'),n()}function c(){i=document.querySelectorAll(m.join(",")),p=i.length}function a(t){m.push('[data-model="'+t+'"]'),c()}function l(){for(var t=0;d>t;t++)y="radio"===u[t].type||"checkbox"===u[t].type||-1!==u[t].type.indexOf("select")?"change":"input",u[t].addEventListener(y,f)}function f(){for(var t=0;p>t;t++){var e=this[s].toString().trim();0===e.length&&"undefined"!=typeof i[t].dataset["default"]?i[t][h]=i[t].dataset["default"]:g?e.length>0?i[t][h]=e:i[t][h]=g:i[t][h]=e}v&&"function"==typeof v&&v(this,i[t])}var i,u,d,p,y,s="object"==typeof e&&e.watch?e.watch:"value",h="object"==typeof e&&e.change?e.change:"textContent",g="object"==typeof e&&e.defaultValue?e.defaultValue:!1,v="function"==typeof e?e:o,m=[],j=[],w=function(){"string"==typeof t?(r(t),a(t)):(r(t.dataset.controller),a(t.dataset.controller)),l()};return w.prototype.controllers=j,w.prototype.models=m,w.prototype.destroy=function(){for(var t=0;d>t;t++)u[t].removeEventListener(y,f)},w.prototype.addModel=function(t){a(t),l()},w.prototype.addController=function(t){r(t),l()},new w})}}(); -------------------------------------------------------------------------------- /src/scripts/__modernizr.custom.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.7.1 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-multiplebgs-cssanimations-csscolumns-cssgradients-csstransforms-csstransforms3d-localstorage-websockets-webworkers-touch-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-css_calc-css_filters-script_async-script_defer-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},q.multiplebgs=function(){return z("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},q.cssanimations=function(){return F("animationName")},q.csscolumns=function(){return F("columnCount")},q.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return z((a+"-webkit- ".split(" ").join(b+a)+m.join(c+a)).slice(0,-a.length)),C(j.backgroundImage,"gradient")},q.csstransforms=function(){return!!F("transform")},q.csstransforms3d=function(){var a=!!F("perspective");return a&&"webkitPerspective"in g.style&&w("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},q.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},q.webworkers=function(){return!!a.Worker};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f9)}),Modernizr.addTest("scriptasync","async"in document.createElement("script")),Modernizr.addTest("scriptdefer","defer"in document.createElement("script")); 5 | -------------------------------------------------------------------------------- /src/scripts/main.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | hljs.initHighlightingOnLoad(); 3 | var items = ['number', 'select', 'area', 'range', 'radio', 'checkbox', 'time', 'date', 'color', 'datetime', 'datetime-local', 'week', 'file', 'hidden', 'image']; 4 | var sb = []; 5 | for (var i = 0; i < items.length; i++) { 6 | sb[i] = SimpleBinder(items[i], function(e, t) { 7 | console.log(e.value); 8 | }); 9 | } 10 | var checkbox = SimpleBinder('checked', { 11 | watch: 'checked' // what controller attribute are we watching? 12 | }); 13 | var collection = SimpleBinder( 14 | document.getElementsByClassName('groups'), 15 | { defaultValue: 'Default Value' }, 16 | function(e, t) { 17 | console.log(e.value); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /src/styles/imports/__normalize.scss: -------------------------------------------------------------------------------- 1 | // ============================================================================= 2 | // Normalize.scss based on Nicolas Gallagher and Jonathan Neal's 3 | // normalize.css v2.1.1 | MIT License | git.io/normalize 4 | // ============================================================================= 5 | 6 | // ============================================================================= 7 | // Normalize.scss settings 8 | // ============================================================================= 9 | 10 | 11 | // Set to true if you want to add support for IE6 and IE7 12 | // Notice: setting to true might render some elements 13 | // slightly differently than when set to false 14 | $legacy_support_for_ie: true !default; // Used also in Compass 15 | 16 | 17 | // Set the default font family here so you don't have to override it later 18 | $normalized_font_family: 'Roboto', Helvetica, Arial, sans-serif !default; 19 | 20 | $normalize_headings: true !default; 21 | 22 | $h1_font_size: 2em !default; 23 | $h2_font_size: 1.5em !default; 24 | $h3_font_size: 1.17em !default; 25 | $h4_font_size: 1em !default; 26 | $h5_font_size: 0.83em !default; 27 | $h6_font_size: 0.75em !default; 28 | 29 | $h1_margin: 0.67em 0 !default; 30 | $h2_margin: 0.83em 0 !default; 31 | $h3_margin: 1em 0 !default; 32 | $h4_margin: 1.33em 0 !default; 33 | $h5_margin: 1.67em 0 !default; 34 | $h6_margin: 2.33em 0 !default; 35 | 36 | $background: #fff !default; 37 | $color: #000 !default; 38 | 39 | // ============================================================================= 40 | // HTML5 display definitions 41 | // ============================================================================= 42 | 43 | // Corrects block display not defined in IE6/7/8/9 & FF3 44 | 45 | article, 46 | aside, 47 | details, 48 | figcaption, 49 | figure, 50 | footer, 51 | header, 52 | hgroup, 53 | nav, 54 | section, 55 | summary { 56 | display: block; 57 | } 58 | 59 | // Corrects inline-block display not defined in IE6/7/8/9 & FF3 60 | 61 | audio, 62 | canvas, 63 | video { 64 | display: inline-block; 65 | @if $legacy_support_for_ie { 66 | *display: inline; 67 | *zoom: 1; 68 | } 69 | } 70 | 71 | // 1. Prevents modern browsers from displaying 'audio' without controls 72 | // 2. Remove excess height in iOS5 devices 73 | 74 | audio:not([controls]) { 75 | display: none; // 1 76 | height: 0; // 2 77 | } 78 | 79 | // Addresses styling for 'hidden' attribute not present in IE8/9 80 | 81 | [hidden] { 82 | display: none; 83 | } 84 | 85 | // ============================================================================= 86 | // Base 87 | // ============================================================================= 88 | 89 | // 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units 90 | // http://clagnut.com/blog/348/#c790 91 | // 2. Prevents iOS text size adjust after orientation change, without disabling user zoom 92 | // www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ 93 | 94 | html { 95 | @if $legacy_support_for_ie { 96 | font-size: 100%; // 1 97 | } 98 | background: $background; 99 | color: $color; 100 | -webkit-text-size-adjust: 100%; // 2 101 | -ms-text-size-adjust: 100%; // 2 102 | } 103 | 104 | // Addresses font-family inconsistency between 'textarea' and other form elements. 105 | 106 | html, 107 | button, 108 | input, 109 | select, 110 | textarea { 111 | font-family: sans-serif; 112 | } 113 | 114 | // Addresses margins handled incorrectly in IE6/7 115 | 116 | body { 117 | margin: 0; 118 | } 119 | 120 | // ============================================================================= 121 | // Links 122 | // ============================================================================= 123 | 124 | // 1. Addresses outline displayed oddly in Chrome 125 | // 2. Improves readability when focused and also mouse hovered in all browsers 126 | // people.opera.com/patrickl/experiments/keyboard/test 127 | 128 | a { 129 | 130 | // 1 131 | 132 | &:focus { 133 | outline: thin dotted; 134 | } 135 | 136 | // 2 137 | 138 | &:hover, 139 | &:active { 140 | outline: 0; 141 | } 142 | } 143 | 144 | // ============================================================================= 145 | // Typography 146 | // ============================================================================= 147 | 148 | // Addresses font sizes and margins set differently in IE6/7 149 | // Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5 150 | 151 | @if $normalize_headings == true { 152 | h1 { 153 | font-size: $h1_font_size; 154 | margin: $h1_margin; 155 | } 156 | 157 | h2 { 158 | font-size: $h2_font_size; 159 | margin: $h2_margin; 160 | } 161 | 162 | h3 { 163 | font-size: $h3_font_size; 164 | margin: $h3_margin; 165 | } 166 | 167 | h4 { 168 | font-size: $h4_font_size; 169 | margin: $h4_margin; 170 | } 171 | 172 | h5 { 173 | font-size: $h5_font_size; 174 | margin: $h5_margin; 175 | } 176 | 177 | h6 { 178 | font-size: $h6_font_size; 179 | margin: $h6_margin; 180 | } 181 | } 182 | 183 | // Addresses styling not present in IE 8/9, S5, Chrome 184 | 185 | abbr[title] { 186 | border-bottom: 1px dotted; 187 | } 188 | 189 | // Addresses style set to 'bolder' in FF3+, S4/5, Chrome 190 | 191 | b, 192 | strong { 193 | font-weight: bold; 194 | } 195 | 196 | @if $legacy_support_for_ie { 197 | blockquote { 198 | margin: 1em 40px; 199 | } 200 | } 201 | 202 | // Addresses styling not present in S5, Chrome 203 | 204 | dfn { 205 | font-style: italic; 206 | } 207 | 208 | // Addresses styling not present in IE6/7/8/9 209 | 210 | mark { 211 | background: #ff0; 212 | color: #000; 213 | } 214 | 215 | // Addresses margins set differently in IE6/7 216 | @if $legacy_support_for_ie { 217 | p, 218 | pre { 219 | margin: 1em 0; 220 | } 221 | } 222 | 223 | // Corrects font family set oddly in IE6, S4/5, Chrome 224 | // en.wikipedia.org/wiki/User:Davidgothberg/Test59 225 | 226 | code, 227 | kbd, 228 | pre, 229 | samp { 230 | font-family: monospace, serif; 231 | @if $legacy_support_for_ie { 232 | _font-family: 'courier new', monospace; 233 | } 234 | font-size: 1em; 235 | } 236 | 237 | // Improves readability of pre-formatted text in all browsers 238 | 239 | pre { 240 | white-space: pre; 241 | white-space: pre-wrap; 242 | word-wrap: break-word; 243 | } 244 | 245 | // Set consistent quote types. 246 | 247 | q { 248 | quotes: "\201C" "\201D" "\2018" "\2019"; 249 | } 250 | 251 | // 1. Addresses CSS quotes not supported in IE6/7 252 | // 2. Addresses quote property not supported in S4 253 | 254 | // 1 255 | @if $legacy_support_for_ie { 256 | q { 257 | quotes: none; 258 | } 259 | } 260 | 261 | // 2 262 | q:before, 263 | q:after { 264 | content: ''; 265 | content: none; 266 | } 267 | 268 | // Address inconsistent and variable font size in all browsers. 269 | 270 | small { 271 | font-size: 80%; 272 | } 273 | 274 | // Prevents sub and sup affecting line-height in all browsers 275 | // gist.github.com/413930 276 | 277 | sub, 278 | sup { 279 | font-size: 75%; 280 | line-height: 0; 281 | position: relative; 282 | vertical-align: baseline; 283 | } 284 | 285 | sup { 286 | top: -0.5em; 287 | } 288 | 289 | sub { 290 | bottom: -0.25em; 291 | } 292 | 293 | // ============================================================================= 294 | // Lists 295 | // ============================================================================= 296 | 297 | // Addresses margins set differently in IE6/7 298 | @if $legacy_support_for_ie { 299 | dl, 300 | menu, 301 | ol, 302 | ul { 303 | margin: 1em 0; 304 | } 305 | } 306 | 307 | @if $legacy_support_for_ie { 308 | dd { 309 | margin: 0 0 0 40px; 310 | } 311 | } 312 | 313 | // Addresses paddings set differently in IE6/7 314 | @if $legacy_support_for_ie { 315 | menu, 316 | ol, 317 | ul { 318 | padding: 0 0 0 40px; 319 | } 320 | } 321 | 322 | // Corrects list images handled incorrectly in IE7 323 | 324 | nav { 325 | ul, 326 | ol { 327 | @if $legacy_support_for_ie { 328 | list-style-image: none; 329 | } 330 | } 331 | } 332 | 333 | // ============================================================================= 334 | // Embedded content 335 | // ============================================================================= 336 | 337 | // 1. Removes border when inside 'a' element in IE6/7/8/9, FF3 338 | // 2. Improves image quality when scaled in IE7 339 | // code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ 340 | 341 | img { 342 | border: 0; // 1 343 | @if $legacy_support_for_ie { 344 | -ms-interpolation-mode: bicubic; // 2 345 | } 346 | } 347 | 348 | // Corrects overflow displayed oddly in IE9 349 | 350 | svg:not(:root) { 351 | overflow: hidden; 352 | } 353 | 354 | // ============================================================================= 355 | // Figures 356 | // ============================================================================= 357 | 358 | // Addresses margin not present in IE6/7/8/9, S5, O11 359 | 360 | figure { 361 | margin: 0; 362 | } 363 | 364 | // ============================================================================= 365 | // Forms 366 | // ============================================================================= 367 | 368 | // Corrects margin displayed oddly in IE6/7 369 | @if $legacy_support_for_ie { 370 | form { 371 | margin: 0; 372 | } 373 | } 374 | 375 | // Define consistent border, margin, and padding 376 | 377 | fieldset { 378 | border: 1px solid #c0c0c0; 379 | margin: 0 2px; 380 | padding: 0.35em 0.625em 0.75em; 381 | } 382 | 383 | // 1. Corrects color not being inherited in IE6/7/8/9 384 | // 2. Remove padding so people aren't caught out if they zero out fieldsets. 385 | // 3. Corrects text not wrapping in FF3 386 | // 4. Corrects alignment displayed oddly in IE6/7 387 | 388 | legend { 389 | border: 0; // 1 390 | padding: 0; // 2 391 | white-space: normal; // 3 392 | @if $legacy_support_for_ie { 393 | *margin-left: -7px; // 4 394 | } 395 | } 396 | 397 | // 1. Correct font family not being inherited in all browsers. 398 | // 2. Corrects font size not being inherited in all browsers 399 | // 3. Addresses margins set differently in IE6/7, FF3+, S5, Chrome 400 | // 4. Improves appearance and consistency in all browsers 401 | 402 | button, 403 | input, 404 | select, 405 | textarea { 406 | font-family: inherit; // 1 407 | font-size: 100%; // 2 408 | margin: 0; // 3 409 | vertical-align: baseline; // 4 410 | @if $legacy_support_for_ie { 411 | *vertical-align: middle; // 4 412 | } 413 | } 414 | 415 | // Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet 416 | 417 | button, 418 | input { 419 | line-height: normal; 420 | } 421 | 422 | // Address inconsistent `text-transform` inheritance for `button` and `select`. 423 | // All other form control elements do not inherit `text-transform` values. 424 | // Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. 425 | // Correct `select` style inheritance in Firefox 4+ and Opera. 426 | 427 | button, 428 | select { 429 | text-transform: none; 430 | } 431 | 432 | // 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 433 | // and `video` controls 434 | // 2. Corrects inability to style clickable 'input' types in iOS 435 | // 3. Improves usability and consistency of cursor style between image-type 436 | // 'input' and others 437 | // 4. Removes inner spacing in IE7 without affecting normal text inputs 438 | // Known issue: inner spacing remains in IE6 439 | 440 | button, 441 | html input[type="button"], // 1 442 | input[type="reset"], 443 | input[type="submit"] { 444 | -webkit-appearance: button; // 2 445 | cursor: pointer; // 3 446 | @if $legacy_support_for_ie { 447 | *overflow: visible; // 4 448 | } 449 | } 450 | 451 | // Re-set default cursor for disabled elements 452 | 453 | button[disabled], 454 | input[disabled] { 455 | cursor: default; 456 | } 457 | 458 | // 1. Addresses box sizing set to content-box in IE8/9 459 | // 2. Removes excess padding in IE8/9 460 | // 3. Removes excess padding in IE7 461 | // Known issue: excess padding remains in IE6 462 | 463 | input[type="checkbox"], 464 | input[type="radio"] { 465 | box-sizing: border-box; // 1 466 | padding: 0; // 2 467 | @if $legacy_support_for_ie { 468 | *height: 13px; // 3 469 | *width: 13px; // 3 470 | } 471 | } 472 | 473 | // 1. Addresses appearance set to searchfield in S5, Chrome 474 | // 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof) 475 | 476 | input[type="search"] { 477 | -webkit-appearance: textfield; // 1 478 | -moz-box-sizing: content-box; 479 | -webkit-box-sizing: content-box; // 2 480 | box-sizing: content-box; 481 | } 482 | 483 | // Remove inner padding and search cancel button in Safari 5 and Chrome 484 | // on OS X. 485 | 486 | input[type="search"]::-webkit-search-cancel-button, 487 | input[type="search"]::-webkit-search-decoration { 488 | -webkit-appearance: none; 489 | } 490 | 491 | // Removes inner padding and border in FF3+ 492 | // www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ 493 | 494 | button, input { 495 | &::-moz-focus-inner { 496 | border: 0; 497 | padding: 0; 498 | } 499 | } 500 | 501 | // 1. Removes default vertical scrollbar in IE6/7/8/9 502 | // 2. Improves readability and alignment in all browsers 503 | 504 | textarea { 505 | overflow: auto; // 1 506 | vertical-align: top; // 2 507 | } 508 | 509 | // ============================================================================= 510 | // Tables 511 | // ============================================================================= 512 | 513 | // Remove most spacing between table cells 514 | 515 | table { 516 | border-collapse: collapse; 517 | border-spacing: 0; 518 | } 519 | -------------------------------------------------------------------------------- /src/styles/imports/_grid.scss: -------------------------------------------------------------------------------- 1 | [class*='col-'] { 2 | float: left; 3 | padding: 0 10px; 4 | } 5 | 6 | // [class*='col-']:last-of-type { 7 | // padding-right: 0px; 8 | // } 9 | 10 | .grid { 11 | width: 100%; 12 | max-width: 1400px; 13 | min-width: 755px; 14 | margin: 0 auto; 15 | overflow: hidden; 16 | &:after { 17 | content: ""; 18 | display: table; 19 | clear: both; 20 | } 21 | } 22 | 23 | .grid-pad { 24 | padding: 20px 0 0px 20px; 25 | } 26 | 27 | .grid-pad > [class*='col-']:last-of-type { 28 | padding-right: 20px; 29 | } 30 | 31 | .push-right { 32 | float: right; 33 | } 34 | 35 | /* Content Columns */ 36 | 37 | .col-1-1 { 38 | width: 100%; 39 | } 40 | .col-2-3, .col-8-12 { 41 | width: 66.66%; 42 | } 43 | 44 | .col-1-2, .col-6-12 { 45 | width: 50%; 46 | } 47 | 48 | .col-1-3, .col-4-12 { 49 | width: 33.33%; 50 | } 51 | 52 | .col-1-4, .col-3-12 { 53 | width: 25%; 54 | } 55 | 56 | .col-1-5 { 57 | width: 20%; 58 | } 59 | 60 | .col-1-6, .col-2-12 { 61 | width: 16.667%; 62 | } 63 | 64 | .col-1-7 { 65 | width: 14.28%; 66 | } 67 | 68 | .col-1-8 { 69 | width: 12.5%; 70 | } 71 | 72 | .col-1-9 { 73 | width: 11.1%; 74 | } 75 | 76 | .col-1-10 { 77 | width: 10%; 78 | } 79 | 80 | .col-1-11 { 81 | width: 9.09%; 82 | } 83 | 84 | .col-1-12 { 85 | width: 8.33% 86 | } 87 | 88 | /* Layout Columns */ 89 | 90 | .col-11-12 { 91 | width: 91.66% 92 | } 93 | 94 | .col-10-12 { 95 | width: 83.333%; 96 | } 97 | 98 | .col-9-12 { 99 | width: 75%; 100 | } 101 | 102 | .col-5-12 { 103 | width: 41.66%; 104 | } 105 | 106 | .col-7-12 { 107 | width: 58.33% 108 | } 109 | 110 | @media handheld, only screen and (max-width: 767px) { 111 | .grid { 112 | width: 100%; 113 | min-width: 0; 114 | margin-left: 0px; 115 | margin-right: 0px; 116 | padding-left: 0px; 117 | padding-right: 0px; 118 | } 119 | 120 | [class*='col-'] { 121 | width: auto; 122 | float: none; 123 | margin: 1em 0; 124 | padding-left: 1em; 125 | padding-right: 1em; 126 | &:last-of-type { 127 | padding-right: 1em; 128 | } 129 | } 130 | 131 | [class*='col-'].m-50 { 132 | width: 50%; 133 | float: left; 134 | padding: 0; 135 | } 136 | } -------------------------------------------------------------------------------- /src/styles/imports/_mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin placeholder { 2 | &.placeholder { @content; } 3 | &:-moz-placeholder { @content; } 4 | &::-moz-placeholder { @content; } 5 | &::-webkit-input-placeholder { @content; } 6 | } 7 | 8 | @mixin fadeIn($start) { 9 | opacity: $start; 10 | -webkit-backface-visibility: hidden; 11 | transition: opacity 0.2s ease; 12 | &:hover { 13 | opacity: 1; 14 | } 15 | } 16 | 17 | @mixin fadeOut($end) { 18 | opacity: 1; 19 | -webkit-backface-visibility: hidden; 20 | transition: opacity 0.2s ease; 21 | &:hover { 22 | opacity: $end; 23 | } 24 | } 25 | 26 | 27 | @mixin image-2x($image, $width, $height, $x, $y, $repeat) { 28 | background: url("#{$image}.png") $x $y $repeat; 29 | @media (min--moz-device-pixel-ratio: 1.3), 30 | (-o-min-device-pixel-ratio: 2.6/2), 31 | (-webkit-min-device-pixel-ratio: 1.3), 32 | (min-device-pixel-ratio: 1.3), 33 | (min-resolution: 1.3dppx) { 34 | /* on retina, use image that's scaled by 2 */ 35 | background-image: url("#{$image}@2x.png"); 36 | background-size: $width $height; 37 | } 38 | } 39 | 40 | @mixin clearfix() { 41 | *zoom: 1; 42 | &:before, 43 | &:after { 44 | content: ""; 45 | display: table; 46 | } 47 | &:after { 48 | clear: both; 49 | } 50 | } 51 | 52 | @mixin box-sizing($box-model) { 53 | -webkit-box-sizing: $box-model; 54 | -moz-box-sizing: $box-model; 55 | box-sizing: $box-model; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /src/styles/z_site.scss: -------------------------------------------------------------------------------- 1 | @import "imports/__normalize"; 2 | @import "imports/_grid"; 3 | @import "imports/_mixins"; 4 | 5 | // [class^="icon"] { 6 | // position: relative; 7 | // top: 0.1em; 8 | // } 9 | 10 | html { 11 | min-height: 100%; 12 | } 13 | 14 | body { 15 | font: normal normal normal 16px/1.5em 'Averia Sans Libre', sans-serif; 16 | -webkit-font-smoothing: antialiased; 17 | text-rendering: optimizeLegibility; 18 | -moz-osx-font-smoothing: grayscale; 19 | -webkit-tap-highlight-color: rgba(0,0,0,0); 20 | -webkit-text-size-adjust: 100%; 21 | -ms-text-size-adjust: 100%; 22 | color: #323232; 23 | } 24 | 25 | .clearfix { 26 | @include clearfix(); 27 | } 28 | 29 | *, *:after, *:before { 30 | @include box-sizing(border-box); 31 | } 32 | 33 | h1,h2,h3,h4,h5,h6,strong { 34 | font-weight: 700; 35 | } 36 | 37 | h1 { 38 | margin: .67em 0; 39 | font-size: 2em; 40 | } 41 | 42 | h2 { 43 | margin: .83em 0; 44 | font-size: 1.5em; 45 | } 46 | 47 | h3 { 48 | margin: 1em 0; 49 | font-size: 1.17em; 50 | } 51 | 52 | h4 { 53 | margin: 1.33em 0; 54 | font-size: 1em; 55 | } 56 | 57 | h5 { 58 | margin: 1.67em 0; 59 | font-size: .83em; 60 | } 61 | 62 | h6 { 63 | margin: 2.33em 0; 64 | font-size: .75em; 65 | } 66 | 67 | hr { 68 | height: 1px; 69 | border: none; 70 | display: inline-block; 71 | vertical-align: top; 72 | margin: 1em 0; 73 | background-color: rgba(0,0,0,0.2); 74 | width: 100%; 75 | } 76 | 77 | .container { 78 | margin: 5% auto 0; 79 | max-width: 1140px; 80 | width: 100%; 81 | } 82 | 83 | .center { 84 | padding: 0 2em; 85 | text-align: center; 86 | img { 87 | max-width: 100%; 88 | height: auto; 89 | } 90 | } 91 | 92 | .main-title { 93 | font-size: 3em; 94 | color: #6894d1; 95 | } 96 | 97 | .demo-dump { 98 | padding: 1em; 99 | } 100 | 101 | a { 102 | color: #c93742; 103 | } 104 | 105 | input, textarea, p { 106 | font: normal normal normal 1em 'Arial'; 107 | } 108 | 109 | input, textarea { 110 | outline: none; 111 | border: 1px solid #ccc; 112 | padding: 0.2em; 113 | background: white; 114 | } 115 | --------------------------------------------------------------------------------