Version Description
- New: Added ability to enqueue the CSS file through the shortcode. This loads the file in the footer of the site, and only on pages that include a feed. Enable on the "Customize" tab.
- Tweak: Resized images can be used in the page source code when "Disable js image loading" setting is enabled.
- Fix: HTML for header would still be visible in the source of the page when removing the header using showheader=false in the shortcode
Download this release
Release Info
Developer | smashballoon |
Plugin | Instagram Feed |
Version | 2.1.1 |
Comparing to | |
See all releases |
Code changes from version 2.1 to 2.1.1
- README.txt +6 -1
- css/sb-instagram-2-1.css +3 -0
- css/sb-instagram-2-1.min.css +1 -1
- css/sb-instagram.css +3 -0
- css/sb-instagram.min.css +1 -1
- inc/admin/main.php +14 -0
- inc/class-sb-instagram-api-connect.php +8 -0
- inc/class-sb-instagram-display-elements.php +34 -4
- inc/class-sb-instagram-feed.php +28 -0
- inc/class-sb-instagram-parse.php +9 -6
- inc/class-sb-instagram-post.php +5 -1
- inc/class-sb-instagram-settings.php +4 -1
- inc/if-functions.php +43 -4
- instagram-feed.php +1 -1
- js/sb-instagram-2-1.js +9 -0
- js/sb-instagram-2-1.min.js +1 -1
- js/sb-instagram-admin.js +1 -1
- js/sb-instagram.js +9 -0
- js/sb-instagram.min.js +1 -866
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon, craig-at-smash-balloon
|
|
3 |
Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 5.3
|
6 |
-
Stable tag: 2.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -324,6 +324,11 @@ We understand that sometimes you need help, have issues or just have questions.
|
|
324 |
* Plus more customization options added all the time!
|
325 |
|
326 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
327 |
= 2.1 =
|
328 |
* New: Added the ability to overwrite default templates in your theme. View [this article](https://smashballoon.com/guide-to-creating-custom-templates/) for more information.
|
329 |
* New: Added several PHP hooks for modifying feeds settings and functionality.
|
3 |
Tags: Instagram, Instagram feed, Instagram photos, Instagram widget, Instagram gallery
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 5.3
|
6 |
+
Stable tag: 2.1.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
324 |
* Plus more customization options added all the time!
|
325 |
|
326 |
== Changelog ==
|
327 |
+
= 2.1.1 =
|
328 |
+
* New: Added ability to enqueue the CSS file through the shortcode. This loads the file in the footer of the site, and only on pages that include a feed. Enable on the "Customize" tab.
|
329 |
+
* Tweak: Resized images can be used in the page source code when "Disable js image loading" setting is enabled.
|
330 |
+
* Fix: HTML for header would still be visible in the source of the page when removing the header using showheader=false in the shortcode
|
331 |
+
|
332 |
= 2.1 =
|
333 |
* New: Added the ability to overwrite default templates in your theme. View [this article](https://smashballoon.com/guide-to-creating-custom-templates/) for more information.
|
334 |
* New: Added several PHP hooks for modifying feeds settings and functionality.
|
css/sb-instagram-2-1.css
CHANGED
@@ -738,3 +738,6 @@
|
|
738 |
#sb_instagram.sbi_no_js .sbi_load_btn{
|
739 |
display: none;
|
740 |
}
|
|
|
|
|
|
738 |
#sb_instagram.sbi_no_js .sbi_load_btn{
|
739 |
display: none;
|
740 |
}
|
741 |
+
#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
|
742 |
+
padding-bottom: 0 !important;
|
743 |
+
}
|
css/sb-instagram-2-1.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;*display:inline;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:hover,#sb_instagram a:focus,#sb_instagram a:active{outline:none}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:hover,#sb_instagram .sbi_link a:focus{text-decoration:underline}#sb_instagram .sbi_photo_wrap:hover .sbi_link,#sb_instagram .sbi_photo_wrap:focus .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em}#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_carousel .sbi_playbtn,.sbi_type_carousel .fa-clone,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_carousel .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}.sbi_type_carousel svg.fa-clone,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{-webkit-filter:drop-shadow(0 0 2px rgba(0,0,0,.4));filter:drop-shadow(0 0 2px rgba(0,0,0,.4))}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1.0s infinite ease-in-out;animation:sbi-sk-scaleout 1.0s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;min-width:100%\9;text-decoration:none;transition:color 0.5s ease}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity 0.4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity 0.2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity 0.2s}#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all 0.5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all 0.1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram .sbi_follow_btn a,#sb_instagram .sbi_follow_btn a,#sb_instagram #sbi_load .sbi_load_btn{transition:all 0.1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:none;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:hover,#sb_instagram .sbi_follow_btn a:focus{outline:none;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram .sbi_follow_btn.sbi_custom a:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram .sbi_follow_btn a:active,#sb_instagram #sbi_load .sbi_load_btn:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_playbtn,#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_playbtn,#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item,#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item,#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_photo img,#sb_instagram.sbi_no_js .sbi_load_btn{display:none}
|
1 |
+
#sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}
|
css/sb-instagram.css
CHANGED
@@ -738,3 +738,6 @@
|
|
738 |
#sb_instagram.sbi_no_js .sbi_load_btn{
|
739 |
display: none;
|
740 |
}
|
|
|
|
|
|
738 |
#sb_instagram.sbi_no_js .sbi_load_btn{
|
739 |
display: none;
|
740 |
}
|
741 |
+
#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo {
|
742 |
+
padding-bottom: 0 !important;
|
743 |
+
}
|
css/sb-instagram.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;*display:inline;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all 0.5s ease;-moz-transition:all 0.5s ease;-o-transition:all 0.5s ease;-ms-transition:all 0.5s ease;transition:all 0.5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:hover,#sb_instagram a:focus,#sb_instagram a:active{outline:none}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:hover,#sb_instagram .sbi_link a:focus{text-decoration:underline}#sb_instagram .sbi_photo_wrap:hover .sbi_link,#sb_instagram .sbi_photo_wrap:focus .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em}#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_carousel .sbi_playbtn,.sbi_type_carousel .fa-clone,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_carousel .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}.sbi_type_carousel svg.fa-clone,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play{-webkit-filter:drop-shadow(0 0 2px rgba(0,0,0,.4));filter:drop-shadow(0 0 2px rgba(0,0,0,.4))}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1.0s infinite ease-in-out;animation:sbi-sk-scaleout 1.0s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;min-width:100%\9;text-decoration:none;transition:color 0.5s ease}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity 0.4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity 0.2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity 0.2s}#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all 0.5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all 0.1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;*display:inline;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram .sbi_follow_btn a,#sb_instagram .sbi_follow_btn a,#sb_instagram #sbi_load .sbi_load_btn{transition:all 0.1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:none;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:hover,#sb_instagram .sbi_follow_btn a:focus{outline:none;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram .sbi_follow_btn.sbi_custom a:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram .sbi_follow_btn a:active,#sb_instagram #sbi_load .sbi_load_btn:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_playbtn,#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_playbtn,#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item,#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item,#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_photo img,#sb_instagram.sbi_no_js .sbi_load_btn{display:none}
|
1 |
+
#sb_instagram{width:100%;margin:0 auto;padding:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram:after{content:"";display:table;clear:both}#sb_instagram.sbi_fixed_height{overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images{width:100%;float:left;line-height:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_images .sbi_item{display:-moz-inline-stack;display:inline-block;float:left;vertical-align:top;zoom:1;max-height:1000px;padding:inherit!important;margin:0!important;text-decoration:none;opacity:1;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-o-transition:all .5s ease;-ms-transition:all .5s ease;transition:all .5s ease}#sb_instagram #sbi_images .sbi_item.sbi_transition{opacity:0;max-height:0}#sb_instagram.sbi_col_1 #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3 #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5 #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7 #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8 #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item{width:10%}#sb_instagram.sbi_col_1.sbi_disable_mobile #sbi_images .sbi_item{width:100%}#sb_instagram.sbi_col_2.sbi_disable_mobile #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_3.sbi_disable_mobile #sbi_images .sbi_item{width:33.33%}#sb_instagram.sbi_col_4.sbi_disable_mobile #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_col_5.sbi_disable_mobile #sbi_images .sbi_item{width:20%}#sb_instagram.sbi_col_6.sbi_disable_mobile #sbi_images .sbi_item{width:16.66%}#sb_instagram.sbi_col_7.sbi_disable_mobile #sbi_images .sbi_item{width:14.28%}#sb_instagram.sbi_col_8.sbi_disable_mobile #sbi_images .sbi_item{width:12.5%}#sb_instagram.sbi_col_9.sbi_disable_mobile #sbi_images .sbi_item{width:11.11%}#sb_instagram.sbi_col_10.sbi_disable_mobile #sbi_images .sbi_item{width:10%}#sb_instagram .sbi_photo_wrap{position:relative}#sb_instagram .sbi_photo{display:block;text-decoration:none}#sb_instagram .sbi_photo img{width:100%;height:auto}#sb_instagram .sbi_no_js img{display:none}#sb_instagram a,#sb_instagram a:active,#sb_instagram a:focus,#sb_instagram a:hover{outline:0}#sb_instagram img{display:block;padding:0!important;margin:0!important;max-width:100%!important;opacity:1!important}#sb_instagram .sbi_link{display:none;position:absolute;bottom:0;right:0;width:100%;padding:10px 0;background:rgba(0,0,0,.5);text-align:center;color:#fff;font-size:12px;line-height:1.1}#sb_instagram .sbi_link a{padding:0 6px;text-decoration:none;color:#fff;font-size:12px;line-height:1.1;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1}#sb_instagram .sbi_link .sbi_lightbox_link{padding-bottom:5px}#sb_instagram .sbi_link a:focus,#sb_instagram .sbi_link a:hover{text-decoration:underline}#sb_instagram .sbi_photo_wrap:focus .sbi_link,#sb_instagram .sbi_photo_wrap:hover .sbi_link{display:block}#sb_instagram svg:not(:root).svg-inline--fa{height:1em}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .sbi_playbtn,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel .fa-clone{display:block!important;position:absolute;z-index:1;color:#fff;color:rgba(255,255,255,.9);font-style:normal!important;text-shadow:0 0 8px rgba(0,0,0,.8)}#sb_instagram .sbi_type_carousel .sbi_playbtn,#sb_instagram .sbi_type_video .sbi_playbtn{z-index:2;top:50%;left:50%;margin-top:-24px;margin-left:-19px;padding:0;font-size:48px}#sb_instagram .sbi_type_carousel .fa-clone{right:12px;top:12px;font-size:24px;text-shadow:0 0 8px rgba(0,0,0,.3)}#sb_instagram .sbi_type_carousel .svg-inline--fa.fa-play,#sb_instagram .sbi_type_video .svg-inline--fa.fa-play,.sbi_type_carousel svg.fa-clone{-webkit-filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) );filter:drop-shadow( 0 0 2px rgba(0,0,0,.4) )}#sb_instagram .sbi_loader{width:20px;height:20px;position:relative;top:50%;left:50%;margin:-10px 0 0 -10px;background-color:#000;background-color:rgba(0,0,0,.5);border-radius:100%;-webkit-animation:sbi-sk-scaleout 1s infinite ease-in-out;animation:sbi-sk-scaleout 1s infinite ease-in-out}#sb_instagram br{display:none}#sbi_load p{display:inline;padding:0;margin:0}#sb_instagram #sbi_load .sbi_loader{position:absolute;margin-top:-11px;background-color:#fff;opacity:1}@-webkit-keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0)}100%{-webkit-transform:scale(1);opacity:0}}@keyframes sbi-sk-scaleout{0%{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);opacity:0}}#sb_instagram .fa-spin,#sbi_lightbox .fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}#sb_instagram .fa-pulse,#sbi_lightbox .fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sbi-screenreader{text-indent:-9999px!important;display:block!important;width:0!important;height:0!important;line-height:0!important}#sb_instagram .sb_instagram_header{float:left;clear:both;margin:0 0 15px 0;padding:0;line-height:1.2;width:100%}#sb_instagram .sb_instagram_header a{float:left;display:block;text-decoration:none;transition:color .5s ease}@media all and (min-width:480px){#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_img img{width:80px;height:80px;border-radius:40px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{font-size:20px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{font-size:14px}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-left:95px!important;line-height:1.4}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text h3{margin-right:-85px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text .sbi_bio_info{margin-top:4px!important}#sb_instagram .sb_instagram_header.sbi_medium .sbi_header_text.sbi_no_bio h3{padding-top:20px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_img img{width:120px;height:120px;border-radius:60px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{font-size:28px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{font-size:16px}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info,#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-left:140px!important;line-height:1.5}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text h3{margin-right:-120px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text .sbi_bio_info{margin-top:12px!important}#sb_instagram .sb_instagram_header.sbi_large .sbi_header_text.sbi_no_bio h3{padding-top:32px!important}}#sb_instagram .sb_instagram_header .sbi_header_img{float:left;position:relative;width:50px;margin:0 0 0 -100%!important;overflow:hidden;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img img{float:left;margin:0!important;padding:0!important;border:none!important;-moz-border-radius:40px;-webkit-border-radius:40px;border-radius:40px}#sb_instagram .sb_instagram_header .sbi_header_img_hover{opacity:0;position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75)}#sb_instagram .sb_instagram_header .sbi_header_img_hover .sbi_new_logo{position:absolute;top:50%;left:50%;margin-top:-12px;margin-left:-12px;width:24px;height:24px;font-size:24px}#sb_instagram .sb_instagram_header .sbi_header_img_hover i{overflow:hidden;background:url(../img/small-logo.png) no-repeat 0 0}#sb_instagram .sb_instagram_header .sbi_header_img_hover{z-index:2;transition:opacity .4s ease-in-out}#sb_instagram .sb_instagram_header .sbi_fade_in{opacity:1;transition:opacity .2s ease-in-out}#sb_instagram .sb_instagram_header .sbi_header_img_hover{position:absolute;width:100%;top:0;bottom:0;left:0;text-align:center;color:#fff;background:rgba(0,0,0,.75);-moz-opacity:0;-khtml-opacity:0;opacity:0;border-radius:40px;transition:opacity .2s}#sb_instagram .sb_instagram_header a:focus .sbi_header_img_hover,#sb_instagram .sb_instagram_header a:hover .sbi_header_img_hover{opacity:1}#sb_instagram .sb_instagram_header .sbi_header_text{float:left;width:100%;padding-top:5px}#sb_instagram .sb_instagram_header a{text-decoration:none}#sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio,#sb_instagram .sb_instagram_header .sbi_header_text h3{float:left;clear:both;width:auto;margin:0 0 0 60px!important;padding:0!important}#sb_instagram .sb_instagram_header h3{font-size:16px;line-height:1.3}#sb_instagram .sb_instagram_header p{font-size:13px;line-height:1.3;margin:0;padding:0}#sb_instagram p:empty{display:none}#sb_instagram .sb_instagram_header .sbi_header_text img.emoji{margin-right:3px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio h3{padding-top:9px!important}#sb_instagram .sb_instagram_header .sbi_header_text.sbi_no_bio .sbi_bio_info{clear:both}#sb_instagram #sbi_load{float:left;clear:both;width:100%;text-align:center}#sb_instagram #sbi_load .fa-spinner{display:none;position:absolute;top:50%;left:50%;margin:-8px 0 0 -7px;font-size:15px}#sb_instagram #sbi_load{opacity:1;transition:all .5s ease-in}#sb_instagram .sbi_load_btn .sbi_btn_text,#sb_instagram .sbi_load_btn .sbi_loader{opacity:1;transition:all .1s ease-in}#sb_instagram .sbi_hidden{opacity:0!important}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;padding:7px 14px;margin:5px auto 0 auto;background:#333;color:#eee;border:none;color:#fff;text-decoration:none;font-size:13px;line-height:1.5;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#sb_instagram #sbi_load .sbi_load_btn{position:relative}#sb_instagram .sbi_follow_btn{display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;text-align:center}#sb_instagram .sbi_follow_btn.sbi_top{display:block;margin-bottom:5px}#sb_instagram .sbi_follow_btn a{background:#408bd1;color:#fff}#sb_instagram #sbi_load .sbi_load_btn,#sb_instagram .sbi_follow_btn a{transition:all .1s ease-in}#sb_instagram #sbi_load .sbi_load_btn:hover{outline:0;box-shadow:inset 0 0 20px 20px rgba(255,255,255,.25)}#sb_instagram .sbi_follow_btn a:focus,#sb_instagram .sbi_follow_btn a:hover{outline:0;box-shadow:inset 0 0 10px 20px #359dff}#sb_instagram #sbi_load .sbi_load_btn.sbi_custom:hover,#sb_instagram .sbi_follow_btn.sbi_custom a:focus,#sb_instagram .sbi_follow_btn.sbi_custom a:hover{box-shadow:inset 0 0 20px 20px rgba(255,255,255,.15)}#sb_instagram #sbi_load .sbi_load_btn:active,#sb_instagram .sbi_follow_btn a:active{box-shadow:inset 0 0 10px 20px rgba(0,0,0,.3)}#sb_instagram .sbi_follow_btn .fa,#sb_instagram .sbi_follow_btn svg{margin-bottom:-1px;margin-right:7px;font-size:15px}#sb_instagram .sbi_follow_btn svg{vertical-align:-.125em}#sb_instagram #sbi_load .sbi_follow_btn{margin-left:5px}#sb_instagram .sb_instagram_error{width:100%;text-align:center;line-height:1.4}#sbi_mod_error{display:none;border:1px solid #ddd;background:#eee;color:#333;margin:10px 0 0;padding:10px 15px;font-size:13px;text-align:center;clear:both;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#sbi_mod_error p{padding:5px 0!important;margin:0!important;line-height:1.3!important}#sbi_mod_error ol,#sbi_mod_error ul{padding:5px 0 5px 20px!important;margin:0!important}#sbi_mod_error li{padding:1px 0!important;margin:0!important}#sbi_mod_error span{font-size:12px}#sb_instagram.sbi_medium .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_medium .sbi_playbtn{margin-top:-12px;margin-left:-9px;font-size:23px}#sb_instagram.sbi_medium .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:8px;top:8px;font-size:18px}#sb_instagram.sbi_small .sbi_photo_wrap .svg-inline--fa.fa-play,#sb_instagram.sbi_small .sbi_playbtn{margin-top:-9px;margin-left:-7px;font-size:18px}#sb_instagram.sbi_small .sbi_type_carousel .sbi_photo_wrap .fa-clone{right:5px;top:5px;font-size:12px}@media all and (max-width:640px){#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item{width:50%}#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:25%}#sb_instagram.sbi_width_resp{width:100%!important}}@media all and (max-width:480px){#sb_instagram.sbi_col_10 #sbi_images .sbi_item,#sb_instagram.sbi_col_3 #sbi_images .sbi_item,#sb_instagram.sbi_col_4 #sbi_images .sbi_item,#sb_instagram.sbi_col_5 #sbi_images .sbi_item,#sb_instagram.sbi_col_6 #sbi_images .sbi_item,#sb_instagram.sbi_col_7 #sbi_images .sbi_item,#sb_instagram.sbi_col_8 #sbi_images .sbi_item,#sb_instagram.sbi_col_9 #sbi_images .sbi_item{width:100%}}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap{box-sizing:border-box;position:relative;overflow:hidden}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo_wrap:before{content:"";display:block;padding-top:100%;z-index:-300}#sb_instagram.sbi_no_js #sbi_images .sbi_item .sbi_photo{position:absolute;top:0;left:0;bottom:0;right:0}#sb_instagram.sbi_no_js #sbi_images .sbi_item.sbi_transition{opacity:1;max-height:640px}#sb_instagram.sbi_no_js .sbi_load_btn,#sb_instagram.sbi_no_js .sbi_photo img{display:none}#sb_instagram #sbi_images .sbi_js_load_disabled .sbi_imgLiquid_ready.sbi_photo{padding-bottom:0!important}
|
inc/admin/main.php
CHANGED
@@ -77,6 +77,7 @@ function sb_instagram_settings_page() {
|
|
77 |
'sb_instagram_cron' => 'no',
|
78 |
'sb_instagram_backup' => true,
|
79 |
'sb_ajax_initial' => false,
|
|
|
80 |
'sb_instagram_ajax_theme' => false,
|
81 |
'sb_instagram_disable_resize' => false,
|
82 |
'sb_instagram_favor_local' => false,
|
@@ -143,6 +144,7 @@ function sb_instagram_settings_page() {
|
|
143 |
$sb_instagram_cron = $options[ 'sb_instagram_cron' ];
|
144 |
$sb_instagram_backup = $options[ 'sb_instagram_backup' ];
|
145 |
$sb_ajax_initial = $options[ 'sb_ajax_initial' ];
|
|
|
146 |
$sbi_font_method = $options[ 'sbi_font_method' ];
|
147 |
$sb_instagram_disable_awesome = $options[ 'sb_instagram_disable_awesome' ];
|
148 |
$sb_instagram_custom_template = $options[ 'custom_template' ];
|
@@ -287,6 +289,7 @@ function sb_instagram_settings_page() {
|
|
287 |
if (isset($_POST[ 'sb_instagram_cron' ]) ) $sb_instagram_cron = $_POST[ 'sb_instagram_cron' ];
|
288 |
isset($_POST[ 'sb_instagram_backup' ]) ? $sb_instagram_backup = $_POST[ 'sb_instagram_backup' ] : $sb_instagram_backup = '';
|
289 |
isset($_POST[ 'sb_ajax_initial' ]) ? $sb_ajax_initial = $_POST[ 'sb_ajax_initial' ] : $sb_ajax_initial = '';
|
|
|
290 |
isset($_POST[ 'sbi_font_method' ]) ? $sbi_font_method = $_POST[ 'sbi_font_method' ] : $sbi_font_method = 'svg';
|
291 |
isset($_POST[ 'sb_instagram_disable_awesome' ]) ? $sb_instagram_disable_awesome = sanitize_text_field( $_POST[ 'sb_instagram_disable_awesome' ] ) : $sb_instagram_disable_awesome = '';
|
292 |
|
@@ -328,6 +331,8 @@ function sb_instagram_settings_page() {
|
|
328 |
$options[ 'sb_ajax_initial' ] = $sb_ajax_initial;
|
329 |
$options[ 'sb_instagram_cron' ] = $sb_instagram_cron;
|
330 |
$options['sb_instagram_backup'] = $sb_instagram_backup;
|
|
|
|
|
331 |
$options['sbi_font_method'] = $sbi_font_method;
|
332 |
$options[ 'sb_instagram_disable_awesome' ] = $sb_instagram_disable_awesome;
|
333 |
|
@@ -1734,6 +1739,15 @@ function sb_instagram_settings_page() {
|
|
1734 |
</td>
|
1735 |
</tr>
|
1736 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1737 |
<tr valign="top">
|
1738 |
<th scope="row"><label><?php _e('Disable JS Image Loading', 'instagram-feed'); ?></label></th>
|
1739 |
<td>
|
77 |
'sb_instagram_cron' => 'no',
|
78 |
'sb_instagram_backup' => true,
|
79 |
'sb_ajax_initial' => false,
|
80 |
+
'enqueue_css_in_shortcode' => false,
|
81 |
'sb_instagram_ajax_theme' => false,
|
82 |
'sb_instagram_disable_resize' => false,
|
83 |
'sb_instagram_favor_local' => false,
|
144 |
$sb_instagram_cron = $options[ 'sb_instagram_cron' ];
|
145 |
$sb_instagram_backup = $options[ 'sb_instagram_backup' ];
|
146 |
$sb_ajax_initial = $options[ 'sb_ajax_initial' ];
|
147 |
+
$enqueue_css_in_shortcode = $options[ 'enqueue_css_in_shortcode' ];
|
148 |
$sbi_font_method = $options[ 'sbi_font_method' ];
|
149 |
$sb_instagram_disable_awesome = $options[ 'sb_instagram_disable_awesome' ];
|
150 |
$sb_instagram_custom_template = $options[ 'custom_template' ];
|
289 |
if (isset($_POST[ 'sb_instagram_cron' ]) ) $sb_instagram_cron = $_POST[ 'sb_instagram_cron' ];
|
290 |
isset($_POST[ 'sb_instagram_backup' ]) ? $sb_instagram_backup = $_POST[ 'sb_instagram_backup' ] : $sb_instagram_backup = '';
|
291 |
isset($_POST[ 'sb_ajax_initial' ]) ? $sb_ajax_initial = $_POST[ 'sb_ajax_initial' ] : $sb_ajax_initial = '';
|
292 |
+
isset($_POST[ 'enqueue_css_in_shortcode' ]) ? $enqueue_css_in_shortcode = $_POST[ 'enqueue_css_in_shortcode' ] : $enqueue_css_in_shortcode = '';
|
293 |
isset($_POST[ 'sbi_font_method' ]) ? $sbi_font_method = $_POST[ 'sbi_font_method' ] : $sbi_font_method = 'svg';
|
294 |
isset($_POST[ 'sb_instagram_disable_awesome' ]) ? $sb_instagram_disable_awesome = sanitize_text_field( $_POST[ 'sb_instagram_disable_awesome' ] ) : $sb_instagram_disable_awesome = '';
|
295 |
|
331 |
$options[ 'sb_ajax_initial' ] = $sb_ajax_initial;
|
332 |
$options[ 'sb_instagram_cron' ] = $sb_instagram_cron;
|
333 |
$options['sb_instagram_backup'] = $sb_instagram_backup;
|
334 |
+
$options['enqueue_css_in_shortcode'] = $enqueue_css_in_shortcode;
|
335 |
+
|
336 |
$options['sbi_font_method'] = $sbi_font_method;
|
337 |
$options[ 'sb_instagram_disable_awesome' ] = $sb_instagram_disable_awesome;
|
338 |
|
1739 |
</td>
|
1740 |
</tr>
|
1741 |
|
1742 |
+
<tr valign="top">
|
1743 |
+
<th scope="row"><label><?php _e('Enqueue CSS file with shortcode', 'instagram-feed'); ?></label></th>
|
1744 |
+
<td>
|
1745 |
+
<input type="checkbox" name="enqueue_css_in_shortcode" id="sb_instagram_enqueue_css_in_shortcode" <?php if($enqueue_css_in_shortcode == true) echo 'checked="checked"' ?> />
|
1746 |
+
<a class="sbi_tooltip_link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'instagram-feed'); ?></a>
|
1747 |
+
<p class="sbi_tooltip"><?php _e("Check this box if you'd like to only include the CSS file for the plugin when the feed is on the page.", 'instagram-feed'); ?></p>
|
1748 |
+
</td>
|
1749 |
+
</tr>
|
1750 |
+
|
1751 |
<tr valign="top">
|
1752 |
<th scope="row"><label><?php _e('Disable JS Image Loading', 'instagram-feed'); ?></label></th>
|
1753 |
<td>
|
inc/class-sb-instagram-api-connect.php
CHANGED
@@ -248,6 +248,14 @@ class SB_Instagram_API_Connect
|
|
248 |
|
249 |
$sb_instagram_posts_manager->add_frontend_error( 'hashtag_limit_reached', $error );
|
250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
} else if ( $response['error']['type'] === 'OAuthException' ) {
|
252 |
if ( $response['error']['code'] === 24 ) {
|
253 |
$error = '<p><b>' . __( 'Error: Hashtag does not exist.', 'instagram-feed' ) .'</b>';
|
248 |
|
249 |
$sb_instagram_posts_manager->add_frontend_error( 'hashtag_limit_reached', $error );
|
250 |
|
251 |
+
} elseif ( (int)$response['error']['code'] === 10 ) {
|
252 |
+
$user_name = $error_connected_account['username'];
|
253 |
+
|
254 |
+
$error = '<p><b>' . sprintf( __( 'Error: Connected account for the user %s does not have permission to use this feed type.', 'instagram-feed' ), $user_name ) .'</b>';
|
255 |
+
$error .= '<p>' . __( 'Try using the big blue button on the "Configure" tab to reconnect the account and update its permissions.', 'instagram-feed' );
|
256 |
+
|
257 |
+
$sb_instagram_posts_manager->add_frontend_error( 'hashtag_limit_reached', $error );
|
258 |
+
|
259 |
} else if ( $response['error']['type'] === 'OAuthException' ) {
|
260 |
if ( $response['error']['code'] === 24 ) {
|
261 |
$error = '<p><b>' . __( 'Error: Hashtag does not exist.', 'instagram-feed' ) .'</b>';
|
inc/class-sb-instagram-display-elements.php
CHANGED
@@ -29,7 +29,7 @@ class SB_Instagram_Display_Elements
|
|
29 |
if ( !$settings['disable_js_image_loading'] ) {
|
30 |
return ' sbi_new sbi_transition';
|
31 |
} else {
|
32 |
-
return ' sbi_no_js';
|
33 |
}
|
34 |
}
|
35 |
|
@@ -73,6 +73,34 @@ class SB_Instagram_Display_Elements
|
|
73 |
} elseif ( $settings['imageres'] === 'auto' ) {
|
74 |
$optimum_res = 'full';
|
75 |
$settings['imageres'] = 'full';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
if ( $account_type === 'personal' ) {
|
@@ -91,7 +119,7 @@ class SB_Instagram_Display_Elements
|
|
91 |
|
92 |
// use resized images if exists
|
93 |
if ( $optimum_res === 'full' && isset( $resized_images[ $post_id ]['id'] ) && $resized_images[ $post_id ]['id'] !== 'pending' && $resized_images[ $post_id ]['id'] !== 'video' ) {
|
94 |
-
$media_url =
|
95 |
} else {
|
96 |
$permalink = SB_Instagram_Parse::get_permalink( $post );
|
97 |
if ( substr_count( $permalink, '/' ) > 5 ) {
|
@@ -128,16 +156,18 @@ class SB_Instagram_Display_Elements
|
|
128 |
*
|
129 |
* @param array $post
|
130 |
* @param array $settings
|
|
|
131 |
*
|
132 |
* @return string
|
133 |
*
|
134 |
* @since 2.0/5.0
|
|
|
135 |
*/
|
136 |
-
public static function get_sbi_photo_style_element( $post, $settings ) {
|
137 |
if ( !$settings['disable_js_image_loading'] ) {
|
138 |
return '';
|
139 |
} else {
|
140 |
-
$full_res_image = SB_Instagram_Display_Elements::get_optimum_media_url( $post, $settings );
|
141 |
/*
|
142 |
* By setting the height to "0" the bottom padding can be used
|
143 |
* as a percent to square the images. Since it needs to be a percent
|
29 |
if ( !$settings['disable_js_image_loading'] ) {
|
30 |
return ' sbi_new sbi_transition';
|
31 |
} else {
|
32 |
+
return ' sbi_new sbi_no_js sbi_no_resraise sbi_js_load_disabled';
|
33 |
}
|
34 |
}
|
35 |
|
73 |
} elseif ( $settings['imageres'] === 'auto' ) {
|
74 |
$optimum_res = 'full';
|
75 |
$settings['imageres'] = 'full';
|
76 |
+
} else {
|
77 |
+
if ( $settings['imageres'] !== 'thumb' && ! empty( $resized_images ) ) {
|
78 |
+
$resolution = $settings['imageres'];
|
79 |
+
$post_id = SB_Instagram_Parse::get_post_id( $post );
|
80 |
+
if ( isset( $resized_images[ $post_id ] ) ) {
|
81 |
+
if ( $resolution === 'medium' ) {
|
82 |
+
if ( isset( $resized_images[ $post_id ]['sizes']['low'] ) ) {
|
83 |
+
$suffix = 'low';
|
84 |
+
} elseif ( isset( $resized_images[ $post_id ]['sizes']['full'] ) ) {
|
85 |
+
$suffix = 'full';
|
86 |
+
}
|
87 |
+
} elseif ( $resolution === 'full' ) {
|
88 |
+
if ( isset( $resized_images[ $post_id ]['sizes']['full'] ) ) {
|
89 |
+
$suffix = 'full';
|
90 |
+
} elseif ( isset( $resized_images[ $post_id ]['sizes']['low'] ) ) {
|
91 |
+
$suffix = 'low';
|
92 |
+
}
|
93 |
+
} elseif ( $resolution === 'lightbox' ) {
|
94 |
+
if ( isset( $resized_images[ $post_id ]['sizes']['full'] ) ) {
|
95 |
+
$suffix = 'full';
|
96 |
+
}
|
97 |
+
}
|
98 |
+
if ( isset( $suffix ) ) {
|
99 |
+
$media_url = sbi_get_resized_uploads_url() . $resized_images[ $post_id ]['id'] . $suffix . '.jpg';
|
100 |
+
return $media_url;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
}
|
104 |
}
|
105 |
|
106 |
if ( $account_type === 'personal' ) {
|
119 |
|
120 |
// use resized images if exists
|
121 |
if ( $optimum_res === 'full' && isset( $resized_images[ $post_id ]['id'] ) && $resized_images[ $post_id ]['id'] !== 'pending' && $resized_images[ $post_id ]['id'] !== 'video' ) {
|
122 |
+
$media_url = sbi_get_resized_uploads_url() . $resized_images[ $post_id ]['id'] . 'full.jpg';
|
123 |
} else {
|
124 |
$permalink = SB_Instagram_Parse::get_permalink( $post );
|
125 |
if ( substr_count( $permalink, '/' ) > 5 ) {
|
156 |
*
|
157 |
* @param array $post
|
158 |
* @param array $settings
|
159 |
+
* @param array $resized_images
|
160 |
*
|
161 |
* @return string
|
162 |
*
|
163 |
* @since 2.0/5.0
|
164 |
+
* @since 2.1.1/5.2.1 added support for resized images
|
165 |
*/
|
166 |
+
public static function get_sbi_photo_style_element( $post, $settings, $resized_images = array() ) {
|
167 |
if ( !$settings['disable_js_image_loading'] ) {
|
168 |
return '';
|
169 |
} else {
|
170 |
+
$full_res_image = SB_Instagram_Display_Elements::get_optimum_media_url( $post, $settings, $resized_images );
|
171 |
/*
|
172 |
* By setting the height to "0" the bottom padding can be used
|
173 |
* as a percent to square the images. Since it needs to be a percent
|
inc/class-sb-instagram-feed.php
CHANGED
@@ -85,6 +85,13 @@ class SB_Instagram_Feed
|
|
85 |
*/
|
86 |
private $report;
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
/**
|
89 |
* SB_Instagram_Feed constructor.
|
90 |
*
|
@@ -113,6 +120,8 @@ class SB_Instagram_Feed
|
|
113 |
|
114 |
// used for errors and the sbi_debug report
|
115 |
$this->report = array();
|
|
|
|
|
116 |
}
|
117 |
|
118 |
/**
|
@@ -133,6 +142,15 @@ class SB_Instagram_Feed
|
|
133 |
$this->post_data = $post_data;
|
134 |
}
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
/**
|
137 |
* @return array
|
138 |
*
|
@@ -142,6 +160,15 @@ class SB_Instagram_Feed
|
|
142 |
return $this->next_pages;
|
143 |
}
|
144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
/**
|
146 |
* Checks the database option related the transient expiration
|
147 |
* to ensure it will be available when the page loads
|
@@ -1193,6 +1220,7 @@ class SB_Instagram_Feed
|
|
1193 |
$image_ids = array();
|
1194 |
$post_index = $offset;
|
1195 |
$icon_type = $settings['font_method'];
|
|
|
1196 |
|
1197 |
foreach ( $posts as $post ) {
|
1198 |
$image_ids[] = SB_Instagram_Parse::get_post_id( $post );
|
85 |
*/
|
86 |
private $report;
|
87 |
|
88 |
+
/**
|
89 |
+
* @var array
|
90 |
+
*
|
91 |
+
* @since 2.1.1/5.2.1
|
92 |
+
*/
|
93 |
+
private $resized_images;
|
94 |
+
|
95 |
/**
|
96 |
* SB_Instagram_Feed constructor.
|
97 |
*
|
120 |
|
121 |
// used for errors and the sbi_debug report
|
122 |
$this->report = array();
|
123 |
+
|
124 |
+
$this->resized_images = array();
|
125 |
}
|
126 |
|
127 |
/**
|
142 |
$this->post_data = $post_data;
|
143 |
}
|
144 |
|
145 |
+
/**
|
146 |
+
* @return array
|
147 |
+
*
|
148 |
+
* @since 2.1.1/5.2.1
|
149 |
+
*/
|
150 |
+
public function set_resized_images( $resized_image_data ) {
|
151 |
+
$this->resized_images = $resized_image_data;
|
152 |
+
}
|
153 |
+
|
154 |
/**
|
155 |
* @return array
|
156 |
*
|
160 |
return $this->next_pages;
|
161 |
}
|
162 |
|
163 |
+
/**
|
164 |
+
* @return array
|
165 |
+
*
|
166 |
+
* @since 2.1.1/5.2.1
|
167 |
+
*/
|
168 |
+
public function get_resized_images() {
|
169 |
+
return $this->resized_images;
|
170 |
+
}
|
171 |
+
|
172 |
/**
|
173 |
* Checks the database option related the transient expiration
|
174 |
* to ensure it will be available when the page loads
|
1220 |
$image_ids = array();
|
1221 |
$post_index = $offset;
|
1222 |
$icon_type = $settings['font_method'];
|
1223 |
+
$resized_images = $this->get_resized_images();
|
1224 |
|
1225 |
foreach ( $posts as $post ) {
|
1226 |
$image_ids[] = SB_Instagram_Parse::get_post_id( $post );
|
inc/class-sb-instagram-parse.php
CHANGED
@@ -104,7 +104,6 @@ class SB_Instagram_Parse
|
|
104 |
$account_type = isset( $post['images'] ) ? 'personal' : 'business';
|
105 |
|
106 |
if ( $account_type === 'personal' ) {
|
107 |
-
|
108 |
return $post['images']['standard_resolution']['url'];
|
109 |
} else {
|
110 |
if ($post['media_type'] === 'CAROUSEL_ALBUM' || $post['media_type'] === 'VIDEO') {
|
@@ -153,11 +152,6 @@ class SB_Instagram_Parse
|
|
153 |
} else {
|
154 |
$post_id = SB_Instagram_Parse::get_post_id( $post );
|
155 |
|
156 |
-
// use resized images if exists
|
157 |
-
if ( isset( $resized_images[ $post_id ]['id'] ) && $resized_images[ $post_id ]['id'] !== 'pending' && $resized_images[ $post_id ]['id'] !== 'video' ) {
|
158 |
-
$media_urls['640'] = 'uploads_dir' . $resized_images[ $post_id ]['id'] . 'full.jpg';
|
159 |
-
}
|
160 |
-
|
161 |
$permalink = SB_Instagram_Parse::fix_permalink( SB_Instagram_Parse::get_permalink( $post ) );
|
162 |
|
163 |
if ( ($post['media_type'] === 'CAROUSEL_ALBUM' || $post['media_type'] === 'VIDEO') && ($media_urls['640'] === '' || $media_urls['640'] === 'video' || $media_urls['640'] === 'pending')) {
|
@@ -168,6 +162,15 @@ class SB_Instagram_Parse
|
|
168 |
$media_urls['150'] = $permalink . 'media?size=t';
|
169 |
$media_urls['320'] = $permalink . 'media?size=m';
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
}
|
173 |
|
104 |
$account_type = isset( $post['images'] ) ? 'personal' : 'business';
|
105 |
|
106 |
if ( $account_type === 'personal' ) {
|
|
|
107 |
return $post['images']['standard_resolution']['url'];
|
108 |
} else {
|
109 |
if ($post['media_type'] === 'CAROUSEL_ALBUM' || $post['media_type'] === 'VIDEO') {
|
152 |
} else {
|
153 |
$post_id = SB_Instagram_Parse::get_post_id( $post );
|
154 |
|
|
|
|
|
|
|
|
|
|
|
155 |
$permalink = SB_Instagram_Parse::fix_permalink( SB_Instagram_Parse::get_permalink( $post ) );
|
156 |
|
157 |
if ( ($post['media_type'] === 'CAROUSEL_ALBUM' || $post['media_type'] === 'VIDEO') && ($media_urls['640'] === '' || $media_urls['640'] === 'video' || $media_urls['640'] === 'pending')) {
|
162 |
$media_urls['150'] = $permalink . 'media?size=t';
|
163 |
$media_urls['320'] = $permalink . 'media?size=m';
|
164 |
|
165 |
+
// use resized images if exists
|
166 |
+
if ( isset( $resized_images[ $post_id ]['id'] ) && $resized_images[ $post_id ]['id'] !== 'pending' && $resized_images[ $post_id ]['id'] !== 'video' ) {
|
167 |
+
if ( isset( $resized_images[ $post_id ]['sizes']['full'] ) ) {
|
168 |
+
$media_urls['640'] = sbi_get_resized_uploads_url() . $resized_images[ $post_id ]['id'] . 'full.jpg';
|
169 |
+
}
|
170 |
+
if ( isset( $resized_images[ $post_id ]['sizes']['low'] ) ) {
|
171 |
+
$media_urls['320'] = sbi_get_resized_uploads_url() . $resized_images[ $post_id ]['id'] . 'low.jpg';
|
172 |
+
}
|
173 |
+
}
|
174 |
|
175 |
}
|
176 |
|
inc/class-sb-instagram-post.php
CHANGED
@@ -211,7 +211,11 @@ class SB_Instagram_Post
|
|
211 |
$one_successful_image_resize = false;
|
212 |
|
213 |
foreach ( $image_sizes_to_make as $res_setting => $image_size ) {
|
214 |
-
|
|
|
|
|
|
|
|
|
215 |
if ( ! empty( $file_name ) ) {
|
216 |
|
217 |
$sizes = array(
|
211 |
$one_successful_image_resize = false;
|
212 |
|
213 |
foreach ( $image_sizes_to_make as $res_setting => $image_size ) {
|
214 |
+
if ( $account_type === 'business' ) {
|
215 |
+
$file_name = SB_Instagram_Parse::get_media_url( $this->instagram_api_data, 'lightbox' );
|
216 |
+
} else {
|
217 |
+
$file_name = isset( $image_source_set[ $image_size ] ) ? $image_source_set[ $image_size ] : SB_Instagram_Parse::get_media_url( $this->instagram_api_data, 'lightbox' );
|
218 |
+
}
|
219 |
if ( ! empty( $file_name ) ) {
|
220 |
|
221 |
$sizes = array(
|
inc/class-sb-instagram-settings.php
CHANGED
@@ -106,7 +106,7 @@ class SB_Instagram_Settings {
|
|
106 |
'customtemplates' => isset( $db['custom_template'] ) ? $db['custom_template'] : '',
|
107 |
|
108 |
), $atts );
|
109 |
-
|
110 |
$this->settings['customtemplates'] = $this->settings['customtemplates'] === 'true' || $this->settings['customtemplates'] === 'on';
|
111 |
if ( isset( $_GET['sbi_debug'] ) ) {
|
112 |
$this->settings['customtemplates'] = false;
|
@@ -116,6 +116,9 @@ class SB_Instagram_Settings {
|
|
116 |
if ( isset( $atts['showbio'] ) && $atts['showbio'] === 'false' ) {
|
117 |
$this->settings['showbio'] = false;
|
118 |
}
|
|
|
|
|
|
|
119 |
$this->settings['disable_resize'] = isset( $db['sb_instagram_disable_resize'] ) && ($db['sb_instagram_disable_resize'] === 'on');
|
120 |
$this->settings['favor_local'] = isset( $db['sb_instagram_favor_local'] ) && ($db['sb_instagram_favor_local'] === 'on');
|
121 |
$this->settings['backup_cache_enabled'] = ! isset( $db['sb_instagram_backup'] ) || ($db['sb_instagram_backup'] === 'on');
|
106 |
'customtemplates' => isset( $db['custom_template'] ) ? $db['custom_template'] : '',
|
107 |
|
108 |
), $atts );
|
109 |
+
|
110 |
$this->settings['customtemplates'] = $this->settings['customtemplates'] === 'true' || $this->settings['customtemplates'] === 'on';
|
111 |
if ( isset( $_GET['sbi_debug'] ) ) {
|
112 |
$this->settings['customtemplates'] = false;
|
116 |
if ( isset( $atts['showbio'] ) && $atts['showbio'] === 'false' ) {
|
117 |
$this->settings['showbio'] = false;
|
118 |
}
|
119 |
+
if ( isset( $atts['showheader'] ) && $atts['showheader'] === 'false' ) {
|
120 |
+
$this->settings['showheader'] = false;
|
121 |
+
}
|
122 |
$this->settings['disable_resize'] = isset( $db['sb_instagram_disable_resize'] ) && ($db['sb_instagram_disable_resize'] === 'on');
|
123 |
$this->settings['favor_local'] = isset( $db['sb_instagram_favor_local'] ) && ($db['sb_instagram_favor_local'] === 'on');
|
124 |
$this->settings['backup_cache_enabled'] = ! isset( $db['sb_instagram_backup'] ) || ($db['sb_instagram_backup'] === 'on');
|
inc/if-functions.php
CHANGED
@@ -146,6 +146,21 @@ function display_instagram( $atts = array() ) {
|
|
146 |
$post_set->maybe_save_update_and_resize_images_for_posts();
|
147 |
}
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
return $instagram_feed->get_the_feed_html( $settings, $atts, $instagram_feed_settings->get_feed_type_and_terms(), $instagram_feed_settings->get_connected_accounts_in_feed() );
|
150 |
}
|
151 |
|
@@ -283,6 +298,21 @@ function sbi_get_next_post_set() {
|
|
283 |
|
284 |
}
|
285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
$feed_status = array( 'shouldPaginate' => $instagram_feed->should_use_pagination( $settings, $offset ) );
|
287 |
|
288 |
$return = array(
|
@@ -677,6 +707,17 @@ function sbi_rand_sort( $a, $b ) {
|
|
677 |
return rand ( -1, 1 );
|
678 |
}
|
679 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
680 |
/**
|
681 |
* Converts a hex code to RGB so opacity can be
|
682 |
* applied more easily
|
@@ -824,12 +865,10 @@ function sb_instagram_scripts_enqueue() {
|
|
824 |
if ( $font_method === 'fontfile' && ! $disable_font_awesome ) {
|
825 |
wp_enqueue_style( 'sb-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
|
826 |
}
|
827 |
-
|
828 |
-
$upload = wp_upload_dir();
|
829 |
-
$resized_url = trailingslashit( $upload['baseurl'] ) . trailingslashit( SBI_UPLOADS_NAME );
|
830 |
$data = array(
|
831 |
'font_method' => $font_method,
|
832 |
-
'resized_url' =>
|
833 |
'placeholder' => trailingslashit( SBI_PLUGIN_URL ) . 'img/placeholder.png'
|
834 |
);
|
835 |
//Pass option to JS file
|
146 |
$post_set->maybe_save_update_and_resize_images_for_posts();
|
147 |
}
|
148 |
|
149 |
+
if ( $settings['disable_js_image_loading'] || $settings['imageres'] !== 'auto' ) {
|
150 |
+
global $sb_instagram_posts_manager;
|
151 |
+
$post_data = $instagram_feed->get_post_data();
|
152 |
+
|
153 |
+
if ( ! $sb_instagram_posts_manager->image_resizing_disabled() ) {
|
154 |
+
$image_ids = array();
|
155 |
+
foreach ( $post_data as $post ) {
|
156 |
+
$image_ids[] = SB_Instagram_Parse::get_post_id( $post );
|
157 |
+
}
|
158 |
+
$resized_images = SB_Instagram_Feed::get_resized_images_source_set( $image_ids, 0, $transient_name );
|
159 |
+
|
160 |
+
$instagram_feed->set_resized_images( $resized_images );
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
return $instagram_feed->get_the_feed_html( $settings, $atts, $instagram_feed_settings->get_feed_type_and_terms(), $instagram_feed_settings->get_connected_accounts_in_feed() );
|
165 |
}
|
166 |
|
298 |
|
299 |
}
|
300 |
|
301 |
+
if ( $settings['disable_js_image_loading'] || $settings['imageres'] !== 'auto' ) {
|
302 |
+
global $sb_instagram_posts_manager;
|
303 |
+
$post_data = array_slice( $instagram_feed->get_post_data(), $offset, $settings['minnum'] );
|
304 |
+
|
305 |
+
if ( ! $sb_instagram_posts_manager->image_resizing_disabled() ) {
|
306 |
+
$image_ids = array();
|
307 |
+
foreach ( $post_data as $post ) {
|
308 |
+
$image_ids[] = SB_Instagram_Parse::get_post_id( $post );
|
309 |
+
}
|
310 |
+
$resized_images = SB_Instagram_Feed::get_resized_images_source_set( $image_ids, 0, $feed_id );
|
311 |
+
|
312 |
+
$instagram_feed->set_resized_images( $resized_images );
|
313 |
+
}
|
314 |
+
}
|
315 |
+
|
316 |
$feed_status = array( 'shouldPaginate' => $instagram_feed->should_use_pagination( $settings, $offset ) );
|
317 |
|
318 |
$return = array(
|
707 |
return rand ( -1, 1 );
|
708 |
}
|
709 |
|
710 |
+
/**
|
711 |
+
* @return string
|
712 |
+
*
|
713 |
+
* @since 2.1.1
|
714 |
+
*/
|
715 |
+
function sbi_get_resized_uploads_url() {
|
716 |
+
$upload = wp_upload_dir();
|
717 |
+
|
718 |
+
return trailingslashit( $upload['baseurl'] ) . trailingslashit( SBI_UPLOADS_NAME );
|
719 |
+
}
|
720 |
+
|
721 |
/**
|
722 |
* Converts a hex code to RGB so opacity can be
|
723 |
* applied more easily
|
865 |
if ( $font_method === 'fontfile' && ! $disable_font_awesome ) {
|
866 |
wp_enqueue_style( 'sb-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' );
|
867 |
}
|
868 |
+
|
|
|
|
|
869 |
$data = array(
|
870 |
'font_method' => $font_method,
|
871 |
+
'resized_url' => sbi_get_resized_uploads_url(),
|
872 |
'placeholder' => trailingslashit( SBI_PLUGIN_URL ) . 'img/placeholder.png'
|
873 |
);
|
874 |
//Pass option to JS file
|
instagram-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Smash Balloon Instagram Feed
|
4 |
Plugin URI: https://smashballoon.com/instagram-feed
|
5 |
Description: Display beautifully clean, customizable, and responsive Instagram feeds.
|
6 |
-
Version: 2.1
|
7 |
Author: Smash Balloon
|
8 |
Author URI: https://smashballoon.com/
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: Smash Balloon Instagram Feed
|
4 |
Plugin URI: https://smashballoon.com/instagram-feed
|
5 |
Description: Display beautifully clean, customizable, and responsive Instagram feeds.
|
6 |
+
Version: 2.1.1
|
7 |
Author: Smash Balloon
|
8 |
Author URI: https://smashballoon.com/
|
9 |
License: GPLv2 or later
|
js/sb-instagram-2-1.js
CHANGED
@@ -309,6 +309,7 @@ if(!sbi_js_exists) {
|
|
309 |
//Hide the loader in the load more button
|
310 |
$self.find('.sbi_loader').addClass('sbi_hidden');
|
311 |
$self.find('.sbi_btn_text').removeClass('sbi_hidden');
|
|
|
312 |
}, 500);
|
313 |
},
|
314 |
beforeNewImagesRevealed: function() {
|
@@ -355,6 +356,9 @@ if(!sbi_js_exists) {
|
|
355 |
afterNewImagesRevealed: function() {
|
356 |
this.listenForVisibilityChange();
|
357 |
this.sendNeedsResizingToServer();
|
|
|
|
|
|
|
358 |
|
359 |
var evt = $.Event('sbiafterimagesloaded');
|
360 |
evt.el = $(this.el);
|
@@ -433,6 +437,7 @@ if(!sbi_js_exists) {
|
|
433 |
} else {
|
434 |
feed.outOfPages = false;
|
435 |
}
|
|
|
436 |
}
|
437 |
|
438 |
};
|
@@ -493,6 +498,10 @@ if(!sbi_js_exists) {
|
|
493 |
aspectRatio = currentUrl === window.sbi.options.placeholder ? 1 : imagEl.naturalWidth/imagEl.naturalHeight,
|
494 |
forceChange = typeof forceChange !== 'undefined' ? forceChange : false;
|
495 |
|
|
|
|
|
|
|
|
|
496 |
$.each(imgSrcSet, function (index, value) {
|
497 |
if (value === currentUrl) {
|
498 |
currentRes = parseInt(index);
|
309 |
//Hide the loader in the load more button
|
310 |
$self.find('.sbi_loader').addClass('sbi_hidden');
|
311 |
$self.find('.sbi_btn_text').removeClass('sbi_hidden');
|
312 |
+
feed.maybeRaiseImageResolution();
|
313 |
}, 500);
|
314 |
},
|
315 |
beforeNewImagesRevealed: function() {
|
356 |
afterNewImagesRevealed: function() {
|
357 |
this.listenForVisibilityChange();
|
358 |
this.sendNeedsResizingToServer();
|
359 |
+
if (!this.settings.imageLoadEnabled) {
|
360 |
+
$('.sbi_no_resraise').removeClass('sbi_no_resraise');
|
361 |
+
}
|
362 |
|
363 |
var evt = $.Event('sbiafterimagesloaded');
|
364 |
evt.el = $(this.el);
|
437 |
} else {
|
438 |
feed.outOfPages = false;
|
439 |
}
|
440 |
+
$('.sbi_no_js').removeClass('sbi_no_js');
|
441 |
}
|
442 |
|
443 |
};
|
498 |
aspectRatio = currentUrl === window.sbi.options.placeholder ? 1 : imagEl.naturalWidth/imagEl.naturalHeight,
|
499 |
forceChange = typeof forceChange !== 'undefined' ? forceChange : false;
|
500 |
|
501 |
+
if ($item.hasClass('sbi_no_resraise')) {
|
502 |
+
return;
|
503 |
+
}
|
504 |
+
|
505 |
$.each(imgSrcSet, function (index, value) {
|
506 |
if (value === currentUrl) {
|
507 |
currentRes = parseInt(index);
|
js/sb-instagram-2-1.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function(i){function e(){var i,e,t,s=s||{VER:"0.9.944"};s.bgs_Available=!1,s.bgs_CheckRunned=!1,function(i){i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!s.bgs_CheckRunned){s.bgs_CheckRunned=!0;var e=i('<span style="background-size:cover" />');i("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var t=window.getComputedStyle(i,null);t&&t.backgroundSize&&(s.bgs_Available="cover"===t.backgroundSize)}}(),e.remove()}}();var t=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function a(){(r.responsive||h.data("sbi_imgLiquid_oldProcessed"))&&h.data("sbi_imgLiquid_settings")&&(r=h.data("sbi_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&o(),l.sizeOld=l.actualSize,setTimeout(a,r.responsiveCheckTime))}function n(){h.data("sbi_imgLiquid_error",!0),l.addClass("sbi_imgLiquid_error"),r.onItemError&&r.onItemError(e,l,h),d()}function o(){var i,t,s,a,n,o,g,u,f=0,m=0,_=l.width(),c=l.height();void 0===h.data("owidth")&&h.data("owidth",h[0].width),void 0===h.data("oheight")&&h.data("oheight",h[0].height),r.fill===_/c>=h.data("owidth")/h.data("oheight")?(i="100%",t="auto",s=Math.floor(_),a=Math.floor(_*(h.data("oheight")/h.data("owidth")))):(i="auto",t="100%",s=Math.floor(c*(h.data("owidth")/h.data("oheight"))),a=Math.floor(c)),g=_-s,"left"===(n=r.horizontalAlign.toLowerCase())&&(m=0),"center"===n&&(m=.5*g),"right"===n&&(m=g),-1!==n.indexOf("%")&&((n=parseInt(n.replace("%",""),10))>0&&(m=g*n*.01)),u=c-a,"left"===(o=r.verticalAlign.toLowerCase())&&(f=0),"center"===o&&(f=.5*u),"bottom"===o&&(f=u),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(f=u*o*.01)),r.hardPixels&&(i=s,t=a),h.css({width:i,height:t,"margin-left":Math.floor(m),"margin-top":Math.floor(f)}),h.data("sbi_imgLiquid_oldProcessed")||(h.fadeTo(r.fadeInTime,1),h.data("sbi_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sbi_imgLiquid_nobgSize"),l.addClass("sbi_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(e,l,h),d()}function d(){e===t.length-1&&t.settings.onFinish&&t.settings.onFinish()}var r=t.settings,l=i(this),h=i("img:first",l);return h.length?(h.data("sbi_imgLiquid_settings")?(l.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),r=i.extend({},h.data("sbi_imgLiquid_settings"),t.options)):r=i.extend({},t.settings,function(){var i={};if(t.settings.useDataHtmlAttr){var e=l.attr("data-sbi_imgLiquid-fill"),a=l.attr("data-sbi_imgLiquid-horizontalAlign"),n=l.attr("data-sbi_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(i.fill=Boolean("true"===e)),void 0===a||"left"!==a&&"center"!==a&&"right"!==a&&-1===a.indexOf("%")||(i.horizontalAlign=a),void 0===n||"top"!==n&&"bottom"!==n&&"center"!==n&&-1===n.indexOf("%")||(i.verticalAlign=n)}return s.isIE&&t.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}()),h.data("sbi_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(e,l,h),void(s.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(h.attr("src")))&&l.css({"background-image":'url("'+encodeURI(h.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",l).css({display:"block",width:"100%",height:"100%"}),i("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(e,l,h),l.addClass("sbi_imgLiquid_bgSize"),l.addClass("sbi_imgLiquid_ready"),d()):function t(){if(h.data("oldSrc")&&h.data("oldSrc")!==h.attr("src")){var s=h.clone().removeAttr("style");return s.data("sbi_imgLiquid_settings",h.data("sbi_imgLiquid_settings")),h.parent().prepend(s),h.remove(),(h=s)[0].width=0,void setTimeout(t,10)}return h.data("sbi_imgLiquid_oldProcessed")?void o():(h.data("sbi_imgLiquid_oldProcessed",!1),h.data("oldSrc",h.attr("src")),i("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),h.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),h.on("error",n),h[0].onerror=n,function i(){h.data("sbi_imgLiquid_error")||h.data("sbi_imgLiquid_loaded")||h.data("sbi_imgLiquid_oldProcessed")||(l.is(":visible")&&h[0].complete&&h[0].width>0&&h[0].height>0?(h.data("sbi_imgLiquid_loaded",!0),setTimeout(o,e*r.delay)):setTimeout(i,r.timecheckvisibility))}(),void a())}())):void n()})}})}(jQuery),i=s.injectCss,e=document.getElementsByTagName("head")[0],(t=document.createElement("style")).type="text/css",t.styleSheet?t.styleSheet.cssText=i:t.appendChild(document.createTextNode(i)),e.appendChild(t)}function t(){this.feeds={},this.options=sb_instagram_js_options}function s(i,e,t){this.el=i,this.index=e,this.settings=t,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.isInitialized=!1}function a(e,t){i.ajax({url:sbiajaxurl,type:"post",data:e,success:t})}t.prototype={createPage:function(e,t){void 0!==window.sbiajaxurl&&-1!==window.sbiajaxurl.indexOf(window.location.hostname)||(window.sbiajaxurl=window.location.hostname+"/wp-admin/admin-ajax.php"),i(".sbi_no_js_error_message").remove(),i(".sbi_no_js").removeClass("sbi_no_js"),e(t)},createFeeds:function(e){e.whenFeedsCreated(i(".sbi").each(function(e){i(this).attr("data-sbi-index",e+1);var t=i(this),n=void 0!==t.attr("data-sbi-flags")?t.attr("data-sbi-flags").split(","):[],o=void 0!==t.attr("data-options")?JSON.parse(t.attr("data-options")):{};if(n.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;a({action:"sbi_on_ajax_test_trigger"},function(i){console.log("did test")})}var d={cols:t.attr("data-cols"),colsmobile:"same"!==t.attr("data-colsmobile")?t.attr("data-colsmobile"):t.attr("data-cols"),num:t.attr("data-num"),imgRes:t.attr("data-res"),feedID:t.attr("data-feedid"),shortCodeAtts:t.attr("data-shortcode-atts"),resizingEnabled:-1===n.indexOf("resizeDisable"),imageLoadEnabled:-1===n.indexOf("imageLoadDisable"),debugEnabled:n.indexOf("debug")>-1,favorLocal:n.indexOf("favorLocal")>-1,ajaxPostLoad:n.indexOf("ajaxPostLoad")>-1,autoMinRes:1,general:o};window.sbi.feeds[e]=function(i,e,t){return new s(i,e,t)}(this,e,d),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var r=jQuery.Event("sbiafterfeedcreate");r.feed=window.sbi.feeds[e],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){i(".sb_instagram_header").each(function(){var e=i(this);e.find(".sbi_header_link").hover(function(){e.find(".sbi_header_img_hover").addClass("sbi_fade_in")},function(){e.find(".sbi_header_img_hover").removeClass("sbi_fade_in")})})},encodeHTML:function(i){return void 0===i?"":i.replace(/(>)/g,">").replace(/(<)/g,"<").replace(/(<br\/>)/g,"<br>").replace(/(<br>)/g,"<br>")},urlDetect:function(i){return i.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}},s.prototype={init:function(){var i=this;this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var e,t=(e=0,function(i,t){clearTimeout(e),e=setTimeout(i,t)});jQuery(window).resize(function(){t(function(){i.afterResize()},500)})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(i){i.find(".sbi_loader").removeClass("sbi_hidden"),i.find(".sbi_btn_text").addClass("sbi_hidden"),i.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var e=i(this.el);this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){e.find(".sbi_loader").addClass("sbi_hidden"),e.find(".sbi_btn_text").removeClass("sbi_hidden")},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var e=i(this.el);"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),e.find(".sbi_item").each(function(i){jQuery(this).find(".sbi_photo").hover(function(){jQuery(this).fadeTo(200,.85)},function(){jQuery(this).stop().fadeTo(500,1)})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var i=10;e.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},i),i+=10})},500)},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer();var e=i.Event("sbiafterimagesloaded");e.el=i(this.el),i(window).trigger(e)},setResizedImages:function(){i(this.el).find(".sbi_resized_image_data").length&&void 0!==i(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===i(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(i(this.el).find(".sbi_resized_image_data").attr("data-resized")),i(this.el).find(".sbi_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this;if(e.needsResizing.length>0&&e.settings.resizingEnabled){var t=i(this.el).find(".sbi_item").length;a({action:"sbi_resized_images_submit",needs_resizing:e.needsResizing,offset:t,feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts},function(i){if(0===i.trim().indexOf("{")){var t=JSON.parse(i);e.settings.debugEnabled&&console.log(t)}})}},loadMoreButtonInit:function(){var e=i(this.el),t=this;e.find("#sbi_load .sbi_load_btn").off().on("click",function(){t.afterLoadMoreClicked(jQuery(this)),t.getNewPostSet()})},getNewPostSet:function(){var e=i(this.el),t=this;a({action:"sbi_load_more_clicked",offset:e.find(".sbi_item").length,feed_id:t.settings.feedID,atts:t.settings.shortCodeAtts,current_resolution:t.imageResolution},function(i){if(0===i.trim().indexOf("{")){var s=JSON.parse(i);t.settings.debugEnabled&&console.log(s),t.appendNewPosts(s.html),t.addResizedImages(s.resizedImages),t.settings.ajaxPostLoad?(t.settings.ajaxPostLoad=!1,t.afterInitialImagesLoaded()):t.afterNewImagesLoaded(),s.feedStatus.shouldPaginate?t.outOfPages=!1:(t.outOfPages=!0,e.find(".sbi_load_btn").hide())}})},appendNewPosts:function(e){var t=i(this.el);t.find("#sbi_images .sbi_item").length?t.find("#sbi_images .sbi_item").last().after(e):t.find("#sbi_images").append(e)},addResizedImages:function(i){for(var e in i)this.resizedImages[e]=i[e]},setImageHeight:function(){var e=i(this.el),t=e.find(".sbi_photo").eq(0).innerWidth(),s=this.getColumnCount(),a=e.find("#sbi_images").innerWidth()-e.find("#sbi_images").width(),n=a/2;sbi_photo_width_manual=e.find("#sbi_images").width()/s-a,e.find(".sbi_photo").css("height",t),e.find(".sbi-owl-nav").length&&setTimeout(function(){var i=2;e.find(".sbi_owl2row-item").length&&(i=1);var t=e.find(".sbi_photo").eq(0).innerWidth()/i;t+=parseInt(n)*(2-i+2),e.find(".sbi-owl-nav div").css("top",t)},100)},maybeRaiseSingleImageResolution:function(e,t,s){var a=this,n=a.getImageUrls(e),o=e.find(".sbi_photo img").attr("src"),d=150,r=e.find("img").get(0),l=o===window.sbi.options.placeholder?1:r.naturalWidth/r.naturalHeight;s=void 0!==s&&s;i.each(n,function(i,e){e===o&&(d=parseInt(i),s=!1)});var h=640;switch(a.settings.imgRes){case"thumb":h=150;break;case"medium":h=320;break;case"full":h=640;break;default:var g=Math.max(a.settings.autoMinRes,e.find(".sbi_photo").innerWidth()),u=a.getBestResolutionForAuto(g,l,e);switch(u){case 320:h=320;break;case 150:h=150}}if(h>d||o===window.sbi.options.placeholder||s){if(a.settings.debugEnabled){var f=o===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+o,f)}var m=n[h].split("?ig_cache_key")[0];e.find(".sbi_photo img").attr("src",m),e.find(".sbi_photo").css("background-image",'url("'+m+'")');var _=!1;e.find(".sbi_photo img").on("load",function(){var t=i(this),s=t.get(0).naturalWidth/t.get(0).naturalHeight;if(1e3!==t.get(0).naturalWidth&&s>l&&!_){switch(a.settings.debugEnabled&&console.log("rais res again for aspect ratio change "+o),_=!0,g=e.find(".sbi_photo").innerWidth(),u=a.getBestResolutionForAuto(g,s,e),h=640,u){case 320:h=320;break;case 150:h=150}h>d&&(m=n[h].split("?ig_cache_key")[0],t.attr("src",m),t.closest(".sbi_photo").css("background-image",'url("'+m+'")')),"masonry"!==a.layout&&"highlight"!==a.layout||(i(a.el).find("#sbi_images").smashotope(a.isotopeArgs),setTimeout(function(){i(a.el).find("#sbi_images").smashotope(a.isotopeArgs)},500))}else if(a.settings.debugEnabled){var r=_?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+o,r)}})}e.find("img").on("error",function(){if(i(this).hasClass("sbi_img_error"))console.log("unfixed error "+i(this).attr("src"));else{if(i(this).addClass("sbi_img_error"),i(this).attr("src").indexOf("media?size=")>-1||i(this).attr("src").indexOf("cdninstagram")>-1||i(this).attr("src").indexOf("fbcdn")>-1){a.settings.favorLocal=!0;var e=a.getImageUrls(i(this).closest(".sbi_item"));void 0!==e[640]&&(i(this).attr("src",e[640]),i(this).closest(".sbi_photo").css("background-image","url("+e[640]+")"))}else void 0!==i(this).closest(".sbi_photo").attr("data-full-res")?(i(this).attr("src",i(this).closest(".sbi_photo").attr("data-full-res")),i(this).closest(".sbi_photo").css("background-image","url("+i(this).closest(".sbi_photo").attr("data-full-res")+")")):"undefined"!==i(this).closest(".sbi_photo").attr("href")&&(i(this).attr("src",i(this).closest(".sbi_photo").attr("href")+"media?size=l"),i(this).closest(".sbi_photo").css("background-image","url("+i(this).closest(".sbi_photo").attr("href")+"media?size=l)"));setTimeout(function(){a.afterResize()},1500)}})},maybeRaiseImageResolution:function(e){var t=this,s=void 0!==e&&!0===e?".sbi_item.sbi_new":".sbi_item",a=!t.isInitialized;i(t.el).find(s).each(function(e){!i(this).hasClass("sbi_num_diff_hide")&&i(this).find(".sbi_photo").length&&void 0!==i(this).find(".sbi_photo").attr("data-img-src-set")&&t.maybeRaiseSingleImageResolution(i(this),e,a)}),t.isInitialized=!0},getBestResolutionForAuto:function(e,t,s){(isNaN(t)||t<1)&&(t=1);var a=e*t,n=10*Math.ceil(a/10),o=[150,320,640];if(s.hasClass("sbi_highlighted")&&(n*=2),-1===o.indexOf(parseInt(n))){var d=!1;i.each(o,function(i,e){e>parseInt(n)&&!d&&(n=e,d=!0)})}return n},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var e=i(this.el),t=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,s=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):t;i(window).width()<480?s<e.find(".sbi_item").length&&e.find(".sbi_item").slice(s-e.find(".sbi_item").length).addClass("sbi_num_diff_hide"):t<e.find(".sbi_item").length&&e.find(".sbi_item").slice(t-e.find(".sbi_item").length).addClass("sbi_num_diff_hide")}},setImageSizeClass:function(){var e=i(this.el);e.removeClass("sbi_small sbi_medium");var t=e.innerWidth(),s=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,a=this.getColumnCount(),n=(t-s*(a+2))/a;n>120&&n<240?e.addClass("sbi_medium"):n<=120&&e.addClass("sbi_small")},setMinImageWidth:function(){i(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=i(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(i){var e=JSON.parse(i.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),t=i.attr("id").replace("sbi_","");if(void 0!==this.resizedImages[t]&&"video"!==this.resizedImages[t]&&"pending"!==this.resizedImages[t]&&"error"!==this.resizedImages[t].id&&"video"!==this.resizedImages[t].id&&"pending"!==this.resizedImages[t].id){if(void 0!==this.resizedImages[t].sizes){var s=[];void 0!==this.resizedImages[t].sizes.full&&(s.push(640),e[640]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg",i.find(".sbi_link_area").attr("href",sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg"),i.find(".sbi_photo").attr("data-full-res",sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg")),void 0!==this.resizedImages[t].sizes.low&&(s.push(320),e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg",this.settings.favorLocal&&void 0===this.resizedImages[t].sizes.full&&(i.find(".sbi_link_area").attr("href",sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg"),i.find(".sbi_photo").attr("data-full-res",sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg"))),void 0!==this.resizedImages[t].sizes.thumb&&(s.push(150),e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"thumb.jpg"),this.settings.favorLocal&&(-1===s.indexOf(640)&&s.indexOf(320)>-1&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg"),-1===s.indexOf(320)&&(s.indexOf(640)>-1?e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg":s.indexOf(150)>-1&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"thumb.jpg")),-1===s.indexOf(150)&&(s.indexOf(320)>-1?e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"low.jpg":s.indexOf(640)>-1&&(e[150]=sb_instagram_js_options.resized_url+this.resizedImages[t].id+"full.jpg")))}}else void 0!==this.resizedImages[t]&&"pending"===this.resizedImages[t]||this.addToNeedsResizing(t);return e},getAvatarUrl:function(i,e){if(""===i)return"";var t=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==t["LCL"+i]&&1===parseInt(t["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":void 0!==t[i]?t[i]:"":void 0!==t[i]?t[i]:void 0!==t["LCL"+i]&&1===parseInt(t["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":""},addToNeedsResizing:function(i){-1===this.needsResizing.indexOf(i)&&this.needsResizing.push(i)},applyImageLiquid:function(){var t=i(this.el);e(),"function"==typeof t.find(".sbi_photo").sbi_imgLiquid&&t.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var e,t,s,a=this;e=jQuery,t={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},s={sbiCheckVisibility:function(i,e){if(jQuery.contains(document,i[0])){var t=e.sbiPreviousVisibility,a=i.is(":visible");e.sbiPreviousVisibility=a,null==t?e.runOnLoad&&e.callback(i,a):t!==a&&e.callback(i,a),setTimeout(function(){s.sbiCheckVisibility(i,e)},e.frequency)}}},e.fn.sbiVisibilityChanged=function(i){var a=e.extend({},t,i);return this.each(function(){s.sbiCheckVisibility(e(this),a)})},"function"==typeof i(this.el).filter(":hidden").sbiVisibilityChanged&&i(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(i,e){a.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=i(this.el),t=this.settings.cols,s=this.settings.colsmobile,a=t;return sbiWindowWidth=window.innerWidth,e.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(t)>2&&parseInt(t)<7&&(a=2),sbiWindowWidth<640&&parseInt(t)>6&&parseInt(t)<11&&(a=4),sbiWindowWidth<=480&&parseInt(t)>2&&(a=1)):sbiWindowWidth<=480&&(a=s),parseInt(a)}},window.sbi_init=function(){window.sbi=new t,window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})}}(jQuery),jQuery(document).ready(function(i){void 0!==window.sb_instagram_js_options.resized_url&&-1===window.sb_instagram_js_options.resized_url.indexOf(location.protocol)&&("http:"===location.protocol?window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("http:","https:"):window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("https:","http:")),sbi_init()}));
|
1 |
+
var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function(i){function e(){var i,e,s,t=t||{VER:"0.9.944"};t.bgs_Available=!1,t.bgs_CheckRunned=!1,function(i){i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!t.bgs_CheckRunned){t.bgs_CheckRunned=!0;var e=i('<span style="background-size:cover" />');i("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var s=window.getComputedStyle(i,null);s&&s.backgroundSize&&(t.bgs_Available="cover"===s.backgroundSize)}}(),e.remove()}}();var s=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function a(){(r.responsive||h.data("sbi_imgLiquid_oldProcessed"))&&h.data("sbi_imgLiquid_settings")&&(r=h.data("sbi_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&o(),l.sizeOld=l.actualSize,setTimeout(a,r.responsiveCheckTime))}function n(){h.data("sbi_imgLiquid_error",!0),l.addClass("sbi_imgLiquid_error"),r.onItemError&&r.onItemError(e,l,h),d()}function o(){var i,s,t,a,n,o,g,u,m=0,f=0,_=l.width(),c=l.height();void 0===h.data("owidth")&&h.data("owidth",h[0].width),void 0===h.data("oheight")&&h.data("oheight",h[0].height),r.fill===_/c>=h.data("owidth")/h.data("oheight")?(i="100%",s="auto",t=Math.floor(_),a=Math.floor(_*(h.data("oheight")/h.data("owidth")))):(i="auto",s="100%",t=Math.floor(c*(h.data("owidth")/h.data("oheight"))),a=Math.floor(c)),g=_-t,"left"===(n=r.horizontalAlign.toLowerCase())&&(f=0),"center"===n&&(f=.5*g),"right"===n&&(f=g),-1!==n.indexOf("%")&&((n=parseInt(n.replace("%",""),10))>0&&(f=g*n*.01)),u=c-a,"left"===(o=r.verticalAlign.toLowerCase())&&(m=0),"center"===o&&(m=.5*u),"bottom"===o&&(m=u),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(m=u*o*.01)),r.hardPixels&&(i=t,s=a),h.css({width:i,height:s,"margin-left":Math.floor(f),"margin-top":Math.floor(m)}),h.data("sbi_imgLiquid_oldProcessed")||(h.fadeTo(r.fadeInTime,1),h.data("sbi_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sbi_imgLiquid_nobgSize"),l.addClass("sbi_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(e,l,h),d()}function d(){e===s.length-1&&s.settings.onFinish&&s.settings.onFinish()}var r=s.settings,l=i(this),h=i("img:first",l);return h.length?(h.data("sbi_imgLiquid_settings")?(l.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),r=i.extend({},h.data("sbi_imgLiquid_settings"),s.options)):r=i.extend({},s.settings,function(){var i={};if(s.settings.useDataHtmlAttr){var e=l.attr("data-sbi_imgLiquid-fill"),a=l.attr("data-sbi_imgLiquid-horizontalAlign"),n=l.attr("data-sbi_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(i.fill=Boolean("true"===e)),void 0===a||"left"!==a&&"center"!==a&&"right"!==a&&-1===a.indexOf("%")||(i.horizontalAlign=a),void 0===n||"top"!==n&&"bottom"!==n&&"center"!==n&&-1===n.indexOf("%")||(i.verticalAlign=n)}return t.isIE&&s.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}()),h.data("sbi_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(e,l,h),void(t.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(h.attr("src")))&&l.css({"background-image":'url("'+encodeURI(h.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",l).css({display:"block",width:"100%",height:"100%"}),i("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(e,l,h),l.addClass("sbi_imgLiquid_bgSize"),l.addClass("sbi_imgLiquid_ready"),d()):function s(){if(h.data("oldSrc")&&h.data("oldSrc")!==h.attr("src")){var t=h.clone().removeAttr("style");return t.data("sbi_imgLiquid_settings",h.data("sbi_imgLiquid_settings")),h.parent().prepend(t),h.remove(),(h=t)[0].width=0,void setTimeout(s,10)}return h.data("sbi_imgLiquid_oldProcessed")?void o():(h.data("sbi_imgLiquid_oldProcessed",!1),h.data("oldSrc",h.attr("src")),i("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),h.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),h.on("error",n),h[0].onerror=n,function i(){h.data("sbi_imgLiquid_error")||h.data("sbi_imgLiquid_loaded")||h.data("sbi_imgLiquid_oldProcessed")||(l.is(":visible")&&h[0].complete&&h[0].width>0&&h[0].height>0?(h.data("sbi_imgLiquid_loaded",!0),setTimeout(o,e*r.delay)):setTimeout(i,r.timecheckvisibility))}(),void a())}())):void n()})}})}(jQuery),i=t.injectCss,e=document.getElementsByTagName("head")[0],(s=document.createElement("style")).type="text/css",s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i)),e.appendChild(s)}function s(){this.feeds={},this.options=sb_instagram_js_options}function t(i,e,s){this.el=i,this.index=e,this.settings=s,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.isInitialized=!1}function a(e,s){i.ajax({url:sbiajaxurl,type:"post",data:e,success:s})}s.prototype={createPage:function(e,s){void 0!==window.sbiajaxurl&&-1!==window.sbiajaxurl.indexOf(window.location.hostname)||(window.sbiajaxurl=window.location.hostname+"/wp-admin/admin-ajax.php"),i(".sbi_no_js_error_message").remove(),i(".sbi_no_js").removeClass("sbi_no_js"),e(s)},createFeeds:function(e){e.whenFeedsCreated(i(".sbi").each(function(e){i(this).attr("data-sbi-index",e+1);var s=i(this),n=void 0!==s.attr("data-sbi-flags")?s.attr("data-sbi-flags").split(","):[],o=void 0!==s.attr("data-options")?JSON.parse(s.attr("data-options")):{};if(n.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;a({action:"sbi_on_ajax_test_trigger"},function(i){console.log("did test")})}var d={cols:s.attr("data-cols"),colsmobile:"same"!==s.attr("data-colsmobile")?s.attr("data-colsmobile"):s.attr("data-cols"),num:s.attr("data-num"),imgRes:s.attr("data-res"),feedID:s.attr("data-feedid"),shortCodeAtts:s.attr("data-shortcode-atts"),resizingEnabled:-1===n.indexOf("resizeDisable"),imageLoadEnabled:-1===n.indexOf("imageLoadDisable"),debugEnabled:n.indexOf("debug")>-1,favorLocal:n.indexOf("favorLocal")>-1,ajaxPostLoad:n.indexOf("ajaxPostLoad")>-1,autoMinRes:1,general:o};window.sbi.feeds[e]=function(i,e,s){return new t(i,e,s)}(this,e,d),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var r=jQuery.Event("sbiafterfeedcreate");r.feed=window.sbi.feeds[e],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){i(".sb_instagram_header").each(function(){var e=i(this);e.find(".sbi_header_link").hover(function(){e.find(".sbi_header_img_hover").addClass("sbi_fade_in")},function(){e.find(".sbi_header_img_hover").removeClass("sbi_fade_in")})})},encodeHTML:function(i){return void 0===i?"":i.replace(/(>)/g,">").replace(/(<)/g,"<").replace(/(<br\/>)/g,"<br>").replace(/(<br>)/g,"<br>")},urlDetect:function(i){return i.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}},t.prototype={init:function(){var i=this;this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var e,s=(e=0,function(i,s){clearTimeout(e),e=setTimeout(i,s)});jQuery(window).resize(function(){s(function(){i.afterResize()},500)})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(i){i.find(".sbi_loader").removeClass("sbi_hidden"),i.find(".sbi_btn_text").addClass("sbi_hidden"),i.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var e=i(this.el),s=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){e.find(".sbi_loader").addClass("sbi_hidden"),e.find(".sbi_btn_text").removeClass("sbi_hidden"),s.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var e=i(this.el);"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),e.find(".sbi_item").each(function(i){jQuery(this).find(".sbi_photo").hover(function(){jQuery(this).fadeTo(200,.85)},function(){jQuery(this).stop().fadeTo(500,1)})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var i=10;e.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},i),i+=10})},500)},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.settings.imageLoadEnabled||i(".sbi_no_resraise").removeClass("sbi_no_resraise");var e=i.Event("sbiafterimagesloaded");e.el=i(this.el),i(window).trigger(e)},setResizedImages:function(){i(this.el).find(".sbi_resized_image_data").length&&void 0!==i(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===i(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(i(this.el).find(".sbi_resized_image_data").attr("data-resized")),i(this.el).find(".sbi_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this;if(e.needsResizing.length>0&&e.settings.resizingEnabled){var s=i(this.el).find(".sbi_item").length;a({action:"sbi_resized_images_submit",needs_resizing:e.needsResizing,offset:s,feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts},function(i){if(0===i.trim().indexOf("{")){var s=JSON.parse(i);e.settings.debugEnabled&&console.log(s)}})}},loadMoreButtonInit:function(){var e=i(this.el),s=this;e.find("#sbi_load .sbi_load_btn").off().on("click",function(){s.afterLoadMoreClicked(jQuery(this)),s.getNewPostSet()})},getNewPostSet:function(){var e=i(this.el),s=this;a({action:"sbi_load_more_clicked",offset:e.find(".sbi_item").length,feed_id:s.settings.feedID,atts:s.settings.shortCodeAtts,current_resolution:s.imageResolution},function(t){if(0===t.trim().indexOf("{")){var a=JSON.parse(t);s.settings.debugEnabled&&console.log(a),s.appendNewPosts(a.html),s.addResizedImages(a.resizedImages),s.settings.ajaxPostLoad?(s.settings.ajaxPostLoad=!1,s.afterInitialImagesLoaded()):s.afterNewImagesLoaded(),a.feedStatus.shouldPaginate?s.outOfPages=!1:(s.outOfPages=!0,e.find(".sbi_load_btn").hide()),i(".sbi_no_js").removeClass("sbi_no_js")}})},appendNewPosts:function(e){var s=i(this.el);s.find("#sbi_images .sbi_item").length?s.find("#sbi_images .sbi_item").last().after(e):s.find("#sbi_images").append(e)},addResizedImages:function(i){for(var e in i)this.resizedImages[e]=i[e]},setImageHeight:function(){var e=i(this.el),s=e.find(".sbi_photo").eq(0).innerWidth(),t=this.getColumnCount(),a=e.find("#sbi_images").innerWidth()-e.find("#sbi_images").width(),n=a/2;sbi_photo_width_manual=e.find("#sbi_images").width()/t-a,e.find(".sbi_photo").css("height",s),e.find(".sbi-owl-nav").length&&setTimeout(function(){var i=2;e.find(".sbi_owl2row-item").length&&(i=1);var s=e.find(".sbi_photo").eq(0).innerWidth()/i;s+=parseInt(n)*(2-i+2),e.find(".sbi-owl-nav div").css("top",s)},100)},maybeRaiseSingleImageResolution:function(e,s,t){var a=this,n=a.getImageUrls(e),o=e.find(".sbi_photo img").attr("src"),d=150,r=e.find("img").get(0),l=o===window.sbi.options.placeholder?1:r.naturalWidth/r.naturalHeight;t=void 0!==t&&t;if(!e.hasClass("sbi_no_resraise")){i.each(n,function(i,e){e===o&&(d=parseInt(i),t=!1)});var h=640;switch(a.settings.imgRes){case"thumb":h=150;break;case"medium":h=320;break;case"full":h=640;break;default:var g=Math.max(a.settings.autoMinRes,e.find(".sbi_photo").innerWidth()),u=a.getBestResolutionForAuto(g,l,e);switch(u){case 320:h=320;break;case 150:h=150}}if(h>d||o===window.sbi.options.placeholder||t){if(a.settings.debugEnabled){var m=o===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+o,m)}var f=n[h].split("?ig_cache_key")[0];e.find(".sbi_photo img").attr("src",f),e.find(".sbi_photo").css("background-image",'url("'+f+'")');var _=!1;e.find(".sbi_photo img").on("load",function(){var s=i(this),t=s.get(0).naturalWidth/s.get(0).naturalHeight;if(1e3!==s.get(0).naturalWidth&&t>l&&!_){switch(a.settings.debugEnabled&&console.log("rais res again for aspect ratio change "+o),_=!0,g=e.find(".sbi_photo").innerWidth(),u=a.getBestResolutionForAuto(g,t,e),h=640,u){case 320:h=320;break;case 150:h=150}h>d&&(f=n[h].split("?ig_cache_key")[0],s.attr("src",f),s.closest(".sbi_photo").css("background-image",'url("'+f+'")')),"masonry"!==a.layout&&"highlight"!==a.layout||(i(a.el).find("#sbi_images").smashotope(a.isotopeArgs),setTimeout(function(){i(a.el).find("#sbi_images").smashotope(a.isotopeArgs)},500))}else if(a.settings.debugEnabled){var r=_?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+o,r)}})}e.find("img").on("error",function(){if(i(this).hasClass("sbi_img_error"))console.log("unfixed error "+i(this).attr("src"));else{if(i(this).addClass("sbi_img_error"),i(this).attr("src").indexOf("media?size=")>-1||i(this).attr("src").indexOf("cdninstagram")>-1||i(this).attr("src").indexOf("fbcdn")>-1){a.settings.favorLocal=!0;var e=a.getImageUrls(i(this).closest(".sbi_item"));void 0!==e[640]&&(i(this).attr("src",e[640]),i(this).closest(".sbi_photo").css("background-image","url("+e[640]+")"))}else void 0!==i(this).closest(".sbi_photo").attr("data-full-res")?(i(this).attr("src",i(this).closest(".sbi_photo").attr("data-full-res")),i(this).closest(".sbi_photo").css("background-image","url("+i(this).closest(".sbi_photo").attr("data-full-res")+")")):"undefined"!==i(this).closest(".sbi_photo").attr("href")&&(i(this).attr("src",i(this).closest(".sbi_photo").attr("href")+"media?size=l"),i(this).closest(".sbi_photo").css("background-image","url("+i(this).closest(".sbi_photo").attr("href")+"media?size=l)"));setTimeout(function(){a.afterResize()},1500)}})}},maybeRaiseImageResolution:function(e){var s=this,t=void 0!==e&&!0===e?".sbi_item.sbi_new":".sbi_item",a=!s.isInitialized;i(s.el).find(t).each(function(e){!i(this).hasClass("sbi_num_diff_hide")&&i(this).find(".sbi_photo").length&&void 0!==i(this).find(".sbi_photo").attr("data-img-src-set")&&s.maybeRaiseSingleImageResolution(i(this),e,a)}),s.isInitialized=!0},getBestResolutionForAuto:function(e,s,t){(isNaN(s)||s<1)&&(s=1);var a=e*s,n=10*Math.ceil(a/10),o=[150,320,640];if(t.hasClass("sbi_highlighted")&&(n*=2),-1===o.indexOf(parseInt(n))){var d=!1;i.each(o,function(i,e){e>parseInt(n)&&!d&&(n=e,d=!0)})}return n},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var e=i(this.el),s=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,t=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):s;i(window).width()<480?t<e.find(".sbi_item").length&&e.find(".sbi_item").slice(t-e.find(".sbi_item").length).addClass("sbi_num_diff_hide"):s<e.find(".sbi_item").length&&e.find(".sbi_item").slice(s-e.find(".sbi_item").length).addClass("sbi_num_diff_hide")}},setImageSizeClass:function(){var e=i(this.el);e.removeClass("sbi_small sbi_medium");var s=e.innerWidth(),t=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,a=this.getColumnCount(),n=(s-t*(a+2))/a;n>120&&n<240?e.addClass("sbi_medium"):n<=120&&e.addClass("sbi_small")},setMinImageWidth:function(){i(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=i(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(i){var e=JSON.parse(i.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),s=i.attr("id").replace("sbi_","");if(void 0!==this.resizedImages[s]&&"video"!==this.resizedImages[s]&&"pending"!==this.resizedImages[s]&&"error"!==this.resizedImages[s].id&&"video"!==this.resizedImages[s].id&&"pending"!==this.resizedImages[s].id){if(void 0!==this.resizedImages[s].sizes){var t=[];void 0!==this.resizedImages[s].sizes.full&&(t.push(640),e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg",i.find(".sbi_link_area").attr("href",sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg"),i.find(".sbi_photo").attr("data-full-res",sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg")),void 0!==this.resizedImages[s].sizes.low&&(t.push(320),e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg",this.settings.favorLocal&&void 0===this.resizedImages[s].sizes.full&&(i.find(".sbi_link_area").attr("href",sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"),i.find(".sbi_photo").attr("data-full-res",sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"))),void 0!==this.resizedImages[s].sizes.thumb&&(t.push(150),e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg"),this.settings.favorLocal&&(-1===t.indexOf(640)&&t.indexOf(320)>-1&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"),-1===t.indexOf(320)&&(t.indexOf(640)>-1?e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg":t.indexOf(150)>-1&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg")),-1===t.indexOf(150)&&(t.indexOf(320)>-1?e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg":t.indexOf(640)>-1&&(e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg")))}}else void 0!==this.resizedImages[s]&&"pending"===this.resizedImages[s]||this.addToNeedsResizing(s);return e},getAvatarUrl:function(i,e){if(""===i)return"";var s=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":void 0!==s[i]?s[i]:"":void 0!==s[i]?s[i]:void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":""},addToNeedsResizing:function(i){-1===this.needsResizing.indexOf(i)&&this.needsResizing.push(i)},applyImageLiquid:function(){var s=i(this.el);e(),"function"==typeof s.find(".sbi_photo").sbi_imgLiquid&&s.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var e,s,t,a=this;e=jQuery,s={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},t={sbiCheckVisibility:function(i,e){if(jQuery.contains(document,i[0])){var s=e.sbiPreviousVisibility,a=i.is(":visible");e.sbiPreviousVisibility=a,null==s?e.runOnLoad&&e.callback(i,a):s!==a&&e.callback(i,a),setTimeout(function(){t.sbiCheckVisibility(i,e)},e.frequency)}}},e.fn.sbiVisibilityChanged=function(i){var a=e.extend({},s,i);return this.each(function(){t.sbiCheckVisibility(e(this),a)})},"function"==typeof i(this.el).filter(":hidden").sbiVisibilityChanged&&i(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(i,e){a.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=i(this.el),s=this.settings.cols,t=this.settings.colsmobile,a=s;return sbiWindowWidth=window.innerWidth,e.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(s)>2&&parseInt(s)<7&&(a=2),sbiWindowWidth<640&&parseInt(s)>6&&parseInt(s)<11&&(a=4),sbiWindowWidth<=480&&parseInt(s)>2&&(a=1)):sbiWindowWidth<=480&&(a=t),parseInt(a)}},window.sbi_init=function(){window.sbi=new s,window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})}}(jQuery),jQuery(document).ready(function(i){void 0!==window.sb_instagram_js_options.resized_url&&-1===window.sb_instagram_js_options.resized_url.indexOf(location.protocol)&&("http:"===location.protocol?window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("http:","https:"):window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("https:","http:")),sbi_init()}));
|
js/sb-instagram-admin.js
CHANGED
@@ -111,7 +111,7 @@ jQuery(document).ready(function($) {
|
|
111 |
token = hash.substring(14),
|
112 |
id = token.split('.')[0];
|
113 |
|
114 |
-
if (token.length > 40) {
|
115 |
$('.sbi_admin_btn').css('opacity','.5').after('<div class="spinner" style="visibility: visible; position: relative;float: left;margin-top: 15px;"></div>');
|
116 |
jQuery.ajax({
|
117 |
url: sbiA.ajax_url,
|
111 |
token = hash.substring(14),
|
112 |
id = token.split('.')[0];
|
113 |
|
114 |
+
if (token.length > 40 && $('.sbi_admin_btn').length) {
|
115 |
$('.sbi_admin_btn').css('opacity','.5').after('<div class="spinner" style="visibility: visible; position: relative;float: left;margin-top: 15px;"></div>');
|
116 |
jQuery.ajax({
|
117 |
url: sbiA.ajax_url,
|
js/sb-instagram.js
CHANGED
@@ -309,6 +309,7 @@ if(!sbi_js_exists) {
|
|
309 |
//Hide the loader in the load more button
|
310 |
$self.find('.sbi_loader').addClass('sbi_hidden');
|
311 |
$self.find('.sbi_btn_text').removeClass('sbi_hidden');
|
|
|
312 |
}, 500);
|
313 |
},
|
314 |
beforeNewImagesRevealed: function() {
|
@@ -355,6 +356,9 @@ if(!sbi_js_exists) {
|
|
355 |
afterNewImagesRevealed: function() {
|
356 |
this.listenForVisibilityChange();
|
357 |
this.sendNeedsResizingToServer();
|
|
|
|
|
|
|
358 |
|
359 |
var evt = $.Event('sbiafterimagesloaded');
|
360 |
evt.el = $(this.el);
|
@@ -433,6 +437,7 @@ if(!sbi_js_exists) {
|
|
433 |
} else {
|
434 |
feed.outOfPages = false;
|
435 |
}
|
|
|
436 |
}
|
437 |
|
438 |
};
|
@@ -493,6 +498,10 @@ if(!sbi_js_exists) {
|
|
493 |
aspectRatio = currentUrl === window.sbi.options.placeholder ? 1 : imagEl.naturalWidth/imagEl.naturalHeight,
|
494 |
forceChange = typeof forceChange !== 'undefined' ? forceChange : false;
|
495 |
|
|
|
|
|
|
|
|
|
496 |
$.each(imgSrcSet, function (index, value) {
|
497 |
if (value === currentUrl) {
|
498 |
currentRes = parseInt(index);
|
309 |
//Hide the loader in the load more button
|
310 |
$self.find('.sbi_loader').addClass('sbi_hidden');
|
311 |
$self.find('.sbi_btn_text').removeClass('sbi_hidden');
|
312 |
+
feed.maybeRaiseImageResolution();
|
313 |
}, 500);
|
314 |
},
|
315 |
beforeNewImagesRevealed: function() {
|
356 |
afterNewImagesRevealed: function() {
|
357 |
this.listenForVisibilityChange();
|
358 |
this.sendNeedsResizingToServer();
|
359 |
+
if (!this.settings.imageLoadEnabled) {
|
360 |
+
$('.sbi_no_resraise').removeClass('sbi_no_resraise');
|
361 |
+
}
|
362 |
|
363 |
var evt = $.Event('sbiafterimagesloaded');
|
364 |
evt.el = $(this.el);
|
437 |
} else {
|
438 |
feed.outOfPages = false;
|
439 |
}
|
440 |
+
$('.sbi_no_js').removeClass('sbi_no_js');
|
441 |
}
|
442 |
|
443 |
};
|
498 |
aspectRatio = currentUrl === window.sbi.options.placeholder ? 1 : imagEl.naturalWidth/imagEl.naturalHeight,
|
499 |
forceChange = typeof forceChange !== 'undefined' ? forceChange : false;
|
500 |
|
501 |
+
if ($item.hasClass('sbi_no_resraise')) {
|
502 |
+
return;
|
503 |
+
}
|
504 |
+
|
505 |
$.each(imgSrcSet, function (index, value) {
|
506 |
if (value === currentUrl) {
|
507 |
currentRes = parseInt(index);
|
js/sb-instagram.min.js
CHANGED
@@ -1,866 +1 @@
|
|
1 |
-
var sbi_js_exists = (typeof sbi_js_exists !== 'undefined') ? true : false;
|
2 |
-
if(!sbi_js_exists) {
|
3 |
-
(function($){
|
4 |
-
|
5 |
-
function sbiAddImgLiquid() {
|
6 |
-
/*! imgLiquid v0.9.944 / 03-05-2013 https://github.com/karacas/imgLiquid */
|
7 |
-
var sbi_imgLiquid = sbi_imgLiquid || {VER: "0.9.944"};
|
8 |
-
sbi_imgLiquid.bgs_Available = !1, sbi_imgLiquid.bgs_CheckRunned = !1, function (i) {
|
9 |
-
function t() {
|
10 |
-
if (!sbi_imgLiquid.bgs_CheckRunned) {
|
11 |
-
sbi_imgLiquid.bgs_CheckRunned = !0;
|
12 |
-
var t = i('<span style="background-size:cover" />');
|
13 |
-
i("body").append(t), !function () {
|
14 |
-
var i = t[0];
|
15 |
-
if (i && window.getComputedStyle) {
|
16 |
-
var e = window.getComputedStyle(i, null);
|
17 |
-
e && e.backgroundSize && (sbi_imgLiquid.bgs_Available = "cover" === e.backgroundSize)
|
18 |
-
}
|
19 |
-
}(), t.remove()
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
i.fn.extend({
|
24 |
-
sbi_imgLiquid: function (e) {
|
25 |
-
this.defaults = {
|
26 |
-
fill: !0,
|
27 |
-
verticalAlign: "center",
|
28 |
-
horizontalAlign: "center",
|
29 |
-
useBackgroundSize: !0,
|
30 |
-
useDataHtmlAttr: !0,
|
31 |
-
responsive: !0,
|
32 |
-
delay: 0,
|
33 |
-
fadeInTime: 0,
|
34 |
-
removeBoxBackground: !0,
|
35 |
-
hardPixels: !0,
|
36 |
-
responsiveCheckTime: 500,
|
37 |
-
timecheckvisibility: 500,
|
38 |
-
onStart: null,
|
39 |
-
onFinish: null,
|
40 |
-
onItemStart: null,
|
41 |
-
onItemFinish: null,
|
42 |
-
onItemError: null
|
43 |
-
}, t();
|
44 |
-
var a = this;
|
45 |
-
return this.options = e, this.settings = i.extend({}, this.defaults, this.options), this.settings.onStart && this.settings.onStart(), this.each(function (t) {
|
46 |
-
function e() {
|
47 |
-
-1 === u.css("background-image").indexOf(encodeURI(c.attr("src"))) && u.css({"background-image": 'url("' + encodeURI(c.attr("src")) + '")'}), u.css({
|
48 |
-
"background-size": g.fill ? "cover" : "contain",
|
49 |
-
"background-position": (g.horizontalAlign + " " + g.verticalAlign).toLowerCase(),
|
50 |
-
"background-repeat": "no-repeat"
|
51 |
-
}), i("a:first", u).css({
|
52 |
-
display: "block",
|
53 |
-
width: "100%",
|
54 |
-
height: "100%"
|
55 |
-
}), i("img", u).css({display: "none"}), g.onItemFinish && g.onItemFinish(t, u, c), u.addClass("sbi_imgLiquid_bgSize"), u.addClass("sbi_imgLiquid_ready"), l()
|
56 |
-
}
|
57 |
-
|
58 |
-
function o() {
|
59 |
-
function e() {
|
60 |
-
c.data("sbi_imgLiquid_error") || c.data("sbi_imgLiquid_loaded") || c.data("sbi_imgLiquid_oldProcessed") || (u.is(":visible") && c[0].complete && c[0].width > 0 && c[0].height > 0 ? (c.data("sbi_imgLiquid_loaded", !0), setTimeout(r, t * g.delay)) : setTimeout(e, g.timecheckvisibility))
|
61 |
-
}
|
62 |
-
|
63 |
-
if (c.data("oldSrc") && c.data("oldSrc") !== c.attr("src")) {
|
64 |
-
var a = c.clone().removeAttr("style");
|
65 |
-
return a.data("sbi_imgLiquid_settings", c.data("sbi_imgLiquid_settings")), c.parent().prepend(a), c.remove(), c = a, c[0].width = 0, void setTimeout(o, 10)
|
66 |
-
}
|
67 |
-
return c.data("sbi_imgLiquid_oldProcessed") ? void r() : (c.data("sbi_imgLiquid_oldProcessed", !1), c.data("oldSrc", c.attr("src")), i("img:not(:first)", u).css("display", "none"), u.css({overflow: "hidden"}), c.fadeTo(0, 0).removeAttr("width").removeAttr("height").css({
|
68 |
-
visibility: "visible",
|
69 |
-
"max-width": "none",
|
70 |
-
"max-height": "none",
|
71 |
-
width: "auto",
|
72 |
-
height: "auto",
|
73 |
-
display: "block"
|
74 |
-
}), c.on("error", n), c[0].onerror = n, e(), void d())
|
75 |
-
}
|
76 |
-
|
77 |
-
function d() {
|
78 |
-
(g.responsive || c.data("sbi_imgLiquid_oldProcessed")) && c.data("sbi_imgLiquid_settings") && (g = c.data("sbi_imgLiquid_settings"), u.actualSize = u.get(0).offsetWidth + u.get(0).offsetHeight / 1e4, u.sizeOld && u.actualSize !== u.sizeOld && r(), u.sizeOld = u.actualSize, setTimeout(d, g.responsiveCheckTime))
|
79 |
-
}
|
80 |
-
|
81 |
-
function n() {
|
82 |
-
c.data("sbi_imgLiquid_error", !0), u.addClass("sbi_imgLiquid_error"), g.onItemError && g.onItemError(t, u, c), l()
|
83 |
-
}
|
84 |
-
|
85 |
-
function s() {
|
86 |
-
var i = {};
|
87 |
-
if (a.settings.useDataHtmlAttr) {
|
88 |
-
var t = u.attr("data-sbi_imgLiquid-fill"),
|
89 |
-
e = u.attr("data-sbi_imgLiquid-horizontalAlign"),
|
90 |
-
o = u.attr("data-sbi_imgLiquid-verticalAlign");
|
91 |
-
("true" === t || "false" === t) && (i.fill = Boolean("true" === t)), void 0 === e || "left" !== e && "center" !== e && "right" !== e && -1 === e.indexOf("%") || (i.horizontalAlign = e), void 0 === o || "top" !== o && "bottom" !== o && "center" !== o && -1 === o.indexOf("%") || (i.verticalAlign = o)
|
92 |
-
}
|
93 |
-
return sbi_imgLiquid.isIE && a.settings.ieFadeInDisabled && (i.fadeInTime = 0), i
|
94 |
-
}
|
95 |
-
|
96 |
-
function r() {
|
97 |
-
var i, e, a, o, d, n, s, r, m = 0, h = 0, f = u.width(), v = u.height();
|
98 |
-
void 0 === c.data("owidth") && c.data("owidth", c[0].width), void 0 === c.data("oheight") && c.data("oheight", c[0].height), g.fill === f / v >= c.data("owidth") / c.data("oheight") ? (i = "100%", e = "auto", a = Math.floor(f), o = Math.floor(f * (c.data("oheight") / c.data("owidth")))) : (i = "auto", e = "100%", a = Math.floor(v * (c.data("owidth") / c.data("oheight"))), o = Math.floor(v)), d = g.horizontalAlign.toLowerCase(), s = f - a, "left" === d && (h = 0), "center" === d && (h = .5 * s), "right" === d && (h = s), -1 !== d.indexOf("%") && (d = parseInt(d.replace("%", ""), 10), d > 0 && (h = s * d * .01)), n = g.verticalAlign.toLowerCase(), r = v - o, "left" === n && (m = 0), "center" === n && (m = .5 * r), "bottom" === n && (m = r), -1 !== n.indexOf("%") && (n = parseInt(n.replace("%", ""), 10), n > 0 && (m = r * n * .01)), g.hardPixels && (i = a, e = o), c.css({
|
99 |
-
width: i,
|
100 |
-
height: e,
|
101 |
-
"margin-left": Math.floor(h),
|
102 |
-
"margin-top": Math.floor(m)
|
103 |
-
}), c.data("sbi_imgLiquid_oldProcessed") || (c.fadeTo(g.fadeInTime, 1), c.data("sbi_imgLiquid_oldProcessed", !0), g.removeBoxBackground && u.css("background-image", "none"), u.addClass("sbi_imgLiquid_nobgSize"), u.addClass("sbi_imgLiquid_ready")), g.onItemFinish && g.onItemFinish(t, u, c), l()
|
104 |
-
}
|
105 |
-
|
106 |
-
function l() {
|
107 |
-
t === a.length - 1 && a.settings.onFinish && a.settings.onFinish()
|
108 |
-
}
|
109 |
-
|
110 |
-
var g = a.settings, u = i(this), c = i("img:first", u);
|
111 |
-
return c.length ? (c.data("sbi_imgLiquid_settings") ? (u.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"), g = i.extend({}, c.data("sbi_imgLiquid_settings"), a.options)) : g = i.extend({}, a.settings, s()), c.data("sbi_imgLiquid_settings", g), g.onItemStart && g.onItemStart(t, u, c), void (sbi_imgLiquid.bgs_Available && g.useBackgroundSize ? e() : o())) : void n()
|
112 |
-
})
|
113 |
-
}
|
114 |
-
})
|
115 |
-
}(jQuery);
|
116 |
-
|
117 |
-
// Use imagefill to set the images as backgrounds so they can be square
|
118 |
-
!function () {
|
119 |
-
var css = sbi_imgLiquid.injectCss,
|
120 |
-
head = document.getElementsByTagName('head')[0],
|
121 |
-
style = document.createElement('style');
|
122 |
-
style.type = 'text/css';
|
123 |
-
if (style.styleSheet) {
|
124 |
-
style.styleSheet.cssText = css;
|
125 |
-
} else {
|
126 |
-
style.appendChild(document.createTextNode(css));
|
127 |
-
}
|
128 |
-
head.appendChild(style);
|
129 |
-
}();
|
130 |
-
}
|
131 |
-
|
132 |
-
function sbiAddVisibilityListener() {
|
133 |
-
/* Detect when element becomes visible. Used for when the feed is initially hidden, in a tab for example. https://github.com/shaunbowe/jquery.visibilityChanged */
|
134 |
-
!function (i) {
|
135 |
-
var n = {
|
136 |
-
callback: function () {
|
137 |
-
}, runOnLoad: !0, frequency: 100, sbiPreviousVisibility: null
|
138 |
-
}, c = {};
|
139 |
-
c.sbiCheckVisibility = function (i, n) {
|
140 |
-
if (jQuery.contains(document, i[0])) {
|
141 |
-
var e = n.sbiPreviousVisibility, t = i.is(":visible");
|
142 |
-
n.sbiPreviousVisibility = t, null == e ? n.runOnLoad && n.callback(i, t) : e !== t && n.callback(i, t), setTimeout(function () {
|
143 |
-
c.sbiCheckVisibility(i, n)
|
144 |
-
}, n.frequency)
|
145 |
-
}
|
146 |
-
}, i.fn.sbiVisibilityChanged = function (e) {
|
147 |
-
var t = i.extend({}, n, e);
|
148 |
-
return this.each(function () {
|
149 |
-
c.sbiCheckVisibility(i(this), t)
|
150 |
-
})
|
151 |
-
}
|
152 |
-
}(jQuery);
|
153 |
-
}
|
154 |
-
|
155 |
-
function Sbi() {
|
156 |
-
this.feeds = {};
|
157 |
-
this.options = sb_instagram_js_options;
|
158 |
-
}
|
159 |
-
|
160 |
-
Sbi.prototype = {
|
161 |
-
createPage: function (createFeeds, createFeedsArgs) {
|
162 |
-
if (typeof window.sbiajaxurl === 'undefined' || window.sbiajaxurl.indexOf(window.location.hostname) === -1) {
|
163 |
-
window.sbiajaxurl = window.location.hostname + '/wp-admin/admin-ajax.php';
|
164 |
-
}
|
165 |
-
|
166 |
-
$('.sbi_no_js_error_message').remove();
|
167 |
-
$('.sbi_no_js').removeClass('sbi_no_js');
|
168 |
-
createFeeds(createFeedsArgs);
|
169 |
-
},
|
170 |
-
createFeeds: function (args) {
|
171 |
-
args.whenFeedsCreated(
|
172 |
-
$('.sbi').each(function (index) {
|
173 |
-
$(this).attr('data-sbi-index', index + 1);
|
174 |
-
var $self = $(this),
|
175 |
-
flags = typeof $self.attr('data-sbi-flags') !== 'undefined' ? $self.attr('data-sbi-flags').split(',') : [],
|
176 |
-
general = typeof $self.attr('data-options') !== 'undefined' ? JSON.parse($self.attr('data-options')) : {};
|
177 |
-
if (flags.indexOf('testAjax') > -1) {
|
178 |
-
window.sbi.triggeredTest = true;
|
179 |
-
var submitData = {
|
180 |
-
'action' : 'sbi_on_ajax_test_trigger'
|
181 |
-
},
|
182 |
-
onSuccess = function(data) {
|
183 |
-
console.log('did test');
|
184 |
-
};
|
185 |
-
sbiAjax(submitData,onSuccess)
|
186 |
-
}
|
187 |
-
var feedOptions = {
|
188 |
-
cols : $self.attr('data-cols'),
|
189 |
-
colsmobile : $self.attr('data-colsmobile') !== 'same' ? $self.attr('data-colsmobile') : $self.attr('data-cols'),
|
190 |
-
num : $self.attr('data-num'),
|
191 |
-
imgRes : $self.attr('data-res'),
|
192 |
-
feedID : $self.attr('data-feedid'),
|
193 |
-
shortCodeAtts : $self.attr('data-shortcode-atts'),
|
194 |
-
resizingEnabled : (flags.indexOf('resizeDisable') === -1),
|
195 |
-
imageLoadEnabled : (flags.indexOf('imageLoadDisable') === -1),
|
196 |
-
debugEnabled : (flags.indexOf('debug') > -1),
|
197 |
-
favorLocal : (flags.indexOf('favorLocal') > -1),
|
198 |
-
ajaxPostLoad : (flags.indexOf('ajaxPostLoad') > -1),
|
199 |
-
autoMinRes : 1,
|
200 |
-
general : general
|
201 |
-
};
|
202 |
-
|
203 |
-
window.sbi.feeds[index] = sbiGetNewFeed(this, index, feedOptions);
|
204 |
-
window.sbi.feeds[index].setResizedImages();
|
205 |
-
window.sbi.feeds[index].init();
|
206 |
-
|
207 |
-
var evt = jQuery.Event('sbiafterfeedcreate');
|
208 |
-
evt.feed = window.sbi.feeds[index];
|
209 |
-
jQuery(window).trigger(evt);
|
210 |
-
|
211 |
-
})
|
212 |
-
);
|
213 |
-
},
|
214 |
-
afterFeedsCreated: function () {
|
215 |
-
// enable header hover action
|
216 |
-
$('.sb_instagram_header').each(function () {
|
217 |
-
var $thisHeader = $(this);
|
218 |
-
$thisHeader.find('.sbi_header_link').hover(function () {
|
219 |
-
$thisHeader.find('.sbi_header_img_hover').addClass('sbi_fade_in');
|
220 |
-
}, function () {
|
221 |
-
$thisHeader.find('.sbi_header_img_hover').removeClass('sbi_fade_in');
|
222 |
-
});
|
223 |
-
});
|
224 |
-
|
225 |
-
},
|
226 |
-
encodeHTML: function(raw) {
|
227 |
-
// make sure passed variable is defined
|
228 |
-
if (typeof raw === 'undefined') {
|
229 |
-
return '';
|
230 |
-
}
|
231 |
-
// replace greater than and less than symbols with html entity to disallow html in comments
|
232 |
-
var encoded = raw.replace(/(>)/g,'>'),
|
233 |
-
encoded = encoded.replace(/(<)/g,'<');
|
234 |
-
encoded = encoded.replace(/(<br\/>)/g,'<br>');
|
235 |
-
encoded = encoded.replace(/(<br>)/g,'<br>');
|
236 |
-
|
237 |
-
return encoded;
|
238 |
-
},
|
239 |
-
urlDetect: function(text) {
|
240 |
-
var urlRegex = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;
|
241 |
-
return text.match(urlRegex);
|
242 |
-
}
|
243 |
-
};
|
244 |
-
|
245 |
-
function SbiFeed(el, index, settings) {
|
246 |
-
this.el = el;
|
247 |
-
this.index = index;
|
248 |
-
this.settings = settings;
|
249 |
-
this.minImageWidth = 0;
|
250 |
-
this.imageResolution = 150;
|
251 |
-
this.resizedImages = {};
|
252 |
-
this.needsResizing = [];
|
253 |
-
this.outOfPages = false;
|
254 |
-
this.isInitialized = false;
|
255 |
-
}
|
256 |
-
|
257 |
-
SbiFeed.prototype = {
|
258 |
-
init: function() {
|
259 |
-
var feed = this;
|
260 |
-
if (this.settings.ajaxPostLoad) {
|
261 |
-
this.getNewPostSet();
|
262 |
-
} else {
|
263 |
-
this.afterInitialImagesLoaded();
|
264 |
-
//Only check the width once the resize event is over
|
265 |
-
}
|
266 |
-
var sbi_delay = (function () {
|
267 |
-
var sbi_timer = 0;
|
268 |
-
return function (sbi_callback, sbi_ms) {
|
269 |
-
clearTimeout(sbi_timer);
|
270 |
-
sbi_timer = setTimeout(sbi_callback, sbi_ms);
|
271 |
-
};
|
272 |
-
})();
|
273 |
-
jQuery(window).resize(function () {
|
274 |
-
sbi_delay(function () {
|
275 |
-
feed.afterResize();
|
276 |
-
}, 500);
|
277 |
-
});
|
278 |
-
|
279 |
-
},
|
280 |
-
initLayout: function() {
|
281 |
-
|
282 |
-
},
|
283 |
-
afterInitialImagesLoaded: function() {
|
284 |
-
this.initLayout();
|
285 |
-
this.loadMoreButtonInit();
|
286 |
-
this.hideExtraImagesForWidth();
|
287 |
-
this.beforeNewImagesRevealed();
|
288 |
-
this.revealNewImages();
|
289 |
-
this.afterNewImagesRevealed();
|
290 |
-
},
|
291 |
-
afterResize: function() {
|
292 |
-
this.setImageHeight();
|
293 |
-
this.setImageResolution();
|
294 |
-
this.maybeRaiseImageResolution();
|
295 |
-
this.setImageSizeClass();
|
296 |
-
},
|
297 |
-
afterLoadMoreClicked: function($button) {
|
298 |
-
$button.find('.sbi_loader').removeClass('sbi_hidden');
|
299 |
-
$button.find('.sbi_btn_text').addClass('sbi_hidden');
|
300 |
-
$button.closest('.sbi').find('.sbi_num_diff_hide').addClass('sbi_transition').removeClass('sbi_num_diff_hide');
|
301 |
-
},
|
302 |
-
afterNewImagesLoaded: function() {
|
303 |
-
var $self = $(this.el),
|
304 |
-
feed = this;
|
305 |
-
this.beforeNewImagesRevealed();
|
306 |
-
this.revealNewImages();
|
307 |
-
this.afterNewImagesRevealed();
|
308 |
-
setTimeout(function () {
|
309 |
-
//Hide the loader in the load more button
|
310 |
-
$self.find('.sbi_loader').addClass('sbi_hidden');
|
311 |
-
$self.find('.sbi_btn_text').removeClass('sbi_hidden');
|
312 |
-
}, 500);
|
313 |
-
},
|
314 |
-
beforeNewImagesRevealed: function() {
|
315 |
-
this.setImageHeight();
|
316 |
-
this.maybeRaiseImageResolution(true);
|
317 |
-
this.setImageSizeClass();
|
318 |
-
},
|
319 |
-
revealNewImages: function() {
|
320 |
-
var $self = $(this.el),
|
321 |
-
feed = this;
|
322 |
-
|
323 |
-
// Call Custom JS if it exists
|
324 |
-
if (typeof sbi_custom_js == 'function') setTimeout(function(){ sbi_custom_js(); }, 100);
|
325 |
-
|
326 |
-
this.applyImageLiquid();
|
327 |
-
$self.find('.sbi_item').each(function (index) {
|
328 |
-
var $self = jQuery(this);
|
329 |
-
|
330 |
-
//Photo links
|
331 |
-
//If lightbox is disabled
|
332 |
-
$self.find('.sbi_photo').hover(function () {
|
333 |
-
jQuery(this).fadeTo(200, 0.85);
|
334 |
-
}, function () {
|
335 |
-
jQuery(this).stop().fadeTo(500, 1);
|
336 |
-
});
|
337 |
-
|
338 |
-
}); //End .sbi_item each
|
339 |
-
|
340 |
-
//Remove the new class after 500ms, once the sorting is done
|
341 |
-
setTimeout(function () {
|
342 |
-
jQuery('#sbi_images .sbi_item.sbi_new').removeClass('sbi_new');
|
343 |
-
//Loop through items and remove class to reveal them
|
344 |
-
var time = 10;
|
345 |
-
$self.find('.sbi_transition').each(function() {
|
346 |
-
var $sbi_item_transition_el = jQuery(this);
|
347 |
-
|
348 |
-
setTimeout( function(){
|
349 |
-
$sbi_item_transition_el.removeClass('sbi_transition');
|
350 |
-
}, time);
|
351 |
-
time += 10;
|
352 |
-
});
|
353 |
-
}, 500);
|
354 |
-
},
|
355 |
-
afterNewImagesRevealed: function() {
|
356 |
-
this.listenForVisibilityChange();
|
357 |
-
this.sendNeedsResizingToServer();
|
358 |
-
|
359 |
-
var evt = $.Event('sbiafterimagesloaded');
|
360 |
-
evt.el = $(this.el);
|
361 |
-
$(window).trigger(evt);
|
362 |
-
},
|
363 |
-
setResizedImages: function () {
|
364 |
-
if ($(this.el).find('.sbi_resized_image_data').length
|
365 |
-
&& typeof $(this.el).find('.sbi_resized_image_data').attr('data-resized') !== 'undefined'
|
366 |
-
&& $(this.el).find('.sbi_resized_image_data').attr('data-resized').indexOf('{"') === 0) {
|
367 |
-
this.resizedImages = JSON.parse($(this.el).find('.sbi_resized_image_data').attr('data-resized'));
|
368 |
-
$(this.el).find('.sbi_resized_image_data').remove();
|
369 |
-
}
|
370 |
-
},
|
371 |
-
sendNeedsResizingToServer: function() {
|
372 |
-
var feed = this;
|
373 |
-
if (feed.needsResizing.length > 0 && feed.settings.resizingEnabled) {
|
374 |
-
var itemOffset = $(this.el).find('.sbi_item').length;
|
375 |
-
|
376 |
-
var submitData = {
|
377 |
-
action: 'sbi_resized_images_submit',
|
378 |
-
needs_resizing: feed.needsResizing,
|
379 |
-
offset: itemOffset,
|
380 |
-
feed_id: feed.settings.feedID,
|
381 |
-
atts: feed.settings.shortCodeAtts,
|
382 |
-
};
|
383 |
-
var onSuccess = function(data) {
|
384 |
-
if (data.trim().indexOf('{') === 0) {
|
385 |
-
var response = JSON.parse(data);
|
386 |
-
if (feed.settings.debugEnabled) {
|
387 |
-
console.log(response);
|
388 |
-
}
|
389 |
-
}
|
390 |
-
};
|
391 |
-
sbiAjax(submitData,onSuccess);
|
392 |
-
}
|
393 |
-
},
|
394 |
-
loadMoreButtonInit: function () {
|
395 |
-
var $self = $(this.el),
|
396 |
-
feed = this;
|
397 |
-
$self.find('#sbi_load .sbi_load_btn').off().on('click', function () {
|
398 |
-
|
399 |
-
feed.afterLoadMoreClicked(jQuery(this));
|
400 |
-
feed.getNewPostSet();
|
401 |
-
|
402 |
-
}); //End click event
|
403 |
-
},
|
404 |
-
getNewPostSet: function () {
|
405 |
-
var $self = $(this.el),
|
406 |
-
feed = this;
|
407 |
-
var itemOffset = $self.find('.sbi_item').length,
|
408 |
-
submitData = {
|
409 |
-
action: 'sbi_load_more_clicked',
|
410 |
-
offset: itemOffset,
|
411 |
-
feed_id: feed.settings.feedID,
|
412 |
-
atts: feed.settings.shortCodeAtts,
|
413 |
-
current_resolution: feed.imageResolution
|
414 |
-
};
|
415 |
-
var onSuccess = function (data) {
|
416 |
-
if (data.trim().indexOf('{') === 0) {
|
417 |
-
var response = JSON.parse(data);
|
418 |
-
if (feed.settings.debugEnabled) {
|
419 |
-
console.log(response);
|
420 |
-
}
|
421 |
-
feed.appendNewPosts(response.html);
|
422 |
-
feed.addResizedImages(response.resizedImages);
|
423 |
-
if (feed.settings.ajaxPostLoad) {
|
424 |
-
feed.settings.ajaxPostLoad = false;
|
425 |
-
feed.afterInitialImagesLoaded();
|
426 |
-
} else {
|
427 |
-
feed.afterNewImagesLoaded();
|
428 |
-
}
|
429 |
-
|
430 |
-
if (!response.feedStatus.shouldPaginate) {
|
431 |
-
feed.outOfPages = true;
|
432 |
-
$self.find('.sbi_load_btn').hide();
|
433 |
-
} else {
|
434 |
-
feed.outOfPages = false;
|
435 |
-
}
|
436 |
-
}
|
437 |
-
|
438 |
-
};
|
439 |
-
sbiAjax(submitData, onSuccess);
|
440 |
-
},
|
441 |
-
appendNewPosts: function (newPostsHtml) {
|
442 |
-
var $self = $(this.el),
|
443 |
-
feed = this;
|
444 |
-
if ($self.find('#sbi_images .sbi_item').length) {
|
445 |
-
$self.find('#sbi_images .sbi_item').last().after(newPostsHtml);
|
446 |
-
} else {
|
447 |
-
$self.find('#sbi_images').append(newPostsHtml);
|
448 |
-
}
|
449 |
-
},
|
450 |
-
addResizedImages: function (resizedImagesToAdd) {
|
451 |
-
for (var imageID in resizedImagesToAdd) {
|
452 |
-
this.resizedImages[imageID] = resizedImagesToAdd[imageID];
|
453 |
-
}
|
454 |
-
},
|
455 |
-
setImageHeight: function() {
|
456 |
-
var $self = $(this.el);
|
457 |
-
|
458 |
-
var sbi_photo_width = $self.find('.sbi_photo').eq(0).innerWidth();
|
459 |
-
|
460 |
-
//Figure out number of columns for either desktop or mobile
|
461 |
-
var sbi_num_cols = this.getColumnCount();
|
462 |
-
|
463 |
-
//Figure out what the width should be using the number of cols
|
464 |
-
//Figure out what the width should be using the number of cols
|
465 |
-
var imagesPadding = $self.find('#sbi_images').innerWidth() - $self.find('#sbi_images').width(),
|
466 |
-
imagepadding = imagesPadding / 2;
|
467 |
-
sbi_photo_width_manual = ( $self.find('#sbi_images').width() / sbi_num_cols ) - imagesPadding;
|
468 |
-
//If the width is less than it should be then set it manually
|
469 |
-
//if( sbi_photo_width <= (sbi_photo_width_manual) ) sbi_photo_width = sbi_photo_width_manual;
|
470 |
-
|
471 |
-
$self.find('.sbi_photo').css('height', sbi_photo_width);
|
472 |
-
|
473 |
-
//Set the position of the carousel arrows
|
474 |
-
if ($self.find('.sbi-owl-nav').length) {
|
475 |
-
setTimeout(function(){
|
476 |
-
//If there's 2 rows then adjust position
|
477 |
-
var sbi_ratio = 2;
|
478 |
-
if( $self.find('.sbi_owl2row-item').length ) sbi_ratio = 1;
|
479 |
-
|
480 |
-
var sbi_arrows_top = ($self.find('.sbi_photo').eq(0).innerWidth()/sbi_ratio);
|
481 |
-
sbi_arrows_top += parseInt(imagepadding)*(2+(2-sbi_ratio));
|
482 |
-
$self.find('.sbi-owl-nav div').css('top', sbi_arrows_top);
|
483 |
-
}, 100);
|
484 |
-
}
|
485 |
-
|
486 |
-
},
|
487 |
-
maybeRaiseSingleImageResolution: function ($item, index, forceChange) {
|
488 |
-
var feed = this,
|
489 |
-
imgSrcSet = feed.getImageUrls($item),
|
490 |
-
currentUrl = $item.find('.sbi_photo img').attr('src'),
|
491 |
-
currentRes = 150,
|
492 |
-
imagEl = $item.find('img').get(0),
|
493 |
-
aspectRatio = currentUrl === window.sbi.options.placeholder ? 1 : imagEl.naturalWidth/imagEl.naturalHeight,
|
494 |
-
forceChange = typeof forceChange !== 'undefined' ? forceChange : false;
|
495 |
-
|
496 |
-
$.each(imgSrcSet, function (index, value) {
|
497 |
-
if (value === currentUrl) {
|
498 |
-
currentRes = parseInt(index);
|
499 |
-
// If the image has already been changed to an existing real source, don't force the change
|
500 |
-
forceChange = false;
|
501 |
-
}
|
502 |
-
});
|
503 |
-
//Image res
|
504 |
-
var newRes = 640;
|
505 |
-
switch (feed.settings.imgRes) {
|
506 |
-
case 'thumb':
|
507 |
-
newRes = 150;
|
508 |
-
break;
|
509 |
-
case 'medium':
|
510 |
-
newRes = 320;
|
511 |
-
break;
|
512 |
-
case 'full':
|
513 |
-
newRes = 640;
|
514 |
-
break;
|
515 |
-
default:
|
516 |
-
var minImageWidth = Math.max(feed.settings.autoMinRes,$item.find('.sbi_photo').innerWidth()),
|
517 |
-
thisImageReplace = feed.getBestResolutionForAuto(minImageWidth, aspectRatio, $item);
|
518 |
-
switch (thisImageReplace) {
|
519 |
-
case 320:
|
520 |
-
newRes = 320;
|
521 |
-
break;
|
522 |
-
case 150:
|
523 |
-
newRes = 150;
|
524 |
-
break;
|
525 |
-
}
|
526 |
-
break;
|
527 |
-
}
|
528 |
-
|
529 |
-
if (newRes > currentRes || currentUrl === window.sbi.options.placeholder || forceChange) {
|
530 |
-
if (feed.settings.debugEnabled) {
|
531 |
-
var reason = currentUrl === window.sbi.options.placeholder ? 'was placeholder' : 'too small';
|
532 |
-
console.log('rais res for ' + currentUrl, reason);
|
533 |
-
}
|
534 |
-
var newUrl = imgSrcSet[newRes].split("?ig_cache_key")[0];
|
535 |
-
$item.find('.sbi_photo img').attr('src', newUrl);
|
536 |
-
$item.find('.sbi_photo').css('background-image', 'url("' + newUrl + '")');
|
537 |
-
|
538 |
-
var checked = false;
|
539 |
-
$item.find('.sbi_photo img').on('load', function () {
|
540 |
-
|
541 |
-
var $this_image = $(this);
|
542 |
-
var newAspectRatio = ($this_image.get(0).naturalWidth / $this_image.get(0).naturalHeight);
|
543 |
-
|
544 |
-
if ($this_image.get(0).naturalWidth !== 1000 && newAspectRatio > aspectRatio && !checked) {
|
545 |
-
if (feed.settings.debugEnabled) {
|
546 |
-
console.log('rais res again for aspect ratio change ' + currentUrl);
|
547 |
-
}
|
548 |
-
checked = true;
|
549 |
-
minImageWidth = $item.find('.sbi_photo').innerWidth();
|
550 |
-
thisImageReplace = feed.getBestResolutionForAuto(minImageWidth, newAspectRatio, $item);
|
551 |
-
newRes = 640;
|
552 |
-
|
553 |
-
switch (thisImageReplace) {
|
554 |
-
case 320:
|
555 |
-
newRes = 320;
|
556 |
-
break;
|
557 |
-
case 150:
|
558 |
-
newRes = 150;
|
559 |
-
break;
|
560 |
-
}
|
561 |
-
|
562 |
-
if (newRes > currentRes) {
|
563 |
-
newUrl = imgSrcSet[newRes].split("?ig_cache_key")[0];
|
564 |
-
$this_image.attr('src', newUrl);
|
565 |
-
$this_image.closest('.sbi_photo').css('background-image', 'url("' + newUrl + '")');
|
566 |
-
}
|
567 |
-
if (feed.layout === 'masonry' || feed.layout === 'highlight') {
|
568 |
-
$(feed.el).find('#sbi_images').smashotope(feed.isotopeArgs);
|
569 |
-
setTimeout(function() {
|
570 |
-
$(feed.el).find('#sbi_images').smashotope(feed.isotopeArgs);
|
571 |
-
},500)
|
572 |
-
}
|
573 |
-
} else {
|
574 |
-
if (feed.settings.debugEnabled) {
|
575 |
-
var reason = checked ? 'already checked' : 'no aspect ratio change';
|
576 |
-
console.log('not raising res for replacement ' + currentUrl, reason);
|
577 |
-
}
|
578 |
-
}
|
579 |
-
});
|
580 |
-
|
581 |
-
}
|
582 |
-
|
583 |
-
$item.find('img').on('error', function () {
|
584 |
-
if (!$(this).hasClass('sbi_img_error')) {
|
585 |
-
$(this).addClass('sbi_img_error');
|
586 |
-
var sourceFromAPI = ($(this).attr('src').indexOf('media?size=') > -1 || $(this).attr('src').indexOf('cdninstagram') > -1 || $(this).attr('src').indexOf('fbcdn') > -1)
|
587 |
-
|
588 |
-
if (!sourceFromAPI) {
|
589 |
-
if (typeof $(this).closest('.sbi_photo').attr('data-full-res') !== 'undefined') {
|
590 |
-
$(this).attr('src', $(this).closest('.sbi_photo').attr('data-full-res'));
|
591 |
-
$(this).closest('.sbi_photo').css('background-image', 'url(' + $(this).closest('.sbi_photo').attr('data-full-res') + ')');
|
592 |
-
} else if ($(this).closest('.sbi_photo').attr('href') !== 'undefined') {
|
593 |
-
$(this).attr('src', $(this).closest('.sbi_photo').attr('href') + 'media?size=l');
|
594 |
-
$(this).closest('.sbi_photo').css('background-image', 'url(' + $(this).closest('.sbi_photo').attr('href') + 'media?size=l)');
|
595 |
-
}
|
596 |
-
} else {
|
597 |
-
feed.settings.favorLocal = true;
|
598 |
-
var srcSet = feed.getImageUrls($(this).closest('.sbi_item'));
|
599 |
-
if (typeof srcSet[640] !== 'undefined') {
|
600 |
-
$(this).attr('src', srcSet[640]);
|
601 |
-
$(this).closest('.sbi_photo').css('background-image', 'url(' + srcSet[640] + ')');
|
602 |
-
}
|
603 |
-
}
|
604 |
-
setTimeout(function() {
|
605 |
-
feed.afterResize();
|
606 |
-
}, 1500)
|
607 |
-
} else {
|
608 |
-
console.log('unfixed error ' + $(this).attr('src'));
|
609 |
-
}
|
610 |
-
});
|
611 |
-
},
|
612 |
-
maybeRaiseImageResolution: function (justNew) {
|
613 |
-
var feed = this,
|
614 |
-
itemsSelector = typeof justNew !== 'undefined' && justNew === true ? '.sbi_item.sbi_new' : '.sbi_item',
|
615 |
-
forceChange = !feed.isInitialized ? true : false;
|
616 |
-
$(feed.el).find(itemsSelector).each(function (index) {
|
617 |
-
if (!$(this).hasClass('sbi_num_diff_hide')
|
618 |
-
&& $(this).find('.sbi_photo').length
|
619 |
-
&& typeof $(this).find('.sbi_photo').attr('data-img-src-set') !== 'undefined') {
|
620 |
-
feed.maybeRaiseSingleImageResolution($(this),index,forceChange);
|
621 |
-
}
|
622 |
-
}); //End .sbi_item each
|
623 |
-
feed.isInitialized = true;
|
624 |
-
},
|
625 |
-
getBestResolutionForAuto: function(colWidth, aspectRatio, $item) {
|
626 |
-
if (isNaN(aspectRatio) || aspectRatio < 1) {
|
627 |
-
aspectRatio = 1;
|
628 |
-
}
|
629 |
-
var bestWidth = colWidth * aspectRatio,
|
630 |
-
bestWidthRounded = Math.ceil(bestWidth / 10) * 10,
|
631 |
-
customSizes = [150, 320, 640];
|
632 |
-
|
633 |
-
if ($item.hasClass('sbi_highlighted')) {
|
634 |
-
bestWidthRounded = bestWidthRounded *2;
|
635 |
-
}
|
636 |
-
|
637 |
-
if (customSizes.indexOf(parseInt(bestWidthRounded)) === -1) {
|
638 |
-
var done = false;
|
639 |
-
$.each(customSizes, function (index, item) {
|
640 |
-
if (item > parseInt(bestWidthRounded) && !done) {
|
641 |
-
bestWidthRounded = item;
|
642 |
-
|
643 |
-
done = true;
|
644 |
-
}
|
645 |
-
});
|
646 |
-
}
|
647 |
-
|
648 |
-
return bestWidthRounded;
|
649 |
-
},
|
650 |
-
hideExtraImagesForWidth: function() {
|
651 |
-
if (this.layout === 'carousel') {
|
652 |
-
return;
|
653 |
-
}
|
654 |
-
var $self = $(this.el),
|
655 |
-
num = typeof $self.attr('data-num') !== 'undefined' && $self.attr('data-num') !== '' ? parseInt($self.attr('data-num')) : 1,
|
656 |
-
nummobile = typeof $self.attr('data-nummobile') !== 'undefined' && $self.attr('data-nummobile') !== '' ? parseInt($self.attr('data-nummobile')) : num;
|
657 |
-
|
658 |
-
if ($(window).width() < 480) {
|
659 |
-
if (nummobile < $self.find('.sbi_item').length) {
|
660 |
-
$self.find('.sbi_item').slice(nummobile - $self.find('.sbi_item').length).addClass('sbi_num_diff_hide');
|
661 |
-
}
|
662 |
-
} else {
|
663 |
-
if (num < $self.find('.sbi_item').length) {
|
664 |
-
$self.find('.sbi_item').slice(num - $self.find('.sbi_item').length).addClass('sbi_num_diff_hide');
|
665 |
-
}
|
666 |
-
}
|
667 |
-
},
|
668 |
-
setImageSizeClass: function () {
|
669 |
-
var $self = $(this.el);
|
670 |
-
$self.removeClass('sbi_small sbi_medium');
|
671 |
-
var feedWidth = $self.innerWidth(),
|
672 |
-
photoPadding = parseInt(($self.find('#sbi_images').outerWidth() - $self.find('#sbi_images').width())) / 2,
|
673 |
-
cols = this.getColumnCount(),
|
674 |
-
feedWidthSansPadding = feedWidth - (photoPadding * (cols+2)),
|
675 |
-
colWidth = (feedWidthSansPadding / cols);
|
676 |
-
if (colWidth > 120 && colWidth < 240) {
|
677 |
-
$self.addClass('sbi_medium');
|
678 |
-
} else if (colWidth <= 120) {
|
679 |
-
$self.addClass('sbi_small');
|
680 |
-
}
|
681 |
-
},
|
682 |
-
setMinImageWidth: function () {
|
683 |
-
if ($(this.el).find('.sbi_item .sbi_photo').first().length) {
|
684 |
-
this.minImageWidth = $(this.el).find('.sbi_item .sbi_photo').first().innerWidth();
|
685 |
-
} else {
|
686 |
-
this.minImageWidth = 150;
|
687 |
-
}
|
688 |
-
},
|
689 |
-
setImageResolution: function () {
|
690 |
-
if (this.settings.imgRes === 'auto') {
|
691 |
-
this.imageResolution = 'auto';
|
692 |
-
} else {
|
693 |
-
switch (this.settings.imgRes) {
|
694 |
-
case 'thumb':
|
695 |
-
this.imageResolution = 150;
|
696 |
-
break;
|
697 |
-
case 'medium':
|
698 |
-
this.imageResolution = 320;
|
699 |
-
break;
|
700 |
-
default:
|
701 |
-
this.imageResolution = 640;
|
702 |
-
}
|
703 |
-
}
|
704 |
-
},
|
705 |
-
getImageUrls: function ($item) {
|
706 |
-
var srcSet = JSON.parse($item.find('.sbi_photo').attr('data-img-src-set').replace(/\\\//g, '/')),
|
707 |
-
id = $item.attr('id').replace('sbi_', '');
|
708 |
-
if (typeof this.resizedImages[id] !== 'undefined'
|
709 |
-
&& this.resizedImages[id] !== 'video'
|
710 |
-
&& this.resizedImages[id] !== 'pending'
|
711 |
-
&& this.resizedImages[id].id !== 'error'
|
712 |
-
&& this.resizedImages[id].id !== 'video'
|
713 |
-
&& this.resizedImages[id].id !== 'pending') {
|
714 |
-
if (typeof this.resizedImages[id]['sizes'] !== 'undefined') {
|
715 |
-
var foundSizes = [];
|
716 |
-
if (typeof this.resizedImages[id]['sizes']['full'] !== 'undefined') {
|
717 |
-
foundSizes.push(640);
|
718 |
-
srcSet[640] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'full.jpg';
|
719 |
-
$item.find('.sbi_link_area').attr( 'href', sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'full.jpg' );
|
720 |
-
$item.find('.sbi_photo').attr( 'data-full-res', sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'full.jpg' );
|
721 |
-
}
|
722 |
-
if (typeof this.resizedImages[id]['sizes']['low'] !== 'undefined') {
|
723 |
-
foundSizes.push(320);
|
724 |
-
srcSet[320] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'low.jpg';
|
725 |
-
if (this.settings.favorLocal && typeof this.resizedImages[id]['sizes']['full'] === 'undefined') {
|
726 |
-
$item.find('.sbi_link_area').attr( 'href', sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'low.jpg' );
|
727 |
-
$item.find('.sbi_photo').attr( 'data-full-res', sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'low.jpg' );
|
728 |
-
}
|
729 |
-
}
|
730 |
-
if (typeof this.resizedImages[id]['sizes']['thumb'] !== 'undefined') {
|
731 |
-
foundSizes.push(150);
|
732 |
-
srcSet[150] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'thumb.jpg';
|
733 |
-
}
|
734 |
-
if (this.settings.favorLocal) {
|
735 |
-
if (foundSizes.indexOf(640) === -1) {
|
736 |
-
if (foundSizes.indexOf(320) > -1) {
|
737 |
-
srcSet[640] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'low.jpg';
|
738 |
-
}
|
739 |
-
}
|
740 |
-
if (foundSizes.indexOf(320) === -1) {
|
741 |
-
if (foundSizes.indexOf(640) > -1) {
|
742 |
-
srcSet[320] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'full.jpg';
|
743 |
-
} else if (foundSizes.indexOf(150) > -1) {
|
744 |
-
srcSet[320] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'thumb.jpg';
|
745 |
-
}
|
746 |
-
}
|
747 |
-
if (foundSizes.indexOf(150) === -1) {
|
748 |
-
if (foundSizes.indexOf(320) > -1) {
|
749 |
-
srcSet[150] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'low.jpg';
|
750 |
-
} else if (foundSizes.indexOf(640) > -1) {
|
751 |
-
srcSet[150] = sb_instagram_js_options.resized_url + this.resizedImages[id].id + 'full.jpg';
|
752 |
-
}
|
753 |
-
}
|
754 |
-
}
|
755 |
-
}
|
756 |
-
} else if (typeof this.resizedImages[id] === 'undefined'
|
757 |
-
|| this.resizedImages[id] !== 'pending') {
|
758 |
-
this.addToNeedsResizing(id);
|
759 |
-
}
|
760 |
-
|
761 |
-
return srcSet;
|
762 |
-
},
|
763 |
-
getAvatarUrl: function (username,favorType) {
|
764 |
-
if (username === '') {
|
765 |
-
return '';
|
766 |
-
}
|
767 |
-
|
768 |
-
var availableAvatars = this.settings.general.avatars,
|
769 |
-
favorType = typeof favorType !== 'undefined' ? favorType : 'local';
|
770 |
-
|
771 |
-
if (favorType === 'local') {
|
772 |
-
if (typeof availableAvatars['LCL'+username] !== 'undefined' && parseInt(availableAvatars['LCL'+username]) === 1) {
|
773 |
-
return sb_instagram_js_options.resized_url + username + '.jpg';
|
774 |
-
} else if (typeof availableAvatars[username] !== 'undefined') {
|
775 |
-
return availableAvatars[username];
|
776 |
-
} else {
|
777 |
-
return '';
|
778 |
-
}
|
779 |
-
} else {
|
780 |
-
if (typeof availableAvatars[username] !== 'undefined') {
|
781 |
-
return availableAvatars[username];
|
782 |
-
} else if (typeof availableAvatars['LCL'+username] !== 'undefined' && parseInt(availableAvatars['LCL'+username]) === 1) {
|
783 |
-
return sb_instagram_js_options.resized_url + username + '.jpg';
|
784 |
-
} else {
|
785 |
-
return '';
|
786 |
-
}
|
787 |
-
}
|
788 |
-
},
|
789 |
-
addToNeedsResizing: function (id) {
|
790 |
-
if (this.needsResizing.indexOf(id) === -1) {
|
791 |
-
this.needsResizing.push(id);
|
792 |
-
}
|
793 |
-
},
|
794 |
-
applyImageLiquid: function () {
|
795 |
-
var $self = $(this.el),
|
796 |
-
feed = this;
|
797 |
-
sbiAddImgLiquid();
|
798 |
-
if (typeof $self.find(".sbi_photo").sbi_imgLiquid == 'function') {
|
799 |
-
$self.find(".sbi_photo").sbi_imgLiquid({fill: true});
|
800 |
-
}
|
801 |
-
},
|
802 |
-
listenForVisibilityChange: function() {
|
803 |
-
var feed = this;
|
804 |
-
sbiAddVisibilityListener();
|
805 |
-
if (typeof $(this.el).filter(':hidden').sbiVisibilityChanged == 'function') {
|
806 |
-
//If the feed is initially hidden (in a tab for example) then check for when it becomes visible and set then set the height
|
807 |
-
$(this.el).filter(':hidden').sbiVisibilityChanged({
|
808 |
-
callback: function (element, visible) {
|
809 |
-
feed.afterResize();
|
810 |
-
},
|
811 |
-
runOnLoad: false
|
812 |
-
});
|
813 |
-
}
|
814 |
-
},
|
815 |
-
getColumnCount: function() {
|
816 |
-
var $self = $(this.el),
|
817 |
-
cols = this.settings.cols,
|
818 |
-
colsmobile = this.settings.colsmobile,
|
819 |
-
returnCols = cols;
|
820 |
-
|
821 |
-
sbiWindowWidth = window.innerWidth;
|
822 |
-
|
823 |
-
if ($self.hasClass('sbi_mob_col_auto')) {
|
824 |
-
if (sbiWindowWidth < 640 && (parseInt(cols) > 2 && parseInt(cols) < 7)) returnCols = 2;
|
825 |
-
if (sbiWindowWidth < 640 && (parseInt(cols) > 6 && parseInt(cols) < 11)) returnCols = 4;
|
826 |
-
if (sbiWindowWidth <= 480 && parseInt(cols) > 2) returnCols = 1;
|
827 |
-
} else if (sbiWindowWidth <= 480) {
|
828 |
-
returnCols = colsmobile;
|
829 |
-
}
|
830 |
-
|
831 |
-
return parseInt(returnCols);
|
832 |
-
}
|
833 |
-
};
|
834 |
-
|
835 |
-
window.sbi_init = function() {
|
836 |
-
window.sbi = new Sbi();
|
837 |
-
window.sbi.createPage( window.sbi.createFeeds, {whenFeedsCreated: window.sbi.afterFeedsCreated});
|
838 |
-
};
|
839 |
-
|
840 |
-
function sbiGetNewFeed(feed,index,feedOptions) {
|
841 |
-
return new SbiFeed(feed,index,feedOptions);
|
842 |
-
}
|
843 |
-
|
844 |
-
function sbiAjax(submitData,onSuccess) {
|
845 |
-
$.ajax({
|
846 |
-
url: sbiajaxurl,
|
847 |
-
type: 'post',
|
848 |
-
data: submitData,
|
849 |
-
success: onSuccess
|
850 |
-
});
|
851 |
-
}
|
852 |
-
|
853 |
-
})(jQuery);
|
854 |
-
|
855 |
-
jQuery(document).ready(function($) {
|
856 |
-
if (typeof window.sb_instagram_js_options.resized_url !== 'undefined' && window.sb_instagram_js_options.resized_url.indexOf(location.protocol) === -1) {
|
857 |
-
if (location.protocol === 'http:') {
|
858 |
-
window.sb_instagram_js_options.resized_url = window.sb_instagram_js_options.resized_url.replace('http:','https:');
|
859 |
-
} else {
|
860 |
-
window.sb_instagram_js_options.resized_url = window.sb_instagram_js_options.resized_url.replace('https:','http:');
|
861 |
-
}
|
862 |
-
}
|
863 |
-
sbi_init();
|
864 |
-
});
|
865 |
-
|
866 |
-
} // if sbi_js_exists
|
1 |
+
var sbi_js_exists=void 0!==sbi_js_exists;sbi_js_exists||(!function(i){function e(){var i,e,s,t=t||{VER:"0.9.944"};t.bgs_Available=!1,t.bgs_CheckRunned=!1,function(i){i.fn.extend({sbi_imgLiquid:function(e){this.defaults={fill:!0,verticalAlign:"center",horizontalAlign:"center",useBackgroundSize:!0,useDataHtmlAttr:!0,responsive:!0,delay:0,fadeInTime:0,removeBoxBackground:!0,hardPixels:!0,responsiveCheckTime:500,timecheckvisibility:500,onStart:null,onFinish:null,onItemStart:null,onItemFinish:null,onItemError:null},function(){if(!t.bgs_CheckRunned){t.bgs_CheckRunned=!0;var e=i('<span style="background-size:cover" />');i("body").append(e),function(){var i=e[0];if(i&&window.getComputedStyle){var s=window.getComputedStyle(i,null);s&&s.backgroundSize&&(t.bgs_Available="cover"===s.backgroundSize)}}(),e.remove()}}();var s=this;return this.options=e,this.settings=i.extend({},this.defaults,this.options),this.settings.onStart&&this.settings.onStart(),this.each(function(e){function a(){(r.responsive||h.data("sbi_imgLiquid_oldProcessed"))&&h.data("sbi_imgLiquid_settings")&&(r=h.data("sbi_imgLiquid_settings"),l.actualSize=l.get(0).offsetWidth+l.get(0).offsetHeight/1e4,l.sizeOld&&l.actualSize!==l.sizeOld&&o(),l.sizeOld=l.actualSize,setTimeout(a,r.responsiveCheckTime))}function n(){h.data("sbi_imgLiquid_error",!0),l.addClass("sbi_imgLiquid_error"),r.onItemError&&r.onItemError(e,l,h),d()}function o(){var i,s,t,a,n,o,g,u,m=0,f=0,_=l.width(),c=l.height();void 0===h.data("owidth")&&h.data("owidth",h[0].width),void 0===h.data("oheight")&&h.data("oheight",h[0].height),r.fill===_/c>=h.data("owidth")/h.data("oheight")?(i="100%",s="auto",t=Math.floor(_),a=Math.floor(_*(h.data("oheight")/h.data("owidth")))):(i="auto",s="100%",t=Math.floor(c*(h.data("owidth")/h.data("oheight"))),a=Math.floor(c)),g=_-t,"left"===(n=r.horizontalAlign.toLowerCase())&&(f=0),"center"===n&&(f=.5*g),"right"===n&&(f=g),-1!==n.indexOf("%")&&((n=parseInt(n.replace("%",""),10))>0&&(f=g*n*.01)),u=c-a,"left"===(o=r.verticalAlign.toLowerCase())&&(m=0),"center"===o&&(m=.5*u),"bottom"===o&&(m=u),-1!==o.indexOf("%")&&((o=parseInt(o.replace("%",""),10))>0&&(m=u*o*.01)),r.hardPixels&&(i=t,s=a),h.css({width:i,height:s,"margin-left":Math.floor(f),"margin-top":Math.floor(m)}),h.data("sbi_imgLiquid_oldProcessed")||(h.fadeTo(r.fadeInTime,1),h.data("sbi_imgLiquid_oldProcessed",!0),r.removeBoxBackground&&l.css("background-image","none"),l.addClass("sbi_imgLiquid_nobgSize"),l.addClass("sbi_imgLiquid_ready")),r.onItemFinish&&r.onItemFinish(e,l,h),d()}function d(){e===s.length-1&&s.settings.onFinish&&s.settings.onFinish()}var r=s.settings,l=i(this),h=i("img:first",l);return h.length?(h.data("sbi_imgLiquid_settings")?(l.removeClass("sbi_imgLiquid_error").removeClass("sbi_imgLiquid_ready"),r=i.extend({},h.data("sbi_imgLiquid_settings"),s.options)):r=i.extend({},s.settings,function(){var i={};if(s.settings.useDataHtmlAttr){var e=l.attr("data-sbi_imgLiquid-fill"),a=l.attr("data-sbi_imgLiquid-horizontalAlign"),n=l.attr("data-sbi_imgLiquid-verticalAlign");("true"===e||"false"===e)&&(i.fill=Boolean("true"===e)),void 0===a||"left"!==a&&"center"!==a&&"right"!==a&&-1===a.indexOf("%")||(i.horizontalAlign=a),void 0===n||"top"!==n&&"bottom"!==n&&"center"!==n&&-1===n.indexOf("%")||(i.verticalAlign=n)}return t.isIE&&s.settings.ieFadeInDisabled&&(i.fadeInTime=0),i}()),h.data("sbi_imgLiquid_settings",r),r.onItemStart&&r.onItemStart(e,l,h),void(t.bgs_Available&&r.useBackgroundSize?(-1===l.css("background-image").indexOf(encodeURI(h.attr("src")))&&l.css({"background-image":'url("'+encodeURI(h.attr("src"))+'")'}),l.css({"background-size":r.fill?"cover":"contain","background-position":(r.horizontalAlign+" "+r.verticalAlign).toLowerCase(),"background-repeat":"no-repeat"}),i("a:first",l).css({display:"block",width:"100%",height:"100%"}),i("img",l).css({display:"none"}),r.onItemFinish&&r.onItemFinish(e,l,h),l.addClass("sbi_imgLiquid_bgSize"),l.addClass("sbi_imgLiquid_ready"),d()):function s(){if(h.data("oldSrc")&&h.data("oldSrc")!==h.attr("src")){var t=h.clone().removeAttr("style");return t.data("sbi_imgLiquid_settings",h.data("sbi_imgLiquid_settings")),h.parent().prepend(t),h.remove(),(h=t)[0].width=0,void setTimeout(s,10)}return h.data("sbi_imgLiquid_oldProcessed")?void o():(h.data("sbi_imgLiquid_oldProcessed",!1),h.data("oldSrc",h.attr("src")),i("img:not(:first)",l).css("display","none"),l.css({overflow:"hidden"}),h.fadeTo(0,0).removeAttr("width").removeAttr("height").css({visibility:"visible","max-width":"none","max-height":"none",width:"auto",height:"auto",display:"block"}),h.on("error",n),h[0].onerror=n,function i(){h.data("sbi_imgLiquid_error")||h.data("sbi_imgLiquid_loaded")||h.data("sbi_imgLiquid_oldProcessed")||(l.is(":visible")&&h[0].complete&&h[0].width>0&&h[0].height>0?(h.data("sbi_imgLiquid_loaded",!0),setTimeout(o,e*r.delay)):setTimeout(i,r.timecheckvisibility))}(),void a())}())):void n()})}})}(jQuery),i=t.injectCss,e=document.getElementsByTagName("head")[0],(s=document.createElement("style")).type="text/css",s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i)),e.appendChild(s)}function s(){this.feeds={},this.options=sb_instagram_js_options}function t(i,e,s){this.el=i,this.index=e,this.settings=s,this.minImageWidth=0,this.imageResolution=150,this.resizedImages={},this.needsResizing=[],this.outOfPages=!1,this.isInitialized=!1}function a(e,s){i.ajax({url:sbiajaxurl,type:"post",data:e,success:s})}s.prototype={createPage:function(e,s){void 0!==window.sbiajaxurl&&-1!==window.sbiajaxurl.indexOf(window.location.hostname)||(window.sbiajaxurl=window.location.hostname+"/wp-admin/admin-ajax.php"),i(".sbi_no_js_error_message").remove(),i(".sbi_no_js").removeClass("sbi_no_js"),e(s)},createFeeds:function(e){e.whenFeedsCreated(i(".sbi").each(function(e){i(this).attr("data-sbi-index",e+1);var s=i(this),n=void 0!==s.attr("data-sbi-flags")?s.attr("data-sbi-flags").split(","):[],o=void 0!==s.attr("data-options")?JSON.parse(s.attr("data-options")):{};if(n.indexOf("testAjax")>-1){window.sbi.triggeredTest=!0;a({action:"sbi_on_ajax_test_trigger"},function(i){console.log("did test")})}var d={cols:s.attr("data-cols"),colsmobile:"same"!==s.attr("data-colsmobile")?s.attr("data-colsmobile"):s.attr("data-cols"),num:s.attr("data-num"),imgRes:s.attr("data-res"),feedID:s.attr("data-feedid"),shortCodeAtts:s.attr("data-shortcode-atts"),resizingEnabled:-1===n.indexOf("resizeDisable"),imageLoadEnabled:-1===n.indexOf("imageLoadDisable"),debugEnabled:n.indexOf("debug")>-1,favorLocal:n.indexOf("favorLocal")>-1,ajaxPostLoad:n.indexOf("ajaxPostLoad")>-1,autoMinRes:1,general:o};window.sbi.feeds[e]=function(i,e,s){return new t(i,e,s)}(this,e,d),window.sbi.feeds[e].setResizedImages(),window.sbi.feeds[e].init();var r=jQuery.Event("sbiafterfeedcreate");r.feed=window.sbi.feeds[e],jQuery(window).trigger(r)}))},afterFeedsCreated:function(){i(".sb_instagram_header").each(function(){var e=i(this);e.find(".sbi_header_link").hover(function(){e.find(".sbi_header_img_hover").addClass("sbi_fade_in")},function(){e.find(".sbi_header_img_hover").removeClass("sbi_fade_in")})})},encodeHTML:function(i){return void 0===i?"":i.replace(/(>)/g,">").replace(/(<)/g,"<").replace(/(<br\/>)/g,"<br>").replace(/(<br>)/g,"<br>")},urlDetect:function(i){return i.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)/g)}},t.prototype={init:function(){var i=this;this.settings.ajaxPostLoad?this.getNewPostSet():this.afterInitialImagesLoaded();var e,s=(e=0,function(i,s){clearTimeout(e),e=setTimeout(i,s)});jQuery(window).resize(function(){s(function(){i.afterResize()},500)})},initLayout:function(){},afterInitialImagesLoaded:function(){this.initLayout(),this.loadMoreButtonInit(),this.hideExtraImagesForWidth(),this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed()},afterResize:function(){this.setImageHeight(),this.setImageResolution(),this.maybeRaiseImageResolution(),this.setImageSizeClass()},afterLoadMoreClicked:function(i){i.find(".sbi_loader").removeClass("sbi_hidden"),i.find(".sbi_btn_text").addClass("sbi_hidden"),i.closest(".sbi").find(".sbi_num_diff_hide").addClass("sbi_transition").removeClass("sbi_num_diff_hide")},afterNewImagesLoaded:function(){var e=i(this.el),s=this;this.beforeNewImagesRevealed(),this.revealNewImages(),this.afterNewImagesRevealed(),setTimeout(function(){e.find(".sbi_loader").addClass("sbi_hidden"),e.find(".sbi_btn_text").removeClass("sbi_hidden"),s.maybeRaiseImageResolution()},500)},beforeNewImagesRevealed:function(){this.setImageHeight(),this.maybeRaiseImageResolution(!0),this.setImageSizeClass()},revealNewImages:function(){var e=i(this.el);"function"==typeof sbi_custom_js&&setTimeout(function(){sbi_custom_js()},100),this.applyImageLiquid(),e.find(".sbi_item").each(function(i){jQuery(this).find(".sbi_photo").hover(function(){jQuery(this).fadeTo(200,.85)},function(){jQuery(this).stop().fadeTo(500,1)})}),setTimeout(function(){jQuery("#sbi_images .sbi_item.sbi_new").removeClass("sbi_new");var i=10;e.find(".sbi_transition").each(function(){var e=jQuery(this);setTimeout(function(){e.removeClass("sbi_transition")},i),i+=10})},500)},afterNewImagesRevealed:function(){this.listenForVisibilityChange(),this.sendNeedsResizingToServer(),this.settings.imageLoadEnabled||i(".sbi_no_resraise").removeClass("sbi_no_resraise");var e=i.Event("sbiafterimagesloaded");e.el=i(this.el),i(window).trigger(e)},setResizedImages:function(){i(this.el).find(".sbi_resized_image_data").length&&void 0!==i(this.el).find(".sbi_resized_image_data").attr("data-resized")&&0===i(this.el).find(".sbi_resized_image_data").attr("data-resized").indexOf('{"')&&(this.resizedImages=JSON.parse(i(this.el).find(".sbi_resized_image_data").attr("data-resized")),i(this.el).find(".sbi_resized_image_data").remove())},sendNeedsResizingToServer:function(){var e=this;if(e.needsResizing.length>0&&e.settings.resizingEnabled){var s=i(this.el).find(".sbi_item").length;a({action:"sbi_resized_images_submit",needs_resizing:e.needsResizing,offset:s,feed_id:e.settings.feedID,atts:e.settings.shortCodeAtts},function(i){if(0===i.trim().indexOf("{")){var s=JSON.parse(i);e.settings.debugEnabled&&console.log(s)}})}},loadMoreButtonInit:function(){var e=i(this.el),s=this;e.find("#sbi_load .sbi_load_btn").off().on("click",function(){s.afterLoadMoreClicked(jQuery(this)),s.getNewPostSet()})},getNewPostSet:function(){var e=i(this.el),s=this;a({action:"sbi_load_more_clicked",offset:e.find(".sbi_item").length,feed_id:s.settings.feedID,atts:s.settings.shortCodeAtts,current_resolution:s.imageResolution},function(t){if(0===t.trim().indexOf("{")){var a=JSON.parse(t);s.settings.debugEnabled&&console.log(a),s.appendNewPosts(a.html),s.addResizedImages(a.resizedImages),s.settings.ajaxPostLoad?(s.settings.ajaxPostLoad=!1,s.afterInitialImagesLoaded()):s.afterNewImagesLoaded(),a.feedStatus.shouldPaginate?s.outOfPages=!1:(s.outOfPages=!0,e.find(".sbi_load_btn").hide()),i(".sbi_no_js").removeClass("sbi_no_js")}})},appendNewPosts:function(e){var s=i(this.el);s.find("#sbi_images .sbi_item").length?s.find("#sbi_images .sbi_item").last().after(e):s.find("#sbi_images").append(e)},addResizedImages:function(i){for(var e in i)this.resizedImages[e]=i[e]},setImageHeight:function(){var e=i(this.el),s=e.find(".sbi_photo").eq(0).innerWidth(),t=this.getColumnCount(),a=e.find("#sbi_images").innerWidth()-e.find("#sbi_images").width(),n=a/2;sbi_photo_width_manual=e.find("#sbi_images").width()/t-a,e.find(".sbi_photo").css("height",s),e.find(".sbi-owl-nav").length&&setTimeout(function(){var i=2;e.find(".sbi_owl2row-item").length&&(i=1);var s=e.find(".sbi_photo").eq(0).innerWidth()/i;s+=parseInt(n)*(2-i+2),e.find(".sbi-owl-nav div").css("top",s)},100)},maybeRaiseSingleImageResolution:function(e,s,t){var a=this,n=a.getImageUrls(e),o=e.find(".sbi_photo img").attr("src"),d=150,r=e.find("img").get(0),l=o===window.sbi.options.placeholder?1:r.naturalWidth/r.naturalHeight;t=void 0!==t&&t;if(!e.hasClass("sbi_no_resraise")){i.each(n,function(i,e){e===o&&(d=parseInt(i),t=!1)});var h=640;switch(a.settings.imgRes){case"thumb":h=150;break;case"medium":h=320;break;case"full":h=640;break;default:var g=Math.max(a.settings.autoMinRes,e.find(".sbi_photo").innerWidth()),u=a.getBestResolutionForAuto(g,l,e);switch(u){case 320:h=320;break;case 150:h=150}}if(h>d||o===window.sbi.options.placeholder||t){if(a.settings.debugEnabled){var m=o===window.sbi.options.placeholder?"was placeholder":"too small";console.log("rais res for "+o,m)}var f=n[h].split("?ig_cache_key")[0];e.find(".sbi_photo img").attr("src",f),e.find(".sbi_photo").css("background-image",'url("'+f+'")');var _=!1;e.find(".sbi_photo img").on("load",function(){var s=i(this),t=s.get(0).naturalWidth/s.get(0).naturalHeight;if(1e3!==s.get(0).naturalWidth&&t>l&&!_){switch(a.settings.debugEnabled&&console.log("rais res again for aspect ratio change "+o),_=!0,g=e.find(".sbi_photo").innerWidth(),u=a.getBestResolutionForAuto(g,t,e),h=640,u){case 320:h=320;break;case 150:h=150}h>d&&(f=n[h].split("?ig_cache_key")[0],s.attr("src",f),s.closest(".sbi_photo").css("background-image",'url("'+f+'")')),"masonry"!==a.layout&&"highlight"!==a.layout||(i(a.el).find("#sbi_images").smashotope(a.isotopeArgs),setTimeout(function(){i(a.el).find("#sbi_images").smashotope(a.isotopeArgs)},500))}else if(a.settings.debugEnabled){var r=_?"already checked":"no aspect ratio change";console.log("not raising res for replacement "+o,r)}})}e.find("img").on("error",function(){if(i(this).hasClass("sbi_img_error"))console.log("unfixed error "+i(this).attr("src"));else{if(i(this).addClass("sbi_img_error"),i(this).attr("src").indexOf("media?size=")>-1||i(this).attr("src").indexOf("cdninstagram")>-1||i(this).attr("src").indexOf("fbcdn")>-1){a.settings.favorLocal=!0;var e=a.getImageUrls(i(this).closest(".sbi_item"));void 0!==e[640]&&(i(this).attr("src",e[640]),i(this).closest(".sbi_photo").css("background-image","url("+e[640]+")"))}else void 0!==i(this).closest(".sbi_photo").attr("data-full-res")?(i(this).attr("src",i(this).closest(".sbi_photo").attr("data-full-res")),i(this).closest(".sbi_photo").css("background-image","url("+i(this).closest(".sbi_photo").attr("data-full-res")+")")):"undefined"!==i(this).closest(".sbi_photo").attr("href")&&(i(this).attr("src",i(this).closest(".sbi_photo").attr("href")+"media?size=l"),i(this).closest(".sbi_photo").css("background-image","url("+i(this).closest(".sbi_photo").attr("href")+"media?size=l)"));setTimeout(function(){a.afterResize()},1500)}})}},maybeRaiseImageResolution:function(e){var s=this,t=void 0!==e&&!0===e?".sbi_item.sbi_new":".sbi_item",a=!s.isInitialized;i(s.el).find(t).each(function(e){!i(this).hasClass("sbi_num_diff_hide")&&i(this).find(".sbi_photo").length&&void 0!==i(this).find(".sbi_photo").attr("data-img-src-set")&&s.maybeRaiseSingleImageResolution(i(this),e,a)}),s.isInitialized=!0},getBestResolutionForAuto:function(e,s,t){(isNaN(s)||s<1)&&(s=1);var a=e*s,n=10*Math.ceil(a/10),o=[150,320,640];if(t.hasClass("sbi_highlighted")&&(n*=2),-1===o.indexOf(parseInt(n))){var d=!1;i.each(o,function(i,e){e>parseInt(n)&&!d&&(n=e,d=!0)})}return n},hideExtraImagesForWidth:function(){if("carousel"!==this.layout){var e=i(this.el),s=void 0!==e.attr("data-num")&&""!==e.attr("data-num")?parseInt(e.attr("data-num")):1,t=void 0!==e.attr("data-nummobile")&&""!==e.attr("data-nummobile")?parseInt(e.attr("data-nummobile")):s;i(window).width()<480?t<e.find(".sbi_item").length&&e.find(".sbi_item").slice(t-e.find(".sbi_item").length).addClass("sbi_num_diff_hide"):s<e.find(".sbi_item").length&&e.find(".sbi_item").slice(s-e.find(".sbi_item").length).addClass("sbi_num_diff_hide")}},setImageSizeClass:function(){var e=i(this.el);e.removeClass("sbi_small sbi_medium");var s=e.innerWidth(),t=parseInt(e.find("#sbi_images").outerWidth()-e.find("#sbi_images").width())/2,a=this.getColumnCount(),n=(s-t*(a+2))/a;n>120&&n<240?e.addClass("sbi_medium"):n<=120&&e.addClass("sbi_small")},setMinImageWidth:function(){i(this.el).find(".sbi_item .sbi_photo").first().length?this.minImageWidth=i(this.el).find(".sbi_item .sbi_photo").first().innerWidth():this.minImageWidth=150},setImageResolution:function(){if("auto"===this.settings.imgRes)this.imageResolution="auto";else switch(this.settings.imgRes){case"thumb":this.imageResolution=150;break;case"medium":this.imageResolution=320;break;default:this.imageResolution=640}},getImageUrls:function(i){var e=JSON.parse(i.find(".sbi_photo").attr("data-img-src-set").replace(/\\\//g,"/")),s=i.attr("id").replace("sbi_","");if(void 0!==this.resizedImages[s]&&"video"!==this.resizedImages[s]&&"pending"!==this.resizedImages[s]&&"error"!==this.resizedImages[s].id&&"video"!==this.resizedImages[s].id&&"pending"!==this.resizedImages[s].id){if(void 0!==this.resizedImages[s].sizes){var t=[];void 0!==this.resizedImages[s].sizes.full&&(t.push(640),e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg",i.find(".sbi_link_area").attr("href",sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg"),i.find(".sbi_photo").attr("data-full-res",sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg")),void 0!==this.resizedImages[s].sizes.low&&(t.push(320),e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg",this.settings.favorLocal&&void 0===this.resizedImages[s].sizes.full&&(i.find(".sbi_link_area").attr("href",sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"),i.find(".sbi_photo").attr("data-full-res",sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"))),void 0!==this.resizedImages[s].sizes.thumb&&(t.push(150),e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg"),this.settings.favorLocal&&(-1===t.indexOf(640)&&t.indexOf(320)>-1&&(e[640]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg"),-1===t.indexOf(320)&&(t.indexOf(640)>-1?e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg":t.indexOf(150)>-1&&(e[320]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"thumb.jpg")),-1===t.indexOf(150)&&(t.indexOf(320)>-1?e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"low.jpg":t.indexOf(640)>-1&&(e[150]=sb_instagram_js_options.resized_url+this.resizedImages[s].id+"full.jpg")))}}else void 0!==this.resizedImages[s]&&"pending"===this.resizedImages[s]||this.addToNeedsResizing(s);return e},getAvatarUrl:function(i,e){if(""===i)return"";var s=this.settings.general.avatars;return"local"===(e=void 0!==e?e:"local")?void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":void 0!==s[i]?s[i]:"":void 0!==s[i]?s[i]:void 0!==s["LCL"+i]&&1===parseInt(s["LCL"+i])?sb_instagram_js_options.resized_url+i+".jpg":""},addToNeedsResizing:function(i){-1===this.needsResizing.indexOf(i)&&this.needsResizing.push(i)},applyImageLiquid:function(){var s=i(this.el);e(),"function"==typeof s.find(".sbi_photo").sbi_imgLiquid&&s.find(".sbi_photo").sbi_imgLiquid({fill:!0})},listenForVisibilityChange:function(){var e,s,t,a=this;e=jQuery,s={callback:function(){},runOnLoad:!0,frequency:100,sbiPreviousVisibility:null},t={sbiCheckVisibility:function(i,e){if(jQuery.contains(document,i[0])){var s=e.sbiPreviousVisibility,a=i.is(":visible");e.sbiPreviousVisibility=a,null==s?e.runOnLoad&&e.callback(i,a):s!==a&&e.callback(i,a),setTimeout(function(){t.sbiCheckVisibility(i,e)},e.frequency)}}},e.fn.sbiVisibilityChanged=function(i){var a=e.extend({},s,i);return this.each(function(){t.sbiCheckVisibility(e(this),a)})},"function"==typeof i(this.el).filter(":hidden").sbiVisibilityChanged&&i(this.el).filter(":hidden").sbiVisibilityChanged({callback:function(i,e){a.afterResize()},runOnLoad:!1})},getColumnCount:function(){var e=i(this.el),s=this.settings.cols,t=this.settings.colsmobile,a=s;return sbiWindowWidth=window.innerWidth,e.hasClass("sbi_mob_col_auto")?(sbiWindowWidth<640&&parseInt(s)>2&&parseInt(s)<7&&(a=2),sbiWindowWidth<640&&parseInt(s)>6&&parseInt(s)<11&&(a=4),sbiWindowWidth<=480&&parseInt(s)>2&&(a=1)):sbiWindowWidth<=480&&(a=t),parseInt(a)}},window.sbi_init=function(){window.sbi=new s,window.sbi.createPage(window.sbi.createFeeds,{whenFeedsCreated:window.sbi.afterFeedsCreated})}}(jQuery),jQuery(document).ready(function(i){void 0!==window.sb_instagram_js_options.resized_url&&-1===window.sb_instagram_js_options.resized_url.indexOf(location.protocol)&&("http:"===location.protocol?window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("http:","https:"):window.sb_instagram_js_options.resized_url=window.sb_instagram_js_options.resized_url.replace("https:","http:")),sbi_init()}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|