├── .babelrc ├── .gitignore ├── LICENSE ├── README.md ├── _config.yml ├── _data └── meta.json ├── _includes ├── icons │ ├── facebook.html │ ├── github.html │ ├── hn.html │ ├── reddit.html │ ├── twitter.html │ └── whatsapp.html ├── partials │ ├── check.html │ ├── favicons.html │ ├── ga.html │ ├── gj.html │ ├── image.html │ ├── newsletter.html │ ├── panorama.html │ ├── share.html │ └── snippet.html └── snippets │ ├── snippet_array.md │ ├── snippet_array_alert.md │ ├── snippet_array_edit.md │ ├── snippet_array_includes.md │ ├── snippet_array_index.md │ ├── snippet_array_length.md │ ├── snippet_array_push.md │ ├── snippet_else_if.md │ ├── snippet_greet.md │ ├── snippet_hello_world.md │ ├── snippet_href.md │ ├── snippet_if.md │ ├── snippet_if_else.md │ ├── snippet_if_not.md │ ├── snippet_innerwidth.md │ ├── snippet_innerwidth_boolean.md │ ├── snippet_list.md │ ├── snippet_loop.md │ ├── snippet_loop_array.md │ ├── snippet_loop_foreach.md │ ├── snippet_numbers.md │ ├── snippet_omg.md │ ├── snippet_what_is_up.md │ └── snippet_what_is_up_length.md ├── _javascript └── main.js ├── _layouts └── default.html ├── _sass ├── content.sass ├── font.sass ├── highlight.sass ├── layout.sass ├── main.sass └── stamp.sass ├── css ├── main.css └── main.min.css ├── favicons ├── android-chrome-192x192.png ├── android-chrome-512x512.png ├── apple-touch-icon.png ├── browserconfig.xml ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon.ico ├── mstile-150x150.png ├── safari-pinned-tab.svg └── site.webmanifest ├── images ├── become_a_patron_button.png ├── become_a_patron_button@2x.png ├── become_a_patron_button@3x.png ├── bulma-free-css-framework-flexbox.png ├── bulma-free-css-framework-flexbox@2x.png ├── bulma-free-css-framework-flexbox@3x.png ├── bulma-modern-css-framework-flexbox.png ├── bulma-modern-css-framework-flexbox@2x.png ├── bulma-modern-css-framework-flexbox@3x.png ├── css-in-44-minutes-book-cover.png ├── css-in-44-minutes-book-cover@2x.png ├── css-in-44-minutes-book-cover@3x.png ├── css-in-44-minutes-html-css-ebook-tutorial.png ├── css-in-44-minutes-html-css-ebook-tutorial@2x.png ├── css-in-44-minutes-html-css-ebook-tutorial@3x.png ├── css-reference.png ├── css-reference@2x.png ├── css-reference@3x.png ├── html-reference.png ├── html-reference@2x.png ├── html-reference@3x.png ├── javascript-in-14-minutes.png ├── made-with-bulma.png ├── paypal.png ├── paypal@2x.png ├── paypal@3x.png ├── udemy-logo.png ├── udemy-logo@2x.png └── udemy-logo@3x.png ├── index.html ├── lib └── main.js ├── package.json └── vendor ├── bowser-1.9.3.min.js ├── clipboard-2.0.0.min.js ├── js.cookie-2.1.4.min.js └── lazyload-2.0.0-beta.2.min.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015-ie"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache/ 2 | _site/ 3 | 4 | .DS_Store 5 | .jekyll-metadata 6 | _config.local.yml 7 | node_modules 8 | npm-debug.log 9 | Thumbs.db 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Jeremy Thomas 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JavaScript in 14 minutes 2 | 3 | JavaScript in 14 minutes 4 | 5 | Learn the basics of JavaScript in 14 minutes with this interactive tutorial! 😃 6 | 7 | ## Copyright and license 8 | 9 | Code copyright 2018 Jeremy Thomas. 10 | 11 | The content of this project itself is licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). 12 | 13 | The underlying source code used to format and display that content is licensed under the [MIT license](https://opensource.org/licenses/mit-license.php). 14 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | url: https://jgthms.com/javascript-in-14-minutes 2 | 3 | -------------------------------------------------------------------------------- /_data/meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "JavaScript in 14 minutes", 3 | "description": "Learn the basics of JavaScript in 14 minutes with this interactive tutorial! 😃" 4 | } 5 | -------------------------------------------------------------------------------- /_includes/icons/facebook.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_includes/icons/github.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_includes/icons/hn.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_includes/icons/reddit.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_includes/icons/twitter.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_includes/icons/whatsapp.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_includes/partials/check.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | 7 | 8 |
9 | -------------------------------------------------------------------------------- /_includes/partials/favicons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /_includes/partials/ga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /_includes/partials/gj.html: -------------------------------------------------------------------------------- 1 | {% if include.title %} 2 |

{% include partials/check.html %} {{ include.title }}

3 | {% else %} 4 |

{% include partials/check.html %} Great job!

5 | {% endif %} 6 | -------------------------------------------------------------------------------- /_includes/partials/image.html: -------------------------------------------------------------------------------- 1 | {{ include.alt }} 9 | -------------------------------------------------------------------------------- /_includes/partials/newsletter.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Subscribe to my newsletter

4 |

And get notified when I launch other
free tutorials! 😃

5 |
6 |
7 |
8 |

Name

9 |
10 | 11 |
12 |
13 |
14 |

Email

15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 |
23 | 24 |
25 |
26 | 27 |
28 |
29 |

No spam of course! 😊

30 |
31 |
-------------------------------------------------------------------------------- /_includes/partials/panorama.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | {% include partials/image.html %} 4 | 5 |

6 | -------------------------------------------------------------------------------- /_includes/partials/share.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /_includes/partials/snippet.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ include.contents | markdownify }} 4 |
5 | {% unless include.skipRun %} 6 | 7 | Copy to clipboard 8 | 9 | {% endunless %} 10 |
11 | 12 | {% unless include.skipRun %} 13 |
14 | Run snippet 15 |
16 | {% endunless %} 17 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_array.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_array_alert.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | alert(my_things); 4 | ``` 5 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_array_edit.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | alert(my_things); 4 | my_things = [2 + 5, 'samurai', true, 'LOVE']; 5 | alert(my_things); 6 | ``` 7 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_array_includes.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | alert(my_things.includes('ninja')); 4 | ``` 5 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_array_index.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | alert(my_things[1]); 4 | ``` 5 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_array_length.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | alert(my_things.length); 4 | ``` 5 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_array_push.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | alert(my_things); 4 | my_things.push('The Button'); 5 | alert(my_things); 6 | ``` 7 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_else_if.md: -------------------------------------------------------------------------------- 1 | ```js 2 | if (window.innerWidth > 2000) { 3 | alert('Big screen! 🔥') 4 | } else if (window.innerWidth < 600) { 5 | alert('Probably a mobile phone 📱') 6 | } else { 7 | alert('Decent size 👍') 8 | } 9 | ``` 10 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_greet.md: -------------------------------------------------------------------------------- 1 | ```js 2 | function greet(name) { 3 | var message = 'Hey there ' + name; 4 | alert(message); 5 | } 6 | greet('Alex'); 7 | ``` 8 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_hello_world.md: -------------------------------------------------------------------------------- 1 | ```js 2 | alert('Hello World!') 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_href.md: -------------------------------------------------------------------------------- 1 | ```js 2 | alert(window.location.href) 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_if.md: -------------------------------------------------------------------------------- 1 | ```js 2 | if (window.location.hostname == 'jgthms.com') { 3 | alert('Welcome on my domain! 🤗') 4 | } 5 | ``` 6 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_if_else.md: -------------------------------------------------------------------------------- 1 | ```js 2 | if (window.location.hostname == 'jgthms.com') { 3 | alert('Welcome on my domain! 🤗') 4 | } else { 5 | alert('Please come back soon! 😉') 6 | } 7 | ``` 8 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_if_not.md: -------------------------------------------------------------------------------- 1 | ```js 2 | if (window.location.hostname != 'jgthms.com') { 3 | alert('Please come back soon! 😉') 4 | } 5 | ``` 6 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_innerwidth.md: -------------------------------------------------------------------------------- 1 | ```js 2 | alert(window.innerWidth) 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_innerwidth_boolean.md: -------------------------------------------------------------------------------- 1 | ```js 2 | alert(window.innerWidth > 400) 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_list.md: -------------------------------------------------------------------------------- 1 | ```js 2 | alert([2 + 5, 'samurai', true]) 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_loop.md: -------------------------------------------------------------------------------- 1 | ```js 2 | for (var i = 0; i < 3; i++) { 3 | alert(i); 4 | } 5 | ``` 6 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_loop_array.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | for (var i = 0; i < my_things.length; i++) { 4 | alert(my_things[i]); 5 | } 6 | ``` 7 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_loop_foreach.md: -------------------------------------------------------------------------------- 1 | ```js 2 | var my_things = [2 + 5, 'samurai', true]; 3 | my_things.forEach(function(item) { 4 | alert(item); 5 | }); 6 | ``` 7 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_numbers.md: -------------------------------------------------------------------------------- 1 | ```js 2 | alert(9+5 * 3) 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_omg.md: -------------------------------------------------------------------------------- 1 | ```js 2 | window.alert('OMG') 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_what_is_up.md: -------------------------------------------------------------------------------- 1 | ```js 2 | alert(['What', 'is', 'up']) 3 | ``` 4 | -------------------------------------------------------------------------------- /_includes/snippets/snippet_what_is_up_length.md: -------------------------------------------------------------------------------- 1 | ```js 2 | alert(['What', 'is', 'up'].length) 3 | ``` 4 | -------------------------------------------------------------------------------- /_javascript/main.js: -------------------------------------------------------------------------------- 1 | var memory = Cookies.getJSON('memory') || {}; 2 | 3 | var html_el = document.documentElement; 4 | var platform_el = document.getElementById('platform'); 5 | var os_el = document.getElementById('os'); 6 | var browser_el = document.getElementById('browser'); 7 | var browser_width_el = document.getElementById('browserWidth'); 8 | var wider_el = document.getElementById('wider'); 9 | var return_el = document.getElementById('return'); 10 | var resume_el = document.getElementById('resume'); 11 | var reset_el = document.getElementById('reset'); 12 | 13 | var state = { 14 | current_step: 0, 15 | platform: '', 16 | browser: '', 17 | os: '' 18 | }; 19 | 20 | window.old_alert = window.alert; 21 | window.alert = function(str) { 22 | window.old_alert.apply(this, arguments); 23 | var function_to_call = `checkStep${state.current_step}`; 24 | if (window[function_to_call]) { 25 | window[function_to_call](str); 26 | } 27 | }; 28 | 29 | function checkStep1(str) { 30 | if (str == 'Hello World!') { 31 | return showStep(2); 32 | } else if (str.toLowerCase() == 'hello world!') { 33 | return console.log( 34 | 'Watch out! In JavaScript, uppercase and lowercase letters are different. Make sure all letters have the proper case.' 35 | ); 36 | } 37 | console.log('Please type the correct string.'); 38 | } 39 | 40 | function checkStep5(str) { 41 | if (str == 24) { 42 | return showStep(6); 43 | } 44 | console.log('Try again!'); 45 | } 46 | 47 | function checkStep7(str) { 48 | if (str == window.innerWidth) { 49 | browser_width_el.innerHTML = window.innerWidth; 50 | return showStep(8); 51 | } 52 | console.log(`The answer should be ${window.innerWidth}!`); 53 | } 54 | 55 | function checkStep10(str) { 56 | if (str == window.location.href) { 57 | return showStep(11); 58 | } 59 | } 60 | 61 | function checkStep12(str) { 62 | if (str == 'OMG') { 63 | return showStep(13); 64 | } 65 | } 66 | 67 | function checkStep14(str) { 68 | if (str == 'What,is,up') { 69 | return showStep(15); 70 | } 71 | } 72 | 73 | function checkStep15(str) { 74 | if (str == '7,samurai,true') { 75 | return showStep(16); 76 | } 77 | } 78 | 79 | function checkStep18(str) { 80 | if (!state.desktop) { 81 | return showStep(19); 82 | } else if (typeof my_things == 'undefined') { 83 | return console.log('Please create an array called "my_things".'); 84 | } else if (str == my_things) { 85 | return showStep(19); 86 | } 87 | } 88 | 89 | function checkStep19(str) { 90 | if (!state.desktop) { 91 | return showStep(20); 92 | } else if (typeof my_things == 'undefined') { 93 | return console.log('Please create an array called "my_things".'); 94 | } else if (my_things.length < 2) { 95 | return console.log('Please create an array with at least 2 items.'); 96 | } else if (str != my_things[1]) { 97 | return console.log('Please choose the item at index 1.'); 98 | } else if (str == my_things[1]) { 99 | return showStep(20); 100 | } 101 | console.log( 102 | 'Please create an array called "my_things" and choose the item at index 1.' 103 | ); 104 | } 105 | 106 | function checkStep20(str) { 107 | if (!state.desktop) { 108 | return showStep(21); 109 | } else if (typeof my_things == 'undefined') { 110 | return console.log('Please create an array called "my_things".'); 111 | } else if (str == my_things.length) { 112 | return showStep(21); 113 | } 114 | console.log('Please create an array called "my_things".'); 115 | } 116 | 117 | function checkStep21(str) { 118 | if (!state.desktop) { 119 | return showStep(22); 120 | } else if (typeof my_things == 'undefined') { 121 | return console.log('Please create an array called "my_things".'); 122 | } else if (str == '7,samurai,true') { 123 | return; 124 | } else if (str == '7,samurai,true,LOVE') { 125 | return showStep(22); 126 | } 127 | console.log( 128 | 'Please create an array called "my_things" and add the string "LOVE".' 129 | ); 130 | } 131 | 132 | function checkStep22(str) { 133 | if (!state.desktop) { 134 | return showStep(23); 135 | } else if (typeof my_things == 'undefined') { 136 | return console.log('Please create an array called "my_things".'); 137 | } else if (str == '7,samurai,true') { 138 | return; 139 | } else if (str == '7,samurai,true,The Button') { 140 | return showStep(23); 141 | } 142 | console.log( 143 | 'Please create an array called "my_things" and add the string "The Button".' 144 | ); 145 | } 146 | 147 | function checkStep23(str) { 148 | if (!state.desktop) { 149 | return showStep(24); 150 | } else if (typeof my_things == 'undefined') { 151 | return console.log('Please create an array called "my_things".'); 152 | } else if (str == true) { 153 | return console.log('Please test for an element that is NOT in the array.'); 154 | } else if (str == false) { 155 | return showStep(24); 156 | } 157 | console.log( 158 | 'Please create an array called "my_things" and call the method "includes()".' 159 | ); 160 | } 161 | 162 | function checkStep24(str) { 163 | if (str == window.innerWidth > 400) { 164 | var displaying = window.innerWidth > 400 ? 'none' : 'inline'; 165 | wider.style.display = displaying; 166 | return showStep(25); 167 | } 168 | console.log('Try again!'); 169 | } 170 | 171 | function checkStep26(str) { 172 | if (str.startsWith('Welcome on my domain')) { 173 | return showStep(27); 174 | } 175 | console.log('Try again!'); 176 | } 177 | 178 | function checkStep27(str) { 179 | if (str.startsWith('Welcome on my domain')) { 180 | return showStep(28); 181 | } else if (str.startsWith('Please come back soon')) { 182 | return console.log('Make sure you use the "==" operator.'); 183 | } 184 | console.log('Try again!'); 185 | } 186 | 187 | function checkStep28(str) { 188 | if ( 189 | (window.innerWidth > 2000 && str.startsWith('Big screen')) || 190 | (window.innerWidth < 600 && str.startsWith('Probably a mobile phone')) 191 | ) { 192 | return showStep(29); 193 | } else if (str.startsWith('Decent size')) { 194 | return showStep(29); 195 | } 196 | console.log('Make sure you type all statements in the correct order.'); 197 | } 198 | 199 | function checkStep30(str) { 200 | if (str == '0' || str == '1') { 201 | return; 202 | } else if (str == '2') { 203 | return showStep(31); 204 | } 205 | console.log('Try again!'); 206 | } 207 | 208 | function checkArrayLoop(str, nextStep) { 209 | if (!state.desktop) { 210 | return showStep(nextStep); 211 | } else if (typeof my_things == 'undefined') { 212 | return console.log('Please create an array called "my_things".'); 213 | } else if (my_things.length < 2) { 214 | return console.log('Please create an array with at least 2 items.'); 215 | } else if (str == my_things[my_things.length - 1]) { 216 | return showStep(nextStep); 217 | } else if (my_things.includes(str)) { 218 | return; 219 | } 220 | console.log('Please create an array called "my_things" and loop through it.'); 221 | } 222 | 223 | function checkStep32(str) { 224 | checkArrayLoop(str, 33); 225 | } 226 | 227 | function checkStep34(str) { 228 | checkArrayLoop(str, 35); 229 | } 230 | 231 | function checkStep36(str) { 232 | if (!state.desktop) { 233 | return showStep(37); 234 | } else if (typeof greet == 'undefined') { 235 | return console.log('Please create a function called "greet".'); 236 | } else if (str.startsWith('Hey there ')) { 237 | return showStep(37); 238 | } 239 | console.log( 240 | 'Please create a function called "greet" and call it with the parameter \'Alex\'.' 241 | ); 242 | } 243 | 244 | function showStep(num, skipSave = false) { 245 | showElement(`step${num}`); 246 | state.current_step = num; 247 | 248 | return_el.classList.remove('is-active'); 249 | 250 | if (!skipSave) { 251 | memory['latest_step'] = num; 252 | Cookies.set('memory', memory); 253 | } 254 | 255 | if (num == 3) { 256 | showSide('sides'); 257 | showSide('sideConcepts'); 258 | showSide('sideFunctions'); 259 | } else if (num == 4) { 260 | showSide('sideTypes'); 261 | showSide('sideStrings'); 262 | } else if (num == 5) { 263 | showSide('sideNumbers'); 264 | } else if (num == 9) { 265 | showSide('sideObjects'); 266 | } else if (num == 14) { 267 | showSide('sideArrays'); 268 | } else if (num == 17) { 269 | showSide('sideBooleans'); 270 | } else if (num == 18) { 271 | showSide('sideVariables'); 272 | } else if (num == 26) { 273 | showSide('sideConditionals'); 274 | } else if (num == 30) { 275 | showSide('sideLoops'); 276 | } 277 | } 278 | 279 | function showElement(id) { 280 | var el = document.getElementById(id); 281 | if (el) { 282 | el.classList.add('is-active'); 283 | el.scrollIntoView(true); 284 | } 285 | } 286 | 287 | function showSide(id) { 288 | var el = document.getElementById(id); 289 | if (el) { 290 | el.classList.add('is-active'); 291 | } 292 | } 293 | 294 | function runSnippet() { 295 | var els = document.querySelectorAll('.run-snippet'); 296 | if (els.length > 0) { 297 | els.forEach(el => { 298 | var snippet_contents = 299 | el.previousElementSibling.firstElementChild.firstElementChild 300 | .firstElementChild.firstElementChild; 301 | var snippet_code = snippet_contents.outerText; 302 | var run_button = el.querySelector('a'); 303 | run_button.addEventListener('click', () => { 304 | eval(snippet_code); 305 | }); 306 | }); 307 | } 308 | } 309 | 310 | function detectPlatform() { 311 | state.mobile = bowser.mobile || false; 312 | state.tablet = bowser.tablet || false; 313 | state.desktop = !state.mobile && !state.tablet; 314 | 315 | if (state.mobile) { 316 | state.platform = 'mobile'; 317 | } else if (state.tablet) { 318 | state.platform = 'tablet'; 319 | } else if (state.desktop) { 320 | state.platform = 'desktop'; 321 | } 322 | 323 | if (bowser.chrome || bowser.chromium) { 324 | state.browser = 'chrome'; 325 | } else if (bowser.firefox) { 326 | state.browser = 'firefox'; 327 | } else if (bowser.msedge) { 328 | state.browser = 'edge'; 329 | } else if (bowser.safari) { 330 | state.browser = 'safari'; 331 | } else if (bowser.opera) { 332 | state.browser = 'opera'; 333 | } 334 | 335 | if (bowser.mac) { 336 | state.os = 'mac'; 337 | } else if (bowser.windows) { 338 | state.os = 'windows'; 339 | } else if (bowser.linux) { 340 | state.os = 'linux'; 341 | } 342 | 343 | os_el.value = state.os; 344 | browser_el.value = state.browser; 345 | setPlatform(); 346 | } 347 | 348 | function setPlatform() { 349 | html_el.className = ''; 350 | html_el.classList.add(`case-${state.platform}`); 351 | html_el.classList.add(`case-${state.browser}`); 352 | html_el.classList.add(`case-${state.os}`); 353 | } 354 | 355 | function jumpToStep(num) { 356 | for (var i = 1; i <= num; i++) { 357 | showStep(i, true); 358 | } 359 | } 360 | 361 | function resetSteps() { 362 | return_el.classList.remove('is-active'); 363 | window.scrollTo(0, 0); 364 | memory = {}; 365 | Cookies.remove('memory'); 366 | } 367 | 368 | document.addEventListener('DOMContentLoaded', () => { 369 | detectPlatform(); 370 | runSnippet(); 371 | 372 | os_el.addEventListener('change', event => { 373 | state.os = event.target.value; 374 | setPlatform(); 375 | }); 376 | 377 | browser_el.addEventListener('change', event => { 378 | state.browser = event.target.value; 379 | setPlatform(); 380 | }); 381 | 382 | resume_el.addEventListener('click', event => { 383 | jumpToStep(memory.latest_step); 384 | }); 385 | 386 | reset_el.addEventListener('click', event => { 387 | var answer = confirm('Are you sure?'); 388 | if (answer == true) { 389 | resetSteps(); 390 | } 391 | }); 392 | 393 | if (memory && memory.hasOwnProperty('latest_step')) { 394 | return_el.classList.add('is-active'); 395 | } 396 | 397 | new ClipboardJS('.snippet-copy', { 398 | target: trigger => { 399 | return trigger.previousElementSibling.firstElementChild.firstElementChild 400 | .firstElementChild.firstElementChild; 401 | } 402 | }); 403 | }); 404 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ site.data.meta.title }} by Jeremy Thomas 8 | 9 | {% include partials/share.html %} 10 | {% include partials/favicons.html %} 11 | {% include partials/ga.html %} 12 | 13 | 14 |
15 | {{ content }} 16 |
17 | 18 | 19 | 20 | 21 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /_sass/content.sass: -------------------------------------------------------------------------------- 1 | .title, 2 | .subtitle, 3 | .content h2, 4 | .content h3, 5 | .button, 6 | .label, 7 | .share, 8 | .stab::before, 9 | .snippet-copy, 10 | .side 11 | font-family: "Archia", sans-serif 12 | font-weight: 600 13 | 14 | .title 15 | font-size: 1.875rem 16 | 17 | .title:not(.is-spaced) + .subtitle 18 | margin-top: -1.25rem 19 | 20 | .share em, 21 | .subtitle 22 | font-weight: 400 23 | 24 | .subtitle a 25 | color: $red 26 | &:hover 27 | color: $text-strong 28 | 29 | .sides, 30 | .message-body, 31 | .panorama 32 | box-shadow: 0 2rem 4rem -1rem rgba(0, 0, 0, 0.2) 33 | 34 | .message a:not(.button):not(.tag) 35 | border-bottom: 2px solid rgba(#000, 0.1) 36 | text-decoration: none 37 | &:hover 38 | border-bottom-color: currentColor 39 | 40 | .message-body 41 | border-width: 0 0 0 5px 42 | p:not(:last-child) 43 | margin-bottom: 0.5em 44 | 45 | #return 46 | display: none 47 | &.is-active 48 | display: block 49 | 50 | .table-container 51 | @extend .block 52 | +overflow-touch 53 | overflow: auto 54 | overflow-y: hidden 55 | max-width: 100% 56 | 57 | .stabs 58 | @extend .block 59 | border: 1px solid $border 60 | box-shadow: 0 0 0 5px $hl-background 61 | border-radius: 5px 62 | counter-reset: stabs 63 | &.is-vertical .stab .stabilo 64 | white-space: normal 65 | 66 | .stab 67 | box-shadow: inset 0 -5px 10px $hl-background 68 | counter-increment: stabs 69 | display: flex 70 | flex-direction: column 71 | padding: 1em 72 | position: relative 73 | width: 100% 74 | &:not(:last-child) 75 | border-bottom: 1px solid $border 76 | &::before 77 | content: counter(stabs) 78 | font-size: 0.875em 79 | line-height: 1.5rem 80 | opacity: 0.5 81 | position: absolute 82 | right: calc(100% + 1em) 83 | top: 1rem 84 | 85 | .stab-label 86 | flex-grow: 1 87 | flex-shrink: 1 88 | font-size: 0.875em 89 | padding-right: 1em 90 | 91 | .stab-code 92 | flex-grow: 0 93 | flex-shrink: 0 94 | 95 | +from(600px) 96 | .stabs:not(.is-vertical) .stab 97 | flex-direction: row 98 | 99 | .shares 100 | align-items: stretch 101 | display: flex 102 | flex-wrap: wrap 103 | justify-content: space-between 104 | margin-bottom: 1.5rem 105 | margin-top: 1.5rem 106 | 107 | $html: #ff470f 108 | $css: #00d1b2 109 | $github: #333 110 | $facebook: #3b5998 111 | $twitter: #55acee 112 | $whatsapp: #25d366 113 | $patreon: #f96854 114 | $paypal: #012169 115 | $fortyfour: #5f45bb 116 | $bulma: #00d1b2 117 | $udemy: #ec5252 118 | $hn: #ff6600 119 | $reddit: #5f99cf 120 | 121 | \:root 122 | --html: $html 123 | --css: $css 124 | --github: $github 125 | --facebook: $facebook 126 | --twitter: $twitter 127 | --whatsapp: $whatsapp 128 | --patreon: $patreon 129 | --paypal: $paypal 130 | --fortyfour: $fortyfour 131 | --bulma: $bulma 132 | --udemy: $udemy 133 | --hn: $hn 134 | --reddit: $reddit 135 | 136 | .share 137 | border-radius: 5px 138 | color: var(--brand) 139 | margin-bottom: 1rem 140 | padding: 1.5em 0 1.75em 141 | position: relative 142 | text-align: center 143 | transition-duration: 200ms 144 | transition-property: background-color 145 | width: calc(50% - 0.5rem) 146 | &::before 147 | +overlay 148 | border: 3px solid var(--brand) 149 | border-radius: 5px 150 | content: "" 151 | opacity: 0.1 152 | span 153 | display: block 154 | svg 155 | height: 2em 156 | width: 2em 157 | path 158 | fill: currentColor 159 | em 160 | font-size: 0.75em 161 | font-style: normal 162 | opacity: 0.5 163 | position: relative 164 | strong 165 | display: block 166 | position: relative 167 | &:hover 168 | background-color: var(--brand) 169 | color: $white 170 | &.is-html 171 | --brand: var(--html) 172 | &.is-css 173 | --brand: var(--css) 174 | &.is-github 175 | --brand: var(--github) 176 | &.is-facebook 177 | --brand: var(--facebook) 178 | &.is-twitter 179 | --brand: var(--twitter) 180 | &.is-whatsapp 181 | --brand: var(--whatsapp) 182 | &.is-paypal 183 | --brand: var(--paypal) 184 | &.is-patreon 185 | --brand: var(--patreon) 186 | &.is-fortyfour 187 | --brand: var(--fortyfour) 188 | width: auto 189 | &.is-bulma 190 | --brand: var(--bulma) 191 | width: auto 192 | &.is-hn 193 | --brand: var(--hn) 194 | margin-bottom: 0 195 | &.is-reddit 196 | --brand: var(--reddit) 197 | margin-bottom: 0 198 | &.is-html, 199 | &.is-css, 200 | &.is-paypal 201 | &:hover 202 | img 203 | mix-blend-mode: screen 204 | &.is-patreon, 205 | &.is-paypal 206 | width: 100% 207 | em 208 | font-size: 1em 209 | strong 210 | display: inline 211 | &.is-udemy 212 | padding-bottom: 1em 213 | padding-top: 0 214 | em 215 | color: $text-light 216 | opacity: 1 217 | &:hover 218 | background-color: $background 219 | color: $text-strong 220 | &.is-udemy-advanced 221 | width: 100% 222 | 223 | .content 224 | kbd 225 | -moz-osx-font-smoothing: auto 226 | -webkit-font-smoothing: auto 227 | font-family: monospace 228 | font-size: 0.875em 229 | font-weight: normal 230 | &.key 231 | background-color: $background 232 | border: 1px solid $border 233 | border-radius: 3px 234 | box-shadow: 0 1px 0 rgba($black, 0.2), inset 0 0 0 1px $white 235 | color: $purple 236 | padding: 0.25em 0.5em 0.25em 237 | h2 238 | font-size: 1.5em 239 | padding-top: 0 240 | position: relative 241 | h3 242 | color: $red 243 | font-size: 1.125em 244 | margin: 1em 0 245 | table 246 | border: 1px solid $border 247 | pre 248 | padding: 1.25rem 1.5rem 249 | p, 250 | li 251 | a 252 | border-bottom: 2px solid rgba($blue, 0.1) 253 | padding-bottom: 2px 254 | &:hover 255 | border-bottom-color: $blue 256 | &[target="_blank"] 257 | &::after 258 | content: "↗️" 259 | font-size: 0.75em 260 | margin-left: 0.5em 261 | margin-right: 0.25em 262 | .label 263 | font-size: 0.875em 264 | &:not(:last-child) 265 | margin-bottom: 0.5em 266 | .focus 267 | margin: 2em 0 268 | text-align: center 269 | a 270 | display: inline-block 271 | vertical-align: top 272 | &[target="_blank"]::after 273 | display: none 274 | &.share 275 | border-bottom: none 276 | width: 100% 277 | .madeby 278 | color: $text-light 279 | font-size: 0.875em 280 | a[target="_blank"]::after 281 | content: "❤️" 282 | .panorama 283 | display: block 284 | margin-bottom: 3rem 285 | img 286 | display: block 287 | .stabilo 288 | background-color: transparent 289 | color: $border 290 | white-space: nowrap 291 | span 292 | background-color: $hl-background 293 | &.is-blue 294 | color: $hl-blue 295 | &.is-black 296 | color: $hl-black 297 | &.is-green 298 | color: $hl-green 299 | &.is-red 300 | color: $hl-red 301 | &.is-purple 302 | color: $hl-purple 303 | .newsletter 304 | background-color: $jt 305 | border-radius: 5px 306 | margin-bottom: 1.5rem 307 | padding: 2rem 308 | h3 309 | margin-top: 0 310 | .help 311 | em 312 | color: rgba($black, 0.5) 313 | font-style: normal 314 | 315 | @keyframes blink 316 | from 317 | background-color: lightyellow 318 | to 319 | background-color: transparent 320 | -------------------------------------------------------------------------------- /_sass/font.sass: -------------------------------------------------------------------------------- 1 | @font-face 2 | font-family: 'Archia' 3 | src: url('https://jgthms.com/fonts/archia-regular-webfont.eot') 4 | src: url('https://jgthms.com/fonts/archia-regular-webfont.eot?#iefix') format('embedded-opentype'), url('https://jgthms.com/fonts/archia-regular-webfont.woff2') format('woff2'), url('https://jgthms.com/fonts/archia-regular-webfont.woff') format('woff'), url('https://jgthms.com/fonts/archia-regular-webfont.ttf') format('truetype') 5 | font-weight: 400 6 | font-style: normal 7 | 8 | @font-face 9 | font-family: 'Archia' 10 | src: url('https://jgthms.com/fonts/archia-semibold-webfont.eot') 11 | src: url('https://jgthms.com/fonts/archia-semibold-webfont.eot?#iefix') format('embedded-opentype'), url('https://jgthms.com/fonts/archia-semibold-webfont.woff2') format('woff2'), url('https://jgthms.com/fonts/archia-semibold-webfont.woff') format('woff'), url('https://jgthms.com/fonts/archia-semibold-webfont.ttf') format('truetype') 12 | font-weight: 600 13 | font-style: normal 14 | -------------------------------------------------------------------------------- /_sass/highlight.sass: -------------------------------------------------------------------------------- 1 | .highlight 2 | background-color: $hl-background 3 | border-radius: 3px 4 | 5 | .highlight .highlight 6 | background: none 7 | color: orange 8 | .kd 9 | color: $hl-purple 10 | // 400 11 | .mi 12 | color: $hl-red 13 | .nx 14 | color: $hl-blue 15 | .p 16 | color: $hl-black 17 | .s1 18 | color: $hl-green 19 | // window 20 | .nb 21 | color: $hl-blue 22 | // > 23 | .o 24 | color: $hl-purple 25 | // true 26 | .kc 27 | color: $hl-purple 28 | // if 29 | .k 30 | color: $hl-purple 31 | -------------------------------------------------------------------------------- /_sass/layout.sass: -------------------------------------------------------------------------------- 1 | body 2 | padding-bottom: 50vh 3 | 4 | .main 5 | margin-left: auto 6 | margin-right: auto 7 | max-width: 29rem 8 | 9 | .snippet 10 | @extend .block 11 | position: relative 12 | 13 | .snippet-copy 14 | color: $hl-grey 15 | font-size: 0.75em 16 | white-space: nowrap 17 | 18 | +until(700px) 19 | .snippet-contents 20 | margin-bottom: 0.5rem 21 | 22 | +from(700px) 23 | .snippet 24 | margin-left: -1.5rem 25 | margin-right: -1.5rem 26 | .snippet-copy 27 | left: calc(100% + 1.5rem) 28 | position: absolute 29 | top: 21px 30 | 31 | $spacing: 2rem 32 | 33 | .header 34 | padding: $spacing 35 | 36 | .step 37 | padding: $spacing 38 | 39 | #step39 40 | text-align: center 41 | .newsletter-content 42 | text-align: left 43 | 44 | .status 45 | margin-bottom: 1.5rem 46 | 47 | .detect 48 | @extend .block 49 | background-color: $background 50 | border-radius: 3px 51 | padding: 1.25em 1.5em 52 | 53 | .instructions 54 | @extend .block 55 | 56 | .fourteen 57 | align-items: flex-end 58 | // background-color: #F7DF1E 59 | background-color: $s-yellow 60 | color: #000 61 | display: inline-flex 62 | height: 4rem 63 | justify-content: flex-end 64 | padding-right: 2px 65 | width: 4rem 66 | 67 | .button 68 | -moz-appearance: none 69 | -webkit-appearance: none 70 | background-color: $hl-blue 71 | border: none 72 | border-radius: 3px 73 | color: $white 74 | cursor: pointer 75 | display: inline-block 76 | font-size: 1rem 77 | padding: 0.5em 1em 78 | vertical-align: top 79 | 80 | .gj 81 | min-height: 40px 82 | position: relative 83 | 84 | %animate 85 | animation-fill-mode: both 86 | 87 | .check 88 | align-items: center 89 | animation-delay: 1.2s 90 | animation-duration: 0.29s 91 | animation-name: scale 92 | animation-timing-function: ease-in-out 93 | display: flex 94 | height: 40px 95 | justify-content: center 96 | transform-origin: center 97 | width: 40px 98 | 99 | +until(700px) 100 | .check 101 | margin-bottom: 10px 102 | 103 | $offset: 0 104 | 105 | +from(700px) 106 | .check, 107 | .content h2 .stamp 108 | position: absolute 109 | right: calc(100% + 1rem) 110 | .check 111 | top: -5px + $offset 112 | .content h2 .stamp 113 | top: 3px + $offset 114 | 115 | .check-circle 116 | animation-duration: 1s 117 | animation-fill-mode: both 118 | animation-name: bounce 119 | animation-timing-function: cubic-bezier(0,1,.6,1.08) 120 | background-color: $s-green 121 | border-radius: 290486px 122 | height: 40px 123 | position: absolute 124 | transform-origin: center 125 | width: 40px 126 | 127 | .check-svg 128 | position: absolute 129 | svg 130 | dipslay: block 131 | polyline 132 | animation-delay: 0.25s 133 | animation-duration: 0.5s 134 | animation-fill-mode: forwards 135 | animation-name: fill 136 | stroke-dasharray: 26 137 | stroke-dashoffset: 26 138 | 139 | @keyframes bounce 140 | from 141 | transform: scale(0) 142 | to 143 | transform: scale(1) 144 | 145 | @keyframes fill 146 | to 147 | stroke-dashoffset: 0 148 | 149 | @keyframes scale 150 | 0%, 151 | 100% 152 | transform: scale(1) 153 | 50% 154 | transform: scale(1.1) 155 | 156 | .sides 157 | animation-duration: 500ms 158 | animation-fill-mode: both 159 | background-color: $white 160 | border-radius: 5px 161 | bottom: 5vw 162 | display: none 163 | padding: 1rem 164 | padding-right: 2rem 165 | position: fixed 166 | right: 5vw 167 | transform-origin: bottom right 168 | width: 10rem 169 | z-index: 10 170 | &.is-active 171 | animation-name: bounce 172 | display: block 173 | 174 | +until(1000px) 175 | .sides 176 | &, 177 | &.is-active 178 | display: none 179 | 180 | .side 181 | display: none 182 | white-space: nowrap 183 | &.is-active 184 | display: block 185 | 186 | .side-title 187 | font-size: 1.5rem 188 | 189 | .side-item 190 | animation-duration: 1s 191 | color: $text-strong 192 | display: none 193 | font-size: 0.875rem 194 | padding: 0.25em 0.5em 195 | &.is-active 196 | animation-name: blink 197 | display: block 198 | 199 | // State 200 | 201 | .step 202 | animation-duration: 1s 203 | display: none 204 | &.is-active 205 | animation-name: blink 206 | display: block 207 | 208 | .thing 209 | display: none 210 | &.is-active 211 | display: block 212 | 213 | .case 214 | display: none 215 | 216 | $cases: "mobile" "tablet" "desktop" "windows" "mac" "linux" "chrome" "firefox" "safari" "edge" "opera" 217 | 218 | div.case 219 | @extend .block 220 | 221 | @each $case in $cases 222 | html.case-#{$case} div.case.is-#{$case} 223 | display: block 224 | html.case-#{$case} span.case.is-#{$case} 225 | display: inline 226 | html.case-#{$case} .not-#{$case} 227 | display: none !important 228 | -------------------------------------------------------------------------------- /_sass/main.sass: -------------------------------------------------------------------------------- 1 | @charset "utf-8" 2 | 3 | @import "../node_modules/bulma/sass/utilities/initial-variables" 4 | @import "../node_modules/bulma/sass/utilities/_all" 5 | @import "../node_modules/bulma/sass/base/_all" 6 | @import "../node_modules/bulma/sass/elements/content" 7 | @import "../node_modules/bulma/sass/elements/form" 8 | @import "../node_modules/bulma/sass/elements/title" 9 | @import "../node_modules/bulma/sass/components/message" 10 | 11 | .block 12 | +block 13 | 14 | $hl-background: #f3f5f6 15 | $hl-black: #39464e 16 | $hl-blue: #2795ee 17 | $hl-green: #249d7f 18 | $hl-purple: #a151d2 19 | $hl-orange: #f18c16 20 | $hl-red: #ed5c65 21 | $hl-grey: #909197 22 | 23 | $jt: #fff8f1 24 | 25 | $s-green: #87FFE1 26 | $s-blue: #A8D8FF 27 | $s-red: #FFB0B5 28 | $s-purple: #EAC9FF 29 | $s-yellow: #FFE270 30 | $s-orange: #FFA270 31 | 32 | =selection($current-selector: false) 33 | @if $current-selector 34 | &::-moz-selection 35 | @content 36 | &::selection 37 | @content 38 | @else 39 | \::-moz-selection 40 | @content 41 | \::selection 42 | @content 43 | 44 | +selection 45 | background-color: $s-yellow 46 | 47 | @import "font" 48 | @import "layout" 49 | @import "stamp" 50 | @import "content" 51 | @import "highlight" 52 | -------------------------------------------------------------------------------- /_sass/stamp.sass: -------------------------------------------------------------------------------- 1 | .stamp 2 | border-radius: 2px 3 | color: rgba($black, 0.6) 4 | font-size: 0.875rem 5 | line-height: 1 6 | padding: 0.25em 0.5em 7 | padding-top: calc(0.25em + 1px) 8 | vertical-align: middle 9 | &.is-type 10 | background-color: $s-orange 11 | &.is-tool 12 | background-color: $s-purple 13 | &.is-info 14 | background-color: $s-blue 15 | &.is-concept 16 | background-color: $s-yellow 17 | &.is-victory 18 | background-color: $s-green 19 | -------------------------------------------------------------------------------- /css/main.min.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8";@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}} 2 | 3 | /*! minireset.css v0.0.2 | MIT License | github.com/jgthms/minireset.css */blockquote,body,dd,dl,dt,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,html,iframe,legend,li,ol,p,pre,textarea,ul{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}ul{list-style:none}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}audio,embed,img,object,video{max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0;text-align:left}html{background-color:#fff;font-size:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;min-width:300px;overflow-x:hidden;overflow-y:scroll;text-rendering:optimizeLegibility;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}article,aside,figure,footer,header,hgroup,section{display:block}body,button,input,select,textarea{font-family:BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif}code,pre{-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;font-family:monospace}body{color:#4a4a4a;font-size:1rem;font-weight:400;line-height:1.5}a{color:#3273dc;cursor:pointer;text-decoration:none}a strong{color:currentColor}a:hover{color:#363636}code{background-color:#f5f5f5;color:#ff3860;font-size:.875em;font-weight:400;padding:.25em .5em}hr{background-color:#dbdbdb;border:none;display:block;height:1px;margin:1.5rem 0}img{height:auto;max-width:100%}input[type=checkbox],input[type=radio]{vertical-align:baseline}small{font-size:.875em}span{font-style:inherit;font-weight:inherit}strong{color:#363636;font-weight:700}pre{-webkit-overflow-scrolling:touch;background-color:#f5f5f5;color:#4a4a4a;font-size:.875em;overflow-x:auto;padding:1.25rem 1.5rem;white-space:pre;word-wrap:normal}pre code{background-color:transparent;color:currentColor;font-size:1em;padding:0}table td,table th{text-align:left;vertical-align:top}table th{color:#363636}.is-clearfix:after{clear:both;content:" ";display:table}.is-pulled-left{float:left!important}.is-pulled-right{float:right!important}.is-clipped{overflow:hidden!important}.is-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.is-size-1{font-size:3rem!important}.is-size-2{font-size:2.5rem!important}.is-size-3{font-size:2rem!important}.is-size-4{font-size:1.5rem!important}.is-size-5{font-size:1.25rem!important}.is-size-6{font-size:1rem!important}.is-size-7{font-size:.75rem!important}@media screen and (max-width:768px){.is-size-1-mobile{font-size:3rem!important}.is-size-2-mobile{font-size:2.5rem!important}.is-size-3-mobile{font-size:2rem!important}.is-size-4-mobile{font-size:1.5rem!important}.is-size-5-mobile{font-size:1.25rem!important}.is-size-6-mobile{font-size:1rem!important}.is-size-7-mobile{font-size:.75rem!important}}@media print,screen and (min-width:769px){.is-size-1-tablet{font-size:3rem!important}.is-size-2-tablet{font-size:2.5rem!important}.is-size-3-tablet{font-size:2rem!important}.is-size-4-tablet{font-size:1.5rem!important}.is-size-5-tablet{font-size:1.25rem!important}.is-size-6-tablet{font-size:1rem!important}.is-size-7-tablet{font-size:.75rem!important}}@media screen and (max-width:1023px){.is-size-1-touch{font-size:3rem!important}.is-size-2-touch{font-size:2.5rem!important}.is-size-3-touch{font-size:2rem!important}.is-size-4-touch{font-size:1.5rem!important}.is-size-5-touch{font-size:1.25rem!important}.is-size-6-touch{font-size:1rem!important}.is-size-7-touch{font-size:.75rem!important}}@media screen and (min-width:1024px){.is-size-1-desktop{font-size:3rem!important}.is-size-2-desktop{font-size:2.5rem!important}.is-size-3-desktop{font-size:2rem!important}.is-size-4-desktop{font-size:1.5rem!important}.is-size-5-desktop{font-size:1.25rem!important}.is-size-6-desktop{font-size:1rem!important}.is-size-7-desktop{font-size:.75rem!important}}@media screen and (min-width:1216px){.is-size-1-widescreen{font-size:3rem!important}.is-size-2-widescreen{font-size:2.5rem!important}.is-size-3-widescreen{font-size:2rem!important}.is-size-4-widescreen{font-size:1.5rem!important}.is-size-5-widescreen{font-size:1.25rem!important}.is-size-6-widescreen{font-size:1rem!important}.is-size-7-widescreen{font-size:.75rem!important}}@media screen and (min-width:1408px){.is-size-1-fullhd{font-size:3rem!important}.is-size-2-fullhd{font-size:2.5rem!important}.is-size-3-fullhd{font-size:2rem!important}.is-size-4-fullhd{font-size:1.5rem!important}.is-size-5-fullhd{font-size:1.25rem!important}.is-size-6-fullhd{font-size:1rem!important}.is-size-7-fullhd{font-size:.75rem!important}}.has-text-centered{text-align:center!important}@media screen and (max-width:768px){.has-text-centered-mobile{text-align:center!important}}@media print,screen and (min-width:769px){.has-text-centered-tablet{text-align:center!important}}@media screen and (min-width:769px) and (max-width:1023px){.has-text-centered-tablet-only{text-align:center!important}}@media screen and (max-width:1023px){.has-text-centered-touch{text-align:center!important}}@media screen and (min-width:1024px){.has-text-centered-desktop{text-align:center!important}}@media screen and (min-width:1024px) and (max-width:1215px){.has-text-centered-desktop-only{text-align:center!important}}@media screen and (min-width:1216px){.has-text-centered-widescreen{text-align:center!important}}@media screen and (min-width:1216px) and (max-width:1407px){.has-text-centered-widescreen-only{text-align:center!important}}@media screen and (min-width:1408px){.has-text-centered-fullhd{text-align:center!important}}.has-text-justified{text-align:justify!important}@media screen and (max-width:768px){.has-text-justified-mobile{text-align:justify!important}}@media print,screen and (min-width:769px){.has-text-justified-tablet{text-align:justify!important}}@media screen and (min-width:769px) and (max-width:1023px){.has-text-justified-tablet-only{text-align:justify!important}}@media screen and (max-width:1023px){.has-text-justified-touch{text-align:justify!important}}@media screen and (min-width:1024px){.has-text-justified-desktop{text-align:justify!important}}@media screen and (min-width:1024px) and (max-width:1215px){.has-text-justified-desktop-only{text-align:justify!important}}@media screen and (min-width:1216px){.has-text-justified-widescreen{text-align:justify!important}}@media screen and (min-width:1216px) and (max-width:1407px){.has-text-justified-widescreen-only{text-align:justify!important}}@media screen and (min-width:1408px){.has-text-justified-fullhd{text-align:justify!important}}.has-text-left{text-align:left!important}@media screen and (max-width:768px){.has-text-left-mobile{text-align:left!important}}@media print,screen and (min-width:769px){.has-text-left-tablet{text-align:left!important}}@media screen and (min-width:769px) and (max-width:1023px){.has-text-left-tablet-only{text-align:left!important}}@media screen and (max-width:1023px){.has-text-left-touch{text-align:left!important}}@media screen and (min-width:1024px){.has-text-left-desktop{text-align:left!important}}@media screen and (min-width:1024px) and (max-width:1215px){.has-text-left-desktop-only{text-align:left!important}}@media screen and (min-width:1216px){.has-text-left-widescreen{text-align:left!important}}@media screen and (min-width:1216px) and (max-width:1407px){.has-text-left-widescreen-only{text-align:left!important}}@media screen and (min-width:1408px){.has-text-left-fullhd{text-align:left!important}}.has-text-right{text-align:right!important}@media screen and (max-width:768px){.has-text-right-mobile{text-align:right!important}}@media print,screen and (min-width:769px){.has-text-right-tablet{text-align:right!important}}@media screen and (min-width:769px) and (max-width:1023px){.has-text-right-tablet-only{text-align:right!important}}@media screen and (max-width:1023px){.has-text-right-touch{text-align:right!important}}@media screen and (min-width:1024px){.has-text-right-desktop{text-align:right!important}}@media screen and (min-width:1024px) and (max-width:1215px){.has-text-right-desktop-only{text-align:right!important}}@media screen and (min-width:1216px){.has-text-right-widescreen{text-align:right!important}}@media screen and (min-width:1216px) and (max-width:1407px){.has-text-right-widescreen-only{text-align:right!important}}@media screen and (min-width:1408px){.has-text-right-fullhd{text-align:right!important}}.is-capitalized{text-transform:capitalize!important}.is-lowercase{text-transform:lowercase!important}.is-uppercase{text-transform:uppercase!important}.is-italic{font-style:italic!important}.has-text-white{color:#fff!important}a.has-text-white:focus,a.has-text-white:hover{color:#e6e6e6!important}.has-text-black{color:#0a0a0a!important}a.has-text-black:focus,a.has-text-black:hover{color:#000!important}.has-text-light{color:#f5f5f5!important}a.has-text-light:focus,a.has-text-light:hover{color:#dbdbdb!important}.has-text-dark{color:#363636!important}a.has-text-dark:focus,a.has-text-dark:hover{color:#1c1c1c!important}.has-text-primary{color:#00d1b2!important}a.has-text-primary:focus,a.has-text-primary:hover{color:#009e86!important}.has-text-link{color:#3273dc!important}a.has-text-link:focus,a.has-text-link:hover{color:#205bbc!important}.has-text-info{color:#209cee!important}a.has-text-info:focus,a.has-text-info:hover{color:#0f81cc!important}.has-text-success{color:#23d160!important}a.has-text-success:focus,a.has-text-success:hover{color:#1ca64c!important}.has-text-warning{color:#ffdd57!important}a.has-text-warning:focus,a.has-text-warning:hover{color:#ffd324!important}.has-text-danger{color:#ff3860!important}a.has-text-danger:focus,a.has-text-danger:hover{color:#ff0537!important}.has-text-black-bis{color:#121212!important}.has-text-black-ter{color:#242424!important}.has-text-grey-darker{color:#363636!important}.has-text-grey-dark{color:#4a4a4a!important}.has-text-grey{color:#7a7a7a!important}.has-text-grey-light{color:#b5b5b5!important}.has-text-grey-lighter{color:#dbdbdb!important}.has-text-white-ter{color:#f5f5f5!important}.has-text-white-bis{color:#fafafa!important}.has-text-weight-light{font-weight:300!important}.has-text-weight-normal{font-weight:400!important}.has-text-weight-semibold{font-weight:600!important}.has-text-weight-bold{font-weight:700!important}.is-block{display:block!important}@media screen and (max-width:768px){.is-block-mobile{display:block!important}}@media print,screen and (min-width:769px){.is-block-tablet{display:block!important}}@media screen and (min-width:769px) and (max-width:1023px){.is-block-tablet-only{display:block!important}}@media screen and (max-width:1023px){.is-block-touch{display:block!important}}@media screen and (min-width:1024px){.is-block-desktop{display:block!important}}@media screen and (min-width:1024px) and (max-width:1215px){.is-block-desktop-only{display:block!important}}@media screen and (min-width:1216px){.is-block-widescreen{display:block!important}}@media screen and (min-width:1216px) and (max-width:1407px){.is-block-widescreen-only{display:block!important}}@media screen and (min-width:1408px){.is-block-fullhd{display:block!important}}.is-flex{display:-ms-flexbox!important;display:flex!important}@media screen and (max-width:768px){.is-flex-mobile{display:-ms-flexbox!important;display:flex!important}}@media print,screen and (min-width:769px){.is-flex-tablet{display:-ms-flexbox!important;display:flex!important}}@media screen and (min-width:769px) and (max-width:1023px){.is-flex-tablet-only{display:-ms-flexbox!important;display:flex!important}}@media screen and (max-width:1023px){.is-flex-touch{display:-ms-flexbox!important;display:flex!important}}@media screen and (min-width:1024px){.is-flex-desktop{display:-ms-flexbox!important;display:flex!important}}@media screen and (min-width:1024px) and (max-width:1215px){.is-flex-desktop-only{display:-ms-flexbox!important;display:flex!important}}@media screen and (min-width:1216px){.is-flex-widescreen{display:-ms-flexbox!important;display:flex!important}}@media screen and (min-width:1216px) and (max-width:1407px){.is-flex-widescreen-only{display:-ms-flexbox!important;display:flex!important}}@media screen and (min-width:1408px){.is-flex-fullhd{display:-ms-flexbox!important;display:flex!important}}.is-inline{display:inline!important}@media screen and (max-width:768px){.is-inline-mobile{display:inline!important}}@media print,screen and (min-width:769px){.is-inline-tablet{display:inline!important}}@media screen and (min-width:769px) and (max-width:1023px){.is-inline-tablet-only{display:inline!important}}@media screen and (max-width:1023px){.is-inline-touch{display:inline!important}}@media screen and (min-width:1024px){.is-inline-desktop{display:inline!important}}@media screen and (min-width:1024px) and (max-width:1215px){.is-inline-desktop-only{display:inline!important}}@media screen and (min-width:1216px){.is-inline-widescreen{display:inline!important}}@media screen and (min-width:1216px) and (max-width:1407px){.is-inline-widescreen-only{display:inline!important}}@media screen and (min-width:1408px){.is-inline-fullhd{display:inline!important}}.is-inline-block{display:inline-block!important}@media screen and (max-width:768px){.is-inline-block-mobile{display:inline-block!important}}@media print,screen and (min-width:769px){.is-inline-block-tablet{display:inline-block!important}}@media screen and (min-width:769px) and (max-width:1023px){.is-inline-block-tablet-only{display:inline-block!important}}@media screen and (max-width:1023px){.is-inline-block-touch{display:inline-block!important}}@media screen and (min-width:1024px){.is-inline-block-desktop{display:inline-block!important}}@media screen and (min-width:1024px) and (max-width:1215px){.is-inline-block-desktop-only{display:inline-block!important}}@media screen and (min-width:1216px){.is-inline-block-widescreen{display:inline-block!important}}@media screen and (min-width:1216px) and (max-width:1407px){.is-inline-block-widescreen-only{display:inline-block!important}}@media screen and (min-width:1408px){.is-inline-block-fullhd{display:inline-block!important}}.is-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media screen and (max-width:768px){.is-inline-flex-mobile{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print,screen and (min-width:769px){.is-inline-flex-tablet{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media screen and (min-width:769px) and (max-width:1023px){.is-inline-flex-tablet-only{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media screen and (max-width:1023px){.is-inline-flex-touch{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media screen and (min-width:1024px){.is-inline-flex-desktop{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media screen and (min-width:1024px) and (max-width:1215px){.is-inline-flex-desktop-only{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media screen and (min-width:1216px){.is-inline-flex-widescreen{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media screen and (min-width:1216px) and (max-width:1407px){.is-inline-flex-widescreen-only{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media screen and (min-width:1408px){.is-inline-flex-fullhd{display:-ms-inline-flexbox!important;display:inline-flex!important}}.is-hidden{display:none!important}@media screen and (max-width:768px){.is-hidden-mobile{display:none!important}}@media print,screen and (min-width:769px){.is-hidden-tablet{display:none!important}}@media screen and (min-width:769px) and (max-width:1023px){.is-hidden-tablet-only{display:none!important}}@media screen and (max-width:1023px){.is-hidden-touch{display:none!important}}@media screen and (min-width:1024px){.is-hidden-desktop{display:none!important}}@media screen and (min-width:1024px) and (max-width:1215px){.is-hidden-desktop-only{display:none!important}}@media screen and (min-width:1216px){.is-hidden-widescreen{display:none!important}}@media screen and (min-width:1216px) and (max-width:1407px){.is-hidden-widescreen-only{display:none!important}}@media screen and (min-width:1408px){.is-hidden-fullhd{display:none!important}}.is-invisible{visibility:hidden!important}@media screen and (max-width:768px){.is-invisible-mobile{visibility:hidden!important}}@media print,screen and (min-width:769px){.is-invisible-tablet{visibility:hidden!important}}@media screen and (min-width:769px) and (max-width:1023px){.is-invisible-tablet-only{visibility:hidden!important}}@media screen and (max-width:1023px){.is-invisible-touch{visibility:hidden!important}}@media screen and (min-width:1024px){.is-invisible-desktop{visibility:hidden!important}}@media screen and (min-width:1024px) and (max-width:1215px){.is-invisible-desktop-only{visibility:hidden!important}}@media screen and (min-width:1216px){.is-invisible-widescreen{visibility:hidden!important}}@media screen and (min-width:1216px) and (max-width:1407px){.is-invisible-widescreen-only{visibility:hidden!important}}@media screen and (min-width:1408px){.is-invisible-fullhd{visibility:hidden!important}}.is-marginless{margin:0!important}.is-paddingless{padding:0!important}.is-radiusless{border-radius:0!important}.is-shadowless{box-shadow:none!important}.is-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.content:not(:last-child){margin-bottom:1.5rem}.content li+li{margin-top:.25em}.content blockquote:not(:last-child),.content dl:not(:last-child),.content ol:not(:last-child),.content p:not(:last-child),.content pre:not(:last-child),.content table:not(:last-child),.content ul:not(:last-child){margin-bottom:1em}.content h1,.content h2,.content h3,.content h4,.content h5,.content h6{color:#363636;font-weight:400;line-height:1.125}.content h1{font-size:2em;margin-bottom:.5em}.content h1:not(:first-child){margin-top:1em}.content h2{font-size:1.75em;margin-bottom:.5714em}.content h2:not(:first-child){margin-top:1.1428em}.content h3{font-size:1.5em;margin-bottom:.6666em}.content h3:not(:first-child){margin-top:1.3333em}.content h4{font-size:1.25em;margin-bottom:.8em}.content h5{font-size:1.125em;margin-bottom:.8888em}.content h6{font-size:1em;margin-bottom:1em}.content blockquote{background-color:#f5f5f5;border-left:5px solid #dbdbdb;padding:1.25em 1.5em}.content ol{list-style:decimal outside}.content ol,.content ul{margin-left:2em;margin-top:1em}.content ul{list-style:disc outside}.content ul ul{list-style-type:circle;margin-top:.5em}.content ul ul ul{list-style-type:square}.content dd{margin-left:2em}.content figure{margin-left:2em;margin-right:2em;text-align:center}.content figure:not(:first-child){margin-top:2em}.content figure:not(:last-child){margin-bottom:2em}.content figure img{display:inline-block}.content figure figcaption{font-style:italic}.content pre{-webkit-overflow-scrolling:touch;overflow-x:auto;padding:1.25em 1.5em;white-space:pre;word-wrap:normal}.content sub,.content sup{font-size:75%}.content table{width:100%}.content table td,.content table th{border:1px solid #dbdbdb;border-width:0 0 1px;padding:.5em .75em;vertical-align:top}.content table th{color:#363636;text-align:left}.content table tr:hover{background-color:#f5f5f5}.content table thead td,.content table thead th{border-width:0 0 2px;color:#363636}.content table tfoot td,.content table tfoot th{border-width:2px 0 0;color:#363636}.content table tbody tr:last-child td,.content table tbody tr:last-child th{border-bottom-width:0}.content.is-small{font-size:.75rem}.content.is-medium{font-size:1.25rem}.content.is-large{font-size:1.5rem}.input,.textarea{-moz-appearance:none;-webkit-appearance:none;-ms-flex-align:center;align-items:center;border:1px solid transparent;border-radius:3px;box-shadow:none;display:-ms-inline-flexbox;display:inline-flex;font-size:1rem;height:2.25em;-ms-flex-pack:start;justify-content:flex-start;line-height:1.5;padding:calc(.375em - 1px) calc(.625em - 1px);position:relative;vertical-align:top;background-color:#fff;border-color:#dbdbdb;color:#363636;box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);max-width:100%;width:100%}.input.is-active,.input.is-focused,.input:active,.input:focus,.textarea.is-active,.textarea.is-focused,.textarea:active,.textarea:focus{outline:none}.input[disabled],.textarea[disabled]{cursor:not-allowed}.input::-moz-placeholder,.textarea::-moz-placeholder{color:rgba(54,54,54,.3)}.input::-webkit-input-placeholder,.textarea::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.input:-moz-placeholder,.textarea:-moz-placeholder{color:rgba(54,54,54,.3)}.input:-ms-input-placeholder,.textarea:-ms-input-placeholder{color:rgba(54,54,54,.3)}.input.is-hovered,.input:hover,.textarea.is-hovered,.textarea:hover{border-color:#b5b5b5}.input.is-active,.input.is-focused,.input:active,.input:focus,.textarea.is-active,.textarea.is-focused,.textarea:active,.textarea:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input[disabled],.textarea[disabled]{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.input[disabled]::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]::-webkit-input-placeholder,.textarea[disabled]::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-moz-placeholder,.textarea[disabled]:-moz-placeholder{color:hsla(0,0%,48%,.3)}.input[disabled]:-ms-input-placeholder,.textarea[disabled]:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.input[readonly],.textarea[readonly]{box-shadow:none}.input.is-white,.textarea.is-white{border-color:#fff}.input.is-white.is-active,.input.is-white.is-focused,.input.is-white:active,.input.is-white:focus,.textarea.is-white.is-active,.textarea.is-white.is-focused,.textarea.is-white:active,.textarea.is-white:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.input.is-black,.textarea.is-black{border-color:#0a0a0a}.input.is-black.is-active,.input.is-black.is-focused,.input.is-black:active,.input.is-black:focus,.textarea.is-black.is-active,.textarea.is-black.is-focused,.textarea.is-black:active,.textarea.is-black:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.input.is-light,.textarea.is-light{border-color:#f5f5f5}.input.is-light.is-active,.input.is-light.is-focused,.input.is-light:active,.input.is-light:focus,.textarea.is-light.is-active,.textarea.is-light.is-focused,.textarea.is-light:active,.textarea.is-light:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.input.is-dark,.textarea.is-dark{border-color:#363636}.input.is-dark.is-active,.input.is-dark.is-focused,.input.is-dark:active,.input.is-dark:focus,.textarea.is-dark.is-active,.textarea.is-dark.is-focused,.textarea.is-dark:active,.textarea.is-dark:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.input.is-primary,.textarea.is-primary{border-color:#00d1b2}.input.is-primary.is-active,.input.is-primary.is-focused,.input.is-primary:active,.input.is-primary:focus,.textarea.is-primary.is-active,.textarea.is-primary.is-focused,.textarea.is-primary:active,.textarea.is-primary:focus{box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.input.is-link,.textarea.is-link{border-color:#3273dc}.input.is-link.is-active,.input.is-link.is-focused,.input.is-link:active,.input.is-link:focus,.textarea.is-link.is-active,.textarea.is-link.is-focused,.textarea.is-link:active,.textarea.is-link:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input.is-info,.textarea.is-info{border-color:#209cee}.input.is-info.is-active,.input.is-info.is-focused,.input.is-info:active,.input.is-info:focus,.textarea.is-info.is-active,.textarea.is-info.is-focused,.textarea.is-info:active,.textarea.is-info:focus{box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.input.is-success,.textarea.is-success{border-color:#23d160}.input.is-success.is-active,.input.is-success.is-focused,.input.is-success:active,.input.is-success:focus,.textarea.is-success.is-active,.textarea.is-success.is-focused,.textarea.is-success:active,.textarea.is-success:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.input.is-warning,.textarea.is-warning{border-color:#ffdd57}.input.is-warning.is-active,.input.is-warning.is-focused,.input.is-warning:active,.input.is-warning:focus,.textarea.is-warning.is-active,.textarea.is-warning.is-focused,.textarea.is-warning:active,.textarea.is-warning:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.input.is-danger,.textarea.is-danger{border-color:#ff3860}.input.is-danger.is-active,.input.is-danger.is-focused,.input.is-danger:active,.input.is-danger:focus,.textarea.is-danger.is-active,.textarea.is-danger.is-focused,.textarea.is-danger:active,.textarea.is-danger:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.input.is-small,.textarea.is-small{border-radius:2px;font-size:.75rem}.input.is-medium,.textarea.is-medium{font-size:1.25rem}.input.is-large,.textarea.is-large{font-size:1.5rem}.input.is-fullwidth,.textarea.is-fullwidth{display:block;width:100%}.input.is-inline,.textarea.is-inline{display:inline;width:auto}.input.is-rounded{border-radius:290486px;padding-left:1em;padding-right:1em}.input.is-static{background-color:transparent;border-color:transparent;box-shadow:none;padding-left:0;padding-right:0}.textarea{display:block;max-width:100%;min-width:100%;padding:.625em;resize:vertical}.textarea:not([rows]){max-height:600px;min-height:120px}.textarea[rows]{height:unset}.textarea.has-fixed-size{resize:none}.checkbox,.radio{cursor:pointer;display:inline-block;line-height:1.25;position:relative}.checkbox input,.radio input{cursor:pointer}.checkbox:hover,.radio:hover{color:#363636}.checkbox[disabled],.radio[disabled]{color:#7a7a7a;cursor:not-allowed}.radio+.radio{margin-left:.5em}.select{display:inline-block;max-width:100%;position:relative;vertical-align:top}.select:not(.is-multiple){height:2.25em}.select:not(.is-multiple):after{border:1px solid #3273dc;border-right:0;border-top:0;content:" ";display:block;height:.5em;pointer-events:none;position:absolute;transform:rotate(-45deg);transform-origin:center;width:.5em;margin-top:-.375em;right:1.125em;top:50%;z-index:3}.select.is-rounded select{border-radius:290486px;padding-left:1em}.select select{-moz-appearance:none;-webkit-appearance:none;-ms-flex-align:center;align-items:center;border:1px solid transparent;border-radius:3px;box-shadow:none;display:-ms-inline-flexbox;display:inline-flex;font-size:1rem;height:2.25em;-ms-flex-pack:start;justify-content:flex-start;line-height:1.5;padding:calc(.375em - 1px) calc(.625em - 1px);position:relative;vertical-align:top;background-color:#fff;border-color:#dbdbdb;color:#363636;cursor:pointer;display:block;font-size:1em;max-width:100%;outline:none}.select select.is-active,.select select.is-focused,.select select:active,.select select:focus{outline:none}.select select[disabled]{cursor:not-allowed}.select select::-moz-placeholder{color:rgba(54,54,54,.3)}.select select::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.select select:-moz-placeholder{color:rgba(54,54,54,.3)}.select select:-ms-input-placeholder{color:rgba(54,54,54,.3)}.select select.is-hovered,.select select:hover{border-color:#b5b5b5}.select select.is-active,.select select.is-focused,.select select:active,.select select:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select select[disabled]{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a}.select select[disabled]::-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]::-webkit-input-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-moz-placeholder{color:hsla(0,0%,48%,.3)}.select select[disabled]:-ms-input-placeholder{color:hsla(0,0%,48%,.3)}.select select::-ms-expand{display:none}.select select[disabled]:hover{border-color:#f5f5f5}.select select:not([multiple]){padding-right:2.5em}.select select[multiple]{height:unset;padding:0}.select select[multiple] option{padding:.5em 1em}.select:hover:after{border-color:#363636}.select.is-white select{border-color:#fff}.select.is-white select.is-active,.select.is-white select.is-focused,.select.is-white select:active,.select.is-white select:focus{box-shadow:0 0 0 .125em hsla(0,0%,100%,.25)}.select.is-black select{border-color:#0a0a0a}.select.is-black select.is-active,.select.is-black select.is-focused,.select.is-black select:active,.select.is-black select:focus{box-shadow:0 0 0 .125em hsla(0,0%,4%,.25)}.select.is-light select{border-color:#f5f5f5}.select.is-light select.is-active,.select.is-light select.is-focused,.select.is-light select:active,.select.is-light select:focus{box-shadow:0 0 0 .125em hsla(0,0%,96%,.25)}.select.is-dark select{border-color:#363636}.select.is-dark select.is-active,.select.is-dark select.is-focused,.select.is-dark select:active,.select.is-dark select:focus{box-shadow:0 0 0 .125em rgba(54,54,54,.25)}.select.is-primary select{border-color:#00d1b2}.select.is-primary select.is-active,.select.is-primary select.is-focused,.select.is-primary select:active,.select.is-primary select:focus{box-shadow:0 0 0 .125em rgba(0,209,178,.25)}.select.is-link select{border-color:#3273dc}.select.is-link select.is-active,.select.is-link select.is-focused,.select.is-link select:active,.select.is-link select:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.select.is-info select{border-color:#209cee}.select.is-info select.is-active,.select.is-info select.is-focused,.select.is-info select:active,.select.is-info select:focus{box-shadow:0 0 0 .125em rgba(32,156,238,.25)}.select.is-success select{border-color:#23d160}.select.is-success select.is-active,.select.is-success select.is-focused,.select.is-success select:active,.select.is-success select:focus{box-shadow:0 0 0 .125em rgba(35,209,96,.25)}.select.is-warning select{border-color:#ffdd57}.select.is-warning select.is-active,.select.is-warning select.is-focused,.select.is-warning select:active,.select.is-warning select:focus{box-shadow:0 0 0 .125em rgba(255,221,87,.25)}.select.is-danger select{border-color:#ff3860}.select.is-danger select.is-active,.select.is-danger select.is-focused,.select.is-danger select:active,.select.is-danger select:focus{box-shadow:0 0 0 .125em rgba(255,56,96,.25)}.select.is-small{border-radius:2px;font-size:.75rem}.select.is-medium{font-size:1.25rem}.select.is-large{font-size:1.5rem}.select.is-disabled:after{border-color:#7a7a7a}.select.is-fullwidth,.select.is-fullwidth select{width:100%}.select.is-loading:after{animation:a .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:1em;position:relative;width:1em;margin-top:0;position:absolute;right:.625em;top:.625em;transform:none}.select.is-loading.is-small:after{font-size:.75rem}.select.is-loading.is-medium:after{font-size:1.25rem}.select.is-loading.is-large:after{font-size:1.5rem}.file{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;position:relative}.file.is-white .file-cta{background-color:#fff;border-color:transparent;color:#0a0a0a}.file.is-white.is-hovered .file-cta,.file.is-white:hover .file-cta{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.file.is-white.is-focused .file-cta,.file.is-white:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,100%,.25);color:#0a0a0a}.file.is-white.is-active .file-cta,.file.is-white:active .file-cta{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.file.is-black .file-cta{background-color:#0a0a0a;border-color:transparent;color:#fff}.file.is-black.is-hovered .file-cta,.file.is-black:hover .file-cta{background-color:#040404;border-color:transparent;color:#fff}.file.is-black.is-focused .file-cta,.file.is-black:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,4%,.25);color:#fff}.file.is-black.is-active .file-cta,.file.is-black:active .file-cta{background-color:#000;border-color:transparent;color:#fff}.file.is-light .file-cta{background-color:#f5f5f5;border-color:transparent;color:#363636}.file.is-light.is-hovered .file-cta,.file.is-light:hover .file-cta{background-color:#eee;border-color:transparent;color:#363636}.file.is-light.is-focused .file-cta,.file.is-light:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em hsla(0,0%,96%,.25);color:#363636}.file.is-light.is-active .file-cta,.file.is-light:active .file-cta{background-color:#e8e8e8;border-color:transparent;color:#363636}.file.is-dark .file-cta{background-color:#363636;border-color:transparent;color:#f5f5f5}.file.is-dark.is-hovered .file-cta,.file.is-dark:hover .file-cta{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.file.is-dark.is-focused .file-cta,.file.is-dark:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(54,54,54,.25);color:#f5f5f5}.file.is-dark.is-active .file-cta,.file.is-dark:active .file-cta{background-color:#292929;border-color:transparent;color:#f5f5f5}.file.is-primary .file-cta{background-color:#00d1b2;border-color:transparent;color:#fff}.file.is-primary.is-hovered .file-cta,.file.is-primary:hover .file-cta{background-color:#00c4a7;border-color:transparent;color:#fff}.file.is-primary.is-focused .file-cta,.file.is-primary:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(0,209,178,.25);color:#fff}.file.is-primary.is-active .file-cta,.file.is-primary:active .file-cta{background-color:#00b89c;border-color:transparent;color:#fff}.file.is-link .file-cta{background-color:#3273dc;border-color:transparent;color:#fff}.file.is-link.is-hovered .file-cta,.file.is-link:hover .file-cta{background-color:#276cda;border-color:transparent;color:#fff}.file.is-link.is-focused .file-cta,.file.is-link:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(50,115,220,.25);color:#fff}.file.is-link.is-active .file-cta,.file.is-link:active .file-cta{background-color:#2366d1;border-color:transparent;color:#fff}.file.is-info .file-cta{background-color:#209cee;border-color:transparent;color:#fff}.file.is-info.is-hovered .file-cta,.file.is-info:hover .file-cta{background-color:#1496ed;border-color:transparent;color:#fff}.file.is-info.is-focused .file-cta,.file.is-info:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(32,156,238,.25);color:#fff}.file.is-info.is-active .file-cta,.file.is-info:active .file-cta{background-color:#118fe4;border-color:transparent;color:#fff}.file.is-success .file-cta{background-color:#23d160;border-color:transparent;color:#fff}.file.is-success.is-hovered .file-cta,.file.is-success:hover .file-cta{background-color:#22c65b;border-color:transparent;color:#fff}.file.is-success.is-focused .file-cta,.file.is-success:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(35,209,96,.25);color:#fff}.file.is-success.is-active .file-cta,.file.is-success:active .file-cta{background-color:#20bc56;border-color:transparent;color:#fff}.file.is-warning .file-cta{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-hovered .file-cta,.file.is-warning:hover .file-cta{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-warning.is-focused .file-cta,.file.is-warning:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,221,87,.25);color:rgba(0,0,0,.7)}.file.is-warning.is-active .file-cta,.file.is-warning:active .file-cta{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.file.is-danger .file-cta{background-color:#ff3860;border-color:transparent;color:#fff}.file.is-danger.is-hovered .file-cta,.file.is-danger:hover .file-cta{background-color:#ff2b56;border-color:transparent;color:#fff}.file.is-danger.is-focused .file-cta,.file.is-danger:focus .file-cta{border-color:transparent;box-shadow:0 0 .5em rgba(255,56,96,.25);color:#fff}.file.is-danger.is-active .file-cta,.file.is-danger:active .file-cta{background-color:#ff1f4b;border-color:transparent;color:#fff}.file.is-small{font-size:.75rem}.file.is-medium{font-size:1.25rem}.file.is-medium .file-icon .fa{font-size:21px}.file.is-large{font-size:1.5rem}.file.is-large .file-icon .fa{font-size:28px}.file.has-name .file-cta{border-bottom-right-radius:0;border-top-right-radius:0}.file.has-name .file-name{border-bottom-left-radius:0;border-top-left-radius:0}.file.has-name.is-empty .file-cta{border-radius:3px}.file.has-name.is-empty .file-name{display:none}.file.is-boxed .file-cta,.file.is-boxed .file-label{-ms-flex-direction:column;flex-direction:column}.file.is-boxed .file-cta{height:auto;padding:1em 3em}.file.is-boxed .file-name{border-width:0 1px 1px}.file.is-boxed .file-icon{height:1.5em;width:1.5em}.file.is-boxed .file-icon .fa{font-size:21px}.file.is-boxed.is-small .file-icon .fa{font-size:14px}.file.is-boxed.is-medium .file-icon .fa{font-size:28px}.file.is-boxed.is-large .file-icon .fa{font-size:35px}.file.is-boxed.has-name .file-cta{border-radius:3px 3px 0 0}.file.is-boxed.has-name .file-name{border-radius:0 0 3px 3px;border-width:0 1px 1px}.file.is-centered{-ms-flex-pack:center;justify-content:center}.file.is-fullwidth .file-label{width:100%}.file.is-fullwidth .file-name{-ms-flex-positive:1;flex-grow:1;max-width:none}.file.is-right{-ms-flex-pack:end;justify-content:flex-end}.file.is-right .file-cta{border-radius:0 3px 3px 0}.file.is-right .file-name{border-radius:3px 0 0 3px;border-width:1px 0 1px 1px;-ms-flex-order:-1;order:-1}.file-label{-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-pack:start;justify-content:flex-start;overflow:hidden;position:relative}.file-label:hover .file-cta{background-color:#eee;color:#363636}.file-label:hover .file-name{border-color:#d5d5d5}.file-label:active .file-cta{background-color:#e8e8e8;color:#363636}.file-label:active .file-name{border-color:#cfcfcf}.file-input{height:.01em;left:0;outline:none;position:absolute;top:0;width:.01em}.file-cta,.file-name{-moz-appearance:none;-webkit-appearance:none;-ms-flex-align:center;align-items:center;border:1px solid transparent;box-shadow:none;display:-ms-inline-flexbox;display:inline-flex;font-size:1rem;height:2.25em;-ms-flex-pack:start;justify-content:flex-start;line-height:1.5;padding-left:calc(.625em - 1px);padding-right:calc(.625em - 1px);position:relative;vertical-align:top;border-color:#dbdbdb;border-radius:3px;font-size:1em;padding:calc(.375em - 1px) 1em;white-space:nowrap}.file-cta.is-active,.file-cta.is-focused,.file-cta:active,.file-cta:focus,.file-name.is-active,.file-name.is-focused,.file-name:active,.file-name:focus{outline:none}.file-cta[disabled],.file-name[disabled]{cursor:not-allowed}.file-cta{background-color:#f5f5f5;color:#4a4a4a}.file-name{border-color:#dbdbdb;border-style:solid;border-width:1px 1px 1px 0;display:block;max-width:16em;overflow:hidden;text-align:left;text-overflow:ellipsis}.file-icon{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;height:1em;-ms-flex-pack:center;justify-content:center;margin-right:.5em;width:1em}.file-icon .fa{font-size:14px}.label{color:#363636;display:block;font-size:1rem;font-weight:700}.label:not(:last-child){margin-bottom:.5em}.label.is-small{font-size:.75rem}.label.is-medium{font-size:1.25rem}.label.is-large{font-size:1.5rem}.help{display:block;font-size:.75rem;margin-top:.25rem}.help.is-white{color:#fff}.help.is-black{color:#0a0a0a}.help.is-light{color:#f5f5f5}.help.is-dark{color:#363636}.help.is-primary{color:#00d1b2}.help.is-link{color:#3273dc}.help.is-info{color:#209cee}.help.is-success{color:#23d160}.help.is-warning{color:#ffdd57}.help.is-danger{color:#ff3860}.field:not(:last-child){margin-bottom:.75rem}.field.has-addons{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.field.has-addons .control:not(:last-child){margin-right:-1px}.field.has-addons .control:not(:first-child):not(:last-child) .button,.field.has-addons .control:not(:first-child):not(:last-child) .input,.field.has-addons .control:not(:first-child):not(:last-child) .select select{border-radius:0}.field.has-addons .control:first-child .button,.field.has-addons .control:first-child .input,.field.has-addons .control:first-child .select select{border-bottom-right-radius:0;border-top-right-radius:0}.field.has-addons .control:last-child .button,.field.has-addons .control:last-child .input,.field.has-addons .control:last-child .select select{border-bottom-left-radius:0;border-top-left-radius:0}.field.has-addons .control .button.is-hovered,.field.has-addons .control .button:hover,.field.has-addons .control .input.is-hovered,.field.has-addons .control .input:hover,.field.has-addons .control .select select.is-hovered,.field.has-addons .control .select select:hover{z-index:1}.field.has-addons .control .button.is-active,.field.has-addons .control .button.is-focused,.field.has-addons .control .button:active,.field.has-addons .control .button:focus,.field.has-addons .control .input.is-active,.field.has-addons .control .input.is-focused,.field.has-addons .control .input:active,.field.has-addons .control .input:focus,.field.has-addons .control .select select.is-active,.field.has-addons .control .select select.is-focused,.field.has-addons .control .select select:active,.field.has-addons .control .select select:focus{z-index:2}.field.has-addons .control .button.is-active:hover,.field.has-addons .control .button.is-focused:hover,.field.has-addons .control .button:active:hover,.field.has-addons .control .button:focus:hover,.field.has-addons .control .input.is-active:hover,.field.has-addons .control .input.is-focused:hover,.field.has-addons .control .input:active:hover,.field.has-addons .control .input:focus:hover,.field.has-addons .control .select select.is-active:hover,.field.has-addons .control .select select.is-focused:hover,.field.has-addons .control .select select:active:hover,.field.has-addons .control .select select:focus:hover{z-index:3}.field.has-addons .control.is-expanded{-ms-flex-positive:1;flex-grow:1}.field.has-addons.has-addons-centered{-ms-flex-pack:center;justify-content:center}.field.has-addons.has-addons-right{-ms-flex-pack:end;justify-content:flex-end}.field.has-addons.has-addons-fullwidth .control{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0}.field.is-grouped{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.field.is-grouped>.control{-ms-flex-negative:0;flex-shrink:0}.field.is-grouped>.control:not(:last-child){margin-bottom:0;margin-right:.75rem}.field.is-grouped>.control.is-expanded{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1}.field.is-grouped.is-grouped-centered{-ms-flex-pack:center;justify-content:center}.field.is-grouped.is-grouped-right{-ms-flex-pack:end;justify-content:flex-end}.field.is-grouped.is-grouped-multiline{-ms-flex-wrap:wrap;flex-wrap:wrap}.field.is-grouped.is-grouped-multiline>.control:last-child,.field.is-grouped.is-grouped-multiline>.control:not(:last-child){margin-bottom:.75rem}.field.is-grouped.is-grouped-multiline:last-child{margin-bottom:-.75rem}.field.is-grouped.is-grouped-multiline:not(:last-child){margin-bottom:0}@media print,screen and (min-width:769px){.field.is-horizontal{display:-ms-flexbox;display:flex}}.field-label .label{font-size:inherit}@media screen and (max-width:768px){.field-label{margin-bottom:.5rem}}@media print,screen and (min-width:769px){.field-label{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;margin-right:1.5rem;text-align:right}.field-label.is-small{font-size:.75rem;padding-top:.375em}.field-label.is-normal{padding-top:.375em}.field-label.is-medium{font-size:1.25rem;padding-top:.375em}.field-label.is-large{font-size:1.5rem;padding-top:.375em}}.field-body .field .field{margin-bottom:0}@media print,screen and (min-width:769px){.field-body{display:-ms-flexbox;display:flex;-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:5;flex-grow:5;-ms-flex-negative:1;flex-shrink:1}.field-body .field{margin-bottom:0}.field-body>.field{-ms-flex-negative:1;flex-shrink:1}.field-body>.field:not(.is-narrow){-ms-flex-positive:1;flex-grow:1}.field-body>.field:not(:last-child){margin-right:.75rem}}.control{font-size:1rem;position:relative;text-align:left}.control.has-icon .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:3}.control.has-icon .input:focus+.icon{color:#7a7a7a}.control.has-icon .input.is-small+.icon{font-size:.75rem}.control.has-icon .input.is-medium+.icon{font-size:1.25rem}.control.has-icon .input.is-large+.icon{font-size:1.5rem}.control.has-icon:not(.has-icon-right) .icon{left:0}.control.has-icon:not(.has-icon-right) .input{padding-left:2.25em}.control.has-icon.has-icon-right .icon{right:0}.control.has-icon.has-icon-right .input{padding-right:2.25em}.control.has-icons-left .input:focus~.icon,.control.has-icons-left .select:focus~.icon,.control.has-icons-right .input:focus~.icon,.control.has-icons-right .select:focus~.icon{color:#7a7a7a}.control.has-icons-left .input.is-small~.icon,.control.has-icons-left .select.is-small~.icon,.control.has-icons-right .input.is-small~.icon,.control.has-icons-right .select.is-small~.icon{font-size:.75rem}.control.has-icons-left .input.is-medium~.icon,.control.has-icons-left .select.is-medium~.icon,.control.has-icons-right .input.is-medium~.icon,.control.has-icons-right .select.is-medium~.icon{font-size:1.25rem}.control.has-icons-left .input.is-large~.icon,.control.has-icons-left .select.is-large~.icon,.control.has-icons-right .input.is-large~.icon,.control.has-icons-right .select.is-large~.icon{font-size:1.5rem}.control.has-icons-left .icon,.control.has-icons-right .icon{color:#dbdbdb;height:2.25em;pointer-events:none;position:absolute;top:0;width:2.25em;z-index:3}.control.has-icons-left .input,.control.has-icons-left .select select{padding-left:2.25em}.control.has-icons-left .icon.is-left{left:0}.control.has-icons-right .input,.control.has-icons-right .select select{padding-right:2.25em}.control.has-icons-right .icon.is-right{right:0}.control.is-loading:after{animation:a .5s infinite linear;border:2px solid #dbdbdb;border-radius:290486px;border-right-color:transparent;border-top-color:transparent;content:"";display:block;height:1em;position:relative;width:1em;position:absolute!important;right:.625em;top:.625em;z-index:3}.control.is-loading.is-small:after{font-size:.75rem}.control.is-loading.is-medium:after{font-size:1.25rem}.control.is-loading.is-large:after{font-size:1.5rem}.subtitle,.title{word-break:break-word}.subtitle:not(:last-child),.title:not(:last-child){margin-bottom:1.5rem}.subtitle em,.subtitle span,.title em,.title span{font-weight:inherit}.subtitle sub,.subtitle sup,.title sub,.title sup{font-size:.75em}.subtitle .tag,.title .tag{vertical-align:middle}.title{color:#363636;font-size:2rem;font-weight:600;line-height:1.125}.title strong{color:inherit;font-weight:inherit}.title+.highlight{margin-top:-.75rem}.title:not(.is-spaced)+.subtitle{margin-top:-1.5rem}.title.is-1{font-size:3rem}.title.is-2{font-size:2.5rem}.title.is-3{font-size:2rem}.title.is-4{font-size:1.5rem}.title.is-5{font-size:1.25rem}.title.is-6{font-size:1rem}.title.is-7{font-size:.75rem}.subtitle{color:#4a4a4a;font-size:1.25rem;font-weight:400;line-height:1.25}.subtitle strong{color:#363636;font-weight:600}.subtitle:not(.is-spaced)+.title{margin-top:-1.5rem}.subtitle.is-1{font-size:3rem}.subtitle.is-2{font-size:2.5rem}.subtitle.is-3{font-size:2rem}.subtitle.is-4{font-size:1.5rem}.subtitle.is-5{font-size:1.25rem}.subtitle.is-6{font-size:1rem}.subtitle.is-7{font-size:.75rem}.message{background-color:#f5f5f5;border-radius:3px;font-size:1rem}.message:not(:last-child){margin-bottom:1.5rem}.message strong{color:currentColor}.message a:not(.button):not(.tag){color:currentColor;text-decoration:underline}.message.is-small{font-size:.75rem}.message.is-medium{font-size:1.25rem}.message.is-large{font-size:1.5rem}.message.is-white{background-color:#fff}.message.is-white .message-header{background-color:#fff;color:#0a0a0a}.message.is-white .message-body{border-color:#fff;color:#4d4d4d}.message.is-black{background-color:#fafafa}.message.is-black .message-header{background-color:#0a0a0a;color:#fff}.message.is-black .message-body{border-color:#0a0a0a;color:#090909}.message.is-light{background-color:#fafafa}.message.is-light .message-header{background-color:#f5f5f5;color:#363636}.message.is-light .message-body{border-color:#f5f5f5;color:#505050}.message.is-dark{background-color:#fafafa}.message.is-dark .message-header{background-color:#363636;color:#f5f5f5}.message.is-dark .message-body{border-color:#363636;color:#2a2a2a}.message.is-primary{background-color:#f5fffd}.message.is-primary .message-header{background-color:#00d1b2;color:#fff}.message.is-primary .message-body{border-color:#00d1b2;color:#021310}.message.is-link{background-color:#f6f9fe}.message.is-link .message-header{background-color:#3273dc;color:#fff}.message.is-link .message-body{border-color:#3273dc;color:#22509a}.message.is-info{background-color:#f6fbfe}.message.is-info .message-header{background-color:#209cee;color:#fff}.message.is-info .message-body{border-color:#209cee;color:#12537e}.message.is-success{background-color:#f6fef9}.message.is-success .message-header{background-color:#23d160;color:#fff}.message.is-success .message-body{border-color:#23d160;color:#0e301a}.message.is-warning{background-color:#fffdf5}.message.is-warning .message-header{background-color:#ffdd57;color:rgba(0,0,0,.7)}.message.is-warning .message-body{border-color:#ffdd57;color:#3b3108}.message.is-danger{background-color:#fff5f7}.message.is-danger .message-header{background-color:#ff3860;color:#fff}.message.is-danger .message-body{border-color:#ff3860;color:#cd0930}.message-header{-ms-flex-align:center;align-items:center;background-color:#4a4a4a;border-radius:3px 3px 0 0;color:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;line-height:1.25;padding:.5em .75em;position:relative}.message-header .delete{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;margin-left:.75em}.message-header+.message-body{border-top-left-radius:0;border-top-right-radius:0;border-top:none}.message-body{border:1px solid #dbdbdb;border-radius:3px;color:#4a4a4a;padding:1em 1.25em}.message-body code,.message-body pre{background-color:#fff}.message-body pre code{background-color:transparent}.block:not(:last-child),.detect:not(:last-child),.instructions:not(:last-child),.snippet:not(:last-child),.stabs:not(:last-child),.table-container:not(:last-child),div.case:not(:last-child){margin-bottom:1.5rem}::-moz-selection{background-color:#ffe270}::selection{background-color:#ffe270}@font-face{font-family:Archia;src:url(https://jgthms.com/fonts/archia-regular-webfont.eot);src:url(https://jgthms.com/fonts/archia-regular-webfont.eot#iefix) format("embedded-opentype"),url(https://jgthms.com/fonts/archia-regular-webfont.woff2) format("woff2"),url(https://jgthms.com/fonts/archia-regular-webfont.woff) format("woff"),url(https://jgthms.com/fonts/archia-regular-webfont.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:Archia;src:url(https://jgthms.com/fonts/archia-semibold-webfont.eot);src:url(https://jgthms.com/fonts/archia-semibold-webfont.eot#iefix) format("embedded-opentype"),url(https://jgthms.com/fonts/archia-semibold-webfont.woff2) format("woff2"),url(https://jgthms.com/fonts/archia-semibold-webfont.woff) format("woff"),url(https://jgthms.com/fonts/archia-semibold-webfont.ttf) format("truetype");font-weight:600;font-style:normal}body{padding-bottom:50vh}.main{margin-left:auto;margin-right:auto;max-width:29rem}.snippet{position:relative}.snippet-copy{color:#909197;font-size:.75em;white-space:nowrap}@media screen and (max-width:699px){.snippet-contents{margin-bottom:.5rem}}@media screen and (min-width:700px){.snippet{margin-left:-1.5rem;margin-right:-1.5rem}.snippet-copy{left:calc(100% + 1.5rem);position:absolute;top:21px}}.header,.step{padding:2rem}#step39{text-align:center}#step39 .newsletter-content{text-align:left}.status{margin-bottom:1.5rem}.detect{background-color:#f5f5f5;border-radius:3px;padding:1.25em 1.5em}.fourteen{-ms-flex-align:end;align-items:flex-end;background-color:#ffe270;color:#000;display:-ms-inline-flexbox;display:inline-flex;height:4rem;-ms-flex-pack:end;justify-content:flex-end;padding-right:2px;width:4rem}.button{-moz-appearance:none;-webkit-appearance:none;background-color:#2795ee;border:none;border-radius:3px;color:#fff;cursor:pointer;display:inline-block;font-size:1rem;padding:.5em 1em;vertical-align:top}.gj{min-height:40px;position:relative}.check{-ms-flex-align:center;align-items:center;animation-delay:1.2s;animation-duration:.29s;animation-name:d;animation-timing-function:ease-in-out;display:-ms-flexbox;display:flex;height:40px;-ms-flex-pack:center;justify-content:center;transform-origin:center;width:40px}@media screen and (max-width:699px){.check{margin-bottom:10px}}@media screen and (min-width:700px){.check,.content h2 .stamp{position:absolute;right:calc(100% + 1rem)}.check{top:-5px}.content h2 .stamp{top:3px}}.check-circle{animation-duration:1s;animation-fill-mode:both;animation-name:b;animation-timing-function:cubic-bezier(0,1,.6,1.08);background-color:#87ffe1;border-radius:290486px;height:40px;transform-origin:center;width:40px}.check-circle,.check-svg{position:absolute}.check-svg svg{dipslay:block}.check-svg polyline{animation-delay:.25s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:c;stroke-dasharray:26;stroke-dashoffset:26}@keyframes b{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes c{to{stroke-dashoffset:0}}@keyframes d{0%,to{transform:scale(1)}50%{transform:scale(1.1)}}.sides{animation-duration:.5s;animation-fill-mode:both;background-color:#fff;border-radius:5px;bottom:5vw;display:none;padding:1rem;padding-right:2rem;position:fixed;right:5vw;transform-origin:bottom right;width:10rem;z-index:4}.sides.is-active{animation-name:b;display:block}@media screen and (max-width:999px){.sides,.sides.is-active{display:none}}.side{display:none;white-space:nowrap}.side.is-active{display:block}.side-title{font-size:1.5rem}.side-item{animation-duration:1s;color:#363636;display:none;font-size:.875rem;padding:.25em .5em}.side-item.is-active{animation-name:e;display:block}.step{animation-duration:1s;display:none}.step.is-active{animation-name:e;display:block}.thing{display:none}.thing.is-active{display:block}.case{display:none}html.case-mobile div.case.is-mobile{display:block}html.case-mobile span.case.is-mobile{display:inline}html.case-mobile .not-mobile{display:none!important}html.case-tablet div.case.is-tablet{display:block}html.case-tablet span.case.is-tablet{display:inline}html.case-tablet .not-tablet{display:none!important}html.case-desktop div.case.is-desktop{display:block}html.case-desktop span.case.is-desktop{display:inline}html.case-desktop .not-desktop{display:none!important}html.case-windows div.case.is-windows{display:block}html.case-windows span.case.is-windows{display:inline}html.case-windows .not-windows{display:none!important}html.case-mac div.case.is-mac{display:block}html.case-mac span.case.is-mac{display:inline}html.case-mac .not-mac{display:none!important}html.case-linux div.case.is-linux{display:block}html.case-linux span.case.is-linux{display:inline}html.case-linux .not-linux{display:none!important}html.case-chrome div.case.is-chrome{display:block}html.case-chrome span.case.is-chrome{display:inline}html.case-chrome .not-chrome{display:none!important}html.case-firefox div.case.is-firefox{display:block}html.case-firefox span.case.is-firefox{display:inline}html.case-firefox .not-firefox{display:none!important}html.case-safari div.case.is-safari{display:block}html.case-safari span.case.is-safari{display:inline}html.case-safari .not-safari{display:none!important}html.case-edge div.case.is-edge{display:block}html.case-edge span.case.is-edge{display:inline}html.case-edge .not-edge{display:none!important}html.case-opera div.case.is-opera{display:block}html.case-opera span.case.is-opera{display:inline}html.case-opera .not-opera{display:none!important}.stamp{border-radius:2px;color:hsla(0,0%,4%,.6);font-size:.875rem;line-height:1;padding:.25em .5em;padding-top:calc(.25em + 1px);vertical-align:middle}.stamp.is-type{background-color:#ffa270}.stamp.is-tool{background-color:#eac9ff}.stamp.is-info{background-color:#a8d8ff}.stamp.is-concept{background-color:#ffe270}.stamp.is-victory{background-color:#87ffe1}.button,.content h2,.content h3,.label,.share,.side,.snippet-copy,.stab:before,.subtitle,.title{font-family:Archia,sans-serif;font-weight:600}.title{font-size:1.875rem}.title:not(.is-spaced)+.subtitle{margin-top:-1.25rem}.share em,.subtitle{font-weight:400}.subtitle a{color:#ff3860}.subtitle a:hover{color:#363636}.message-body,.panorama,.sides{box-shadow:0 2rem 4rem -1rem rgba(0,0,0,.2)}.message a:not(.button):not(.tag){border-bottom:2px solid rgba(0,0,0,.1);text-decoration:none}.message a:not(.button):not(.tag):hover{border-bottom-color:currentColor}.message-body{border-width:0 0 0 5px}.message-body p:not(:last-child){margin-bottom:.5em}#return{display:none}#return.is-active{display:block}.table-container{-webkit-overflow-scrolling:touch;overflow:auto;overflow-y:hidden;max-width:100%}.stabs{border:1px solid #dbdbdb;box-shadow:0 0 0 5px #f3f5f6;border-radius:5px;counter-reset:a}.stabs.is-vertical .stab .stabilo{white-space:normal}.stab{box-shadow:inset 0 -5px 10px #f3f5f6;counter-increment:a;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:1em;position:relative;width:100%}.stab:not(:last-child){border-bottom:1px solid #dbdbdb}.stab:before{content:counter(a);font-size:.875em;line-height:1.5rem;opacity:.5;position:absolute;right:calc(100% + 1em);top:1rem}.stab-label{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:1;flex-shrink:1;font-size:.875em;padding-right:1em}.stab-code{-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0}@media screen and (min-width:600px){.stabs:not(.is-vertical) .stab{-ms-flex-direction:row;flex-direction:row}}.shares{-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:1.5rem;margin-top:1.5rem}:root{--html:#ff470f;--css:#00d1b2;--github:#333;--facebook:#3b5998;--twitter:#55acee;--whatsapp:#25d366;--patreon:#f96854;--paypal:#012169;--fortyfour:#5f45bb;--bulma:#00d1b2;--udemy:#ec5252;--hn:#f60;--reddit:#5f99cf}.share{border-radius:5px;color:var(--brand);margin-bottom:1rem;padding:1.5em 0 1.75em;position:relative;text-align:center;transition-duration:.2s;transition-property:background-color;width:calc(50% - .5rem)}.share:before{bottom:0;left:0;position:absolute;right:0;top:0;border:3px solid var(--brand);border-radius:5px;content:"";opacity:.1}.share span{display:block}.share svg{height:2em;width:2em}.share svg path{fill:currentColor}.share em{font-size:.75em;font-style:normal;opacity:.5;position:relative}.share strong{display:block;position:relative}.share:hover{background-color:var(--brand);color:#fff}.share.is-html{--brand:var(--html)}.share.is-css{--brand:var(--css)}.share.is-github{--brand:var(--github)}.share.is-facebook{--brand:var(--facebook)}.share.is-twitter{--brand:var(--twitter)}.share.is-whatsapp{--brand:var(--whatsapp)}.share.is-paypal{--brand:var(--paypal)}.share.is-patreon{--brand:var(--patreon)}.share.is-fortyfour{--brand:var(--fortyfour);width:auto}.share.is-bulma{--brand:var(--bulma);width:auto}.share.is-hn{--brand:var(--hn);margin-bottom:0}.share.is-reddit{--brand:var(--reddit);margin-bottom:0}.share.is-css:hover img,.share.is-html:hover img,.share.is-paypal:hover img{mix-blend-mode:screen}.share.is-patreon,.share.is-paypal{width:100%}.share.is-patreon em,.share.is-paypal em{font-size:1em}.share.is-patreon strong,.share.is-paypal strong{display:inline}.share.is-udemy{padding-bottom:1em;padding-top:0}.share.is-udemy em{color:#7a7a7a;opacity:1}.share.is-udemy:hover{background-color:#f5f5f5;color:#363636}.share.is-udemy-advanced{width:100%}.content kbd{-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;font-family:monospace;font-size:.875em;font-weight:400}.content kbd.key{background-color:#f5f5f5;border:1px solid #dbdbdb;border-radius:3px;box-shadow:0 1px 0 hsla(0,0%,4%,.2),inset 0 0 0 1px #fff;color:#b86bff;padding:.25em .5em}.content h2{font-size:1.5em;padding-top:0;position:relative}.content h3{color:#ff3860;font-size:1.125em;margin:1em 0}.content table{border:1px solid #dbdbdb}.content pre{padding:1.25rem 1.5rem}.content li a,.content p a{border-bottom:2px solid rgba(50,115,220,.1);padding-bottom:2px}.content li a:hover,.content p a:hover{border-bottom-color:#3273dc}.content li a[target=_blank]:after,.content p a[target=_blank]:after{content:"↗️";font-size:.75em;margin-left:.5em;margin-right:.25em}.content .label{font-size:.875em}.content .label:not(:last-child){margin-bottom:.5em}.content .focus{margin:2em 0;text-align:center}.content .focus a{display:inline-block;vertical-align:top}.content .focus a[target=_blank]:after{display:none}.content .focus a.share{border-bottom:none;width:100%}.content .madeby{color:#7a7a7a;font-size:.875em}.content .madeby a[target=_blank]:after{content:"❤️"}.content .panorama{display:block;margin-bottom:3rem}.content .panorama img{display:block}.content .stabilo{background-color:transparent;color:#dbdbdb;white-space:nowrap}.content .stabilo span{background-color:#f3f5f6}.content .stabilo span.is-blue{color:#2795ee}.content .stabilo span.is-black{color:#39464e}.content .stabilo span.is-green{color:#249d7f}.content .stabilo span.is-red{color:#ed5c65}.content .stabilo span.is-purple{color:#a151d2}.content .newsletter{background-color:#fff8f1;border-radius:5px;margin-bottom:1.5rem;padding:2rem}.content .newsletter h3{margin-top:0}.content .newsletter .help em{color:hsla(0,0%,4%,.5);font-style:normal}@keyframes e{0%{background-color:#ffffe0}to{background-color:transparent}}.highlight{background-color:#f3f5f6;border-radius:3px}.highlight .highlight{background:none;color:orange}.highlight .highlight .kd{color:#a151d2}.highlight .highlight .mi{color:#ed5c65}.highlight .highlight .nx{color:#2795ee}.highlight .highlight .p{color:#39464e}.highlight .highlight .s1{color:#249d7f}.highlight .highlight .nb{color:#2795ee}.highlight .highlight .k,.highlight .highlight .kc,.highlight .highlight .o{color:#a151d2} -------------------------------------------------------------------------------- /favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #ffe270 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/favicons/favicon.ico -------------------------------------------------------------------------------- /favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /favicons/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.11, written by Peter Selinger 2001-2013 9 | 10 | 12 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JS in 14 minutes", 3 | "short_name": "JS in 14 minutes", 4 | "icons": [ 5 | { 6 | "src": "/favicons/android-chrome-192x192.png?v=20180315", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/favicons/android-chrome-512x512.png?v=20180315", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffe270", 17 | "background_color": "#ffe270", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /images/become_a_patron_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/become_a_patron_button.png -------------------------------------------------------------------------------- /images/become_a_patron_button@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/become_a_patron_button@2x.png -------------------------------------------------------------------------------- /images/become_a_patron_button@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/become_a_patron_button@3x.png -------------------------------------------------------------------------------- /images/bulma-free-css-framework-flexbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/bulma-free-css-framework-flexbox.png -------------------------------------------------------------------------------- /images/bulma-free-css-framework-flexbox@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/bulma-free-css-framework-flexbox@2x.png -------------------------------------------------------------------------------- /images/bulma-free-css-framework-flexbox@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/bulma-free-css-framework-flexbox@3x.png -------------------------------------------------------------------------------- /images/bulma-modern-css-framework-flexbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/bulma-modern-css-framework-flexbox.png -------------------------------------------------------------------------------- /images/bulma-modern-css-framework-flexbox@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/bulma-modern-css-framework-flexbox@2x.png -------------------------------------------------------------------------------- /images/bulma-modern-css-framework-flexbox@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/bulma-modern-css-framework-flexbox@3x.png -------------------------------------------------------------------------------- /images/css-in-44-minutes-book-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-in-44-minutes-book-cover.png -------------------------------------------------------------------------------- /images/css-in-44-minutes-book-cover@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-in-44-minutes-book-cover@2x.png -------------------------------------------------------------------------------- /images/css-in-44-minutes-book-cover@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-in-44-minutes-book-cover@3x.png -------------------------------------------------------------------------------- /images/css-in-44-minutes-html-css-ebook-tutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-in-44-minutes-html-css-ebook-tutorial.png -------------------------------------------------------------------------------- /images/css-in-44-minutes-html-css-ebook-tutorial@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-in-44-minutes-html-css-ebook-tutorial@2x.png -------------------------------------------------------------------------------- /images/css-in-44-minutes-html-css-ebook-tutorial@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-in-44-minutes-html-css-ebook-tutorial@3x.png -------------------------------------------------------------------------------- /images/css-reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-reference.png -------------------------------------------------------------------------------- /images/css-reference@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-reference@2x.png -------------------------------------------------------------------------------- /images/css-reference@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/css-reference@3x.png -------------------------------------------------------------------------------- /images/html-reference.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/html-reference.png -------------------------------------------------------------------------------- /images/html-reference@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/html-reference@2x.png -------------------------------------------------------------------------------- /images/html-reference@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/html-reference@3x.png -------------------------------------------------------------------------------- /images/javascript-in-14-minutes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/javascript-in-14-minutes.png -------------------------------------------------------------------------------- /images/made-with-bulma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/made-with-bulma.png -------------------------------------------------------------------------------- /images/paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/paypal.png -------------------------------------------------------------------------------- /images/paypal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/paypal@2x.png -------------------------------------------------------------------------------- /images/paypal@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/paypal@3x.png -------------------------------------------------------------------------------- /images/udemy-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/udemy-logo.png -------------------------------------------------------------------------------- /images/udemy-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/udemy-logo@2x.png -------------------------------------------------------------------------------- /images/udemy-logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jgthms/javascript-in-14-minutes/38b2ab3faf39b02f0900dd876d1b16897315fa0e/images/udemy-logo@3x.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |

JavaScript in 14 minutes

7 |

by Jeremy Thomas

8 | 9 |
10 | 11 | Made with Bulma 12 | 13 |
14 | 15 |
16 |

Since you've already learned Web design in 4 minutes, it's time to dive into the Web's main programming language: JavaScript.

17 |
18 | 19 | 20 | 30 | 31 | 32 |
33 |
34 |
35 |

36 | It looks like you're on a mobile device tablet! 😱 37 |

38 |

39 | But fear not! 😊 40 |

41 |

42 | While this tutorial is not optimized for this platform, I still made it readable enough for you to enjoy. 43 |

44 |

45 | You should however revisit it on a desktop later if you can, to experience all the features! 46 |

47 |

Anyway, let's get started!

48 |
49 |
50 |
51 | 52 | 53 |
54 |
55 |

I believe you are using this:

56 | 57 |
58 |
59 |
Operating System
60 |
61 | 67 |
68 |
69 |
70 |
Web Browser
71 |
72 | 80 |
81 |
82 |
83 | 84 |

If this information is correct, let's get started.

85 |
86 |
87 | 88 | 89 |
90 |
91 |

92 | It looks that you've already been here! 😃 93 |
94 | Do you want to resume from where you left off or start over? 95 |

96 |
97 |
98 |
99 | 100 | 101 |
102 |
103 |

Console tool

104 | 105 |

106 | Your browser comes with a developer console that allows you to type JavaScript directly in this webpage. 107 |

108 | 109 |
110 | Since you're using Google Chrome, open the JavaScript console with 111 | Ctrl+Shift+J or F12 112 | option+command+J 113 |
114 | 115 |
116 | Since you're using Mozilla Firefox, open the Web console with 117 | Ctrl+Shift+K or F12 118 | option+command+K 119 |
120 | 121 |
122 | Since you're using Microsoft Edge, open the JavaScript console with 123 | F12 124 |
125 | 126 |
127 | Since you're using Opera, open the JavaScript console with 128 | Ctrl+Shift+I 129 | option+command+I 130 |
131 | 132 |
133 |

Since you're using Apple Safari:

134 |
    135 |
  1. Go to Preferences with command+,
  2. 136 |
  3. Go to the Advanced tab
  4. 137 |
  5. Enable Show Develop menu in menu bar
  6. 138 |
  7. Open the JavaScript console option+command+C
  8. 139 |
140 |
141 | 142 |

Let's see if it works!

143 |

In the console, type (or paste) the following, and press Enter

144 |
145 | 146 | {% capture snippet %}{% include snippets/snippet_hello_world.md %}{% endcapture %} 147 | {% include partials/snippet.html contents=snippet %} 148 |
149 | 150 | 151 |
152 |
153 | {% include partials/gj.html %} 154 |

You've just used alert(), a native JavaScript function that comes with every browser.

155 | 156 |

But what have you done exactly?

157 |
158 | 159 | 160 | 161 |
162 |
163 |

Functions concept

164 |

You've called the alert() function with the 'Hello World!' argument.

165 | 166 |

You have basically done 4 things:

167 | 168 |
169 |
170 |
you typed the name of the function
171 |
alert('Hello World!')
172 |
173 |
174 |
you opened a parenthesis
175 |
alert('Hello World!')
176 |
177 |
178 |
you typed an argument
179 |
alert('Hello World!')
180 |
181 |
182 |
you closed the parenthesis
183 |
alert('Hello World!')
184 |
185 |
186 | 187 |

Sometimes, there's no argument.
188 | Sometimes, there's multiple arguments.
189 | Most of them are required, but some of them can be optional.

190 | 191 |

In this case, alert() requires only one argument.

192 | 193 |

But what type of argument is that?

194 |
195 |
196 | 197 | 198 |
199 |
200 |

Strings type

201 | 202 |

When you handle text, you're using strings, which are a series of characters. In our case, we used a series of 12 characters: Hello World!. This includes all lowercase and uppercase letters, the space, and the exclamation point.

203 | 204 |

To define where the string starts and where it ends, you need to wrap it in quotes (either single ' or double ").

205 | 206 |

When you defined the 'Hello World!' string:

207 | 208 |
    209 |
  1. you typed a single quote
  2. 210 |
  3. you typed the 12 characters
  4. 211 |
  5. you typed another single quote
  6. 212 |
213 | 214 |

What if you wanted to deal with numbers instead?

215 |
216 |
217 | 218 | 219 |
220 |
221 |

Numbers type

222 | 223 |

Like any other programming language, JavaScript can handle numbers.

224 | 225 |

These numbers can be big or small, with or without decimals, combined through numeric operations…

226 | 227 |

Type or paste the following snippet in your console:

228 |
229 | 230 | {% capture snippet %}{% include snippets/snippet_numbers.md %}{% endcapture %} 231 | {% include partials/snippet.html contents=snippet %} 232 |
233 | 234 | 235 |
236 |
237 | {% include partials/gj.html title="Perfect!" %} 238 | 239 |

Notice a few things:

240 | 241 | 246 | 247 |

You can find numbers in lots of places.

248 |
249 |
250 | 251 | 252 |
253 |
254 |

Browser dimensions info

255 |

Numbers are everywhere! Especially in a browser.

256 | 257 |

For example, your current browser window has a certain width that you can access with JavaScript.

258 | 259 |

Type the following:

260 | 261 | {% capture snippet %}{% include snippets/snippet_innerwidth.md %}{% endcapture %} 262 | {% include partials/snippet.html contents=snippet %} 263 |
264 |
265 | 266 | 267 |
268 |
269 | {% include partials/gj.html title="Wonderful!" %} 270 | 271 |

272 | This means your browser's window is 1680 pixels wide. 273 |

274 | 275 |

276 | As you would have guessed, window.innerHeight exists as well, as does window.scrollY, which gives you the current scroll position. 277 |

278 | 279 |

But what is window exactly?

280 |
281 |
282 | 283 | 284 |
285 |
286 |

Objects type

287 | 288 |

289 | window is a JavaScript object. 290 |

291 |

292 | innerWidth is a property of the window object. 293 |
294 | To access this property, you used a dot . to specify you wanted the innerWidth that exists within the window object. 295 |

296 | 297 |

The JavaScript object is basically a type that contains other things.

298 |

For example, window also has:

299 | 300 | 305 | 306 |

If window is an object that contains location which is another object, this means that JavaScript objects support

307 |
308 |
309 | 310 | 311 |
312 |
313 |

Nesting info

314 | 315 |

A property of an object can be an object itself (inception!).

316 | 317 |

Since window.location is an object too, it has properties of its own. To access these properties, just add another dot . and the name of the property.

318 | 319 |

For example, the href property exists:

320 | 321 | {% capture snippet %}{% include snippets/snippet_href.md %}{% endcapture %} 322 | {% include partials/snippet.html contents=snippet %} 323 |
324 |
325 | 326 | 327 |
328 |
329 | {% include partials/gj.html title="Awesome!" %} 330 | 331 |

You just displayed the full URL of this webpage. This is because:

332 | 333 | 338 | 339 |

340 | There's no limit to how deeply objects can be nested. 341 |
342 | There's also no limit to the number of properties an object can have. 343 |

344 | 345 |

346 | As we've seen, the properties of an object can be of any type: strings, numbers, objects, and even functions. In the latter case, it's called… 347 |

348 |
349 |
350 | 351 | 352 |
353 |
354 |

Methods info

355 | 356 |

When an object's property is a function, it's called a method instead.

357 | 358 |

Actually, the alert() function we've been using so far is a method of the window object!

359 | 360 | {% capture snippet %}{% include snippets/snippet_omg.md %}{% endcapture %} 361 | {% include partials/snippet.html contents=snippet %} 362 |
363 |
364 | 365 | 366 |
367 |
368 | {% include partials/gj.html title="OMG indeed!" %} 369 | 370 |

371 | Since window is the top-level object in the browser, you can access all its properties and methods directly. 372 |

373 | 374 |

375 | That's why typing location.href is the same as typing window.location.href. 376 |

377 | 378 |

379 | Or why alert() is equivalent to window.alert(). 380 |

381 | 382 |

383 | Objects are useful for grouping several properties under the same name and scope, and defining a hierarchy in the data. It's like a tree, where each branch can have other smaller branches. 384 |

385 | 386 |

387 | But what if you only needed a list of things… 388 |

389 |
390 |
391 | 392 | 393 |
394 |
395 |

Arrays type

396 | 397 |

A JavaScript array is a type that can contain multiple values, as if they were in an ordered list.

398 | 399 |

Let's pass an array of 3 strings to the alert() function:

400 | {% capture snippet %}{% include snippets/snippet_what_is_up.md %}{% endcapture %} 401 | {% include partials/snippet.html contents=snippet %} 402 |
403 |
404 | 405 | 406 |
407 |
408 | {% include partials/gj.html title="Exactly!" %} 409 | 410 |

411 | You already know the syntax for calling the alert function: alert(argument). 412 |

413 | 414 |

415 | In this case, the argument you passed is an array with 3 items that you have defined like this: 416 |

417 | 418 |
419 |
420 |
you opened a square bracket
421 |
['What', 'is', 'up']
422 |
423 |
424 |
you typed the first item of the array, a string
425 |
['What', 'is', 'up']
426 |
427 |
428 |
you typed a comma to separate the items
429 |
['What', 'is', 'up']
430 |
431 |
432 |
you added two other items to the list
433 |
['What', 'is', 'up']
434 |
435 |
436 |
you closed the square bracket
437 |
['What', 'is', 'up']
438 |
439 |
440 | 441 |

442 | An array can contain any type of values: strings, numbers, objects, other arrays, and more… 443 |

444 | 445 |

446 | Try out this snippet: 447 |

448 | 449 | {% capture snippet %}{% include snippets/snippet_list.md %}{% endcapture %} 450 | {% include partials/snippet.html contents=snippet %} 451 |
452 |
453 | 454 | 455 |
456 |
457 | {% include partials/gj.html title="True!" %} 458 | 459 |

460 | The first item 2 + 5 is a number, while the second one 'samurai' is a string. 461 |

462 | 463 |

464 | What about the third argument? It's not a string because it's not wrapped in quotes, and it's not a number either. 465 |

466 |

467 | So what is it? 468 |

469 |
470 |
471 | 472 | 473 |
474 |
475 |

Booleans type

476 | 477 |

While strings and numbers have an infinite amount of possible values, a boolean can only be either true or false.

478 | 479 |

480 | By combining the alert() function and the 3-item array on a single line, it makes our code less readable. 481 |

482 | 483 |

484 | What if we could split the two by moving the array onto its own line? 485 |

486 |
487 |
488 | 489 | 490 |
491 |
492 |

Variables concept

493 | 494 |

495 | We can move the array into a variable. 496 |

497 | 498 |

499 | A variable is a container that stores a certain value. It has a name (so you can identify and re-use it), and it has a value (so you can update it later on). 500 |

501 | 502 | {% capture snippet %}{% include snippets/snippet_array.md %}{% endcapture %} 503 | {% include partials/snippet.html contents=snippet skipRun=true %} 504 | 505 | 513 | 514 |

515 | Here's the breakdown: 516 |

517 | 518 |
519 |
520 |
you typed the keyword var
521 |
var my_things = [2 + 5, 'samurai', true];
522 |
523 |
524 |
you typed the name of the variable
525 |
var my_things = [2 + 5, 'samurai', true];
526 |
527 |
528 |
you typed the assignment operator =
529 |
var my_things = [2 + 5, 'samurai', true];
530 |
531 |
532 |
you typed the array
533 |
var my_things = [2 + 5, 'samurai', true];
534 |
535 |
536 |
you typed a semicolon to end the statement
537 |
var my_things = [2 + 5, 'samurai', true];
538 |
539 |
540 | 541 |

542 | This means that my_things is equal to [2 + 5, 'samurai', true]. 543 |

544 | 545 |

546 | We can now reinstate the alert function: 547 |

548 | 549 |

550 | Since we now have two statements, we need to separate them with a semicolon ; in order to know where one ends and the next one begins. 551 |

552 | 553 | {% capture snippet %}{% include snippets/snippet_array_alert.md %}{% endcapture %} 554 | {% include partials/snippet.html contents=snippet %} 555 |
556 |
557 | 558 | 559 |
560 |
561 | {% include partials/gj.html title="Wonderful!" %} 562 | 563 |

564 | By storing our array into a variable, we managed to make our code more readable. 565 |

566 | 567 |
568 |
569 |

570 | If you look at other recent tutorials on the Web, you'll see variables defined using the keywords const and let. While they are extremely useful, they're hard for me to explain if you're not familiar with the basics of JavaScript. 571 |

572 |

573 | So that's why I decided to use the keyword var here since it's easier to use and understand when learning JavaScript. 574 |

575 |

576 | If what I just said didn't make sense, don't worry about it and keep on reading :-) 577 |

578 |
579 |
580 | 581 |

582 | Although this my_things variable contains a list of several things, we might want to deal with only a single item of the list. 583 |

584 | 585 |

586 | To access a specific item of an array, you first need to know its index (or position) within the array. You then need to wrap this index into square brackets. 587 |

588 | 589 |

590 | Can you guess which item is gonna be displayed? 591 |

592 | 593 | {% capture snippet %}{% include snippets/snippet_array_index.md %}{% endcapture %} 594 | {% include partials/snippet.html contents=snippet %} 595 |
596 |
597 | 598 | 599 |
600 |
601 | {% include partials/gj.html title="You guessed it!" %} 602 | 603 |

604 | It's the second item that showed up! In programming, indexes start at zero 0. 605 |

606 | 607 |
608 |
609 |
you typed the name of the array
610 |
my_things[1]
611 |
612 |
613 |
you opened a square bracket
614 |
my_things[1]
615 |
616 |
617 |
you typed the index of the item you wanted to access
618 |
my_things[1]
619 |
620 |
621 |
you closed the square bracket
622 |
my_things[1]
623 |
624 |
625 | 626 |

627 | It turns out that variables are objects too! Which means that variables also have properties and methods. 628 |

629 | 630 |

631 | For example, my_things has a property called length: 632 |

633 | 634 | {% capture snippet %}{% include snippets/snippet_array_length.md %}{% endcapture %} 635 | {% include partials/snippet.html contents=snippet %} 636 |
637 |
638 | 639 | 640 |
641 |
642 | {% include partials/gj.html title="That's right!" %} 643 | 644 |

645 | The array has 3 items. You'll see that if you add or remove items in my_things, this length value will change accordingly. 646 |

647 | 648 |

649 | While readability and properties are useful, the main point of a variable is that it's editable: you can change the value afterwards! 650 |

651 | 652 | {% capture snippet %}{% include snippets/snippet_array_edit.md %}{% endcapture %} 653 | {% include partials/snippet.html contents=snippet %} 654 |
655 |
656 | 657 | 658 |
659 |
660 | {% include partials/gj.html title="Yep!" %} 661 | 662 |

663 | Two alert boxes have been displayed, but with different values! That's because between the first call and the second one, the value of my_things has been updated: a fourth item, the string 'LOVE', was added. 664 |

665 | 666 |

667 | Note that the second time we're assigning a value to my_things, we're not using the var keyword: it's because we're editing the my_things variable defined two lines above. 668 |

669 | 670 |

671 | You only use the keyword var when you're creating a new variable, not when you're editing one. 672 |

673 | 674 |

675 | Do you remember I told you variables had methods too (since they're objects)? Another way to edit an array's value is by using the push() method: 676 |

677 | 678 | {% capture snippet %}{% include snippets/snippet_array_push.md %}{% endcapture %} 679 | {% include partials/snippet.html contents=snippet %} 680 |
681 |
682 | 683 | 684 |
685 |
686 | {% include partials/gj.html title="Fantastic!" %} 687 | 688 |

689 | The my_things array ends up with 4 items. 690 |

691 | 692 |

693 | While the push() method altered the array, others simply return a value: 694 |

695 | 696 | {% capture snippet %}{% include snippets/snippet_array_includes.md %}{% endcapture %} 697 | {% include partials/snippet.html contents=snippet %} 698 |
699 |
700 | 701 | 702 |
703 |
704 | {% include partials/gj.html title="No ninja here!" %} 705 | 706 |

707 | The includes() method checked if the string 'ninja' was present in the array. Since it wasn't, the method returned false, a boolean value. 708 |

709 | 710 |

711 | As a matter of fact, when dealing with booleans, typing the keywords true or false is quite rare. Usually, booleans exist as a result of a function call (like includes()) or a comparison. 712 |

713 | 714 |

715 | Here's a "greater than" comparison: 716 |

717 | 718 | {% capture snippet %}{% include snippets/snippet_innerwidth_boolean.md %}{% endcapture %} 719 | {% include partials/snippet.html contents=snippet %} 720 |
721 |
722 | 723 | 724 |
725 |
726 | {% include partials/gj.html title="Great again!" %} 727 | 728 |

729 | This means your browser window is not wider than 400 pixels. 730 |

731 | 732 |
733 |
734 |
you typed the first item to compare, a number
735 |
window.innerWidth > 400
736 |
737 |
738 |
you typed the "greater than" operator
739 |
window.innerWidth > 400
740 |
741 |
742 |
you typed the second item, also a number
743 |
window.innerWidth > 400
744 |
745 |
746 | 747 |

748 | Just like the + and * before, > is a JavaScript operator. 749 |

750 | 751 |

752 | When you make such a comparison with the "greater than" operator >, you obtain a boolean value. 753 |

754 | 755 |

756 | Since the result of a comparison only has 2 outcomes (true or false), it's useful in cases where your code has to make a decision… 757 |

758 |
759 |
760 | 761 | 762 |
763 |
764 |

Conditional statements concept

765 | 766 |

767 | Conditional statements are one of the most important concepts in programming. They allow your code to perform certain commands only if certain conditions are met. These conditions can for example be based on: 768 |

769 | 770 | 781 | 782 |

783 | For now, let's trigger an alert box only if you happen to be on my domain! 784 |

785 | 786 | {% capture snippet %}{% include snippets/snippet_if.md %}{% endcapture %} 787 | {% include partials/snippet.html contents=snippet %} 788 | 789 |
790 |
791 |

If you want to type this code instead of simply copy-pasting it, press Shift+Enter to add line breaks in the console!

792 |
793 |
794 |
795 |
796 | 797 | 798 |
799 |
800 | {% include partials/gj.html title="Equal indeed!" %} 801 | 802 |

803 | We're doing another comparison here, but with the "equal to" operator == instead. 804 |

805 | 806 |
807 |
808 |
you typed the keyword if
809 |
if (window.location.hostname == 'jgthms.com') {
810 |
811 |
812 |
you opened a parenthesis
813 |
if (window.location.hostname == 'jgthms.com') {
814 |
815 |
816 |
you typed a comparison
817 |
if (window.location.hostname == 'jgthms.com') {
818 |
819 |
820 |
you closed the parenthesis
821 |
if (window.location.hostname == 'jgthms.com') {
822 |
823 |
824 |
you opened a curly bracket
825 |
if (window.location.hostname == 'jgthms.com') {
826 |
827 |
828 |
you entered a block of code that's only executed if the previous condition is true
829 |
  alert('Welcome on my domain! 🤗')
830 |
831 |
832 |
you closed the curly bracket
833 |
}
834 |
835 |
836 | 837 |

838 | Since the alert box did appear, it means that the hostname is indeed equal to 'jgthms.com'! 839 |

840 | 841 |

842 | We've handled the case when the comparison returns true. 843 |

844 | 845 |

846 | To handle the opposite case, when the hostname isn't 'jgthms.com', we can use the "not equal to" operator !=: 847 |

848 | 849 | {% capture snippet %}{% include snippets/snippet_if_not.md %}{% endcapture %} 850 | {% include partials/snippet.html contents=snippet skipRun=true %} 851 | 852 |

853 | If you try out this snippet, you'll see that it doesn't trigger anything! (Unless this tutorial has been copied to another domain 😆). 854 |

855 | 856 |

857 | What if we wanted to handle both cases simultaneously? We could write two if statements in a row. But since one statement is the exact opposite of the other, we can combine them with a else statment: 858 |

859 | 860 | {% capture snippet %}{% include snippets/snippet_if_else.md %}{% endcapture %} 861 | {% include partials/snippet.html contents=snippet %} 862 |
863 |
864 | 865 | 866 |
867 |
868 | {% include partials/gj.html title="Still equal!" %} 869 | 870 |

With this conditional setup, we can be sure that:

871 | 872 | 876 | 877 |

878 | While else is useful for covering all remaining cases, sometimes you want to handle more than two cases. 879 |

880 | 881 |

882 | By using else if you can add intermediate statements and handle multiple cases: 883 |

884 | 885 | {% capture snippet %}{% include snippets/snippet_else_if.md %}{% endcapture %} 886 | {% include partials/snippet.html contents=snippet %} 887 |
888 |
889 | 890 | 891 |
892 |
893 | {% include partials/gj.html title="You got it!" %} 894 | 895 |

896 | As soon as one comparison returns true, it will be triggered, and all following statements will be ignored. That's why only one alert box showed up! 897 |

898 | 899 |

900 | Conditional statements make use of the keywords if and else, followed by a set of parentheses. 901 |

902 | 903 |

904 | This pattern of keyword/parentheses combination also happens to exist for another essential programming concept… 905 |

906 |
907 |
908 | 909 | 910 |
911 |
912 |

Loops concept

913 | 914 |

915 | When you want to execute a block of code a certain amount of times, you can use a JavaScript loop. 916 |

917 | 918 |

919 | Can you guess how many alert boxes this snippet will trigger? 920 |

921 | 922 | {% capture snippet %}{% include snippets/snippet_loop.md %}{% endcapture %} 923 | {% include partials/snippet.html contents=snippet %} 924 |
925 |
926 | 927 | 928 |
929 |
930 | {% include partials/gj.html title="Three it is!" %} 931 |

932 | There were exactly 3 alert boxes! Let's dissect what happened: 933 |

934 | 935 | 952 | 953 |

954 | Here's how you implemented it: 955 |

956 | 957 |
958 |
959 |
you typed the keyword for
960 |
for (var i = 0; i < 3; i++) {
961 |
962 |
963 |
you opened a parenthesis
964 |
for (var i = 0; i < 3; i++) {
965 |
966 |
967 |
you entered the initial state
968 |
for (var i = 0; i < 3; i++) {
969 |
970 |
971 |
you typed a semicolon to separate the expressions
972 |
for (var i = 0; i < 3; i++) {
973 |
974 |
975 |
you entered the comparison check
976 |
for (var i = 0; i < 3; i++) {
977 |
978 |
979 |
you typed a semicolon to separate the expressions
980 |
for (var i = 0; i < 3; i++) {
981 |
982 |
983 |
you entered the increment expression
984 |
for (var i = 0; i < 3; i++) {
985 |
986 |
987 |
you closed the parenthesis
988 |
for (var i = 0; i < 3; i++) {
989 |
990 |
991 |
you opened a curly bracket
992 |
for (var i = 0; i < 3; i++) {
993 |
994 |
995 |
you entered a block of code that's only executed if the comparison check is true
996 |
  alert(i);
997 |
998 |
999 |
you closed the curly bracket
1000 |
}
1001 |
1002 |
1003 | 1004 |

1005 | Let's analyze each iteration of the loop: 1006 |

1007 | 1008 |
1009 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 |
IterationValue of iTestTrigger the alert?
1st00 < 3Yes
2nd11 < 3Yes
3rd22 < 3Yes
4th33 < 3No!
1045 |
1046 | 1047 |

1048 | This loop allowed us to repeat an action N times. That's what computers are all about! 1049 |

1050 | 1051 |

1052 | Of all the types of variables we've covered so far, there is one in particular worth looping through… 1053 |

1054 |
1055 |
1056 | 1057 | 1058 |
1059 |
1060 |

Looping through arrays tool

1061 | 1062 |

1063 | Arrays are a perfect candidate for loops, because in programming we often want to repeat the same action for each item of an array. 1064 |

1065 | 1066 |

1067 | Let's say we wanted to trigger an alert box for each item of an array. While we could write as many alert() statements as there are items in the array (😰), this solution is cumbersome and ineffective! It would be prone to errors, and wouldn't scale at all with bigger arrays. 1068 |

1069 | 1070 |

1071 | Since programming languages are here to help us simplify our work, let's figure out a better way. We already know a few things: 1072 |

1073 | 1074 | 1085 | 1086 |

1087 | By combining these informations, we can devise the following snippet: 1088 |

1089 | 1090 | {% capture snippet %}{% include snippets/snippet_loop_array.md %}{% endcapture %} 1091 | {% include partials/snippet.html contents=snippet %} 1092 |
1093 |
1094 | 1095 | 1096 |
1097 |
1098 | {% include partials/gj.html title="In a row!" %} 1099 | 1100 |

1101 | One by one, the items of the array were displayed in their own alert box. 1102 |

1103 | 1104 |

1105 | While using a loop simplifies the process of going through each item of an array, we still had to create a for block manually and create a new variable i whose only purpose was to increment after each loop. 1106 |

1107 | 1108 |

1109 | I know what you're thinking. "There must be a better way!" 1110 |

1111 |
1112 |
1113 | 1114 | 1115 |
1116 |
1117 |

forEach loop tool

1118 | 1119 |

1120 | Arrays actually have a method called forEach(), which allows to perform a task for each item in the array: 1121 |

1122 | 1123 | {% capture snippet %}{% include snippets/snippet_loop_foreach.md %}{% endcapture %} 1124 | {% include partials/snippet.html contents=snippet %} 1125 |
1126 |
1127 | 1128 | 1129 |
1130 |
1131 | {% include partials/gj.html title="Better!" %} 1132 | 1133 |

1134 | Note a few improvements: 1135 |

1136 | 1137 | 1148 | 1149 |

1150 | Remember the syntax of the alert() function? It was alert(argument). 1151 |

1152 | 1153 |

1154 | If you look carefully, you can see that forEach() has the exact same syntax! It's forEach(argument) but where the argument happens to be a function that spans 3 lines. 1155 |

1156 | 1157 |

1158 | So far, we've used a few functions and methods: 1159 |

1160 | 1161 | 1175 | 1176 |

1177 | We know how to call a function, but how do you actually create one? 1178 |

1179 |
1180 |
1181 | 1182 | 1183 |
1184 |
1185 |

Creating a custom function info

1186 | 1187 |

1188 | The power of programming languages is the ability to create your own functions, that fit your needs. 1189 |

1190 | 1191 |

1192 | Remember the keyword/parentheses combination that we used for if/else and for? Well, guess what: it's almost the same pattern here! 1193 |

1194 | 1195 |

1196 | I'm saying "almost" because the only difference is that a function needs a name! 1197 |

1198 | 1199 |

1200 | Let's create a function called greet(), with 1 parameter called name, and then immediately call it: 1201 |

1202 | 1203 | {% capture snippet %}{% include snippets/snippet_greet.md %}{% endcapture %} 1204 | {% include partials/snippet.html contents=snippet %} 1205 |
1206 |
1207 | 1208 | 1209 |
1210 |
1211 | {% include partials/gj.html title="Greetings!" %} 1212 | 1213 |

1214 | You've created your first function! It's a simple one but it can teach you a lot. 1215 |

1216 | 1217 |

1218 | Note a few things: 1219 |

1220 | 1221 | 1241 | 1242 |
1243 |
1244 |

1245 | You might wonder why we're calling name a parameter when so far we've called argument the things we pass to a function. Well there's a difference! 1246 |

1247 |
    1248 |
  • 1249 | When you define a function with function greet(name), name is here a parameter: it's like a variable in your function's definition. 1250 |
  • 1251 |
  • 1252 | When you call a function with greet('Alex'), 'Alex' is here an argument: it's the data you pass to the function when calling it. 1253 |
  • 1254 |
1255 |

1256 | So whether you define a function or call it, you describe what's in the parenthesis as either parameters or arguments. 1257 |

1258 |
1259 |
1260 | 1261 |

1262 | If we break it down step by step: 1263 |

1264 | 1265 |
1266 |
1267 |
you typed the keyword function
1268 |
function greet(name) {
1269 |
1270 |
1271 |
you typed the name of the function
1272 |
function greet(name) {
1273 |
1274 |
1275 |
you opened a parenthesis
1276 |
function greet(name) {
1277 |
1278 |
1279 |
you created a parameter called name
1280 |
function greet(name) {
1281 |
1282 |
1283 |
you closed the parenthesis
1284 |
function greet(name) {
1285 |
1286 |
1287 |
you opened a curly bracket
1288 |
function greet(name) {
1289 |
1290 |
1291 |
you entered a block of code that's only executed whenever the function is called
1292 |
  var message = 'Hey there ' + name;
  alert(message);
1293 |
1294 |
1295 |
you closed the curly bracket
1296 |
}
1297 |
1298 |
1299 |
you called the function with a string as argument
1300 |
greet('Alex');
1301 |
1302 |
1303 | 1304 |

1305 | Unless we call the greet() function at the end, nothing happens! That's because the alert() call is inside the scope of greet() so it's not triggered unless the parent function greet() itself is called! 1306 |

1307 | 1308 |

1309 | Basically, by creating greet(), you're only telling the browser: "Hey! I've created this new function. So if at some point I call it, please execute whatever is inside!". 1310 |

1311 | 1312 |

1313 | That's why, when you call greet() at the end, the browser executes its content, which happens to be calling alert(). 1314 |

1315 | 1316 |

1317 | It's important to understand that functions are a 2-step process: creating it first, calling it afterwards. 1318 |

1319 | 1320 |

1321 | As a matter of fact, the alert() function we've used all along was already created beforehand. It just exists somewhere inside your browser. 1322 |

1323 | 1324 |

1325 | Anyway, we've already covered a lot in 14 minutes!
1326 | So, what's next? 1327 |

1328 |
1329 |
1330 | 1331 | 1332 |
1333 |
1334 |

Next steps victory!

1335 | 1336 |

Learn JavaScript

1337 | 1338 |

1339 | We've barely covered the basics here. But don't worry! There are tons of resources available online! 1340 |

1341 | 1342 |

1343 | Here are a few free resources I'd recommend: 1344 |

1345 | 1346 | 1363 | 1364 |

1365 | If you prefer video tutorials, check out these Udemy courses: 1366 |

1367 | 1368 | 1401 | 1402 |

1403 | If you're in a rush, try this shorter course! 1404 |

1405 | 1406 | 1423 | 1424 |

Learn HTML and CSS

1425 | 1426 |

1427 | JavaScript is only one third of what makes a webpage! You also need to know HTML and CSS. 1428 |

1429 | 1430 |

1431 | Luckily, I've created two free references for you to browse through, so you can learn everything each language has to offer! 1432 |

1433 | 1434 | 1470 | 1471 |

Learn my CSS framework

1472 | 1473 |

1474 | I designed this page with Bulma, my free open source CSS framework based on Flexbox. Check it out! 1475 |

1476 | 1477 | {% 1478 | include partials/panorama.html 1479 | class_name="bulma" 1480 | href="https://bulma.io/" 1481 | path="bulma-modern-css-framework-flexbox" 1482 | extension="png" 1483 | alt="Bulma CSS framework based on Flexbox" 1484 | width="256" 1485 | height="160" 1486 | %} 1487 | 1488 |

Read my book

1489 | 1490 |

1491 | I wrote a 44-page PDF called "CSS in 44 minutes" which teaches how to build your own personal webpage from scratch with HTML5 and CSS3. 1492 |

1493 | 1494 | {% 1495 | include partials/panorama.html 1496 | class_name="fortyfour" 1497 | href="https://jgthms.com/css-in-44-minutes-ebook" 1498 | path="css-in-44-minutes-book-cover" 1499 | extension="png" 1500 | alt="CSS in 44 minutes ebook" 1501 | width="168" 1502 | height="235" 1503 | %} 1504 | 1505 |

1506 | As a bonus, the book also includes a small chapter on JavaScript in which I talk about functions, conditionals, objects, strings, and even explains how to interact with CSS. 1507 |

1508 | 1509 |

1510 | I guess now there's only one thing left to do… 1511 |

1512 |
1513 |
1514 | 1515 | 1516 |
1517 |
1518 |

Share and support! 😍

1519 | 1520 | 1591 | 1592 | {% include partials/newsletter.html %} 1593 | 1594 |

1595 | Thanks for reading! 1596 |

1597 | 1598 |

1599 | Made by @jgthms 1600 |

1601 |
1602 |
1603 | 1604 | 1644 | -------------------------------------------------------------------------------- /lib/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var memory = Cookies.getJSON('memory') || {}; 4 | 5 | var html_el = document.documentElement; 6 | var platform_el = document.getElementById('platform'); 7 | var os_el = document.getElementById('os'); 8 | var browser_el = document.getElementById('browser'); 9 | var browser_width_el = document.getElementById('browserWidth'); 10 | var wider_el = document.getElementById('wider'); 11 | var return_el = document.getElementById('return'); 12 | var resume_el = document.getElementById('resume'); 13 | var reset_el = document.getElementById('reset'); 14 | 15 | var state = { 16 | current_step: 0, 17 | platform: '', 18 | browser: '', 19 | os: '' 20 | }; 21 | 22 | window.old_alert = window.alert; 23 | window.alert = function (str) { 24 | window.old_alert.apply(this, arguments); 25 | var function_to_call = 'checkStep' + state.current_step; 26 | if (window[function_to_call]) { 27 | window[function_to_call](str); 28 | } 29 | }; 30 | 31 | function checkStep1(str) { 32 | if (str == 'Hello World!') { 33 | return showStep(2); 34 | } else if (str.toLowerCase() == 'hello world!') { 35 | return console.log('Watch out! In JavaScript, uppercase and lowercase letters are different. Make sure all letters have the proper case.'); 36 | } 37 | console.log('Please type the correct string.'); 38 | } 39 | 40 | function checkStep5(str) { 41 | if (str == 24) { 42 | return showStep(6); 43 | } 44 | console.log('Try again!'); 45 | } 46 | 47 | function checkStep7(str) { 48 | if (str == window.innerWidth) { 49 | browser_width_el.innerHTML = window.innerWidth; 50 | return showStep(8); 51 | } 52 | console.log('The answer should be ' + window.innerWidth + '!'); 53 | } 54 | 55 | function checkStep10(str) { 56 | if (str == window.location.href) { 57 | return showStep(11); 58 | } 59 | } 60 | 61 | function checkStep12(str) { 62 | if (str == 'OMG') { 63 | return showStep(13); 64 | } 65 | } 66 | 67 | function checkStep14(str) { 68 | if (str == 'What,is,up') { 69 | return showStep(15); 70 | } 71 | } 72 | 73 | function checkStep15(str) { 74 | if (str == '7,samurai,true') { 75 | return showStep(16); 76 | } 77 | } 78 | 79 | function checkStep18(str) { 80 | if (!state.desktop) { 81 | return showStep(19); 82 | } else if (typeof my_things == 'undefined') { 83 | return console.log('Please create an array called "my_things".'); 84 | } else if (str == my_things) { 85 | return showStep(19); 86 | } 87 | } 88 | 89 | function checkStep19(str) { 90 | if (!state.desktop) { 91 | return showStep(20); 92 | } else if (typeof my_things == 'undefined') { 93 | return console.log('Please create an array called "my_things".'); 94 | } else if (my_things.length < 2) { 95 | return console.log('Please create an array with at least 2 items.'); 96 | } else if (str != my_things[1]) { 97 | return console.log('Please choose the item at index 1.'); 98 | } else if (str == my_things[1]) { 99 | return showStep(20); 100 | } 101 | console.log('Please create an array called "my_things" and choose the item at index 1.'); 102 | } 103 | 104 | function checkStep20(str) { 105 | if (!state.desktop) { 106 | return showStep(21); 107 | } else if (typeof my_things == 'undefined') { 108 | return console.log('Please create an array called "my_things".'); 109 | } else if (str == my_things.length) { 110 | return showStep(21); 111 | } 112 | console.log('Please create an array called "my_things".'); 113 | } 114 | 115 | function checkStep21(str) { 116 | if (!state.desktop) { 117 | return showStep(22); 118 | } else if (typeof my_things == 'undefined') { 119 | return console.log('Please create an array called "my_things".'); 120 | } else if (str == '7,samurai,true') { 121 | return; 122 | } else if (str == '7,samurai,true,LOVE') { 123 | return showStep(22); 124 | } 125 | console.log('Please create an array called "my_things" and add the string "LOVE".'); 126 | } 127 | 128 | function checkStep22(str) { 129 | if (!state.desktop) { 130 | return showStep(23); 131 | } else if (typeof my_things == 'undefined') { 132 | return console.log('Please create an array called "my_things".'); 133 | } else if (str == '7,samurai,true') { 134 | return; 135 | } else if (str == '7,samurai,true,The Button') { 136 | return showStep(23); 137 | } 138 | console.log('Please create an array called "my_things" and add the string "The Button".'); 139 | } 140 | 141 | function checkStep23(str) { 142 | if (!state.desktop) { 143 | return showStep(24); 144 | } else if (typeof my_things == 'undefined') { 145 | return console.log('Please create an array called "my_things".'); 146 | } else if (str == true) { 147 | return console.log('Please test for an element that is NOT in the array.'); 148 | } else if (str == false) { 149 | return showStep(24); 150 | } 151 | console.log('Please create an array called "my_things" and call the method "includes()".'); 152 | } 153 | 154 | function checkStep24(str) { 155 | if (str == window.innerWidth > 400) { 156 | var displaying = window.innerWidth > 400 ? 'none' : 'inline'; 157 | wider.style.display = displaying; 158 | return showStep(25); 159 | } 160 | console.log('Try again!'); 161 | } 162 | 163 | function checkStep26(str) { 164 | if (str.startsWith('Welcome on my domain')) { 165 | return showStep(27); 166 | } 167 | console.log('Try again!'); 168 | } 169 | 170 | function checkStep27(str) { 171 | if (str.startsWith('Welcome on my domain')) { 172 | return showStep(28); 173 | } else if (str.startsWith('Please come back soon')) { 174 | return console.log('Make sure you use the "==" operator.'); 175 | } 176 | console.log('Try again!'); 177 | } 178 | 179 | function checkStep28(str) { 180 | if (window.innerWidth > 2000 && str.startsWith('Big screen') || window.innerWidth < 600 && str.startsWith('Probably a mobile phone')) { 181 | return showStep(29); 182 | } else if (str.startsWith('Decent size')) { 183 | return showStep(29); 184 | } 185 | console.log('Make sure you type all statements in the correct order.'); 186 | } 187 | 188 | function checkStep30(str) { 189 | if (str == '0' || str == '1') { 190 | return; 191 | } else if (str == '2') { 192 | return showStep(31); 193 | } 194 | console.log('Try again!'); 195 | } 196 | 197 | function checkArrayLoop(str, nextStep) { 198 | if (!state.desktop) { 199 | return showStep(nextStep); 200 | } else if (typeof my_things == 'undefined') { 201 | return console.log('Please create an array called "my_things".'); 202 | } else if (my_things.length < 2) { 203 | return console.log('Please create an array with at least 2 items.'); 204 | } else if (str == my_things[my_things.length - 1]) { 205 | return showStep(nextStep); 206 | } else if (my_things.includes(str)) { 207 | return; 208 | } 209 | console.log('Please create an array called "my_things" and loop through it.'); 210 | } 211 | 212 | function checkStep32(str) { 213 | checkArrayLoop(str, 33); 214 | } 215 | 216 | function checkStep34(str) { 217 | checkArrayLoop(str, 35); 218 | } 219 | 220 | function checkStep36(str) { 221 | if (!state.desktop) { 222 | return showStep(37); 223 | } else if (typeof greet == 'undefined') { 224 | return console.log('Please create a function called "greet".'); 225 | } else if (str.startsWith('Hey there ')) { 226 | return showStep(37); 227 | } 228 | console.log('Please create a function called "greet" and call it with the parameter \'Alex\'.'); 229 | } 230 | 231 | function showStep(num) { 232 | var skipSave = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 233 | 234 | showElement('step' + num); 235 | state.current_step = num; 236 | 237 | return_el.classList.remove('is-active'); 238 | 239 | if (!skipSave) { 240 | memory['latest_step'] = num; 241 | Cookies.set('memory', memory); 242 | } 243 | 244 | if (num == 3) { 245 | showSide('sides'); 246 | showSide('sideConcepts'); 247 | showSide('sideFunctions'); 248 | } else if (num == 4) { 249 | showSide('sideTypes'); 250 | showSide('sideStrings'); 251 | } else if (num == 5) { 252 | showSide('sideNumbers'); 253 | } else if (num == 9) { 254 | showSide('sideObjects'); 255 | } else if (num == 14) { 256 | showSide('sideArrays'); 257 | } else if (num == 17) { 258 | showSide('sideBooleans'); 259 | } else if (num == 18) { 260 | showSide('sideVariables'); 261 | } else if (num == 26) { 262 | showSide('sideConditionals'); 263 | } else if (num == 30) { 264 | showSide('sideLoops'); 265 | } 266 | } 267 | 268 | function showElement(id) { 269 | var el = document.getElementById(id); 270 | if (el) { 271 | el.classList.add('is-active'); 272 | el.scrollIntoView(true); 273 | } 274 | } 275 | 276 | function showSide(id) { 277 | var el = document.getElementById(id); 278 | if (el) { 279 | el.classList.add('is-active'); 280 | } 281 | } 282 | 283 | function runSnippet() { 284 | var els = document.querySelectorAll('.run-snippet'); 285 | if (els.length > 0) { 286 | els.forEach(function (el) { 287 | var snippet_contents = el.previousElementSibling.firstElementChild.firstElementChild.firstElementChild.firstElementChild; 288 | var snippet_code = snippet_contents.outerText; 289 | var run_button = el.querySelector('a'); 290 | run_button.addEventListener('click', function () { 291 | eval(snippet_code); 292 | }); 293 | }); 294 | } 295 | } 296 | 297 | function detectPlatform() { 298 | state.mobile = bowser.mobile || false; 299 | state.tablet = bowser.tablet || false; 300 | state.desktop = !state.mobile && !state.tablet; 301 | 302 | if (state.mobile) { 303 | state.platform = 'mobile'; 304 | } else if (state.tablet) { 305 | state.platform = 'tablet'; 306 | } else if (state.desktop) { 307 | state.platform = 'desktop'; 308 | } 309 | 310 | if (bowser.chrome || bowser.chromium) { 311 | state.browser = 'chrome'; 312 | } else if (bowser.firefox) { 313 | state.browser = 'firefox'; 314 | } else if (bowser.msedge) { 315 | state.browser = 'edge'; 316 | } else if (bowser.safari) { 317 | state.browser = 'safari'; 318 | } else if (bowser.opera) { 319 | state.browser = 'opera'; 320 | } 321 | 322 | if (bowser.mac) { 323 | state.os = 'mac'; 324 | } else if (bowser.windows) { 325 | state.os = 'windows'; 326 | } else if (bowser.linux) { 327 | state.os = 'linux'; 328 | } 329 | 330 | os_el.value = state.os; 331 | browser_el.value = state.browser; 332 | setPlatform(); 333 | } 334 | 335 | function setPlatform() { 336 | html_el.className = ''; 337 | html_el.classList.add('case-' + state.platform); 338 | html_el.classList.add('case-' + state.browser); 339 | html_el.classList.add('case-' + state.os); 340 | } 341 | 342 | function jumpToStep(num) { 343 | for (var i = 1; i <= num; i++) { 344 | showStep(i, true); 345 | } 346 | } 347 | 348 | function resetSteps() { 349 | return_el.classList.remove('is-active'); 350 | window.scrollTo(0, 0); 351 | memory = {}; 352 | Cookies.remove('memory'); 353 | } 354 | 355 | document.addEventListener('DOMContentLoaded', function () { 356 | detectPlatform(); 357 | runSnippet(); 358 | 359 | os_el.addEventListener('change', function (event) { 360 | state.os = event.target.value; 361 | setPlatform(); 362 | }); 363 | 364 | browser_el.addEventListener('change', function (event) { 365 | state.browser = event.target.value; 366 | setPlatform(); 367 | }); 368 | 369 | resume_el.addEventListener('click', function (event) { 370 | jumpToStep(memory.latest_step); 371 | }); 372 | 373 | reset_el.addEventListener('click', function (event) { 374 | var answer = confirm('Are you sure?'); 375 | if (answer == true) { 376 | resetSteps(); 377 | } 378 | }); 379 | 380 | if (memory && memory.hasOwnProperty('latest_step')) { 381 | return_el.classList.add('is-active'); 382 | } 383 | 384 | new ClipboardJS('.snippet-copy', { 385 | target: function target(trigger) { 386 | return trigger.previousElementSibling.firstElementChild.firstElementChild.firstElementChild.firstElementChild; 387 | } 388 | }); 389 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "javascript-in-14-minutes", 3 | "version": "0.0.1", 4 | "description": "JavaScript in 14 minutes", 5 | "keywords": [ 6 | "sass", 7 | "bulma", 8 | "css", 9 | "tutorial", 10 | "javascript" 11 | ], 12 | "author": "Jeremy Thomas (https://jgthms.com)", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "autoprefixer": "^7.1.5", 16 | "babel-cli": "^6.26.0", 17 | "babel-preset-env": "^1.6.0", 18 | "babel-preset-es2015-ie": "^6.7.0", 19 | "bulma": "^0.6.0", 20 | "cssnano": "^3.10.0", 21 | "node-sass": "^4.5.3", 22 | "postcss-cli": "^4.1.1" 23 | }, 24 | "scripts": { 25 | "css-deploy": "npm run css-build && npm run css-autoprefix && npm run css-minify", 26 | "css-build": "node-sass _sass/main.sass css/main.css", 27 | "css-autoprefix": "postcss --no-map --use autoprefixer --output css/main.css css/main.css", 28 | "css-minify": "postcss --no-map --use cssnano --output css/main.min.css css/main.css", 29 | "css-watch": "npm run css-build -- --watch", 30 | "deploy": "npm run css-deploy && npm run js-build", 31 | "js-build": "babel _javascript --out-dir lib", 32 | "js-watch": "npm run js-build -- --watch", 33 | "start": "npm run css-watch | npm run js-watch" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/bowser-1.9.3.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bowser - a browser detector 3 | * https://github.com/ded/bowser 4 | * MIT License | (c) Dustin Diaz 2015 5 | */ 6 | !function(e,t,n){typeof module!="undefined"&&module.exports?module.exports=n():typeof define=="function"&&define.amd?define(t,n):e[t]=n()}(this,"bowser",function(){function t(t){function n(e){var n=t.match(e);return n&&n.length>1&&n[1]||""}function r(e){var n=t.match(e);return n&&n.length>1&&n[2]||""}function N(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return undefined}}var i=n(/(ipod|iphone|ipad)/i).toLowerCase(),s=/like android/i.test(t),o=!s&&/android/i.test(t),u=/nexus\s*[0-6]\s*/i.test(t),a=!u&&/nexus\s*[0-9]+/i.test(t),f=/CrOS/.test(t),l=/silk/i.test(t),c=/sailfish/i.test(t),h=/tizen/i.test(t),p=/(web|hpw)os/i.test(t),d=/windows phone/i.test(t),v=/SamsungBrowser/i.test(t),m=!d&&/windows/i.test(t),g=!i&&!l&&/macintosh/i.test(t),y=!o&&!c&&!h&&!p&&/linux/i.test(t),b=r(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),w=n(/version\/(\d+(\.\d+)?)/i),E=/tablet/i.test(t)&&!/tablet pc/i.test(t),S=!E&&/[^-]mobi/i.test(t),x=/xbox/i.test(t),T;/opera/i.test(t)?T={name:"Opera",opera:e,version:w||n(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(t)?T={name:"Opera",opera:e,version:n(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||w}:/SamsungBrowser/i.test(t)?T={name:"Samsung Internet for Android",samsungBrowser:e,version:w||n(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(t)?T={name:"Opera Coast",coast:e,version:w||n(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(t)?T={name:"Yandex Browser",yandexbrowser:e,version:w||n(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(t)?T={name:"UC Browser",ucbrowser:e,version:n(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(t)?T={name:"Maxthon",maxthon:e,version:n(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(t)?T={name:"Epiphany",epiphany:e,version:n(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(t)?T={name:"Puffin",puffin:e,version:n(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(t)?T={name:"Sleipnir",sleipnir:e,version:n(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(t)?T={name:"K-Meleon",kMeleon:e,version:n(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:d?(T={name:"Windows Phone",osname:"Windows Phone",windowsphone:e},b?(T.msedge=e,T.version=b):(T.msie=e,T.version=n(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?T={name:"Internet Explorer",msie:e,version:n(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:f?T={name:"Chrome",osname:"Chrome OS",chromeos:e,chromeBook:e,chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(t)?T={name:"Microsoft Edge",msedge:e,version:b}:/vivaldi/i.test(t)?T={name:"Vivaldi",vivaldi:e,version:n(/vivaldi\/(\d+(\.\d+)?)/i)||w}:c?T={name:"Sailfish",osname:"Sailfish OS",sailfish:e,version:n(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(t)?T={name:"SeaMonkey",seamonkey:e,version:n(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(t)?(T={name:"Firefox",firefox:e,version:n(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(t)&&(T.firefoxos=e,T.osname="Firefox OS")):l?T={name:"Amazon Silk",silk:e,version:n(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(t)?T={name:"PhantomJS",phantom:e,version:n(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(t)?T={name:"SlimerJS",slimer:e,version:n(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(t)||/rim\stablet/i.test(t)?T={name:"BlackBerry",osname:"BlackBerry OS",blackberry:e,version:w||n(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:p?(T={name:"WebOS",osname:"WebOS",webos:e,version:w||n(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(t)&&(T.touchpad=e)):/bada/i.test(t)?T={name:"Bada",osname:"Bada",bada:e,version:n(/dolfin\/(\d+(\.\d+)?)/i)}:h?T={name:"Tizen",osname:"Tizen",tizen:e,version:n(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||w}:/qupzilla/i.test(t)?T={name:"QupZilla",qupzilla:e,version:n(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||w}:/chromium/i.test(t)?T={name:"Chromium",chromium:e,version:n(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||w}:/chrome|crios|crmo/i.test(t)?T={name:"Chrome",chrome:e,version:n(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:o?T={name:"Android",version:w}:/safari|applewebkit/i.test(t)?(T={name:"Safari",safari:e},w&&(T.version=w)):i?(T={name:i=="iphone"?"iPhone":i=="ipad"?"iPad":"iPod"},w&&(T.version=w)):/googlebot/i.test(t)?T={name:"Googlebot",googlebot:e,version:n(/googlebot\/(\d+(\.\d+))/i)||w}:T={name:n(/^(.*)\/(.*) /),version:r(/^(.*)\/(.*) /)},!T.msedge&&/(apple)?webkit/i.test(t)?(/(apple)?webkit\/537\.36/i.test(t)?(T.name=T.name||"Blink",T.blink=e):(T.name=T.name||"Webkit",T.webkit=e),!T.version&&w&&(T.version=w)):!T.opera&&/gecko\//i.test(t)&&(T.name=T.name||"Gecko",T.gecko=e,T.version=T.version||n(/gecko\/(\d+(\.\d+)?)/i)),!T.windowsphone&&(o||T.silk)?(T.android=e,T.osname="Android"):!T.windowsphone&&i?(T[i]=e,T.ios=e,T.osname="iOS"):g?(T.mac=e,T.osname="macOS"):x?(T.xbox=e,T.osname="Xbox"):m?(T.windows=e,T.osname="Windows"):y&&(T.linux=e,T.osname="Linux");var C="";T.windows?C=N(n(/Windows ((NT|XP)( \d\d?.\d)?)/i)):T.windowsphone?C=n(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):T.mac?(C=n(/Mac OS X (\d+([_\.\s]\d+)*)/i),C=C.replace(/[_\s]/g,".")):i?(C=n(/os (\d+([_\s]\d+)*) like mac os x/i),C=C.replace(/[_\s]/g,".")):o?C=n(/android[ \/-](\d+(\.\d+)*)/i):T.webos?C=n(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):T.blackberry?C=n(/rim\stablet\sos\s(\d+(\.\d+)*)/i):T.bada?C=n(/bada\/(\d+(\.\d+)*)/i):T.tizen&&(C=n(/tizen[\/\s](\d+(\.\d+)*)/i)),C&&(T.osversion=C);var k=!T.windows&&C.split(".")[0];if(E||a||i=="ipad"||o&&(k==3||k>=4&&!S)||T.silk)T.tablet=e;else if(S||i=="iphone"||i=="ipod"||o||u||T.blackberry||T.webos||T.bada)T.mobile=e;return T.msedge||T.msie&&T.version>=10||T.yandexbrowser&&T.version>=15||T.vivaldi&&T.version>=1||T.chrome&&T.version>=20||T.samsungBrowser&&T.version>=4||T.firefox&&T.version>=20||T.safari&&T.version>=6||T.opera&&T.version>=10||T.ios&&T.osversion&&T.osversion.split(".")[0]>=6||T.blackberry&&T.version>=10.1||T.chromium&&T.version>=20?T.a=e:T.msie&&T.version<10||T.chrome&&T.version<20||T.firefox&&T.version<20||T.safari&&T.version<6||T.opera&&T.version<10||T.ios&&T.osversion&&T.osversion.split(".")[0]<6||T.chromium&&T.version<20?T.c=e:T.x=e,T}function r(e){return e.split(".").length}function i(e,t){var n=[],r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r=0){if(n[0][t]>n[1][t])return 1;if(n[0][t]!==n[1][t])return-1;if(t===0)return 0}}function o(e,r,i){var o=n;typeof r=="string"&&(i=r,r=void 0),r===void 0&&(r=!1),i&&(o=t(i));var u=""+o.version;for(var a in e)if(e.hasOwnProperty(a)&&o[a]){if(typeof e[a]!="string")throw new Error("Browser version in the minVersion map should be a string: "+a+": "+String(e));return s([u,e[a]])<0}return r}function u(e,t,n){return!o(e,t,n)}var e=!0,n=t(typeof navigator!="undefined"?navigator.userAgent||"":"");return n.test=function(e){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return r(t,e,n);if(c.nodeList(t))return i(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return u(document.body,t,e,n)}var c=n(6),u=n(5);t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;o0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){function n(t,e){for(;t&&t.nodeType!==o;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function r(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,r,i)}))}function i(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(4);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}t.exports=n}])}); -------------------------------------------------------------------------------- /vendor/js.cookie-2.1.4.min.js: -------------------------------------------------------------------------------- 1 | /*! js-cookie v2.1.4 | MIT */ 2 | 3 | !function(a){var b=!1;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.Cookies,d=window.Cookies=a();d.noConflict=function(){return window.Cookies=c,d}}}(function(){function a(){for(var a=0,b={};a1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}f.expires=f.expires?f.expires.toUTCString():"";try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(p){}e=c.write?c.write(e,b):encodeURIComponent(e+"").replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(b+""),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape);var i="";for(var j in f)f[j]&&(i+="; "+j,!0!==f[j]&&(i+="="+f[j]));return document.cookie=b+"="+e+i}b||(g={});for(var k=document.cookie?document.cookie.split("; "):[],l=0;l0){e.observer.unobserve(t.target);let s=t.target.getAttribute(e.settings.src),r=t.target.getAttribute(e.settings.srcset);"img"===t.target.tagName.toLowerCase()?(s&&(t.target.src=s),r&&(t.target.srcset=r)):t.target.style.backgroundImage="url("+s+")"}})},s),this.images.forEach(function(t){e.observer.observe(t)})},loadAndDestroy:function(){this.settings&&(this.loadImages(),this.destroy())},loadImages:function(){if(!this.settings)return;let t=this;this.images.forEach(function(e){let s=e.getAttribute(t.settings.src),r=e.getAttribute(t.settings.srcset);"img"===e.tagName.toLowerCase()?(s&&(e.src=s),r&&(e.srcset=r)):e.style.backgroundImage="url("+s+")"})},destroy:function(){this.settings&&(this.observer.disconnect(),this.settings=null)}},t.lazyload=function(t,s){return new e(t,s)},t.jQuery){const s=t.jQuery;s.fn.lazyload=function(t){return t=t||{},t.attribute=t.attribute||"data-src",new e(s.makeArray(this),t),this}}return e}); 3 | --------------------------------------------------------------------------------