diff --git a/README.md b/README.md index 8e50ca6..814a4ab 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,9 @@ See the corresponding [bhwi API](https://github.com/cyrilkyburz/bhwi_proxy). Thanks to [jsdelivr](https://www.jsdelivr.com/) for hosting it. ```html - - + + + ``` ### Easy: bower @@ -27,11 +28,11 @@ bower install bhwi ```html - + - +
diff --git a/bower.json b/bower.json index 40d1f74..5cac90d 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "bhwi", "description": "Blogger Heaven Instagram Widget", - "version": "1.0.1", + "version": "1.1.0", "homepage": "none", "license": "MIT", "private": false, diff --git a/dist/bhwi.min.css b/dist/bhwi.min.css index a65d487..5fe0944 100644 --- a/dist/bhwi.min.css +++ b/dist/bhwi.min.css @@ -1 +1 @@ -.bhwi *{box-sizing:border-box}.bhwi a{height:100%;display:block}.bhwi a div{background-size:cover!important;max-height:100%;max-width:100%;vertical-align:middle}.bhwi.bhwi-slider,.bhwi.bhwi-timeline{overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;justify-content:space-around}.bhwi.bhwi-slider{height:200px;line-height:200px}.bhwi.bhwi-slider a{height:200px;width:200px;position:absolute;left:0}.bhwi.bhwi-slider a .bhwi-image{width:100%;height:100%}.bhwi-lightbox{display:none;z-index:2;position:fixed;top:0;right:0;bottom:0;left:0;text-align:center;background-color:rgba(0,0,0,.8)}.bhwi-lightbox *{box-sizing:border-box}.bhwi-lightbox .bhwi-content{display:inline-block;z-index:3;position:relative;background-color:#fff;margin-top:100px;width:700px;max-height:100%;max-width:100%;text-align:left}.bhwi-lightbox .bhwi-content .bhwi-image-section,.bhwi-lightbox .bhwi-content .bhwi-text-section{float:left}.bhwi-lightbox .bhwi-content .bhwi-image-section *,.bhwi-lightbox .bhwi-content .bhwi-text-section *{max-width:100%}.bhwi-lightbox .bhwi-content .bhwi-image-section{width:60%}.bhwi-lightbox .bhwi-content .bhwi-image-section .bhwi-image{padding-top:100%;background-size:cover!important}.bhwi-lightbox .bhwi-content .bhwi-text-section{width:40%;padding:10px}.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-author{display:inline-block;margin:20px 0 25px 20px;font-size:20px;color:inherit;text-decoration:none}.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-description{margin:20px;line-height:20px}.bhwi-lightbox .bhwi-content .bhwi-text-section hr{height:1px;border:0;border-top:1px solid #ccc}.bhwi-lightbox .bhwi-content .bhwi-text-section footer{position:absolute;bottom:0;width:37%;width:calc(40% - 20px);margin-bottom:10px}.bhwi-lightbox .bhwi-content .bhwi-text-section footer .bhwi-credits{text-align:right}.bhwi-lightbox .bhwi-content .bhwi-text-section footer .bhwi-credits a{color:rgba(0,0,0,.7);text-decoration:none}.bhwi-lightbox .bhwi-full-background{background-size:cover!important;display:block;filter:blur(2px);-webkit-filter:blur(2px);height:100%;left:0;position:fixed;right:0;z-index:1}.bhwi-lightbox .bhwi-icon{position:absolute}.bhwi-lightbox .bhwi-icon.left{left:-80px}.bhwi-lightbox .bhwi-icon.right{right:-80px}.bhwi-lightbox .bhwi-icon.left,.bhwi-lightbox .bhwi-icon.right{width:40px;height:60px;top:calc(50% - 30px)}.bhwi-lightbox .bhwi-icon.left g,.bhwi-lightbox .bhwi-icon.right g{stroke:hsla(0,0%,100%,.8);stroke-width:2px}.bhwi-lightbox .bhwi-icon.left:hover g,.bhwi-lightbox .bhwi-icon.right:hover g{stroke:#fff}.bhwi-lightbox .bhwi-icon.close{width:20px;height:20px;top:10px;right:10px}@media (max-width:850px){.bhwi-lightbox .bhwi-navigation{display:none}}@media (max-width:700px){.bhwi-lightbox .bhwi-content{width:400px;overflow-x:scroll;margin-top:0}.bhwi-lightbox .bhwi-content .bhwi-image-section,.bhwi-lightbox .bhwi-content .bhwi-text-section{width:auto;float:none}.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-description{margin:40px 20px}.bhwi-lightbox .bhwi-content .bhwi-text-section footer{position:initial;bottom:initial;width:auto}}.bhwi-icon{cursor:pointer}.bhwi-icon g{stroke:rgba(0,0,0,.5);fill:none}.bhwi-icon:hover g{stroke:#000} \ No newline at end of file +.bhwi *{box-sizing:border-box}.bhwi a{height:100%;display:block}.bhwi a div{background-size:cover!important;max-height:100%;max-width:100%;vertical-align:middle}.bhwi.bhwi-slider,.bhwi.bhwi-timeline{overflow:hidden;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.bhwi.bhwi-slider{height:200px;line-height:200px}.bhwi.bhwi-slider a{height:200px;width:200px;position:absolute;left:0}.bhwi.bhwi-slider a .bhwi-image{width:100%;height:100%}.bhwi-lightbox{display:none;z-index:2;position:fixed;top:0;right:0;bottom:0;left:0;text-align:center;background-color:rgba(0,0,0,.8)}.bhwi-lightbox *{box-sizing:border-box}.bhwi-lightbox .bhwi-content{display:inline-block;z-index:3;position:relative;background-color:#fff;margin:100px auto 0;width:700px;max-height:100%;max-width:100%;text-align:left}.bhwi-lightbox .bhwi-content .bhwi-image-section,.bhwi-lightbox .bhwi-content .bhwi-text-section{float:left}.bhwi-lightbox .bhwi-content .bhwi-image-section *,.bhwi-lightbox .bhwi-content .bhwi-text-section *{max-width:100%}.bhwi-lightbox .bhwi-content .bhwi-image-section{width:60%}.bhwi-lightbox .bhwi-content .bhwi-image-section .bhwi-image{padding-top:100%;background-size:cover!important}.bhwi-lightbox .bhwi-content .bhwi-text-section{width:40%;padding:10px}.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-author{display:inline-block;padding:25px 0 20px 20px;font-size:20px;color:inherit;text-decoration:none;width:100%;word-break:break-all;border-bottom:1px solid #ccc}.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-description{margin:20px;line-height:20px;word-break:break-all}.bhwi-lightbox .bhwi-content .bhwi-text-section footer{border-top:1px solid #ccc;padding-top:10px}.bhwi-lightbox .bhwi-content .bhwi-text-section footer .bhwi-credits{text-align:right}.bhwi-lightbox .bhwi-content .bhwi-text-section footer .bhwi-credits a{color:rgba(0,0,0,.7);text-decoration:none}.bhwi-lightbox .bhwi-full-background{background-size:cover!important;display:block;filter:blur(2px);-webkit-filter:blur(2px);height:100%;left:0;position:fixed;right:0;z-index:1}.bhwi-lightbox .bhwi-icon{position:absolute}.bhwi-lightbox .bhwi-icon.left{left:-80px}.bhwi-lightbox .bhwi-icon.right{right:-80px}.bhwi-lightbox .bhwi-icon.left,.bhwi-lightbox .bhwi-icon.right{width:40px;height:60px;top:calc(50% - 30px)}.bhwi-lightbox .bhwi-icon.left g,.bhwi-lightbox .bhwi-icon.right g{stroke:hsla(0,0%,100%,.8);stroke-width:2px}.bhwi-lightbox .bhwi-icon.left:hover g,.bhwi-lightbox .bhwi-icon.right:hover g{stroke:#fff}.bhwi-lightbox .bhwi-icon.close{width:20px;height:20px;top:10px;right:10px}@media (max-width:850px){.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-navigation{display:none}.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-author{padding:10px 0 20px 20px}}@media (max-width:700px){.bhwi-lightbox .bhwi-content{width:400px;overflow-x:scroll;margin-top:0}.bhwi-lightbox .bhwi-content .bhwi-image-section,.bhwi-lightbox .bhwi-content .bhwi-text-section{width:auto;float:none}.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-description{margin:40px 20px}.bhwi-lightbox .bhwi-content .bhwi-text-section footer{position:initial;bottom:initial;width:auto}}@media (min-width:701px){.bhwi-lightbox .bhwi-content,.bhwi-lightbox .bhwi-content .bhwi-text-section{display:-webkit-flex;display:-ms-flexbox;display:flex}.bhwi-lightbox .bhwi-content .bhwi-text-section{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.bhwi-lightbox .bhwi-content .bhwi-text-section .bhwi-description{-webkit-flex:1;-ms-flex:1;flex:1}}.bhwi-icon{cursor:pointer}.bhwi-icon g{stroke:rgba(0,0,0,.5);fill:none}.bhwi-icon:hover g{stroke:#000} \ No newline at end of file diff --git a/dist/bhwi.min.js b/dist/bhwi.min.js index 54a26ca..300706e 100644 --- a/dist/bhwi.min.js +++ b/dist/bhwi.min.js @@ -1 +1 @@ -var BhwiOptions=function(){function i(i){var t={dom_element:"bhwi",type:"instagram",speed:4e3,form:"timeline",images_number:8,images_spacing:6,lightbox:!0,lightbox_key_navigation:{previous:37,next:39},lightbox_background:!1,preloading_images:!0};this.options=jQuery.extend(t,i),this._validateOptions()}return i.prototype._validateOptions=function(){if("instagram"==this.options.type){if(null==this.options.client_id)throw new Error('For the instagram API the "client_id" is needed.')}else if(null==this.options.url)throw new Error('For the bhwi API the "url" is needed.')},i}(),BhwiHelper=function(){function i(i){this.dom_element=jQuery("#"+i).addClass("bhwi"),this.timer={}}return i.prototype.buildLink=function(i){return jQuery("").attr({href:i,target:"_blank"})},i.prototype.buildImage=function(i,t){return jQuery("
").css("background",'url("'+t+'") center no-repeat').addClass("bhwi-image").data("bhwi-image-id",i)},i.prototype.buildSlide=function(i,t,e){return this.buildLink(i).append(this.buildImage(t,e))},i.prototype.buildDescription=function(i,t,e,n){var o=jQuery("
").addClass("bhwi-navigation").append(this.buildLeftAngleIcon(),this.buildRightAngleIcon(),this.buildCrossIcon()),s=jQuery("
"),h=jQuery("
").addClass("bhwi-description").text(e),r=this.buildLink(i).addClass("bhwi-author").text("@"+t),a=(jQuery("").text(this.shortDateFormat(new Date(1e3*n))),this.buildLink("https://blogger-heaven.com/?utm_source=jacky&utm_medium=Widget&utm_campaign=BHWIWidget").text("blogger-heaven.com")),d=jQuery("
").addClass("bhwi-credits").append(a),l=jQuery("