diff options
author | Sam Potts <sam@potts.es> | 2019-06-02 22:24:41 +1000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2019-06-02 22:24:41 +1000 |
commit | 9c717275d20732fac237b2c1cfb5f4c9d2abd411 (patch) | |
tree | 731298dc37c7ff39529461686603190c7b077066 | |
parent | 0249772f019762ebd494ac409e597103820413c3 (diff) | |
download | plyr-9c717275d20732fac237b2c1cfb5f4c9d2abd411.tar.lz plyr-9c717275d20732fac237b2c1cfb5f4c9d2abd411.tar.xz plyr-9c717275d20732fac237b2c1cfb5f4c9d2abd411.zip |
Packages for demo separated
-rw-r--r-- | demo/index.html | 34 | ||||
-rw-r--r-- | demo/package.json | 11 | ||||
-rw-r--r-- | demo/src/js/demo.js | 10 | ||||
-rw-r--r-- | demo/yarn.lock | 13 |
4 files changed, 47 insertions, 21 deletions
diff --git a/demo/index.html b/demo/index.html index 2724c4f2..f61cf8a7 100644 --- a/demo/index.html +++ b/demo/index.html @@ -117,22 +117,20 @@ </p> <div class="call-to-action"> - <span class="button--with-count"> - <a href="https://github.com/sampotts/plyr" target="_blank" class="button js-shr-button"> - <svg class="icon" role="presentation"> - <title>GitHub</title> - <path - d="M8,0.2c-4.4,0-8,3.6-8,8c0,3.5,2.3,6.5,5.5,7.6 - C5.9,15.9,6,15.6,6,15.4c0-0.2,0-0.7,0-1.4C3.8,14.5,3.3,13,3.3,13c-0.4-0.9-0.9-1.2-0.9-1.2c-0.7-0.5,0.1-0.5,0.1-0.5 - c0.8,0.1,1.2,0.8,1.2,0.8C4.4,13.4,5.6,13,6,12.8c0.1-0.5,0.3-0.9,0.5-1.1c-1.8-0.2-3.6-0.9-3.6-4c0-0.9,0.3-1.6,0.8-2.1 - c-0.1-0.2-0.4-1,0.1-2.1c0,0,0.7-0.2,2.2,0.8c0.6-0.2,1.3-0.3,2-0.3c0.7,0,1.4,0.1,2,0.3c1.5-1,2.2-0.8,2.2-0.8 - c0.4,1.1,0.2,1.9,0.1,2.1c0.5,0.6,0.8,1.3,0.8,2.1c0,3.1-1.9,3.7-3.7,3.9C9.7,12,10,12.5,10,13.2c0,1.1,0,1.9,0,2.2 - c0,0.2,0.1,0.5,0.6,0.4c3.2-1.1,5.5-4.1,5.5-7.6C16,3.8,12.4,0.2,8,0.2z" - ></path> - </svg> - Download on GitHub - </a> - </span> + <a href="https://github.com/sampotts/plyr" target="_blank" class="button js-shr"> + <svg class="icon" role="presentation"> + <title>GitHub</title> + <path + d="M8,0.2c-4.4,0-8,3.6-8,8c0,3.5,2.3,6.5,5.5,7.6 + C5.9,15.9,6,15.6,6,15.4c0-0.2,0-0.7,0-1.4C3.8,14.5,3.3,13,3.3,13c-0.4-0.9-0.9-1.2-0.9-1.2c-0.7-0.5,0.1-0.5,0.1-0.5 + c0.8,0.1,1.2,0.8,1.2,0.8C4.4,13.4,5.6,13,6,12.8c0.1-0.5,0.3-0.9,0.5-1.1c-1.8-0.2-3.6-0.9-3.6-4c0-0.9,0.3-1.6,0.8-2.1 + c-0.1-0.2-0.4-1,0.1-2.1c0,0,0.7-0.2,2.2,0.8c0.6-0.2,1.3-0.3,2-0.3c0.7,0,1.4,0.1,2,0.3c1.5-1,2.2-0.8,2.2-0.8 + c0.4,1.1,0.2,1.9,0.1,2.1c0.5,0.6,0.8,1.3,0.8,2.1c0,3.1-1.9,3.7-3.7,3.9C9.7,12,10,12.5,10,13.2c0,1.1,0,1.9,0,2.2 + c0,0.2,0.1,0.5,0.6,0.4c3.2-1.1,5.5-4.1,5.5-7.6C16,3.8,12.4,0.2,8,0.2z" + ></path> + </svg> + Download on GitHub + </a> </div> </header> @@ -267,7 +265,7 @@ <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="js-shr-button" + class="js-shr" >tweet it</a > 👍 @@ -281,7 +279,7 @@ ></script> <!-- Sharing libary (https://shr.one) --> - <script src="https://cdn.shr.one/2.0.0-beta.2/shr.js" crossorigin="anonymous"></script> + <script src="https://cdn.shr.one/2.0.2/shr.js" crossorigin="anonymous"></script> <!-- Docs script --> <script src="dist/demo.js" crossorigin="anonymous"></script> diff --git a/demo/package.json b/demo/package.json new file mode 100644 index 00000000..2d1a29e0 --- /dev/null +++ b/demo/package.json @@ -0,0 +1,11 @@ +{ + "name": "plyr-demo", + "version": "1.0.0", + "description": "Demo for Plyr", + "homepage": "https://plyr.io", + "author": "Sam Potts <sam@potts.es>", + "dependencies": { + "raven-js": "^3.27.1", + "shr-buttons": "2.0.2" + } +} diff --git a/demo/src/js/demo.js b/demo/src/js/demo.js index b1097601..93ffe172 100644 --- a/demo/src/js/demo.js +++ b/demo/src/js/demo.js @@ -5,6 +5,7 @@ // ========================================================================== import Raven from 'raven-js'; +import Shr from 'shr-buttons'; import Plyr from '../../../src/js/plyr'; @@ -20,10 +21,13 @@ import Plyr from '../../../src/js/plyr'; const selector = '#player'; const container = document.getElementById('container'); - if (window.Shr) { - window.Shr.setup('.js-shr-button', { + if (Shr) { + Shr.setup('.js-shr', { count: { - classname: 'button__count', + className: 'button__count', + }, + wrapper: { + className: 'button--with-count', }, }); } diff --git a/demo/yarn.lock b/demo/yarn.lock new file mode 100644 index 00000000..430c26f8 --- /dev/null +++ b/demo/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +raven-js@^3.27.1: + version "3.27.1" + resolved "https://registry.yarnpkg.com/raven-js/-/raven-js-3.27.1.tgz#e187a12982061908ccbf935af0640c9043d7d666" + integrity sha512-r/9CwSbaGfBFjo4hGR45DAmrukUKkQ4HdMu80PlVLDY1t8f9b4aaZzTsFegaafu7EGhEYougWDJ9/IcTdYdLXQ== + +shr-buttons@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/shr-buttons/-/shr-buttons-2.0.2.tgz#a3c11b36067b8902afbff9845d0e023f9f76865f" + integrity sha512-UYaZjF5FK1NZrXjQF8YkWOzxM7Z210lv3TDsFMTTp7hbJrdybNPF4WX4k5a+dW25R97FMBZaSnMWvI9TpuCCoA== |