From dbc1d969bc69706dc265e68b6d6a5862f5ea1596 Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Thu, 31 Jan 2019 12:18:03 +0100 Subject: [PATCH] Fixes #28 --- build/index.css | 4 ++-- build/index.css.map | 2 +- build/index.js | 4 ++-- build/index.js.map | 2 +- package.json | 3 ++- src/docs/App.js | 2 +- src/docs/css/App.css | 8 ++++---- src/lib/App.js | 29 ++++++++++++++++++----------- src/lib/css/App.css | 26 +++++++++----------------- yarn.lock | 5 +++++ 10 files changed, 45 insertions(+), 40 deletions(-) diff --git a/build/index.css b/build/index.css index 118dc81b..243e0e70 100644 --- a/build/index.css +++ b/build/index.css @@ -1,6 +1,6 @@ /*! * - * hello-bar v1.0.3 + * hello-bar v1.1.0 * https://github.com/AnandChowdhary/hello-bar * * Copyright (c) Anand Chowdhary (https://github.com/AnandChowdhary) @@ -8,5 +8,5 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - */.hello-bar{box-sizing:border-box;font-size:90%;position:absolute;left:0;right:0;top:0;width:100%;z-index:1000;-webkit-transform:translateY(-100%);transform:translateY(-100%);opacity:0}.hello-bar.hello-bar.hello-bar--is-bottom{top:auto;-webkit-transform:translateY(100%);transform:translateY(100%);bottom:0}.hello-bar.hello-bar.hello-bar--is-visible{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}.hello-bar .hello-bar-container{overflow-y:hidden;margin-right:1.5rem;overflow-x:auto}.hello-bar p.hello-bar-text{margin:0;padding:.66rem;text-align:inherit;max-width:100%;line-height:1;white-space:nowrap}.hello-bar p.hello-bar-text .cta{text-decoration:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;display:inline-block;vertical-align:middle;width:auto;padding:0 1rem;margin-top:-.66rem;margin-bottom:-.66rem;border:.3rem solid;border-radius:10rem;font:inherit;font-weight:700;text-transform:uppercase;line-height:1;margin-left:.5rem}.hello-bar a{color:inherit;font-weight:700}.hello-bar p.hello-bar-text:after,.hello-bar p.hello-bar-text:before{content:"";display:inline-block;background-color:red;width:2rem}.hello-bar .hello-bar-text--after{position:absolute;right:1rem;z-index:1;top:0;bottom:0;width:3rem}.hello-bar.hello-bar--is-fixed{position:fixed}.hello-bar button.hello-bar-button{position:absolute;right:0;top:50%;z-index:2;-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;padding:0 .75rem;margin:0;width:auto;color:inherit}.hello-bar button.hello-bar-button svg{height:1rem}.hello-bar.hello-bar--size-large{font-size:120%}.hello-bar.hello-bar--size-large p.hello-bar-text{padding:1rem}.hello-bar.hello-bar--size-large p.hello-bar-text .cta{padding:0 1.25rem;margin-top:-1rem;margin-bottom:-1rem;border:.5rem solid;margin-left:.5rem}.hello-bar.hello-bar--size-large p.hello-bar-text .cta.wiggle{-webkit-animation:hello-bar-wiggle 5s infinite;animation:hello-bar-wiggle 5s infinite}.hello-bar.hello-bar--size-large button.hello-bar-button svg{height:1.33rem}@-webkit-keyframes hello-bar-wiggle{2%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}4%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}6%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}8%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}10%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}12%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}14%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}16%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}18%{-webkit-transform:translateX(1px) rotate(0);transform:translateX(1px) rotate(0)}20%{-webkit-transform:translateX(-1px) rotate(0);transform:translateX(-1px) rotate(0)}}@keyframes hello-bar-wiggle{2%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}4%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}6%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}8%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}10%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}12%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}14%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}16%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}18%{-webkit-transform:translateX(1px) rotate(0);transform:translateX(1px) rotate(0)}20%{-webkit-transform:translateX(-1px) rotate(0);transform:translateX(-1px) rotate(0)}} + */.hello-bar{box-sizing:border-box;font-size:90%;position:absolute;left:0;right:0;top:0;width:100%;z-index:1000;-webkit-transform:translateY(-100%);transform:translateY(-100%);opacity:0}.hello-bar.hello-bar.hello-bar--is-bottom{top:auto;-webkit-transform:translateY(100%);transform:translateY(100%);bottom:0}.hello-bar.hello-bar.hello-bar--is-visible{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}.hello-bar .hello-bar-container{overflow-y:hidden;margin-right:1.5rem;overflow-x:auto;display:flex;flex-direction:column;justify-content:center;height:2rem}.hello-bar p.hello-bar-text{margin:0 auto;text-align:inherit;max-width:100%;line-height:1;white-space:nowrap}.hello-bar p.hello-bar-text .cta{text-decoration:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;display:inline-block;vertical-align:middle;width:auto;padding:.3rem 1rem;border:.3rem solid;border-radius:10rem;font:inherit;font-weight:700;text-transform:uppercase;line-height:1;margin-left:.5rem}.hello-bar a{color:inherit;font-weight:700}.hello-bar .hello-bar-text--after{position:absolute;right:1rem;z-index:1;top:0;bottom:0;width:3rem}.hello-bar.hello-bar--is-fixed{position:fixed}.hello-bar button.hello-bar-button{position:absolute;right:0;top:50%;z-index:2;-webkit-transform:translateY(-50%);transform:translateY(-50%);line-height:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;padding:0 .75rem;margin:0;width:auto;color:inherit}.hello-bar button.hello-bar-button svg{height:1rem}.hello-bar.hello-bar--size-large{font-size:120%}.hello-bar.hello-bar--size-large .hello-bar-container{height:4rem}.hello-bar.hello-bar--size-large p.hello-bar-text .cta{padding:.75rem 1.25rem;border:.5rem solid;margin-left:.5rem}.hello-bar.hello-bar--size-large p.hello-bar-text .cta.wiggle{-webkit-animation:hello-bar-wiggle 5s infinite;animation:hello-bar-wiggle 5s infinite}.hello-bar.hello-bar--size-large button.hello-bar-button svg{height:1.33rem}@-webkit-keyframes hello-bar-wiggle{2%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}4%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}6%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}8%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}10%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}12%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}14%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}16%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}18%{-webkit-transform:translateX(1px) rotate(0);transform:translateX(1px) rotate(0)}20%{-webkit-transform:translateX(-1px) rotate(0);transform:translateX(-1px) rotate(0)}}@keyframes hello-bar-wiggle{2%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}4%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}6%{-webkit-transform:translateX(3px) rotate(2deg);transform:translateX(3px) rotate(2deg)}8%{-webkit-transform:translateX(-3px) rotate(-2deg);transform:translateX(-3px) rotate(-2deg)}10%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}12%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}14%{-webkit-transform:translateX(2px) rotate(1deg);transform:translateX(2px) rotate(1deg)}16%{-webkit-transform:translateX(-2px) rotate(-1deg);transform:translateX(-2px) rotate(-1deg)}18%{-webkit-transform:translateX(1px) rotate(0);transform:translateX(1px) rotate(0)}20%{-webkit-transform:translateX(-1px) rotate(0);transform:translateX(-1px) rotate(0)}} /*# sourceMappingURL=index.css.map */ \ No newline at end of file diff --git a/build/index.css.map b/build/index.css.map index 9330edaa..3fa7b85a 100644 --- a/build/index.css.map +++ b/build/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["index.css","App.css"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG,ACVH,WACI,sBAAuB,AACvB,cAAe,AACf,kBAAmB,AACnB,OAAQ,AACR,QAAS,AACT,MAAO,AACP,WAAY,AACZ,aAAc,AACd,oCAA6B,AAA7B,4BAA6B,AAC7B,SAAW,CACd,AAED,0CACI,SAAU,AACV,mCAA4B,AAA5B,2BAA4B,AAC5B,QAAU,CACb,AAED,2CACI,gCAAyB,AAAzB,wBAAyB,AACzB,SAAW,CACd,AAED,gCACI,kBAAmB,AACnB,oBAAqB,AACrB,eAAiB,CACpB,AAED,4BACI,SAAU,AACV,eAAiB,AACjB,mBAAoB,AACpB,eAAgB,AAChB,cAAe,AACf,kBAAoB,CACvB,AAED,iCACI,qBAAsB,AACtB,wBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,AACjB,gBAAiB,AACjB,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AAEZ,eAAgB,AAChB,mBAAqB,AACrB,sBAAwB,AACxB,mBAAqB,AACrB,oBAAqB,AACrB,aAAc,AACd,gBAAkB,AAClB,yBAA0B,AAC1B,cAAe,AACf,iBAAoB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AA0C,AAA1C,wCAA0C,CAAE,AACjD,IAAM,+CAAwC,AAAxC,sCAAwC,CAAE,AAChD,IAAM,iDAA0C,AAA1C,wCAA0C,CAAE,AAClD,IAAM,+CAAwC,AAAxC,sCAAwC,CAAE,AAChD,IAAM,iDAA0C,AAA1C,wCAA0C,CAAE,AAClD,IAAM,4CAAqC,AAArC,mCAAqC,CAAE,AAC7C,IAAM,6CAAsC,AAAtC,oCAAsC,CAAE,CDkCjD","file":"index.css","sourcesContent":["/*!\n * \n * hello-bar v1.0.3\n * https://github.com/AnandChowdhary/hello-bar\n * \n * Copyright (c) Anand Chowdhary (https://github.com/AnandChowdhary)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\n.hello-bar {\n box-sizing: border-box;\n font-size: 90%;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 1000;\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n opacity: 0;\n}\n\n.hello-bar.hello-bar.hello-bar--is-bottom {\n top: auto;\n -webkit-transform: translateY(100%);\n transform: translateY(100%);\n bottom: 0;\n}\n\n.hello-bar.hello-bar.hello-bar--is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.hello-bar .hello-bar-container {\n overflow-y: hidden;\n margin-right: 1.5rem;\n overflow-x: auto;\n}\n\n.hello-bar p.hello-bar-text {\n margin: 0;\n padding: 0.66rem;\n text-align: inherit;\n max-width: 100%;\n line-height: 1;\n white-space: nowrap;\n}\n\n.hello-bar p.hello-bar-text .cta {\n text-decoration: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n display: inline-block;\n vertical-align: middle;\n width: auto;\n border: none;\n padding: 0 1rem;\n margin-top: -0.66rem;\n margin-bottom: -0.66rem;\n border: 0.3rem solid;\n border-radius: 10rem;\n font: inherit;\n font-weight: bold;\n text-transform: uppercase;\n line-height: 1;\n margin-left: 0.5rem;\n}\n\n.hello-bar a {\n color: inherit;\n font-weight: bold;\n}\n.hello-bar p.hello-bar-text::before,\n.hello-bar p.hello-bar-text::after {\n content: \"\";\n display: inline-block;\n background-color: red;\n width: 2rem;\n}\n.hello-bar .hello-bar-text--after {\n position: absolute;\n right: 1rem;\n z-index: 1;\n top: 0;\n bottom: 0;\n width: 3rem;\n}\n\n.hello-bar.hello-bar--is-fixed {\n position: fixed;\n}\n\n.hello-bar button.hello-bar-button {\n position: absolute;\n right: 0;\n top: 50%;\n z-index: 2;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n line-height: 1;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n border: none;\n padding: 0 0.75rem;\n margin: 0;\n width: auto;\n color: inherit;\n}\n.hello-bar button.hello-bar-button svg {\n height: 1rem;\n}\n\n.hello-bar.hello-bar--size-large {\n font-size: 120%;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text {\n padding: 1rem;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text .cta {\n padding: 0 1.25rem;\n margin-top: -1rem;\n margin-bottom: -1rem;\n border: 0.5rem solid;\n margin-left: 0.5rem;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text .cta.wiggle {\n -webkit-animation: hello-bar-wiggle 5s infinite;\n animation: hello-bar-wiggle 5s infinite;\n}\n\n.hello-bar.hello-bar--size-large button.hello-bar-button svg {\n height: 1.33rem;\n}\n\n@-webkit-keyframes hello-bar-wiggle {\n 2% { -webkit-transform: translateX(3px) rotate(2deg); transform: translateX(3px) rotate(2deg); }\n 4% { -webkit-transform: translateX(-3px) rotate(-2deg); transform: translateX(-3px) rotate(-2deg); }\n 6% { -webkit-transform: translateX(3px) rotate(2deg); transform: translateX(3px) rotate(2deg); }\n 8% { -webkit-transform: translateX(-3px) rotate(-2deg); transform: translateX(-3px) rotate(-2deg); }\n 10% { -webkit-transform: translateX(2px) rotate(1deg); transform: translateX(2px) rotate(1deg); }\n 12% { -webkit-transform: translateX(-2px) rotate(-1deg); transform: translateX(-2px) rotate(-1deg); }\n 14% { -webkit-transform: translateX(2px) rotate(1deg); transform: translateX(2px) rotate(1deg); }\n 16% { -webkit-transform: translateX(-2px) rotate(-1deg); transform: translateX(-2px) rotate(-1deg); }\n 18% { -webkit-transform: translateX(1px) rotate(0); transform: translateX(1px) rotate(0); }\n 20% { -webkit-transform: translateX(-1px) rotate(0); transform: translateX(-1px) rotate(0); }\n}\n\n@keyframes hello-bar-wiggle {\n 2% { -webkit-transform: translateX(3px) rotate(2deg); transform: translateX(3px) rotate(2deg); }\n 4% { -webkit-transform: translateX(-3px) rotate(-2deg); transform: translateX(-3px) rotate(-2deg); }\n 6% { -webkit-transform: translateX(3px) rotate(2deg); transform: translateX(3px) rotate(2deg); }\n 8% { -webkit-transform: translateX(-3px) rotate(-2deg); transform: translateX(-3px) rotate(-2deg); }\n 10% { -webkit-transform: translateX(2px) rotate(1deg); transform: translateX(2px) rotate(1deg); }\n 12% { -webkit-transform: translateX(-2px) rotate(-1deg); transform: translateX(-2px) rotate(-1deg); }\n 14% { -webkit-transform: translateX(2px) rotate(1deg); transform: translateX(2px) rotate(1deg); }\n 16% { -webkit-transform: translateX(-2px) rotate(-1deg); transform: translateX(-2px) rotate(-1deg); }\n 18% { -webkit-transform: translateX(1px) rotate(0); transform: translateX(1px) rotate(0); }\n 20% { -webkit-transform: translateX(-1px) rotate(0); transform: translateX(-1px) rotate(0); }\n}\n",".hello-bar {\n box-sizing: border-box;\n font-size: 90%;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 1000;\n transform: translateY(-100%);\n opacity: 0;\n}\n\n.hello-bar.hello-bar.hello-bar--is-bottom {\n top: auto;\n transform: translateY(100%);\n bottom: 0;\n}\n\n.hello-bar.hello-bar.hello-bar--is-visible {\n transform: translateY(0);\n opacity: 1;\n}\n\n.hello-bar .hello-bar-container {\n overflow-y: hidden;\n margin-right: 1.5rem;\n overflow-x: auto;\n}\n\n.hello-bar p.hello-bar-text {\n margin: 0;\n padding: 0.66rem;\n text-align: inherit;\n max-width: 100%;\n line-height: 1;\n white-space: nowrap;\n}\n\n.hello-bar p.hello-bar-text .cta {\n text-decoration: none;\n appearance: none;\n background: none;\n display: inline-block;\n vertical-align: middle;\n width: auto;\n border: none;\n padding: 0 1rem;\n margin-top: -0.66rem;\n margin-bottom: -0.66rem;\n border: 0.3rem solid;\n border-radius: 10rem;\n font: inherit;\n font-weight: bold;\n text-transform: uppercase;\n line-height: 1;\n margin-left: 0.5rem;\n}\n\n.hello-bar a {\n color: inherit;\n font-weight: bold;\n}\n.hello-bar p.hello-bar-text::before,\n.hello-bar p.hello-bar-text::after {\n content: \"\";\n display: inline-block;\n background-color: red;\n width: 2rem;\n}\n.hello-bar .hello-bar-text--after {\n position: absolute;\n right: 1rem;\n z-index: 1;\n top: 0;\n bottom: 0;\n width: 3rem;\n}\n\n.hello-bar.hello-bar--is-fixed {\n position: fixed;\n}\n\n.hello-bar button.hello-bar-button {\n position: absolute;\n right: 0;\n top: 50%;\n z-index: 2;\n transform: translateY(-50%);\n line-height: 1;\n appearance: none;\n background: none;\n border: none;\n padding: 0 0.75rem;\n margin: 0;\n width: auto;\n color: inherit;\n}\n.hello-bar button.hello-bar-button svg {\n height: 1rem;\n}\n\n.hello-bar.hello-bar--size-large {\n font-size: 120%;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text {\n padding: 1rem;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text .cta {\n padding: 0 1.25rem;\n margin-top: -1rem;\n margin-bottom: -1rem;\n border: 0.5rem solid;\n margin-left: 0.5rem;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text .cta.wiggle {\n animation: hello-bar-wiggle 5s infinite;\n}\n\n.hello-bar.hello-bar--size-large button.hello-bar-button svg {\n height: 1.33rem;\n}\n\n@keyframes hello-bar-wiggle {\n 2% { transform: translateX(3px) rotate(2deg); }\n 4% { transform: translateX(-3px) rotate(-2deg); }\n 6% { transform: translateX(3px) rotate(2deg); }\n 8% { transform: translateX(-3px) rotate(-2deg); }\n 10% { transform: translateX(2px) rotate(1deg); }\n 12% { transform: translateX(-2px) rotate(-1deg); }\n 14% { transform: translateX(2px) rotate(1deg); }\n 16% { transform: translateX(-2px) rotate(-1deg); }\n 18% { transform: translateX(1px) rotate(0); }\n 20% { transform: translateX(-1px) rotate(0); }\n}"]} \ No newline at end of file +{"version":3,"sources":["index.css","App.css"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG,ACVH,WACI,sBAAuB,AACvB,cAAe,AACf,kBAAmB,AACnB,OAAQ,AACR,QAAS,AACT,MAAO,AACP,WAAY,AACZ,aAAc,AACd,oCAA6B,AAA7B,4BAA6B,AAC7B,SAAW,CACd,AAED,0CACI,SAAU,AACV,mCAA4B,AAA5B,2BAA4B,AAC5B,QAAU,CACb,AAED,2CACI,gCAAyB,AAAzB,wBAAyB,AACzB,SAAW,CACd,AAED,gCACI,kBAAmB,AACnB,oBAAqB,AACrB,gBAAiB,AACjB,aAAc,AACd,sBAAuB,AACvB,uBAAwB,AACxB,WAAa,CAChB,AAED,4BACI,cAAe,AACf,mBAAoB,AACpB,eAAgB,AAChB,cAAe,AACf,kBAAoB,CACvB,AAED,iCACI,qBAAsB,AACtB,wBAAiB,AAAjB,qBAAiB,AAAjB,gBAAiB,AACjB,gBAAiB,AACjB,qBAAsB,AACtB,sBAAuB,AACvB,WAAY,AAEZ,mBAAqB,AACrB,mBAAqB,AACrB,oBAAqB,AACrB,aAAc,AACd,gBAAkB,AAClB,yBAA0B,AAC1B,cAAe,AACf,iBAAoB,CACvB,AAED,aACI,cAAe,AACf,eAAkB,CACrB,AACD,kCACI,kBAAmB,AACnB,WAAY,AACZ,UAAW,AACX,MAAO,AACP,SAAU,AACV,UAAY,CACf,AAED,+BACI,cAAgB,CACnB,AAED,mCACI,kBAAmB,AACnB,QAAS,AACT,QAAS,AACT,UAAW,AACX,mCAA4B,AAA5B,2BAA4B,AAC5B,cAAe,AACf,wB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/AnandChowdhary/hello-bar\n * \n * Copyright (c) Anand Chowdhary (https://github.com/AnandChowdhary)\n * \n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n * \n */\n.hello-bar {\n box-sizing: border-box;\n font-size: 90%;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 1000;\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n opacity: 0;\n}\n\n.hello-bar.hello-bar.hello-bar--is-bottom {\n top: auto;\n -webkit-transform: translateY(100%);\n transform: translateY(100%);\n bottom: 0;\n}\n\n.hello-bar.hello-bar.hello-bar--is-visible {\n -webkit-transform: translateY(0);\n transform: translateY(0);\n opacity: 1;\n}\n\n.hello-bar .hello-bar-container {\n overflow-y: hidden;\n margin-right: 1.5rem;\n overflow-x: auto;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 2rem;\n}\n\n.hello-bar p.hello-bar-text {\n margin: 0 auto;\n text-align: inherit;\n max-width: 100%;\n line-height: 1;\n white-space: nowrap;\n}\n\n.hello-bar p.hello-bar-text .cta {\n text-decoration: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n display: inline-block;\n vertical-align: middle;\n width: auto;\n border: none;\n padding: 0.3rem 1rem;\n border: 0.3rem solid;\n border-radius: 10rem;\n font: inherit;\n font-weight: bold;\n text-transform: uppercase;\n line-height: 1;\n margin-left: 0.5rem;\n}\n\n.hello-bar a {\n color: inherit;\n font-weight: bold;\n}\n.hello-bar .hello-bar-text--after {\n position: absolute;\n right: 1rem;\n z-index: 1;\n top: 0;\n bottom: 0;\n width: 3rem;\n}\n\n.hello-bar.hello-bar--is-fixed {\n position: fixed;\n}\n\n.hello-bar button.hello-bar-button {\n position: absolute;\n right: 0;\n top: 50%;\n z-index: 2;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n line-height: 1;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background: none;\n border: none;\n padding: 0 0.75rem;\n margin: 0;\n width: auto;\n color: inherit;\n}\n.hello-bar button.hello-bar-button svg {\n height: 1rem;\n}\n\n.hello-bar.hello-bar--size-large {\n font-size: 120%;\n}\n.hello-bar.hello-bar--size-large .hello-bar-container {\n height: 4rem;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text .cta {\n padding: 0.75rem 1.25rem;\n border: 0.5rem solid;\n margin-left: 0.5rem;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text .cta.wiggle {\n -webkit-animation: hello-bar-wiggle 5s infinite;\n animation: hello-bar-wiggle 5s infinite;\n}\n\n.hello-bar.hello-bar--size-large button.hello-bar-button svg {\n height: 1.33rem;\n}\n\n@-webkit-keyframes hello-bar-wiggle {\n 2% { -webkit-transform: translateX(3px) rotate(2deg); transform: translateX(3px) rotate(2deg); }\n 4% { -webkit-transform: translateX(-3px) rotate(-2deg); transform: translateX(-3px) rotate(-2deg); }\n 6% { -webkit-transform: translateX(3px) rotate(2deg); transform: translateX(3px) rotate(2deg); }\n 8% { -webkit-transform: translateX(-3px) rotate(-2deg); transform: translateX(-3px) rotate(-2deg); }\n 10% { -webkit-transform: translateX(2px) rotate(1deg); transform: translateX(2px) rotate(1deg); }\n 12% { -webkit-transform: translateX(-2px) rotate(-1deg); transform: translateX(-2px) rotate(-1deg); }\n 14% { -webkit-transform: translateX(2px) rotate(1deg); transform: translateX(2px) rotate(1deg); }\n 16% { -webkit-transform: translateX(-2px) rotate(-1deg); transform: translateX(-2px) rotate(-1deg); }\n 18% { -webkit-transform: translateX(1px) rotate(0); transform: translateX(1px) rotate(0); }\n 20% { -webkit-transform: translateX(-1px) rotate(0); transform: translateX(-1px) rotate(0); }\n}\n\n@keyframes hello-bar-wiggle {\n 2% { -webkit-transform: translateX(3px) rotate(2deg); transform: translateX(3px) rotate(2deg); }\n 4% { -webkit-transform: translateX(-3px) rotate(-2deg); transform: translateX(-3px) rotate(-2deg); }\n 6% { -webkit-transform: translateX(3px) rotate(2deg); transform: translateX(3px) rotate(2deg); }\n 8% { -webkit-transform: translateX(-3px) rotate(-2deg); transform: translateX(-3px) rotate(-2deg); }\n 10% { -webkit-transform: translateX(2px) rotate(1deg); transform: translateX(2px) rotate(1deg); }\n 12% { -webkit-transform: translateX(-2px) rotate(-1deg); transform: translateX(-2px) rotate(-1deg); }\n 14% { -webkit-transform: translateX(2px) rotate(1deg); transform: translateX(2px) rotate(1deg); }\n 16% { -webkit-transform: translateX(-2px) rotate(-1deg); transform: translateX(-2px) rotate(-1deg); }\n 18% { -webkit-transform: translateX(1px) rotate(0); transform: translateX(1px) rotate(0); }\n 20% { -webkit-transform: translateX(-1px) rotate(0); transform: translateX(-1px) rotate(0); }\n}\n",".hello-bar {\n box-sizing: border-box;\n font-size: 90%;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n width: 100%;\n z-index: 1000;\n transform: translateY(-100%);\n opacity: 0;\n}\n\n.hello-bar.hello-bar.hello-bar--is-bottom {\n top: auto;\n transform: translateY(100%);\n bottom: 0;\n}\n\n.hello-bar.hello-bar.hello-bar--is-visible {\n transform: translateY(0);\n opacity: 1;\n}\n\n.hello-bar .hello-bar-container {\n overflow-y: hidden;\n margin-right: 1.5rem;\n overflow-x: auto;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 2rem;\n}\n\n.hello-bar p.hello-bar-text {\n margin: 0 auto;\n text-align: inherit;\n max-width: 100%;\n line-height: 1;\n white-space: nowrap;\n}\n\n.hello-bar p.hello-bar-text .cta {\n text-decoration: none;\n appearance: none;\n background: none;\n display: inline-block;\n vertical-align: middle;\n width: auto;\n border: none;\n padding: 0.3rem 1rem;\n border: 0.3rem solid;\n border-radius: 10rem;\n font: inherit;\n font-weight: bold;\n text-transform: uppercase;\n line-height: 1;\n margin-left: 0.5rem;\n}\n\n.hello-bar a {\n color: inherit;\n font-weight: bold;\n}\n.hello-bar .hello-bar-text--after {\n position: absolute;\n right: 1rem;\n z-index: 1;\n top: 0;\n bottom: 0;\n width: 3rem;\n}\n\n.hello-bar.hello-bar--is-fixed {\n position: fixed;\n}\n\n.hello-bar button.hello-bar-button {\n position: absolute;\n right: 0;\n top: 50%;\n z-index: 2;\n transform: translateY(-50%);\n line-height: 1;\n appearance: none;\n background: none;\n border: none;\n padding: 0 0.75rem;\n margin: 0;\n width: auto;\n color: inherit;\n}\n.hello-bar button.hello-bar-button svg {\n height: 1rem;\n}\n\n.hello-bar.hello-bar--size-large {\n font-size: 120%;\n}\n.hello-bar.hello-bar--size-large .hello-bar-container {\n height: 4rem;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text .cta {\n padding: 0.75rem 1.25rem;\n border: 0.5rem solid;\n margin-left: 0.5rem;\n}\n.hello-bar.hello-bar--size-large p.hello-bar-text .cta.wiggle {\n animation: hello-bar-wiggle 5s infinite;\n}\n\n.hello-bar.hello-bar--size-large button.hello-bar-button svg {\n height: 1.33rem;\n}\n\n@keyframes hello-bar-wiggle {\n 2% { transform: translateX(3px) rotate(2deg); }\n 4% { transform: translateX(-3px) rotate(-2deg); }\n 6% { transform: translateX(3px) rotate(2deg); }\n 8% { transform: translateX(-3px) rotate(-2deg); }\n 10% { transform: translateX(2px) rotate(1deg); }\n 12% { transform: translateX(-2px) rotate(-1deg); }\n 14% { transform: translateX(2px) rotate(1deg); }\n 16% { transform: translateX(-2px) rotate(-1deg); }\n 18% { transform: translateX(1px) rotate(0); }\n 20% { transform: translateX(-1px) rotate(0); }\n}"]} \ No newline at end of file diff --git a/build/index.js b/build/index.js index ab1e0c7f..211b0d42 100644 --- a/build/index.js +++ b/build/index.js @@ -1,6 +1,6 @@ /*! * - * hello-bar v1.0.3 + * hello-bar v1.1.0 * https://github.com/AnandChowdhary/hello-bar * * Copyright (c) Anand Chowdhary (https://github.com/AnandChowdhary) @@ -9,5 +9,5 @@ * LICENSE file in the root directory of this source tree. * */ -!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define("HelloBar",[],e):"object"===typeof exports?exports.HelloBar=e():t.HelloBar=e()}(window,function(){return function(t){var e={};function __webpack_require__(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,i){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},__webpack_require__.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(__webpack_require__.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)__webpack_require__.d(i,n,function(e){return t[e]}.bind(null,n));return i},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=1)}([function(t,e){t.exports=function(t,e,n){var r=/#/.test(t),o=void 0!==e&&void 0!==n,s=Array.isArray(t),a="#ffffff",c=0;if(r)c=i(t.substr(1,2)),e=i(t.substr(3,2)),n=i(t.substr(5,2));else if(o)c=parseInt(t),e=parseInt(e),n=parseInt(n);else{if(!s)return a;c=parseInt(t[0]),e=parseInt(t[1]),n=parseInt(t[2])}return Math.sqrt(c*c*.241+e*e*.691+n*n*.068)>130&&(a="#000000"),a};var i=function(t){var e=t.replace(/[^a-f0-9]/gi,"");return parseInt(e,16)}},function(t,e,i){t.exports=i(3)},function(t,e,i){},function(t,e,i){"use strict";i.r(e);i(2);var n=i(0),r=i.n(n),o=["BE","BG","CZ","DK","DE","EE","IE","EL","ES","FR","HR","IT","CY","LV","LT","LU","HU","MT","NL","AT","PL","PT","RO","SI","SK","FI","SE","UK"];function _typeof(t){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _defineProperties(t,e){for(var i=0;i

'.concat(this.text,'

'),this.settings.hideClose||(this.bar.innerHTML+='')),this.bar.classList.add("hello-bar"),this.settings.fixed&&this.bar.classList.add("hello-bar--is-fixed"),"bottom"===this.settings.position?(this.bar.classList.add("hello-bar--is-bottom"),this.marginProp="marginBottom"):this.marginProp="marginTop",this.events={},this.confirmShow().then(function(){e.$emit("before-created"),e.insertBar(),e.functionBar(),e.calculateHeight(),e.colorizeBar(),e.settings.disableBodyMove||e.moveElements(document.body),e.moveElements(e.settings.move),e.showBar(),e.$emit("after-created")}).catch(function(){e.$emit("not-created")})}var t,e,i;return t=App,(e=[{key:"on",value:function(t,e){this.events[t]=e}},{key:"$emit",value:function(t,e){this.events[t]&&"function"===typeof this.events[t]&&this.events[t](e)}},{key:"confirmShow",value:function(){var t=this;return new Promise(function(e,i){var n=function(){if(t.settings.targeting.once&&sessionStorage.getItem("hello-bar--session-showed"))return i();if(t.settings.targeting.onceUser&&localStorage.getItem("hello-bar--user-showed"))return i();if(Object.keys(t.settings.targeting.time).length){var n={year:"getFullYear",month:"getMonth",day:"getDate",dayOfWeek:"getDay",hour:"getHours",minute:"getMinutes",second:"getSeconds"},r=["getMonth","getDay"];["year","month","day","hour","minute","second"].forEach(function(e){var o=new Date;if(t.settings.targeting.time.after[e]){var s=o[n[e]]();if(r.includes(e)&&(s+=1),s<=t.settings.targeting.time.after[e])return i()}if(t.settings.targeting.time.before[e]){var a=o[n[e]]();if(r.includes(e)&&(a+=1),a>=t.settings.targeting.time.after[e])return i()}})}return t.settings.targeting.params&&Object.keys(t.settings.targeting.params).forEach(function(e){var n=function(t){var e=window.location.href;t=t.replace(/[[\]]/g,"\\$&");var i=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e);if(i&&i[2])return decodeURIComponent(i[2].replace(/\+/g," "))}(e);if(n&&n!==t.settings.targeting.params[e])return i()}),t.settings.targeting.pathname&&window.location.pathname!==t.settings.targeting.pathname?i():t.settings.targeting.href&&window.location.href!==t.settings.targeting.href?i():void e()};if(t.settings.hide)return i();Object.keys(t.settings.targeting.location).length?t.getIpInfo().then(function(e){if(t.settings.targeting.location.eu&&!o.includes(e.country))return i();["country","city","ip","postal","region"].forEach(function(n){if(t.settings.targeting.location[n]&&t.settings.targeting.location[n].constructor===Array&&!t.settings.targeting.location[n].includes(e[n]))return i()}),n()}):n()})}},{key:"showBar",value:function(){var t=this;document.querySelector("#".concat(this.id))&&(this.bar.style.transition=(this.settings.duration||500)+"ms",setTimeout(function(){t.bar.classList.add("hello-bar--is-visible")},this.settings.delay||1),this.$emit("show-bar",this.bar))}},{key:"hideBar",value:function(){var t=this;if(document.querySelector("#".concat(this.id))){this.bar.classList.remove("hello-bar--is-visible"),sessionStorage.setItem("hello-bar--session-showed",!0),localStorage.setItem("hello-bar--user-showed",!0);for(var e=document.querySelectorAll(".hello-bar--has-moved"),i=0;i *");t?document.body.insertBefore(this.bar,t):document.body.appendChild(this.bar),this.$emit("created",this.bar)}},{key:"moveElements",value:function(t){if(t)if("string"===typeof t)for(var e=document.querySelectorAll(t),i=0;i(new Date).getTime())return t(o.cache_value)}catch(s){}fetch(n,r).then(function(t){return t.json()}).then(function(e){localStorage.setItem(i,JSON.stringify({created_at:(new Date).getTime(),expires_at:(new Date).getTime()+6048e5,cache_value:e})),t(e)}).catch(function(t){return e(t)})})).then(function(i){t.$emit("fetch-ip-info",i),e(i)}).catch(function(e){t.$emit("error-ip-info",e),i(e)})})}}])&&_defineProperties(t.prototype,e),i&&_defineProperties(t,i),App}();e.default=s}])}); +!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define("HelloBar",[],e):"object"===typeof exports?exports.HelloBar=e():t.HelloBar=e()}(window,function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__webpack_require__.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)__webpack_require__.d(n,i,function(e){return t[e]}.bind(null,i));return n},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=2)}([function(t,e){t.exports=function(t,e,i){var r=/#/.test(t),o=void 0!==e&&void 0!==i,s=Array.isArray(t),a="#ffffff",c=0;if(r)c=n(t.substr(1,2)),e=n(t.substr(3,2)),i=n(t.substr(5,2));else if(o)c=parseInt(t),e=parseInt(e),i=parseInt(i);else{if(!s)return a;c=parseInt(t[0]),e=parseInt(t[1]),i=parseInt(t[2])}return Math.sqrt(c*c*.241+e*e*.691+i*i*.068)>130&&(a="#000000"),a};var n=function(t){var e=t.replace(/[^a-f0-9]/gi,"");return parseInt(e,16)}},function(t,e){function debounce(t,e,n){var i,r,o,s,a;function later(){var c=Date.now()-s;c=0?i=setTimeout(later,e-c):(i=null,n||(a=t.apply(o,r),o=r=null))}null==e&&(e=100);var c=function(){o=this,r=arguments,s=Date.now();var c=n&&!i;return i||(i=setTimeout(later,e)),c&&(a=t.apply(o,r),o=r=null),a};return c.clear=function(){i&&(clearTimeout(i),i=null)},c.flush=function(){i&&(a=t.apply(o,r),o=r=null,clearTimeout(i),i=null)},c}debounce.debounce=debounce,t.exports=debounce},function(t,e,n){t.exports=n(4)},function(t,e,n){},function(t,e,n){"use strict";n.r(e);n(3);var i=n(0),r=n.n(i),o=n(1),s=n.n(o),a=["BE","BG","CZ","DK","DE","EE","IE","EL","ES","FR","HR","IT","CY","LV","LT","LU","HU","MT","NL","AT","PL","PT","RO","SI","SK","FI","SE","UK"];function _typeof(t){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _defineProperties(t,e){for(var n=0;n

'.concat(this.text,'

'),this.settings.hideClose||(this.bar.innerHTML+='')),this.bar.classList.add("hello-bar"),this.settings.fixed&&this.bar.classList.add("hello-bar--is-fixed"),"bottom"===this.settings.position?(this.bar.classList.add("hello-bar--is-bottom"),this.marginProp="marginBottom"):this.marginProp="marginTop",this.events={},window.addEventListener("resize",s()(function(){document.querySelector("#".concat(e.id))&&(e.$emit("window-resize"),e.unMove(),e.settings.disableBodyMove||e.moveElements(document.body),e.moveElements(e.settings.move),e.colorizeBar())},200)),this.confirmShow().then(function(){e.$emit("before-created"),e.insertBar(),e.functionBar(),e.calculateHeight(),e.colorizeBar(),e.settings.disableBodyMove||e.moveElements(document.body),e.moveElements(e.settings.move),e.showBar(),e.$emit("after-created")}).catch(function(){e.$emit("not-created")})}var t,e,n;return t=App,(e=[{key:"on",value:function(t,e){this.events[t]=e}},{key:"$emit",value:function(t,e){this.events[t]&&"function"===typeof this.events[t]&&this.events[t](e)}},{key:"confirmShow",value:function(){var t=this;return new Promise(function(e,n){var i=function(){if(t.settings.targeting.once&&sessionStorage.getItem("hello-bar--session-showed"))return n();if(t.settings.targeting.onceUser&&localStorage.getItem("hello-bar--user-showed"))return n();if(Object.keys(t.settings.targeting.time).length){var i={year:"getFullYear",month:"getMonth",day:"getDate",dayOfWeek:"getDay",hour:"getHours",minute:"getMinutes",second:"getSeconds"},r=["getMonth","getDay"];["year","month","day","hour","minute","second"].forEach(function(e){var o=new Date;if(t.settings.targeting.time.after[e]){var s=o[i[e]]();if(r.includes(e)&&(s+=1),s<=t.settings.targeting.time.after[e])return n()}if(t.settings.targeting.time.before[e]){var a=o[i[e]]();if(r.includes(e)&&(a+=1),a>=t.settings.targeting.time.after[e])return n()}})}return t.settings.targeting.params&&Object.keys(t.settings.targeting.params).forEach(function(e){var i=function(t){var e=window.location.href;t=t.replace(/[[\]]/g,"\\$&");var n=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e);if(n&&n[2])return decodeURIComponent(n[2].replace(/\+/g," "))}(e);if(i&&i!==t.settings.targeting.params[e])return n()}),t.settings.targeting.pathname&&window.location.pathname!==t.settings.targeting.pathname?n():t.settings.targeting.href&&window.location.href!==t.settings.targeting.href?n():void e()};if(t.settings.hide)return n();Object.keys(t.settings.targeting.location).length?t.getIpInfo().then(function(e){if(t.settings.targeting.location.eu&&!a.includes(e.country))return n();["country","city","ip","postal","region"].forEach(function(i){if(t.settings.targeting.location[i]&&t.settings.targeting.location[i].constructor===Array&&!t.settings.targeting.location[i].includes(e[i]))return n()}),i()}):i()})}},{key:"showBar",value:function(){var t=this;document.querySelector("#".concat(this.id))&&(this.bar.style.transition=(this.settings.duration||500)+"ms",setTimeout(function(){t.bar.classList.add("hello-bar--is-visible")},this.settings.delay||1),this.$emit("show-bar",this.bar))}},{key:"unMove",value:function(){for(var t=document.querySelectorAll(".hello-bar--has-moved"),e=0;e *");t?document.body.insertBefore(this.bar,t):document.body.appendChild(this.bar),this.$emit("created",this.bar)}},{key:"moveElements",value:function(t){if(t)if("string"===typeof t)for(var e=document.querySelectorAll(t),n=0;n(new Date).getTime())return t(o.cache_value)}catch(s){}fetch(i,r).then(function(t){return t.json()}).then(function(e){localStorage.setItem(n,JSON.stringify({created_at:(new Date).getTime(),expires_at:(new Date).getTime()+6048e5,cache_value:e})),t(e)}).catch(function(t){return e(t)})})).then(function(n){t.$emit("fetch-ip-info",n),e(n)}).catch(function(e){t.$emit("error-ip-info",e),n(e)})})}}])&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),App}();e.default=c}])}); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map index 5c7a6cd2..ef564a79 100644 --- a/build/index.js.map +++ b/build/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../webpack/universalModuleDefinition","../../webpack/bootstrap","../../node_modules/font-color-contrast/font-color-contrast.js","euCountries.js","App.js","getParameterByName.js","cachedFetch.js","index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","hexColorOrRedOrArray","green","blue","isHex","test","isRGB","undefined","isArray","Array","fontColor","red","hexToDec","substr","parseInt","Math","sqrt","hexString","decString","replace","euCountries","App","settings","_this","this","_classCallCheck","forEach","category","targeting","location","params","time","before","after","id","random","toString","bar","document","createElement","setAttribute","_typeof","text","floor","length","innerHTML","concat","hideClose","i18n","hideText","classList","add","fixed","position","marginProp","events","confirmShow","then","$emit","insertBar","functionBar","calculateHeight","colorizeBar","disableBodyMove","moveElements","body","move","showBar","catch","eventName","callback","context","_this2","Promise","resolve","reject","finishConfirmation","once","sessionStorage","getItem","onceUser","localStorage","keys","timeMatches","year","month","day","dayOfWeek","hour","minute","second","addValue","dateType","timeNow","Date","currentValue","includes","param","paramValue","url","href","results","RegExp","exec","decodeURIComponent","getParameterByName","pathname","hide","getIpInfo","geolocation","eu","country","targetOptions","constructor","_this3","querySelector","style","transition","duration","setTimeout","delay","_this4","remove","setItem","movedElements","querySelectorAll","currentMargin","height","parentNode","removeChild","_this5","addEventListener","hideBar","eventMatches","mouseenter","mouseleave","click","mouseup","mousedown","cta","event","backgroundColor","background","textColor","fontColorContrast","color","textAlign","align","lineHeight","size","getBoundingClientRect","offsetHeight","firstChild","insertBefore","appendChild","elements","allElements","contains","currentStyle","getComputedStyle","_this6","options","ipEndpoint","cacheKey","JSON","stringify","cacheObject","parse","expires_at","getTime","cache_value","e","fetch","response","json","created_at","error"],"mappings":";;;;;;;;;;;CAAA,SAAAA,EAAAC,GACA,kBAAAC,SAAA,kBAAAC,OACAA,OAAAD,QAAAD,IACA,oBAAAG,eAAAC,IACAD,OAAA,cAAAH,GACA,kBAAAC,QACAA,QAAA,SAAAD,IAEAD,EAAA,SAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,oBAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAT,QAAA,IAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,qBAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,oBAAAM,EAAAF,EAGAJ,oBAAAO,EAAAR,EAGAC,oBAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,oBAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CV,oBAAAgB,EAAA,SAAAtB,GACA,qBAAAuB,eAAAC,aACAN,OAAAC,eAAAnB,EAAAuB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAnB,EAAA,cAAiDyB,OAAA,KAQjDnB,oBAAAoB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAnB,oBAAAmB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,kBAAAF,QAAAG,WAAA,OAAAH,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QAAQ,SAACC,EAASC,GEtTlB,IAACwB,EAAK8D,GAAL9D,EFuTE6D,EAAK1I,SAAS4I,YAAc,yBEtT5C,IAAIzF,QAAQ,SAACC,EAASC,GACpB,IAAMwF,EAAQ,mBAAArH,OAAsBqD,GAAtBrD,OACZmH,EAAU,IAAMG,KAAKC,UAAUJ,GAAW,IAE5C,GAAIhF,aAAaF,QAAQoF,GACvB,IACE,IAAMG,EAAcF,KAAKG,MAAMtF,aAAaF,QAAQoF,IACpD,GAAIG,EAAYE,YAAa,IAAI1E,MAAO2E,UACtC,OAAO/F,EAAQ4F,EAAYI,aAC7B,MAAOC,IAEXC,MAAMzE,EAAK8D,GACRxG,KAAK,SAAAoH,GAAQ,OAAIA,EAASC,SAC1BrH,KAAK,SAAAqH,GACJ7F,aAAa0C,QACXwC,EACAC,KAAKC,UAAU,CACbU,YAAY,IAAIjF,MAAO2E,UACvBD,YAAY,IAAI1E,MAAO2E,UAAY,OACnCC,YAAaI,KAGjBpG,EAAQoG,KAET1G,MAAM,SAAA4G,GAAK,OAAIrG,EAAOqG,QF+RpBvH,KAAK,SAAAqH,GACJd,EAAKtG,MAAM,gBAAiBoH,GAC5BpG,EAAQoG,KAET1G,MAAM,SAAA4G,GACLhB,EAAKtG,MAAM,gBAAiBsH,GAC5BrG,EAAOqG,8EGlUF3J","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"HelloBar\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"HelloBar\"] = factory();\n\telse\n\t\troot[\"HelloBar\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","var fontColorContrast = function fontColorContrast(hexColorOrRedOrArray, green, blue) {\n // Check if the color is hexadecimal (with hash)\n var hash = /#/;\n var isHex = hash.test(hexColorOrRedOrArray);\n var isRGB = green !== undefined && blue !== undefined ? true : false;\n var isArray = Array.isArray(hexColorOrRedOrArray); //Default is a bright color\n\n var fontColor = '#ffffff';\n var red = 0;\n\n if (isHex) {\n red = hexToDec(hexColorOrRedOrArray.substr(1, 2));\n green = hexToDec(hexColorOrRedOrArray.substr(3, 2));\n blue = hexToDec(hexColorOrRedOrArray.substr(5, 2));\n } else if (isRGB) {\n red = parseInt(hexColorOrRedOrArray);\n green = parseInt(green);\n blue = parseInt(blue);\n } else if (isArray) {\n red = parseInt(hexColorOrRedOrArray[0]);\n green = parseInt(hexColorOrRedOrArray[1]);\n blue = parseInt(hexColorOrRedOrArray[2]);\n } else {\n // Not a color, respond with white color\n return fontColor;\n }\n\n var contrast = Math.sqrt(red * red * .241 + green * green * .691 + blue * blue * .068);\n\n if (contrast > 130) {\n fontColor = '#000000';\n }\n\n return fontColor;\n};\n\nmodule.exports = fontColorContrast;\n\nvar hexToDec = function hexToDec(hexString) {\n var decString = hexString.replace(/[^a-f0-9]/gi, '');\n return parseInt(decString, 16);\n};","export default [\n \"BE\",\n \"BG\",\n \"CZ\",\n \"DK\",\n \"DE\",\n \"EE\",\n \"IE\",\n \"EL\",\n \"ES\",\n \"FR\",\n \"HR\",\n \"IT\",\n \"CY\",\n \"LV\",\n \"LT\",\n \"LU\",\n \"HU\",\n \"MT\",\n \"NL\",\n \"AT\",\n \"PL\",\n \"PT\",\n \"RO\",\n \"SI\",\n \"SK\",\n \"FI\",\n \"SE\",\n \"UK\"\n];\n","import \"./css/App.css\";\nimport fontColorContrast from \"font-color-contrast\";\nimport cachedFetch from \"./cachedFetch\";\nimport euCountries from \"./euCountries\";\nimport getParameterByName from \"./getParameterByName\";\n\nclass App {\n constructor(settings) {\n settings = settings || {};\n this.settings = settings;\n [\"i18n\", \"targeting\"].forEach(category => {\n this.settings[category] = this.settings[category] || {};\n });\n this.settings.targeting.location = this.settings.targeting.location || {};\n this.settings.targeting.params = this.settings.targeting.params || {};\n this.settings.targeting.time = this.settings.targeting.time || {};\n this.settings.targeting.time.before = this.settings.targeting.time.before || {};\n this.settings.targeting.time.after = this.settings.targeting.time.after || {};\n this.id =\n \"helloBar_\" +\n Math.random()\n .toString(36)\n .substr(2);\n this.bar = document.createElement(\"div\");\n this.bar.setAttribute(\"id\", this.id);\n if (typeof this.settings.text === \"object\") {\n this.text = this.settings.text[\n Math.floor(Math.random() * this.settings.text.length)\n ];\n } else {\n this.text = this.settings.text;\n }\n this.bar.innerHTML = `

${\n this.text\n }

`;\n if (!this.settings.hideClose) {\n this.bar.innerHTML += ``;\n }\n this.bar.classList.add(\"hello-bar\");\n if (this.settings.fixed) {\n this.bar.classList.add(\"hello-bar--is-fixed\");\n }\n if (this.settings.position === \"bottom\") {\n this.bar.classList.add(\"hello-bar--is-bottom\");\n this.marginProp = \"marginBottom\";\n } else {\n this.marginProp = \"marginTop\";\n }\n this.events = {};\n this.confirmShow()\n .then(() => {\n this.$emit(\"before-created\");\n this.insertBar();\n this.functionBar();\n this.calculateHeight();\n this.colorizeBar();\n if (!this.settings.disableBodyMove) this.moveElements(document.body);\n this.moveElements(this.settings.move);\n this.showBar();\n this.$emit(\"after-created\");\n })\n .catch(() => {\n this.$emit(\"not-created\");\n });\n }\n\n on(eventName, callback) {\n this.events[eventName] = callback;\n }\n\n $emit(eventName, context) {\n if (this.events[eventName] && typeof this.events[eventName] === \"function\")\n this.events[eventName](context);\n }\n\n confirmShow() {\n return new Promise((resolve, reject) => {\n const finishConfirmation = () => {\n if (this.settings.targeting.once) {\n if (sessionStorage.getItem(\"hello-bar--session-showed\"))\n return reject();\n }\n if (this.settings.targeting.onceUser) {\n if (localStorage.getItem(\"hello-bar--user-showed\")) return reject();\n }\n if (Object.keys(this.settings.targeting.time).length) {\n const timeMatches = {\n year: \"getFullYear\",\n month: \"getMonth\",\n day: \"getDate\",\n dayOfWeek: \"getDay\",\n hour: \"getHours\",\n minute: \"getMinutes\",\n second: \"getSeconds\",\n };\n const addValue = [\"getMonth\", \"getDay\"];\n [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\"].forEach(dateType => {\n const timeNow = new Date();\n if (this.settings.targeting.time.after[dateType]) {\n let currentValue = timeNow[timeMatches[dateType]]();\n if (addValue.includes(dateType)) currentValue += 1;\n if (currentValue <= this.settings.targeting.time.after[dateType]) return reject();\n }\n if (this.settings.targeting.time.before[dateType]) {\n let currentValue = timeNow[timeMatches[dateType]]();\n if (addValue.includes(dateType)) currentValue += 1;\n if (currentValue >= this.settings.targeting.time.after[dateType]) return reject();\n }\n });\n }\n if (this.settings.targeting.params) {\n Object.keys(this.settings.targeting.params).forEach(param => {\n const paramValue = getParameterByName(param);\n if (\n paramValue &&\n paramValue !== this.settings.targeting.params[param]\n )\n return reject();\n });\n }\n if (this.settings.targeting.pathname) {\n if (window.location.pathname !== this.settings.targeting.pathname) return reject();\n }\n if (this.settings.targeting.href) {\n if (window.location.href !== this.settings.targeting.href) return reject();\n }\n resolve();\n };\n if (this.settings.hide) return reject();\n if (Object.keys(this.settings.targeting.location).length) {\n this.getIpInfo().then(geolocation => {\n if (this.settings.targeting.location.eu) {\n if (!euCountries.includes(geolocation.country)) return reject();\n }\n [\"country\", \"city\", \"ip\", \"postal\", \"region\"].forEach(\n targetOptions => {\n if (\n this.settings.targeting.location[targetOptions] &&\n this.settings.targeting.location[targetOptions].constructor ===\n Array\n ) {\n if (\n !this.settings.targeting.location[targetOptions].includes(\n geolocation[targetOptions]\n )\n )\n return reject();\n }\n }\n );\n finishConfirmation();\n });\n } else {\n finishConfirmation();\n }\n });\n }\n\n showBar() {\n if (!document.querySelector(`#${this.id}`)) return;\n this.bar.style.transition = (this.settings.duration || 500) + \"ms\";\n setTimeout(() => {\n this.bar.classList.add(\"hello-bar--is-visible\");\n }, this.settings.delay || 1);\n this.$emit(\"show-bar\", this.bar);\n }\n\n hideBar() {\n if (!document.querySelector(`#${this.id}`)) return;\n this.bar.classList.remove(\"hello-bar--is-visible\");\n sessionStorage.setItem(\"hello-bar--session-showed\", true);\n localStorage.setItem(\"hello-bar--user-showed\", true);\n const movedElements = document.querySelectorAll(\".hello-bar--has-moved\");\n for (let i = 0; i < movedElements.length; i++) {\n const currentMargin = parseInt(movedElements[i].style[this.marginProp]);\n movedElements[i].style[this.marginProp] = `${currentMargin -\n this.height}px`;\n movedElements[i].classList.remove(\"hello-bar--has-moved\");\n }\n setTimeout(() => {\n this.bar.parentNode.removeChild(this.bar);\n }, (this.settings.duration || 500) + 1);\n this.$emit(\"hide-bar\", this.bar);\n }\n\n functionBar() {\n if (document.querySelector(\".hello-bar button.hello-bar-button\")) {\n document\n .querySelector(\".hello-bar button.hello-bar-button\")\n .addEventListener(\"click\", () => {\n this.$emit(\"close-bar\", this.bar);\n this.hideBar();\n });\n }\n const eventMatches = {\n mouseenter: \"mouse-enter\",\n mouseleave: \"mouse-leave\",\n click: \"mouse-click\",\n mouseup: \"mouse-up\",\n mousedown: \"mouse-down\"\n };\n const cta = document.querySelector(\".hello-bar .cta\");\n Object.keys(eventMatches).forEach(event => {\n this.bar.addEventListener(event, () =>\n this.$emit(eventMatches[event], this.bar)\n );\n if (cta) {\n cta.addEventListener(event, () =>\n this.$emit(`cta-${eventMatches[event]}`, cta)\n );\n }\n });\n }\n\n colorizeBar() {\n if (!document.querySelector(`#${this.id}`)) return;\n const backgroundColor = this.settings.background || \"#eeeeee\";\n const textColor =\n this.settings.textColor || fontColorContrast(backgroundColor);\n this.bar.style.backgroundColor = backgroundColor;\n if (document.querySelector(\".hello-bar .hello-bar-text--after\"))\n document.querySelector(\n \".hello-bar .hello-bar-text--after\"\n ).style.background = `linear-gradient(to right, rgba(0, 0, 0, 0), ${backgroundColor})`;\n this.bar.style.color = textColor;\n this.bar.style.textAlign = this.settings.align || \"center\";\n if (document.querySelector(\".hello-bar p.hello-bar-text .cta\")) {\n document.querySelector(\n \".hello-bar p.hello-bar-text .cta\"\n ).style.height = `${this.height}px`;\n document.querySelector(\n \".hello-bar p.hello-bar-text .cta\"\n ).style.lineHeight = `${this.height}px`;\n document.querySelector(\".hello-bar p.hello-bar-text .cta\").style.color =\n this.settings.background || \"#eeeeee\";\n document.querySelector(\n \".hello-bar p.hello-bar-text .cta\"\n ).style.background = textColor;\n this.$emit(\"color-bar\", {\n backgroundColor,\n textColor\n });\n }\n }\n\n calculateHeight() {\n if (!document.querySelector(`#${this.id}`)) return;\n if (this.settings.size)\n this.bar.classList.add(`hello-bar--size-${this.settings.size}`);\n if (\n typeof this.bar.getBoundingClientRect === \"function\" &&\n this.bar.getBoundingClientRect().height\n ) {\n this.height = this.bar.getBoundingClientRect().height;\n } else {\n this.height = this.bar.offsetHeight;\n }\n this.height = parseInt(this.height);\n this.$emit(\"calculate-height\", this.height);\n }\n\n insertBar() {\n const firstChild = document.querySelector(\"body > *\");\n if (firstChild) {\n document.body.insertBefore(this.bar, firstChild);\n } else {\n document.body.appendChild(this.bar);\n }\n this.$emit(\"created\", this.bar);\n }\n\n moveElements(elements) {\n if (!elements) return;\n // e.g., \"h1.hero-title\"\n if (typeof elements === \"string\") {\n const allElements = document.querySelectorAll(elements);\n for (let i = 0; i < allElements.length; i++) {\n this.moveElements(allElements[i]);\n }\n // e.g., [\"h1.hero-title\", document.querySelector(\"a#moveMe\")]\n } else if (elements.constructor === Array && elements.length) {\n for (let i = 0; i < elements.length; i++) {\n this.moveElements(elements[i]);\n }\n // e.g., document.querySelector(\"a#moveMe\")\n } else if (typeof elements === \"object\") {\n if (\n typeof elements.classList === \"object\" &&\n typeof elements.classList.add === \"function\" &&\n !elements.classList.contains(\"hello-bar--has-moved\")\n ) {\n const style =\n elements.currentStyle || window.getComputedStyle(elements);\n if (typeof style === \"object\" && style[this.marginProp]) {\n elements.style[this.marginProp] = `${parseInt(\n style[this.marginProp]\n ) + this.height}px`;\n } else {\n elements.style[this.marginProp] = `${this.height}px`;\n }\n this.$emit(\"move-element\", elements);\n elements.classList.add(\"hello-bar--has-moved\");\n }\n }\n }\n\n getIpInfo() {\n this.$emit(\"start-ip-info\");\n return new Promise((resolve, reject) => {\n cachedFetch(this.settings.ipEndpoint || \"https://ipinfo.io/json\")\n .then(json => {\n this.$emit(\"fetch-ip-info\", json);\n resolve(json);\n })\n .catch(error => {\n this.$emit(\"error-ip-info\", error);\n reject(error);\n });\n });\n }\n}\n\nexport default App;\n","export default name => {\n const url = window.location.href;\n name = name.replace(/[[\\]]/g, \"\\\\$&\");\n const regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\n results = regex.exec(url);\n if (!results) return;\n if (!results[2]) return;\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n};\n","/**\n * Fetch with local storage cache to prevent multple requests with the same expected response\n * @param {string} url - Endpoint for fetch request\n * @param {object} options - Fetch configuration object\n */\nexport default (url, options) =>\n new Promise((resolve, reject) => {\n const cacheKey = `hello_bar_cache_${url}${\n options ? \"_\" + JSON.stringify(options) : \"\"\n }`;\n if (localStorage.getItem(cacheKey)) {\n try {\n const cacheObject = JSON.parse(localStorage.getItem(cacheKey));\n if (cacheObject.expires_at > new Date().getTime())\n return resolve(cacheObject.cache_value);\n } catch (e) {}\n }\n fetch(url, options)\n .then(response => response.json())\n .then(json => {\n localStorage.setItem(\n cacheKey,\n JSON.stringify({\n created_at: new Date().getTime(),\n expires_at: new Date().getTime() + 7 * 24 * 60 * 60 * 1000, // One-week cache\n cache_value: json\n })\n );\n resolve(json);\n })\n .catch(error => reject(error));\n });\n","import App from \"./App\";\nexport default App;\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../../webpack/universalModuleDefinition","../../webpack/bootstrap","../../node_modules/font-color-contrast/font-color-contrast.js","../../node_modules/debounce/index.js","euCountries.js","App.js","getParameterByName.js","cachedFetch.js","index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","hexColorOrRedOrArray","green","blue","isHex","test","isRGB","undefined","isArray","Array","fontColor","red","hexToDec","substr","parseInt","Math","sqrt","hexString","decString","replace","debounce","func","wait","immediate","timeout","args","context","timestamp","result","later","last","Date","now","setTimeout","apply","debounced","this","arguments","callNow","clear","clearTimeout","flush","euCountries","App","settings","_this","_classCallCheck","forEach","category","targeting","location","params","time","before","after","id","random","toString","bar","document","createElement","setAttribute","_typeof","text","floor","length","innerHTML","concat","hideClose","i18n","hideText","classList","add","fixed","position","marginProp","events","addEventListener","querySelector","$emit","unMove","disableBodyMove","moveElements","body","move","colorizeBar","confirmShow","then","insertBar","functionBar","calculateHeight","showBar","catch","eventName","callback","_this2","Promise","resolve","reject","finishConfirmation","once","sessionStorage","getItem","onceUser","localStorage","keys","timeMatches","year","month","day","dayOfWeek","hour","minute","second","addValue","dateType","timeNow","currentValue","includes","param","paramValue","url","href","results","RegExp","exec","decodeURIComponent","getParameterByName","pathname","hide","getIpInfo","geolocation","eu","country","targetOptions","constructor","_this3","style","transition","duration","delay","movedElements","querySelectorAll","currentMargin","height","remove","_this4","setItem","parentNode","removeChild","_this5","hideBar","eventMatches","mouseenter","mouseleave","click","mouseup","mousedown","cta","event","backgroundColor","background","textColor","fontColorContrast","color","textAlign","align","size","getBoundingClientRect","offsetHeight","firstChild","insertBefore","appendChild","elements","allElements","contains","currentStyle","getComputedStyle","_this6","options","ipEndpoint","cacheKey","JSON","stringify","cacheObject","parse","expires_at","getTime","cache_value","e","fetch","response","json","created_at","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Q+F,KAETpG,MAAM,SAAAsG,GAAK,OAAIhG,EAAOgG,QFsSpB3G,KAAK,SAAAyG,GACJd,EAAKnG,MAAM,gBAAiBiH,GAC5B/F,EAAQ+F,KAETpG,MAAM,SAAAsG,GACLhB,EAAKnG,MAAM,gBAAiBmH,GAC5BhG,EAAOgG,8EGzUFvJ","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"HelloBar\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"HelloBar\"] = factory();\n\telse\n\t\troot[\"HelloBar\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","var fontColorContrast = function fontColorContrast(hexColorOrRedOrArray, green, blue) {\n // Check if the color is hexadecimal (with hash)\n var hash = /#/;\n var isHex = hash.test(hexColorOrRedOrArray);\n var isRGB = green !== undefined && blue !== undefined ? true : false;\n var isArray = Array.isArray(hexColorOrRedOrArray); //Default is a bright color\n\n var fontColor = '#ffffff';\n var red = 0;\n\n if (isHex) {\n red = hexToDec(hexColorOrRedOrArray.substr(1, 2));\n green = hexToDec(hexColorOrRedOrArray.substr(3, 2));\n blue = hexToDec(hexColorOrRedOrArray.substr(5, 2));\n } else if (isRGB) {\n red = parseInt(hexColorOrRedOrArray);\n green = parseInt(green);\n blue = parseInt(blue);\n } else if (isArray) {\n red = parseInt(hexColorOrRedOrArray[0]);\n green = parseInt(hexColorOrRedOrArray[1]);\n blue = parseInt(hexColorOrRedOrArray[2]);\n } else {\n // Not a color, respond with white color\n return fontColor;\n }\n\n var contrast = Math.sqrt(red * red * .241 + green * green * .691 + blue * blue * .068);\n\n if (contrast > 130) {\n fontColor = '#000000';\n }\n\n return fontColor;\n};\n\nmodule.exports = fontColorContrast;\n\nvar hexToDec = function hexToDec(hexString) {\n var decString = hexString.replace(/[^a-f0-9]/gi, '');\n return parseInt(decString, 16);\n};","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n }\n\n ;\n\n var debounced = function debounced() {\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function () {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n debounced.flush = function () {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n}\n\n; // Adds compatibility for ES modules\n\ndebounce.debounce = debounce;\nmodule.exports = debounce;","export default [\n \"BE\",\n \"BG\",\n \"CZ\",\n \"DK\",\n \"DE\",\n \"EE\",\n \"IE\",\n \"EL\",\n \"ES\",\n \"FR\",\n \"HR\",\n \"IT\",\n \"CY\",\n \"LV\",\n \"LT\",\n \"LU\",\n \"HU\",\n \"MT\",\n \"NL\",\n \"AT\",\n \"PL\",\n \"PT\",\n \"RO\",\n \"SI\",\n \"SK\",\n \"FI\",\n \"SE\",\n \"UK\"\n];\n","import \"./css/App.css\";\nimport fontColorContrast from \"font-color-contrast\";\nimport debounce from \"debounce\";\nimport cachedFetch from \"./cachedFetch\";\nimport euCountries from \"./euCountries\";\nimport getParameterByName from \"./getParameterByName\";\n\nclass App {\n constructor(settings) {\n settings = settings || {};\n this.settings = settings;\n [\"i18n\", \"targeting\"].forEach(category => {\n this.settings[category] = this.settings[category] || {};\n });\n this.settings.targeting.location = this.settings.targeting.location || {};\n this.settings.targeting.params = this.settings.targeting.params || {};\n this.settings.targeting.time = this.settings.targeting.time || {};\n this.settings.targeting.time.before = this.settings.targeting.time.before || {};\n this.settings.targeting.time.after = this.settings.targeting.time.after || {};\n this.id =\n \"helloBar_\" +\n Math.random()\n .toString(36)\n .substr(2);\n this.bar = document.createElement(\"div\");\n this.bar.setAttribute(\"id\", this.id);\n if (typeof this.settings.text === \"object\") {\n this.text = this.settings.text[\n Math.floor(Math.random() * this.settings.text.length)\n ];\n } else {\n this.text = this.settings.text;\n }\n this.bar.innerHTML = `

${\n this.text\n }

`;\n if (!this.settings.hideClose) {\n this.bar.innerHTML += ``;\n }\n this.bar.classList.add(\"hello-bar\");\n if (this.settings.fixed) {\n this.bar.classList.add(\"hello-bar--is-fixed\");\n }\n if (this.settings.position === \"bottom\") {\n this.bar.classList.add(\"hello-bar--is-bottom\");\n this.marginProp = \"marginBottom\";\n } else {\n this.marginProp = \"marginTop\";\n }\n this.events = {};\n window.addEventListener(\"resize\", debounce(() => {\n if (!document.querySelector(`#${this.id}`)) return;\n this.$emit(\"window-resize\");\n this.unMove();\n if (!this.settings.disableBodyMove) this.moveElements(document.body);\n this.moveElements(this.settings.move);\n this.colorizeBar();\n }, 200));\n this.confirmShow()\n .then(() => {\n this.$emit(\"before-created\");\n this.insertBar();\n this.functionBar();\n this.calculateHeight();\n this.colorizeBar();\n if (!this.settings.disableBodyMove) this.moveElements(document.body);\n this.moveElements(this.settings.move);\n this.showBar();\n this.$emit(\"after-created\");\n })\n .catch(() => {\n this.$emit(\"not-created\");\n });\n }\n\n on(eventName, callback) {\n this.events[eventName] = callback;\n }\n\n $emit(eventName, context) {\n if (this.events[eventName] && typeof this.events[eventName] === \"function\")\n this.events[eventName](context);\n }\n\n confirmShow() {\n return new Promise((resolve, reject) => {\n const finishConfirmation = () => {\n if (this.settings.targeting.once) {\n if (sessionStorage.getItem(\"hello-bar--session-showed\"))\n return reject();\n }\n if (this.settings.targeting.onceUser) {\n if (localStorage.getItem(\"hello-bar--user-showed\")) return reject();\n }\n if (Object.keys(this.settings.targeting.time).length) {\n const timeMatches = {\n year: \"getFullYear\",\n month: \"getMonth\",\n day: \"getDate\",\n dayOfWeek: \"getDay\",\n hour: \"getHours\",\n minute: \"getMinutes\",\n second: \"getSeconds\",\n };\n const addValue = [\"getMonth\", \"getDay\"];\n [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\"].forEach(dateType => {\n const timeNow = new Date();\n if (this.settings.targeting.time.after[dateType]) {\n let currentValue = timeNow[timeMatches[dateType]]();\n if (addValue.includes(dateType)) currentValue += 1;\n if (currentValue <= this.settings.targeting.time.after[dateType]) return reject();\n }\n if (this.settings.targeting.time.before[dateType]) {\n let currentValue = timeNow[timeMatches[dateType]]();\n if (addValue.includes(dateType)) currentValue += 1;\n if (currentValue >= this.settings.targeting.time.after[dateType]) return reject();\n }\n });\n }\n if (this.settings.targeting.params) {\n Object.keys(this.settings.targeting.params).forEach(param => {\n const paramValue = getParameterByName(param);\n if (\n paramValue &&\n paramValue !== this.settings.targeting.params[param]\n )\n return reject();\n });\n }\n if (this.settings.targeting.pathname) {\n if (window.location.pathname !== this.settings.targeting.pathname) return reject();\n }\n if (this.settings.targeting.href) {\n if (window.location.href !== this.settings.targeting.href) return reject();\n }\n resolve();\n };\n if (this.settings.hide) return reject();\n if (Object.keys(this.settings.targeting.location).length) {\n this.getIpInfo().then(geolocation => {\n if (this.settings.targeting.location.eu) {\n if (!euCountries.includes(geolocation.country)) return reject();\n }\n [\"country\", \"city\", \"ip\", \"postal\", \"region\"].forEach(\n targetOptions => {\n if (\n this.settings.targeting.location[targetOptions] &&\n this.settings.targeting.location[targetOptions].constructor ===\n Array\n ) {\n if (\n !this.settings.targeting.location[targetOptions].includes(\n geolocation[targetOptions]\n )\n )\n return reject();\n }\n }\n );\n finishConfirmation();\n });\n } else {\n finishConfirmation();\n }\n });\n }\n\n showBar() {\n if (!document.querySelector(`#${this.id}`)) return;\n this.bar.style.transition = (this.settings.duration || 500) + \"ms\";\n setTimeout(() => {\n this.bar.classList.add(\"hello-bar--is-visible\");\n }, this.settings.delay || 1);\n this.$emit(\"show-bar\", this.bar);\n }\n\n unMove() {\n const movedElements = document.querySelectorAll(\".hello-bar--has-moved\");\n for (let i = 0; i < movedElements.length; i++) {\n const currentMargin = parseInt(movedElements[i].style[this.marginProp]);\n movedElements[i].style[this.marginProp] = `${currentMargin -\n this.height}px`;\n movedElements[i].classList.remove(\"hello-bar--has-moved\");\n }\n }\n\n hideBar() {\n if (!document.querySelector(`#${this.id}`)) return;\n this.bar.classList.remove(\"hello-bar--is-visible\");\n sessionStorage.setItem(\"hello-bar--session-showed\", true);\n localStorage.setItem(\"hello-bar--user-showed\", true);\n this.unMove();\n setTimeout(() => {\n this.bar.parentNode.removeChild(this.bar);\n }, (this.settings.duration || 500) + 1);\n this.$emit(\"hide-bar\", this.bar);\n }\n\n functionBar() {\n if (document.querySelector(\".hello-bar button.hello-bar-button\")) {\n document\n .querySelector(\".hello-bar button.hello-bar-button\")\n .addEventListener(\"click\", () => {\n this.$emit(\"close-bar\", this.bar);\n this.hideBar();\n });\n }\n const eventMatches = {\n mouseenter: \"mouse-enter\",\n mouseleave: \"mouse-leave\",\n click: \"mouse-click\",\n mouseup: \"mouse-up\",\n mousedown: \"mouse-down\"\n };\n const cta = document.querySelector(\".hello-bar .cta\");\n Object.keys(eventMatches).forEach(event => {\n this.bar.addEventListener(event, () =>\n this.$emit(eventMatches[event], this.bar)\n );\n if (cta) {\n cta.addEventListener(event, () =>\n this.$emit(`cta-${eventMatches[event]}`, cta)\n );\n }\n });\n }\n\n colorizeBar() {\n if (!document.querySelector(`#${this.id}`)) return;\n const backgroundColor = this.settings.background || \"#eeeeee\";\n const textColor =\n this.settings.textColor || fontColorContrast(backgroundColor);\n this.bar.style.backgroundColor = backgroundColor;\n if (document.querySelector(\".hello-bar .hello-bar-text--after\"))\n document.querySelector(\n \".hello-bar .hello-bar-text--after\"\n ).style.background = `linear-gradient(to right, rgba(0, 0, 0, 0), ${backgroundColor})`;\n this.bar.style.color = textColor;\n this.bar.style.textAlign = this.settings.align || \"center\";\n if (document.querySelector(\".hello-bar p.hello-bar-text .cta\")) {\n document.querySelector(\".hello-bar p.hello-bar-text .cta\").style.color =\n this.settings.background || \"#eeeeee\";\n document.querySelector(\n \".hello-bar p.hello-bar-text .cta\"\n ).style.background = textColor;\n this.$emit(\"color-bar\", {\n backgroundColor,\n textColor\n });\n }\n }\n\n calculateHeight() {\n if (!document.querySelector(`#${this.id}`)) return;\n if (this.settings.size)\n this.bar.classList.add(`hello-bar--size-${this.settings.size}`);\n if (\n typeof this.bar.getBoundingClientRect === \"function\" &&\n this.bar.getBoundingClientRect().height\n ) {\n this.height = this.bar.getBoundingClientRect().height;\n } else {\n this.height = this.bar.offsetHeight;\n }\n this.height = parseInt(this.height);\n this.$emit(\"calculate-height\", this.height);\n }\n\n insertBar() {\n const firstChild = document.querySelector(\"body > *\");\n if (firstChild) {\n document.body.insertBefore(this.bar, firstChild);\n } else {\n document.body.appendChild(this.bar);\n }\n this.$emit(\"created\", this.bar);\n }\n\n moveElements(elements) {\n if (!elements) return;\n // e.g., \"h1.hero-title\"\n if (typeof elements === \"string\") {\n const allElements = document.querySelectorAll(elements);\n for (let i = 0; i < allElements.length; i++) {\n this.moveElements(allElements[i]);\n }\n // e.g., [\"h1.hero-title\", document.querySelector(\"a#moveMe\")]\n } else if (elements.constructor === Array && elements.length) {\n for (let i = 0; i < elements.length; i++) {\n this.moveElements(elements[i]);\n }\n // e.g., document.querySelector(\"a#moveMe\")\n } else if (typeof elements === \"object\") {\n if (\n typeof elements.classList === \"object\" &&\n typeof elements.classList.add === \"function\" &&\n !elements.classList.contains(\"hello-bar--has-moved\")\n ) {\n const style =\n elements.currentStyle || window.getComputedStyle(elements);\n if (typeof style === \"object\" && style[this.marginProp]) {\n elements.style[this.marginProp] = `${parseInt(\n style[this.marginProp]\n ) + this.height}px`;\n } else {\n elements.style[this.marginProp] = `${this.height}px`;\n }\n this.$emit(\"move-element\", elements);\n elements.classList.add(\"hello-bar--has-moved\");\n }\n }\n }\n\n getIpInfo() {\n this.$emit(\"start-ip-info\");\n return new Promise((resolve, reject) => {\n cachedFetch(this.settings.ipEndpoint || \"https://ipinfo.io/json\")\n .then(json => {\n this.$emit(\"fetch-ip-info\", json);\n resolve(json);\n })\n .catch(error => {\n this.$emit(\"error-ip-info\", error);\n reject(error);\n });\n });\n }\n}\n\nexport default App;\n","export default name => {\n const url = window.location.href;\n name = name.replace(/[[\\]]/g, \"\\\\$&\");\n const regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\n results = regex.exec(url);\n if (!results) return;\n if (!results[2]) return;\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n};\n","/**\n * Fetch with local storage cache to prevent multple requests with the same expected response\n * @param {string} url - Endpoint for fetch request\n * @param {object} options - Fetch configuration object\n */\nexport default (url, options) =>\n new Promise((resolve, reject) => {\n const cacheKey = `hello_bar_cache_${url}${\n options ? \"_\" + JSON.stringify(options) : \"\"\n }`;\n if (localStorage.getItem(cacheKey)) {\n try {\n const cacheObject = JSON.parse(localStorage.getItem(cacheKey));\n if (cacheObject.expires_at > new Date().getTime())\n return resolve(cacheObject.cache_value);\n } catch (e) {}\n }\n fetch(url, options)\n .then(response => response.json())\n .then(json => {\n localStorage.setItem(\n cacheKey,\n JSON.stringify({\n created_at: new Date().getTime(),\n expires_at: new Date().getTime() + 7 * 24 * 60 * 60 * 1000, // One-week cache\n cache_value: json\n })\n );\n resolve(json);\n })\n .catch(error => reject(error));\n });\n","import App from \"./App\";\nexport default App;\n"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index 1b52cd35..46bbea91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hello-bar", - "version": "1.0.3", + "version": "1.1.0", "main": "build/index.js", "scripts": { "start": "node scripts/start.js", @@ -140,6 +140,7 @@ ] }, "dependencies": { + "debounce": "^1.2.0", "font-color-contrast": "^1.0.3" } } diff --git a/src/docs/App.js b/src/docs/App.js index 801ed2e9..40dc9009 100644 --- a/src/docs/App.js +++ b/src/docs/App.js @@ -2,7 +2,7 @@ import "./css/App.css"; import Lib from "../lib"; const checkOutText = - "Check out this repository on GitHub now! ⭐ Star now"; + "Check out this repository on GitHub now! ★  Star now"; const euText = "🍪 This website uses cookies to make your experience better. Cookie policy"; const randomText = ["You are seeing message A!", "You are seeing message B!"]; diff --git a/src/docs/css/App.css b/src/docs/css/App.css index 10d70252..f5197bae 100644 --- a/src/docs/css/App.css +++ b/src/docs/css/App.css @@ -4,11 +4,11 @@ body { } h1 { font-weight: 300; - margin-top: 30vh; - margin-bottom: 5vh; + margin-top: 1rem; + margin-bottom: 5rem; } .options { - margin-bottom: 20vh; + margin-bottom: 10rem; } .options div { margin-bottom: 1rem; @@ -17,5 +17,5 @@ p { max-width: 400px; line-height: 1.5; margin: auto; - margin-bottom: 10vh; + margin-bottom: 10rem; } \ No newline at end of file diff --git a/src/lib/App.js b/src/lib/App.js index aab5dbde..f0504371 100644 --- a/src/lib/App.js +++ b/src/lib/App.js @@ -1,5 +1,6 @@ import "./css/App.css"; import fontColorContrast from "font-color-contrast"; +import debounce from "debounce"; import cachedFetch from "./cachedFetch"; import euCountries from "./euCountries"; import getParameterByName from "./getParameterByName"; @@ -54,6 +55,14 @@ class App { this.marginProp = "marginTop"; } this.events = {}; + window.addEventListener("resize", debounce(() => { + if (!document.querySelector(`#${this.id}`)) return; + this.$emit("window-resize"); + this.unMove(); + if (!this.settings.disableBodyMove) this.moveElements(document.body); + this.moveElements(this.settings.move); + this.colorizeBar(); + }, 200)); this.confirmShow() .then(() => { this.$emit("before-created"); @@ -172,11 +181,7 @@ class App { this.$emit("show-bar", this.bar); } - hideBar() { - if (!document.querySelector(`#${this.id}`)) return; - this.bar.classList.remove("hello-bar--is-visible"); - sessionStorage.setItem("hello-bar--session-showed", true); - localStorage.setItem("hello-bar--user-showed", true); + unMove() { const movedElements = document.querySelectorAll(".hello-bar--has-moved"); for (let i = 0; i < movedElements.length; i++) { const currentMargin = parseInt(movedElements[i].style[this.marginProp]); @@ -184,6 +189,14 @@ class App { this.height}px`; movedElements[i].classList.remove("hello-bar--has-moved"); } + } + + hideBar() { + if (!document.querySelector(`#${this.id}`)) return; + this.bar.classList.remove("hello-bar--is-visible"); + sessionStorage.setItem("hello-bar--session-showed", true); + localStorage.setItem("hello-bar--user-showed", true); + this.unMove(); setTimeout(() => { this.bar.parentNode.removeChild(this.bar); }, (this.settings.duration || 500) + 1); @@ -232,12 +245,6 @@ class App { this.bar.style.color = textColor; this.bar.style.textAlign = this.settings.align || "center"; if (document.querySelector(".hello-bar p.hello-bar-text .cta")) { - document.querySelector( - ".hello-bar p.hello-bar-text .cta" - ).style.height = `${this.height}px`; - document.querySelector( - ".hello-bar p.hello-bar-text .cta" - ).style.lineHeight = `${this.height}px`; document.querySelector(".hello-bar p.hello-bar-text .cta").style.color = this.settings.background || "#eeeeee"; document.querySelector( diff --git a/src/lib/css/App.css b/src/lib/css/App.css index 114e0818..6f8a3c53 100644 --- a/src/lib/css/App.css +++ b/src/lib/css/App.css @@ -26,11 +26,14 @@ overflow-y: hidden; margin-right: 1.5rem; overflow-x: auto; + display: flex; + flex-direction: column; + justify-content: center; + height: 2rem; } .hello-bar p.hello-bar-text { - margin: 0; - padding: 0.66rem; + margin: 0 auto; text-align: inherit; max-width: 100%; line-height: 1; @@ -45,9 +48,7 @@ vertical-align: middle; width: auto; border: none; - padding: 0 1rem; - margin-top: -0.66rem; - margin-bottom: -0.66rem; + padding: 0.3rem 1rem; border: 0.3rem solid; border-radius: 10rem; font: inherit; @@ -61,13 +62,6 @@ color: inherit; font-weight: bold; } -.hello-bar p.hello-bar-text::before, -.hello-bar p.hello-bar-text::after { - content: ""; - display: inline-block; - background-color: red; - width: 2rem; -} .hello-bar .hello-bar-text--after { position: absolute; right: 1rem; @@ -103,13 +97,11 @@ .hello-bar.hello-bar--size-large { font-size: 120%; } -.hello-bar.hello-bar--size-large p.hello-bar-text { - padding: 1rem; +.hello-bar.hello-bar--size-large .hello-bar-container { + height: 4rem; } .hello-bar.hello-bar--size-large p.hello-bar-text .cta { - padding: 0 1.25rem; - margin-top: -1rem; - margin-bottom: -1rem; + padding: 0.75rem 1.25rem; border: 0.5rem solid; margin-left: 0.5rem; } diff --git a/yarn.lock b/yarn.lock index b1c90763..ef67ad16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2949,6 +2949,11 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= +debounce@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" + integrity sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg== + debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"