ESLint, comments, quality and speed menus
This commit is contained in:
		
							
								
								
									
										19
									
								
								.eslintrc.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.eslintrc.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| { | ||||
|     "env": { | ||||
|         "browser": true | ||||
|     }, | ||||
|     "rules": { | ||||
|         "no-const-assign": "warn", | ||||
|         "no-this-before-super": "warn", | ||||
|         "no-undef": "warn", | ||||
|         "no-unreachable": "warn", | ||||
|         "no-unused-vars": "warn", | ||||
|         "constructor-super": "warn", | ||||
|         "valid-typeof": "warn", | ||||
|         "indent": ["error", 4, { | ||||
|             "SwitchCase": 1 | ||||
|         }], | ||||
|         "quotes": ["error", "single"], | ||||
|         "semi": ["error", "always"] | ||||
|     } | ||||
| } | ||||
							
								
								
									
										55
									
								
								.jshintrc
									
									
									
									
									
								
							
							
						
						
									
										55
									
								
								.jshintrc
									
									
									
									
									
								
							| @ -1,55 +0,0 @@ | ||||
| { | ||||
|     // Settings | ||||
|     "passfail"      : false,  // Stop on first error. | ||||
|     "maxerr"        : 100,    // Maximum error before stopping. | ||||
|  | ||||
|     // Predefined globals whom JSHint will ignore. | ||||
|     "browser"       : true,   // Standard browser globals e.g. `window`, `document`. | ||||
|     "node"          : false, | ||||
|     "rhino"         : false, | ||||
|     "couch"         : false, | ||||
|     "wsh"           : false,   // Windows Scripting Host. | ||||
|     "jquery"        : false, | ||||
|  | ||||
|     // Development. | ||||
|     "debug"         : false,  // Allow debugger statements e.g. browser breakpoints. | ||||
|     "devel"         : false,   // Allow developments statements e.g. `console.log();`. | ||||
|  | ||||
|     // ECMAScript 5. | ||||
|     "strict"        : false,  // Require `use strict` pragma  in every file. | ||||
|     "globalstrict"  : false,  // Allow global "use strict" (also enables 'strict'). | ||||
|  | ||||
|     // The Good Parts. | ||||
|     "asi"           : true,  // Tolerate Automatic Semicolon Insertion (no semicolons). | ||||
|     "laxbreak"      : true,   // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. | ||||
|     "bitwise"       : false,  // Prohibit bitwise operators (&, |, ^, etc.). | ||||
|     "boss"          : false,  // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. | ||||
|     "curly"         : true,   // Require {} for every new block or scope. | ||||
|     "eqeqeq"        : true,  // Require triple equals i.e. `===`. | ||||
|     "eqnull"        : false,  // Tolerate use of `== null`. | ||||
|     "evil"          : false,  // Tolerate use of `eval`. | ||||
|     "expr"          : false,  // Tolerate `ExpressionStatement` as Programs. | ||||
|     "forin"         : false,  // Tolerate `for in` loops without `hasOwnPrototype`. | ||||
|     "immed"         : true,   // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` | ||||
|     "latedef"       : false,  // Prohipit variable use before definition. | ||||
|     "loopfunc"      : true,   // Allow functions to be defined within loops. | ||||
|     "noarg"         : true,   // Prohibit use of `arguments.caller` and `arguments.callee`. | ||||
|     "regexp"        : true,   // Prohibit `.` and `[^...]` in regular expressions. | ||||
|     "regexdash"     : false,  // Tolerate unescaped last dash i.e. `[-...]`. | ||||
|     "scripturl"     : true,   // Tolerate script-targeted URLs. | ||||
|     "shadow"        : false,  // Allows re-define variables later in code e.g. `var x=1; x=2;`. | ||||
|     "supernew"      : false,  // Tolerate `new function () { ... };` and `new Object;`. | ||||
|     "undef"         : true,   // Require all non-global variables be declared before they are used. | ||||
|  | ||||
|     // Personal styling preferences. | ||||
|     "newcap"        : true,   // Require capitalization of all constructor functions e.g. `new F()`. | ||||
|     "noempty"       : true,   // Prohibit use of empty blocks. | ||||
|     "nonew"         : true,   // Prohibit use of constructors for side-effects. | ||||
|     "nomen"         : true,   // Prohibit use of initial or trailing underbars in names. | ||||
|     "onevar"        : false,  // Allow only one `var` statement per function. | ||||
|     "plusplus"      : false,  // Prohibit use of `++` & `--`. | ||||
|     "sub"           : false,  // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. | ||||
|     "trailing"      : true,   // Prohibit trailing whitespaces. | ||||
|     "white"         : true,  // Check against strict whitespace and indentation rules. | ||||
|     "indent"        : 4       // Specify indentation spacing | ||||
| } | ||||
							
								
								
									
										2
									
								
								demo/dist/demo.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								demo/dist/demo.css
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								demo/dist/demo.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								demo/dist/demo.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										207
									
								
								demo/index.html
									
									
									
									
									
								
							
							
						
						
									
										207
									
								
								demo/index.html
									
									
									
									
									
								
							| @ -1,113 +1,124 @@ | ||||
| <!doctype html> | ||||
| <html lang="en"> | ||||
|     <head> | ||||
|         <meta charset="utf-8" /> | ||||
|         <title>Plyr - A simple HTML5 media player</title> | ||||
|         <meta name="description" content="A simple HTML5 media player with custom controls and WebVTT captions."> | ||||
|         <meta name="author" content="Sam Potts"> | ||||
|         <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|  | ||||
|         <!-- Styles --> | ||||
|         <link rel="stylesheet" href="../dist/plyr.css"> | ||||
| <head> | ||||
|     <meta charset="utf-8" /> | ||||
|     <title>Plyr - A simple HTML5 media player</title> | ||||
|     <meta name="description" content="A simple HTML5 media player with custom controls and WebVTT captions."> | ||||
|     <meta name="author" content="Sam Potts"> | ||||
|     <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|  | ||||
|         <!-- Docs styles --> | ||||
|         <link rel="stylesheet" href="dist/demo.css"> | ||||
|     </head> | ||||
|     <body> | ||||
|         <header> | ||||
|             <h1>Plyr</h1> | ||||
|             <p>A simple, accessible HTML5 media player by <a href="https://twitter.com/sam_potts" target="_blank">@sam_potts</a></p> | ||||
|             <nav> | ||||
|                 <ul> | ||||
|                     <li> | ||||
|                         <a href="https://github.com/sampotts/plyr" target="_blank" class="btn btn--large btn--primary" data-shr-network="github"> | ||||
|                             <svg class="icon"><use xlink:href="#icon-github"/></svg>Download on GitHub | ||||
|                         </a> | ||||
|                     </li> | ||||
|                     <li> | ||||
|                         <a href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&url=http%3A%2F%2Fplyr.io&via=Sam_Potts" target="_blank" class="btn btn--large btn--twitter" data-shr-network="twitter"> | ||||
|                             <svg class="icon"><use xlink:href="#icon-twitter"/></svg>Tweet | ||||
|                         </a> | ||||
|                     </li> | ||||
|                 </ul> | ||||
|             </nav> | ||||
|         </header> | ||||
|     <!-- Styles --> | ||||
|     <link rel="stylesheet" href="../dist/plyr.css"> | ||||
|  | ||||
|         <main role="main" id="main"> | ||||
|             <nav class="btn__bar"> | ||||
|                 <ul> | ||||
|                     <li class="active"> | ||||
|                         <button type="button" class="btn" data-source="video">Video</button> | ||||
|                     </li> | ||||
|                     <li> | ||||
|                         <button type="button" class="btn" data-source="audio">Audio</button> | ||||
|                     </li> | ||||
|                     <li> | ||||
|                         <button type="button" class="btn btn--youtube" data-source="youtube"><svg class="icon"><use xlink:href="#icon-youtube"/></svg>YouTube</button> | ||||
|                     </li> | ||||
|                     <li> | ||||
|                         <button type="button" class="btn btn--vimeo" data-source="vimeo"><svg class="icon"><use xlink:href="#icon-vimeo"/></svg>Vimeo</button> | ||||
|                     </li> | ||||
|                 </ul> | ||||
|             </nav> | ||||
|  | ||||
|             <video controls crossorigin playsinline poster="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg" id="player"> | ||||
|                 <!-- Video files --> | ||||
|                 <source src="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4" type="video/mp4"> | ||||
|  | ||||
|                 <!-- Text track file --> | ||||
|                 <track kind="captions" label="English" srclang="en" src="webvtt/View_From_A_Blue_Moon_Trailer-HD.en.vtt" default> | ||||
|                 <track kind="captions" label="Français" srclang="fr" src="webvtt/View_From_A_Blue_Moon_Trailer-HD.fr.vtt"> | ||||
|  | ||||
|                 <!-- Fallback for browsers that don't support the <video> element --> | ||||
|                 <a href="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4" download>Download</a> | ||||
|             </video> | ||||
|     <!-- Docs styles --> | ||||
|     <link rel="stylesheet" href="dist/demo.css"> | ||||
| </head> | ||||
|  | ||||
| <body> | ||||
|     <header> | ||||
|         <h1>Plyr</h1> | ||||
|         <p>A simple, accessible HTML5 media player by <a href="https://twitter.com/sam_potts" target="_blank">@sam_potts</a></p> | ||||
|         <nav> | ||||
|             <ul> | ||||
|                 <li class="plyr__cite plyr__cite--video" hidden> | ||||
|                     <small> | ||||
|                         <a href="http://viewfromabluemoon.com/" target="_blank">View From A Blue Moon</a> © Brainfarm | ||||
|                     </small> | ||||
|                 <li> | ||||
|                     <a href="https://github.com/sampotts/plyr" target="_blank" class="btn btn--large btn--primary" data-shr-network="github"> | ||||
|                         <svg class="icon"><use xlink:href="#icon-github"/></svg>Download on GitHub | ||||
|                     </a> | ||||
|                 </li> | ||||
|                 <li class="plyr__cite plyr__cite--audio" hidden> | ||||
|                     <small> | ||||
|                         <a href="http://www.kishibashi.com/" target="_blank">Kishi Bashi – “It All Began With A Burst”</a> © Kishi Bashi | ||||
|                     </small> | ||||
|                 </li> | ||||
|                 <li class="plyr__cite plyr__cite--youtube" hidden> | ||||
|                     <small> | ||||
|                         <a href="https://www.youtube.com/watch?v=bTqVqk7FSmY" target="_blank">View From A Blue Moon</a> on | ||||
|                         <span class="color--youtube"> | ||||
|                             <svg class="icon"> | ||||
|                                 <use xlink:href="#icon-youtube"/> | ||||
|                             </svg> YouTube | ||||
|                         </span> | ||||
|                     </small> | ||||
|                 </li> | ||||
|                 <li class="plyr__cite plyr__cite--vimeo" hidden> | ||||
|                     <small> | ||||
|                         <a href="https://vimeo.com/ondemand/viewfromabluemoon4k" target="_blank">View From A Blue Moon</a> on | ||||
|                         <span class="color--vimeo"> | ||||
|                             <svg class="icon"> | ||||
|                                 <use xlink:href="#icon-vimeo"/> | ||||
|                             </svg> Vimeo | ||||
|                         </span> | ||||
|                     </small> | ||||
|                 <li> | ||||
|                     <a href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&url=http%3A%2F%2Fplyr.io&via=Sam_Potts" target="_blank" class="btn btn--large btn--twitter" data-shr-network="twitter"> | ||||
|                         <svg class="icon"><use xlink:href="#icon-twitter"/></svg>Tweet | ||||
|                     </a> | ||||
|                 </li> | ||||
|             </ul> | ||||
|         </main> | ||||
|         </nav> | ||||
|     </header> | ||||
|  | ||||
|         <!-- Plyr core script --> | ||||
|         <script src="../src/js/plyr.js"></script> | ||||
|     <main role="main" id="main"> | ||||
|         <nav class="btn__bar"> | ||||
|             <ul> | ||||
|                 <li class="active"> | ||||
|                     <button type="button" class="btn" data-source="video">Video</button> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <button type="button" class="btn" data-source="audio">Audio</button> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <button type="button" class="btn btn--youtube" data-source="youtube"><svg class="icon"><use xlink:href="#icon-youtube"/></svg>YouTube</button> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <button type="button" class="btn btn--vimeo" data-source="vimeo"><svg class="icon"><use xlink:href="#icon-vimeo"/></svg>Vimeo</button> | ||||
|                 </li> | ||||
|             </ul> | ||||
|         </nav> | ||||
|  | ||||
|         <!-- Docs script --> | ||||
|         <script src="dist/demo.js"></script> | ||||
|         <video controls crossorigin playsinline muted autoplay loop poster="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg" id="player"> | ||||
|             <!-- Video files --> | ||||
|             <source src="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4" type="video/mp4"> | ||||
|  | ||||
|         <!-- Rangetouch to fix <input type="range"> on touch devices (see https://rangetouch.com) --> | ||||
|         <script src="https://cdn.rangetouch.com/1.0.1/rangetouch.js" async></script> | ||||
|             <!-- Text track file --> | ||||
|             <track kind="captions" label="English" srclang="en" src="webvtt/View_From_A_Blue_Moon_Trailer-HD.en.vtt" default> | ||||
|             <track kind="captions" label="Français" srclang="fr" src="webvtt/View_From_A_Blue_Moon_Trailer-HD.fr.vtt"> | ||||
|  | ||||
|             <!-- Fallback for browsers that don't support the <video> element --> | ||||
|             <a href="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4" download>Download</a> | ||||
|         </video> | ||||
|  | ||||
|         <ul> | ||||
|             <li class="plyr__cite plyr__cite--video" hidden> | ||||
|                 <small> | ||||
|                     <a href="http://viewfromabluemoon.com/" target="_blank">View From A Blue Moon</a> © Brainfarm | ||||
|                 </small> | ||||
|             </li> | ||||
|             <li class="plyr__cite plyr__cite--audio" hidden> | ||||
|                 <small> | ||||
|                     <a href="http://www.kishibashi.com/" target="_blank">Kishi Bashi – “It All Began With A Burst”</a> © Kishi Bashi | ||||
|                 </small> | ||||
|             </li> | ||||
|             <li class="plyr__cite plyr__cite--youtube" hidden> | ||||
|                 <small> | ||||
|                     <a href="https://www.youtube.com/watch?v=bTqVqk7FSmY" target="_blank">View From A Blue Moon</a> on | ||||
|                     <span class="color--youtube"> | ||||
|                         <svg class="icon"> | ||||
|                             <use xlink:href="#icon-youtube"/> | ||||
|                         </svg> YouTube | ||||
|                     </span> | ||||
|                 </small> | ||||
|             </li> | ||||
|             <li class="plyr__cite plyr__cite--vimeo" hidden> | ||||
|                 <small> | ||||
|                     <a href="https://vimeo.com/ondemand/viewfromabluemoon4k" target="_blank">View From A Blue Moon</a> on | ||||
|                     <span class="color--vimeo"> | ||||
|                         <svg class="icon"> | ||||
|                             <use xlink:href="#icon-vimeo"/> | ||||
|                         </svg> Vimeo | ||||
|                     </span> | ||||
|                 </small> | ||||
|             </li> | ||||
|         </ul> | ||||
|     </main> | ||||
|  | ||||
|     <!-- Plyr core script --> | ||||
|     <script src="../src/js/plyr.js"></script> | ||||
|  | ||||
|     <!-- Docs script --> | ||||
|     <script src="dist/demo.js"></script> | ||||
|  | ||||
|     <!-- Rangetouch to fix <input type="range"> on touch devices (see https://rangetouch.com) --> | ||||
|     <script src="https://cdn.rangetouch.com/1.0.1/rangetouch.js" async></script> | ||||
|  | ||||
|     <!-- Sharing libary (https://shr.one) --> | ||||
|     <script src="https://cdn.shr.one/1.0.1/shr.js"></script> | ||||
|     <script> | ||||
|         if (window.shr) { | ||||
|             window.shr.setup({ | ||||
|                 count: { | ||||
|                     classname: 'btn__count' | ||||
|                 } | ||||
|             }); | ||||
|         } | ||||
|     </script> | ||||
| </body> | ||||
|  | ||||
|         <!-- Sharing libary (https://shr.one) --> | ||||
|         <script src="https://cdn.shr.one/1.0.1/shr.js"></script> | ||||
|         <script>if(window.shr) { window.shr.setup({ count: { classname: 'btn__count' } }); }</script> | ||||
|     </body> | ||||
| </html> | ||||
| @ -142,12 +142,11 @@ | ||||
|                     type: 'audio', | ||||
|                     title: 'Kishi Bashi – “It All Began With A Burst”', | ||||
|                     sources: [{ | ||||
|                             src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3', | ||||
|                             type: 'audio/mp3' | ||||
|                     }, | ||||
|                         { | ||||
|                             src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg', | ||||
|                             type: 'audio/ogg' | ||||
|                         src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3', | ||||
|                         type: 'audio/mp3' | ||||
|                     }, { | ||||
|                         src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg', | ||||
|                         type: 'audio/ogg' | ||||
|                     }] | ||||
|                 }); | ||||
|                 break; | ||||
| @ -200,14 +199,14 @@ if (window.location.host === 'plyr.io') { | ||||
|     (function(i, s, o, g, r, a, m) { | ||||
|         i.GoogleAnalyticsObject = r; | ||||
|         i[r] = i[r] || function() { | ||||
|             (i[r].q = i[r].q || []).push(arguments) | ||||
|             (i[r].q = i[r].q || []).push(arguments); | ||||
|         }; | ||||
|         i[r].l = 1 * new Date(); | ||||
|         a = s.createElement(o); | ||||
|         m = s.getElementsByTagName(o)[0]; | ||||
|         a.async = 1; | ||||
|         a.src = g; | ||||
|         m.parentNode.insertBefore(a, m) | ||||
|         m.parentNode.insertBefore(a, m); | ||||
|     })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); | ||||
|     window.ga('create', 'UA-40881672-11', 'auto'); | ||||
|     window.ga('send', 'pageview'); | ||||
|  | ||||
| @ -15,12 +15,17 @@ | ||||
|  | ||||
| // Base | ||||
| html { | ||||
|     background: @body-background; | ||||
|     height: 100%; | ||||
|     background: @body-background fixed; | ||||
| } | ||||
| body { | ||||
|     max-width: @container-width; | ||||
|     margin: auto; | ||||
|     margin: 0 auto @padding-base; | ||||
|     padding: (@padding-base / 2); | ||||
|     max-width: @example-width-video; | ||||
|  | ||||
|     @media (min-width: @screen-sm) { | ||||
|         margin-bottom: (@padding-base * 2); | ||||
|     } | ||||
| } | ||||
|  | ||||
| // Header | ||||
| @ -31,18 +36,8 @@ header { | ||||
|     p { | ||||
|         .font-size(18); | ||||
|     } | ||||
|  | ||||
|     @media (min-width: @screen-sm) { | ||||
|         padding-top: (@padding-base * 3); | ||||
|         padding-bottom: (@padding-base * 3); | ||||
|     } | ||||
| } | ||||
|  | ||||
| // Sections | ||||
| section { | ||||
|     margin-bottom: @padding-base; | ||||
|  | ||||
|     @media (min-width: @screen-sm) { | ||||
|         margin-bottom: (@padding-base * 2); | ||||
|     } | ||||
| } | ||||
| @ -3,160 +3,170 @@ | ||||
| // ========================================================================== | ||||
|  | ||||
| nav { | ||||
|     ul { | ||||
|         list-style: none; | ||||
|         margin: 0; | ||||
|         padding: 0; | ||||
|         font-size: 0; | ||||
|     } | ||||
|     li { | ||||
|         display: inline-block; | ||||
|         margin-top: (@padding-base / 2); | ||||
|         .font-size(); | ||||
|         white-space: nowrap; | ||||
|     } | ||||
|     li + li { | ||||
|         margin-left: @padding-base; | ||||
|     } | ||||
| 	ul { | ||||
| 		list-style: none; | ||||
| 		margin: 0; | ||||
| 		padding: 0; | ||||
| 		font-size: 0; | ||||
| 	} | ||||
| 	li { | ||||
| 		display: inline-block; | ||||
| 		margin-top: (@padding-base / 2); | ||||
| 		.font-size(); | ||||
| 		white-space: nowrap; | ||||
| 	} | ||||
| 	li + li { | ||||
| 		margin-left: @padding-base; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // Tabs | ||||
| .btn__bar { | ||||
|     position: relative; | ||||
|     margin: 0 auto @padding-base; | ||||
|     white-space: nowrap; | ||||
| 	position: relative; | ||||
| 	margin: 0 auto @padding-base; | ||||
| 	max-width: @example-width-video; | ||||
| 	white-space: nowrap; | ||||
|  | ||||
|     &::before { | ||||
|         content: ""; | ||||
|         position: absolute; | ||||
|         top: 50%; | ||||
|         left: 0; | ||||
|         right: 0; | ||||
|         height: 1px; | ||||
|         background: @off-white; | ||||
|     } | ||||
| 	&::before { | ||||
| 		content: ""; | ||||
| 		position: absolute; | ||||
| 		top: 50%; | ||||
| 		left: 0; | ||||
| 		right: 0; | ||||
| 		height: 1px; | ||||
| 		background: @gray-lighter; | ||||
| 	} | ||||
|  | ||||
|     ul { | ||||
|         position: relative; | ||||
|         z-index: 1; | ||||
|         display: inline-block; | ||||
|     } | ||||
|     li { | ||||
|         margin: 0; | ||||
| 	ul { | ||||
| 		position: relative; | ||||
| 		z-index: 1; | ||||
| 		display: inline-block; | ||||
| 		user-select: none; | ||||
| 	} | ||||
| 	li { | ||||
| 		margin: 0; | ||||
|  | ||||
|         &:first-child .btn { | ||||
|             border-radius: 4px 0 0 4px; | ||||
|         } | ||||
|         &:last-child .btn { | ||||
|             border-radius: 0 4px 4px 0; | ||||
|         } | ||||
|         & + li .btn { | ||||
|             margin-left: -1px; | ||||
|         } | ||||
| 		&:first-child .btn { | ||||
| 			border-radius: 4px 0 0 4px; | ||||
| 		} | ||||
| 		&:last-child .btn { | ||||
| 			border-radius: 0 4px 4px 0; | ||||
| 		} | ||||
| 		& + li .btn { | ||||
| 			margin-left: -1px; | ||||
| 		} | ||||
|  | ||||
|         &.active .btn { | ||||
|             &:extend(.btn--primary); | ||||
|             position: relative; | ||||
|             z-index: 1; | ||||
| 		&.active .btn { | ||||
| 			&:extend(.btn--primary); | ||||
| 			box-shadow: inset 0 1px 1px rgba(0,0,0, .2); | ||||
| 			position: relative; | ||||
| 			z-index: 1; | ||||
|  | ||||
|             .icon { | ||||
|                 color: inherit; | ||||
|             } | ||||
|         } | ||||
|         &.active + li .btn:hover { | ||||
|             z-index: 0; | ||||
|         } | ||||
|     } | ||||
|     .btn { | ||||
|         position: relative; | ||||
|         display: block; | ||||
|         border-radius: 0; | ||||
| 			.icon { | ||||
| 				color: inherit; | ||||
| 			} | ||||
| 		} | ||||
| 		&.active + li .btn:hover { | ||||
| 			z-index: 0; | ||||
| 		} | ||||
| 	} | ||||
| 	.btn { | ||||
| 		position: relative; | ||||
| 		display: block; | ||||
| 		border-radius: 0; | ||||
|  | ||||
|         &:hover, | ||||
|         &:focus { | ||||
|             z-index: 1; | ||||
|         } | ||||
|     } | ||||
| 		&:hover, | ||||
| 		&:focus { | ||||
| 			z-index: 1; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
|     @media (min-width: 560px) { | ||||
|         margin-bottom: (@padding-base * 2); | ||||
|     } | ||||
| 	@media (min-width: 560px) { | ||||
| 		margin-bottom: (@padding-base * 2); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // Shared | ||||
| .btn, | ||||
| .btn__count { | ||||
|     display: inline-block; | ||||
|     vertical-align: middle; | ||||
|     border-radius: @border-radius-base; | ||||
|     user-select: none; | ||||
|     font-weight: @font-weight-bold; | ||||
| 	display: inline-block; | ||||
| 	vertical-align: middle; | ||||
| 	border-radius: @border-radius-base; | ||||
| 	user-select: none; | ||||
| 	font-weight: @font-weight-bold; | ||||
| } | ||||
|  | ||||
| // Buttons | ||||
| .btn { | ||||
|     padding: (@padding-base / 2) ((@padding-base / 2) + 2); | ||||
|     background: #fff; | ||||
|     border: 1px solid @gray-lighter; | ||||
|     color: @gray; | ||||
|     transition: all .2s ease; | ||||
|     .font-size(@font-size-small); | ||||
| 	padding: (@padding-base / 2) ((@padding-base / 2) + 2); | ||||
| 	background: linear-gradient(lighten(@off-white, 2%), darken(@off-white, 3%)); | ||||
| 	border: 1px solid @gray-light; | ||||
| 	box-shadow: 0 1px 1px rgba(0,0,0, .05); | ||||
| 	text-shadow: 0 1px 1px #fff; | ||||
| 	color: @gray; | ||||
| 	transition: background .1s ease, color .1s ease; | ||||
| 	.font-size(@font-size-small); | ||||
|  | ||||
|     &:hover, | ||||
|     &:focus { | ||||
|         border-color: @gray-light; | ||||
|     } | ||||
| 	&:hover, | ||||
| 	&:focus { | ||||
| 		border-color: darken(@gray-light, 8%); | ||||
| 		color: @gray; | ||||
| 		outline: 0; | ||||
| 	} | ||||
| } | ||||
|  | ||||
| // Sizes | ||||
| .btn--large { | ||||
|     padding: (@padding-base / 2) @padding-base; | ||||
|     .font-size(); | ||||
| 	padding: (@padding-base / 2) @padding-base; | ||||
| 	.font-size(); | ||||
| } | ||||
|  | ||||
| // Styles | ||||
| .btn--primary { | ||||
|     background-color: @link-color; | ||||
|     border-color: @link-color; | ||||
|     color: #fff; | ||||
| 	background-image: linear-gradient(@link-color, darken(@link-color, 5%)); | ||||
| 	background-color: @link-color; | ||||
| 	border-color: darken(@link-color, 10%); | ||||
| 	box-shadow: 0 1px 1px rgba(0,0,0, .15); | ||||
| 	text-shadow: 0 1px 1px rgba(0,0,0, .1); | ||||
| 	color: #fff; | ||||
|  | ||||
|     &:hover, | ||||
|     &:focus { | ||||
|         color: #fff; | ||||
|         border-color: darken(@link-color, 5%); | ||||
|     } | ||||
| 	&:hover, | ||||
| 	&:focus { | ||||
| 		color: #fff; | ||||
| 		border-color: darken(@link-color, 20%); | ||||
| 	} | ||||
| } | ||||
| .btn--youtube .icon { | ||||
|     color: @color-youtube; | ||||
| 	color: @color-youtube; | ||||
| } | ||||
| .btn--vimeo .icon { | ||||
|     color: @color-vimeo; | ||||
| 	color: @color-vimeo; | ||||
| } | ||||
| .btn--twitter .icon { | ||||
|     color: @color-twitter; | ||||
| 	color: @color-twitter; | ||||
| } | ||||
|  | ||||
| // Count bubble | ||||
| .btn__count { | ||||
|     position: relative; | ||||
|     margin-left: (@padding-base / 2); | ||||
|     padding: (@padding-base / 2) (@padding-base * .75); | ||||
|     background: #fff; | ||||
|     border: 1px solid @gray-lighter; | ||||
| 	position: relative; | ||||
| 	margin-left: (@padding-base / 2); | ||||
| 	padding: (@padding-base / 2) (@padding-base * .75); | ||||
| 	background: #fff; | ||||
| 	border: 1px solid @gray-light; | ||||
|  | ||||
|     &::before { | ||||
|         content: ""; | ||||
|         position: absolute; | ||||
|         display: block; | ||||
|         width: @arrow-size; | ||||
|         height: @arrow-size; | ||||
|         left: 1px; | ||||
|         top: 50%; | ||||
|         margin-top: -(@arrow-size / 2); | ||||
| 	&::before { | ||||
| 		content: ""; | ||||
| 		position: absolute; | ||||
| 		display: block; | ||||
| 		width: @arrow-size; | ||||
| 		height: @arrow-size; | ||||
| 		left: 1px; | ||||
| 		top: 50%; | ||||
| 		margin-top: -(@arrow-size / 2); | ||||
|  | ||||
|         background: inherit; | ||||
|         border: inherit; | ||||
|         border-width: 1px 0 0 1px; | ||||
|         transform: rotate(-45deg) translate(-50%, -50%); | ||||
|     } | ||||
| 		background: inherit; | ||||
| 		border: inherit; | ||||
| 		border-width: 1px 0 0 1px; | ||||
| 		transform: rotate(-45deg) translate(-50%, -50%); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -30,5 +30,17 @@ video { | ||||
|  | ||||
| // Style full supported player | ||||
| .plyr__cite { | ||||
|     display: none; | ||||
|     margin-top: @padding-base; | ||||
|  | ||||
|     .icon { | ||||
|         margin-right: (@padding-base / 4); | ||||
|     } | ||||
| } | ||||
|  | ||||
| .plyr--video:not(.plyr--youtube):not(.plyr--vimeo) ~ ul .plyr__cite--video, | ||||
| .plyr--audio ~ ul .plyr__cite--audio, | ||||
| .plyr--youtube ~ ul .plyr__cite--youtube, | ||||
| .plyr--vimeo ~ ul .plyr__cite--vimeo { | ||||
|     display: block; | ||||
| } | ||||
|  | ||||
| @ -51,22 +51,22 @@ li { | ||||
| a { | ||||
|     text-decoration: none; | ||||
|     color: @link-color; | ||||
|     transition: color .3s ease; | ||||
|     border-bottom: 1px dotted currentColor; | ||||
|     transition: background .3s ease, color .3s ease, border .3s ease; | ||||
|  | ||||
|     &:hover, | ||||
|     &:focus { | ||||
|         color: @gray-dark; | ||||
|         border-bottom-color: rgba(0,0,0,0); | ||||
|     } | ||||
|     &:focus { | ||||
|         .tab-focus(); | ||||
|     } | ||||
|     &.logo { | ||||
|         border: 0; | ||||
|     } | ||||
| } | ||||
|  | ||||
| a:focus, | ||||
| button:focus { | ||||
|     .tab-focus(); | ||||
| } | ||||
|  | ||||
| .color--vimeo { | ||||
|     color: @color-vimeo; | ||||
| } | ||||
|  | ||||
| @ -9,7 +9,7 @@ | ||||
| @gray-lighter:              #dbe3e8; | ||||
| @off-white:                 #f2f5f7; | ||||
|  | ||||
| @brand-primary:             #1aafff; | ||||
| @brand-primary:             #3498db; | ||||
| @brand-secondary:           #02BD9B; | ||||
|  | ||||
| // Brands | ||||
| @ -18,14 +18,14 @@ | ||||
| @color-vimeo:               #19b7ed; | ||||
|  | ||||
| // Base | ||||
| @body-background:           #fff; | ||||
| @body-background:           @off-white; //linear-gradient(to left top, @brand-secondary, @brand-primary); | ||||
|  | ||||
| // Type | ||||
| @font-size-base:            16; | ||||
| @font-size-small:           14; | ||||
| @font-size-h1:              64; | ||||
| @font-weight-base:          500; | ||||
| @font-weight-bold:          600; | ||||
| @font-weight-bold:          700; | ||||
|  | ||||
| // Elements | ||||
| @link-color:                @brand-primary; | ||||
| @ -45,4 +45,4 @@ | ||||
|  | ||||
| // Examples | ||||
| @example-width-audio:       520px; | ||||
| @container-width:       	800px; | ||||
| @example-width-video:       1200px; | ||||
|  | ||||
							
								
								
									
										5
									
								
								dist/plyr.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								dist/plyr.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										795
									
								
								src/js/plyr.js
									
									
									
									
									
								
							
							
						
						
									
										795
									
								
								src/js/plyr.js
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user