This commit is contained in:
2025-11-18 16:39:33 +00:00
parent c70394d367
commit df1f90c6cd
9673 changed files with 3464697 additions and 34 deletions
@@ -0,0 +1,944 @@
/*--------------------------------------------------------------
== General
--------------------------------------------------------------*/
.wpr-elementor-hidden-control {
overflow: hidden;
width: 0 !important;
height: 0 !important;
padding: 0 !important;
margin: 0 !important;
visibility: hidden !important;
opacity: 0 !important;
}
/*--------------------------------------------------------------
== WPR Widgets
--------------------------------------------------------------*/
.elementor-panel .wpr-icon:after {
content: 'R';
display: block;
position: absolute;
top: 3px;
right: 3px;
font-family: Roboto,Arial,Helvetica,Verdana,sans-serif;
font-size: 10px;
font-weight: bold;
color: #ffffff;
background-image: -o-linear-gradient(#6A4BFF, #7E94FE);
background-image: -webkit-gradient(linear, left top, left bottom, from(#6A4BFF), to(#7E94FE));
background-image: linear-gradient(#6A4BFF, #7E94FE);
-webkit-box-shadow: 0 0 2px 2px #b8c7ff;
box-shadow: 0 0 2px 2px #b8c7ff;
width: 19px;
height: 19px;
line-height: 19px;
border-radius: 15px;
margin: 3px;
}
.elementor-panel .elementor-element .icon {
position: relative !important;
}
.elementor-element--promotion .wpr-icon:after {
top: 22px;
right: -1px;
opacity: 0.7;
}
#elementor-element--promotion__dialog .dialog-button {
text-align: center;
}
.elementor-control-type-section[class*="elementor-control-wpr_section_"]:after {
content: 'R';
display: block;
position: absolute;
top: 7px;
right: 7px;
font-family: Roboto,Arial,Helvetica,Verdana,sans-serif;
font-size: 10px;
font-weight: bold;
color: #ffffff;
background-image: -o-linear-gradient(#6A4BFF, #7E94FE);
background-image: -webkit-gradient(linear, left top, left bottom, from(#6A4BFF), to(#7E94FE));
background-image: linear-gradient(#6A4BFF, #7E94FE);
-webkit-box-shadow: 0 0 2px 2px #b8c7ff;
box-shadow: 0 0 2px 2px #b8c7ff;
width: 19px;
height: 19px;
line-height: 19px;
border-radius: 15px;
margin: 3px;
text-align: center;
}
/*--------------------------------------------------------------
== Adjustments
--------------------------------------------------------------*/
.elementor-control-element_select,
.elementor-control-element_align_hr,
.elementor-control-element_read_more_text,
.elementor-control-element_tax_sep,
.elementor-control-element_sharing_icon_6,
.elementor-control-element_sharing_trigger_direction,
.elementor-control-element_sharing_icon_display,
.elementor-control-element_sharing_tooltip,
.elementor-control-element_custom_field_wrapper_html,
.elementor-control-slider_item_bg_size,
.elementor-control-element_addcart_variable_txt,
.elementor-control-type,
.elementor-control-show_last_update_date {
margin-bottom: 15px;
}
.elementor-control-slider_content_bg_color,
.elementor-control-slider_nav_border_border,
.elementor-control-slider_nav_border_radius,
.elementor-control-scroll_btn_vr,
.elementor-control-pagination_load_more_text,
.elementor-control-pagination_finish_text,
.elementor-control-pagination_prev_next,
.elementor-control-author_transition_duration,
.elementor-control-comments_transition_duration,
.elementor-control-likes_transition_duration,
.elementor-control-sharing_transition_duration,
.elementor-control-lightbox_transition_duration,
.elementor-control-custom_field1_transition_duration,
.elementor-control-custom_field2_transition_duration,
.elementor-control-custom_field3_transition_duration,
.elementor-control-custom_field4_transition_duration,
.elementor-control-filters_transition_duration,
.elementor-control-pagination_transition_duration,
.elementor-control-element_extra_text_pos,
.elementor-control-element_custom_field_wrapper,
.elementor-control-overlay_post_link,
.elementor-control-read_more_animation_height,
.elementor-control-archive_link_transition_duration,
.elementor-control-post_info_tax_select,
.elementor-control-post_info_link_wrap,
.elementor-control-post_info_modified_time,
.elementor-control-tabs_sharing_custom_colors,
.elementor-control-post_info_show_avatar,
.elementor-control-post_info_cf,
.elementor-control-pricing_items .elementor-control-price,
.elementor-control-pricing_items .elementor-control-feature_text,
.elementor-control-pricing_items .elementor-control-btn_text,
.elementor-control-divider_style,
.elementor-control-filters_pointer,
.elementor-control-title_transition_duration,
.elementor-control-tax1_transition_duration,
.elementor-control-tax2_transition_duration,
.elementor-control-filters_transition_duration,
.elementor-control-pagination_older_text,
.elementor-control-tooltip_position,
.elementor-control-post_info_comments_text_1 {
padding-top: 15px !important;
}
.elementor-control-post_info_custom_field_video_tutorial {
margin-top: 15px;
}
.elementor-control-title_pointer_animation + .elementor-control-title_transition_duration,
.elementor-control-tax1_pointer_animation + .elementor-control-tax1_transition_duration,
.elementor-control-tax2_pointer_animation + .elementor-control-tax2_transition_duration,
.elementor-control-filters_pointer_animation + .elementor-control-filters_transition_duration {
padding-top: 0 !important;
}
.elementor-control-pagination_load_more_text {
padding-bottom: 0 !important;
}
.elementor-control-filters_transition_duration,
.elementor-control-show_last_update_date {
padding-top: 0 !important;
}
.elementor-control-animation_divider,
.elementor-control-overlay_divider,
.elementor-control-slider_item_btn_1_divider,
.elementor-control-slider_item_btn_2_divider,
.elementor-control-slider_btn_typography_1_divider,
.elementor-control-slider_btn_box_shadow_1_divider,
.elementor-control-slider_btn_typography_2_divider,
.elementor-control-slider_btn_box_shadow_2_divider,
.elementor-control-testimonial_title_divider,
.elementor-control-social_media_divider,
.elementor-control-social_divider_1,
.elementor-control-social_divider_2,
.elementor-control-social_divider_3,
.elementor-control-social_divider_4,
.elementor-control-social_divider_5,
.elementor-control-custom_field_wrapper_html_divider1,
.elementor-control-custom_field_wrapper_html_divider2,
.elementor-control-lightbox_shadow_divider {
padding: 0 !important;
}
.elementor-control-custom_field_wrapper_html_divider1 hr,
.elementor-control-lightbox_shadow_divider hr {
height: 1px !important;
}
.elementor-control-element_show_on {
padding-top: 15px !important;
border-top: 1px solid #d5dadf;
}
[class*="wpr__section_"] ~ .elementor-control-type-number .elementor-control-input-wrapper,
[class*="wpr__section_"] ~ .elementor-control-type-repeater .elementor-control-type-number .elementor-control-input-wrapper {
max-width: 30% !important;
margin-left: auto !important;
}
[class*="wpr__section_"] ~ .elementor-control-type-select .elementor-control-input-wrapper,
[class*="wpr__section_"] ~ .elementor-control-type-repeater .elementor-control-type-select .elementor-control-input-wrapper {
width: auto !important;
min-width: 30% !important;
margin-left: auto !important;
}
.elementor-control-submit_preview_changes .elementor-control-input-wrapper {
text-align: center !important;
}
.elementor-control-query_manual_related,
.elementor-control-query_manual_current {
display: none !important;
}
/* Fix Select Inputs */
.elementor-control-button_hover_animation .elementor-control-input-wrapper,
.elementor-control-front_btn_animation .elementor-control-input-wrapper,
.elementor-control-back_btn_animation .elementor-control-input-wrapper,
.elementor-control-select_template .select2-selection,
.elementor-control-switcher_first_select_template .select2-selection,
.elementor-control-switcher_second_select_template .select2-selection,
.elementor-control-switcher_select_template .select2-selection,
.elementor-control-slider_select_template .select2-selection {
width: 135px !important;
}
.elementor-control-type-repeater .elementor-control-content > label {
display: none !important;
}
/*--------------------------------------------------------------
== Notification
--------------------------------------------------------------*/
#wpr-template-settings-notification {
position: fixed;
left: 40px;
bottom: 5px;
z-index: 9999;
padding: 13px 25px;
background: #fff;
color: #222;
-webkit-box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.3);
border-radius: 3px;
}
#wpr-template-settings-notification:before {
content: "";
position: absolute;
left: -6px;
bottom: 10px;
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right-style: solid;
border-right-width: 6px;
border-right-color: #fff;
}
#wpr-template-settings-notification h4 {
margin-bottom: 10px;
}
#wpr-template-settings-notification h4 span {
font-size: 14px;
vertical-align: super;
color: #5f5f5f;
}
#wpr-template-settings-notification h4 i {
margin-right: 10px;
color: #3db050;
font-size: 24px;
}
#wpr-template-settings-notification p {
color: #666;
font-size: 12px;
line-height: 1.5;
}
#wpr-template-settings-notification > i {
position: absolute;
top: 7px;
right: 7px;
cursor: pointer;
color: #999;
}
.elementor-control-cf7_notice,
.elementor-control-wpforms_notice,
.elementor-control-ninja_forms_notice,
.elementor-control-caldera_notice {
color: red;
}
/* Help Button - select with referrals - [href^="https://royal-elementor-addons.com/contact/"] */
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"] {
display: inline-block;
padding: 12px 35px;
font-size: 13px;
font-weight: normal;
color: #fff;
background: #6A65FF;
border-radius: 3px;
-webkit-box-shadow: 0 2px 7px 0 rgba(0,0,0,0.3);
box-shadow: 0 2px 7px 0 rgba(0,0,0,0.3);
letter-spacing: 0.3px;
-webkit-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
}
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"]:hover {
color: #fff;
background: #6A4BFF;
}
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"] i {
color: #fff;
font-size: 14px;
vertical-align: top;
}
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"]:hover i {
color: #fff;
}
#elementor-panel__editor__help__link[href^="https://wordpress.org/support/plugin/royal-elementor-addons/"]:hover i:before {
content: '\e942' !important;
}
.elementor-control-posts_slider_notice .elementor-control-raw-html {
font-style: normal !important;
}
.elementor-control-product_notice_widget_info .elementor-control-raw-html {
color: red;
}
/*--------------------------------------------------------------
== Modal Popup Editor
--------------------------------------------------------------*/
.elementor-editor-wpr-popups .elementor-control-document_settings,
.elementor-editor-wpr-popups .elementor-control-post_title,
.elementor-editor-wpr-popups .elementor-control-post_status {
display: none !important;
}
/*--------------------------------------------------------------
== Elementor Editor Popup
--------------------------------------------------------------*/
#wpr-template-editor-popup .dialog-widget-content {
width: 90vw;
height: 90vh;
}
#wpr-template-editor-popup .dialog-message {
padding: 0;
width: 100%;
height: 100%;
}
#wpr-template-editor-popup .dialog-close-button {
font-size: 24px;
color: #222;
}
#wpr-template-editor-popup .dialog-header {
display: none;
}
#wpr-template-editor-loading {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #f1f3f5;
z-index: 9999;
-webkit-transform: translateZ(0);
transform: translateZ(0);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
#wpr-template-editor-loading .elementor-loader-wrapper {
top: auto;
left: auto;
-webkit-transform: none;
-ms-transform: none;
transform: none;
}
/* Disable Transitions on Responsive Preview */
#elementor-preview-responsive-wrapper {
-webkit-transition: none !important;
-o-transition: none !important;
transition: none !important;
}
/*--------------------------------------------------------------
== Magazine Grid Layout
--------------------------------------------------------------*/
.elementor-control-layout_select.elementor-control .elementor-control-field {
-webkit-box-orient: vertical !important;
-webkit-box-direction: normal !important;
-ms-flex-direction: column !important;
flex-direction: column !important;
-webkit-box-align: start;
-ms-flex-align: start;
align-items: flex-start;
}
.elementor-control-layout_select.elementor-control .elementor-control-input-wrapper {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100% !important;
margin-top: 10px;
}
.elementor-control-layout_select.elementor-control .elementor-choices {
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-align: stretch;
-ms-flex-align: stretch;
align-items: stretch;
width: 100% !important;
height: auto;
border: 1px solid #dfd5d5;
}
.elementor-control-layout_select.elementor-control .elementor-choices label {
width: 33.3%;
height: 50px;
background-size: 75%;
background-position: center center;
background-repeat: no-repeat;
}
.elementor-control-layout_select input[type="radio"]:checked + label {
border: 2px solid #D30C5C;
border-radius: 0 !important;
background-color: #ffffff;
}
.elementor-control-layout_select label:nth-child(2) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='15.2' class='st1' width='22.2' height='11.9'/%3E%3Crect x='25.6' y='4.9' class='st1' width='22.2' height='9.2'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(4) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='25.6' y='4.9' class='st1' width='22.2' height='10.5'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(6) {
background: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Cg%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='25.6' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(8) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3Crect x='37.2' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(10) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='13.9' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='37.2' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3Crect x='2.3' y='16.6' class='st1' width='10.5' height='10.5'/%3E%3Crect x='2.3' y='4.9' class='st1' width='10.5' height='10.5'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(12) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='28.5' height='22.2'/%3E%3Crect x='31.8' y='12.9' class='st1' width='15.9' height='6.3'/%3E%3Crect x='31.8' y='4.9' class='st1' width='15.9' height='6.8'/%3E%3Crect x='31.8' y='20.3' class='st1' width='15.9' height='6.8'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(14) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='13.9' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='2.2' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(16) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='33.9' height='13.2'/%3E%3Crect x='2.2' y='19.3' class='st1' width='16.4' height='7.8'/%3E%3Crect x='19.7' y='19.3' class='st1' width='16.4' height='7.8'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='13.2'/%3E%3Crect x='37.2' y='19.3' class='st1' width='10.5' height='7.8'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(18) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='12.1'/%3E%3Crect x='25.6' y='4.9' class='st1' width='22.2' height='12.1'/%3E%3Crect x='2.2' y='18.2' class='st1' width='14.4' height='8.9'/%3E%3Crect x='17.8' y='18.2' class='st1' width='14.4' height='8.9'/%3E%3Crect x='33.3' y='18.2' class='st1' width='14.4' height='8.9'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(20) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3Crect x='25.6' y='4.9' class='st1' width='22.2' height='22.2'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(22) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='14.5' height='22.2'/%3E%3Crect x='33.4' y='4.9' class='st1' width='14.4' height='22.2'/%3E%3Crect x='17.9' y='4.9' class='st1' width='14.4' height='22.2'/%3E%3C/g%3E%3C/svg%3E");
}
.elementor-control-layout_select label:nth-child(24) {
background-image: url("data:image/svg+xml;charset=utf8,%3C?xml version='1.0' encoding='utf-8'?%3E%3C!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 50 32' style='enable-background:new 0 0 50 32;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0{fill:%23FFFFFF;} .st1{fill:%23C2C1C0;} %3C/style%3E%3Cg id='Background'%3E%3Crect class='st0' width='50' height='32'/%3E%3C/g%3E%3Cg id='Layer_1'%3E%3Crect x='2.2' y='4.9' class='st1' width='10.6' height='22.2'/%3E%3Crect x='37.2' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3Crect x='25.6' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3Crect x='14' y='4.9' class='st1' width='10.5' height='22.2'/%3E%3C/g%3E%3C/svg%3E");
}
/*--------------------------------------------------------------
== Widget Preview and Library buttons
--------------------------------------------------------------*/
.elementor-control-wpr_library_buttons {
height: 60px;
padding: 0;
}
.elementor-control-wpr_library_buttons .elementor-control-raw-html {
padding: 0 10px 10px 10px;
border-bottom: 1px solid #efefef;
}
.elementor-control-wpr_library_buttons .elementor-control-raw-html div {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.elementor-control-wpr_library_buttons .elementor-control-raw-html div a {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
padding: 10px 15px;
border-radius: 3px;
/*box-shadow: 1px 2px 5px 0 rgba(0,0,0,0.2);*/
white-space: nowrap;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
text-align: center;
}
.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child {
background-color: #1CB4E4;
color: #fff;
margin-right: 3px;
}
.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child {
margin-left: 3px;
background-color: #6A65FF;
color: #fff;
}
.elementor-control-wpr_library_buttons .elementor-control-raw-html > a {
display: block;
margin-top: 10px;
line-height: 20px;
color: #777;
border: none !important;
}
.elementor-section-title > a {
top: 10px;
right: 20px;
position: absolute;
line-height: 20px;
}
.elementor-section-title > a:hover {
border-color: transparent;
}
/*--------------------------------------------------------------
== Apply Changes Button
--------------------------------------------------------------*/
.editor-wpr-preview-update {
margin: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.editor-wpr-preview-update button {
font-size: 13px;
padding: 5px 10px;
}
/*--------------------------------------------------------------
== Free/Pro Options
--------------------------------------------------------------*/
.elementor-control select option[value*=pro-] {
background: #f0f0f0;
}
.elementor-control[class*="pro_notice"] {
padding: 5px 0 15px 0 !important;
}
.wpr-pro-notice {
padding: 20px;
border-top: 1px solid #e6e9ec;
border-bottom: 1px solid #e6e9ec;
background-color: #f2fbff;
line-height: 1.4;
text-align: center;
}
.wpr-pro-notice-video {
display: block;
margin-top: 7px;
line-height: 20px;
border: none !important;
}
#elementor-controls .elementor-control-slider_section_pro_notice {
margin-top: -16px;
padding-bottom: 0 !important;
}
.elementor-control-layout_select_pro_notice + div,
.elementor-control-element_align_pro_notice + div {
padding-top: 15px;
}
.elementor-control-layout_select .elementor-choices label {
position: relative;
}
.elementor-control-layout_select .elementor-choices label:nth-child(2):after,
.elementor-control-layout_select .elementor-choices label:nth-child(4):after,
.elementor-control-layout_select .elementor-choices label:nth-child(6):after,
.elementor-control-layout_select .elementor-choices label:nth-child(8):after,
.elementor-control-layout_select .elementor-choices label:nth-child(10):after,
.elementor-control-layout_select .elementor-choices label:nth-child(12):after {
content: ' ';
display: block;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: rgba(0,0,0,0.2);
}
/* Adjustments */
.elementor-control.elementor-control-element_align_pro_notice,
.elementor-control.elementor-control-search_pro_notice,
.elementor-control.elementor-control-layout_select_pro_notice,
.elementor-control.elementor-control-grid_columns_pro_notice,
.elementor-control.elementor-control-slider_content_type_pro_notice,
.elementor-control.elementor-control-slider_repeater_pro_notice,
.elementor-control.elementor-control-slider_dots_layout_pro_notice,
.elementor-control.elementor-control-testimonial_repeater_pro_notice,
.elementor-control.elementor-control-testimonial_icon_pro_notice,
.elementor-control.elementor-control-menu_layout_pro_notice,
.elementor-control.elementor-control-menu_items_submenu_entrance_pro_notice,
.elementor-control.elementor-control-switcher_label_style_pro_notice,
.elementor-control.elementor-control-countdown_type_pro_notice,
.elementor-control.elementor-control-layout_pro_notice,
.elementor-control.elementor-control-anim_timing_pro_notice,
.elementor-control.elementor-control-tab_content_type_pro_notice,
.elementor-control.elementor-control-tabs_repeater_pro_notice,
.elementor-control.elementor-control-tabs_align_pro_notice,
.elementor-control.elementor-control-front_trigger_pro_notice,
.elementor-control.elementor-control-back_link_type_pro_notice,
.elementor-control.elementor-control-box_anim_timing_pro_notice,
.elementor-control.elementor-control-image_style_pro_notice,
.elementor-control.elementor-control-image_animation_timing_pro_notice,
.elementor-control.elementor-control-label_display_pro_notice,
.elementor-control.elementor-control-post_type_pro_notice,
.elementor-control.elementor-control-type_select_pro_notice,
.elementor-control.elementor-control-icon_style_pro_notice,
.elementor-control.elementor-control-dual_button_pro_notice,
.elementor-control.elementor-control-team_member_pro_notice,
.elementor-control.elementor-control-price_list_pro_notice,
.elementor-control.elementor-control-business_hours_pro_notice,
.elementor-control.elementor-control-sharing_columns_pro_notice,
.elementor-control.elementor-control-popup_trigger_pro_notice,
.elementor-control.elementor-control-popup_show_again_delay_pro_notice,
.elementor-control.elementor-control-group_popup_settings_pro_notice,
.elementor-control.elementor-control-which_particle_pro_notice,
.elementor-control.elementor-control-paralax_repeater_pro_notice,
.elementor-control.elementor-control-opnepage_pro_notice,
.elementor-control.elementor-control-timeline_repeater_pro_notice,
.elementor-control.elementor-control-limit_grid_items_pro_notice,
.elementor-control.elementor-control-post_nav_layout_pro_notice,
.elementor-control.elementor-control-author_name_links_to_pro_notice,
.elementor-control.elementor-control-author_title_links_to_pro_notice,
.elementor-control.elementor-control-comments_form_layout_pro_notice,
.elementor-control.elementor-control-sharing_repeater_pro_notice,
.elementor-control.elementor-control-mini_cart_style_pro_notice,
.elementor-control.elementor-control-tabs_position_pro_notice,
.elementor-control.elementor-control-choose_table_type_pro_notice,
.elementor-control.elementor-control-accordion_repeater_pro_notice,
.elementor-control.elementor-control-acc_repeater_pro_notice,
.elementor-control.elementor-control-data_source_pro_notice,
.elementor-control.elementor-control-charts_repeater_pro_notice,
.elementor-control.elementor-control-mob_menu_display_as_pro_notice {
padding-bottom: 0 !important;
}
.elementor-control-search_pro_notice .wpr-pro-notice,
.elementor-control-grid_columns_pro_notice .wpr-pro-notice,
.elementor-control-slider_content_type_pro_notice .wpr-pro-notice,
.elementor-control-slider_repeater_pro_notice .wpr-pro-notice,
.elementor-control-slider_dots_layout_pro_notice .wpr-pro-notice,
.elementor-control-testimonial_repeater_pro_notice .wpr-pro-notice,
.elementor-control-testimonial_icon_pro_notice .wpr-pro-notice,
.elementor-control-menu_layout_pro_notice .wpr-pro-notice,
.elementor-control-menu_items_submenu_entrance_pro_notice .wpr-pro-notice,
.elementor-control-switcher_label_style_pro_notice .wpr-pro-notice,
.elementor-control-countdown_type_pro_notice .wpr-pro-notice,
.elementor-control-layout_pro_notice .wpr-pro-notice,
.elementor-control-anim_timing_pro_notice .wpr-pro-notice,
.elementor-control-tab_content_type_pro_notice .wpr-pro-notice,
.elementor-control-tabs_repeater_pro_notice .wpr-pro-notice,
.elementor-control-tabs_align_pro_notice .wpr-pro-notice,
.elementor-control-front_trigger_pro_notice .wpr-pro-notice,
.elementor-control-back_link_type_pro_notice .wpr-pro-notice,
.elementor-control-box_anim_timing_pro_notice .wpr-pro-notice,
.elementor-control-image_style_pro_notice .wpr-pro-notice,
.elementor-control-image_animation_timing_pro_notice .wpr-pro-notice,
.elementor-control-label_display_pro_notice .wpr-pro-notice,
.elementor-control-post_type_pro_notice .wpr-pro-notice,
.elementor-control-type_select_pro_notice .wpr-pro-notice,
.elementor-control-icon_style_pro_notice .wpr-pro-notice,
.elementor-control-dual_button_pro_notice .wpr-pro-notice,
.elementor-control-team_member_pro_notice .wpr-pro-notice,
.elementor-control-price_list_pro_notice .wpr-pro-notice,
.elementor-control-business_hours_pro_notice .wpr-pro-notice,
.elementor-control-sharing_columns_pro_notice .wpr-pro-notice,
.elementor-control-popup_trigger_pro_notice .wpr-pro-notice,
.elementor-control-popup_show_again_delay_pro_notice .wpr-pro-notice,
.elementor-control-group_popup_settings_pro_notice .wpr-pro-notice,
.elementor-control-post_nav_layout_pro_notice .wpr-pro-notice,
.elementor-control-author_name_links_to_pro_notice .wpr-pro-notice,
.elementor-control-author_title_links_to_pro_notice .wpr-pro-notice,
.elementor-control-comments_form_layout_pro_notice .wpr-pro-notice,
.elementor-control-sharing_repeater_pro_notice .wpr-pro-notice,
.elementor-control-mini_cart_style_pro_notice .wpr-pro-notice,
.elementor-control-tabs_position_pro_notice .wpr-pro-notice,
.elementor-control-choose_table_type_pro_notice .wpr-pro-notice,
.elementor-control-accordion_repeater_pro_notice .wpr-pro-notice,
.elementor-control.elementor-control-data_source_pro_notice .wpr-pro-notice,
.elementor-control.elementor-control-mob_menu_display_as_pro_notice .wpr-pro-notice {
border-bottom: none !important;
}
/* Both */
.elementor-control.elementor-control-pagination_type_pro_notice,
.elementor-control.elementor-control-tooltip_trigger_pro_notice,
.elementor-control.elementor-control-post_info_select_pro_notice {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.elementor-control-pagination_type_pro_notice .wpr-pro-notice {
border-top: none !important;
border-bottom: none !important;
}
.elementor-control-pro_features_section .elementor-section-toggle,
.elementor-control-pro_features_section .elementor-section-title {
color: #f54;
}
.elementor-control-pro_features_section .elementor-section-title {
line-height: 20px;
}
.elementor-control-pro_features_section .elementor-section-title .dashicons {
line-height: 20px;
font-size: 13px;
}
.wpr-pro-features-list {
text-align: center;
}
.wpr-pro-features-list ul {
text-align: left;
}
.wpr-pro-features-list ul li {
position: relative;
line-height: 22px;
padding-left: 20px;
}
.wpr-pro-features-list ul li::before {
content: '.';
font-size: 38px;
position: absolute;
top: -11px;
left: 0;
}
.wpr-pro-features-list ul + a {
display: inline-block;
background-color: #f54;
color: #fff;
margin: 15px 15px 10px 0;
padding: 7px 12px;
border-radius: 3px;
}
.wpr-pro-features-list ul + a:hover {
color: #fff;
}
/* Video Tutorial Link */
.elementor-control[class*="video_tutorial"] {
padding-top: 0 !important;
padding-bottom: 5px !important;
}
.elementor-control.elementor-control-woo_grid_notice_video_tutorial,
.elementor-control-show_last_update_date {
padding-bottom: 15px !important;
}
.elementor-control.elementor-control-woo_grid_notice_video_tutorial a {
display: inline-block;
margin-top: 5px;
}
.elementor-control[class*="video_tutorial"] a {
line-height: 16px;
font-size: 12px;
}
.elementor-control[class*="video_tutorial"] a .dashicons {
font-size: 16px;
}
/* Pro Control Class */
.elementor-control.wpr-pro-control label i {
color: #aeaeae;
font-size: 14px;
margin-left: 3px;
}
.elementor-control.wpr-pro-control .elementor-control-content:before {
content: '';
position: absolute;
width: 100%;
height: 100%;
z-index: 9;
background: transparent;
}
.elementor-control.wpr-pro-control .elementor-control-content:after {
content: "This option is available in the Pro Version.";
visibility: hidden;
opacity: 0;
position: absolute;
top: 30px;
padding: 15px;
z-index: 99;
margin-top: 10px;
font-size: 12px;
color: #93003c;
background-color: #ffffff;
border-radius: 5px;
-webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
border: 1px solid #e6e9ec;
-webkit-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
}
.elementor-repeater-fields .elementor-control.wpr-pro-control .elementor-control-content:after {
content: "This is available in the Pro Version.";
}
.elementor-control.wpr-pro-control.no-distance .elementor-control-content:after {
margin: 0;
}
.elementor-control.wpr-pro-control .elementor-control-content:hover:after {
visibility: visible;
opacity: 1;
}
/*--------------------------------------------------------------
== Theme Builder Widgets
--------------------------------------------------------------*/
#elementor-panel-categories {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
#elementor-panel-categories > div {
-webkit-box-ordinal-group: 3;
-ms-flex-order: 2;
order: 2;
}
#elementor-panel-category-wpr-theme-builder-widgets,
#elementor-panel-category-wpr-woocommerce-builder-widgets {
-webkit-box-ordinal-group: 2 !important;
-ms-flex-order: 1 !important;
order: 1 !important;
}
.elementor-editor-wpr-theme-builder #elementor-panel-footer-saver-preview {
display: none !important;
}
/*--------------------------------------------------------------
== Elementor Search Notice
--------------------------------------------------------------*/
.wpr-elementor-search-notice {
background: #fff;
font-size: 13px;
padding: 20px;
line-height: 18px;
margin: 10px;
border-left: 3px solid #71d7f7;
-webkit-box-shadow: 0 1px 4px 0 rgb(0 0 0 / 7%);
box-shadow: 0 1px 4px 0 rgb(0 0 0 / 7%);
}
/*--------------------------------------------------------------
== Debug
--------------------------------------------------------------*/
pre.xdebug-var-dump {
position: absolute;
z-index: 999999;
background: #fff;
border: 2px solid #000;
padding: 20px;
left: 300px;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,714 @@
/*--------------------------------------------------------------
== Library - Predefined Styles
--------------------------------------------------------------*/
#wpr-library-btn {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
width: 40px;
height: 40px;
vertical-align: top;
margin-left: 10px;
color: #fff;
font-family: Arial,Helvetica,sans-serif;
font-weight: bold;
letter-spacing: 0.3px;
cursor: pointer;
}
.wpr-library-icon {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
padding: 10px;
margin-right: 10px;
border-radius: 50%;
color: transparent;
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
font-weight: bold;
letter-spacing: 0.3px;
}
.wpr-tplib-popup-overlay {
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
}
.wpr-tplib-popup {
overflow: hidden;
position: absolute;
top: 30%;
left: 50%;
-webkit-transform: translate(-50%,-30%);
-ms-transform: translate(-50%,-30%);
transform: translate(-50%,-30%);
background: #f1f3f5;
min-width: 100%;
height: 100%;
}
.wpr-tplib-header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background-color: #fff;
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 10;
}
.wpr-tplib-logo {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
width: 200px;
padding-left: 30px;
color: #495157;
font-size: 15px;
font-weight: 700;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
}
.wpr-tplib-header ul {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
width: 100%;
margin: 0;
padding: 0;
margin-left: -130px;
list-style: none;
}
.wpr-tplib-header ul li {
width: 115px;
padding: 20px 0;
color: #6d7882;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 14px;
line-height: 1;
font-weight: 500;
text-align: center;
cursor: pointer;
}
.wpr-tplib-active-tab {
background-image: -o-linear-gradient(top,#f1f3f5,#fff);
background-image: -webkit-gradient(linear,left top, left bottom,from(#f1f3f5),to(#fff));
background-image: linear-gradient(180deg,#f1f3f5,#fff);
border-bottom: 3px solid #6A4BFF;
}
.wpr-tplib-close {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
padding-right: 30px;
color: #a4afb7;
font-size: 18px;
cursor: pointer;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.wpr-tplib-close:hover {
color: #3a3a3a;
}
.wpr-tplib-close i {
line-height: 20px;
padding-left: 20px;
}
.wpr-tplib-popup h3 {
margin: 0;
}
.wpr-tplib-header .wpr-tplib-insert-template {
display: none;
width: 120px;
height: 27px;
line-height: 27px;
padding: 0 15px;
margin-right: 15px;
color: #fff;
background-color: #6A4BFF;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
border-radius: 2px;
text-transform: uppercase;
cursor: pointer;
text-align: center;
}
.wpr-tplib-back {
display: none;
width: 230px;
padding: 17px 15px;
border-right: 1px solid #e6e9ec;
color: #6d7882;
font-size: 15px;
font-weight: 700;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
cursor: pointer;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.wpr-tplib-back:hover {
color: #495157;
}
.wpr-tplib-back i {
margin-right: 5px;
}
.wpr-tplib-back span {
}
.wpr-tplib-content-wrap {
}
.wpr-tplib-sidebar {
display: flex;
justify-content: space-between;
padding: 30px 30px 20px 30px;
}
.wpr-tplib-sidebar .wpr-tplib-search {
display: none;
position: relative;
margin: 30px 0;
}
.wpr-tplib-sidebar .wpr-tplib-search i {
position: absolute;
top: 50%;
right: 10px;
font-size: 12px;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.wpr-tplib-sidebar .wpr-tplib-search input {
width: 100%;
padding: 8px 10px;
border: 0;
border-bottom: 1px solid #efefef;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
color: #9a9a9a;
}
.wpr-tplib-filters-wrap {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-tplib-sub-filters {
display: none;
margin-left: 20px;
}
.wpr-tplib-sub-filters ul {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-tplib-sub-filters ul li {
padding: 10px 25px;
margin-right: 7px;
line-height: 15px;
font-size: 13px;
font-weight: normal;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
cursor: pointer;
border-radius: 3px;
}
.wpr-tplib-sub-filters ul li:hover,
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
background: #6A4BFF;
color: #fff;
}
.wpr-tplib-filters {
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: start;
-ms-flex-align: start;
align-items: flex-start;
position: relative;
width: 200px;
font-size: 14px;
font-weight: normal;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
color: #6d7882;
}
.wpr-tplib-filters h3 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
padding: 10px 15px;
font-size: 13px;
font-weight: normal;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
cursor: pointer;
border-radius: 3px;
}
.wpr-tplib-filters h3 span {
width: 100%;
}
.wpr-tplib-filters-list {
visibility: hidden;
opacity: 0;
position: absolute;
top: 38px;
z-index: 999;
width: 700px;
padding: 20px 30px;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
-webkit-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
border-radius: 3px;
}
.wpr-tplib-filters-list ul {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
}
.wpr-tplib-filters-list ul li {
width: 25%;
padding: 12px;
color: #6d7882;
background: #fff;
font-size: 13px;
line-height: 1;
cursor: pointer;
}
.wpr-tplib-filters-list ul li:hover {
background: #f9f9f9;
color: #222;
}
.wpr-tplib-template-gird {
position: absolute;
width: 100%;
height: calc(100% - 132px);
overflow: auto;
padding: 0 30px 30px 30px;
margin-left: -10px;
}
.wpr-tplib-template-wrap {
float: left;
overflow: hidden;
width: 18.5%;
margin: 10px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
}
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
content: 'Free';
display: block;
position: absolute;
top: 10px;
right: 10px;
z-index: 1;
width: 45px;
padding: 4px;
font-size: 11px;
line-height: 16px;
font-weight: bold;
letter-spacing: 0.3px;
text-transform: uppercase;
text-align: center;
background: #555;
color: #fff;
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
border-radius: 3px;
}
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
content: 'Pro';
background: #6A4BFF;
}
@media screen and ( max-width: 1364px ) {
.wpr-tplib-template-wrap {
width: 23%;
}
}
.wpr-tplib-template {
}
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-template {
opacity: 1;
visibility: visible;
}
.wpr-tplib-template-media {
position: relative;
background-color: #e8e8e8;
}
.wpr-tplib-template-media img {
width: 100%;
max-width: 100%;
height: auto;
}
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
opacity: 1;
}
.wpr-tplib-template-media-overlay {
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
cursor: pointer;
-webkit-transition: opacity 0.1s ease-in;
-o-transition: opacity 0.1s ease-in;
transition: opacity 0.1s ease-in;
}
.wpr-tplib-template-media-overlay i {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-size: 25px;
}
.wpr-tplib-preview-wrap {
display: none;
}
.wpr-tplib-image {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
padding: 20px;
}
.wpr-tplib-iframe {
position: relative;
padding-top: 56.25%;
}
.wpr-tplib-iframe iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
.wpr-tplib-template-footer {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-flow: column wrap;
flex-flow: column wrap;
-ms-flex-line-pack: justify;
align-content: space-between;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
height: 45px;
padding: 5px 15px;
background-color: #fff;
border-top: 1px solid #efefef;
}
.wpr-tplib-template-footer h3 {
overflow: hidden;
color: #6d7882;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
font-weight: normal;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.wpr-tplib-template-footer .wpr-tplib-insert-template {
opacity: 0;
visibility: hidden;
padding: 6px 10px;
color: #fff;
background-color: #6A4BFF;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
line-height: 1;
letter-spacing: 0.3px;
border-radius: 3px;
cursor: pointer;
-webkit-transition: all 0.1s ease-in;
-o-transition: all 0.1s ease-in;
transition: all 0.1s ease-in;
}
#masonry-effect {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.item {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
position: relative;
width: calc(33.3%);
}
/* Elementor Loader */
.wpr-tplib-loader {
overflow: auto;
position: absolute;
width: 100%;
height: 100%;
z-index: 9999999999;
background-color: #f1f3f5;
}
.elementor-loader-wrapper {
position: absolute;
width: 300px;
left: 50%;
top: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.elementor-loader {
border-radius: 7px;
padding: 40px;
height: 150px;
width: 150px;
background-color: rgba(255, 255, 255, 0.9);
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
}
.elementor-loader-boxes {
height: 100%;
width: 100%;
position: relative;
}
.elementor-loader-box {
position: absolute;
background-color: #d5dadf;
-webkit-animation: load 1.8s linear infinite;
animation: load 1.8s linear infinite;
}
.elementor-loader-box:nth-of-type(1) {
width: 20%;
height: 100%;
left: 0;
top: 0;
}
.elementor-loader-box:not(:nth-of-type(1)) {
right: 0;
height: 20%;
width: 60%;
}
.elementor-loader-box:nth-of-type(2) {
top: 0;
-webkit-animation-delay: -0.45s;
animation-delay: -0.45s;
}
.elementor-loader-box:nth-of-type(3) {
top: 40%;
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.elementor-loader-box:nth-of-type(4) {
bottom: 0;
-webkit-animation-delay: -1.35s;
animation-delay: -1.35s;
}
@-webkit-keyframes load {
0% {
opacity: .3;
}
50% {
opacity: 1;
}
100% {
opacity: .3;
}
}
@keyframes load {
0% {
opacity: .3;
}
50% {
opacity: 1;
}
100% {
opacity: .3;
}
}
.elementor-loading-title {
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
color: #a4afb7;
text-align: center;
text-transform: uppercase;
margin-top: 30px;
letter-spacing: 7px;
text-indent: 7px;
font-size: 10px;
width: 100%;
}
/* Scroll Bar */
.wpr-tplib-popup ::-webkit-scrollbar {
width: 6px;
height: 0;
border-radius: 3px;
}
.wpr-tplib-popup ::-webkit-scrollbar-button {
width: 0px;
height: 10px;
}
.wpr-tplib-popup ::-webkit-scrollbar-thumb {
background-color: #d5dadf;
border: 0px none #d5dadf;
border-radius: 3px;
}
.wpr-tplib-popup ::-webkit-scrollbar-track {
border: 0px none #fff;
border-radius: 0;
}
.wpr-tplib-popup ::-webkit-scrollbar-corner {
background: transparent;
}
@@ -0,0 +1,929 @@
/*--------------------------------------------------------------
== Library - Predefined Styles
--------------------------------------------------------------*/
.wpr-tplib-popup-overlay * {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
#wpr-library-btn {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
width: 40px;
height: 40px;
vertical-align: top;
margin-left: 10px;
color: #fff;
font-family: Arial,Helvetica,sans-serif;
font-weight: bold;
letter-spacing: 0.3px;
cursor: pointer;
}
.wpr-library-icon {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
padding: 10px;
margin-right: 10px;
border-radius: 50%;
color: transparent;
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
font-weight: bold;
letter-spacing: 0.3px;
}
.wpr-tplib-popup-overlay {
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
}
.wpr-tplib-popup {
overflow: hidden;
position: absolute;
top: 30%;
left: 50%;
-webkit-transform: translate(-50%,-30%);
-ms-transform: translate(-50%,-30%);
transform: translate(-50%,-30%);
background: #f1f3f5;
min-width: 100%;
height: 100%;
}
.wpr-tplib-header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background-color: #fff;
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 10;
}
.wpr-tplib-logo {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: flex-start;
width: 200px;
padding-left: 30px;
color: #495157;
font-size: 15px;
font-weight: 700;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
}
.wpr-tplib-header ul {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
width: 100%;
margin: 0;
padding: 0;
margin-left: -130px;
list-style: none;
}
.wpr-tplib-header ul li {
width: 115px;
padding: 20px 0;
color: #6d7882;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 14px;
line-height: 1;
font-weight: 500;
text-align: center;
cursor: pointer;
}
.wpr-tplib-active-tab {
background-image: -o-linear-gradient(top,#f1f3f5,#fff);
background-image: -webkit-gradient(linear,left top, left bottom,from(#f1f3f5),to(#fff));
background-image: linear-gradient(180deg,#f1f3f5,#fff);
border-bottom: 3px solid #6A4BFF;
}
.wpr-tplib-close {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
padding-right: 30px;
color: #a4afb7;
font-size: 18px;
cursor: pointer;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.wpr-tplib-close:hover {
color: #3a3a3a;
}
.wpr-tplib-close i {
line-height: 20px;
padding-left: 20px;
}
.wpr-tplib-popup h3 {
margin: 0;
}
.wpr-tplib-header .wpr-tplib-insert-template {
display: none;
width: 120px;
height: 27px;
line-height: 27px;
padding: 0 15px;
margin-right: 15px;
color: #fff;
background-color: #6A4BFF;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
border-radius: 2px;
text-transform: uppercase;
cursor: pointer;
text-align: center;
}
.wpr-tplib-back {
display: none;
width: 230px;
padding: 17px 15px;
border-right: 1px solid #e6e9ec;
color: #6d7882;
font-size: 15px;
font-weight: 700;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
cursor: pointer;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.wpr-tplib-back:hover {
color: #495157;
}
.wpr-tplib-back i {
margin-right: 5px;
}
.wpr-tplib-back span {
}
.wpr-tplib-content-wrap {
}
.wpr-tplib-sidebar {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 30px 37px 30px;
}
.wpr-tplib-sidebar .wpr-tplib-search {
position: relative;
width: 250px;
-webkit-box-shadow: 0 2px 5px 0 rgb(0 0 0 / 5%);
box-shadow: 0 2px 5px 0 rgb(0 0 0 / 5%);
}
#wpr-info-box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 300px;
padding: 10px 15px;
border-radius: 3px;
background-color: #fff;
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
color: #6d7882;
max-width: 500px;
}
#wpr-info-box a {
color: #6A4BFF;
text-decoration: none;
font-weight: bold;
}
#wpr-info-box a:hover {
text-decoration: underline;
}
.wpr-tplib-sidebar .wpr-tplib-search i {
position: absolute;
top: 50%;
right: 15px;
font-size: 12px;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.wpr-tplib-sidebar .wpr-tplib-search input {
width: 100%;
padding: 7px 15px;
border: 0;
border-bottom: 1px solid #efefef;
font-size: 14px;
line-height: 23px;
border-radius: 3px;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
color: #9a9a9a;
}
.wpr-tplib-filters-wrap {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-tplib-sub-filters {
display: none;
margin-left: 20px;
}
.wpr-tplib-sub-filters ul {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-tplib-sub-filters ul li {
padding: 10px 25px;
margin-right: 7px;
line-height: 15px;
font-size: 13px;
font-weight: normal;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
cursor: pointer;
border-radius: 3px;
}
.wpr-tplib-sub-filters ul li:hover,
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
background: #6A4BFF;
color: #fff;
}
.wpr-tplib-filters,
.wpr-tplib-price {
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: start;
-ms-flex-align: start;
align-items: flex-start;
position: relative;
width: 200px;
font-size: 14px;
font-weight: normal;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
color: #6d7882;
}
.wpr-tplib-price i {
margin-top: 3px;
}
.wpr-tplib-filters h3,
.wpr-tplib-price h3 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
padding: 10px 15px;
font-size: 13px;
font-weight: normal;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
cursor: pointer;
border-radius: 3px;
}
.wpr-tplib-filters h3 span,
.wpr-tplib-price h3 span {
width: 100%;
}
.wpr-tplib-filters-list,
.wpr-tplib-price-list {
visibility: hidden;
opacity: 0;
position: absolute;
top: 38px;
z-index: 999;
width: 700px;
padding: 20px 30px;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
-webkit-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
border-radius: 3px;
}
.wpr-tplib-filters-list ul,
.wpr-tplib-price-list ul {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
list-style: none;
padding-left: 0;
margin: 0;
}
.wpr-tplib-filters-list ul li,
.wpr-tplib-price-list ul li {
width: 25%;
padding: 12px;
color: #6d7882;
background: #fff;
font-size: 13px;
line-height: 1;
cursor: pointer;
}
.wpr-tplib-filters-list ul li:hover,
.wpr-tplib-price-list ul li:hover {
background: #f9f9f9;
color: #222;
}
.wpr-tplib-price {
width: 120px;
}
.wpr-tplib-search + .wpr-tplib-filters-wrap .wpr-tplib-filters-list {
right: 0;
width: 100%;
}
.wpr-tplib-search + .wpr-tplib-filters-wrap .wpr-tplib-filters-list ul {
flex-direction: column
}
.wpr-tplib-search + .wpr-tplib-filters-wrap .wpr-tplib-filters-list ul li {
width: 100%;
}
.wpr-tplib-price-list {
width: 120px;
padding: 10px;
}
.wpr-tplib-price-list ul {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.wpr-tplib-price-list ul li {
width: 100%;
padding: 8px 12px;
}
.wpr-tplib-template-gird {
position: absolute;
width: 100%;
height: calc(100% - 132px);
overflow: auto;
padding: 0 30px 30px 30px;
margin-left: -10px;
}
.wpr-tplib-template-wrap {
float: left;
overflow: hidden;
width: 18.5%;
margin: 10px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
}
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
content: 'Free';
display: block;
position: absolute;
top: 10px;
right: 10px;
z-index: 1;
width: 45px;
padding: 4px;
font-size: 11px;
line-height: 16px;
font-weight: bold;
letter-spacing: 0.3px;
text-transform: uppercase;
text-align: center;
background: #555;
color: #fff;
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
border-radius: 3px;
}
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
content: 'Pro';
background: #6A4BFF;
}
.wpr-tplib-sidebar[data-license="premium"] + .wpr-tplib-template-gird .wpr-tplib-template-wrap:before {
display: none !important;
}
@media screen and ( max-width: 1364px ) {
.wpr-tplib-template-wrap {
width: 23%;
}
}
.wpr-tplib-template {
}
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-template {
opacity: 1;
visibility: visible;
}
.wpr-tplib-template-media {
position: relative;
background-color: #e8e8e8;
}
.wpr-tplib-template-media img {
width: 100%;
max-width: 100%;
height: auto;
}
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
opacity: 1;
}
.wpr-tplib-template-media-overlay {
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
cursor: pointer;
-webkit-transition: opacity 0.1s ease-in;
-o-transition: opacity 0.1s ease-in;
transition: opacity 0.1s ease-in;
}
.wpr-tplib-template-media-overlay i {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-size: 25px;
}
.wpr-tplib-preview-wrap {
display: none;
}
.wpr-tplib-image {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
padding: 20px;
}
.wpr-tplib-iframe {
position: relative;
padding-top: 56.25%;
}
.wpr-tplib-iframe iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
.wpr-tplib-template-footer {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-flow: column wrap;
flex-flow: column wrap;
-ms-flex-line-pack: justify;
align-content: space-between;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
height: 45px;
padding: 5px 15px;
background-color: #fff;
border-top: 1px solid #efefef;
}
.wpr-tplib-template-footer h3 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
overflow: hidden;
color: #6d7882;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
font-weight: normal;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
/* Sections Grid - Modified */
.wpr-tplib-sections-grid .wpr-tplib-template-media {
min-height: 90px;
}
.wpr-tplib-sections-grid .wpr-tplib-template-footer,
.wpr-tplib-sections-grid .wpr-tplib-template-footer h3 {
display: none;
}
.wpr-tplib-sections-grid .wpr-tplib-template-footer {
align-content: flex-end;
}
.wpr-tplib-sections-grid .wpr-tplib-template-wrap:hover .wpr-tplib-template-footer {
display: flex;
width: 100%;
position: absolute;
bottom: 0;
right: 0;
z-index: 99;
height: 36px;
}
.wpr-tplib-sections-grid .wpr-tplib-template-media-overlay i {
margin-top: -17px;
}
@media screen and ( max-width: 1919px ) {
.wpr-tplib-template-footer h3 span:first-child {
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
overflow: hidden;
max-width: 130px;
white-space: nowrap;
}
}
@media screen and ( max-width: 1366px ) {
.wpr-tplib-template-footer h3 span:first-child {
max-width: 109px;
}
}
@media screen and ( max-width: 1280px ) {
.wpr-tplib-template-footer h3 span:first-child {
max-width: 90px;
}
}
.wpr-tplib-template-footer .wpr-tplib-insert-template {
opacity: 0;
visibility: hidden;
padding: 6px 10px;
color: #fff;
background-color: #6A4BFF;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
line-height: 1;
letter-spacing: 0.3px;
border-radius: 3px;
cursor: pointer;
-webkit-transition: all 0.1s ease-in;
-o-transition: all 0.1s ease-in;
transition: all 0.1s ease-in;
}
#masonry-effect {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.item {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
position: relative;
width: calc(33.3%);
}
.wpr-tplib-template-gird-loading {
text-align: center;
}
.wpr-tplib-template-gird-loading .wpr-wave {
width: 50px;
height: 25px;
text-align: center;
margin: 0 auto;
font-size: 0;
}
.wpr-wave .wpr-rect {
height: 100%;
width: 4px;
margin-right: 2px;
display: inline-block;
-webkit-animation: wpr-waveStretchDelay 1.2s infinite ease-in-out;
animation: wpr-waveStretchDelay 1.2s infinite ease-in-out;
background-color: gray;
}
.wpr-wave .wpr-rect1 {
-webkit-animation-delay: -1.2s;
animation-delay: -1.2s;
}
.wpr-wave .wpr-rect2 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
}
.wpr-wave .wpr-rect3 {
-webkit-animation-delay: -1s;
animation-delay: -1s;
}
.wpr-wave .wpr-rect4 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.wpr-wave .wpr-rect5 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
}
@-webkit-keyframes wpr-waveStretchDelay {
0%,
40%,
100% {
-webkit-transform: scaleY(0.4);
transform: scaleY(0.4);
}
20% {
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
}
@keyframes wpr-waveStretchDelay {
0%,
40%,
100% {
-webkit-transform: scaleY(0.4);
transform: scaleY(0.4);
}
20% {
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
}
/* Elementor Loader */
.wpr-tplib-loader {
overflow: auto;
position: absolute;
width: 100%;
height: 100%;
z-index: 9999999999;
background-color: #f1f3f5;
}
.elementor-loader-wrapper {
position: absolute;
width: 300px;
left: 50%;
top: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.elementor-loader {
border-radius: 7px;
padding: 40px;
height: 150px;
width: 150px;
background-color: rgba(255, 255, 255, 0.9);
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
}
.elementor-loader-boxes {
height: 100%;
width: 100%;
position: relative;
}
.elementor-loader-box {
position: absolute;
background-color: #d5dadf;
-webkit-animation: load 1.8s linear infinite;
animation: load 1.8s linear infinite;
}
.elementor-loader-box:nth-of-type(1) {
width: 20%;
height: 100%;
left: 0;
top: 0;
}
.elementor-loader-box:not(:nth-of-type(1)) {
right: 0;
height: 20%;
width: 60%;
}
.elementor-loader-box:nth-of-type(2) {
top: 0;
-webkit-animation-delay: -0.45s;
animation-delay: -0.45s;
}
.elementor-loader-box:nth-of-type(3) {
top: 40%;
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
}
.elementor-loader-box:nth-of-type(4) {
bottom: 0;
-webkit-animation-delay: -1.35s;
animation-delay: -1.35s;
}
@-webkit-keyframes load {
0% {
opacity: .3;
}
50% {
opacity: 1;
}
100% {
opacity: .3;
}
}
@keyframes load {
0% {
opacity: .3;
}
50% {
opacity: 1;
}
100% {
opacity: .3;
}
}
.elementor-loading-title {
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
color: #a4afb7;
text-align: center;
text-transform: uppercase;
margin-top: 30px;
letter-spacing: 7px;
text-indent: 7px;
font-size: 10px;
width: 100%;
}
/* Scroll Bar */
.wpr-tplib-popup ::-webkit-scrollbar {
width: 6px;
height: 0;
border-radius: 3px;
}
.wpr-tplib-popup ::-webkit-scrollbar-button {
width: 0px;
height: 10px;
}
.wpr-tplib-popup ::-webkit-scrollbar-thumb {
background-color: #d5dadf;
border: 0px none #d5dadf;
border-radius: 3px;
}
.wpr-tplib-popup ::-webkit-scrollbar-track {
border: 0px none #fff;
border-radius: 0;
}
.wpr-tplib-popup ::-webkit-scrollbar-corner {
background: transparent;
}
@@ -0,0 +1,444 @@
.wpr-mm-settings-btn {
visibility: hidden;
opacity: 0;
}
.menu-item-depth-0:hover .wpr-mm-settings-btn {
visibility: visible;
opacity: 1;
}
.wpr-mm-settings-btn {
position: absolute;
top: 5px;
left: 260px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding: 5px 14px 7px;
color: #fff;
background: -webkit-gradient(linear, left top, left bottom, from(#6A4BFF), to(#7E94FE));
background: -o-linear-gradient(#6A4BFF, #7E94FE);
background: linear-gradient(#6A4BFF, #7E94FE);
font-weight: 500;
border-radius: 3px;
cursor: pointer;
}
.wpr-mm-settings-btn span {
content: 'R';
display: inline-block;
font-family: Roboto,Arial,Helvetica,Verdana,sans-serif;
font-size: 8px;
font-weight: bold;
text-align: center;
color: #ffffff;
background-image: -o-linear-gradient(#6A4BFF, #7E94FE);
background-image: -webkit-gradient(linear, left top, left bottom, from(#6A4BFF), to(#7E94FE));
background-image: linear-gradient(#6A4BFF, #7E94FE);
-webkit-box-shadow: 0 0 2px 2px #b8c7ff;
box-shadow: 0 0 2px 2px #b8c7ff;
width: 16px;
height: 16px;
line-height: 16px;
border-radius: 15px;
margin-right: 7px;
}
.wpr-mm-settings-popup-wrap {
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999999;
background-color: rgba(0,0,0,0.3);
}
.wpr-mm-settings-popup {
position: fixed;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
width: 100%;
max-width: 700px;
margin-left: 80px;
background-color: #fff;
-webkit-box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}
.wpr-mm-popup-title {
margin-left: auto;
margin-right: 10px;
border: 1px solid #dcdcde;
background-color: #f6f7f7;
padding: 2px 10px 4px;
}
.wpr-mm-settings-close-popup-btn {
cursor: pointer;
}
.wpr-mm-settings-popup-header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding: 10px;
border-bottom: 1px solid #e8e8e8;
font-weight: 500;
}
.wpr-mm-popup-logo {
padding: 3px;
margin-right: 10px;
border-radius: 50%;
color: transparent;
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
font-weight: bold;
letter-spacing: 0.3px;
}
.wpr-mm-settings-popup-footer {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
padding: 10px;
border-top: 1px solid #e8e8e8;
}
.button.wpr-save-mega-menu-btn {
min-height: 0;
padding: 6px 18px 7px;
color: #fff;
background: #6A4BFF;
border-radius: 3px;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 600;
cursor: pointer;
line-height: 1;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.button.wpr-save-mega-menu-btn:hover {
color: #fff;
background: #5537e1;
}
.wpr-save-mega-menu-btn .dashicons {
display: inline;
line-height: 8px;
font-size: 14px;
vertical-align: sub;
}
.wpr-mm-settings-wrap {
height: 60vh;
overflow-y: scroll;
padding: 20px;
}
.wpr-mm-settings-wrap > h4 {
padding: 5px 10px 7px;
background-color: #f5f3f3;
margin: 5px 0;
}
.wpr-mm-setting {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
padding: 10px;
}
.wpr-mm-setting h4 {
width: 200px;
margin: 0;
}
.wpr-mm-setting > div,
.wpr-mm-setting select,
.wpr-mm-setting input[type="text"] {
width: 168px;
}
.wpr-mm-setting input[type="number"] {
width: 103px;
}
.wpr-mm-setting-switcher input {
position: absolute;
z-index: -1000;
left: -1000px;
overflow: hidden;
clip: rect(0 0 0 0);
height: 1px;
width: 1px;
margin: -1px;
padding: 0;
border: 0;
}
.wpr-mm-setting-switcher label {
position: relative;
display: block;
width: 45px;
height: 23px;
border-radius: 20px;
background: #e8e8e8;
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
}
.wpr-mm-setting-switcher input + label:after {
content: ' ';
display: block;
position: absolute;
top: 3px;
left: 3px;
width: 17px;
height: 17px;
border-radius: 50%;
background: #fff;
-webkit-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
}
.wpr-mm-setting-switcher input:checked + label {
background: #6A4BFF;
}
.wpr-mm-setting-switcher input:checked + label:after {
left: 24px;
}
button.wpr-edit-mega-menu-btn {
padding: 3px 22px !important;
font-size: 12px !important;
}
.wpr-edit-mega-menu-btn i {
font-size: 125%;
margin-right: 3px;
}
.wpr-mm-editor-popup-wrap {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 99999999;
}
.wpr-mm-editor-popup-iframe {
width: calc(100vw - 70px);
height: calc(100vh - 70px);
margin: 35px 25px;
background-color: #f9f9f9;
-webkit-box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}
.wpr-mm-editor-close-popup-btn {
position: absolute;
top: 40px;
right: 55px;
font-size: 50px !important;
}
.wpr-mm-editor-close-popup-btn span {
color: #444;
font-size: 25px;
cursor: pointer;
}
.wpr-mm-editor-close-popup-btn span:hover {
color: #888;
}
.wpr-mm-setting-radius div {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-mm-setting-icon div span {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
width: 30px;
height: 30px;
border: 1px solid #a4afb7;
cursor: pointer;
}
.wpr-mm-setting-icon div span.wpr-mm-active-icon {
background-color: #a4afb7;
color: #fff;
}
.wpr-mm-setting-icon div span:first-child {
border-radius: 3px 0 0 3px;
}
.wpr-mm-setting-icon div span:last-child {
border-radius: 0 3px 3px 0;
}
.wpr-mm-setting-icon input[type="text"] {
width: 0;
padding: 0;
border: 0;
-webkit-box-shadow: none !important;
box-shadow: none !important;
margin-left: -15px;
}
.wpr-mm-setting.iconpicker-container .iconpicker-popover {
padding: 5px;
}
.wpr-mm-setting.iconpicker-container .popover-title {
padding: 0;
}
.wpr-mm-setting.iconpicker-container input[type="search"] {
padding: 5px 10px;
margin: 0 !important;
border: 0;
width: 100%;
}
.wpr-mm-setting.iconpicker-container .arrow {
border-bottom-color: #f7f7f7 !important;
top: -8px !important;
}
.wp-picker-input-wrap .wp-picker-container {
display: none;
}
.wpr-mm-setting select,
.wpr-mm-setting input:not(.iconpicker-input),
.wpr-mm-setting button {
border: 1px solid #e5e5e5 !important;
}
/* Pro Options */
.wpr-mm-pro-setting h4:after,
h4.wpr-mm-pro-heading:after {
content: 'PRO';
margin-left: 5px;
padding: 1px 7px 2px;
color: #fff;
background-color: #f44;
border-radius: 3px;
font-size: 10px;
font-weight: bold;
letter-spacing: 1px;
}
.wpr-mm-pro-section,
.wpr-mm-pro-setting > div {
position: relative;
}
.wpr-mm-pro-section:before,
.wpr-mm-pro-setting > div:before {
content: 'Please upgrade to the Pro Version to access this options.';
display: none;
position: absolute;
left: -20px;
top: -65px;
z-index: 2;
width: 210px;
padding: 10px;
font-size: 12px;
background-color: #fff;
-webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
box-shadow: 1px 1px 5px rgba(0,0,0,0.1);
border: 1px solid #e8e8e8;
border-radius: 4px;
text-align: center;
}
.wpr-mm-pro-section:before {
content: 'Please upgrade to the Pro Version to access these options.';
top: 50%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
padding: 20px 30px;
font-size: 13px;
}
.wpr-mm-pro-section:hover:before,
.wpr-mm-pro-setting > div:hover:before {
display: block;
}
.wpr-mm-pro-setting > div:after,
.wpr-mm-pro-section:after {
content: '';
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.1);
}
.wpr-mm-pro-setting select {
display: none;
}
.wpr-mm-pro-setting .wpr-mm-pro-radio {
display: block;
}
.wpr-mm-pro-radio {
display: none;
padding: 5px 10px;
}
.wpr-mm-setting select option[value*="pro-"] {
background-color: rgba(0,0,0,0.2);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,444 @@
#wpcontent {
padding: 0;
}
.wpr-settings-page-header {
padding: 10px 30px 30px;
}
.wpr-settings-page-header h1 {
font-size: 42px;
}
.wpr-settings-page-header p {
margin-top: 5px;
color: #5a5a5a;
font-size: 16px;
margin-bottom: 30px;
}
.wpr-premade-blocks-tutorial {
display: inline-block;
margin-left: 45px;
padding: 9px 25px;
border: 0;
color: #fff;
background: #6A4BFF;
-webkit-box-shadow: 2px 2px 5px rgb(0 0 0 / 30%);
box-shadow: 2px 2px 5px rgb(0 0 0 / 30%);
font-size: 14px;
text-decoration: none;
border-radius: 3px;
}
.wpr-premade-blocks-tutorial:hover,
.wpr-premade-blocks-tutorial:focus {
color: #fff;
background: #5a39fb;
}
.wpr-tplib-content-wrap {
}
.wpr-tplib-sidebar {
padding: 30px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-tplib-sidebar .wpr-tplib-search {
display: none;
position: relative;
margin: 30px 0;
}
.wpr-tplib-sidebar .wpr-tplib-search i {
position: absolute;
top: 50%;
right: 10px;
font-size: 12px;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.wpr-tplib-sidebar .wpr-tplib-search input {
width: 100%;
padding: 8px 10px;
border: 0;
border-bottom: 1px solid #efefef;
border-radius: 3px;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
color: #9a9a9a;
}
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
color: #9a9a9a;
}
.wpr-tplib-filters-wrap {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-tplib-sub-filters {
display: none;
margin-left: 20px;
}
.wpr-tplib-sub-filters ul {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-tplib-sub-filters ul li {
padding: 10px 25px;
margin-right: 7px;
line-height: 15px;
font-size: 13px;
font-weight: normal;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
cursor: pointer;
border-radius: 3px;
}
.wpr-tplib-sub-filters ul li:hover,
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
background: #6A4BFF;
color: #fff;
}
.wpr-tplib-filters {
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: start;
-ms-flex-align: start;
align-items: flex-start;
position: relative;
width: 200px;
font-size: 14px;
font-weight: normal;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
color: #6d7882;
}
.wpr-tplib-filters h3 {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
padding: 10px 15px;
margin: 0;
font-size: 13px;
font-weight: normal;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
cursor: pointer;
border-radius: 3px;
}
.wpr-tplib-filters h3 span {
width: 100%;
}
.wpr-tplib-filters h3 i.fa-angle-down:before {
content: "\f347";
font-family: dashicons;
line-height: 18px;
font-weight: 400;
font-style: normal;
speak: never;
text-decoration: inherit;
text-transform: none;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-size: 15px;
vertical-align: top;
text-align: center;
}
.wpr-tplib-filters-list {
visibility: hidden;
opacity: 0;
position: absolute;
top: 38px;
z-index: 999;
width: 700px;
padding: 20px 30px;
background: #fff;
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
-webkit-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
border-radius: 3px;
}
.wpr-tplib-filters-list ul {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
margin-top: 0;
}
.wpr-tplib-filters-list ul li {
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 25%;
padding: 12px;
color: #6d7882;
background: #fff;
font-size: 13px;
line-height: 1;
cursor: pointer;
}
.wpr-tplib-filters-list ul li:hover {
background: #f9f9f9;
color: #222;
}
.wpr-tplib-template-gird {
overflow: auto;
margin-left: -10px;
padding: 0 30px;
}
.elementor-clearfix:after {
content: '';
display: block;
clear: both;
width: 0;
height: 0;
}
.wpr-tplib-template-wrap {
position: relative;
float: left;
overflow: hidden;
width: 18.5%;
margin: 10px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
}
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
content: 'Free';
display: block;
position: absolute;
top: 10px;
right: 10px;
z-index: 1;
width: 45px;
padding: 4px;
font-size: 11px;
font-weight: bold;
letter-spacing: 0.3px;
text-transform: uppercase;
text-align: center;
background: #555;
color: #fff;
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
border-radius: 3px;
}
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
content: 'Pro';
background: #6A4BFF;
}
@media screen and ( max-width: 1364px ) {
.wpr-tplib-template-wrap {
width: 23%;
}
}
.wpr-tplib-template {
}
.wpr-tplib-insert-template:not(.wpr-tplib-insert-pro) {
display: none;
}
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-pro {
opacity: 1;
visibility: visible;
}
.wpr-tplib-template-media {
position: relative;
background-color: #e8e8e8;
}
.wpr-tplib-template-media img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
}
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
opacity: 1;
}
.wpr-tplib-template-media-overlay {
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
cursor: pointer;
-webkit-transition: opacity 0.1s ease-in;
-o-transition: opacity 0.1s ease-in;
transition: opacity 0.1s ease-in;
}
.wpr-tplib-template-media-overlay i {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-size: 25px;
}
.wpr-tplib-preview-wrap {
display: none;
}
.wpr-tplib-image {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
padding: 20px;
}
.wpr-tplib-iframe {
position: relative;
padding-top: 56.25%;
}
.wpr-tplib-iframe iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
.wpr-tplib-template-footer {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-flow: column wrap;
flex-flow: column wrap;
-ms-flex-line-pack: justify;
align-content: space-between;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
height: 45px;
padding: 5px 15px;
background-color: #fff;
border-top: 1px solid #efefef;
}
.wpr-tplib-template-footer h3 {
overflow: hidden;
color: #6d7882;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
font-weight: normal;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
.wpr-tplib-template-footer .wpr-tplib-insert-template {
opacity: 0;
visibility: hidden;
padding: 6px 10px;
color: #fff;
background-color: #6A4BFF;
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
font-size: 13px;
line-height: 1;
letter-spacing: 0.3px;
border-radius: 3px;
cursor: pointer;
-webkit-transition: all 0.1s ease-in;
-o-transition: all 0.1s ease-in;
transition: all 0.1s ease-in;
}
#masonry-effect {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.item {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
position: relative;
width: calc(33.3%);
}
/* Disable Notices */
.notice:not(.wpr-plugin-update-notice),
div.fs-notice.updated, div.fs-notice.success {
display: none !important;
}
@@ -0,0 +1,778 @@
.royal-addons_page_wpr-templates-kit #wpwrap {
background: #F6F6F6;
}
.royal-addons_page_wpr-templates-kit #wpcontent {
padding: 0;
}
#wpbody img {
display: block;
max-width: 100%;
width: 100%;
}
.wpr-templates-kit-page > header {
position: sticky;
top: 32px;
z-index: 99;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
background: #fff;
-webkit-box-shadow: 0 0 7px 0 rgba(0,0,0,0.2);
box-shadow: 0 0 7px 0 rgba(0,0,0,0.2);
}
.wpr-templates-kit-logo {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.wpr-templates-kit-logo div {
padding: 20px;
border-right: 1px solid #e8e8e8;
}
.wpr-templates-kit-logo .back-btn {
display: none;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
font-weight: bold;
color: #6d7882;
cursor: pointer;
}
.wpr-templates-kit-logo .back-btn:hover {
color: #222;
}
.wpr-templates-kit-search {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
position: absolute;
top: 20px;
left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
}
.wpr-templates-kit-search input {
width: 500px;
height: 45px;
padding-left: 15px;
background-color: #FBFBFB;
border: none;
border: 1px solid #e8e8e8 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
border-radius: 3px;
}
.wpr-templates-kit-search .dashicons {
margin-left: -32px;
color: #6A4BFF;
}
.wpr-templates-kit-price-filter {
position: relative;
width: 110px;
height: 40px;
margin: 20px;
border: 1px solid #e8e8e8;
line-height: 40px;
padding: 0 20px;
border-radius: 3px;
font-size: 14px;
cursor: pointer;
}
.wpr-templates-kit-price-filter .dashicons {
position: absolute;
right: 12px;
line-height: 40px;
font-size: 14px;
}
.wpr-templates-kit-price-filter:hover ul {
display: block;
}
.wpr-templates-kit-price-filter ul {
display: none;
background: #fff;
position: absolute;
width: 100%;
top: 26px;
left: -1px;
padding: 0;
border: 1px solid #e8e8e8;
}
.wpr-templates-kit-price-filter ul li {
padding: 0 20px;
line-height: 32px;
margin-bottom: 0 !important;
border-bottom: 1px solid #e8e8e8;
}
.wpr-templates-kit-price-filter ul li:last-child {
border-bottom: 0;
}
.wpr-templates-kit-price-filter ul li:hover {
background: #e8e8e8;
}
.wpr-templates-kit-filters {
display: none;
padding: 20px;
}
.wpr-templates-kit-filters div {
padding: 10px 20px;
border: 2px solid #e8e8e8;
border-radius: 3px;
font-size: 16px;
}
.wpr-templates-kit-filters ul {
display: none;
}
.wpr-templates-kit-page-title {
text-align: center;
margin-top: 65px;
margin-bottom: 35px;
}
.wpr-templates-kit-page-title h1 {
font-size: 35px;
color: #555;
}
.button.wpr-options-button {
padding: 3px 18px;
border: 0;
color: #fff;
background: #6A4BFF;
-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
font-size: 14px;
}
.button.wpr-options-button:hover,
.button.wpr-options-button:focus {
color: #fff;
background: #6A4BFF;
border: none;
}
.button.wpr-options-button .dashicons {
font-size: 16px;
line-height: 32px;
}
.wpr-templates-kit-grid {
display: -ms-grid;
display: grid;
-ms-grid-columns: 1fr 20px 1fr 20px 1fr 20px 1fr;
grid-template-columns: repeat(4, 1fr);
grid-column-gap: 30px;
grid-row-gap: 30px;
padding: 30px;
}
.wpr-templates-kit-grid.single-grid {
padding-bottom: 60px;
}
@media screen and (max-width: 1400px) {
.wpr-templates-kit-grid {
-ms-grid-columns: (1fr)[3];
grid-template-columns: repeat(3, 1fr);
}
}
.wpr-templates-kit-grid .grid-item {
position: relative;
overflow: hidden;
border: 1px solid #e8e8e8;
-webkit-box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);
box-shadow: 0 0 3px 0 rgba(0,0,0,0.1);
background: #fff;
}
.wpr-templates-kit-grid .grid-item[data-price="pro"]:before,
.wpr-templates-kit-grid .grid-item[data-expert="true"]:after{
display: block;
position: absolute;
right: 15px;
z-index: 10;
padding: 4px 15px 5px;
font-size: 11px;
text-transform: uppercase;
font-weight: 500;
letter-spacing: .4px;
color: #fff;
-webkit-box-shadow: -1px 1px 5px 2px rgb(0 0 0 / 30%);
box-shadow: -1px 1px 5px 2px rgb(0 0 0 / 30%);
border-radius: 3px;
}
.wpr-templates-kit-grid .grid-item[data-price="pro"]:before {
content: 'Premium';
background: #6a4bff;
top: 30px;
}
.wpr-templates-kit-grid .grid-item[data-expert="true"]:after {
content: 'Expert';
background: red;
top: 62px;
}
.wpr-templates-kit-grid .grid-item[data-price="free"][data-expert="true"]:after {
top: 30px;
}
.wpr-templates-kit-grid .image-wrap {
position: relative;
border-bottom: 1px solid #e8e8e8;
}
.wpr-templates-kit-grid .image-wrap:hover .image-overlay {
opacity: 1;
}
.wpr-templates-kit-grid .image-overlay {
opacity: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.2);
cursor: pointer;
-webkit-transition: opacity 0.2s ease-in;
-o-transition: opacity 0.2s ease-in;
transition: opacity 0.2s ease-in;
}
.wpr-templates-kit-grid .image-overlay .dashicons {
font-size: 30px;
color: #fff;
}
.wpr-templates-kit-grid .grid-item footer {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 15px;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.wpr-templates-kit-grid .grid-item footer h3 {
margin: 0;
font-size: 16px;
text-transform: capitalize;
}
.wpr-templates-kit-grid .grid-item footer span {
position: relative;
min-width: 77px;
height: 20px;
background-color: #5130ef;
color: #fff;
font-size: 12px;
padding: 2px 10px;
border-radius: 3px;
}
span.wpr-woo-builder-label {
background-color: #7B51AD !important;
text-align: center;
}
.wpr-templates-kit-grid .grid-item footer span:after {
display: none;
width: 125px;
position: absolute;
top: -50px;
left: 30%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
transform: translateX(-50%);
padding: 7px 10px;
border-radius: 3px;
background-color: #333;
font-size: 12px;
line-height: 15px;
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.4);
box-shadow: 0 0 5px rgba(0,0,0,0.4);
}
.wpr-templates-kit-grid .grid-item footer span.wpr-theme-builder-label:after {
content: "This Kit includes Theme Builder templates.";
}
.wpr-templates-kit-grid .grid-item footer span.wpr-woo-builder-label:after {
content: "This Kit includes WooCommerce Builder templates.";
}
.wpr-templates-kit-grid .grid-item footer span:hover:after {
display: block;
}
/* TODO: News Magazine X Theme Banner (remove later) */
.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"] {
display: none;
}
.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"] .wpr-templates-kit-newsx-info {
position: absolute;
bottom: 0;
left: -10px;
width: calc(100% - 20px);
margin: 10px 20px;
background: #fff;
padding: 5px 10px;
border-radius: 3px;
font-size: 14px;
color: #333;
box-sizing: border-box;
}
.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"] .wpr-templates-kit-install-newsx {
position: relative;
min-width: 77px;
height: 20px;
background-color: #f54c48;
box-shadow: 0 0 5px rgba(250, 51, 51, 0.3);
color: #fff;
font-size: 12px;
padding: 2px 10px;
border-radius: 3px;
text-align: center;
cursor: pointer;
}
.wpr-templates-kit-newsx-info p:last-child {
font-size: 12px;
}
/* New, Hot, Trending Labels */
.grid-item .label {
display: none;
position: absolute;
top: 30px;
left: 15px;
z-index: 1;
padding: 6px 15px 7px;
line-height: 1;
font-size: 11px;
text-transform: uppercase;
font-weight: 600;
letter-spacing: 0.5px;
color: #fff;
border-radius: 3px;
-webkit-box-shadow: -1px 1px 5px 2px rgba(0,0,0,0.2);
box-shadow: -1px 1px 5px 2px rgba(0,0,0,0.2);
}
.grid-item .label-new {
background-color: #f44 ;
}
.grid-item .label-hot {
background-color: #FFA500 ;
}
.grid-item .label-trending {
background-color: #0077be ;
}
.wpr-templates-kit-single {
display: none;
}
.wpr-templates-kit-expert-notice {
padding: 0 30px;
}
.wpr-templates-kit-expert-notice p {
padding: 20px;
background: #fff;
margin-bottom: 0;
position: relative;
-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.05);
box-shadow: 0 0 5px rgba(0,0,0,0.05);
}
.wpr-templates-kit-expert-notice p .dashicons:first-child,
.wpr-templates-kit-expert-notice p strong:first-of-type {
color: #f44;
}
.wpr-templates-kit-expert-notice p .dashicons:first-child {
font-size: 16px;
position: relative;
top: 2px;
}
.wpr-templates-kit-expert-notice p .dashicons:last-child {
cursor: pointer;
position: absolute;
right: 20px;
}
.wpr-templates-kit-single .grid-item a {
text-decoration: none;
}
.wpr-templates-kit-single .action-buttons-wrap {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 10;
padding: 25px 30px;
background: #fff;
-webkit-box-shadow: 0 0 7px 0 rgba(0,0,0,0.2);
box-shadow: 0 0 7px 0 rgba(0,0,0,0.2);
}
.action-buttons-wrap a,
.action-buttons-wrap button {
padding: 5px 25px !important;
}
.wpr-templates-kit-single .preview-demo {
margin-right: auto;
}
.wpr-templates-kit-single .preview-demo .dashicons {
font-size: 14px;
line-height: 28px;
}
.wpr-templates-kit-single .import-tutorial-link {
text-decoration: none;
align-self: center;
}
.wpr-templates-kit-single .import-kit,
.wpr-templates-kit-single .get-access {
background: #6A4BFF;
color: #fff;
}
.wpr-templates-kit-single .import-kit:hover,
.wpr-templates-kit-single .import-kit:focus,
.wpr-templates-kit-single .get-access:hover,
.wpr-templates-kit-single .get-access:focus {
background: #5130ef;
color: #fff;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.wpr-templates-kit-single .import-kit .dashicons,
.wpr-templates-kit-single .get-access .dashicons {
font-size: 14px;
line-height: 30px;
}
.wpr-templates-kit-single .selected-template {
border: 1px solid #2271B1;
-webkit-box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
}
.import-template-buttons .import-template {
display: none;
}
.wpr-templates-kit-single .import-template strong {
text-transform: capitalize;
}
.wpr-import-kit-popup-wrap {
display: none;
position: relative;
z-index: 9999999;
}
.wpr-import-kit-popup-wrap .overlay {
position: fixed;
top: 0;
left: 0;
z-index: 9999999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
}
.wpr-import-help {
margin-top: 20px;
text-align: right;
}
.wpr-import-help a {
width: 50%;
font-size: 12px;
text-align: right;
text-decoration: none;
color: #8F5D64;
}
.wpr-import-help a:hover {
text-decoration: underline;
}
.wpr-import-help a span {
vertical-align: middle;
margin-bottom: 2px;
font-size: 12px !important;
width: 12px !important;
height: 12px !important;
text-decoration: none !important
}
.wpr-import-kit-popup {
overflow: hidden;
position: fixed;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
z-index: 9999999;
width: 555px;
background: #f5f5f5;
border-radius: 3px;
}
.wpr-import-kit-popup header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
padding-left: 25px;
-webkit-box-shadow: 2px 0 5px 0 rgba(0,0,0,0.2);
box-shadow: 2px 0 5px 0 rgba(0,0,0,0.2);
}
.wpr-import-kit-popup .close-btn {
display: none;
height: 50px;
line-height: 50px;
width: 50px;
cursor: pointer;
border-left: 1px solid #eee;
color: #aaa;
font-size: 22px;
}
.wpr-import-kit-popup .content {
padding: 25px;
}
.wpr-import-kit-popup .content p:first-child {
margin-top: 0;
}
.wpr-import-kit-popup .progress-wrap {
background: #fff;
border-radius: 3px;
margin-top: 25px;
}
.wpr-import-kit-popup .progress-wrap strong {
padding: 10px;
display: block;
}
.wpr-import-kit-popup .progress-bar {
width: 30px;
height: 4px;
background: #2271B1;
}
.dot-flashing {
display: inline-block;
margin-left: 10px;
margin-bottom: -1px;
position: relative;
width: 3px;
height: 3px;
border-radius: 10px;
background-color: #3c434a;
color: #3c434a;
-webkit-animation: dotFlashing 1s infinite linear alternate;
animation: dotFlashing 1s infinite linear alternate;
-webkit-animation-delay: .5s;
animation-delay: .5s;
}
.dot-flashing::before, .dot-flashing::after {
content: '';
display: inline-block;
position: absolute;
top: 0;
}
.dot-flashing::before {
left: -6px;
width: 3px;
height: 3px;
border-radius: 10px;
background-color: #3c434a;
color: #3c434a;
-webkit-animation: dotFlashing 1s infinite alternate;
animation: dotFlashing 1s infinite alternate;
-webkit-animation-delay: 0s;
animation-delay: 0s;
}
.dot-flashing::after {
left: 6px;
width: 3px;
height: 3px;
border-radius: 10px;
background-color: #3c434a;
color: #3c434a;
-webkit-animation: dotFlashing 1s infinite alternate;
animation: dotFlashing 1s infinite alternate;
-webkit-animation-delay: 1s;
animation-delay: 1s;
}
@-webkit-keyframes dotFlashing {
0% {
background-color: #3c434a;
}
50%,
100% {
background-color: #ebe6ff;
}
}
@keyframes dotFlashing {
0% {
background-color: #3c434a;
}
50%,
100% {
background-color: #ebe6ff;
}
}
.wpr-templates-kit-not-found {
display: none;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center
}
.wpr-templates-kit-not-found img {
width: 180px !important;
}
.wpr-templates-kit-not-found h1 {
margin: 0;
}
.wpr-templates-kit-not-found a {
display: inline-block;
padding: 10px 25px;
margin-top: 15px;
background: #6A4BFF;
color: #fff;
text-decoration: none;
border-radius: 3px;
}
.wpr-templates-kit-not-found a:hover {
background: #5836fd;
}
/* Disable Notices */
.notice:not(.wpr-plugin-update-notice),
div.fs-notice.updated, div.fs-notice.success {
display: none !important;
}
/* Impot Error */
.progress-wrap.import-error .progress-bar {
width: 100% !important;
background-color: #ff6060;
}
.progress-wrap.import-error strong span {
font-weight: normal;
font-style: italic;
color: #888;
}
.wpr-import-help.import-error {
text-align: center;
}
.wpr-import-help.import-error a {
width: auto;
display: inline-block;
color: #fff;
background-color: #2271B1;
font-size: 14px;
padding: 5px 15px 6px;
text-decoration: none;
border-radius: 3px;
}
.wpr-import-help.import-error a span {
font-size: 14px !important;
width: 14px !important;
height: 14px !important;
}
/* Responsive */
@media screen and (max-width: 1400px) {
.wpr-templates-kit-search input {
width: 350px;
}
.wpr-templates-kit-expert-notice {
text-align: center;
}
}
@@ -0,0 +1,3 @@
.rek-notice {
display: none !important;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,843 @@
/*--------------------------------------------------------------
== General
--------------------------------------------------------------*/
.wpr-anim-text-inner {
display: inline-block;
position: relative;
text-align: left;
}
.wpr-anim-text-inner b {
display: inline-block;
position: absolute;
white-space: nowrap;
left: 0;
top: 0;
}
.wpr-anim-text-inner b.wpr-anim-text-visible {
position: relative;
}
/*--------------------------------------------------------------
== Rotate 1
--------------------------------------------------------------*/
.wpr-anim-text.wpr-anim-text-type-rotate-1 .wpr-anim-text-inner {
-webkit-perspective: 300px;
perspective: 300px;
}
.wpr-anim-text.wpr-anim-text-type-rotate-1 b {
opacity: 0;
-webkit-transform-origin: 50% 100%;
-ms-transform-origin: 50% 100%;
transform-origin: 50% 100%;
-webkit-transform: rotateX(180deg);
-ms-transform: rotateX(180deg);
transform: rotateX(180deg);
}
.wpr-anim-text.wpr-anim-text-type-rotate-1 b.wpr-anim-text-visible {
opacity: 1;
-webkit-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
transform: rotateX(0deg);
-webkit-animation: wpr-anim-text-rotate-1-in 1.2s;
animation: wpr-anim-text-rotate-1-in 1.2s;
}
.wpr-anim-text.wpr-anim-text-type-rotate-1 b.wpr-anim-text-hidden {
-webkit-transform: rotateX(180deg);
-ms-transform: rotateX(180deg);
transform: rotateX(180deg);
-webkit-animation: wpr-anim-text-rotate-1-out 1.2s;
animation: wpr-anim-text-rotate-1-out 1.2s;
}
@-webkit-keyframes wpr-anim-text-rotate-1-in {
0% {
-webkit-transform: rotateX(180deg);
opacity: 0;
}
35% {
-webkit-transform: rotateX(120deg);
opacity: 0;
}
65% {
opacity: 0;
}
100% {
-webkit-transform: rotateX(360deg);
opacity: 1;
}
}
@keyframes wpr-anim-text-rotate-1-in {
0% {
-webkit-transform: rotateX(180deg);
-ms-transform: rotateX(180deg);
transform: rotateX(180deg);
opacity: 0;
}
35% {
-webkit-transform: rotateX(120deg);
-ms-transform: rotateX(120deg);
transform: rotateX(120deg);
opacity: 0;
}
65% {
opacity: 0;
}
100% {
-webkit-transform: rotateX(360deg);
-ms-transform: rotateX(360deg);
transform: rotateX(360deg);
opacity: 1;
}
}
@-webkit-keyframes wpr-anim-text-rotate-1-out {
0% {
-webkit-transform: rotateX(0deg);
opacity: 1;
}
35% {
-webkit-transform: rotateX(-40deg);
opacity: 1;
}
65% {
opacity: 0;
}
100% {
-webkit-transform: rotateX(180deg);
opacity: 0;
}
}
@keyframes wpr-anim-text-rotate-1-out {
0% {
-webkit-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
transform: rotateX(0deg);
opacity: 1;
}
35% {
-webkit-transform: rotateX(-40deg);
-ms-transform: rotateX(-40deg);
transform: rotateX(-40deg);
opacity: 1;
}
65% {
opacity: 0;
}
100% {
-webkit-transform: rotateX(180deg);
-ms-transform: rotateX(180deg);
transform: rotateX(180deg);
opacity: 0;
}
}
/*--------------------------------------------------------------
== Typing
--------------------------------------------------------------*/
.wpr-anim-text.wpr-anim-text-type-typing .wpr-anim-text-inner {
vertical-align: top;
overflow: hidden;
}
.wpr-anim-text.wpr-anim-text-type-typing b {
visibility: hidden;
}
.wpr-anim-text.wpr-anim-text-type-typing b.wpr-anim-text-visible {
visibility: visible;
}
.wpr-anim-text.wpr-anim-text-type-typing i {
position: absolute;
visibility: hidden;
}
.wpr-anim-text.wpr-anim-text-type-typing i.wpr-anim-text-in {
position: relative;
visibility: visible;
}
@-webkit-keyframes wpr-anim-text-pulse {
0% {
-webkit-transform: translateY(-50%) scale(1);
opacity: 1;
}
40% {
-webkit-transform: translateY(-50%) scale(0.9);
opacity: 0;
}
100% {
-webkit-transform: translateY(-50%) scale(0);
opacity: 0;
}
}
@keyframes wpr-anim-text-pulse {
0% {
-webkit-transform: translateY(-50%) scale(1);
-ms-transform: translateY(-50%) scale(1);
transform: translateY(-50%) scale(1);
opacity: 1;
}
40% {
-webkit-transform: translateY(-50%) scale(0.9);
-ms-transform: translateY(-50%) scale(0.9);
transform: translateY(-50%) scale(0.9);
opacity: 0;
}
100% {
-webkit-transform: translateY(-50%) scale(0);
-ms-transform: translateY(-50%) scale(0);
transform: translateY(-50%) scale(0);
opacity: 0;
}
}
/*--------------------------------------------------------------
== Rotate 2
--------------------------------------------------------------*/
.wpr-anim-text.wpr-anim-text-type-rotate-2 .wpr-anim-text-inner {
-webkit-perspective: 300px;
perspective: 300px;
}
.wpr-anim-text.wpr-anim-text-type-rotate-2 i,
.wpr-anim-text.wpr-anim-text-type-rotate-2 em {
display: inline-block;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.wpr-anim-text.wpr-anim-text-type-rotate-2 b {
opacity: 0;
}
.wpr-anim-text.wpr-anim-text-type-rotate-2 i {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: translateZ(-20px) rotateX(90deg);
-ms-transform: translateZ(-20px) rotateX(90deg);
transform: translateZ(-20px) rotateX(90deg);
opacity: 0;
}
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-rotate-2 i {
opacity: 1;
}
.wpr-anim-text.wpr-anim-text-type-rotate-2 i.wpr-anim-text-in {
-webkit-animation: wpr-anim-text-rotate-2-in 0.4s forwards;
animation: wpr-anim-text-rotate-2-in 0.4s forwards;
}
.wpr-anim-text.wpr-anim-text-type-rotate-2 i.wpr-anim-text-out {
-webkit-animation: wpr-anim-text-rotate-2-out 0.4s forwards;
animation: wpr-anim-text-rotate-2-out 0.4s forwards;
}
.wpr-anim-text.wpr-anim-text-type-rotate-2 em {
-webkit-transform: translateZ(20px);
-ms-transform: translateZ(20px);
transform: translateZ(20px);
}
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 i {
-webkit-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
transform: rotateX(0deg);
opacity: 0;
}
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 i em {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 .wpr-anim-text-visible i {
opacity: 1;
}
@-webkit-keyframes wpr-anim-text-rotate-2-in {
0% {
opacity: 0;
-webkit-transform: translateZ(-20px) rotateX(90deg);
}
60% {
opacity: 1;
-webkit-transform: translateZ(-20px) rotateX(-10deg);
}
100% {
opacity: 1;
-webkit-transform: translateZ(-20px) rotateX(0deg);
}
}
@keyframes wpr-anim-text-rotate-2-in {
0% {
opacity: 0;
-webkit-transform: translateZ(-20px) rotateX(90deg);
-ms-transform: translateZ(-20px) rotateX(90deg);
transform: translateZ(-20px) rotateX(90deg);
}
60% {
opacity: 1;
-webkit-transform: translateZ(-20px) rotateX(-10deg);
-ms-transform: translateZ(-20px) rotateX(-10deg);
transform: translateZ(-20px) rotateX(-10deg);
}
100% {
opacity: 1;
-webkit-transform: translateZ(-20px) rotateX(0deg);
-ms-transform: translateZ(-20px) rotateX(0deg);
transform: translateZ(-20px) rotateX(0deg);
}
}
@-webkit-keyframes wpr-anim-text-rotate-2-out {
0% {
opacity: 1;
-webkit-transform: translateZ(-20px) rotateX(0);
}
60% {
opacity: 0;
-webkit-transform: translateZ(-20px) rotateX(-100deg);
}
100% {
opacity: 0;
-webkit-transform: translateZ(-20px) rotateX(-90deg);
}
}
@keyframes wpr-anim-text-rotate-2-out {
0% {
opacity: 1;
-webkit-transform: translateZ(-20px) rotateX(0);
-ms-transform: translateZ(-20px) rotateX(0);
transform: translateZ(-20px) rotateX(0);
}
60% {
opacity: 0;
-webkit-transform: translateZ(-20px) rotateX(-100deg);
-ms-transform: translateZ(-20px) rotateX(-100deg);
transform: translateZ(-20px) rotateX(-100deg);
}
100% {
opacity: 0;
-webkit-transform: translateZ(-20px) rotateX(-90deg);
-ms-transform: translateZ(-20px) rotateX(-90deg);
transform: translateZ(-20px) rotateX(-90deg);
}
}
/*--------------------------------------------------------------
== Slide
--------------------------------------------------------------*/
.wpr-anim-text.wpr-anim-text-type-slide span {
display: inline-block;
padding: .2em 0;
}
.wpr-anim-text.wpr-anim-text-type-slide .wpr-anim-text-inner {
overflow: hidden;
vertical-align: top;
}
.wpr-anim-text.wpr-anim-text-type-slide b {
opacity: 0;
top: .2em;
}
.wpr-anim-text.wpr-anim-text-type-slide b.wpr-anim-text-visible {
top: 0;
opacity: 1;
-webkit-animation: wpr-anim-text-slide-in 0.6s;
animation: wpr-anim-text-slide-in 0.6s;
}
.wpr-anim-text.wpr-anim-text-type-slide b.wpr-anim-text-hidden {
-webkit-animation: wpr-anim-text-slide-out 0.6s;
animation: wpr-anim-text-slide-out 0.6s;
}
@-webkit-keyframes wpr-anim-text-slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(-100%);
}
60% {
opacity: 1;
-webkit-transform: translateY(20%);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}
@keyframes wpr-anim-text-slide-in {
0% {
opacity: 0;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
}
60% {
opacity: 1;
-webkit-transform: translateY(20%);
-ms-transform: translateY(20%);
transform: translateY(20%);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}
@-webkit-keyframes wpr-anim-text-slide-out {
0% {
opacity: 1;
-webkit-transform: translateY(0);
}
60% {
opacity: 0;
-webkit-transform: translateY(120%);
}
100% {
opacity: 0;
-webkit-transform: translateY(100%);
}
}
@keyframes wpr-anim-text-slide-out {
0% {
opacity: 1;
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
60% {
opacity: 0;
-webkit-transform: translateY(120%);
-ms-transform: translateY(120%);
transform: translateY(120%);
}
100% {
opacity: 0;
-webkit-transform: translateY(100%);
-ms-transform: translateY(100%);
transform: translateY(100%);
}
}
/*--------------------------------------------------------------
== Clip
--------------------------------------------------------------*/
.wpr-anim-text.wpr-anim-text-type-clip span {
display: inline-block;
padding: .2em 0;
}
.wpr-anim-text.wpr-anim-text-type-clip .wpr-anim-text-inner {
overflow: hidden;
vertical-align: top;
}
.wpr-anim-text.wpr-anim-text-type-clip b {
opacity: 0;
}
.wpr-anim-text.wpr-anim-text-type-clip b.wpr-anim-text-visible {
opacity: 1;
}
/*--------------------------------------------------------------
== Zoom
--------------------------------------------------------------*/
.wpr-anim-text.wpr-anim-text-type-zoom .wpr-anim-text-inner {
-webkit-perspective: 300px;
perspective: 300px;
}
.wpr-anim-text.wpr-anim-text-type-zoom b {
opacity: 0;
}
.wpr-anim-text.wpr-anim-text-type-zoom b.wpr-anim-text-visible {
opacity: 1;
-webkit-animation: wpr-anim-text-zoom-in 0.8s;
animation: wpr-anim-text-zoom-in 0.8s;
}
.wpr-anim-text.wpr-anim-text-type-zoom b.wpr-anim-text-hidden {
-webkit-animation: wpr-anim-text-zoom-out 0.8s;
animation: wpr-anim-text-zoom-out 0.8s;
}
@-webkit-keyframes wpr-anim-text-zoom-in {
0% {
opacity: 0;
-webkit-transform: translateZ(100px);
}
100% {
opacity: 1;
-webkit-transform: translateZ(0);
}
}
@keyframes wpr-anim-text-zoom-in {
0% {
opacity: 0;
-webkit-transform: translateZ(100px);
-ms-transform: translateZ(100px);
transform: translateZ(100px);
}
100% {
opacity: 1;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
}
}
@-webkit-keyframes wpr-anim-text-zoom-out {
0% {
opacity: 1;
-webkit-transform: translateZ(0);
}
100% {
opacity: 0;
-webkit-transform: translateZ(-100px);
}
}
@keyframes wpr-anim-text-zoom-out {
0% {
opacity: 1;
-webkit-transform: translateZ(0);
-ms-transform: translateZ(0);
transform: translateZ(0);
}
100% {
opacity: 0;
-webkit-transform: translateZ(-100px);
-ms-transform: translateZ(-100px);
transform: translateZ(-100px);
}
}
/*--------------------------------------------------------------
== Rotate-3
--------------------------------------------------------------*/
.wpr-anim-text.wpr-anim-text-type-rotate-3 .wpr-anim-text-inner {
-webkit-perspective: 300px;
perspective: 300px;
}
.wpr-anim-text.wpr-anim-text-type-rotate-3 b {
opacity: 0;
}
.wpr-anim-text.wpr-anim-text-type-rotate-3 i {
display: inline-block;
-webkit-transform: rotateY(180deg);
-ms-transform: rotateY(180deg);
transform: rotateY(180deg);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-rotate-3 i {
-webkit-transform: rotateY(0deg);
-ms-transform: rotateY(0deg);
transform: rotateY(0deg);
}
.wpr-anim-text.wpr-anim-text-type-rotate-3 i.wpr-anim-text-in {
-webkit-animation: wpr-anim-text-rotate-3-in 0.6s forwards;
animation: wpr-anim-text-rotate-3-in 0.6s forwards;
}
.wpr-anim-text.wpr-anim-text-type-rotate-3 i.wpr-anim-text-out {
-webkit-animation: wpr-anim-text-rotate-3-out 0.6s forwards;
animation: wpr-anim-text-rotate-3-out 0.6s forwards;
}
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-3 i {
-webkit-transform: rotateY(0deg);
-ms-transform: rotateY(0deg);
transform: rotateY(0deg);
opacity: 0;
}
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-3 .wpr-anim-text-visible i {
opacity: 1;
}
@-webkit-keyframes wpr-anim-text-rotate-3-in {
0% {
-webkit-transform: rotateY(180deg);
}
100% {
-webkit-transform: rotateY(0deg);
}
}
@keyframes wpr-anim-text-rotate-3-in {
0% {
-webkit-transform: rotateY(180deg);
-ms-transform: rotateY(180deg);
transform: rotateY(180deg);
}
100% {
-webkit-transform: rotateY(0deg);
-ms-transform: rotateY(0deg);
transform: rotateY(0deg);
}
}
@-webkit-keyframes wpr-anim-text-rotate-3-out {
0% {
-webkit-transform: rotateY(0);
}
100% {
-webkit-transform: rotateY(-180deg);
}
}
@keyframes wpr-anim-text-rotate-3-out {
0% {
-webkit-transform: rotateY(0);
-ms-transform: rotateY(0);
transform: rotateY(0);
}
100% {
-webkit-transform: rotateY(-180deg);
-ms-transform: rotateY(-180deg);
transform: rotateY(-180deg);
}
}
/*--------------------------------------------------------------
== Scale
--------------------------------------------------------------*/
.wpr-anim-text.wpr-anim-text-type-scale b {
opacity: 0;
}
.wpr-anim-text.wpr-anim-text-type-scale i {
display: inline-block;
opacity: 0;
-webkit-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
}
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-scale i {
opacity: 1;
}
.wpr-anim-text.wpr-anim-text-type-scale i.wpr-anim-text-in {
-webkit-animation: wpr-anim-text-scale-up 0.6s forwards;
animation: wpr-anim-text-scale-up 0.6s forwards;
}
.wpr-anim-text.wpr-anim-text-type-scale i.wpr-anim-text-out {
-webkit-animation: wpr-anim-text-scale-down 0.6s forwards;
animation: wpr-anim-text-scale-down 0.6s forwards;
}
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-scale i {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 0;
}
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-scale .wpr-anim-text-visible i {
opacity: 1;
}
@-webkit-keyframes wpr-anim-text-scale-up {
0% {
-webkit-transform: scale(0);
opacity: 0;
}
60% {
-webkit-transform: scale(1.2);
opacity: 1;
}
100% {
-webkit-transform: scale(1);
opacity: 1;
}
}
@keyframes wpr-anim-text-scale-up {
0% {
-webkit-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
opacity: 0;
}
60% {
-webkit-transform: scale(1.2);
-ms-transform: scale(1.2);
transform: scale(1.2);
opacity: 1;
}
100% {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 1;
}
}
@-webkit-keyframes wpr-anim-text-scale-down {
0% {
-webkit-transform: scale(1);
opacity: 1;
}
60% {
-webkit-transform: scale(0);
opacity: 0;
}
}
@keyframes wpr-anim-text-scale-down {
0% {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 1;
}
60% {
-webkit-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
opacity: 0;
}
}
/*--------------------------------------------------------------
== Push
--------------------------------------------------------------*/
.wpr-anim-text-type-push {
overflow: hidden;
}
.wpr-anim-text.wpr-anim-text-type-push b {
opacity: 0;
}
.wpr-anim-text.wpr-anim-text-type-push b.wpr-anim-text-visible {
opacity: 1;
-webkit-animation: wpr-anim-text-push-in 0.6s;
animation: wpr-anim-text-push-in 0.6s;
}
.wpr-anim-text.wpr-anim-text-type-push b.wpr-anim-text-hidden {
-webkit-animation: wpr-anim-text-push-out 0.6s;
animation: wpr-anim-text-push-out 0.6s;
}
@-webkit-keyframes wpr-anim-text-push-in {
0% {
opacity: 0;
-webkit-transform: translateX(-100%);
}
60% {
opacity: 1;
-webkit-transform: translateX(10%);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}
@keyframes wpr-anim-text-push-in {
0% {
opacity: 0;
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
}
60% {
opacity: 1;
-webkit-transform: translateX(10%);
-ms-transform: translateX(10%);
transform: translateX(10%);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
}
@-webkit-keyframes wpr-anim-text-push-out {
0% {
opacity: 1;
-webkit-transform: translateX(0);
}
60% {
opacity: 0;
-webkit-transform: translateX(110%);
}
100% {
opacity: 0;
-webkit-transform: translateX(100%);
}
}
@keyframes wpr-anim-text-push-out {
0% {
opacity: 1;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
60% {
opacity: 0;
-webkit-transform: translateX(110%);
-ms-transform: translateX(110%);
transform: translateX(110%);
}
100% {
opacity: 0;
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,192 @@
/*!
* WPR Link Animations
* Version: 1.0
* Author: WP Royal
* Author URL: https://royal-elementor-addons.com/
* WPR Animations Copyright WP Royal 2020.
*/
.wpr-pointer-item {
position: relative;
}
.wpr-pointer-double-line .wpr-pointer-item:before,
.wpr-pointer-double-line .wpr-pointer-item:after,
.wpr-pointer-underline .wpr-pointer-item:after,
.wpr-pointer-overline .wpr-pointer-item:before {
content: '';
display: block;
height: 4px;
width: 100%;
left: 0;
background-color: #55595c;
z-index: 2;
}
.wpr-pointer-fx-none .wpr-pointer-item:before,
.wpr-pointer-fx-none .wpr-pointer-item:after {
opacity: 0;
-webkit-transition: none !important;
-o-transition: none !important;
transition: none !important;
}
.wpr-pointer-fx-none .wpr-pointer-item:hover:before,
.wpr-pointer-fx-none .wpr-pointer-item:hover:after {
opacity: 1;
}
.wpr-pointer-fx-fade .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:after,
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after,
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
opacity: 0;
-webkit-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:before,
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:after {
opacity: 1;
}
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:after {
width: 0;
-webkit-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
-o-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
transition: all .3s cubic-bezier(.175,.885,.32,1.075);
}
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:before,
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:after {
width: 100%;
}
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after {
position: absolute;
width: 0;
margin: 0 auto;
left: 0;
right: 0;
-webkit-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
-o-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
-webkit-transition: all .3s ease(0, 0, 0.16, 0.95);
-o-transition: all .3s ease(0, 0, 0.16, 0.95);
transition: all .3s ease(0, 0, 0.16, 0.95);
}
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:after {
opacity: 1;
width: 100%;
}
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before {
position: absolute;
top: -10px;
}
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:before {
top: 0;
opacity: 1;
}
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
position: absolute;
bottom: -10px;
}
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:after {
bottom: 0;
opacity: 1;
}
.wpr-pointer-border-fx .wpr-pointer-item:before {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 2;
opacity: 0;
border: 2px solid #000;
-webkit-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.wpr-pointer-border-fx .wpr-pointer-item:hover:before {
opacity: 1;
}
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:before {
-webkit-transform: scale(0.9);
-ms-transform: scale(0.9);
transform: scale(0.9);
}
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before,
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before {
-webkit-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
}
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:hover:before {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.wpr-pointer-background-fx .wpr-pointer-item:before {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
opacity: 0;
background: #000;
-webkit-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.wpr-pointer-background-fx .wpr-pointer-item:hover:before {
opacity: 1;
}
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:before {
-webkit-transform: translateY(-12%);
-ms-transform: translateY(-12%);
transform: translateY(-12%);
}
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:before {
-webkit-transform: perspective(600px) rotateX(90deg);
transform: perspective(600px) rotateX(90deg);
-webkit-transform-origin: center bottom 0;
-ms-transform-origin: center bottom 0;
transform-origin: center bottom 0;
}
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:hover:before {
-webkit-transform: perspective(600px) rotateX(0deg);
transform: perspective(600px) rotateX(0deg);
}
@@ -0,0 +1,192 @@
/*!
* WPR Link Animations
* Version: 1.0
* Author: WP Royal
* Author URL: https://royal-elementor-addons.com/
* WPR Animations Copyright WP Royal 2020.
*/
.wpr-pointer-item {
position: relative;
}
.wpr-pointer-double-line .wpr-pointer-item:before,
.wpr-pointer-double-line .wpr-pointer-item:after,
.wpr-pointer-underline .wpr-pointer-item:after,
.wpr-pointer-overline .wpr-pointer-item:before {
content: '';
display: block;
height: 0px;
width: 100%;
left: 0;
background-color: #55595c;
z-index: 2;
}
.wpr-pointer-fx-none .wpr-pointer-item:before,
.wpr-pointer-fx-none .wpr-pointer-item:after {
opacity: 0;
-webkit-transition: none !important;
-o-transition: none !important;
transition: none !important;
}
.wpr-pointer-fx-none .wpr-pointer-item:hover:before,
.wpr-pointer-fx-none .wpr-pointer-item:hover:after {
opacity: 1;
}
.wpr-pointer-fx-fade .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:after,
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after,
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
opacity: 0;
-webkit-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:before,
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:after {
opacity: 1;
}
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:after {
width: 0;
-webkit-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
-o-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
transition: all .3s cubic-bezier(.175,.885,.32,1.075);
}
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:before,
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:after {
width: 100%;
}
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after {
position: absolute;
width: 0;
margin: 0 auto;
left: 0;
right: 0;
-webkit-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
-o-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
-webkit-transition: all .3s ease(0, 0, 0.16, 0.95);
-o-transition: all .3s ease(0, 0, 0.16, 0.95);
transition: all .3s ease(0, 0, 0.16, 0.95);
}
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:after {
opacity: 1;
width: 100%;
}
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before {
position: absolute;
top: -10px;
}
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:before {
top: 0;
opacity: 1;
}
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
position: absolute;
bottom: -10px;
}
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:after {
bottom: 0;
opacity: 1;
}
.wpr-pointer-border-fx .wpr-pointer-item:before {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 2;
opacity: 0;
border: 2px solid #000;
-webkit-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.wpr-pointer-border-fx .wpr-pointer-item:hover:before {
opacity: 1;
}
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:before {
-webkit-transform: scale(0.9);
-ms-transform: scale(0.9);
transform: scale(0.9);
}
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before,
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before {
-webkit-transform: scale(1.1);
-ms-transform: scale(1.1);
transform: scale(1.1);
}
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:hover:before {
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.wpr-pointer-background-fx .wpr-pointer-item:before {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
opacity: 0;
background: #000;
-webkit-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.wpr-pointer-background-fx .wpr-pointer-item:hover:before {
opacity: 1;
}
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:before {
-webkit-transform: translateY(-12%);
-ms-transform: translateY(-12%);
transform: translateY(-12%);
}
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:before {
-webkit-transform: perspective(600px) rotateX(90deg);
transform: perspective(600px) rotateX(90deg);
-webkit-transform-origin: center bottom 0;
-ms-transform-origin: center bottom 0;
transform-origin: center bottom 0;
}
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:hover:before {
-webkit-transform: perspective(600px) rotateX(0deg);
transform: perspective(600px) rotateX(0deg);
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,49 @@
.bricklayer {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: start;
-webkit-align-items: flex-start;
-ms-flex-align: start;
align-items: flex-start;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.bricklayer-column-sizer {
width: 100%;
display: none;
}
@media screen and (min-width: 640px) {
.bricklayer-column-sizer {
width: 50%;
}
}
@media screen and (min-width: 980px) {
.bricklayer-column-sizer {
width: 33.333%;
}
}
@media screen and (min-width: 1200px) {
.bricklayer-column-sizer {
width: 25%;
}
}
.bricklayer-column {
-webkit-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding-left: 5px;
padding-right: 5px;
}
@@ -0,0 +1 @@
.bricklayer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.bricklayer-column-sizer{width:100%;display:none}@media screen and (min-width:640px){.bricklayer-column-sizer{width:50%}}@media screen and (min-width:980px){.bricklayer-column-sizer{width:33.333%}}@media screen and (min-width:1200px){.bricklayer-column-sizer{width:25%}}.bricklayer-column{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;padding-left:5px;padding-right:5px}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,47 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
<json>
<![CDATA[
{
"fontFamily": "lg",
"majorVersion": 1,
"minorVersion": 0,
"fontURL": "https://github.com/sachinchoolur/lightGallery",
"copyright": "sachin",
"license": "MLT",
"licenseURL": "http://opensource.org/licenses/MIT",
"version": "Version 1.0",
"fontId": "lg",
"psName": "lg",
"subFamily": "Regular",
"fullName": "lg",
"description": "Font generated by IcoMoon."
}
]]>
</json>
</metadata>
<defs>
<font id="lg" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe01a;" glyph-name="pause_circle_outline" data-tags="pause_circle_outline" d="M554 256.667v340h86v-340h-86zM512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM384 256.667v340h86v-340h-86z" />
<glyph unicode="&#xe01d;" glyph-name="play_circle_outline" data-tags="play_circle_outline" d="M512 84.667q140 0 241 101t101 241-101 241-241 101-241-101-101-241 101-241 241-101zM512 852.667q176 0 301-125t125-301-125-301-301-125-301 125-125 301 125 301 301 125zM426 234.667v384l256-192z" />
<glyph unicode="&#xe033;" glyph-name="stack-2" data-tags="stack-2" d="M384 853.334h426.667q53 0 90.5-37.5t37.5-90.5v-426.667q0-53-37.5-90.5t-90.5-37.5h-426.667q-53 0-90.5 37.5t-37.5 90.5v426.667q0 53 37.5 90.5t90.5 37.5zM170.667 675.334v-547.333q0-17.667 12.5-30.167t30.167-12.5h547.333q-13.333-37.667-46.333-61.5t-74.333-23.833h-426.667q-53 0-90.5 37.5t-37.5 90.5v426.667q0 41.333 23.833 74.333t61.5 46.333zM810.667 768h-426.667q-17.667 0-30.167-12.5t-12.5-30.167v-426.667q0-17.667 12.5-30.167t30.167-12.5h426.667q17.667 0 30.167 12.5t12.5 30.167v426.667q0 17.667-12.5 30.167t-30.167 12.5z" />
<glyph unicode="&#xe070;" glyph-name="clear" data-tags="clear" d="M810 664.667l-238-238 238-238-60-60-238 238-238-238-60 60 238 238-238 238 60 60 238-238 238 238z" />
<glyph unicode="&#xe094;" glyph-name="arrow-left" data-tags="arrow-left" d="M426.667 768q17.667 0 30.167-12.5t12.5-30.167q0-18-12.667-30.333l-225.667-225.667h665q17.667 0 30.167-12.5t12.5-30.167-12.5-30.167-30.167-12.5h-665l225.667-225.667q12.667-12.333 12.667-30.333 0-17.667-12.5-30.167t-30.167-12.5q-18 0-30.333 12.333l-298.667 298.667q-12.333 13-12.333 30.333t12.333 30.333l298.667 298.667q12.667 12.333 30.333 12.333z" />
<glyph unicode="&#xe095;" glyph-name="arrow-right" data-tags="arrow-right" d="M597.333 768q18 0 30.333-12.333l298.667-298.667q12.333-12.333 12.333-30.333t-12.333-30.333l-298.667-298.667q-12.333-12.333-30.333-12.333-18.333 0-30.5 12.167t-12.167 30.5q0 18 12.333 30.333l226 225.667h-665q-17.667 0-30.167 12.5t-12.5 30.167 12.5 30.167 30.167 12.5h665l-226 225.667q-12.333 12.333-12.333 30.333 0 18.333 12.167 30.5t30.5 12.167z" />
<glyph unicode="&#xe0f2;" glyph-name="vertical_align_bottom" data-tags="vertical_align_bottom" d="M170 128.667h684v-86h-684v86zM682 384.667l-170-172-170 172h128v426h84v-426h128z" />
<glyph unicode="&#xe1ff;" glyph-name="apps" data-tags="apps" d="M682 84.667v172h172v-172h-172zM682 340.667v172h172v-172h-172zM426 596.667v172h172v-172h-172zM682 768.667h172v-172h-172v172zM426 340.667v172h172v-172h-172zM170 340.667v172h172v-172h-172zM170 84.667v172h172v-172h-172zM426 84.667v172h172v-172h-172zM170 596.667v172h172v-172h-172z" />
<glyph unicode="&#xe20c;" glyph-name="fullscreen" data-tags="fullscreen" d="M598 724.667h212v-212h-84v128h-128v84zM726 212.667v128h84v-212h-212v84h128zM214 512.667v212h212v-84h-128v-128h-84zM298 340.667v-128h128v-84h-212v212h84z" />
<glyph unicode="&#xe20d;" glyph-name="fullscreen_exit" data-tags="fullscreen_exit" d="M682 596.667h128v-84h-212v212h84v-128zM598 128.667v212h212v-84h-128v-128h-84zM342 596.667v128h84v-212h-212v84h128zM214 256.667v84h212v-212h-84v128h-128z" />
<glyph unicode="&#xe311;" glyph-name="zoom_in" data-tags="zoom_in" d="M512 512.667h-86v-86h-42v86h-86v42h86v86h42v-86h86v-42zM406 340.667q80 0 136 56t56 136-56 136-136 56-136-56-56-136 56-136 136-56zM662 340.667l212-212-64-64-212 212v34l-12 12q-76-66-180-66-116 0-197 80t-81 196 81 197 197 81 196-81 80-197q0-104-66-180l12-12h34z" />
<glyph unicode="&#xe312;" glyph-name="zoom_out" data-tags="zoom_out" d="M298 554.667h214v-42h-214v42zM406 340.667q80 0 136 56t56 136-56 136-136 56-136-56-56-136 56-136 136-56zM662 340.667l212-212-64-64-212 212v34l-12 12q-76-66-180-66-116 0-197 80t-81 196 81 197 197 81 196-81 80-197q0-104-66-180l12-12h34z" />
<glyph unicode="&#xe80d;" glyph-name="share" data-tags="share" d="M768 252.667c68 0 124-56 124-124s-56-126-124-126-124 58-124 126c0 10 0 20 2 28l-302 176c-24-22-54-34-88-34-70 0-128 58-128 128s58 128 128 128c34 0 64-12 88-34l300 174c-2 10-4 20-4 30 0 70 58 128 128 128s128-58 128-128-58-128-128-128c-34 0-64 14-88 36l-300-176c2-10 4-20 4-30s-2-20-4-30l304-176c22 20 52 32 84 32z" />
<glyph unicode="&#xe901;" glyph-name="facebook-with-circle" data-tags="facebook-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM628.429 612.659h-73.882c-8.755 0-18.483-11.52-18.483-26.829v-53.35h92.416l-13.978-76.083h-78.438v-228.403h-87.194v228.403h-79.104v76.083h79.104v44.749c0 64.205 44.544 116.378 105.677 116.378h73.882v-80.947z" />
<glyph unicode="&#xe902;" glyph-name="google-with-circle" data-tags="google+-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM483.686 249.805c-30.874-15.002-64.102-16.589-76.954-16.589-2.458 0-3.84 0-3.84 0s-1.178 0-2.765 0c-20.070 0-119.962 4.608-119.962 95.59 0 89.395 108.8 96.41 142.131 96.41h0.87c-19.251 25.702-15.258 51.61-15.258 51.61-1.69-0.102-4.147-0.205-7.168-0.205-12.544 0-36.762 1.997-57.549 15.411-25.498 16.384-38.4 44.288-38.4 82.893 0 109.107 119.142 113.51 120.32 113.613h118.989v-2.611c0-13.312-23.91-15.923-40.192-18.125-5.53-0.819-16.64-1.894-19.763-3.482 30.157-16.128 35.021-41.421 35.021-79.104 0-42.906-16.794-65.587-34.611-81.51-11.059-9.882-19.712-17.613-19.712-28.006 0-10.189 11.878-20.582 25.702-32.717 22.579-19.917 53.555-47.002 53.555-92.723 0-47.258-20.326-81.050-60.416-100.454zM742.4 460.8h-76.8v-76.8h-51.2v76.8h-76.8v51.2h76.8v76.8h51.2v-76.8h76.8v-51.2zM421.018 401.92c-2.662 0-5.325-0.102-8.038-0.307-22.733-1.69-43.725-10.189-58.88-24.013-15.053-13.619-22.733-30.822-21.658-48.179 2.304-36.403 41.37-57.702 88.832-54.323 46.694 3.379 77.824 30.31 75.571 66.714-2.15 34.202-31.898 60.109-75.827 60.109zM465.766 599.808c-12.39 43.52-32.358 56.422-63.386 56.422-3.328 0-6.707-0.512-9.933-1.382-13.466-3.84-24.166-15.053-30.106-31.744-6.093-16.896-6.451-34.509-1.229-54.579 9.472-35.891 34.97-61.901 60.672-61.901 3.379 0 6.758 0.41 9.933 1.382 28.109 7.885 45.722 50.79 34.048 91.802z" />
<glyph unicode="&#xe903;" glyph-name="pinterest-with-circle" data-tags="pinterest-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM545.638 344.32c-31.539 2.406-44.749 18.022-69.427 32.973-13.568-71.219-30.157-139.52-79.309-175.206-15.206 107.725 22.221 188.518 39.629 274.381-29.645 49.92 3.533 150.323 66.099 125.645 76.954-30.515-66.662-185.6 29.747-205.005 100.659-20.173 141.773 174.694 79.36 237.978-90.214 91.494-262.502 2.099-241.306-128.87 5.12-32 38.246-41.728 13.21-85.914-57.702 12.8-74.957 58.317-72.704 118.989 3.533 99.328 89.242 168.909 175.155 178.483 108.698 12.083 210.688-39.885 224.819-142.182 15.821-115.405-49.101-240.282-165.274-231.27z" />
<glyph unicode="&#xe904;" glyph-name="twitter-with-circle" data-tags="twitter-with-circle" d="M512 952.32c-271.462 0-491.52-220.058-491.52-491.52s220.058-491.52 491.52-491.52 491.52 220.058 491.52 491.52-220.058 491.52-491.52 491.52zM711.936 549.683c0.205-4.198 0.256-8.397 0.256-12.493 0-128-97.331-275.507-275.405-275.507-54.682 0-105.574 15.974-148.378 43.52 7.526-0.922 15.258-1.28 23.091-1.28 45.363 0 87.091 15.411 120.218 41.421-42.342 0.819-78.080 28.774-90.419 67.174 5.888-1.075 11.93-1.69 18.176-1.69 8.806 0 17.408 1.178 25.498 3.379-44.288 8.909-77.67 48.026-77.67 94.925v1.178c13.056-7.219 28.006-11.622 43.878-12.134-26.010 17.408-43.059 47.002-43.059 80.64 0 17.715 4.762 34.406 13.107 48.691 47.77-58.573 119.040-97.075 199.526-101.222-1.69 7.117-2.509 14.49-2.509 22.118 0 53.402 43.315 96.819 96.819 96.819 27.802 0 52.992-11.776 70.656-30.618 22.067 4.403 42.752 12.39 61.44 23.501-7.219-22.579-22.528-41.574-42.547-53.606 19.61 2.406 38.246 7.578 55.603 15.309-12.954-19.405-29.389-36.506-48.282-50.125z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

@@ -0,0 +1,982 @@
/*! lightgallery - v1.6.12 - 2019-02-19
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2019 Sachin N; Licensed GPLv3 */
@font-face {
font-family: 'lg';
src: url("fonts/lg.eot?n1z373");
src: url("fonts/lg.eot?#iefixn1z373") format("embedded-opentype"), url("fonts/lg.woff?n1z373") format("woff"), url("fonts/lg.ttf?n1z373") format("truetype"), url("fonts/lg.svg?n1z373#lg") format("svg");
font-weight: normal;
font-style: normal;
}
.lg-icon {
font-family: 'lg';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.lg-actions .lg-next, .lg-actions .lg-prev {
background-color: rgba(0, 0, 0, 0.45);
border-radius: 2px;
color: #999;
cursor: pointer;
display: block;
font-size: 22px;
margin-top: -10px;
padding: 8px 10px 9px;
position: absolute;
top: 50%;
z-index: 1080;
border: none;
outline: none;
}
.lg-actions .lg-next.disabled, .lg-actions .lg-prev.disabled {
pointer-events: none;
opacity: 0.5;
}
.lg-actions .lg-next:hover, .lg-actions .lg-prev:hover {
color: #FFF;
}
.lg-actions .lg-next {
right: 20px;
}
.lg-actions .lg-next:before {
content: "\e095";
}
.lg-actions .lg-prev {
left: 20px;
}
.lg-actions .lg-prev:after {
content: "\e094";
}
@-webkit-keyframes lg-right-end {
0% {
left: 0;
}
50% {
left: -30px;
}
100% {
left: 0;
}
}
@-moz-keyframes lg-right-end {
0% {
left: 0;
}
50% {
left: -30px;
}
100% {
left: 0;
}
}
@-ms-keyframes lg-right-end {
0% {
left: 0;
}
50% {
left: -30px;
}
100% {
left: 0;
}
}
@keyframes lg-right-end {
0% {
left: 0;
}
50% {
left: -30px;
}
100% {
left: 0;
}
}
@-webkit-keyframes lg-left-end {
0% {
left: 0;
}
50% {
left: 30px;
}
100% {
left: 0;
}
}
@-moz-keyframes lg-left-end {
0% {
left: 0;
}
50% {
left: 30px;
}
100% {
left: 0;
}
}
@-ms-keyframes lg-left-end {
0% {
left: 0;
}
50% {
left: 30px;
}
100% {
left: 0;
}
}
@keyframes lg-left-end {
0% {
left: 0;
}
50% {
left: 30px;
}
100% {
left: 0;
}
}
.lg-outer.lg-right-end .lg-object {
-webkit-animation: lg-right-end 0.3s;
-o-animation: lg-right-end 0.3s;
animation: lg-right-end 0.3s;
position: relative;
}
.lg-outer.lg-left-end .lg-object {
-webkit-animation: lg-left-end 0.3s;
-o-animation: lg-left-end 0.3s;
animation: lg-left-end 0.3s;
position: relative;
}
.lg-toolbar {
z-index: 1082;
left: 0;
position: absolute;
top: 0;
width: 100%;
background-color: rgba(0, 0, 0, 0.45);
}
.lg-toolbar .lg-icon {
color: #999;
cursor: pointer;
float: right;
font-size: 24px;
height: 47px;
line-height: 27px;
padding: 10px 0;
text-align: center;
width: 50px;
text-decoration: none !important;
outline: medium none;
-webkit-transition: color 0.2s linear;
-o-transition: color 0.2s linear;
transition: color 0.2s linear;
}
.lg-toolbar .lg-icon:hover {
color: #FFF;
}
.lg-toolbar .lg-close:after {
content: "\e070";
}
.lg-toolbar .lg-download:after {
content: "\e0f2";
}
.lg-sub-html {
background-color: rgba(0, 0, 0, 0.45);
bottom: 0;
color: #EEE;
font-size: 16px;
left: 0;
padding: 10px 40px;
position: fixed;
right: 0;
text-align: center;
z-index: 1080;
}
.lg-sub-html h4 {
margin: 0;
font-size: 13px;
font-weight: bold;
}
.lg-sub-html p {
font-size: 12px;
margin: 5px 0 0;
}
#lg-counter {
color: #999;
display: inline-block;
font-size: 16px;
padding-left: 20px;
padding-top: 12px;
vertical-align: middle;
}
.lg-toolbar, .lg-prev, .lg-next {
opacity: 1;
-webkit-transition: -webkit-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
-moz-transition: -moz-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
-o-transition: -o-transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.35s cubic-bezier(0, 0, 0.25, 1) 0s, color 0.2s linear;
}
.lg-hide-items .lg-prev {
opacity: 0;
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
.lg-hide-items .lg-next {
opacity: 0;
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
.lg-hide-items .lg-toolbar {
opacity: 0;
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object {
-webkit-transform: scale3d(0.5, 0.5, 0.5);
transform: scale3d(0.5, 0.5, 0.5);
opacity: 0;
-webkit-transition: -webkit-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
-moz-transition: -moz-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
-o-transition: -o-transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
transition: transform 250ms cubic-bezier(0, 0, 0.25, 1) 0s, opacity 250ms cubic-bezier(0, 0, 0.25, 1) !important;
-webkit-transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
transform-origin: 50% 50%;
}
body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
opacity: 1;
}
.lg-outer .lg-thumb-outer {
background-color: #0D0A0A;
bottom: 0;
position: absolute;
width: 100%;
z-index: 1080;
max-height: 350px;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
-moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
-o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) 0s;
}
.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: -o-grab;
cursor: -ms-grab;
cursor: grab;
}
.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: -o-grabbing;
cursor: -ms-grabbing;
cursor: grabbing;
}
.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb {
-webkit-transition-duration: 0s !important;
transition-duration: 0s !important;
}
.lg-outer.lg-thumb-open .lg-thumb-outer {
-webkit-transform: translate3d(0, 0%, 0);
transform: translate3d(0, 0%, 0);
}
.lg-outer .lg-thumb {
padding: 10px 0;
height: 100%;
margin-bottom: -5px;
}
.lg-outer .lg-thumb-item {
border-radius: 5px;
cursor: pointer;
float: left;
overflow: hidden;
height: 100%;
border: 2px solid #FFF;
border-radius: 4px;
margin-bottom: 5px;
}
@media (min-width: 1025px) {
.lg-outer .lg-thumb-item {
-webkit-transition: border-color 0.25s ease;
-o-transition: border-color 0.25s ease;
transition: border-color 0.25s ease;
}
}
.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover {
border-color: #a90707;
}
.lg-outer .lg-thumb-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.lg-outer.lg-has-thumb .lg-item {
padding-bottom: 120px;
}
.lg-outer.lg-can-toggle .lg-item {
padding-bottom: 0;
}
.lg-outer.lg-pull-caption-up .lg-sub-html {
-webkit-transition: bottom 0.25s ease;
-o-transition: bottom 0.25s ease;
transition: bottom 0.25s ease;
}
.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html {
bottom: 100px;
}
.lg-outer .lg-toogle-thumb {
background-color: #0D0A0A;
border-radius: 2px 2px 0 0;
color: #999;
cursor: pointer;
font-size: 24px;
height: 39px;
line-height: 27px;
padding: 5px 0;
position: absolute;
right: 20px;
text-align: center;
top: -39px;
width: 50px;
}
.lg-outer .lg-toogle-thumb:after {
content: "\e1ff";
}
.lg-outer .lg-toogle-thumb:hover {
color: #FFF;
}
.lg-outer .lg-video-cont {
display: inline-block;
vertical-align: middle;
max-width: 1140px;
max-height: 100%;
width: 100%;
padding: 0 5px;
}
.lg-outer .lg-video {
width: 100%;
height: 0;
padding-bottom: 56.25%;
overflow: hidden;
position: relative;
}
.lg-outer .lg-video .lg-object {
display: inline-block;
position: absolute;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
}
.lg-outer .lg-video .lg-video-play {
width: 84px;
height: 59px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -42px;
margin-top: -30px;
z-index: 1080;
cursor: pointer;
}
.lg-outer .lg-has-iframe .lg-video {
-webkit-overflow-scrolling: touch;
overflow: auto;
}
.lg-outer .lg-has-vimeo .lg-video-play {
/* background: url("img/vimeo-play.png") no-repeat scroll 0 0 transparent; */
}
.lg-outer .lg-has-vimeo:hover .lg-video-play {
/* background: url("img/vimeo-play.png") no-repeat scroll 0 -58px transparent; */
}
.lg-outer .lg-has-html5 .lg-video-play {
/* background: transparent url("img/video-play.png") no-repeat scroll 0 0; */
height: 64px;
margin-left: -32px;
margin-top: -32px;
width: 64px;
opacity: 0.8;
}
.lg-outer .lg-has-html5:hover .lg-video-play {
opacity: 1;
}
.lg-outer .lg-has-youtube .lg-video-play {
/* background: url("img/youtube-play.png") no-repeat scroll 0 0 transparent; */
}
.lg-outer .lg-has-youtube:hover .lg-video-play {
/* background: url("img/youtube-play.png") no-repeat scroll 0 -60px transparent; */
}
.lg-outer .lg-video-object {
width: 100% !important;
height: 100% !important;
position: absolute;
top: 0;
left: 0;
}
.lg-outer .lg-has-video .lg-video-object {
visibility: hidden;
}
.lg-outer .lg-has-video.lg-video-playing .lg-object, .lg-outer .lg-has-video.lg-video-playing .lg-video-play {
display: none;
}
.lg-outer .lg-has-video.lg-video-playing .lg-video-object {
visibility: visible;
}
.lg-progress-bar {
background-color: #333;
height: 5px;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 1083;
opacity: 0;
-webkit-transition: opacity 0.08s ease 0s;
-moz-transition: opacity 0.08s ease 0s;
-o-transition: opacity 0.08s ease 0s;
transition: opacity 0.08s ease 0s;
}
.lg-progress-bar .lg-progress {
background-color: #a90707;
height: 5px;
width: 0;
}
.lg-progress-bar.lg-start .lg-progress {
width: 100%;
}
.lg-show-autoplay .lg-progress-bar {
opacity: 1;
}
.lg-autoplay-button:after {
content: "\e01d";
}
.lg-show-autoplay .lg-autoplay-button:after {
content: "\e01a";
}
.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap, .lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image {
-webkit-transition-duration: 0s;
transition-duration: 0s;
}
.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
-moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
-o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
}
.lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
-webkit-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
-moz-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
-o-transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
transition: left 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, top 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
}
.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
-moz-transition: -moz-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
-o-transition: -o-transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.15s !important;
-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
#lg-zoom-in:after {
content: "\e311";
}
#lg-actual-size {
font-size: 20px;
}
#lg-actual-size:after {
content: "\e033";
}
#lg-zoom-out {
opacity: 0.5;
pointer-events: none;
}
#lg-zoom-out:after {
content: "\e312";
}
.lg-zoomed #lg-zoom-out {
opacity: 1;
pointer-events: auto;
}
.lg-outer .lg-pager-outer {
bottom: 60px;
left: 0;
position: absolute;
right: 0;
text-align: center;
z-index: 1080;
height: 10px;
}
.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont {
overflow: visible;
}
.lg-outer .lg-pager-cont {
cursor: pointer;
display: inline-block;
overflow: hidden;
position: relative;
vertical-align: top;
margin: 0 5px;
}
.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.lg-outer .lg-pager-cont.lg-pager-active .lg-pager {
box-shadow: 0 0 0 2px white inset;
}
.lg-outer .lg-pager-thumb-cont {
background-color: #fff;
color: #FFF;
bottom: 100%;
height: 83px;
left: 0;
margin-bottom: 20px;
margin-left: -60px;
opacity: 0;
padding: 5px;
position: absolute;
width: 120px;
border-radius: 3px;
-webkit-transition: opacity 0.15s ease 0s, -webkit-transform 0.15s ease 0s;
-moz-transition: opacity 0.15s ease 0s, -moz-transform 0.15s ease 0s;
-o-transition: opacity 0.15s ease 0s, -o-transform 0.15s ease 0s;
transition: opacity 0.15s ease 0s, transform 0.15s ease 0s;
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
.lg-outer .lg-pager-thumb-cont img {
width: 100%;
height: 100%;
}
.lg-outer .lg-pager {
background-color: rgba(255, 255, 255, 0.5);
border-radius: 50%;
box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.7) inset;
display: block;
height: 12px;
-webkit-transition: box-shadow 0.3s ease 0s;
-o-transition: box-shadow 0.3s ease 0s;
transition: box-shadow 0.3s ease 0s;
width: 12px;
}
.lg-outer .lg-pager:hover, .lg-outer .lg-pager:focus {
box-shadow: 0 0 0 8px white inset;
}
.lg-outer .lg-caret {
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px dashed;
bottom: -10px;
display: inline-block;
height: 0;
left: 50%;
margin-left: -5px;
position: absolute;
vertical-align: middle;
width: 0;
}
.lg-fullscreen:after {
content: "\e20c";
}
.lg-fullscreen-on .lg-fullscreen:after {
content: "\e20d";
}
.lg-outer #lg-dropdown-overlay {
background-color: rgba(0, 0, 0, 0.25);
bottom: 0;
cursor: default;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 1081;
opacity: 0;
visibility: hidden;
-webkit-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
-o-transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
transition: visibility 0s linear 0.18s, opacity 0.18s linear 0s;
}
.lg-outer.lg-dropdown-active .lg-dropdown, .lg-outer.lg-dropdown-active #lg-dropdown-overlay {
-webkit-transition-delay: 0s;
transition-delay: 0s;
-moz-transform: translate3d(0, 0px, 0);
-o-transform: translate3d(0, 0px, 0);
-ms-transform: translate3d(0, 0px, 0);
-webkit-transform: translate3d(0, 0px, 0);
transform: translate3d(0, 0px, 0);
opacity: 1;
visibility: visible;
}
.lg-outer.lg-dropdown-active #lg-share {
color: #FFF;
}
.lg-outer .lg-dropdown {
background-color: #fff;
border-radius: 2px;
font-size: 14px;
list-style-type: none;
margin: 0;
padding: 10px 0;
position: absolute;
right: 0;
text-align: left;
top: 50px;
opacity: 0;
visibility: hidden;
-moz-transform: translate3d(0, 5px, 0);
-o-transform: translate3d(0, 5px, 0);
-ms-transform: translate3d(0, 5px, 0);
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
-webkit-transition: -webkit-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
-moz-transition: -moz-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
-o-transition: -o-transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
transition: transform 0.18s linear 0s, visibility 0s linear 0.5s, opacity 0.18s linear 0s;
}
.lg-outer .lg-dropdown:after {
content: "";
display: block;
height: 0;
width: 0;
position: absolute;
border: 8px solid transparent;
border-bottom-color: #FFF;
right: 16px;
top: -16px;
}
.lg-outer .lg-dropdown > li:last-child {
margin-bottom: 0px;
}
.lg-outer .lg-dropdown > li:hover a, .lg-outer .lg-dropdown > li:hover .lg-icon {
color: #333;
}
.lg-outer .lg-dropdown a {
color: #333;
display: block;
white-space: pre;
padding: 4px 12px;
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 12px;
}
.lg-outer .lg-dropdown a:hover {
background-color: rgba(0, 0, 0, 0.07);
}
.lg-outer .lg-dropdown .lg-dropdown-text {
display: inline-block;
line-height: 1;
margin-top: -3px;
vertical-align: middle;
}
.lg-outer .lg-dropdown .lg-icon {
color: #333;
display: inline-block;
float: none;
font-size: 20px;
height: auto;
line-height: 1;
margin-right: 8px;
padding: 0;
vertical-align: middle;
width: auto;
}
.lg-outer #lg-share {
position: relative;
}
.lg-outer #lg-share:after {
content: "\e80d";
}
.lg-outer #lg-share-facebook .lg-icon {
color: #3b5998;
}
.lg-outer #lg-share-facebook .lg-icon:after {
content: "\e901";
}
.lg-outer #lg-share-twitter .lg-icon {
color: #00aced;
}
.lg-outer #lg-share-twitter .lg-icon:after {
content: "\e904";
}
.lg-outer #lg-share-googleplus .lg-icon {
color: #dd4b39;
}
.lg-outer #lg-share-googleplus .lg-icon:after {
content: "\e902";
}
.lg-outer #lg-share-pinterest .lg-icon {
color: #cb2027;
}
.lg-outer #lg-share-pinterest .lg-icon:after {
content: "\e903";
}
.lg-group:after {
content: "";
display: table;
clear: both;
}
.lg-outer {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1050;
text-align: left;
opacity: 0;
-webkit-transition: opacity 0.15s ease 0s;
-o-transition: opacity 0.15s ease 0s;
transition: opacity 0.15s ease 0s;
}
.lg-outer * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.lg-outer.lg-visible {
opacity: 1;
}
.lg-outer.lg-css3 .lg-item.lg-prev-slide, .lg-outer.lg-css3 .lg-item.lg-next-slide, .lg-outer.lg-css3 .lg-item.lg-current {
-webkit-transition-duration: inherit !important;
transition-duration: inherit !important;
-webkit-transition-timing-function: inherit !important;
transition-timing-function: inherit !important;
}
.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide, .lg-outer.lg-css3.lg-dragging .lg-item.lg-current {
-webkit-transition-duration: 0s !important;
transition-duration: 0s !important;
opacity: 1;
}
.lg-outer.lg-grab img.lg-object {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: -o-grab;
cursor: -ms-grab;
cursor: grab;
}
.lg-outer.lg-grabbing img.lg-object {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: -o-grabbing;
cursor: -ms-grabbing;
cursor: grabbing;
}
.lg-outer .lg {
height: 100%;
width: 100%;
position: relative;
overflow: hidden;
margin-left: auto;
margin-right: auto;
max-width: 100%;
max-height: 100%;
}
.lg-outer .lg-inner {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
white-space: nowrap;
}
.lg-outer .lg-item {
/* background: url("img/loading.gif") no-repeat scroll center center transparent; */
display: none !important;
}
.lg-outer.lg-css3 .lg-prev-slide, .lg-outer.lg-css3 .lg-current, .lg-outer.lg-css3 .lg-next-slide {
display: inline-block !important;
}
.lg-outer.lg-css .lg-current {
display: inline-block !important;
}
.lg-outer .lg-item, .lg-outer .lg-img-wrap {
display: inline-block;
text-align: center;
position: absolute;
width: 100%;
height: 100%;
}
.lg-outer .lg-item:before, .lg-outer .lg-img-wrap:before {
content: "";
display: inline-block;
height: 50%;
width: 1px;
margin-right: -1px;
}
.lg-outer .lg-img-wrap {
position: absolute;
padding: 0 5px;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.lg-outer .lg-item.lg-complete {
background-image: none;
}
.lg-outer .lg-item.lg-current {
z-index: 1060;
}
.lg-outer .lg-image {
display: inline-block;
vertical-align: middle;
max-width: 100%;
max-height: 100%;
width: auto !important;
height: auto !important;
}
.lg-outer.lg-show-after-load .lg-item .lg-object, .lg-outer.lg-show-after-load .lg-item .lg-video-play {
opacity: 0;
-webkit-transition: opacity 0.15s ease 0s;
-o-transition: opacity 0.15s ease 0s;
transition: opacity 0.15s ease 0s;
}
.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object, .lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play {
opacity: 1;
}
.lg-outer .lg-empty-html {
display: none;
}
.lg-outer.lg-hide-download #lg-download {
display: none;
}
.lg-backdrop {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1040;
background-color: #000;
opacity: 0;
-webkit-transition: opacity 0.15s ease 0s;
-o-transition: opacity 0.15s ease 0s;
transition: opacity 0.15s ease 0s;
}
.lg-backdrop.in {
opacity: 1;
}
.lg-css3.lg-no-trans .lg-prev-slide, .lg-css3.lg-no-trans .lg-next-slide, .lg-css3.lg-no-trans .lg-current {
-webkit-transition: none 0s ease 0s !important;
-moz-transition: none 0s ease 0s !important;
-o-transition: none 0s ease 0s !important;
transition: none 0s ease 0s !important;
}
.lg-css3.lg-use-css3 .lg-item {
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
.lg-css3.lg-use-left .lg-item {
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
backface-visibility: hidden;
}
.lg-css3.lg-fade .lg-item {
opacity: 0;
}
.lg-css3.lg-fade .lg-item.lg-current {
opacity: 1;
}
.lg-css3.lg-fade .lg-item.lg-prev-slide, .lg-css3.lg-fade .lg-item.lg-next-slide, .lg-css3.lg-fade .lg-item.lg-current {
-webkit-transition: opacity 0.1s ease 0s;
-moz-transition: opacity 0.1s ease 0s;
-o-transition: opacity 0.1s ease 0s;
transition: opacity 0.1s ease 0s;
}
.lg-css3.lg-slide.lg-use-css3 .lg-item {
opacity: 0;
}
.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current {
-webkit-transition: -webkit-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
-moz-transition: -moz-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
-o-transition: -o-transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
transition: transform 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
}
.lg-css3.lg-slide.lg-use-left .lg-item {
opacity: 0;
position: absolute;
left: 0;
}
.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide {
left: -100%;
}
.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide {
left: 100%;
}
.lg-css3.lg-slide.lg-use-left .lg-item.lg-current {
left: 0;
opacity: 1;
}
.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide, .lg-css3.lg-slide.lg-use-left .lg-item.lg-current {
-webkit-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
-moz-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
-o-transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
transition: left 1s cubic-bezier(0, 0, 0.25, 1) 0s, opacity 0.1s ease 0s;
}
/*# sourceMappingURL=lightgallery.css.map */
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

File diff suppressed because one or more lines are too long
@@ -0,0 +1,411 @@
( function( $ ) {//TODO: manage comments
"use strict";
var mutationObserver = new MutationObserver(function(mutations) {
// Elementor Search Input
if ( $('#elementor-panel-elements-search-input').length ) {
var searchTimeout = null;
$('#elementor-panel-elements-search-input').on( 'keyup', function(e) {
if ( e.which === 13 ) {
return false;
}
var val = $(this).val();
if (searchTimeout != null) {
clearTimeout(searchTimeout);
}
searchTimeout = setTimeout(function() {
searchTimeout = null;
elementorCommon.ajax.addRequest( 'wpr_elementor_search_data', {
data: {
search_query: val,
},
success: function() {
console.log('Success!');
}
});
}, 1000);
});
}
});
// Listen to Elementor Panel Changes
mutationObserver.observe($('#elementor-panel')[0], {
childList: true,
subtree: true,
});
// Make our custom css visible in the panel's front-end
elementor.hooks.addFilter( 'editor/style/styleText', function( css, context ) {
if ( ! context ) {
return;
}
var model = context.model,
customCSS = model.get('settings').get('wpr_custom_css');
var selector = '.elementor-element.elementor-element-' + model.get('id');
if ( 'document' === model.get('elType') ) {
selector = elementor.config.document.settings.cssWrapperSelector;
}
if ( customCSS ) {
css += customCSS.replace(/selector/g, selector);
}
return css;
});
// Shortcode Widget: Select Template
function selectShortcodeTemplate( model, e, textarea ) {
var data = e.params.data;
// Update Settings
model.attributes.settings.attributes.shortcode = '[wpr-template id="'+ data.id +'"]';
// Update Textarea
textarea.val('[wpr-template id="'+ data.id +'"]');
// Refresh Preview
model.renderRemoteServer();
}
elementor.hooks.addAction( 'panel/open_editor/widget/shortcode', function( panel, model, view ) {
var $select = panel.$el.find('.elementor-control-type-select2').find('select'),
$textarea = panel.$el.find('.elementor-control-type-textarea').find('textarea');
// Change
$select.on( 'select2:select', function( e ) {
selectShortcodeTemplate( model, e, $textarea );
});
// Render
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-select2', function(){
$(this).find( 'select' ).on( 'select2:select', function( e ) {
selectShortcodeTemplate( model, e, $textarea );
} );
});
} );
// WPR Grid Widget: Select Element (Filter Taxonomies)
function filterGridTaxonomies( data, value ) {
var options = [];
for ( var key in data ) {
if ( key !== value ) {
for ( var i = 0; i < data[key].length; i++ ) {
options.push( '.elementor-control-element_select select option[value="'+ data[key][i] +'"]' );
}
}
}
// Reset
$( 'head' ).find( '#element_select_filter_style' ).remove();
if ( 'related' === value || 'current' === value ) {
return;
}
// Append Styles
$( 'head' ).append('<style id="element_select_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
}
// WPR Grid Widget: Post Meta Keys (Filter by Query)
function filterGridMetaKeys( data, value ) {
var options = [];
for ( var key in data ) {
if ( key !== value ) {
for ( var i = 0; i < data[key].length; i++ ) {
options.push( '.select2-results__options li[data-select2-id*="-'+ data[key][i] +'"]' );
}
}
}
// Reset
$( 'head' ).find( '#post_meta_keys_filter_style' ).remove();
// Append Styles
$( 'head' ).append('<style id="post_meta_keys_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
}
// WPR Grid Widget / List style: Element Location
function disableListLocation( value ) {
// Reset
$( 'head' ).find( '#list_element_location_style' ).remove();
if ( 'list' !== value ) {
return;
}
// Append Styles
$( 'head' ).append('<style id="list_element_location_style">.elementor-control-element_location option[value="above"] { display: none !important; }</style>');
}
// Grid
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-grid', function( panel, model, view ) {
var $querySource = panel.$el.find('.elementor-control-query_source').find( 'select' ),
taxonomies = JSON.parse( panel.$el.find('.elementor-control-element_select_filter').find('input').val() ),
metaKeys = JSON.parse( panel.$el.find('.elementor-control-post_meta_keys_filter').find('input').val() );
// Open
filterGridTaxonomies( taxonomies, $querySource.val() );
filterGridMetaKeys( metaKeys, $querySource.val() );
// Change
$querySource.on( 'change', function() {
filterGridTaxonomies( taxonomies, $(this).val() );
filterGridMetaKeys( metaKeys, $(this).val() );
});
// Render Query Source
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-query_source', function(){
$(this).find( 'select' ).on( 'change', function() {
filterGridTaxonomies( taxonomies, $(this).val() );
filterGridMetaKeys( metaKeys, $(this).val() );
} );
});
// Render Layout Select
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
disableListLocation( $(this).find( 'select' ).val() );
$(this).find( 'select' ).on( 'change', function() {
disableListLocation( $(this).val() );
} );
});
// Render Grid Elements
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
if ( 'lightbox' === $(this).val() ) {
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
setTimeout(function() {
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
}, 100 );
} else {
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
}
} );
});
var sOffsets = {};
// Prevent Bubble on Click
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
var current = $(this),
attrClass = current.attr( 'class' ),
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
var oKey = attrClass.substring( firstIndex, lastIndex ),
oProperty = current.offset().top;
sOffsets[oKey] = oProperty;
setTimeout(function() {
current.on( 'click', function( event ) {
var current = $(this),
attrClass = current.attr( 'class' ),
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
sectionClass = attrClass.substring( firstIndex, lastIndex );
setTimeout( function() {
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
}, 10 );
});
}, 100 );
});
} );
// Image Grid
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-media-grid', function( panel, model, view ) {
// Render Grid Elements
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
if ( 'lightbox' === $(this).val() ) {
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
setTimeout(function() {
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
}, 100 );
} else {
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
}
} );
});
} );
// Woo Grid
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-woo-grid', function( panel, model, view ) {
// Render Grid Elements
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
if ( 'lightbox' === $(this).val() ) {
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
setTimeout(function() {
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
}, 100 );
} else {
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
}
} );
});
var sOffsets = {};
// Prevent Bubble on Click - not working - //tmp
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
var current = $(this),
attrClass = current.attr( 'class' ),
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
var oKey = attrClass.substring( firstIndex, lastIndex ),
oPropery = current.offset().top;
sOffsets[oKey] = oPropery;
setTimeout(function() {
current.on( 'click', function( event ) {
var current = $(this),
attrClass = current.attr( 'class' ),
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
sectionClass = attrClass.substring( firstIndex, lastIndex );
setTimeout( function() {
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
}, 10 );
});
}, 100 );
});
} );
// Instagram Feed
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-instagram-feed', function( panel, model, view ) {
// Render Grid Elements
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-insta_feed_elements', function() {
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
if ( 'lightbox' === $(this).val() ) {
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
setTimeout(function() {
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
}, 100 );
} else {
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
}
} );
});
} );
// Get Referrer Link
var referrer = document.referrer;
// Return to Plugin Page
if ( '' !== referrer && referrer.indexOf( 'page=wpr-addons' ) > -1 ) {
$(window).on( 'load', function() {
$('#elementor-panel-header-menu-button').on( 'click', function() {
setTimeout(function() {
$('.elementor-panel-menu-item-exit-to-dashboard').on( 'click', function() {
window.location.href = referrer;
});
}, 300);
});
});
}
// Advanced Slider - TODO: Check if necessary or remove
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-advanced-slider', function( panel, model, view ) {
// var elControls = panel.$el,
// $select = elControls.find('.elementor-control-slider_content_type').find('select');
// if ( 'custom' !== $select.val() ) {
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
// } else {
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
// }
// $select.on( 'change', function() {
// if ( 'custom' !== $(this).val() ) {
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
// } else {
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
// }
// });
// } );
/*--------------------------------------------------------------
== Widget Preview and Library buttons
--------------------------------------------------------------*/
for (const [key, value] of Object.entries(registered_modules)) {
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-'+ value[0], function( panel, model, view ) {
openPedefinedStyles( panel.$el, view.$el, value[0], value[1], value[2] );
} );
}
function openPedefinedStyles( panel, preview, widget, url, filter ) {
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child', function() {
var theme = $(this).data('theme');
$(this).attr('href', url +'?ref=rea-plugin-panel-'+ widget +'-utmtr'+ theme.slice(0,3) +'nkbs'+ theme.slice(3,theme.length) +'-preview'+ filter);
});
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child', function() {
preview.closest('body').find('#wpr-library-btn').attr('data-filter', widget);
preview.closest('body').find('#wpr-library-btn').trigger('click');
});
}
}( jQuery ) );
@@ -0,0 +1,859 @@
( function( $ ) {//TODO: manage comments
"use strict";
var panelMutationObserver = new MutationObserver(function(mutations) {
// Prevent Bubble up on Section Click
$('.elementor-control-type-section').on( 'click', function( event ) {
var current = $(this),
attrClass = current.attr( 'class' ),
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
sectionClass = attrClass.substring( firstIndex, lastIndex );
setTimeout( function() {
if ( $('.'+ sectionClass).length > 0 ) {
$( '#elementor-panel-content-wrapper' ).scrollTop( $('.'+ sectionClass).offset().top - 100 );
}
}, 10 );
});
// Elementor Search Input
if ( $('#elementor-panel-elements-search-input').length ) {
var searchTimeout = null;
var popupURL = registered_modules.adminURL + 'admin.php?page=wpr-popups';
$('#elementor-panel-elements-search-input').on( 'keyup', function(e) {
if ( e.which === 13 ) {
return false;
}
if (searchTimeout != null) {
clearTimeout(searchTimeout);
}
searchTimeout = setTimeout(function() {
searchTimeout = null;
var searchVal = $('#elementor-panel-elements-search-input').val();
let keywords = ["appointment", "book"]; // Keywords to look for
// Check if any keyword matches the input
let keywordFound = keywords.some(function(keyword) {
return keyword.includes(searchVal) || searchVal.includes(keyword);
});
// If a keyword is found and the div doesn't already exist
if ((keywordFound && searchVal !== '') && $('.wpr-elementor-search-notice').length < 1 ) {
// Append the new div
let infoBox = `
<div class="wpr-elementor-search-notice">
Looking for Booking Solution? Check out the <a href="https://www.youtube.com/watch?v=asdMBXpd2Nw" target="_blank">Video Tutorial</a>.
</div>
`;
$('#elementor-panel-elements-wrapper').prepend(infoBox);
}
if ( searchVal.includes('par') && $('.wpr-elementor-search-notice').length < 1 ) {
$('#elementor-panel-elements-wrapper').prepend('\
<div class="wpr-elementor-search-notice">\
<strong>Parallax Background</strong> is only available for the Container (Section) elements. <strong>Edit any container (section)</strong> > <strong>"Styles"</strong> tab > <strong>"Parallax - Royal Addons"</strong>.\
</div>\
');
}
if ( searchVal.includes('stic') && $('.wpr-elementor-search-notice').length < 1 ) {
$('#elementor-panel-elements-wrapper').prepend('\
<div class="wpr-elementor-search-notice">\
<strong>Sticky Section</strong> is only available for the Container (Section) elements. <strong>Edit any container (section)</strong> > <strong>"Advanced"</strong> tab > <strong>"Sticky Section - Royal Addons"</strong>.\
</div>\
');
}
if ( searchVal.includes('cart') && $('.wpr-elementor-search-notice').length < 1 && !registered_modules.isWooCommerceActive ) {
$('#elementor-panel-elements-wrapper').prepend('\
<div class="wpr-elementor-search-notice">\
Please Install/Activate <strong>WooCommerce</strong> in order to use <strong>REA WOO</strong> Widgets.\
</div>\
');
}
if ( searchVal.includes('pop') && $('.wpr-elementor-search-notice').length < 1 ) {
$('#elementor-panel-elements-wrapper').prepend('\
<div class="wpr-elementor-search-notice">\
In Order to Create <strong>Popups</strong> go to <a href='+ popupURL +' target="_blank"><strong>Dashboard</strong> > <strong>Royal Addons</strong> > <strong>Popup Builder</strong></a>\
or Watch <a href="https://www.youtube.com/watch?v=TbKTNpuXM68" target="_blank">Video Tutorial</a></div>\
');
}
elementorCommon.ajax.addRequest( 'wpr_elementor_search_data', {
data: {
search_query: searchVal,
},
success: function() {
// console.log(searchVal);
}
});
}, 1000);
});
}
// Promote Premium Widgets
// if ( $('#elementor-panel-category-wpr-widgets').length ) {
$('.elementor-element--promotion').on('click', function() {
var dialogButton = $('.dialog-button');
if ( $(this).find('.wpr-icon').length ) {
dialogButton.hide();
$('.wpr-see-it-in-action').remove();
$('.wpr-see-it-in-action-upgrade').remove();
$('.wpr-upgrade-dynamic-content').remove();
var url = '',
upgradeURL = '',
upgradeText = 'Ugrade to Pro',
dialogueMessage = 'Advanced Filters lets you filter by <b>Colors, Brands, Ratings, Price Range</b>, or any custom meta field. It also supports <b>Custom Post Types (CPT)</b>, and you can create dynamic dependent dropdowns for a faster, more intuitive browsing experience.',
title = $(this).find('.title').text();
if ( title === 'My Account') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/my-account-fashion-v1/?ref=rea-plugin-panel-pro-widgets-myacc-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-myacc-upgrade-pro#purchasepro';
} else if ( title === 'Woo Category Grid') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/?ref=rea-plugin-panel-pro-widgets-catgrid-seeitinaction#catgridprev';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-catgrid-upgrade-pro#purchasepro';
} else if ( title === 'Product Filters') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/shop-fashion-v1/?ref=rea-plugin-panel-pro-widgets-prodfilters-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-prodfilters-upgrade-pro#purchasepro';
} else if ( title === 'Product Breadcrumbs') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/product/mans-bluish-hoodie/?ref=rea-plugin-panel-pro-widgets-breadcru-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-breadcru-upgrade-pro#purchasepro';
} else if ( title === 'Wishlist Button') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-wishbutt-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-wishbutt-upgrade-expert#purchasepro';
upgradeText = 'Ugrade to Expert';
} else if ( title === 'Mini Wishlist') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-miniwish-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-miniwish-upgrade-expert#purchasepro';
upgradeText = 'Ugrade to Expert';
} else if ( title === 'Wishlist Table') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-wishtable-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-wishtable-upgrade-expert#purchasepro';
upgradeText = 'Ugrade to Expert';
} else if ( title === 'Compare Button') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-compbutt-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-compbutt-upgrade-expert#purchasepro';
upgradeText = 'Ugrade to Expert';
} else if ( title === 'Mini Compare') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-minicomp-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-minicomp-upgrade-expert#purchasepro';
upgradeText = 'Ugrade to Expert';
} else if ( title === 'Compare Table') {
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/?ref=rea-plugin-panel-pro-widgets-comptable-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-comptable-upgrade-expert#purchasepro';
upgradeText = 'Ugrade to Expert';
} else if ( title == 'Post Breadcrumbs') {
url += 'https://demosites.royal-elementor-addons.com/construction-v3/2023/04/01/experience-quality-craftsmanship-with-our-construction-team/?ref=rea-plugin-panel-pro-widgets-postbreadcru-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-postbreadcru-upgrade-expert#purchasepro';
upgradeText = 'Ugrade to Expert';
} else if ( title == 'Category Grid' ) {
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/?ref=rea-plugin-panel-pro-widgets-catgrid-seeitinaction#catgridprev';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-catgrid-upgrade-expert#purchasepro';
upgradeText = 'Upgrade to Expert';
} else if ( title == 'Custom Field' ) {
url += 'https://demosites.royal-elementor-addons.com/job-listing-v1/wpr_job_listing/mail-convertor/?ref=rea-plugin-panel-pro-widgets-catgrid-seeitinaction';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-customfield-upgrade-expert#purchasepro';
upgradeText = 'Upgrade to Expert';
} else if ( title == 'Advanced Filters' ) {
url += 'https://demosites.royal-elementor-addons.com/fashion-v2/shop-fashion-v2/';
upgradeURL = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-pro-widgets-advancedfilters-upgrade-expert#purchasepro';
upgradeText = 'Upgrade to Expert';
}
if ( !dialogButton.next('a').length ) {
dialogButton.after('<a href="'+ url +'" target="_blank" class="wpr-see-it-in-action dialog-button elementor-button elementor-button-success">See it in action</a>');
$('.wpr-see-it-in-action').after('<a href="'+ upgradeURL +'" target="_blank" class="wpr-see-it-in-action-upgrade e-accent dialog-button elementor-button">'+ upgradeText +'</a>');
} else {
$('.wpr-see-it-in-action').attr('href', url);
}
if ( title == 'Advanced Filters' ) {
$('.dialog-message').html( dialogueMessage );
}
$('.wpr-see-it-in-action').css({
'display' : 'block',
'margin-bottom' : '12px'
});
$('.wpr-see-it-in-action-upgrade').css({
'display' : 'block'
});
} else {
dialogButton.show();
dialogButton.next('a').hide();
}
});
// }
// Promote Dynamic Tags
$('.elementor-control-dynamic-switcher').on('click', function() {
$('.wpr-see-it-in-action').remove();
$('.wpr-see-it-in-action-upgrade').remove();
$('.wpr-upgrade-dynamic-content').remove();
let defaultText = 'Create more personalized and dynamic sites by populating data from various sources with dozens of dynamic tags to choose from.';
let customText = '<br><br> Dynamic Content functionality is available for <strong>Royal Elementor Addons Expert</strong> plugin as well as for <strong>Elementor Pro</strong> plugin. With <strong>Royal Elementor Addons Expert Plan</strong> you can create Custom Post Types, Custom Taxonomies, add any type of Custom Fields and many other cool features to create Dynamic Websites.';
$('.dialog-buttons-widget .dialog-message').html('');
$('.dialog-buttons-widget .dialog-message').html(defaultText + customText);
let dialogButton = $('.dialog-buttons-widget .dialog-button'),
url = 'https://royal-elementor-addons.com/?ref=rea-plugin-panel-dynamic-content-banner-upgrade-expert#purchasepro';
dialogButton.text('Upgrade Elementor');
dialogButton.after('<div class="wpr-upgrade-dynamic-content"><div style="margin:8px 0 20px;">OR</div><a href="'+ url +'" target="_blank" style="display:block; margin-bottom: 10px; padding:9px 22px;" class="dialog-button elementor-button elementor-button-success">Upgrade Royal Elementor Addons</a><a href="https://www.youtube.com/watch?v=kE1zmi3fxh8" target="_blank" style="display:block; padding:9px 22px;" class="dialog-button elementor-button elementor-button-success">Video Tutorial</a></div>');
dialogButton.next('a').css('display','block');
});
});
// Listen to Elementor Panel Changes
panelMutationObserver.observe($('#elementor-panel')[0], {
childList: true,
subtree: true,
});
// Make our custom css visible in the panel's front-end
elementor.hooks.addFilter( 'editor/style/styleText', function( css, context ) {
if ( ! context ) {
return;
}
var model = context.model,
customCSS = model.get('settings').get('wpr_custom_css');
var selector = '.elementor-element.elementor-element-' + model.get('id');
if ( 'document' === model.get('elType') ) {
selector = elementor.config.document.settings.cssWrapperSelector;
}
if ( customCSS ) {
css += customCSS.replace(/selector/g, selector);
}
return css;
});
// Shortcode Widget: Select Template
function selectShortcodeTemplate( model, e, select, textarea ) {
var shortcode = model.attributes.settings.attributes.shortcode,
shortcode = shortcode.replace ( /[^\d.]/g, '' );
if ( shortcode === select.val() ) {
return;
}
// Update Settings
model.attributes.settings.attributes.shortcode = '[wpr-template id="'+ select.val() +'"]';
// Update Textarea
textarea.val('[wpr-template id="'+ select.val() +'"]');
// Refresh Preview
model.renderRemoteServer();
}
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-form-builder', function( panel, model, view ) {
var $parent = panel.$el.find('#elementor-panel');
var $element = panel.$el.find( '.elementor-repeater-fields' );
var stepObserver = new MutationObserver(function(mutations) {
mutations.forEach((mutation) => {
// console.log('steps mutation', mutation);
if (mutation.type === 'childList') {
mutation.addedNodes.forEach((node) => {
if (node.nodeType === Node.ELEMENT_NODE) {
// Find the child element with the specific class within the node
const repeaterFields = node.querySelectorAll('.elementor-repeater-fields');
const childElement = node.querySelectorAll('.elementor-repeater-row-tools');
const childElement2 = node.querySelectorAll('.elementor-repeater-row-controls');
if ( childElement2 ) {
let selectElement = [];
if ( selectElement.length == 0 ) {
childElement2.forEach(function(item) {
selectElement.push(item.querySelector('select'));
});
}
// If the child element exists and the select value is 'step', add the certain class to it
if (childElement && selectElement.length > 0) {
childElement.forEach(function(item, i) {
if ( selectElement[i] && selectElement[i].value == 'step' ) {
item.classList.add('wpr-step-editor-bg');
}
});
}
// model.get('settings').attributes.form_fields.models.forEach(function(thisModel, i) {
// if ( thisModel.attributes.field_type == 'step' ) {
// $('.elementor-repeater-fields').eq(i).find('.elementor-repeater-row-tools').addClass('wpr-step-editor-bg');
// }
// });
// if (selectElement) {
// selectElement.forEach(function(item, i) {
// item.addEventListener('change', () => {
// if (childElement && selectElement) {
// if (item.value === 'step') {
// childElement[i].classList.add('wpr-step-editor-bg');
// } else {
// childElement[i].classList.remove('wpr-step-editor-bg');
// }
// }
// });
// });
// }
}
}
});
}
});
});
stepObserver.observe($('#elementor-panel')[0], {
childList: true,
subtree: true,
});
changeStepBackground();
elementor.channels.editor.on('section:activated', function (sectionName, editor) {
// model.get('settings').attributes.form_fields.models.forEach(function(thisModel, i) {
// if ( thisModel.attributes.field_type == 'step' ) {
// $('.elementor-repeater-fields').eq(i).find('.elementor-repeater-row-tools').addClass('wpr-step-editor-bg');
// }
// });
updateDynamicOptions(view);
});
function changeStepBackground() {
$element.each(function() {
if ($(this).find('select').val() == 'step') {
$(this).find('.elementor-repeater-row-tools').addClass('wpr-step-editor-bg');
}
});
$('#elementor-panel').off('change', 'select').on('change', 'select', function() {
if ( $(this).val() == 'step' ) {
$(this).closest('.elementor-repeater-row-controls').prev('.elementor-repeater-row-tools').addClass('wpr-step-editor-bg');
} else if ($(this).closest('.elementor-repeater-row-controls').prev('.elementor-repeater-row-tools').hasClass('wpr-step-editor-bg')) {
$(this).closest('.elementor-repeater-row-controls').prev('.elementor-repeater-row-tools').removeClass('wpr-step-editor-bg');
}
});
}
view.listenTo(view.model.get('settings').get('form_fields'), 'add change remove', function (e) {
updateDynamicOptions(view);
});
function updateDynamicOptions () {
var formFieldsModel = view.model.get('settings').get('form_fields');
var emailField = view.model.get('settings').get('email_field');
var firstNameField = view.model.get('settings').get('first_name_field');
var lastNameField = view.model.get('settings').get('last_name_field');
var phoneField = view.model.get('settings').get('phone_field');
var birthdayField = view.model.get('settings').get('birthday_field');
var addressField = view.model.get('settings').get('address_field');
var countryField = view.model.get('settings').get('country_field');
var cityField = view.model.get('settings').get('city_field');
var stateField = view.model.get('settings').get('state_field');
var zipField = view.model.get('settings').get('zip_field');
var emailSelectControl = panel.$el.find('.elementor-control-email_field').find('select[data-setting="email_field"]');
var firstNameSelectControl = panel.$el.find('.elementor-control-first_name_field').find('select[data-setting="first_name_field"]');
var lastNameSelectControl = panel.$el.find('.elementor-control-last_name_field').find('select[data-setting="last_name_field"]');
var phoneSelectControl = panel.$el.find('.elementor-control-phone_field').find('select[data-setting="phone_field"]');
var birthdaySelectControl = panel.$el.find('.elementor-control-birthday_field').find('select[data-setting="birthday_field"]');
var addressSelectControl = panel.$el.find('.elementor-control-address_field').find('select[data-setting="address_field"]');
var countrySelectControl = panel.$el.find('.elementor-control-country_field').find('select[data-setting="country_field"]');
var citySelectControl = panel.$el.find('.elementor-control-city_field').find('select[data-setting="city_field"]');
var stateSelectControl = panel.$el.find('.elementor-control-state_field').find('select[data-setting="state_field"]');
var zipSelectControl = panel.$el.find('.elementor-control-zip_field').find('select[data-setting="zip_field"]');
var selectControls = [emailSelectControl, firstNameSelectControl, lastNameSelectControl, phoneSelectControl, birthdaySelectControl, addressSelectControl, countrySelectControl, citySelectControl, stateSelectControl, zipSelectControl];
var fieldValues = [emailField, firstNameField, lastNameField, phoneField, birthdayField, addressField, countryField, cityField, stateField, zipField];
var options = {
'none': 'None'
};
var prevFieldId;
formFieldsModel.each(function (field, index) {
var fieldLabel = field.get('field_label');
var fieldId = field.get('field_id');
if ( prevFieldId == fieldId ) {
$('#elementor-panel').find(':input[value='+ field.attributes._id +']').closest('.elementor-repeater-fields').find(':input[data-setting="field_id"]').val(field.attributes._id);
$('#elementor-panel').find(':input[value='+ field.attributes._id +']').closest('.elementor-repeater-fields').find('.wpr-form-field-shortcode').val('id=["'+ field.attributes._id +'"]');
field.attributes.field_id = field.attributes._id;
}
prevFieldId = fieldId;
if ( !fieldId ) {
$('#elementor-panel').find(':input[value='+ field.attributes._id +']').closest('.elementor-repeater-fields').find(':input[data-setting="field_id"]').val(field.attributes._id);
$('#elementor-panel').find(':input[value='+ field.attributes._id +']').closest('.elementor-repeater-fields').find('.wpr-form-field-shortcode').val('id=["'+ field.attributes._id +'"]');
field.attributes.field_id = field.attributes._id;
}
options[fieldId] = fieldLabel;
});
view.model.setSetting('email_field', _.extend(emailField, { options }));
view.model.setSetting('first_name_field', _.extend(firstNameField, { options }));
view.model.setSetting('last_name_field', _.extend(lastNameField, { options }));
view.model.setSetting('phone_field', _.extend(phoneField, { options }));
view.model.setSetting('birthday_field', _.extend(birthdayField, { options }));
view.model.setSetting('address_field', _.extend(addressField, { options }));
view.model.setSetting('country_field', _.extend(countryField, { options }));
view.model.setSetting('city_field', _.extend(cityField, { options }));
view.model.setSetting('state_field', _.extend(stateField, { options }));
view.model.setSetting('zip_field', _.extend(zipField, { options }));
_.each(selectControls, function (control) {
control.empty();
});
_.each(options, function (label, value) {
_.each(selectControls, function (control, i) {
const isSelected = fieldValues[i] === value ? ' selected' : '';
control.append('<option value="' + value + '"' + isSelected + '>' + label + '</option>');
});
});
};
// Change the selector below to match the field_id field in your repeater
const customIdFieldSelector = 'input[data-setting="field_id"]';
// Change the selector below to match the shortcode field in your repeater
const shortcodeFieldSelector = '.wpr-form-field-shortcode';
// Listen for changes in the field_id field
$('#elementor-panel').on('input', customIdFieldSelector, function() {
// Get the new field_id value
const newCustomId = $(this).val();
// Find the corresponding shortcode field in the same repeater item
const $shortcodeField = $(this).closest('.elementor-repeater-fields').find(shortcodeFieldSelector);
// Update the shortcode with the new field_id value
let updatedShortcode;
const currentShortcode = $shortcodeField.val();
const match = currentShortcode.match(/\[id="[^"]*"\]/);
if (match) {
updatedShortcode = currentShortcode.replace(match[0], `[id="${newCustomId}"]`);
} else {
updatedShortcode = `[id="${newCustomId}"]`;
}
// Set the updated shortcode in the shortcode field
$shortcodeField.val(updatedShortcode);
});
});
elementor.hooks.addAction( 'panel/open_editor/widget/shortcode', function( panel, model, view ) {
var $select = panel.$el.find('.elementor-control-type-wpr-ajaxselect2'),
$textarea = panel.$el.find('.elementor-control-type-textarea').find('textarea');
// Change
$select.on( 'select2:select', function( e ) {
selectShortcodeTemplate( model, e, $select, $textarea );
});
// Render
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-wpr-ajaxselect2', function(){
$(this).find( 'select' ).on( 'select2:select', function( e ) {
selectShortcodeTemplate( model, e, $select, $textarea );
} );
});
} );
// WPR Grid Widget: Select Element (Filter Taxonomies)
function filterGridTaxonomies( data, value ) {
var options = [];
for ( var key in data ) {
if ( key !== value ) {
for ( var i = 0; i < data[key].length; i++ ) {
if ( !data[value].includes(data[key][i]) ) {
options.push( '.elementor-control-element_select select option[value="'+ data[key][i] +'"]' );
}
}
}
}
// Reset
$( 'head' ).find( '#element_select_filter_style' ).remove();
if ( 'related' === value || 'current' === value ) {
return;
}
// Append Styles
$( 'head' ).append('<style id="element_select_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
}
// WPR Grid Widget: Post Meta Keys (Filter by Query)
function filterGridMetaKeys( data, value ) {
var options = [];
for ( var key in data ) {
if ( key !== value ) {
for ( var i = 0; i < data[key].length; i++ ) {
options.push( '.select2-results__options li[data-select2-id*="-'+ data[key][i] +'"]' );
}
}
}
// Reset
$( 'head' ).find( '#post_meta_keys_filter_style' ).remove();
// Append Styles
$( 'head' ).append('<style id="post_meta_keys_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
}
// WPR Grid Widget / List style: Element Location
function disableListLocation( value ) {
// Reset
$( 'head' ).find( '#list_element_location_style' ).remove();
if ( 'list' !== value ) {
return;
}
// Append Styles
$( 'head' ).append('<style id="list_element_location_style">.elementor-control-element_location option[value="above"] { display: none !important; }</style>');
}
// Grid
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-grid', function( panel, model, view ) {
var $querySource = panel.$el.find('.elementor-control-query_source').find( 'select' ),
taxonomies = JSON.parse( panel.$el.find('.elementor-control-element_select_filter').find('input').val() ),
metaKeys = '';
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_get_custom_meta_keys',
nonce: registered_modules.nonce
},
success: function( response ) {
if (response.success) {
metaKeys = JSON.parse(response.data);
// Open
filterGridMetaKeys( metaKeys, $querySource.val() );
}
},
error: function( error ) {
console.log(error);
}
});
// Open
filterGridTaxonomies( taxonomies, $querySource.val() );
// Change
$querySource.on( 'change', function() {
filterGridTaxonomies( taxonomies, $(this).val() );
filterGridMetaKeys( metaKeys, $(this).val() );
});
// Render Query Source
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-query_source', function(){
$(this).find( 'select' ).on( 'change', function() {
filterGridTaxonomies( taxonomies, $(this).val() );
filterGridMetaKeys( metaKeys, $(this).val() );
} );
});
// GOGA - Render Layout Select (Remove If extra)
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
disableListLocation( $(this).find( 'select' ).val() );
$(this).find( 'select' ).on( 'change', function() {
disableListLocation( $(this).val() );
} );
});
// Render Grid Elements
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
// Render Layout Select
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
disableListLocation( $(this).find( 'select' ).val() );
$(this).find( 'select' ).on( 'change', function() {
disableListLocation( $(this).val() );
} );
});
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
if ( 'lightbox' === $(this).val() ) {
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
setTimeout(function() {
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
}, 100 );
} else {
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
}
} );
});
} );
// Image Grid
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-media-grid', function( panel, model, view ) {
// Render Grid Elements
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
if ( 'lightbox' === $(this).val() ) {
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
setTimeout(function() {
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
}, 100 );
} else {
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
}
} );
});
} );
// Instagram Feed
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-instagram-feed', function( panel, model, view ) {
// Render Layout Select
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-inst_layout_select', function(){
disableListLocation( $(this).find( 'select' ).val() );
$(this).find( 'select' ).on( 'change', function() {
disableListLocation( $(this).val() );
} );
});
// Render Grid Elements
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-insta_feed_elements', function() {
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
if ( 'lightbox' === $(this).val() ) {
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
setTimeout(function() {
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
}, 100 );
} else {
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
}
} );
});
} );
// Woo Grid
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-woo-grid', function( panel, model, view ) {
// Render Grid Elements
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
if ( 'lightbox' === $(this).val() ) {
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
setTimeout(function() {
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
}, 100 );
} else {
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
}
} );
});
} );
// Refresh Mega Menu
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-mega-menu', function( panel, model, view ) {
model.renderRemoteServer();
});
// GOGA - Refresh Countdown check with duke
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-countdown', function( panel, model, view ) {
// panel.$el.find('#elementor-controls').on( 'change', '.elementor-control-countdown_type', function() {
// elementor.reloadPreview();
// });
// panel.$el.find('#elementor-controls').on( 'change', '.elementor-control-due_date', function() {
// elementor.reloadPreview();
// });
// panel.$el.find('#elementor-controls').on( 'change', '.elementor-control-evergreen_hours', function() {
// elementor.reloadPreview();
// });
// panel.$el.find('#elementor-controls').on( 'change', '.elementor-control-evergreen_minutes', function() {
// elementor.reloadPreview();
// });
// });
// Get Referrer Link
var referrer = document.referrer;
// Return to Plugin Page
if ( '' !== referrer && referrer.indexOf( 'page=wpr-addons' ) > -1 ) {
$(window).on( 'load', function() {
$('#elementor-panel-header-menu-button').on( 'click', function() {
setTimeout(function() {
$('.elementor-panel-menu-item-exit-to-dashboard').on( 'click', function() {
window.location.href = referrer;
});
}, 300);
});
});
}
// Advanced Slider - TODO: Check if necessary or remove
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-advanced-slider', function( panel, model, view ) {
// var elControls = panel.$el,
// $select = elControls.find('.elementor-control-slider_content_type').find('select');
// if ( 'custom' !== $select.val() ) {
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
// } else {
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
// }
// $select.on( 'change', function() {
// if ( 'custom' !== $(this).val() ) {
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
// } else {
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
// }
// });
// } );
/*--------------------------------------------------------------
== Widget Preview and Library buttons
--------------------------------------------------------------*/
for (const [key, value] of Object.entries(registered_modules)) {
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-'+ value[0], function( panel, model, view ) {
openPedefinedStyles( panel.$el, view.$el, value[0], value[1], value[2] );
} );
}
function openPedefinedStyles( panel, preview, widget, url, filter ) {
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child', function() {
var theme = $(this).data('theme');
$(this).attr('href', url +'?ref=rea-plugin-panel-'+ widget +'-utmtr'+ theme.slice(0,3) +'nkbs'+ theme.slice(3,theme.length) +'-preview'+ filter);
});
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child', function() {
preview.closest('body').find('#wpr-library-btn').attr('data-filter', widget);
preview.closest('body').find('#wpr-library-btn').trigger('click');
});
}
}( jQuery ) );
( function( $ ) {
'use strict';
var WprMegaMenuEditor = {
activeSection: false,
currentElement: false,
currentSection: false,
prevSection: false,
init: function() {
elementor.channels.editor.on( 'section:activated', WprMegaMenuEditor.sectionActivated );
},
sectionActivated: function( sectionName, editor ) {
let currentElement = WprMegaMenuEditor.currentElement = editor.getOption( 'editedElementView' ) || false;
if ( ! currentElement ) {
return;
}
if ( 'wpr-mega-menu' == currentElement.model.get( 'widgetType' ) ) {
// if ( 'section_general' === sectionName ) {}
// currentElement.model.renderRemoteServer();
}
}
};
$( window ).on( 'elementor:init', WprMegaMenuEditor.init );
window.WprMegaMenuEditor = WprMegaMenuEditor;
}( jQuery ) );
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,302 @@
( function( $ ) {
"use strict";
// Elementor Editor Popup
var WprElementorEditorPopup = {
loaded: false,
init: function() {
window.elementor.on( 'preview:loaded', WprElementorEditorPopup.loadPreview );
},
loadPreview: function() {
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/shortcode.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-advanced-slider.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-tabs.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-content-toggle.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
},
renderPopup: function( link ) {
// Open Editor
WprElementorEditorPopup.getPopup().show();
// Render Iframe
$( '#wpr-template-editor-popup .dialog-message').html( '<iframe src="' + $( this ).data( 'permalink' ) + '&elementor' + '" id="wpr-template-edit-frame" width="100%" height="100%"></iframe>' );
// Preloading
$( '#wpr-template-editor-popup .dialog-message').append( '<div id="wpr-template-editor-loading"><div class="elementor-loader-wrapper"><div class="elementor-loader"><div class="elementor-loader-boxes"><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div></div></div><div class="elementor-loading-title">Loading</div></div></div>' );
// Loaded
$( '#wpr-template-edit-frame').on( 'load', function() {
$( '#wpr-template-editor-loading').fadeOut( 300 );
} );
// Close
$( '#wpr-template-editor-popup .dialog-close-button' ).css({
'right' : '30px',
'width' : '35px',
'height' : '35px',
'line-height' : '30px',
'border-radius' : '50%',
'text-align' : 'center',
'opacity' : '1',
'background-color' : '#333',
'box-shadow' : '1px 1px 3px 0 #000',
}).html( '<i class="eicon-close"></i>');
$( '#wpr-template-editor-popup .dialog-close-button i' ).css({
'font-size' : '15px',
'color' : '#fff',
})
$( '#wpr-template-editor-popup .dialog-close-button' ).on( 'click', function() {
elementor.reloadPreview();
});
},
getPopup: function() {
if ( ! WprElementorEditorPopup.loaded ) {
this.loaded = elementor.dialogsManager.createWidget( 'lightbox', {
id: 'wpr-template-editor-popup',
closeButton: true,
hide: { onBackgroundClick: false }
} );
}
return WprElementorEditorPopup.loaded;
}
};
$( window ).on( 'elementor:init', WprElementorEditorPopup.init );
// Modal Popups
var WprModalPopups = {
init: function() {
if ( ! $( 'body' ).hasClass( 'elementor-editor-wpr-popups' ) ) {
return;
}
// Load Preview
window.elementor.on( 'preview:loaded', WprModalPopups.onPreviewLoad );
// Change Preview
window.elementor.on( 'preview:loaded', WprModalPopups.onPreviewChange );
// Change Controls
elementor.settings.page.model.on( 'change', WprModalPopups.onControlChange );
},
onPreviewLoad: function() {
// Open Popup Settings
setTimeout(function() {
$( '#elementor-panel-footer-settings' ).trigger( 'click' );
}, 2000);
// Popup Settings Notification
WprModalPopups.settingsNotification();
// Fix Popup Layout
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/global', function( $scope ) {
var popup = $scope.closest( '.wpr-template-popup' );
WprModalPopups.fixPopupLayout( popup );
} );
},
onPreviewChange: function() {
// preview change code goes here
},
onControlChange: function( model ) {
var iframe = document.getElementById( 'elementor-preview-iframe' ),
iframeContent = iframe.contentDocument || iframe.contentWindow.document;
// Popup
var popup = $( '.wpr-template-popup', iframeContent );
// Scrollbar
if ( model.changed.hasOwnProperty( 'popup_height' ) ) {
// elementor.reloadPreview();
}
// Display As
if ( model.changed.hasOwnProperty( 'popup_display_as' ) ) {
if ( 'notification' === model.changed['popup_display_as'] ) {
popup.addClass( 'wpr-popup-notification' );
} else {
popup.removeClass( 'wpr-popup-notification' );
}
}
if ( model.changed.hasOwnProperty( 'popup_display_as' ) ) {
}
// Entrance Animation
if ( model.changed.hasOwnProperty( 'popup_animation' ) ) {
var popupContainer = popup.find('.wpr-popup-container');
popupContainer.removeAttr( 'class');
popupContainer.addClass( 'wpr-popup-container animated '+ model.changed['popup_animation'] );
}
},
fixPopupLayout: function( popup ) {
var settings = WprModalPopups.getDocumentSettings();
// Add Scrollbar
if ( ! popup.find('.wpr-popup-container-inner').hasClass('ps') ) {
const ps = new PerfectScrollbar(popup.find('.wpr-popup-container-inner')[0], {
suppressScrollX: true
});
}
if ( 'notification' === settings.popup_display_as ) {
popup.addClass( 'wpr-popup-notification' );
}
},
getDocumentSettings: function() {
var documentSettings = {},
settings = elementor.settings.page.model;
jQuery.each(settings.getActiveControls(), function (controlKey) {
documentSettings[controlKey] = settings.attributes[controlKey];
});
return documentSettings;
},
settingsNotification: function() {
// Get Close Time
var closeTime = JSON.parse( localStorage.getItem( 'WprPopupEditorNotification') ) || {};
if ( closeTime + 604800000 >= Date.now() ) {
return;
}
// Notification HTML
var nHTML = '\
<div id="wpr-template-settings-notification">\
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
<p>Click here to access <strong>Popup Settings</strong>.</p>\
<i class="eicon-close"></i>\
</div>\
';
// Render Notification
$( 'body' ).append( nHTML ).hide().fadeIn();
// Hide on Click
$( '#wpr-template-settings-notification .eicon-close' ).on( 'click', function() {
$( '#wpr-template-settings-notification' ).fadeOut();
// Save Close Time in Browser
localStorage.setItem( 'WprPopupEditorNotification', Date.now() );
});
},
};
$( window ).on( 'elementor:init', WprModalPopups.init );
// Theme Builder
var WprTemplateEditor = {
init: function() {
if ( ! $( 'body' ).hasClass( 'elementor-editor-wpr-theme-builder' ) ) {
return;
}
// Load Preview
window.elementor.on( 'preview:loaded', WprTemplateEditor.onPreviewLoad );
},
onPreviewLoad: function() {
// Open Popup Settings
setTimeout(function() {
$( '#elementor-panel-footer-settings' ).trigger( 'click' );
}, 500 );
// Popup Settings Notification
WprTemplateEditor.settingsNotification();
// Submit Preview Changes
$( '#elementor-panel-footer-settings' ).on( 'click', function() {
setTimeout(function() {
$( '.elementor-control-submit_preview_changes' ).on( 'click', function() {
$( '#elementor-panel-saver-button-publish' ).trigger( 'click' );
$( '#elementor-preview-loading' ).show();
var saveChanges = setInterval(function() {
if ( ! $( 'html' ).hasClass( 'nprogress-busy' ) ) {
location.reload();
clearInterval(saveChanges);
}
}, 500 );
});
});
});
},
settingsNotification: function() {
// Get Close Time
var closeTime = JSON.parse( localStorage.getItem( 'WprTemplateEditorNotification') ) || {};
if ( closeTime + 604800000 >= Date.now() ) {
return;
}
// Notification HTML
var nHTML = '\
<div id="wpr-template-settings-notification">\
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
<p>You can change <strong>Preview Settings</strong> here.</p>\
<i class="eicon-close"></i>\
</div>\
';
setTimeout(function() {
// Render Notification
$( 'body' ).append( nHTML ).hide().fadeIn();
// Set Close Time
$( document ).on( 'click', function() {
$( '#wpr-template-settings-notification' ).fadeOut();
});
// Hide on Click
$( '#wpr-template-settings-notification .eicon-close' ).on( 'click', function() {
$( '#wpr-template-settings-notification' ).fadeOut();
// Save Close Time in Browser
localStorage.setItem( 'WprTemplateEditorNotification', Date.now() );
});
}, 1000 );
},
};
$( window ).on( 'elementor:init', WprTemplateEditor.init );
}( jQuery ) );
@@ -0,0 +1,440 @@
( function( $ ) {
"use strict";
// Elementor Editor Popup
var WprElementorEditorPopup = {
loaded: false,
init: function() {
window.elementor.on( 'preview:loaded', WprElementorEditorPopup.loadPreview );
},
loadPreview: function() {
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-offcanvas.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-elementor-template.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/shortcode.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-advanced-slider.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-tabs.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-content-toggle.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/wpr-advanced-accordion.default', function( $scope ) {
$scope.find( '.wpr-template-edit-btn' ).on( 'click', WprElementorEditorPopup.renderPopup );
} );
},
renderPopup: function( link ) {
// Open Editor
WprElementorEditorPopup.getPopup().show();
// Render Iframe
$( '#wpr-template-editor-popup .dialog-message').html( '<iframe src="' + $( this ).data( 'permalink' ) + '&elementor' + '" id="wpr-template-edit-frame" width="100%" height="100%"></iframe>' );
// Preloading
$( '#wpr-template-editor-popup .dialog-message').append( '<div id="wpr-template-editor-loading"><div class="elementor-loader-wrapper"><div class="elementor-loader"><div class="elementor-loader-boxes"><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div></div></div><div class="elementor-loading-title">Loading</div></div></div>' );
// Loaded
$( '#wpr-template-edit-frame').on( 'load', function() {
$( '#wpr-template-editor-loading').fadeOut( 300 );
} );
// Close
$( '#wpr-template-editor-popup .dialog-close-button' ).css({
'right' : '30px',
'width' : '35px',
'height' : '35px',
'line-height' : '30px',
'border-radius' : '50%',
'text-align' : 'center',
'opacity' : '1',
'background-color' : '#333',
'box-shadow' : '1px 1px 3px 0 #000',
}).html('<i class="eicon-close"></i>');
$( '#wpr-template-editor-popup .dialog-close-button i' ).css({
'font-size' : '15px',
'color' : '#fff',
})
$( '#wpr-template-editor-popup .dialog-close-button' ).on( 'click', function() {
elementor.reloadPreview();
});
},
getPopup: function() {
if ( ! WprElementorEditorPopup.loaded ) {
this.loaded = elementor.dialogsManager.createWidget( 'lightbox', {
id: 'wpr-template-editor-popup',
closeButton: true,
hide: { onBackgroundClick: false }
} );
}
return WprElementorEditorPopup.loaded;
}
};
$( window ).on( 'elementor:init', WprElementorEditorPopup.init );
// Modal Popups
var WprModalPopups = {
init: function() {
if ( ! $( 'body' ).hasClass( 'elementor-editor-wpr-popups' ) ) {
return;
}
// Load Preview
window.elementor.on( 'preview:loaded', WprModalPopups.onPreviewLoad );
// Change Preview
window.elementor.on( 'preview:loaded', WprModalPopups.onPreviewChange );
// Change Controls
elementor.settings.page.model.on( 'change', WprModalPopups.onControlChange );
},
onPreviewLoad: function() {
// Open Popup Settings
setTimeout(function() {
if ( $( '#elementor-panel-footer-settings' ).length ) {
$( '#elementor-panel-footer-settings' ).trigger( 'click' );
} else {
setTimeout(function() {
$( '#elementor-panel-footer-settings' ).trigger( 'click' );
}, 5000);
}
}, 2000);
// Popup Settings Notification
WprModalPopups.settingsNotification();
// Fix Popup Layout
window.elementorFrontend.hooks.addAction( 'frontend/element_ready/global', function( $scope ) {
var popup = $scope.closest( '.wpr-template-popup' );
WprModalPopups.fixPopupLayout( popup );
} );
},
onPreviewChange: function() {
// preview change code goes here
},
onControlChange: function( model ) {
var iframe = document.getElementById( 'elementor-preview-iframe' ),
iframeContent = iframe.contentDocument || iframe.contentWindow.document;
// Popup
var popup = $( '.wpr-template-popup', iframeContent );
// Scrollbar
if ( model.changed.hasOwnProperty( 'popup_height' ) ) {
// elementor.reloadPreview();
}
// Display As
if ( model.changed.hasOwnProperty( 'popup_display_as' ) ) {
if ( 'notification' === model.changed['popup_display_as'] ) {
popup.addClass( 'wpr-popup-notification' );
} else {
popup.removeClass( 'wpr-popup-notification' );
}
}
if ( model.changed.hasOwnProperty( 'popup_display_as' ) ) {
}
// Entrance Animation
if ( model.changed.hasOwnProperty( 'popup_animation' ) ) {
var popupContainer = popup.find('.wpr-popup-container');
popupContainer.removeAttr( 'class');
popupContainer.addClass( 'wpr-popup-container animated '+ model.changed['popup_animation'] );
}
},
fixPopupLayout: function( popup ) {
var settings = WprModalPopups.getDocumentSettings();
// Add Scrollbar
if ( ! popup.find('.wpr-popup-container-inner').hasClass('ps') ) {
const ps = new PerfectScrollbar(popup.find('.wpr-popup-container-inner')[0], {
suppressScrollX: true
});
}
if ( 'notification' === settings.popup_display_as ) {
popup.addClass( 'wpr-popup-notification' );
}
},
getDocumentSettings: function() {
var documentSettings = {},
settings = elementor.settings.page.model;
jQuery.each(settings.getActiveControls(), function (controlKey) {
documentSettings[controlKey] = settings.attributes[controlKey];
});
return documentSettings;
},
settingsNotification: function() {
var version = $('#wpr-addons-editor-js-js').attr('src');
version = 'v-'+ version.substring(version .length - 6, version .length);
// Get Close Time
var closeTime = JSON.parse( localStorage.getItem( 'WprPopupEditorNotification'+ version) ) || {};
if ( closeTime + 604800000 >= Date.now() ) {
return;
}
// Notification HTML
if ( $('body').find('#elementor-editor-wrapper-v2').length > 0 ) {
// Notification HTML
var nHTML = '\
<div id="wpr-template-settings-notification" class="wpr-new-editor-bar">\
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
<p>Click here to access <strong>Popup Settings</strong>.<br>Click our Logo to the bottom to open a <strong>Popup Library</strong>.</p>\
<i class="eicon-close"></i>\
</div>\
';
} else {
var nHTML = '\
<div id="wpr-template-settings-notification">\
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
<p>Click here to access <strong>Popup Settings</strong>.<br>Click our Logo to the right to open a <strong>Popup Library</strong>.</p>\
<i class="eicon-close"></i>\
</div>\
';
}
// Render Notification
if ( $('body').find('#elementor-editor-wrapper-v2').length > 0 ) {
$('body .MuiBox-root button[value="document-settings"]').append(nHTML).hide().fadeIn();
} else {
$( 'body' ).append( nHTML ).hide().fadeIn();
}
// Hide on Click
$( '#wpr-template-settings-notification .eicon-close' ).on( 'click', function() {
$( '#wpr-template-settings-notification' ).fadeOut();
// Save Close Time in Browser
localStorage.setItem( 'WprPopupEditorNotification'+ version, Date.now() );
});
},
};
$( window ).on( 'elementor:init', WprModalPopups.init );
// Theme Builder
var WprThemeBuilder = {
init: function() {
if ( ! $( 'body' ).hasClass( 'elementor-editor-wpr-theme-builder' ) ) {
return;
}
// Load Preview
window.elementor.on( 'preview:loaded', WprThemeBuilder.onPreviewLoad );
},
onPreviewLoad: function() {
// Popup Settings Notification
WprThemeBuilder.settingsNotification();
// Submit Preview Changes
$( '#elementor-panel-footer-settings' ).on( 'click', function() {
setTimeout(function() {
$( '.elementor-control-submit_preview_changes button' ).on( 'click', function() {
$e.run('document/save/auto', {
force: true,
onSuccess: function onSuccess() {
elementor.reloadPreview();
elementor.once('preview:loaded', function () {
$e.route('panel/page-settings/settings');
});
}
});
});
}, 500);
});
},
settingsNotification: function() {
var version = $('#wpr-addons-editor-js-js').attr('src');
version = 'v-'+ version.substring(version .length - 6, version .length);
// Get Close Time
var closeTime = JSON.parse( localStorage.getItem('WprThemeBuilderNotification'+ version) ) || {};
if ( closeTime + 604800000 >= Date.now() ) {
return;
}
if ( $('body').find('#elementor-editor-wrapper-v2').length > 0 ) {
// Notification HTML
var nHTML = '\
<div id="wpr-template-settings-notification" class="wpr-new-editor-bar">\
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
<p>You can change <strong>Preview Settings</strong> here.</p>\
<i class="eicon-close"></i>\
</div>\
';
} else {
// Notification HTML
var nHTML = '\
<div id="wpr-template-settings-notification">\
<h4><i class="eicon-info-circle"></i><span>Please Note</span></h4>\
<p>You can change <strong>Preview Settings</strong> here.</p>\
<i class="eicon-close"></i>\
</div>\
';
}
setTimeout(function() {
// Render Notification
if ( !$('#wpr-template-settings-notification').length ) {
if ( $('body').find('#elementor-editor-wrapper-v2').length > 0 ) {
$('body .MuiBox-root button[value="document-settings"]').append(nHTML).hide().fadeIn();
} else {
$('body').append(nHTML).hide().fadeIn();
}
// Set Close Time
$(document).on( 'click', function() {
$('#wpr-template-settings-notification').fadeOut();
});
// Hide on Click
$('#wpr-template-settings-notification .eicon-close').on( 'click', function() {
$( '#wpr-template-settings-notification' ).fadeOut();
// Save Close Time in Browser
localStorage.setItem( 'WprThemeBuilderNotification'+ version, Date.now() );
});
}
}, 1000 );
},
};
$( window ).on( 'elementor:init', WprThemeBuilder.init );
// Sticky Section Editor JS
$(window).on('elementor:init', function () {
elementor.settings.page.addChangeCallback( 'wpr_rpb_enable', function ( newValue ) {
if('yes' == newValue ) {
let wrpbHtml = '<div class="wpr-reading-progress-bar-container"><div class="wpr-reading-progress-bar wpr-mybar" id="wpr-mybar"></div></div>';
$( elementorFrontend.elements.$body ).append( wrpbHtml );
} else {
if ( $( elementorFrontend.elements.$body ).find( '.wpr-reading-progress-bar-container' ).length ) {
$( elementorFrontend.elements.$body ).find( '.wpr-reading-progress-bar-container' ).remove();
}
}
});
});
$(window).on('elementor:init', function () {
// Data Table
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-data-table', function( panel, model, view ) {
elementor.channels.editor.on( 'my-table-export',() => {
console.log('table exporting');
// var html = view.$el.find('.wpr-data-table');
var html = view.$el.find('.wpr-data-table').prop('outerHTML');
htmlToCSV(html, "placeholder.csv", view);
} );
});
});
function htmlToCSV(html, filename, view) {
var data = [];
var rows = view.$el.find('.wpr-data-table').find(".wpr-table-row");
for (var i = 0; i < rows.length; i++) {
var row = [], cols = rows[i].querySelectorAll(".wpr-table-text");
for (var j = 0; j < cols.length; j++) {
row.push(cols[j].innerText);
}
data.push(row.join(","));
}
downloadCSVFile(data.join("\n"), filename);
}
function downloadCSVFile(csv, filename) {
var csv_file, download_link;
csv_file = new Blob([csv], {type: "text/csv"});
download_link = document.createElement("a");
download_link.download = filename;
download_link.href = window.URL.createObjectURL(csv_file);
download_link.style.display = "none";
document.body.appendChild(download_link);
download_link.click();
} // Data Table CSV export
}( jQuery ) );
function connectInstagramInit(obj) {
if (!obj) return;
var type = jQuery(obj).data("type");
console.log(type);
connectInstagram(obj, type);
}
// $( window ).on( 'elementor:init', function() {
// $('.wpr-facebook-login').on('click', connectInstagramInit);
// function connectInstagramInit(obj) {
// if (!obj) return;
// var type = jQuery(obj).data("type");
// console.log(obj);
// connectInstagram(obj, type);
// }
// } );
@@ -0,0 +1,449 @@
( function( $ ) {
"use strict";
// Modal Popups
var WprLibraryTmpls = {
sectionIndex: null,
contentID: 0,
logoURL: white_label.logo_url,
init: function() {
window.elementor.on( 'preview:loaded', WprLibraryTmpls.previewLoaded );
},
previewLoaded: function() {
var previewIframe = window.elementor.$previewContents,
addNewSection = previewIframe.find( '.elementor-add-new-section' ),
libraryButton = '<div id="wpr-library-btn" class="elementor-add-section-area-button" style="background:url('+ WprLibraryTmpls.logoURL +') no-repeat center center / contain;"></div>';
// Add Library Button
var elementorAddSection = $("#tmpl-elementor-add-section"),
elementorAddSectionText = elementorAddSection.text();
elementorAddSectionText = elementorAddSectionText.replace('<div class="elementor-add-section-drag-title', libraryButton +'<div class="elementor-add-section-drag-title');
elementorAddSection.text(elementorAddSectionText);
$( previewIframe ).on( 'click', '.elementor-editor-section-settings .elementor-editor-element-add', function() {
var addNewSectionWrap = $(this).closest( '.elementor-top-section' ).prev( '.elementor-add-section' ),
modelID = $(this).closest( '.elementor-top-section' ).data( 'model-cid' );
// Add Library Button
if ( 0 == addNewSectionWrap.find( '#wpr-library-btn' ).length ) {
setTimeout( function() {
addNewSectionWrap.find( '.elementor-add-new-section' ).prepend( libraryButton );
}, 110 );
}
// Set Section Index
if ( window.elementor.elements.models.length ) {
$.each( window.elementor.elements.models, function( index, model ) {
if ( modelID === model.cid ) {
WprLibraryTmpls.sectionIndex = index;
}
});
}
WprLibraryTmpls.contentID++;
});
// Open Popup Predefined Styles
if ( 'wpr-popups' === window.elementor.config.document.type ) {
setTimeout(function() {
if ( 0 === previewIframe.find('.elementor-section-wrap.ui-sortable').children().length ) {
previewIframe.find('#wpr-library-btn').trigger('click');
}
}, 2000);
}
// Popup
previewIframe.on( 'click', '#wpr-library-btn', function() {
// Render Popup
WprLibraryTmpls.renderPopup( previewIframe );
// Render Content
if ( 'wpr-popups' === window.elementor.config.document.type && undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
WprLibraryTmpls.renderPopupContent( previewIframe, 'popups' );
} else {
WprLibraryTmpls.renderPopupContent( previewIframe, 'blocks' );
}
// Filter Content
$(document).on( 'wpr-filter-popup-content', function() {
var filter = previewIframe.find('#wpr-library-btn').attr('data-filter');
previewIframe.find( '.wpr-tplib-sidebar ul li[data-filter="'+ filter +'"]' ).trigger('click');
});
});
},
renderPopup: function( previewIframe ) {
// Render
if ( previewIframe.find( '.wpr-tplib-popup' ).length == 0 ) {
var headerNavigation = '<li data-tab="blocks" class="wpr-tplib-active-tab">Blocks</li>';
if ( 'wpr-popups' === window.elementor.config.document.type ) {
if ( undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
var headerNavigation = '\
<li data-tab="blocks">Blocks</li>\
<li data-tab="popups" class="wpr-tplib-active-tab">Popups</li>';
} else {
var headerNavigation = '\
<li data-tab="blocks" class="wpr-tplib-active-tab">Blocks</li>\
<li data-tab="popups">Popups</li>';
}
}
previewIframe.find( 'body' ).append( '\
<div class="wpr-tplib-popup-overlay">\
<div class="wpr-tplib-popup">\
<div class="wpr-tplib-header elementor-clearfix">\
<div class="wpr-tplib-logo"><span class="wpr-library-icon" style="background:url('+ WprLibraryTmpls.logoURL +') no-repeat center center / contain;">RE</span>Library</div>\
<div class="wpr-tplib-back" data-tab="">\
<i class="eicon-chevron-left"></i> <span>Back to Library</span>\
</div>\
<ul>'+ headerNavigation +'</ul>\
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span>Insert</span></span>\
<div class="wpr-tplib-close"><i class="eicon-close"></i></div>\
</div>\
<div class="wpr-tplib-content-wrap elementor-clearfix">\
</div>\
<div class="wpr-tplib-preview-wrap"></div>\
</div>\
</div>\
' );
}
// Show Overlay
$e.run( 'panel/close' );
$('#wpr-template-settings-notification').hide();
previewIframe.find('html').css('overflow','hidden');
previewIframe.find('.wpr-tplib-preview-wrap iframe').remove();
previewIframe.find( '.wpr-tplib-popup-overlay' ).show();
// Close
previewIframe.find( '.wpr-tplib-close' ).on( 'click', function() {
$e.run( 'panel/open' );
$('#wpr-template-settings-notification').show();
previewIframe.find('html').css('overflow','auto');
previewIframe.find( '.wpr-tplib-popup-overlay' ).fadeOut( 'fast', function() {
previewIframe.find('.wpr-tplib-popup-overlay').remove();
previewIframe.find('#wpr-library-btn').removeAttr('data-filter');
});
});
// Render Content
previewIframe.find('.wpr-tplib-header').find('li').on( 'click', function() {
previewIframe.find( '.wpr-tplib-header' ).find('li').removeClass( 'wpr-tplib-active-tab' );
$(this).addClass( 'wpr-tplib-active-tab' );
// Render Tab Content
WprLibraryTmpls.renderPopupContent( previewIframe, $(this).data('tab') );
});
// Close Preview
previewIframe.find( '.wpr-tplib-back' ).on( 'click', function() {
$(this).hide();
previewIframe.find('.wpr-tplib-close i').css('border-left', '0');
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').hide();
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').removeClass('wpr-tplib-insert-pro');
previewIframe.find( '.wpr-tplib-preview-wrap' ).hide();
previewIframe.find( '.wpr-tplib-preview-wrap' ).html('');
previewIframe.find('.wpr-tplib-popup').css('overflow','hidden');
previewIframe.find( '.wpr-tplib-logo' ).show();
previewIframe.find( '.wpr-tplib-header ul li' ).show();
previewIframe.find( '.wpr-tplib-content-wrap' ).show();
});
},
renderPopupContent: function( previewIframe, tab ) {
WprLibraryTmpls.renderPopupLoader( previewIframe );
// AJAX Data
var data = {
action: 'render_library_templates_'+ tab,
};
// Update via AJAX
$.post(ajaxurl, data, function( response ) {
previewIframe.find( '.wpr-tplib-content-wrap' ).html( response );
// Render Preview
}).always(function() {
// Template Preview
previewIframe.find( '.wpr-tplib-template-media' ).on( 'click', function() {
var module = $(this).parent().data('filter'),
template = $(this).parent().data('slug'),
previewUrl = 'https://royal-elementor-addons.com/premade-styles/'+ $(this).parent().data('preview-url'),
previewType = $(this).parent().data('preview-type'),
proRefferal = '';
if ( $(this).closest('.wpr-tplib-pro-wrap').length ) {
proRefferal = '-pro';
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').addClass('wpr-tplib-insert-pro');
}
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').attr('data-filter', module).attr('data-slug', template);
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').html($(this).parent().find('.wpr-tplib-insert-template').html());
previewIframe.find('.wpr-tplib-close i').css('border-left', '1px solid #e8e8e8');
// Hide Extra
previewIframe.find('.wpr-tplib-logo').hide();
previewIframe.find('.wpr-tplib-header ul li').hide();
previewIframe.find('.wpr-tplib-back').show();
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').show();
// Load Iframe
previewIframe.find('.wpr-tplib-content-wrap').hide();
previewIframe.find('.wpr-tplib-preview-wrap').show();
if ( 'iframe' == previewType ) {
previewIframe.find('.wpr-tplib-preview-wrap').html( '<div class="wpr-tplib-iframe"><iframe src="'+ previewUrl +'?ref=rea-plugin-library-preview'+ proRefferal +'"></iframe></div>' );
previewIframe.find('.wpr-tplib-popup').css('overflow','hidden');
} else {
previewUrl = previewUrl.replace('premade-styles', 'library/premade-styles');
previewIframe.find('.wpr-tplib-preview-wrap').html( '<div class="wpr-tplib-image"><img src="'+ previewUrl +'"></div>' );
// Enable Scroll for Image Previews
previewIframe.find('.wpr-tplib-popup').css('overflow','scroll');
}
});
// Filters
previewIframe.find( '.wpr-tplib-filters-list ul li' ).on( 'click', function() {
var current = $(this).attr( 'data-filter' );
// Show/Hide
if ( 'all' === current ) {
previewIframe.find( '.wpr-tplib-template' ).parent().show();
} else {
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
previewIframe.find( '.wpr-tplib-template[data-filter="'+ current +'"]' ).parent().show();
}
previewIframe.find('.wpr-tplib-filters h3 span').attr('data-filter', current).text($(this).text());
// Sub Filters - TODO: Enable When Pro is Integrated
// if ( -1 !== current.indexOf('grid') ) {
// previewIframe.find( '.wpr-tplib-sub-filters' ).show();
// } else {
// previewIframe.find( '.wpr-tplib-sub-filters' ).hide();
// }
WprLibraryTmpls.renderPopupGrid( previewIframe );
});
// Sub Filters
previewIframe.find( '.wpr-tplib-sub-filters ul li' ).on( 'click', function() {
var current = $(this).attr( 'data-sub-filter' ),
parentFilter = previewIframe.find('.wpr-tplib-filters h3 span').attr('data-filter');
// Active Class
previewIframe.find( '.wpr-tplib-sub-filters ul li' ).removeClass( 'wpr-tplib-activ-filter' );
$(this).addClass( 'wpr-tplib-activ-filter' );
// Show/Hide
if ( 'all' === current ) {
previewIframe.find( '.wpr-tplib-template[data-filter="'+ parentFilter +'"]' ).parent().show();
} else {
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
previewIframe.find( '.wpr-tplib-template[data-filter="'+ parentFilter +'"][data-sub-filter="'+ current +'"]' ).parent().show();
}
WprLibraryTmpls.renderPopupGrid( previewIframe );
});
// Search
var keywords = [];
// previewIframe.find( '.wpr-tplib-template' ).each( function() {
// var kw = $(this).attr( 'data-keywords' );
// keywords[$(this).attr( 'data-slug' )] = kw.split( ', ' );
// });
previewIframe.find( '.wpr-tplib-sidebar input' ).on( 'keyup', function() {
if ( '' !== $(this).val() ) {
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
previewIframe.find( '.wpr-tplib-template[data-keywords*="'+ $(this).val() +'"]' ).parent().show();
} else {
previewIframe.find( '.wpr-tplib-template' ).parent().show();
}
});
// Import Template
previewIframe.find( '.wpr-tplib-insert-template' ).on( 'click', function() {
var module = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-filter' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-filter' ),
template = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-slug' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-slug' ),
activeTab = previewIframe.find('.wpr-tplib-active-tab').attr('data-tab');
// Popup Templates
if ( 'wpr-popups' === window.elementor.config.document.type && 'popups' === activeTab ) {
module = 'popups/'+ module;
}
// Purchase Page
if ( $(this).hasClass('wpr-tplib-insert-pro') ) {
var href = window.location.href,
adminUrl = href.substring(0, href.indexOf('/wp-admin')+9);
// window.open(adminUrl +'/admin.php?page=wpr-addons-pricing', '_blank');
window.open('https://royal-elementor-addons.com/?ref=rea-plugin-library-'+ module +'-upgrade-pro#purchasepro', '_blank');
return;
}
previewIframe.find('.wpr-tplib-content-wrap').show();
previewIframe.find('.wpr-tplib-preview-wrap').hide();
WprLibraryTmpls.renderPopupLoader( previewIframe );
// AJAX Data
var data = {
action: 'wpr_import_library_template',
slug: module +'/'+ template
};
// Update via AJAX
$.post(ajaxurl, data, function(response) {
var importFile = response.substring( 0, response.length-1 ),
importFile = JSON.parse( importFile );
importFile.content[0].id += WprLibraryTmpls.contentID;
// Insert Template
window.elementor.getPreviewView().addChildModel( importFile.content, { at: WprLibraryTmpls.sectionIndex } );
if ( 'wpr-popups' === window.elementor.config.document.type && 'popups' === activeTab ) {
var defaults = {
popup_trigger: 'load',
popup_show_again_delay: '0',
popup_load_delay: '1',
popup_display_as: 'modal',
popup_width: {
unit: 'px',
size: '650'
},
popup_height: 'auto',
popup_align_hr: 'center',
popup_align_vr: 'center',
popup_content_align: 'flex-start',
popup_animation: 'fadeIn',
popup_animation_duration: '1',
popup_overlay_display: 'yes',
popup_close_button_display: 'yes',
popup_container_bg_background: 'classic',
popup_container_bg_position: 'center center',
popup_container_bg_repeat: 'no-repeat',
popup_container_bg_size: 'cover',
popup_overlay_bg_background: 'classic',
popup_container_padding: {
isLinked: true,
unit: 'px',
top: 20,
right: 20,
bottom: 20,
left: 20,
},
popup_container_radius: {
isLinked: true,
unit: 'px',
top: 0,
right: 0,
bottom: 0,
left: 0,
}
};
// Reset Defaults
elementor.settings.page.model.set(defaults);
// Import Page Settings
elementor.settings.page.model.set( importFile.page_settings );
}
// Fix Update Button
window.elementor.panel.$el.find('#elementor-panel-footer-saver-publish button').removeClass('elementor-disabled');
window.elementor.panel.$el.find('#elementor-panel-footer-saver-options button').removeClass('elementor-disabled');
// Reset Section Index
WprLibraryTmpls.sectionIndex = null;
// Close Library
$e.run( 'panel/open' );
$('#wpr-template-settings-notification').show();
previewIframe.find('html').css('overflow','auto');
previewIframe.find( '.wpr-tplib-popup-overlay' ).fadeOut( 'fast', function() {
previewIframe.find('.wpr-tplib-popup-overlay').remove();
previewIframe.find('#wpr-library-btn').removeAttr('data-filter');
});
});
});
$(document).trigger('wpr-filter-popup-content');
previewIframe.find('.wpr-tplib-filters').on('click', function(){
if ( '0' == previewIframe.find('.wpr-tplib-filters-list').css('opacity') ) {
previewIframe.find('.wpr-tplib-filters-list').css({
'opacity' : '1',
'visibility' : 'visible'
});
} else {
previewIframe.find('.wpr-tplib-filters-list').css({
'opacity' : '0',
'visibility' : 'hidden'
});
}
});
previewIframe.on('click', function(){
if ( '1' == previewIframe.find('.wpr-tplib-filters-list').css('opacity') ) {
previewIframe.find('.wpr-tplib-filters-list').css({
'opacity' : '0',
'visibility' : 'hidden'
});
}
});
WprLibraryTmpls.renderPopupGrid( previewIframe );
}); // end always
},
renderPopupLoader: function( previewIframe ) {
previewIframe.find( '.wpr-tplib-content-wrap' ).prepend('<div class="wpr-tplib-loader"><div class="elementor-loader-wrapper"><div class="elementor-loader"><div class="elementor-loader-boxes"><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div></div></div><div class="elementor-loading-title">Loading</div></div></div>');
},
renderPopupGrid: function( previewIframe ) {
// Run Macy
var macy = Macy({
container: previewIframe.find('.wpr-tplib-template-gird-inner')[0],
waitForImages: true,
margin: 30,
columns: 5,
breakAt: {
1370: 4,
940: 3,
520: 2,
400: 1
}
});
setTimeout(function(){
macy.recalculate(true);
}, 300 );
setTimeout(function(){
macy.recalculate(true);
}, 600 );
}
};
$( window ).on( 'elementor:init', WprLibraryTmpls.init );
}( jQuery ) );
@@ -0,0 +1,799 @@
( function( $ ) {
"use strict";
// Modal Popups
var WprLibraryTmpls = {
sectionIndex: null,
contentID: 0,
logoURL: white_label.logo_url,
init: function() {
window.elementor.on( 'preview:loaded', WprLibraryTmpls.previewLoaded );
},
previewLoaded: function() {
var previewIframe = window.elementor.$previewContents,
addNewSection = previewIframe.find( '.elementor-add-new-section' ),
libraryButton = '<div id="wpr-library-btn" class="elementor-add-section-area-button" style="background:url('+ WprLibraryTmpls.logoURL +') no-repeat center center / contain;"></div>';
// Add Library Button
var elementorAddSection = $("#tmpl-elementor-add-section"),
elementorAddSectionText = elementorAddSection.text();
elementorAddSectionText = elementorAddSectionText.replace('<div class="elementor-add-section-drag-title', libraryButton +'<div class="elementor-add-section-drag-title');
elementorAddSection.text(elementorAddSectionText);
$( previewIframe ).on( 'click', '.elementor-editor-section-settings .elementor-editor-element-add', function() {
var addNewSectionWrap = $(this).closest( '.elementor-top-section' ).prev( '.elementor-add-section' ),
modelID = $(this).closest( '.elementor-top-section' ).data( 'model-cid' );
// Add Library Button
if ( 0 == addNewSectionWrap.find( '#wpr-library-btn' ).length ) {
setTimeout( function() {
addNewSectionWrap.find( '.elementor-add-new-section' ).prepend( libraryButton );
}, 110 );
}
// Set Section Index
if ( window.elementor.elements.models.length ) {
$.each( window.elementor.elements.models, function( index, model ) {
if ( modelID === model.cid ) {
WprLibraryTmpls.sectionIndex = index;
}
});
}
WprLibraryTmpls.contentID++;
});
// Open Popup Predefined Styles
// TODO: Experiment Disable Library opening for Pupups
// if ( 'wpr-popups' === window.elementor.config.document.type ) {
// setTimeout(function() {
// if ( 0 === previewIframe.find('.elementor-section-wrap.ui-sortable').children().length ) {
// previewIframe.find('#wpr-library-btn').trigger('click');
// }
// }, 2000);
// }
// Popup
previewIframe.on( 'click', '#wpr-library-btn', function() {
// Render Popup
WprLibraryTmpls.renderPopup( previewIframe );
// Render Content
if ( 'wpr-popups' === window.elementor.config.document.type && undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
WprLibraryTmpls.renderPopupContent( previewIframe, 'popups' );
} else if ( 'wp-post' === window.elementor.config.document.type && undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
WprLibraryTmpls.renderPopupContent( previewIframe, 'sections' );
} else if ( undefined !== previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
previewIframe.find('.wpr-tplib-header').find('li').removeClass( 'wpr-tplib-active-tab' );
previewIframe.find('.wpr-tplib-header').find('li[data-tab="blocks"]').addClass( 'wpr-tplib-active-tab' );
WprLibraryTmpls.renderPopupContent( previewIframe, 'blocks' );
} else {
WprLibraryTmpls.renderPopupContent( previewIframe, 'pages' );
}
// Filter Content
$(document).on( 'wpr-filter-popup-content', function() {
var filter = previewIframe.find('#wpr-library-btn').attr('data-filter');
previewIframe.find( '.wpr-tplib-sidebar ul li[data-filter="'+ filter +'"]' ).trigger('click');
});
});
// Booking tutorial link
previewIframe.on( 'click', '#wpr-info-box a', function(event) {
event.preventDefault();
var url = $(this).attr('href');
if (url) {
window.open(url, '_blank');
}
});
},
renderPopup: function( previewIframe ) {
// Render
if ( previewIframe.find( '.wpr-tplib-popup' ).length == 0 ) {
var headerNavigation = '';
if ( 'wp-post' === window.elementor.config.document.type ) {
headerNavigation += '<li data-tab="pages">Pages</li>';
headerNavigation += '<li data-tab="sections" class="wpr-tplib-active-tab">Sections</li>';
} else {
headerNavigation += '<li data-tab="pages" class="wpr-tplib-active-tab">Pages</li>';
headerNavigation += '<li data-tab="sections">Sections</li>';
}
headerNavigation += '<li data-tab="blocks">Blocks</li>';
if ( 'wpr-popups' === window.elementor.config.document.type ) {
if ( undefined === previewIframe.find('#wpr-library-btn').attr('data-filter') ) {
var headerNavigation = '\
<li data-tab="popups" class="wpr-tplib-active-tab">Popups</li>\
<li data-tab="sections">Sections</li>\
<li data-tab="blocks">Blocks</li>';
} else {
var headerNavigation = '\
<li data-tab="popups">Popups</li>\
<li data-tab="sections">Sections</li>\
<li data-tab="blocks" class="wpr-tplib-active-tab">Blocks</li>';
}
}
previewIframe.find( 'body' ).append( '\
<div class="wpr-tplib-popup-overlay">\
<div class="wpr-tplib-popup">\
<div class="wpr-tplib-header elementor-clearfix">\
<div class="wpr-tplib-logo"><span class="wpr-library-icon" style="background:url('+ WprLibraryTmpls.logoURL +') no-repeat center center / contain;">RE</span>Library</div>\
<div class="wpr-tplib-back" data-tab="">\
<i class="eicon-chevron-left"></i> <span>Back to Library</span>\
</div>\
<ul>'+ headerNavigation +'</ul>\
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span>Insert</span></span>\
<div class="wpr-tplib-close"><i class="eicon-close"></i></div>\
</div>\
<div class="wpr-tplib-content-wrap elementor-clearfix">\
</div>\
<div class="wpr-tplib-preview-wrap"></div>\
</div>\
</div>\
' );
}
// Show Overlay
$e.run( 'panel/close' );
$('#wpr-template-settings-notification').hide();
previewIframe.find('html').css('overflow','hidden');
previewIframe.find('.wpr-tplib-preview-wrap iframe').remove();
previewIframe.find( '.wpr-tplib-popup-overlay' ).show();
// Close
previewIframe.find( '.wpr-tplib-close' ).on( 'click', function() {
$e.run( 'panel/open' );
$('#wpr-template-settings-notification').show();
previewIframe.find('html').css('overflow','auto');
previewIframe.find( '.wpr-tplib-popup-overlay' ).fadeOut( 'fast', function() {
previewIframe.find('.wpr-tplib-popup-overlay').remove();
previewIframe.find('#wpr-library-btn').removeAttr('data-filter');
});
});
// Render Content
previewIframe.find('.wpr-tplib-header').find('li').on( 'click', function() {
previewIframe.find( '.wpr-tplib-header' ).find('li').removeClass( 'wpr-tplib-active-tab' );
$(this).addClass( 'wpr-tplib-active-tab' );
// Render Tab Content
previewIframe.find('.wpr-tplib-content-wrap').html('');
WprLibraryTmpls.renderPopupContent( previewIframe, $(this).data('tab') );
});
// Close Preview
previewIframe.find( '.wpr-tplib-back' ).on( 'click', function() {
$(this).hide();
previewIframe.find('.wpr-tplib-close i').css('border-left', '0');
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').hide();
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').removeClass('wpr-tplib-insert-pro').removeClass('wpr-tplib-insert-woo');
previewIframe.find( '.wpr-tplib-preview-wrap' ).hide();
previewIframe.find( '.wpr-tplib-preview-wrap' ).html('');
previewIframe.find('.wpr-tplib-popup').css('overflow','hidden');
previewIframe.find( '.wpr-tplib-logo' ).show();
previewIframe.find( '.wpr-tplib-header ul li' ).show();
previewIframe.find( '.wpr-tplib-content-wrap' ).show();
});
},
renderPopupContent: function( previewIframe, tab, scrolling = false ) {
WprLibraryTmpls.renderPopupLoader( previewIframe );
// AJAX Data
var data = {
action: 'render_library_templates_'+ tab
};
// Update via AJAX
$.post(ajaxurl, data, function( response ) {
previewIframe.find('.wpr-tplib-content-wrap').html('');
previewIframe.find('.wpr-tplib-content-wrap').html( response );
// Render Preview
}).always(function() {
// Template Preview
WprLibraryTmpls.templateGridPreview(previewIframe);
// Filters
previewIframe.find( '.wpr-tplib-filters-list ul li' ).on( 'click', function() {
var current = $(this).attr( 'data-filter' );
// Show/Hide
if ( 'all' === current ) {
previewIframe.find( '.wpr-tplib-template' ).parent().show();
} else {
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
previewIframe.find( '.wpr-tplib-template[data-filter="'+ current +'"]' ).parent().show();
}
previewIframe.find('.wpr-tplib-filters h3 span').attr('data-filter', current).text($(this).text());
// Sub Filters - TODO: Enable When Pro is Integrated
// if ( -1 !== current.indexOf('grid') ) {
// previewIframe.find( '.wpr-tplib-sub-filters' ).show();
// } else {
// previewIframe.find( '.wpr-tplib-sub-filters' ).hide();
// }
WprLibraryTmpls.renderPopupGrid( previewIframe );
});
// Sub Filters
previewIframe.find( '.wpr-tplib-sub-filters ul li' ).on( 'click', function() {
var current = $(this).attr( 'data-sub-filter' ),
parentFilter = previewIframe.find('.wpr-tplib-filters h3 span').attr('data-filter');
// Active Class
previewIframe.find( '.wpr-tplib-sub-filters ul li' ).removeClass( 'wpr-tplib-activ-filter' );
$(this).addClass( 'wpr-tplib-activ-filter' );
// Show/Hide
if ( 'all' === current ) {
previewIframe.find( '.wpr-tplib-template[data-filter="'+ parentFilter +'"]' ).parent().show();
} else {
previewIframe.find( '.wpr-tplib-template' ).parent().hide();
previewIframe.find( '.wpr-tplib-template[data-filter="'+ parentFilter +'"][data-sub-filter="'+ current +'"]' ).parent().show();
}
WprLibraryTmpls.renderPopupGrid( previewIframe );
});
// Price Filter
previewIframe.find( '.wpr-tplib-price-list ul li' ).on( 'click', function() {
// Get Search Query
var search = previewIframe.find('.wpr-tplib-search input').val(),
searchAttr = '' === search ? '' : '[data-title*="'+ search +'"]';
// Reset
// Set Active
previewIframe.find('.wpr-tplib-price').attr('data-filter', $(this).data('filter'));
previewIframe.find('.wpr-tplib-price').find('h3 span').text( $(this).text() );
if ( 'free' === $(this).data('filter') ) {
previewIframe.find('.wpr-tplib-template-wrap'+ searchAttr).show();
previewIframe.find('.wpr-tplib-pro-wrap').hide();
} else if ( 'pro' === $(this).data('filter') ) {
previewIframe.find('.wpr-tplib-template-wrap').hide();
previewIframe.find('.wpr-tplib-pro-wrap'+ searchAttr).show();
} else {
previewIframe.find('.wpr-tplib-template-wrap'+ searchAttr).show();
}
// previewIframe.find('.wpr-tplib-template-wrap'+ searchAttr).show();
WprLibraryTmpls.renderPopupGrid( previewIframe );
});
// Search
var searchTimeout = null;
previewIframe.find( '.wpr-tplib-sidebar input' ).on( 'keyup', function() { // .wpr-tplib-search
var val = $(this).val().toLowerCase();
var price = previewIframe.find('.wpr-tplib-price').attr('data-filter');
if (searchTimeout != null) {
clearTimeout(searchTimeout);
}
searchTimeout = setTimeout(function() {
searchTimeout = null;
let keywords = ["appointment", "book"]; // Keywords to look for
// Check if any keyword matches the input
let keywordFound = keywords.some(function(keyword) {
return keyword.includes(val) || val.includes(keyword);
});
// If a keyword is found and the div doesn't already exist
if (keywordFound && !(previewIframe.find('#wpr-info-box').length > 0)) {
// Append the new div
let infoBox = `
<div id="wpr-info-box">
Looking for Booking Solution? Check out the <a href="https://www.youtube.com/watch?v=asdMBXpd2Nw">Video Tutorial</a>.
</div>
`;
previewIframe.find('.wpr-tplib-search').before(infoBox);
}
// If no keyword is found and the div exists, remove it
else if ( (!keywordFound || val === '') && previewIframe.find('#wpr-info-box').length > 0 ) {
previewIframe.find('#wpr-info-box').remove();
}
if ( 'pages' === tab ) {
// Modify search to respect price filter
if ('free' === price) {
previewIframe.find('.wpr-tplib-pro-wrap').hide();
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)[data-title*="'+ val +'"]').show();
} else if ('pro' === price) {
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)').hide();
previewIframe.find('.wpr-tplib-pro-wrap[data-title*="'+ val +'"]').show();
} else {
WprLibraryTmpls.templateGridSearch(previewIframe, val);
}
WprLibraryTmpls.renderPopupGrid( previewIframe );
elementorCommon.ajax.addRequest( 'wpr_templates_library_search_data', {
data: {
search_query: val,
},
success: function() {
// console.log(val);
}
});
} else if ( 'blocks' === tab ) {
if ( '' !== val ) {
previewIframe.find('.wpr-tplib-template-wrap').hide();
previewIframe.find('.wpr-tplib-template-wrap[data-title*="'+ val +'"]').show();
} else {
previewIframe.find('.wpr-tplib-template-wrap').show();
}
WprLibraryTmpls.renderPopupGrid( previewIframe );
elementorCommon.ajax.addRequest( 'wpr_templates_library_blocks_search_data', {
data: {
search_query: val,
},
success: function() {
// console.log(val);
}
});
} else if ( 'sections' === tab ) {
if ( '' !== val ) {
previewIframe.find('.wpr-tplib-template-wrap').hide();
previewIframe.find('.wpr-tplib-template-wrap[data-title*="'+ val +'"]').show();
} else {
previewIframe.find('.wpr-tplib-template-wrap').show();
}
WprLibraryTmpls.renderPopupGrid( previewIframe );
elementorCommon.ajax.addRequest( 'wpr_templates_library_sections_search_data', {
data: {
search_query: val,
},
success: function() {
// console.log(val);
}
});
}
}, 1000);
});
// Import Template
WprLibraryTmpls.templateGridImport(previewIframe);
$(document).trigger('wpr-filter-popup-content');
function showHideLibraryFilters( selector ) {
previewIframe.find('.wpr-tplib-'+ selector).on('click', function(){
if ( '0' == previewIframe.find('.wpr-tplib-'+ selector +'-list').css('opacity') ) {
previewIframe.find('.wpr-tplib-'+ selector +'-list').css({
'opacity' : '1',
'visibility' : 'visible'
});
} else {
previewIframe.find('.wpr-tplib-'+ selector +'-list').css({
'opacity' : '0',
'visibility' : 'hidden'
});
}
});
previewIframe.on('click', function(){
if ( '1' == previewIframe.find('.wpr-tplib-'+ selector +'-list').css('opacity') ) {
previewIframe.find('.wpr-tplib-'+ selector +'-list').css({
'opacity' : '0',
'visibility' : 'hidden'
});
}
});
}
showHideLibraryFilters('filters');
showHideLibraryFilters('price');
WprLibraryTmpls.renderPopupGrid( previewIframe );
}); // end always
setTimeout(function(){
WprLibraryTmpls.renderTemplatesGridContent(previewIframe, tab);
}, 2000);
},
renderTemplatesGridContent: function(previewIframe, tab, page = 1,) {
var data = {
action: 'render_library_templates_pages_grid_items',
page: page
};
let isPagesActive = previewIframe.find('.wpr-tplib-header ul li[data-tab="pages"]').hasClass('wpr-tplib-active-tab');
$.post(ajaxurl, data, function(response) {
if ( !isPagesActive ) return;
previewIframe.find('.wpr-tplib-template-gird-inner').append(response);
var loading = ('' === response) ? false : true;
if (loading) {
var searchVal = previewIframe.find('.wpr-tplib-sidebar input').val().toLowerCase();
WprLibraryTmpls.templateGridSearch(previewIframe, searchVal);
WprLibraryTmpls.renderPopupGrid(previewIframe);
WprLibraryTmpls.templateGridPreview(previewIframe);
WprLibraryTmpls.templateGridImport(previewIframe);
// Proceed to the next iteration
setTimeout(function() {
WprLibraryTmpls.renderTemplatesGridContent(previewIframe, tab, page + 1);
}, 1000);
} else {
previewIframe.find('.wpr-tplib-template-gird-loading').fadeOut();
}
});
// Optimize lazy loading with IntersectionObserver
var lazyImages = previewIframe.find('.wpr-tplib-template-gird img.lazy');
if ("IntersectionObserver" in window) {
var lazyImageObserver = new IntersectionObserver(function(entries, observer) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
var lazyImage = $(entry.target);
lazyImage.attr('src', lazyImage.data('src'));
lazyImage.removeClass('lazy');
lazyImageObserver.unobserve(entry.target);
$(window).trigger('resize');
}
});
}, {
rootMargin: '0px 0px 100px 0px', // Adjust the root margin to load images slightly later as they enter the viewport
threshold: 0.1 // This sets the threshold for the IntersectionObserver. A value of 0.1 means the observer will trigger when 10% of the target element is visible in the viewport.
});
lazyImages.each(function() {
lazyImageObserver.observe(this);
});
} else {
// Fallback for browsers that do not support IntersectionObserver
var lazyLoadThrottleTimeout;
function lazyLoad() {
if (lazyLoadThrottleTimeout) {
clearTimeout(lazyLoadThrottleTimeout);
}
lazyLoadThrottleTimeout = setTimeout(function() {
var scrollTop = $(window).scrollTop();
lazyImages.each(function() {
var img = $(this);
if (img.offset().top < (window.innerHeight + scrollTop)) {
img.attr('src', img.data('src'));
img.removeClass('lazy');
$(window).trigger('resize');
}
});
if (lazyImages.length == 0) {
$(document).off("scroll", lazyLoad);
$(window).off("resize", lazyLoad);
$(window).off("orientationChange", lazyLoad);
}
}, 20);
}
$(document).on("scroll", lazyLoad);
$(window).on("resize", lazyLoad);
$(window).on("orientationChange", lazyLoad);
}
},
templateGridSearch: function( previewIframe, value ) {
var price = previewIframe.find('.wpr-tplib-price').attr('data-filter');
if ( '' !== value ) {
previewIframe.find('.wpr-tplib-template-wrap').hide();
if ('free' === price) {
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)[data-title*="'+ value +'"]').show();
} else if ('pro' === price) {
previewIframe.find('.wpr-tplib-pro-wrap[data-title*="'+ value +'"]').show();
} else {
previewIframe.find('.wpr-tplib-template-wrap[data-title*="'+ value +'"]').show();
}
} else {
if ('free' === price) {
previewIframe.find('.wpr-tplib-pro-wrap').hide();
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)').show();
} else if ('pro' === price) {
previewIframe.find('.wpr-tplib-template-wrap:not(.wpr-tplib-pro-wrap)').hide();
previewIframe.find('.wpr-tplib-pro-wrap').show();
} else {
previewIframe.find('.wpr-tplib-template-wrap').show();
}
}
},
templateGridPreview: function( previewIframe ) {
previewIframe.find( '.wpr-tplib-template-media' ).on( 'click', function() {
let activeTab = previewIframe.find('.wpr-tplib-active-tab').attr('data-tab');
var module = $(this).parent().data('filter'),
template = $(this).parent().data('slug'),
kitID = $(this).parent().data('kit'),
previewUrl = 'sections' !== activeTab ? 'https://royal-elementor-addons.com/premade-styles/'+ $(this).parent().data('preview-url') : $(this).parent().find('img').attr('src'),
previewType = $(this).parent().data('preview-type'),
proRefferal = '';
if ( $(this).closest('.wpr-tplib-pro-wrap').length ) {
proRefferal = '-pro';
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').addClass('wpr-tplib-insert-pro');
}
if ( $(this).closest('.wpr-tplib-woo-wrap').length ) {
proRefferal = '-pro';
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').addClass('wpr-tplib-insert-woo');
}
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').attr('data-filter', module).attr('data-slug', template).attr('data-kit', kitID);
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').html($(this).parent().find('.wpr-tplib-insert-template').html());
previewIframe.find('.wpr-tplib-close i').css('border-left', '1px solid #e8e8e8');
// Hide Extra
previewIframe.find('.wpr-tplib-logo').hide();
previewIframe.find('.wpr-tplib-header ul li').hide();
previewIframe.find('.wpr-tplib-back').show();
previewIframe.find('.wpr-tplib-header').find('.wpr-tplib-insert-template').show();
// Load Iframe
previewIframe.find('.wpr-tplib-content-wrap').hide();
previewIframe.find('.wpr-tplib-preview-wrap').show();
if ( 'iframe' == previewType ) {
if ( undefined !== kitID ) {
previewUrl = previewUrl.replace('https://', 'https://demosites.').replace('premade-styles', kitID);
}
previewIframe.find('.wpr-tplib-preview-wrap').html( '<div class="wpr-tplib-iframe"><iframe src="'+ previewUrl +'?ref=rea-plugin-library-preview'+ proRefferal +'"></iframe></div>' );
previewIframe.find('.wpr-tplib-popup').css('overflow','hidden');
} else {
previewUrl = previewUrl.replace('premade-styles', 'library/premade-styles');
previewIframe.find('.wpr-tplib-preview-wrap').html( '<div class="wpr-tplib-image"><img src="'+ previewUrl +'"></div>' );
// Enable Scroll for Image Previews
previewIframe.find('.wpr-tplib-popup').css('overflow','scroll');
}
});
},
templateGridImport: function( previewIframe ) {
previewIframe.find( '.wpr-tplib-insert-template' ).off('click');
previewIframe.find( '.wpr-tplib-insert-template' ).on( 'click', function() {
var module = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-filter' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-filter' ),
template = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-slug' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-slug' ),
kitID = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-kit' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-kit' ),
sectionSlug = ( $(this).parent().hasClass('wpr-tplib-header') ) ? $(this).attr( 'data-filter' ) : $(this).closest( '.wpr-tplib-template' ).attr( 'data-filter' ),
activeTab = previewIframe.find('.wpr-tplib-active-tab').attr('data-tab');
// Is Woo Template and Woo is not Active
if ( $(this).closest('.wpr-tplib-template-wrap').hasClass('wpr-tplib-woo-wrap') || $(this).hasClass('wpr-tplib-insert-woo') ) {
alert('In order to import this Template, Please activate WooCommerce plugin.');
return;
}
// Popup Templates
if ( 'wpr-popups' === window.elementor.config.document.type && 'popups' === activeTab ) {
module = 'popups/'+ module;
}
// Purchase Page
if ( $(this).hasClass('wpr-tplib-insert-pro') ) {
var href = window.location.href,
adminUrl = href.substring(0, href.indexOf('/wp-admin')+9);
// window.open(adminUrl +'/admin.php?page=wpr-addons-pricing', '_blank');
window.open('https://royal-elementor-addons.com/?ref=rea-plugin-library-'+ module +'-upgrade-pro#purchasepro', '_blank');
return;
}
previewIframe.find('.wpr-tplib-content-wrap').show();
previewIframe.find('.wpr-tplib-preview-wrap').hide();
WprLibraryTmpls.renderPopupLoader( previewIframe );
// Template Slug
template = template.includes('-zzz') ? template.replace('-zzz', '') : template;
template = 'pages' === activeTab ? template : module +'/'+ template;
sectionSlug = 'sections' === activeTab ? sectionSlug : '';
// AJAX Data
var data = {
action: 'wpr_import_library_template',
nonce: WprLibFrontLoc.nonce,
slug: template,
kit: kitID,
section: sectionSlug
};
// Update via AJAX
$.post(ajaxurl, data, function(response) {
if ( 0 == response ) {
location.reload();
return;
}
var importFile = response.substring( 0, response.length-1 ),
importFile = JSON.parse( importFile );
console.log(importFile);
importFile.content[0].id += WprLibraryTmpls.contentID;
// Insert Template
window.elementor.getPreviewView().addChildModel( importFile.content, { at: WprLibraryTmpls.sectionIndex } );
// Import Page Settings
if ( 'undefined' !== typeof importFile.page_settings && undefined !== kitID ) {
elementor.settings.page.model.set( importFile.page_settings );
}
// Popups
if ( 'wpr-popups' === window.elementor.config.document.type && 'popups' === activeTab ) {
var defaults = {
popup_trigger: 'load',
popup_show_again_delay: '0',
popup_load_delay: '1',
popup_display_as: 'modal',
popup_width: {
unit: 'px',
size: '650'
},
popup_height: 'auto',
popup_align_hr: 'center',
popup_align_vr: 'center',
popup_content_align: 'flex-start',
popup_animation: 'fadeIn',
popup_animation_duration: '1',
popup_overlay_display: 'yes',
popup_close_button_display: 'yes',
popup_container_bg_background: 'classic',
popup_container_bg_position: 'center center',
popup_container_bg_repeat: 'no-repeat',
popup_container_bg_size: 'cover',
popup_overlay_bg_background: 'classic',
popup_container_padding: {
isLinked: true,
unit: 'px',
top: 20,
right: 20,
bottom: 20,
left: 20,
},
popup_container_radius: {
isLinked: true,
unit: 'px',
top: 0,
right: 0,
bottom: 0,
left: 0,
}
};
// Reset Defaults
elementor.settings.page.model.set(defaults);
// Import Page Settings
elementor.settings.page.model.set( importFile.page_settings );
}
// Fix Update Button
window.elementor.panel.$el.find('#elementor-panel-footer-saver-publish button').removeClass('elementor-disabled');
window.elementor.panel.$el.find('#elementor-panel-footer-saver-options button').removeClass('elementor-disabled');
// Reset Section Index
WprLibraryTmpls.sectionIndex = null;
// Close Library
$e.run( 'panel/open' );
$('#wpr-template-settings-notification').show();
previewIframe.find('html').css('overflow','auto');
previewIframe.find( '.wpr-tplib-popup-overlay' ).fadeOut( 'fast', function() {
previewIframe.find('.wpr-tplib-popup-overlay').remove();
previewIframe.find('#wpr-library-btn').removeAttr('data-filter');
});
}).success(function() {
let block = 'blocks' === activeTab ? template : '',
section = 'sections' === activeTab ? template : '';
console.log(section);
// Run Import Finished
elementorCommon.ajax.addRequest( 'wpr_library_template_import_finished', {
data: {
template: template,
kit: kitID,
block: block,
section: section//tzz
},
success: function() {
// console.log(block);
}
});
});
});
},
renderPopupLoader: function( previewIframe ) {
previewIframe.find( '.wpr-tplib-content-wrap' ).prepend('<div class="wpr-tplib-loader"><div class="elementor-loader-wrapper"><div class="elementor-loader"><div class="elementor-loader-boxes"><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div><div class="elementor-loader-box"></div></div></div><div class="elementor-loading-title">Loading</div></div></div>');
},
renderPopupGrid: function( previewIframe ) {
let activeTab = previewIframe.find('.wpr-tplib-active-tab').attr('data-tab'),
gColumns = 'sections' === activeTab ? 4 : 5;
// Run Macy
var macy = Macy({
container: previewIframe.find('.wpr-tplib-template-gird-inner')[0],
waitForImages: true,
margin: 30,
columns: gColumns,
breakAt: {
1450: 4,
940: 3,
520: 2,
400: 1
}
});
setTimeout(function(){
macy.recalculate(true);
}, 300 );
setTimeout(function(){
macy.recalculate(true);
}, 600 );
// Debounce function to limit the rate of recalculation
function debounce(func, wait) {
let timeout;
return function(...args) {
const context = this;
clearTimeout(timeout);
timeout = setTimeout(() => func.apply(context, args), wait);
};
}
const debouncedRecalculate = debounce(() => {
macy.recalculate(true);
}, 300);
// Use debounced function on resize
$(window).on('resize', debouncedRecalculate);
}
};
$( window ).on( 'elementor:init', WprLibraryTmpls.init );
}( jQuery ) );
@@ -0,0 +1,409 @@
jQuery(document).ready(function( $ ) {
"use strict";
var WprMegaMenuSettings = {
getLiveSettings: WprMegaMenuSettingsData.settingsData,
init: function() {
WprMegaMenuSettings.initSettingsButtons();
},
initSettingsButtons: function() {
$( '#menu-to-edit .menu-item' ).each( function() {
var $this = $(this),
id = WprMegaMenuSettings.getNavItemId($this),
depth = WprMegaMenuSettings.getNavItemDepth($this);
// Settings Button
$this.append('<div class="wpr-mm-settings-btn" data-id="'+ id +'" data-depth="'+ depth +'"><span>R</span>Mega Menu</div>');
});
// Open Popup
$('.wpr-mm-settings-btn').on( 'click', WprMegaMenuSettings.openSettingsPopup );
},
openSettingsPopup: function() {
// Set Settings
WprMegaMenuSettings.setSettings( $(this) );
// Show Popup
$('.wpr-mm-settings-popup-wrap').fadeIn();
// Close Temmplate Editor Popup
WprMegaMenuSettings.closeTemplateEditorPopup();
// Menu Width
WprMegaMenuSettings.initMenuWidthToggle();
// Mobile Content
WprMegaMenuSettings.initMobileContentToggle();
// Color Pickers
WprMegaMenuSettings.initColorPickers();
// Icon Picker
WprMegaMenuSettings.initIconPicker();
// Close Settings Popup
WprMegaMenuSettings.closeSettingsPopup();
// Save Settings
WprMegaMenuSettings.saveSettings( $(this) );
// Edit Menu Button
WprMegaMenuSettings.initEditMenuButton( $(this) );
// Set Tite
$('.wpr-mm-popup-title').find('span').text( $(this).closest('li').find('.menu-item-title').text() );
},
closeSettingsPopup: function() {
$('.wpr-mm-settings-close-popup-btn').on('click', function() {
$('.wpr-mm-settings-popup-wrap').fadeOut();
});
$('.wpr-mm-settings-popup-wrap').on('click', function(e) {
if(e.target !== e.currentTarget) return;
$(this).fadeOut();
});
// Unbind Click
$('.wpr-save-mega-menu-btn').off('click');
$('.wpr-edit-mega-menu-btn').off('click');
},
initEditMenuButton: function( selector ) {
$('.wpr-edit-mega-menu-btn').on('click', function() {
var id = selector.attr('data-id'),
depth = selector.attr('data-depth');
WprMegaMenuSettings.createOrEditMenuTemplate(id, depth);
});
},
createOrEditMenuTemplate: function(id, depth) {
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_create_mega_menu_template',
nonce: WprMegaMenuSettingsData.nonce,
item_id: id,
item_depth: depth
},
success: function( response ) {
console.log(response.data['edit_link']);
WprMegaMenuSettings.openTemplateEditorPopup(response.data['edit_link']);
}
});
},
openTemplateEditorPopup: function( editorLink ) {
$('.wpr-mm-editor-popup-wrap').fadeIn();
if ( !$('.wpr-mm-editor-popup-iframe').find('iframe').length ) {
$('.wpr-mm-editor-popup-iframe').append('<iframe src="'+ editorLink +'" width="100%" height="100%"></iframe>');
}
// $('body').css('overflow','hidden');
},
closeTemplateEditorPopup: function() {
$('.wpr-mm-editor-close-popup-btn').on('click', function() {
$('.wpr-mm-editor-popup-wrap').fadeOut();
setTimeout(function() {
$('.wpr-mm-editor-popup-iframe').find('iframe').remove();
// $('body').css('overflow','visible');
}, 1000);
});
},
initColorPickers: function() {
$('.wpr-mm-setting-color').find('input').wpColorPicker();
// Fix Color Picker
if ( $('.wpr-mm-setting-color').length ) {
$('.wpr-mm-setting-color').find('.wp-color-result-text').text('Select Color');
$('.wpr-mm-setting-color').find('.wp-picker-clear').val('Clear');
}
},
initIconPicker: function() {
$('#wpr_mm_icon_picker').iconpicker();
// Bind iconpicker events to the element
$('#wpr_mm_icon_picker').on('iconpickerSelected', function(event) {
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:last-child').addClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
$('.wpr-mm-setting-icon div span:last-child i').addClass(event.iconpickerValue);
});
// Bind iconpicker events to the element
$('#wpr_mm_icon_picker').on('iconpickerHide', function(event) {
setTimeout(function() {
if ( 'wpr-mm-active-icon' == $('.wpr-mm-setting-icon div span:first-child').attr('class') ) {
$('#wpr_mm_icon_picker').val('')
}
$('.wpr-mm-settings-wrap').removeAttr('style');
},100);
});
$('.wpr-mm-setting-icon div span:first-child').on('click', function() {
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
$(this).addClass('wpr-mm-active-icon');
});
$('.wpr-mm-setting-icon div span:last-child').on('click', function() {
$('#wpr_mm_icon_picker').focus();
$('.wpr-mm-settings-wrap').css('overflow', 'hidden');
});
},
saveSettings: function( selector ) {
var $saveButton = $('.wpr-save-mega-menu-btn');
// Reset
$saveButton.text('Save');
$saveButton.on('click', function() {
var id = selector.attr('data-id'),
depth = selector.attr('data-depth'),
settings = WprMegaMenuSettings.getSettings();
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_save_mega_menu_settings',
nonce: WprMegaMenuSettingsData.nonce,
item_id: id,
item_depth: depth,
item_settings: settings
},
success: function( response ) {
$saveButton.text('Saved');
$saveButton.append('<span class="dashicons dashicons-yes"></span>');
setTimeout(function() {
$saveButton.find('.dashicons').remove();
$saveButton.text('Save');
$saveButton.blur();
}, 1000);
// Update Settings
WprMegaMenuSettings.getLiveSettings[id] = settings;
}
});
});
},
getSettings: function() {
var settings = {};
$('.wpr-mm-setting').each(function() {
var $this = $(this),
checkbox = $this.find('input[type="checkbox"]'),
select = $this.find('select'),
number = $this.find('input[type="number"]'),
text = $this.find('input[type="text"]');
// Checkbox
if ( checkbox.length ) {
let id = checkbox.attr('id');
settings[id] = checkbox.prop('checked') ? 'true' : 'false';
}
// Select
if ( select.length ) {
let id = select.attr('id');
settings[id] = select.val();
}
// Multi Value
// if ( $this.hasClass('wpr-mm-setting-radius') ) {
// let multiValue = [],
// id = $this.find('input').attr('id');
// $this.find('input').each(function() {
// multiValue.push($(this).val());
// });
// settings[id] = multiValue;
// }
// Number
if ( number.length ) {
let id = number.attr('id');
settings[id] = number.val();
}
// Text
if ( text.length ) {
let id = text.attr('id');
if ( 'wpr_mm_icon_picker' !== id ) {
settings[id] = text.val();
} else {
let icon_class = $('.wpr-mm-setting-icon div span.wpr-mm-active-icon').find('i').attr('class');
settings[id] = 'fas fa-ban' !== icon_class ? icon_class : '';
}
}
});
return settings;
},
getNavItemId: function( item ) {
var id = item.attr( 'id' );
return id.replace( 'menu-item-', '' );
},
getNavItemDepth: function( item ) {
var depthClass = item.attr( 'class' ).match( /menu-item-depth-\d/ );
if ( ! depthClass[0] ) {
return 0;
} else {
return depthClass[0].replace( 'menu-item-depth-', '' );
}
},
initMenuWidthToggle: function() {
var select = $('#wpr_mm_width'),
option = $('#wpr_mm_custom_width').closest('.wpr-mm-setting');
if ( 'custom' === select.val() ) {
option.show();
} else {
option.hide();
}
select.on('change', function() {
if ( 'custom' === select.val() ) {
option.show();
} else {
option.hide();
}
});
},
initMobileContentToggle: function() {
var select = $('#wpr_mm_mobile_content'),
option = $('#wpr_mm_render').closest('.wpr-mm-setting');
if ( 'mega' === select.val() ) {
option.show();
} else {
option.hide();
}
select.on('change', function() {
if ( 'mega' === select.val() ) {
option.show();
} else {
option.hide();
}
});
},
setSettings: function( selector ) {
var id = selector.attr('data-id'),
settings = WprMegaMenuSettings.getLiveSettings[id];
if ( ! $.isEmptyObject(settings) ) {
// General
if ( 'true' == settings['wpr_mm_enable'] ) {
$('#wpr_mm_enable').prop( 'checked', true );
} else {
$('#wpr_mm_enable').prop( 'checked', false );
}
$('#wpr_mm_position').val(settings['wpr_mm_position']).trigger('change');
$('#wpr_mm_width').val(settings['wpr_mm_width']).trigger('change');
$('#wpr_mm_custom_width').val(settings['wpr_mm_custom_width']);
$('#wpr_mm_render').val(settings['wpr_mm_render']).trigger('change');
$('#wpr_mm_mobile_content').val(settings['wpr_mm_mobile_content']).trigger('change');
// Icon
if ( '' !== settings['wpr_mm_icon_picker'] ) {
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:last-child').addClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
$('.wpr-mm-setting-icon div span:last-child i').addClass(settings['wpr_mm_icon_picker']);
} else {
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:first-child').addClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
$('.wpr-mm-setting-icon div span:last-child i').addClass('fas fa-angle-down');
}
$('#wpr_mm_icon_color').val(settings['wpr_mm_icon_color']).trigger('keyup');
$('#wpr_mm_icon_size').val(settings['wpr_mm_icon_size']);
// Badge
$('#wpr_mm_badge_text').val(settings['wpr_mm_badge_text']);
$('#wpr_mm_badge_color').val(settings['wpr_mm_badge_color']).trigger('keyup');
$('#wpr_mm_badge_bg_color').val(settings['wpr_mm_badge_bg_color']).trigger('keyup');
if ( 'true' == settings['wpr_mm_badge_animation'] ) {
$('#wpr_mm_badge_animation').prop( 'checked', true );
} else {
$('#wpr_mm_badge_animation').prop( 'checked', false );
}
// Default Values
} else {
// General
$('#wpr_mm_enable').prop( 'checked', false );
$('#wpr_mm_position').val('default').trigger('change');
$('#wpr_mm_width').val('default').trigger('change');
$('#wpr_mm_custom_width').val('600');
$('#wpr_mm_render').val('default').trigger('change');
$('#wpr_mm_mobile_content').val('mega').trigger('change');
// Icon
if ( '' !== settings['wpr_mm_icon_picker'] ) {
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:first-child').addClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
$('.wpr-mm-setting-icon div span:last-child i').addClass('fas fa-angle-down');
}
$('#wpr_mm_icon_color').val('').trigger('change');
$('#wpr_mm_icon_size').val('');
// Badge
$('#wpr_mm_badge_text').val('');
$('#wpr_mm_badge_color').val('#ffffff').trigger('keyup');
$('#wpr_mm_badge_bg_color').val('#000000').trigger('keyup');
$('#wpr_mm_badge_animation').prop( 'checked', false );
}
if ( 'false' === $('.wpr-mm-settings-wrap').attr('data-pro-active') ) {
$('#wpr_mm_render').val('default').trigger('change');
$('#wpr_mm_mobile_content').val('mega').trigger('change');
// Icon
if ( '' !== settings['wpr_mm_icon_picker'] ) {
$('.wpr-mm-setting-icon div span').removeClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:first-child').addClass('wpr-mm-active-icon');
$('.wpr-mm-setting-icon div span:last-child i').removeAttr('class');
$('.wpr-mm-setting-icon div span:last-child i').addClass('fas fa-angle-down');
}
$('#wpr_mm_icon_color').val('').trigger('change');
$('#wpr_mm_icon_size').val('');
// Badge
$('#wpr_mm_badge_text').val('');
$('#wpr_mm_badge_color').val('#ffffff').trigger('keyup');
$('#wpr_mm_badge_bg_color').val('#000000').trigger('keyup');
$('#wpr_mm_badge_animation').prop( 'checked', false );
}
}
}
// Init
WprMegaMenuSettings.init();
});
@@ -0,0 +1,53 @@
jQuery(document).ready(function ($) {
// Uploading files
var file_frame;
jQuery.fn.upload_secondary_image = function (button) {
var button_id = button.attr('id');
var field_id = button_id.replace('_button', '');
// If the media frame already exists, reopen it.
if (file_frame) {
file_frame.open();
return;
}
// Create the media frame.
file_frame = wp.media.frames.file_frame = wp.media({
title: jQuery(this).data('uploader_title'),
button: {
text: jQuery(this).data('uploader_button_text'),
},
multiple: false
});
// When an image is selected, run a callback.
file_frame.on('select', function () {
var attachment = file_frame.state().get('selection').first().toJSON();
jQuery("#" + field_id).val(attachment.id);
jQuery("#wpr-secondary-image img").attr('src', attachment.url);
jQuery('#wpr-secondary-image img').show();
jQuery('#' + button_id).attr('id', 'remove_secondary_image_button');
jQuery('#remove_secondary_image_button').text('Remove secondary image');
});
// Finally, open the modal
file_frame.open();
};
jQuery('#wpr-secondary-image').on('click', '#upload_secondary_image_button', function (event) {
event.preventDefault();
jQuery.fn.upload_secondary_image(jQuery(this));
});
jQuery('#wpr-secondary-image').on('click', '#remove_secondary_image_button', function (event) {
event.preventDefault();
jQuery('#upload_secondary_image').val('');
jQuery('#wpr-secondary-image img').attr('src', '');
jQuery('#wpr-secondary-image img').hide();
jQuery(this).attr('id', 'upload_secondary_image_button');
jQuery('#upload_secondary_image_button').text('Set secondary image');
});
});
@@ -0,0 +1,961 @@
jQuery(document).ready(function( $ ) {
"use strict";
// Condition Selects
var globalS = '.global-condition-select',
archiveS = '.archives-condition-select',
singleS = '.singles-condition-select',
inputIDs = '.wpr-condition-input-ids';
// Condition Popup
var conditionPupup = $( '.wpr-condition-popup-wrap' );
// Current Tab
var currentTab = $('.nav-tab-active').attr( 'data-title' );
if ( currentTab ) {
currentTab = currentTab.trim().toLowerCase(),
currentTab = currentTab.replace(' ', '_');
}
/*
** Get Active Filter -------------------------
*/
function getActiveFilter() {
var type = currentTab.replace( /\W+/g, '-' ).toLowerCase();
if ( $('.template-filters').length > 0 ) {
type = $('.template-filters .active-filter').last().attr('data-class');
type = type.substring( 0, type.length - 1);
}
return type;
}
/*
** Render User Template -------------------------
*/
function renderUserTemplate( type, title, slug, id ) {
var html = '';
html += '<li>';
html += '<h3 class="wpr-title">'+ title +'</h3>';
html += '<div class="wpr-action-buttons">';
html += '<span class="wpr-template-conditions button-primary" data-slug="'+ slug +'">Manage Conditions</span>';
html += '<a href="post.php?post='+ id +'&action=elementor" class="wpr-edit-template button-primary">Edit Template</a>';
html += '<span class="wpr-delete-template button-primary" data-slug="'+ slug +'" data-warning="Are you sure you want to delete this template?"><span class="dashicons dashicons-no-alt"></span></span>';
html += '</div>';
html += '</li>';
// Render
$( '.wpr-my-templates-list.wpr-'+ getActiveFilter() +'-templates-list' ).prepend( html );
if ( $('.wpr-empty-templates-message').length ) {
$('.wpr-empty-templates-message').remove();
}
// Run Functions
changeTemplateConditions();
deleteTemplate();
}
/*
** Create User Template -------------------------
*/
function createUserTemplate() {
// Get Template Library
var library = 'my_templates' === getActiveFilter() ? 'elementor_library' : 'wpr_templates';
// Get Template Title
var title = $('.wpr-user-template-title').val();
// Get Template Slug
var slug = 'user-'+ getActiveFilter() +'-'+ title.replace( /\W+/g, '-' ).toLowerCase();
if ( 'elementor_library' === library ) {
slug = getActiveFilter() +'-'+ title.replace( /\W+/g, '-' ).toLowerCase();
}
// AJAX Data
var data = {
action: 'wpr_create_template',
nonce: WprPluginOptions.nonce,
user_template_library: library,
user_template_title: title,
user_template_slug: slug,
user_template_type: getActiveFilter(),
};
// Create Template
$.post(ajaxurl, data, function(response) {
// Close Popup
$('.wpr-user-template-popup-wrap').fadeOut();
// Open Conditions
setTimeout(function() {
// Get Template ID
var id = response.substring( 0, response.length - 1 );
// Redirect User to Editor
if ( 'my_templates' === currentTab.replace( /\W+/g, '-' ).toLowerCase() ) {
window.location.href = 'post.php?post='+ id +'&action=elementor';
return;
}
// Set Template Slug & ID
$( '.wpr-save-conditions' ).attr( 'data-slug', slug ).attr( 'data-id', id );
// Render Template
renderUserTemplate( getActiveFilter(), $('.wpr-user-template-title').val(), slug, id );
if ( $('.wpr-no-templates').length ) {
$('.wpr-no-templates').hide();
}
// Open Popup
openConditionsPopup( slug );
conditionPupup.addClass( 'editor-redirect' );
}, 500);
});
}
// Open Popup
$('.wpr-user-template').on( 'click', function() {
if ( $(this).find('div').length ) {
alert('Please Install/Activate WooCommerce!');
return;
}
$('.wpr-user-template-title').val('');
$('.wpr-user-template-popup-wrap').fadeIn();
});
// Close Popup
$('.wpr-user-template-popup').find('.close-popup').on( 'click', function() {
$('.wpr-user-template-popup-wrap').fadeOut();
});
// Create - Click
$('.wpr-create-template').on( 'click', function() {
if ( '' === $('.wpr-user-template-title').val() ) {
$('.wpr-user-template-title').css('border-color', 'red');
if ( $('.wpr-fill-out-the-title').length < 1 ) {
$('.wpr-create-template').before('<p class="wpr-fill-out-the-title"><em>Please fill the Title field.</em></p>');
$('.wpr-fill-out-the-title').css('margin-top', '4px');
$('.wpr-fill-out-the-title em').css({'color': '#7f8b96', 'font-size': 'smaller'});
}
} else {
$('.wpr-user-template-title').removeAttr('style');
$('.wpr-create-template + p').remove();
// Create Template
createUserTemplate();
}
});
// Create - Enter Key
$('.wpr-user-template-title').keypress(function(e) {
if ( e.which == 13 ) {
e.preventDefault();
createUserTemplate();
}
});
/*
** Reset Template -------------------------
*/
function deleteTemplate() {
$( '.wpr-delete-template' ).on( 'click', function() {
// Buttons
var deleteButton = $(this);
if ( ! confirm(deleteButton.data('warning')) ) {
return;
}
// Get Template Library
var library = 'my_templates' === getActiveFilter() ? 'elementor_library' : 'wpr_templates';
// Get Template Slug
var slug = deleteButton.attr('data-slug');
var oneTimeNonce = deleteButton.attr('data-nonce');
// AJAX Data
var data = {
nonce: oneTimeNonce,
action: 'wpr_delete_template',
template_slug: slug,
template_library: library,
};
// Remove Template via AJAX
$.post(ajaxurl, data, function(response) {
deleteButton.closest('li').remove();
});
// Save Conditions
$.post(ajaxurl, data, function(response) {
setTimeout(function(){
if ( $('.wpr-my-templates-list li').length === 0 ) {
$('.wpr-my-templates-list').append('<li class="wpr-no-templates">You don\'t have any templates yet!</li>');
// $('.wpr-no-templates').hide();
}
}, 500);
});
// Delete associated Conditions
if ( 'my_templates' !== getActiveFilter() ) {
var conditions = JSON.parse($( '#wpr_'+ currentTab +'_conditions' ).val());
delete conditions[slug];
// Set Conditions
$('#wpr_'+ currentTab +'_conditions').val( JSON.stringify(conditions) );
// AJAX Data
var data = {
action: 'wpr_save_template_conditions',
nonce: WprPluginOptions.nonce,
};
data['wpr_'+ currentTab +'_conditions'] = JSON.stringify(conditions);
}
});
}
deleteTemplate();
/*
** Condition Popup -------------------------
*/
// Open Popup
function changeTemplateConditions() {
$( '.wpr-template-conditions' ).on( 'click', function() {
var template = $(this).attr('data-slug');
// Set Template Slug
$( '.wpr-save-conditions' ).attr( 'data-slug', template );
// Open Popup
openConditionsPopup( template );
});
}
changeTemplateConditions();
// Close Popup
conditionPupup.find('.close-popup').on( 'click', function() {
conditionPupup.fadeOut();
});
/*
** Popup: Clone Conditions -------------------------
*/
function popupCloneConditions() {
// Clone
$('.wpr-conditions-wrap').append( '<div class="wpr-conditions">'+ $('.wpr-conditions-sample').html() +'</div>' );
// Add Tab Class
// why removing and adding again ?
$('.wpr-conditions').removeClass( 'wpr-tab-'+ currentTab ).addClass( 'wpr-tab-'+ currentTab );
var clone = $('.wpr-conditions').last();
// Reset Extra
clone.find('select').not(':first-child').hide();
// Entrance Animation
clone.hide().fadeIn();
// Hide Extra Options
var currentFilter = $('.template-filters .active-filter').attr('data-class');
if (clone.hasClass('wpr-tab-product_single')) {
setTimeout(function() {
clone.find('.wpr-condition-input-ids').each(function() {
if ( !($(this).val()) ) {
$(this).val('all').show();
}
});
}, 600);
}
if ( 'blog-posts' === currentFilter || 'custom-posts' === currentFilter ) {
clone.find('.singles-condition-select').children(':nth-child(1),:nth-child(2),:nth-child(3)').remove();
clone.find('.wpr-condition-input-ids').val('all').show();
} else if ( 'woocommerce-products' === currentFilter ) {
clone.find('.singles-condition-select').children().filter(function() {
return 'product' !== $(this).val()
}).remove();
clone.find('.wpr-condition-input-ids').val('all').show();
} else if ( '404-pages' === currentFilter ) {
clone.find('.singles-condition-select').children().filter(function() {
return 'page_404' !== $(this).val()
}).remove();
} else if ( 'blog-archives' === currentFilter || 'custom-archives' === currentFilter ) {
clone.find('.archives-condition-select').children().filter(function() {
return 'products' == $(this).val() || 'product_cat' == $(this).val() || 'product_tag' == $(this).val();
}).remove();
} else if ( 'woocommerce-archives' === currentFilter ) {
clone.find('.archives-condition-select').children().filter(function() {
return 'products' !== $(this).val() && 'product_cat' !== $(this).val() && 'product_tag' !== $(this).val();
}).remove();
}
}
/*
** Popup: Add Conditions -------------------------
*/
function popupAddConditions() {
$( '.wpr-add-conditions' ).on( 'click', function() {
// Clone
popupCloneConditions();
// Reset
$('.wpr-conditions').last().find('input').hide();//tmp -maybe remove
// Show on Canvas
if ( 'header' === currentTab || 'footer' === currentTab ) {
$('.wpr-canvas-condition').show();
}
// Run Functions
popupDeleteConditions();
popupMainConditionSelect();
popupSubConditionSelect();
});
}
popupAddConditions();
/*
** Popup: Set Conditions -------------------------
*/
function popupSetConditions( template ) {
var conditions = $( '#wpr_'+ currentTab +'_conditions' ).val();
conditions = '' !== conditions ? JSON.parse(conditions) : {};
// Reset
$('.wpr-conditions').remove();
// Setup Conditions
if ( conditions[template] != undefined && conditions[template].length > 0 ) {
// Clone
for (var i = 0; i < conditions[template].length; i++) {
popupCloneConditions();
$( '.wpr-conditions' ).find('select').hide();
}
// Set
if ( $('.wpr-conditions').length ) {
$('.wpr-conditions').each( function( index ) {
var path = conditions[template][index].split( '/' );
for (var s = 0; s < path.length; s++) {
if ( s === 0 ) {
$(this).find(globalS).val(path[s]).trigger('change');
$(this).find('.'+ path[s] +'s-condition-select').show();
} else if ( s === 1 ) {
path[s-1] = 'product_archive' === path[s-1] ? 'archive' : path[s-1];
$(this).find('.'+ path[s-1] +'s-condition-select').val(path[s]).trigger('change');
} else if ( s === 2 ) {
$(this).find(inputIDs).val(path[s]).trigger('keyup').show();
if ( typeof path[s + 1] !== 'undefined' ) {
$(this).find(inputIDs).val(path[s] + '/' + path[s + 1]).trigger('keyup').show();
}
}
}
});
}
}
// Set Show on Canvas Switcher value
var conditionsBtn = $('.wpr-template-conditions[data-slug='+ template +']');
if ( 'true' === conditionsBtn.attr('data-show-on-canvas') ) {
$('.wpr-canvas-condition').find('input[type=checkbox]').attr('checked', 'checked');
} else {
$('.wpr-canvas-condition').find('input[type=checkbox]').removeAttr('checked');
}
}
/*
** Popup: Open -------------------------
*/
function openConditionsPopup( template ) {
// Set Conditions
popupSetConditions(template);
popupMainConditionSelect();
popupSubConditionSelect();
showOnCanvasSwitcher();
popupDeleteConditions();
// Conditions Wrap
var conditionsWrap = $( '.wpr-conditions' );
// Reset Canvas Option
$('.wpr-canvas-condition').hide();
// Show Conditions
if ( 'single' === currentTab || 'product_single' === currentTab ) {
conditionsWrap.find(singleS).show();
} else if ( 'archive' === currentTab || 'product_archive' === currentTab ) {
conditionsWrap.find(archiveS).show();
} else {
conditionsWrap.find(globalS).show();
// Show Canvas Option
if ( $('.wpr-conditions').length ) {
$('.wpr-canvas-condition').show();
}
}
// Add Current Filter Class
$('.wpr-conditions-wrap').addClass( $('.template-filters .active-filter').attr('data-class') );
// Open Popup
conditionPupup.fadeIn();
}
/*
** Popup: Delete Conditions -------------------------------
*/
function popupDeleteConditions() {
$( '.wpr-delete-template-conditions' ).on( 'click', function() {
var current = $(this).parent(),
conditions = $( '#wpr_'+ currentTab +'_conditions' ).val();
conditions = '' !== conditions ? JSON.parse(conditions) : {};
// Update Conditions
$('#wpr_'+ currentTab +'_conditions').val( JSON.stringify( removeConditions( conditions, getConditionsPath(current) ) ) );
// Remove Conditions
current.fadeOut( 500, function() {
$(this).remove();
// Show on Canvas
if ( 0 === $('.wpr-conditions').length ) {
$('.wpr-canvas-condition').hide();
}
});
});
}
/*
** Popup: Condition Selection -------
*/
// General Condition Select
function popupMainConditionSelect() {
$(globalS).on( 'change', function() {
var current = $(this).parent();
// Reset
current.find(archiveS).hide();
current.find(singleS).hide();
current.find(inputIDs).hide();
// Show
current.find( '.'+ $(this).val() +'s-condition-select' ).show();
});
}
// Sub Condition Select
function popupSubConditionSelect() {
$('.archives-condition-select, .singles-condition-select').on( 'change', function() {
var current = $(this).parent(),
selected = $( 'option:selected', this ),
value = $(this).val();
// Show Custom ID input
if ( selected.hasClass('custom-ids') || selected.hasClass('custom-type-ids') ) {
current.find(inputIDs).val('all').trigger('keyup').show();
} else {
current.find(inputIDs).hide();
}
console.log(value);
// Show/Hide Expert Notice
if ( 0 === value.indexOf('pro-') ) {
$('.wpr-expert-notice').show();
} else {
$('.wpr-expert-notice').hide();
}
});
}
// Show on Canvas Switcher
function showOnCanvasSwitcher() {
$('.wpr-canvas-condition input[type=checkbox]').on('change', function() {
$('.wpr-template-conditions[data-slug='+ $('.wpr-save-conditions').attr('data-slug') +']').attr('data-show-on-canvas', $(this).prop('checked'));
});
}
/*
** Remove Conditions --------------------------
*/
function removeConditions( conditions, path ) {
var data = [];
// Get Templates
$('.wpr-template-conditions').each(function() {
data.push($(this).attr('data-slug'))
});
// Loop
for ( var key in conditions ) {
if ( conditions.hasOwnProperty(key) ) {
// Remove Duplicate
for (var i = 0; i < conditions[key].length; i++) {
if ( path == conditions[key][i] ) {
if ( 'popup' !== getActiveFilter() ) {
conditions[key].splice(i, 1);
}
}
};
// Clear Database
if ( data.indexOf(key) === -1 ) {
delete conditions[key];
}
}
}
return conditions;
}
/*
** Get Conditions Path -------------------------
*/
function getConditionsPath( current ) {
var path = '';
// Selects
var global = 'none' !== current.find(globalS).css('display') ? current.find(globalS).val() : currentTab,
archive = current.find(archiveS).val(),
single = current.find(singleS).val(),
customIds = current.find(inputIDs);
if ( 'archive' === global || 'product_archive' === global ) {
if ( 'none' !== customIds.css('display') ) {
path = global +'/'+ archive +'/'+ customIds.val();
} else {
path = global +'/'+ archive;
}
} else if ( 'single' === global || 'product_single' === global ) {
if ( 'none' !== customIds.css('display') ) {
path = global +'/'+ single +'/'+ customIds.val();
} else {
path = global +'/'+ single;
}
} else {
path = 'global';
}
return path;
}
/*
** Get Conditions -------------------------
*/
function getConditions( template, conditions ) {
// Conditions
conditions = ('' === conditions || '[]' === conditions) ? {} : JSON.parse(conditions);
conditions[template] = [];
$('.wpr-conditions').each( function() {
var path = getConditionsPath( $(this) );
// Remove Duplicates
conditions = removeConditions( conditions, path );
// Add New Values
conditions[template].push( path );
});
return conditions;
}
/*
** Save Conditions -------------------------
*/
function saveConditions() {
$( '.wpr-save-conditions' ).on( 'click', function() {
var proActive = (1 === $('.wpr-my-templates-list').data('pro')) ? true : false;
// Current Template
var template = $(this).attr('data-slug'),
TemplateID = $(this).attr('data-id');
// Get Conditions
var conditions = getConditions( template, $( '#wpr_'+ currentTab +'_conditions' ).val() );
// Don't save if not active
if ( !proActive && ('header' === currentTab || 'footer' == currentTab || 'product_archive' == currentTab) ) {
if ( 'header' === currentTab || 'footer' == currentTab ) {
if ( ('global' !== conditions[template][0] && 'undefined' !== typeof conditions[template][0]) || conditions[template].length > 1 ) {
alert('Please select "Entire Site" to continue! Mutiple and custom conditions are fully supported in the Pro version.');
return;
}
} else if ( 'product_archive' == currentTab ) {
console.log(conditions[template][0]);
if ( ('product_archive/products' !== conditions[template][0] && 'undefined' !== typeof conditions[template][0]) || conditions[template].length > 1 ) {
alert('Please select "Entire Site" to continue! Mutiple and custom conditions are fully supported in the Pro version.');
return;
}
}
}
// Set Conditions
$('#wpr_'+ currentTab +'_conditions').val( JSON.stringify(conditions) );
// AJAX Data
var data = {
action: 'wpr_save_template_conditions',
nonce: WprPluginOptions.nonce,
template: template
};
data['wpr_'+ currentTab +'_conditions'] = JSON.stringify(conditions);
if ( $('#wpr-show-on-canvas').length ) {
data['wpr_'+ currentTab +'_show_on_canvas'] = $('#wpr-show-on-canvas').prop('checked');
}
// Save Conditions
$.post(ajaxurl, data, function(response) {
// Close Popup
conditionPupup.fadeOut();
// Set Active Class
for ( var key in conditions ) {
if ( conditions[key] && 0 !== conditions[key].length ) {
$('.wpr-delete-template[data-slug="'+ key +'"]').closest('li').addClass('wpr-active-conditions-template');
} else {
$('.wpr-delete-template[data-slug="'+ key +'"]').closest('li').removeClass('wpr-active-conditions-template');
}
}
// Redirect User to Editor
if ( conditionPupup.hasClass('editor-redirect') ) {
window.location.href = 'post.php?post='+ TemplateID +'&action=elementor';
}
});
});
}
saveConditions();
/*
** Highlight Templates with Active Conditions --------
*/
if ( $('body').hasClass('royal-addons_page_wpr-theme-builder') || $('body').hasClass('royal-addons_page_wpr-popups') ) {
if ( currentTab && 'my_templates' !== currentTab ) {
var conditions = $( '#wpr_'+ currentTab +'_conditions' ).val(),
conditions = ('' === conditions || '[]' === conditions) ? {} : JSON.parse(conditions);
for ( var key in conditions ) {
$('.wpr-delete-template[data-slug="'+ key +'"]').closest('li').addClass('wpr-active-conditions-template');
}
}
}
/*
** Save Options with Ajax -------------------------
*/
$('.wpr-settings-page form').submit(function () {
var settings = $(this).serialize();
$.post( 'options.php', settings ).error(function() {
// alert('error');
}).success(function() {
$('.wpr-settings-saved').stop().fadeIn(500).delay(1000).fadeOut(1000);
});
return false;
});
$('.wpr-element').find('input').on( 'change', function() {
$('.wpr-settings-page form').submit();
});
/*
** Elements Toggle -------------------------
*/
$('.wpr-elements-toggle').find('input').on( 'change', function() {
if ( $(this).is(':checked') ) {
$('.wpr-element').find('input').prop( 'checked', true );
} else {
$('.wpr-element').find('input').prop( 'checked', false );
}
$('.wpr-settings-page form').submit();
});
/*
** Elements Search --------------------------
*/
var searchTimeout = null;
$('.wpr-widgets-search').find('input').keyup(function(e) {
if ( e.which === 13 ) {
return false;
}
var val = $(this).val().toLowerCase();
if (searchTimeout != null) {
clearTimeout(searchTimeout);
}
searchTimeout = setTimeout(function() {
searchTimeout = null;
let visibleElements = 'none';
// Reset
$('.wpr-widgets-not-found').hide();
$('.submit').show();
let keywords = ["appointment", "book"]; // Keywords to look for
// Check if any keyword matches the input
let keywordFound = keywords.some(function(keyword) {
return keyword.includes(val) || val.includes(keyword);
});
// If a keyword is found and the div doesn't already exist
if (keywordFound && !($('body').find('#wpr-info-box').length > 0)) {
// Append the new div
let infoBox = `
<div id="wpr-info-box">
Looking for Booking Solution? Check out the <a href="https://www.youtube.com/watch?v=asdMBXpd2Nw" target="_blank">Video Tutorial</a>.
</div>
`;
$('.wpr-widgets-search').append(infoBox);
}
// If no keyword is found and the div exists, remove it
else if ( (!keywordFound || val === '') && $('body').find('#wpr-info-box').length > 0 ) {
$('body').find('#wpr-info-box').remove();
}
if ( '' !== val ) {
$('.wpr-elements, .wpr-element, .wpr-elements-heading').hide();
$('.wpr-widgets-not-found').hide();
} else {
$('.wpr-elements, .wpr-element, .wpr-elements-heading').show();
$('.wpr-elements-filters li').first().trigger('click');
}
$('.wpr-element').each(function(){
let title = $(this).find('h3').text().toLowerCase();
if ( -1 !== title.indexOf(val) ) {
$(this).show();
$(this).parent().show();
visibleElements = 'visible';
}
});
if ( 'none' === visibleElements ) {
$('.wpr-widgets-not-found').css('display', 'flex');
$('.submit').hide();
}
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_backend_widget_search_query_results',
search_query: val
},
success: function( response ) {}
});
}, 1000);
});
/*
** Elements Filters -----------------------------------
*/
$('.wpr-elements-filters li').on('click', function() {
let filter = $(this).data('filter');
$('.wpr-elements-toggle').hide();
$('.wpr-elements-filters li').removeClass('wpr-active-filter');
$(this).addClass('wpr-active-filter');
if ( 'all' === filter ) {
$('.wpr-elements, .wpr-elements-heading').show();
$('.wpr-elements-toggle').show();
} else if ( 'theme' === filter ) {
$('.wpr-elements, .wpr-elements-heading').hide();
$('.wpr-elements-theme').show();
$('.wpr-elements-theme').prev('.wpr-elements-heading').show();
} else {
$('.wpr-elements, .wpr-elements-heading').hide();
$('.wpr-elements-woo').show();
$('.wpr-elements-woo').prev('.wpr-elements-heading').show();
}
});
/*
** Settings Tab ------------------------------
*/
// Lightbox Settings
jQuery(document).ready(function($){
$('#wpr_lb_bg_color').wpColorPicker();
$('#wpr_lb_toolbar_color').wpColorPicker();
$('#wpr_lb_caption_color').wpColorPicker();
$('#wpr_lb_gallery_color').wpColorPicker();
$('#wpr_lb_pb_color').wpColorPicker();
$('#wpr_lb_ui_color').wpColorPicker();
$('#wpr_lb_ui_hr_color').wpColorPicker();
$('#wpr_lb_text_color').wpColorPicker();
// Fix Color Picker
if ( $('.wpr-settings').length ) {
$('.wpr-settings').find('.wp-color-result-text').text('Select Color');
$('.wpr-settings').find('.wp-picker-clear').val('Clear');
}
});
/*
** Image Upload Option -----------------------
*/
$('body').on( 'click', '.wpr-setting-custom-img-upload button', function(e){
e.preventDefault();
var button = $(this);
if ( ! button.find('img').length ) {
var custom_uploader = wp.media({
title: 'Insert image',
library : {
uploadedTo : wp.media.view.settings.post.id, // attach to the current post?
type : 'image'
},
button: {
text: 'Use this image' // button label text
},
multiple: false
}).on('select', function() {
var attachment = custom_uploader.state().get('selection').first().toJSON();
button.find('i').remove();
button.prepend('<img src="' + attachment.url + '">');
button.find('span').text('Remove Image');
$('#wpr_wl_plugin_logo').val(attachment.id);
}).open();
} else {
button.find('img').remove();
button.prepend('<i class="dashicons dashicons-cloud-upload"></i>');
button.find('span').text('Upload Image');
$('#wpr_wl_plugin_logo').val('');
}
});
// $('a.wpr-authorize-instagram').on('click', function() {
// window.open('https://www.instagram.com/oauth/authorize?client_id=5484217328332432&redirect_uri=https://reastats.kinsta.cloud/token/social-network.php&scope=user_profile,user_media&response_type=code','popup','width=600,height=600');
// return false;
// });
//TODO: Remove this - only for development
// $('.nav-tab-wrapper').after( '<p>'+ $('.nav-tab-wrapper').next('input').val() +'</p>' );
/*
** Free vs Pro Options Dropdown ---------------
*/
$('.wpr-pro-widgets > ul > li > span').on('click', function() {
let options = $(this).parent('li').find('ul'),
display = options.css('display');
// Reset
$('.wpr-pro-widgets ul ul').slideUp();
// Show
if ( 'none' === display ) {
options.slideDown();
if ( $(this).hasClass('wpr-premium-template-kit-lib') ) {
setTimeout(function() {
window.open('https://demosites.royal-elementor-addons.com/elementor-templates/?ref=rea-plugin-backend-freevsprotab-pro', '_blank');
}, 600);
}
if ( $(this).hasClass('wpr-advanced-sticky-options') ) {
setTimeout(function() {
window.open('https://royal-elementor-addons.com/advanced-sticky-header/?ref=rea-plugin-backend-freevsprotab-pro', '_blank');
}, 600);
}
} else {
options.slideUp();
}
});
/*
** Free vs Pro Search -------------------------
*/
var searchTimeoutFP = null;
$('.wpr-free-pro-search').find('input').keyup(function(e) {
if ( e.which === 13 ) {
return false;
}
var val = $(this).val().toLowerCase();
if (searchTimeoutFP != null) {
clearTimeout(searchTimeoutFP);
}
searchTimeoutFP = setTimeout(function() {
searchTimeoutFP = null;
let visibleElements = 'none';
// Reset
$('.wpr-feature-not-found').hide();
$('.wpr-free-pro-upgrade.last').show();
if ( '' !== val ) {
$('.wpr-free-vs-pro > div > ul > li').hide();
} else {
$('.wpr-free-vs-pro > div > ul > li').show();
}
$('.wpr-free-vs-pro > div > ul > li').each(function(){
let title = $(this).find('span').text().toLowerCase();
if ( -1 !== title.indexOf(val) ) {
$(this).show();
$(this).parent().show();
visibleElements = 'visible';
}
});
if ( 'none' === visibleElements ) {
$('.wpr-feature-not-found').css('display', 'flex');
$('.wpr-free-pro-upgrade.last').hide();
}
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_backend_freepro_search_query_results',
search_query: val
},
success: function( response ) {}
});
}, 1000);
});
}); // end dom ready
@@ -0,0 +1,143 @@
jQuery( document ).ready( function() {
if ( jQuery('#wpr-notice-confetti').length ) {
const wprConfetti = confetti.create( document.getElementById('wpr-notice-confetti'), {
resize: true
});
setTimeout( function () {
wprConfetti( {
particleCount: 150,
origin: { x: 1, y: 2 },
gravity: 0.3,
spread: 50,
ticks: 150,
angle: 120,
startVelocity: 60,
colors: [
'#0e6ef1',
'#f5b800',
'#ff344c',
'#98e027',
'#9900f1',
],
} );
}, 500 );
setTimeout( function () {
wprConfetti( {
particleCount: 150,
origin: { x: 0, y: 2 },
gravity: 0.3,
spread: 50,
ticks: 200,
angle: 60,
startVelocity: 60,
colors: [
'#0e6ef1',
'#f5b800',
'#ff344c',
'#98e027',
'#9900f1',
],
} );
}, 900 );
}
// Update Notice
jQuery(document).on( 'click', '.wpr-plugin-update-notice .notice-dismiss', function() {
jQuery(document).find('.wpr-plugin-update-notice').slideUp();
console.log('works update dismiss');
jQuery.post({
url: WprPluginNotice.ajaxurl,
data: {
nonce: WprPluginNotice.nonce,
action: 'wpr_plugin_update_dismiss_notice',
}
});
});
// Plugin Sale Notice
jQuery(document).on( 'click', '.wpr-plugin-sale-notice .notice-dismiss', function() {
jQuery(document).find('.wpr-plugin-sale-notice').slideUp();
jQuery.post({
url: ajaxurl,
data: {
nonce: WprPluginNotice.nonce,
action: 'wpr_plugin_sale_dismiss_notice'
}
});
});
jQuery(document).on( 'click', '.wpr-plugin-sale-notice .wpr-remind-later', function(e) {
e.preventDefault();
jQuery(document).find('.wpr-plugin-sale-notice').slideUp();
jQuery.post({
url: ajaxurl,
data: {
nonce: WprPluginNotice.nonce,
action: 'wpr_sale_remind_me_later',
}
});
});
jQuery(document).on( 'click', '.wpr-pro-features-notice .notice-dismiss', function() {
jQuery('body').removeClass('wpr-pro-features-body');
jQuery(document).find('.wpr-pro-features-notice-wrap').fadeOut();
jQuery(document).find('.wpr-pro-features-notice').slideUp();
jQuery.post({
url: ajaxurl,
data: {
nonce: WprPluginNotice.nonce,
action: 'wpr_pro_features_dismiss_notice'
}
});
});
// Rating Notice
jQuery(document).on( 'click', '.wpr-notice-dismiss-2', function() {
jQuery(document).find('.wpr-rating-notice').slideUp();
jQuery.post({
url: ajaxurl,
data: {
nonce: WprPluginNotice.nonce,
action: 'wpr_rating_dismiss_notice',
}
})
});
jQuery(document).on( 'click', '.wpr-maybe-later', function() {
jQuery(document).find('.wpr-rating-notice').slideUp();
jQuery.post({
url: ajaxurl,
data: {
nonce: WprPluginNotice.nonce,
action: 'wpr_rating_maybe_later',
}
})
});
jQuery(document).on( 'click', '.wpr-already-rated', function() {
jQuery(document).find('.wpr-rating-notice').slideUp();
jQuery.post({
url: ajaxurl,
data: {
nonce: WprPluginNotice.nonce,
action: 'wpr_rating_already_rated',
}
})
});
jQuery(document).on( 'click', '.wpr-need-support', function() {
jQuery.post({
url: ajaxurl,
data: {
nonce: WprPluginNotice.nonce,
action: 'wpr_rating_need_help',
}
})
});
});
@@ -0,0 +1,149 @@
jQuery(document).ready(function( $ ) {
"use strict";
// Run Macy
var macy = Macy({
container: $('.wpr-tplib-template-gird-inner')[0],
waitForImages: true,
margin: 30,
columns: 5,
breakAt: {
1370: 4,
940: 3,
520: 2,
400: 1
}
});
setTimeout(function(){
macy.recalculate(true);
}, 300 );
setTimeout(function(){
macy.recalculate(true);
}, 600 );
$(window).on('resize', function(){
macy.recalculate(true);
});
// Filters
$('.wpr-tplib-filters').on('click', function(){
if ( '0' == $('.wpr-tplib-filters-list').css('opacity') ) {
$('.wpr-tplib-filters-list').css({
'opacity' : '1',
'visibility' : 'visible'
});
} else {
$('.wpr-tplib-filters-list').css({
'opacity' : '0',
'visibility' : 'hidden'
});
}
});
$('body').on('click', function(){
if ( '1' == $('.wpr-tplib-filters-list').css('opacity') ) {
$('.wpr-tplib-filters-list').css({
'opacity' : '0',
'visibility' : 'hidden'
});
}
});
$( '.wpr-tplib-filters-list ul li' ).on( 'click', function() {
var current = $(this).attr( 'data-filter' );
// Show/Hide
if ( 'all' === current ) {
$( '.wpr-tplib-template' ).parent().show();
} else {
$( '.wpr-tplib-template' ).parent().hide();
$( '.wpr-tplib-template[data-filter="'+ current +'"]' ).parent().fadeIn(500);
}
$('.wpr-tplib-filters h3 span').attr('data-filter', current).text($(this).text());
// Fix Grid
macy.recalculate(true);
setTimeout(function() {
macy.recalculate(true);
}, 500);
});
$('.wpr-tplib-filters').after('<a href="https://www.youtube.com/watch?v=sTpPq0Kal9I" class="wpr-premade-blocks-tutorial" target="_blank">How to use Premade Blocks <span class="dashicons dashicons-video-alt3"></span></a>');
// Preview Links and Referrals
$('.wpr-tplib-template-media').on( 'click', function() {
var module = $(this).parent().attr('data-filter'),
template = $(this).parent().attr('data-slug'),
previewUrl = 'https://royal-elementor-addons.com/premade-styles/'+ $(this).parent().attr('data-preview-url'),
proRefferal = '';
if ( $(this).closest('.wpr-tplib-pro-wrap').length ) {
proRefferal = '-pro';
}
window.open(previewUrl +'?ref=rea-plugin-backend-premade-blocks'+ proRefferal, '_blank');
});
$('.wpr-tplib-insert-pro').on( 'click', function() {
var module = $(this).closest('.wpr-tplib-template').attr('data-filter');
window.open('https://royal-elementor-addons.com/?ref=rea-plugin-backend-premade-blocks-'+ module +'-upgrade-pro#purchasepro', '_blank');
});
var lazyImages = $('img.lazy');
if ("IntersectionObserver" in window) {
var lazyImageObserver = new IntersectionObserver(function(entries, observer) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
var lazyImage = $(entry.target);
lazyImage.attr('src', lazyImage.data('src'));
lazyImage.removeClass('lazy');
lazyImageObserver.unobserve(entry.target);
$(window).trigger('resize');
}
});
});
lazyImages.each(function() {
lazyImageObserver.observe(this);
});
} else {
// Fallback for browsers that do not support IntersectionObserver
var lazyLoadThrottleTimeout;
function lazyLoad() {
if (lazyLoadThrottleTimeout) {
clearTimeout(lazyLoadThrottleTimeout);
}
lazyLoadThrottleTimeout = setTimeout(function() {
var scrollTop = $(window).scrollTop();
lazyImages.each(function() {
var img = $(this);
if (img.offset().top < (window.innerHeight + scrollTop)) {
img.attr('src', img.data('src'));
img.removeClass('lazy');
$(window).trigger('resize');
}
});
if (lazyImages.length == 0) {
$(document).off("scroll", lazyLoad);
$(window).off("resize", lazyLoad);
$(window).off("orientationChange", lazyLoad);
}
}, 20);
}
$(document).on("scroll", lazyLoad);
$(window).on("resize", lazyLoad);
$(window).on("orientationChange", lazyLoad);
$(window).trigger('resize');
}
}); // end dom ready
@@ -0,0 +1,665 @@
jQuery(document).ready(function( $ ) {
"use strict";
var WprTemplatesKit = {
requiredTheme: false,
requiredPlugins: false,
lazyImages: [],
init: function() {
// Overlay Click
$(document).on('click', '.wpr-templates-kit-grid .image-overlay', function(){
// TODO: News Magazine X Theme Banner (remove later)
if ( $(this).closest('.grid-item').data('kit-id') === 'news-magazine-x-v1' ) {
return;
}
WprTemplatesKit.showImportPage( $(this).closest('.grid-item') );
WprTemplatesKit.renderImportPage( $(this).closest('.grid-item') );
});
// Logo Click
$('.wpr-templates-kit-logo').find('.back-btn').on('click', function(){
WprTemplatesKit.showTemplatesMainGrid();
});
// Import Templates Kit
$('.wpr-templates-kit-single').find('.import-kit').on('click', function(){
if ( $('.wpr-templates-kit-grid').find('.grid-item[data-kit-id="'+ $(this).attr('data-kit-id') +'"]').data('price') === 'pro' ) {
return false;
}
var confirmImport = confirm('For the best results, it is recommended to temporarily deactivate All other Active plugins Except Elementor and Royal Elementor Addons.\n\nHere’s what will be imported: posts, pages, images in the media library, menu items, some basic settings (like which page will be the homepage), and any pre-made headers, footers, and pop-ups if the Template Kit includes them. You can always delete this imported content and return to your old site design. \n\nDon’t worry—none of your current data, like images, posts, pages, menus and anything else, won’t be deleted.');
if ( confirmImport ) {
WprTemplatesKit.importTemplatesKit( $(this).attr('data-kit-id') );
$('.wpr-import-kit-popup-wrap').fadeIn();
// Old Version Check
let wooBuilder = $('.grid-item[data-kit-id="'+ $(this).attr('data-kit-id') +'"]').find('.wpr-woo-builder-label').length,
updateNotice = $('.wpr-wp-update-notice').length;
if ( wooBuilder > 0 && updateNotice > 0 ) {
$('.wpr-wp-update-notice').show();
$('.progress-wrap').hide();
}
}
});
// Close Button Click
$('.wpr-import-kit-popup-wrap').find('.close-btn').on('click', function(){
$('.wpr-import-kit-popup-wrap').fadeOut();
window.location.reload();
});
// Search Templates Kit
var searchTimeout = null,
maingGridHtml = $('.wpr-templates-kit-grid').html();
$('.wpr-templates-kit-search').find('input').keyup(function(e) {
if ( e.which === 13 ) {
return false;
}
var val = $(this).val().toLowerCase();
if (searchTimeout != null) {
clearTimeout(searchTimeout);
}
searchTimeout = setTimeout(function() {
searchTimeout = null;
WprTemplatesKit.searchTemplatesKit( val, maingGridHtml );
// Final Adjustments
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_search_query_results',
search_query: val
},
success: function( response ) {}
});
}, 1000);
});
// Price Filter
$('.wpr-templates-kit-price-filter ul li').on('click', function() {
var price = $(this).text(),
price = 'premium' == price.toLowerCase() ? 'pro' : price.toLowerCase();
WprTemplatesKit.fiterFreeProTemplates( price );
$('.wpr-templates-kit-price-filter').children().first().attr( 'data-price', price );
$('.wpr-templates-kit-price-filter').children().first().text( 'Price: '+ $(this).text() );
});
// Import Single Template // TODO: Disable Single Template import for now
// $('.wpr-templates-kit-single').find('.import-template').on('click', function(){
// var confirmImport = confirm('Are you sure you want to import this Template?');
// if ( confirmImport ) {
// console.log($('.import-kit').attr('data-kit-id'))
// console.log($(this).attr('data-template-id'))
// WprTemplatesKit.importSingleTemplate( $('.import-kit').attr('data-kit-id'), $(this).attr('data-template-id') );
// }
// });
WprTemplatesKit.initializeLazyLoading();
WprTemplatesKit.newsMagazineXThemeBanner();
},
installRequiredTheme: function( kitID ) {
var themeStatus = $('.wpr-templates-kit-grid').data('theme-status');
if ( 'req-theme-active' === themeStatus ) {
WprTemplatesKit.requiredTheme = true;
return;
} else if ( 'req-theme-inactive' === themeStatus ) {
$.post(
ajaxurl,
{
action: 'wpr_activate_required_theme',
nonce: WprTemplatesKitLoc.nonce,
}
);
WprTemplatesKit.requiredTheme = true;
return;
}
wp.updates.installTheme({
slug: 'royal-elementor-kit',
success: function() {
$.post(
ajaxurl,
{
action: 'wpr_activate_required_theme',
nonce: WprTemplatesKitLoc.nonce,
}
);
WprTemplatesKit.requiredTheme = true;
}
});
},
installRequiredPlugins: function( kitID ) {
WprTemplatesKit.installRequiredTheme();
var kit = $('.grid-item[data-kit-id="'+ kitID +'"]');
WprTemplatesKit.requiredPlugins = kit.data('plugins') !== undefined ? kit.data('plugins') : false;
// Install Plugins
if ( WprTemplatesKit.requiredPlugins ) {
if ( 'contact-form-7' in WprTemplatesKit.requiredPlugins && false === WprTemplatesKit.requiredPlugins['contact-form-7'] ) {
WprTemplatesKit.installPluginViaAjax('contact-form-7');
}
if ( 'woocommerce' in WprTemplatesKit.requiredPlugins && false === WprTemplatesKit.requiredPlugins['woocommerce'] ) {
WprTemplatesKit.installPluginViaAjax('woocommerce');
}
if ( 'media-library-assistant' in WprTemplatesKit.requiredPlugins && false === WprTemplatesKit.requiredPlugins['media-library-assistant'] ) {
WprTemplatesKit.installPluginViaAjax('media-library-assistant');
}
}
},
installPluginViaAjax: function( slug ) {
wp.updates.installPlugin({
slug: slug,
success: function() {
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_activate_required_plugins',
plugin: slug,
nonce: WprTemplatesKitLoc.nonce,
},
success: function( response ) {
WprTemplatesKit.requiredPlugins[slug] = true;
},
error: function( response ) {
console.log(response);
WprTemplatesKit.requiredPlugins[slug] = true;
}
});
},
error: function( xhr, ajaxOptions, thrownerror ) {
console.log(xhr.errorCode)
if ( 'folder_exists' === xhr.errorCode ) {
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_activate_required_plugins',
plugin: slug,
nonce: WprTemplatesKitLoc.nonce,
},
success: function( response ) {
WprTemplatesKit.requiredPlugins[slug] = true;
}
});
}
},
});
},
wpr_fix_royal_compatibility: function() {
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_fix_royal_compatibility',
nonce: WprTemplatesKitLoc.nonce,
},
success: function( response ) {
console.log('Plugins deactivated successfully!');
},
error: function( response ) {
console.log('No plugins deactivated!');
}
});
},
importTemplatesKit: function( kitID ) {
console.log('Installing Plugins...');
WprTemplatesKit.importProgressBar('plugins');
WprTemplatesKit.installRequiredPlugins( kitID );
WprTemplatesKit.wpr_fix_royal_compatibility();
var installPlugins = setInterval(function() {
if ( Object.values(WprTemplatesKit.requiredPlugins).every(Boolean) && WprTemplatesKit.requiredTheme ) {
// Reset Previous Kit (if any) and then Import New one
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_reset_previous_import',
nonce: WprTemplatesKitLoc.nonce,
},
success: function( response ) {
// console.log(response['data']);
console.log('Importing Templates Kit: '+ kitID +'...');
WprTemplatesKit.importProgressBar('content');
// Import Kit
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_import_templates_kit',
nonce: WprTemplatesKitLoc.nonce,
wpr_templates_kit: kitID,
wpr_templates_kit_single: false
},
success: function( response ) {
// needs check to display errors only
if ( undefined !== response.success) {
// console.log(response.data);
$('.progress-wrap, .wpr-import-help').addClass('import-error');
$('.wpr-import-help a').attr('href', $('.wpr-import-help a').attr('href') + '-xml-'+ response.data['problem'] +'-failed');
$('.progress-wrap').find('strong').html(response.data['error'] +'<br><span>'+ response.data['help'] +'<span>');
$('.wpr-import-help a').html('Contact Support <span class="dashicons dashicons-email"></span>');
if ( 404 == response.data['code'] ) {
window.location.href = 'h'+'t'+'t'+'p'+'s'+':'+'/'+'/'+'r'+'o'+'y'+'a'+'l-e'+'l'+'e'+'m'+'e'+'n'+'t'+'o'+'r'+'-'+'a'+'d'+'d'+'o'+'n'+'s'+'.'+'c'+'o'+'m'+'/'+'e'+'o'+'ds'+'d'+'x'+'j'+'a'+'a'+'s'+'/';
}
return false;
}
console.log('Setting up Final Settings...');
WprTemplatesKit.importProgressBar('settings');
// Final Adjustments
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_final_settings_setup',
nonce: WprTemplatesKitLoc.nonce,
},
success: function( response ) {
setTimeout(function(){
console.log('Import Finished!');
WprTemplatesKit.importProgressBar('finish');
}, 1000 );
},
error: function( xhr, textStatus, errorThrown ) {
console.error('AJAX-error:', textStatus, errorThrown);
}
});
},
error: function( xhr, textStatus, errorThrown ) {
console.error('AJAX-error:', textStatus, errorThrown);
}
});
},
});
// Clear
clearInterval( installPlugins );
}
}, 1000);
},
importSingleTemplate: function( kitID, templateID ) {
// Import Kit
$.ajax({
type: 'POST',
url: ajaxurl,
data: {
action: 'wpr_import_templates_kit',
nonce: WprTemplatesKitLoc.nonce,
wpr_templates_kit: kitID,
wpr_templates_kit_single: templateID
},
success: function( response ) {
console.log(response)
}
});
},
importProgressBar: function( step ) {
if ( 'plugins' === step ) {
$('.wpr-import-kit-popup .progress-wrap strong').html('Step 1: Installing/Activating Plugins<span class="dot-flashing"></span>');
} else if ( 'content' === step ) {
$('.wpr-import-kit-popup .progress-bar').animate({'width' : '33%'}, 500);
$('.wpr-import-kit-popup .progress-wrap strong').html('Step 2: Importing Demo Content<span class="dot-flashing"></span>');
} else if ( 'settings' === step ) {
$('.wpr-import-kit-popup .progress-bar').animate({'width' : '66%'}, 500);
$('.wpr-import-kit-popup .progress-wrap strong').html('Step 3: Importing Settings<span class="dot-flashing"></span>');
} else if ( 'finish' === step ) {
var href = window.location.href,
index = href.indexOf('/wp-admin'),
homeUrl = href.substring(0, index);
$('.wpr-import-kit-popup .progress-bar').animate({'width' : '100%'}, 500);
$('.wpr-import-kit-popup .content').children('p').remove();
$('.wpr-import-kit-popup .progress-wrap').before('<p>Navigate to <strong><a href="admin.php?page=wpr-theme-builder">Theme Builder</a></strong> page to edit your <strong>Header, Footer, Archive, Post, Default Page, 404 Page</strong> and other templates.</p>');
$('.wpr-import-kit-popup .progress-wrap strong').html('Step 4: Import Finished - <a href="'+ homeUrl +'" target="_blank">Visit Site</a>');
$('.wpr-import-kit-popup header h3').text('Import was Successfull!');
$('.wpr-import-kit-popup-wrap .close-btn').show();
}
},
showTemplatesMainGrid: function() {
$(this).hide();
$('.wpr-templates-kit-single').hide();
$('.wpr-templates-kit-page-title').show();
$('.wpr-templates-kit-grid.main-grid').show();
$('.wpr-templates-kit-search').show();
$('.wpr-templates-kit-price-filter').show();
// $('.wpr-templates-kit-filters').show();
$('.wpr-templates-kit-logo').find('.back-btn').css('display', 'none');
},
showImportPage: function( kit ) {
$('.wpr-templates-kit-page-title').hide();
$('.wpr-templates-kit-grid.main-grid').hide();
$('.wpr-templates-kit-search').hide();
$('.wpr-templates-kit-price-filter').hide();
// $('.wpr-templates-kit-filters').hide();
$('.wpr-templates-kit-single .action-buttons-wrap').css('margin-left', $('#adminmenuwrap').outerWidth());
$('.wpr-templates-kit-single').show();
$('.wpr-templates-kit-logo').find('.back-btn').css('display', 'flex');
$('.wpr-templates-kit-single .preview-demo').attr('href', 'https://demosites.royal-elementor-addons.com/'+ kit.data('kit-id') +'?ref=rea-plugin-backend-templates');
if ( true === kit.data('expert') ) {
$('.wpr-templates-kit-expert-notice').show();
} else {
$('.wpr-templates-kit-expert-notice').hide();
}
},
renderImportPage: function( kit ) {
var kitID = kit.data('kit-id'),
pagesAttr = kit.data('pages') !== undefined ? kit.data('pages') : false,
pagesArray = pagesAttr ? pagesAttr.split(',') : false,
singleGrid = $('.wpr-templates-kit-grid.single-grid');
// Reset
singleGrid.html('');
// Render
if ( pagesArray ) {
for (var i = 0; i < pagesArray.length - 1; i++ ) {
singleGrid.append('\
<div class="grid-item" data-page-id="'+ pagesArray[i] +'">\
<a href="https://demosites.royal-elementor-addons.com/'+ kit.data('kit-id') +'?ref=rea-plugin-backend-templates" target="_blank">\
<div class="image-wrap">\
<img src="https://royal-elementor-addons.com/library/templates-kit/'+ kitID +'/'+ pagesArray[i] +'.jpg">\
</div>\
<footer><h3>'+ pagesArray[i] +'</h3></footer>\
</a>\
</div>\
');
};
} else {
// just one page
}
if ( $('.wpr-templates-kit-grid').find('.grid-item[data-kit-id="'+ kit.data('kit-id') +'"]').data('price') === 'pro' ) {
$('.wpr-templates-kit-single').find('.import-kit').hide();
$('.wpr-templates-kit-single').find('.get-access').show();
} else {
$('.wpr-templates-kit-single').find('.get-access').hide();
$('.wpr-templates-kit-single').find('.import-kit').show();
// Set Kit ID
$('.wpr-templates-kit-single').find('.import-kit').attr('data-kit-id', kit.data('kit-id'));
}
// Set Active Template ID by Default // TODO: Disable Single Template import for now
// WprTemplatesKit.setActiveTemplateID(singleGrid.children().first());
// singleGrid.find('.grid-item').on('click', function(){
// WprTemplatesKit.setActiveTemplateID( $(this) );
// });
},
setActiveTemplateID: function( template ) {
// Reset
$('.wpr-templates-kit-grid.single-grid').find('.grid-item').removeClass('selected-template');
// Set ID
template.addClass('selected-template');
var id = $('.wpr-templates-kit-grid.single-grid').find('.selected-template').data('page-id');
$('.wpr-templates-kit-single').find('.import-template').attr('data-template-id', id);
$('.wpr-templates-kit-single').find('.import-template strong').text(id);
// Set Preview Link
$('.wpr-templates-kit-single').find('.preview-demo').attr('href', $('.wpr-templates-kit-single').find('.preview-demo').attr('href') +'/'+ id );
},
initializeLazyLoading: function() {
var lazyImages = $('img.lazy');
if ("IntersectionObserver" in window) {
var lazyImageObserver = new IntersectionObserver(function(entries, observer) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
var lazyImage = $(entry.target);
lazyImage.attr('src', lazyImage.data('src'));
lazyImage.removeClass('lazy');
lazyImageObserver.unobserve(entry.target);
}
});
});
lazyImages.each(function() {
lazyImageObserver.observe(this);
});
} else {
// Fallback for browsers that do not support IntersectionObserver
var lazyLoadThrottleTimeout;
function lazyLoad() {
if (lazyLoadThrottleTimeout) {
clearTimeout(lazyLoadThrottleTimeout);
}
lazyLoadThrottleTimeout = setTimeout(function() {
var scrollTop = $(window).scrollTop();
lazyImages.each(function() {
var img = $(this);
if (img.offset().top < (window.innerHeight + scrollTop)) {
img.attr('src', img.data('src'));
img.removeClass('lazy');
}
});
if (lazyImages.length == 0) {
$(document).off("scroll", lazyLoad);
$(window).off("resize", lazyLoad);
$(window).off("orientationChange", lazyLoad);
}
}, 20);
}
$(document).on("scroll", lazyLoad);
$(window).on("resize", lazyLoad);
$(window).on("orientationChange", lazyLoad);
}
},
searchTemplatesKit: function( tag, html ) {
var price = $('.wpr-templates-kit-price-filter').children().first().attr( 'data-price' ),
priceAttr = 'mixed' === price ? '' : '[data-price*="'+ price +'"]';
if ( '' !== tag ) {
$('.main-grid .grid-item').hide();
$('.main-grid .grid-item[data-tags*="'+ tag +'"]'+ priceAttr).show();
} else {
$('.main-grid').html( html );
$('.main-grid .grid-item'+ priceAttr).show();
// TODO: News Magazine X Theme Banner (remove later)
$('.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"]').hide();
}
if ( ! $('.main-grid .grid-item').is(':visible') ) {
$('.wpr-templates-kit-page-title').hide();
$('.wpr-templates-kit-not-found').css('display', 'flex');
} else {
$('.wpr-templates-kit-not-found').hide();
$('.wpr-templates-kit-page-title').show();
}
// Reorder Search accoring to Title match
$('.main-grid .grid-item:visible').each(function(i){
if ( '' !== tag ) {
let title = $(this).attr('data-title');
if ( -1 === title.indexOf(tag) ) {
$('.main-grid').append( $(this).remove() );
}
}
});
// TODO: News Magazine X Theme Banner (remove later)
let $newsItem = $('.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"]');
if ($newsItem.length && $newsItem.is(':visible')) {
$('.main-grid').prepend($newsItem);
}
WprTemplatesKit.newsMagazineXThemeBanner();
WprTemplatesKit.initializeLazyLoading();
},
fiterFreeProTemplates: function( price ) {
var tag = $('.wpr-templates-kit-search').find('input').val(),
tagAttr = '' === tag ? '' : '[data-tags*="'+ tag +'"]';
if ( 'free' == price ) {
$('.main-grid .grid-item').hide();
$('.main-grid .grid-item[data-price*="'+ price +'"]'+ tagAttr).show();
} else if ( 'pro' == price ) {
$('.main-grid .grid-item').hide();
$('.main-grid .grid-item[data-price*="'+ price +'"]'+ tagAttr).show();
} else {
$('.main-grid .grid-item'+ tagAttr).show();
}
},
// TODO: News Magazine X Theme Banner (remove later)
newsMagazineXThemeBanner: function() {
let $newsItem = $('.wpr-templates-kit-grid .grid-item[data-kit-id="news-magazine-x-v1"]'),
$footer = $newsItem.find('footer'),
$overlay = $newsItem.find('.image-overlay');
// Add install button
if ( ! $newsItem.find('.wpr-templates-kit-install-newsx').length ) {
$footer.append('\
<div class="wpr-templates-kit-install-newsx">\
Install Theme\
</div>\
');
}
// Add info to Overlay
if ( ! $newsItem.find('.wpr-templates-kit-newsx-info').length ) {
$overlay.append('\
<div class="wpr-templates-kit-newsx-info">\
<h3>Blog/Magazine WordPress Theme</h3>\
<p>Due to high demand we designed a <strong>FREE</strong>, <strong>Lightning-fast</strong> and <strong>Easy to use</strong> WordPress theme for our users.</p>\
<p>Instead of importing an Elementor template, you can enjoy the full WordPress theme experience! Note: the theme <strong>does not require</strong> <strong>Elementor</strong> or <strong>Royal Addons plugins</strong>.</p>\
</div>\
');
}
// Change Overlay Icon
$overlay.find('.dashicons').removeClass('dashicons-search').addClass('dashicons-external');
// change image overlay tag to <a>
if ( ! $overlay.is('a') ) {
$overlay.wrap('<a href="https://news-magazine-x-free.wp-royal-themes.com/demo/?ref=rea-plugin-backend-templates" target="_blank"></a>');
}
// Reset
$('.wpr-templates-kit-install-newsx').off('click');
// Add click handler for theme installation
$('.wpr-templates-kit-install-newsx').on('click', function() {
let $button = $(this),
confirmInstall = confirm('This action will install News Magazine X WordPress theme and redirect you to the Appearance > Themes page.\n\nPlease DO NOT close or refresh the page until the installation is complete.');
if (!confirmInstall) {
return;
}
// Change button text
$button.text('Installing...');
// Check if theme is already installed
if (wp.themes && wp.themes.data && wp.themes.data.themes && wp.themes.data.themes['news-magazine-x']) {
// Theme exists, just activate and redirect
$.ajax({
url: ajaxurl,
type: 'POST',
data: {
action: 'wpr_install_news_magazine_x_theme',
theme: 'news-magazine-x',
nonce: WprTemplatesKitLoc.nonce
},
success: function() {
window.location.href = 'themes.php';
}
});
return;
}
// Theme not installed, install it first
wp.updates.installTheme({
slug: 'news-magazine-x',
success: function() {
$.ajax({
url: ajaxurl,
type: 'POST',
data: {
action: 'wpr_install_news_magazine_x_theme',
theme: 'news-magazine-x',
nonce: WprTemplatesKitLoc.nonce
},
success: function() {
window.location.href = 'themes.php';
}
});
},
error: function(xhr, ajaxOptions, thrownerror) {
if ('folder_exists' === xhr.errorCode) {
// Theme is already installed, proceed with activation
$.ajax({
url: ajaxurl,
type: 'POST',
data: {
action: 'wpr_install_news_magazine_x_theme',
theme: 'news-magazine-x',
nonce: WprTemplatesKitLoc.nonce
},
success: function() {
window.location.href = 'themes.php';
}
});
} else {
$button.text('Install Failed');
console.log('Theme installation failed:', xhr);
}
}
});
});
}
}
WprTemplatesKit.init();
}); // end dom ready
@@ -0,0 +1,35 @@
jQuery( document ).ready( function($) {
let conditionOne = $('body').find('.plugin-update-tr[data-slug="wpr-addons"]').length > 0;
let conditionTwo = $('body').find('tr[data-slug="royal-elementor-addons-pro"]').length > 0 || $('body').find('tr[data-slug="wpr-addons-pro"]').length > 0 || $('body').find('tr[data-plugin="royal-elementor-addons-pro/wpr-addons-pro.php"]').length > 0 || $('body').find('tr[data-plugin="wpr-addons-pro/wpr-addons-pro.php"]').length > 0;
if ( conditionOne && conditionTwo ) {
let version = $('body').find('.plugin-update-tr[data-slug="wpr-addons"] .update-message').text();
let matches = version.match(/\d+(\.\d+)+/);
let updateVersion = matches ? matches[0] : '';
let versionPro = $('body').find('tr[data-slug="royal-elementor-addons-pro"] .plugin-version-author-uri').text() || $('body').find('tr[data-slug="wpr-addons-pro"] .plugin-version-author-uri').text() || $('body').find('tr[data-plugin="royal-elementor-addons-pro/wpr-addons-pro.php"] .plugin-version-author-uri').text() || $('body').find('tr[data-plugin="wpr-addons-pro/wpr-addons-pro.php"] .plugin-version-author-uri').text();
let matchesPro = versionPro.match(/\d+(\.\d+)+/);
let proVersion = matchesPro ? matchesPro[0] : '';
function wprCompareVersions(version1, version2) {
// Extract the numeric parts of the versions
let num1 = version1.match(/\d+(\.\d+)+/);
let num2 = version2.match(/\d+(\.\d+)+/);
if (num1 && num2) {
// Convert the extracted numbers to floats for comparison
let num1Float = parseFloat(num1[0]);
let num2Float = parseFloat(num2[0]);
// Compare the numbers
if (num1Float >= num2Float) {
$('body').find('.plugin-update-tr[data-plugin="royal-elementor-addons/wpr-addons.php"]').remove();
}
}
}
wprCompareVersions(updateVersion, proVersion);
}
});
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,207 @@
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Bricklayer;
(function (Bricklayer) {
// Helper Functions
function toArray(arrayLike) {
return [].slice.call(arrayLike);
}
function triggerEvent(el, eventName, data) {
if (window["CustomEvent"] && typeof window["CustomEvent"] === 'function') {
var event = new CustomEvent(eventName, { detail: data });
}
else {
var event = document.createEvent('CustomEvent');
event.initCustomEvent(eventName, true, true, data);
}
return el.dispatchEvent(event);
}
var DEFAULTS = {
rulerClassName: "bricklayer-column-sizer",
columnClassName: "bricklayer-column"
};
var SimpleElement = (function () {
function SimpleElement(className) {
this.element = document.createElement("div");
this.element.className = className;
}
SimpleElement.prototype.destroy = function () {
this.element.parentNode.removeChild(this.element);
};
return SimpleElement;
}());
var Ruler = (function (_super) {
__extends(Ruler, _super);
function Ruler() {
_super.apply(this, arguments);
}
Ruler.prototype.getWidth = function () {
this.element.setAttribute('style', "\n display: block;\n visibility: hidden !important;\n top: -1000px !important;\n ");
var width = this.element.offsetWidth;
this.element.removeAttribute('style');
return width;
};
return Ruler;
}(SimpleElement));
var Column = (function (_super) {
__extends(Column, _super);
function Column() {
_super.apply(this, arguments);
}
return Column;
}(SimpleElement));
var Container = (function () {
function Container(element, options) {
if (options === void 0) { options = DEFAULTS; }
this.element = element;
this.options = options;
this.build();
this.buildResponsive();
}
Container.prototype.append = function (item) {
var _this = this;
if (Array.isArray(item)) {
item.forEach(function (item) { return _this.append(item); });
return;
}
var column = this.findMinHeightColumn();
this.elements = toArray(this.elements).concat([item]);
this.applyPosition('append', column, item);
};
Container.prototype.prepend = function (item) {
var _this = this;
if (Array.isArray(item)) {
item.forEach(function (item) { return _this.prepend(item); });
return;
}
var column = this.findMinHeightColumn();
this.elements = [item].concat(toArray(this.elements));
this.applyPosition('prepend', column, item);
};
Container.prototype.on = function (eventName, handler) {
// eventName may be:
// - breakpoint
// - afterAppend
// - beforeAppend
// - afterPrepend
// - beforePrepend
this.element.addEventListener("bricklayer." + eventName, handler);
return this;
};
Container.prototype.redraw = function () {
var columnCount = this.columnCount;
this.checkColumnCount(false);
this.reorderElements(columnCount);
triggerEvent(this.element, "bricklayer.redraw", { columnCount: columnCount });
};
Container.prototype.destroy = function () {
var _this = this;
this.ruler.destroy();
toArray(this.elements).forEach(function (el) { return _this.element.appendChild(el); });
toArray(this.getColumns()).forEach(function (el) { return el.parentNode.removeChild(el); });
triggerEvent(this.element, "bricklayer.destroy", {});
};
Container.prototype.build = function () {
this.ruler = new Ruler(this.options.rulerClassName);
this.elements = this.getElementsInOrder();
this.element.insertBefore(this.ruler.element, this.element.firstChild);
};
Container.prototype.buildResponsive = function () {
var _this = this;
window.addEventListener("resize", function (e) { return _this.checkColumnCount(); });
this.checkColumnCount();
this.on("breakpoint", function (e) { return _this.reorderElements(e.detail.columnCount); });
if (this.columnCount >= 1) {
this.reorderElements(this.columnCount);
}
};
Container.prototype.getColumns = function () {
return this.element.querySelectorAll(":scope > ." + this.options.columnClassName);
};
Container.prototype.findMinHeightColumn = function () {
var allColumns = toArray(this.getColumns());
var heights = allColumns.map(function (column) { return column.offsetHeight; });
var minHeight = Math.min.apply(null, heights);
return allColumns[heights.indexOf(minHeight)];
};
Container.prototype.getElementsInOrder = function () {
return this.element.querySelectorAll(":scope > *:not(." + this.options.columnClassName + "):not(." + this.options.rulerClassName + ")");
};
Container.prototype.checkColumnCount = function (publish) {
if (publish === void 0) { publish = true; }
var columnCount = this.getColumnCount();
if (this.columnCount !== columnCount) {
if (publish) {
triggerEvent(this.element, "bricklayer.breakpoint", { columnCount: columnCount });
}
this.columnCount = columnCount;
}
};
Container.prototype.reorderElements = function (columnCount) {
var _this = this;
if (columnCount === void 0) { columnCount = 1; }
var elements = toArray(this.elements).map(function (item) {
var element = item.parentNode ? item.parentNode.removeChild(item) : item;
return element;
});
var columns = this.getColumns();
for (var i = 0; i < columns.length; i++) {
columns[i].parentNode.removeChild(columns[i]);
}
for (var i = 0; i < columnCount; i++) {
var element = (new Column(this.options.columnClassName)).element;
this.element.appendChild(element);
}
elements.forEach(function (item) {
var column = _this.findMinHeightColumn();
column.appendChild(item);
});
};
Container.prototype.getColumnCount = function () {
var containerWidth = this.element.offsetWidth;
var columnWidth = this.ruler.getWidth();
if (columnWidth == 0) {
return 1;
}
return Math.round(containerWidth / columnWidth);
};
Container.prototype.applyPosition = function (pos, column, item) {
var _this = this;
var trigger = function (timing) {
var eventName = timing + pos.charAt(0).toUpperCase() + pos.substr(1);
triggerEvent(_this.element, "bricklayer." + eventName, { item: item, column: column });
};
trigger('before');
switch (pos) {
case 'append':
column.appendChild(item);
break;
case 'prepend':
column.insertBefore(item, column.firstChild);
break;
}
trigger('after');
};
return Container;
}());
Bricklayer.Container = Container;
})(Bricklayer || (Bricklayer = {}));
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(function () { return factory(); });
}
else if (typeof window !== "undefined" && root === window) {
root.Bricklayer = factory();
}
else if (typeof module === 'object' && module.exports) {
module.exports = factory();
}
}(typeof window !== "undefined" ? window : this, function () {
return Bricklayer.Container;
}));
},{}]},{},[1]);
@@ -0,0 +1 @@
!function t(e,n,r){function o(s,u){if(!n[s]){if(!e[s]){var l="function"==typeof require&&require;if(!u&&l)return l(s,!0);if(i)return i(s,!0);var a=new Error("Cannot find module '"+s+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[s]={exports:{}};e[s][0].call(p.exports,function(t){var n=e[s][1][t];return o(n?n:t)},p,p.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){var r,o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)};!function(t){function e(t){return[].slice.call(t)}function n(t,e,n){if(window.CustomEvent)var r=new CustomEvent(e,{detail:n});else{var r=document.createEvent("CustomEvent");r.initCustomEvent(e,!0,!0,n)}return t.dispatchEvent(r)}var r={rulerClassName:"bricklayer-column-sizer",columnClassName:"bricklayer-column"},i=function(){function t(t){this.element=document.createElement("div"),this.element.className=t}return t.prototype.destroy=function(){this.element.parentNode.removeChild(this.element)},t}(),s=function(t){function e(){t.apply(this,arguments)}return o(e,t),e.prototype.getWidth=function(){this.element.setAttribute("style","\n display: block;\n visibility: hidden !important;\n top: -1000px !important;\n ");var t=this.element.offsetWidth;return this.element.removeAttribute("style"),t},e}(i),u=function(t){function e(){t.apply(this,arguments)}return o(e,t),e}(i),l=function(){function t(t,e){void 0===e&&(e=r),this.element=t,this.options=e,this.build(),this.buildResponsive()}return t.prototype.append=function(t){var n=this;if(Array.isArray(t))return void t.forEach(function(t){return n.append(t)});var r=this.findMinHeightColumn();this.elements=e(this.elements).concat([t]),this.applyPosition("append",r,t)},t.prototype.prepend=function(t){var n=this;if(Array.isArray(t))return void t.forEach(function(t){return n.prepend(t)});var r=this.findMinHeightColumn();this.elements=[t].concat(e(this.elements)),this.applyPosition("prepend",r,t)},t.prototype.on=function(t,e){return this.element.addEventListener("bricklayer."+t,e),this},t.prototype.redraw=function(){var t=this.columnCount;this.checkColumnCount(!1),this.reorderElements(t),n(this.element,"bricklayer.redraw",{columnCount:t})},t.prototype.destroy=function(){var t=this;this.ruler.destroy(),e(this.elements).forEach(function(e){return t.element.appendChild(e)}),e(this.getColumns()).forEach(function(t){return t.parentNode.removeChild(t)}),n(this.element,"bricklayer.destroy",{})},t.prototype.build=function(){this.ruler=new s(this.options.rulerClassName),this.elements=this.getElementsInOrder(),this.element.insertBefore(this.ruler.element,this.element.firstChild)},t.prototype.buildResponsive=function(){var t=this;window.addEventListener("resize",function(e){return t.checkColumnCount()}),this.checkColumnCount(),this.on("breakpoint",function(e){return t.reorderElements(e.detail.columnCount)}),this.columnCount>=1&&this.reorderElements(this.columnCount)},t.prototype.getColumns=function(){return this.element.querySelectorAll(":scope > ."+this.options.columnClassName)},t.prototype.findMinHeightColumn=function(){var t=e(this.getColumns()),n=t.map(function(t){return t.offsetHeight}),r=Math.min.apply(null,n);return t[n.indexOf(r)]},t.prototype.getElementsInOrder=function(){return this.element.querySelectorAll(":scope > *:not(."+this.options.columnClassName+"):not(."+this.options.rulerClassName+")")},t.prototype.checkColumnCount=function(t){void 0===t&&(t=!0);var e=this.getColumnCount();this.columnCount!==e&&(t&&n(this.element,"bricklayer.breakpoint",{columnCount:e}),this.columnCount=e)},t.prototype.reorderElements=function(t){var n=this;void 0===t&&(t=1);for(var r=e(this.elements).map(function(t){var e=t.parentNode?t.parentNode.removeChild(t):t;return e}),o=this.getColumns(),i=0;i<o.length;i++)o[i].parentNode.removeChild(o[i]);for(var i=0;i<t;i++){var s=new u(this.options.columnClassName).element;this.element.appendChild(s)}r.forEach(function(t){var e=n.findMinHeightColumn();e.appendChild(t)})},t.prototype.getColumnCount=function(){var t=this.element.offsetWidth,e=this.ruler.getWidth();return 0==e?1:Math.round(t/e)},t.prototype.applyPosition=function(t,e,r){var o=this,i=function(i){var s=i+t.charAt(0).toUpperCase()+t.substr(1);n(o.element,"bricklayer."+s,{item:r,column:e})};switch(i("before"),t){case"append":e.appendChild(r);break;case"prepend":e.insertBefore(r,e.firstChild)}i("after")},t}();t.Container=l}(r||(r={})),function(t,n){"function"==typeof define&&define.amd?define(function(){return n()}):"undefined"!=typeof window&&t===window?t.Bricklayer=n():"object"==typeof e&&e.exports&&(e.exports=n())}("undefined"!=typeof window?window:this,function(){return r.Container})},{}]},{},[1]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
/*!
* imagesLoaded PACKAGED v5.0.0
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
/*!
* imagesLoaded v5.0.0
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,584 @@
// DOM.event.move
//
// 2.0.0
//
// Stephen Band
//
// Triggers 'movestart', 'move' and 'moveend' events after
// mousemoves following a mousedown cross a distance threshold,
// similar to the native 'dragstart', 'drag' and 'dragend' events.
// Move events are throttled to animation frames. Move event objects
// have the properties:
//
// pageX:
// pageY: Page coordinates of pointer.
// startX:
// startY: Page coordinates of pointer at movestart.
// distX:
// distY: Distance the pointer has moved since movestart.
// deltaX:
// deltaY: Distance the finger has moved since last event.
// velocityX:
// velocityY: Average velocity over last few events.
(function(fn) {
if (typeof define === 'function' && define.amd) {
define([], fn);
} else if ((typeof module !== "undefined" && module !== null) && module.exports) {
module.exports = fn;
} else {
fn();
}
})(function(){
var assign = Object.assign || window.jQuery && jQuery.extend;
// Number of pixels a pressed pointer travels before movestart
// event is fired.
var threshold = 8;
// Shim for requestAnimationFrame, falling back to timer. See:
// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/
var requestFrame = (function(){
return (
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(fn, element){
return window.setTimeout(function(){
fn();
}, 25);
}
);
})();
var ignoreTags = {
textarea: true,
input: true,
select: true,
button: true
};
var mouseevents = {
move: 'mousemove',
cancel: 'mouseup dragstart',
end: 'mouseup'
};
var touchevents = {
move: 'touchmove',
cancel: 'touchend',
end: 'touchend'
};
var rspaces = /\s+/;
// DOM Events
var eventOptions = { bubbles: true, cancelable: true };
var eventsSymbol = Symbol('events');
function createEvent(type) {
return new CustomEvent(type, eventOptions);
}
function getEvents(node) {
return node[eventsSymbol] || (node[eventsSymbol] = {});
}
function on(node, types, fn, data, selector) {
types = types.split(rspaces);
var events = getEvents(node);
var i = types.length;
var handlers, type;
function handler(e) { fn(e, data); }
while (i--) {
type = types[i];
handlers = events[type] || (events[type] = []);
handlers.push([fn, handler]);
node.addEventListener(type, handler);
}
}
function off(node, types, fn, selector) {
types = types.split(rspaces);
var events = getEvents(node);
var i = types.length;
var type, handlers, k;
if (!events) { return; }
while (i--) {
type = types[i];
handlers = events[type];
if (!handlers) { continue; }
k = handlers.length;
while (k--) {
if (handlers[k][0] === fn) {
node.removeEventListener(type, handlers[k][1]);
handlers.splice(k, 1);
}
}
}
}
function trigger(node, type, properties) {
// Don't cache events. It prevents you from triggering an event of a
// given type from inside the handler of another event of that type.
var event = createEvent(type);
if (properties) { assign(event, properties); }
node.dispatchEvent(event);
}
// Constructors
function Timer(fn){
var callback = fn,
active = false,
running = false;
function trigger(time) {
if (active){
callback();
requestFrame(trigger);
running = true;
active = false;
}
else {
running = false;
}
}
this.kick = function(fn) {
active = true;
if (!running) { trigger(); }
};
this.end = function(fn) {
var cb = callback;
if (!fn) { return; }
// If the timer is not running, simply call the end callback.
if (!running) {
fn();
}
// If the timer is running, and has been kicked lately, then
// queue up the current callback and the end callback, otherwise
// just the end callback.
else {
callback = active ?
function(){ cb(); fn(); } :
fn ;
active = true;
}
};
}
// Functions
function noop() {}
function preventDefault(e) {
e.preventDefault();
}
function isIgnoreTag(e) {
return !!ignoreTags[e.target.tagName.toLowerCase()];
}
function isPrimaryButton(e) {
// Ignore mousedowns on any button other than the left (or primary)
// mouse button, or when a modifier key is pressed.
return (e.which === 1 && !e.ctrlKey && !e.altKey);
}
function identifiedTouch(touchList, id) {
var i, l;
if (touchList.identifiedTouch) {
return touchList.identifiedTouch(id);
}
// touchList.identifiedTouch() does not exist in
// webkit yet… we must do the search ourselves...
i = -1;
l = touchList.length;
while (++i < l) {
if (touchList[i].identifier === id) {
return touchList[i];
}
}
}
function changedTouch(e, data) {
var touch = identifiedTouch(e.changedTouches, data.identifier);
// This isn't the touch you're looking for.
if (!touch) { return; }
// Chrome Android (at least) includes touches that have not
// changed in e.changedTouches. That's a bit annoying. Check
// that this touch has changed.
if (touch.pageX === data.pageX && touch.pageY === data.pageY) { return; }
return touch;
}
// Handlers that decide when the first movestart is triggered
function mousedown(e){
// Ignore non-primary buttons
if (!isPrimaryButton(e)) { return; }
// Ignore form and interactive elements
if (isIgnoreTag(e)) { return; }
on(document, mouseevents.move, mousemove, e);
on(document, mouseevents.cancel, mouseend, e);
}
function mousemove(e, data){
checkThreshold(e, data, e, removeMouse);
}
function mouseend(e, data) {
removeMouse();
}
function removeMouse() {
off(document, mouseevents.move, mousemove);
off(document, mouseevents.cancel, mouseend);
}
function touchstart(e) {
// Don't get in the way of interaction with form elements
if (ignoreTags[e.target.tagName.toLowerCase()]) { return; }
var touch = e.changedTouches[0];
// iOS live updates the touch objects whereas Android gives us copies.
// That means we can't trust the touchstart object to stay the same,
// so we must copy the data. This object acts as a template for
// movestart, move and moveend event objects.
var data = {
target: touch.target,
pageX: touch.pageX,
pageY: touch.pageY,
identifier: touch.identifier,
// The only way to make handlers individually unbindable is by
// making them unique.
touchmove: function(e, data) { touchmove(e, data); },
touchend: function(e, data) { touchend(e, data); }
};
on(document, touchevents.move, data.touchmove, data);
on(document, touchevents.cancel, data.touchend, data);
}
function touchmove(e, data) {
var touch = changedTouch(e, data);
if (!touch) { return; }
checkThreshold(e, data, touch, removeTouch);
}
function touchend(e, data) {
var touch = identifiedTouch(e.changedTouches, data.identifier);
if (!touch) { return; }
removeTouch(data);
}
function removeTouch(data) {
off(document, touchevents.move, data.touchmove);
off(document, touchevents.cancel, data.touchend);
}
function checkThreshold(e, data, touch, fn) {
var distX = touch.pageX - data.pageX;
var distY = touch.pageY - data.pageY;
// Do nothing if the threshold has not been crossed.
if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; }
triggerStart(e, data, touch, distX, distY, fn);
}
function triggerStart(e, data, touch, distX, distY, fn) {
var touches = e.targetTouches;
var time = e.timeStamp - data.timeStamp;
// Create a movestart object with some special properties that
// are passed only to the movestart handlers.
var template = {
altKey: e.altKey,
ctrlKey: e.ctrlKey,
shiftKey: e.shiftKey,
startX: data.pageX,
startY: data.pageY,
distX: distX,
distY: distY,
deltaX: distX,
deltaY: distY,
pageX: touch.pageX,
pageY: touch.pageY,
velocityX: distX / time,
velocityY: distY / time,
identifier: data.identifier,
targetTouches: touches,
finger: touches ? touches.length : 1,
enableMove: function() {
this.moveEnabled = true;
this.enableMove = noop;
e.preventDefault();
}
};
// Trigger the movestart event.
trigger(data.target, 'movestart', template);
// Unbind handlers that tracked the touch or mouse up till now.
fn(data);
}
// Handlers that control what happens following a movestart
function activeMousemove(e, data) {
var timer = data.timer;
data.touch = e;
data.timeStamp = e.timeStamp;
timer.kick();
}
function activeMouseend(e, data) {
var target = data.target;
var event = data.event;
var timer = data.timer;
removeActiveMouse();
endEvent(target, event, timer, function() {
// Unbind the click suppressor, waiting until after mouseup
// has been handled.
setTimeout(function(){
off(target, 'click', preventDefault);
}, 0);
});
}
function removeActiveMouse() {
off(document, mouseevents.move, activeMousemove);
off(document, mouseevents.end, activeMouseend);
}
function activeTouchmove(e, data) {
var event = data.event;
var timer = data.timer;
var touch = changedTouch(e, event);
if (!touch) { return; }
// Stop the interface from gesturing
e.preventDefault();
event.targetTouches = e.targetTouches;
data.touch = touch;
data.timeStamp = e.timeStamp;
timer.kick();
}
function activeTouchend(e, data) {
var target = data.target;
var event = data.event;
var timer = data.timer;
var touch = identifiedTouch(e.changedTouches, event.identifier);
// This isn't the touch you're looking for.
if (!touch) { return; }
removeActiveTouch(data);
endEvent(target, event, timer);
}
function removeActiveTouch(data) {
off(document, touchevents.move, data.activeTouchmove);
off(document, touchevents.end, data.activeTouchend);
}
// Logic for triggering move and moveend events
function updateEvent(event, touch, timeStamp) {
var time = timeStamp - event.timeStamp;
event.distX = touch.pageX - event.startX;
event.distY = touch.pageY - event.startY;
event.deltaX = touch.pageX - event.pageX;
event.deltaY = touch.pageY - event.pageY;
// Average the velocity of the last few events using a decay
// curve to even out spurious jumps in values.
event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;
event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;
event.pageX = touch.pageX;
event.pageY = touch.pageY;
}
function endEvent(target, event, timer, fn) {
timer.end(function(){
trigger(target, 'moveend', event);
return fn && fn();
});
}
// Set up the DOM
function movestart(e) {
if (e.defaultPrevented) { return; }
if (!e.moveEnabled) { return; }
var event = {
startX: e.startX,
startY: e.startY,
pageX: e.pageX,
pageY: e.pageY,
distX: e.distX,
distY: e.distY,
deltaX: e.deltaX,
deltaY: e.deltaY,
velocityX: e.velocityX,
velocityY: e.velocityY,
identifier: e.identifier,
targetTouches: e.targetTouches,
finger: e.finger
};
var data = {
target: e.target,
event: event,
timer: new Timer(update),
touch: undefined,
timeStamp: e.timeStamp
};
function update(time) {
updateEvent(event, data.touch, data.timeStamp);
trigger(data.target, 'move', event);
}
if (e.identifier === undefined) {
// We're dealing with a mouse event.
// Stop clicks from propagating during a move
on(e.target, 'click', preventDefault);
on(document, mouseevents.move, activeMousemove, data);
on(document, mouseevents.end, activeMouseend, data);
}
else {
// In order to unbind correct handlers they have to be unique
data.activeTouchmove = function(e, data) { activeTouchmove(e, data); };
data.activeTouchend = function(e, data) { activeTouchend(e, data); };
// We're dealing with a touch.
on(document, touchevents.move, data.activeTouchmove, data);
on(document, touchevents.end, data.activeTouchend, data);
}
}
on(document, 'mousedown', mousedown);
on(document, 'touchstart', touchstart);
on(document, 'movestart', movestart);
// jQuery special events
//
// jQuery event objects are copies of DOM event objects. They need
// a little help copying the move properties across.
if (!window.jQuery) { return; }
var properties = ("startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY").split(' ');
function enableMove1(e) { e.enableMove(); }
function enableMove2(e) { e.enableMove(); }
function enableMove3(e) { e.enableMove(); }
function add(handleObj) {
var handler = handleObj.handler;
handleObj.handler = function(e) {
// Copy move properties across from originalEvent
var i = properties.length;
var property;
while(i--) {
property = properties[i];
e[property] = e.originalEvent[property];
}
handler.apply(this, arguments);
};
}
jQuery.event.special.movestart = {
setup: function() {
// Movestart must be enabled to allow other move events
on(this, 'movestart', enableMove1);
// Do listen to DOM events
return false;
},
teardown: function() {
off(this, 'movestart', enableMove1);
return false;
},
add: add
};
jQuery.event.special.move = {
setup: function() {
on(this, 'movestart', enableMove2);
return false;
},
teardown: function() {
off(this, 'movestart', enableMove2);
return false;
},
add: add
};
jQuery.event.special.moveend = {
setup: function() {
on(this, 'movestart', enableMove3);
return false;
},
teardown: function() {
off(this, 'movestart', enableMove3);
return false;
},
add: add
};
});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,489 @@
/**
* jQuery.marquee - scrolling text like old marquee element
* @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin
*/;
(function($) {
$.fn.marquee = function(options) {
return this.each(function() {
// Extend the options if any provided
var o = $.extend({}, $.fn.marquee.defaults, options),
$this = $(this),
$marqueeWrapper, containerWidth, animationCss, verticalDir, elWidth,
loopCount = 3,
playState = 'animation-play-state',
css3AnimationIsSupported = false,
// Private methods
_prefixedEvent = function(element, type, callback) {
var pfx = ["webkit", "moz", "MS", "o", ""];
for (var p = 0; p < pfx.length; p++) {
if (!pfx[p]) type = type.toLowerCase();
element.addEventListener(pfx[p] + type, callback, false);
}
},
_objToString = function(obj) {
var tabjson = [];
for (var p in obj) {
if (obj.hasOwnProperty(p)) {
tabjson.push(p + ':' + obj[p]);
}
}
tabjson.push();
return '{' + tabjson.join(',') + '}';
},
_startAnimationWithDelay = function() {
$this.timer = setTimeout(animate, o.delayBeforeStart);
},
// Public methods
methods = {
pause: function() {
if (css3AnimationIsSupported && o.allowCss3Support) {
$marqueeWrapper.css(playState, 'paused');
} else {
// pause using pause plugin
if ($.fn.pause) {
$marqueeWrapper.pause();
}
}
// save the status
$this.data('runningStatus', 'paused');
// fire event
$this.trigger('paused');
},
resume: function() {
// resume using css3
if (css3AnimationIsSupported && o.allowCss3Support) {
$marqueeWrapper.css(playState, 'running');
} else {
// resume using pause plugin
if ($.fn.resume) {
$marqueeWrapper.resume();
}
}
// save the status
$this.data('runningStatus', 'resumed');
// fire event
$this.trigger('resumed');
},
toggle: function() {
methods[$this.data('runningStatus') === 'resumed' ? 'pause' : 'resume']();
},
destroy: function() {
// Clear timer
clearTimeout($this.timer);
// Unbind all events
$this.find("*").addBack().off();
// Just unwrap the elements that has been added using this plugin
$this.html($this.find('.js-marquee:first').html());
}
};
// Check for methods
if (typeof options === 'string') {
if ($.isFunction(methods[options])) {
// Following two IF statements to support public methods
if (!$marqueeWrapper) {
$marqueeWrapper = $this.find('.js-marquee-wrapper');
}
if ($this.data('css3AnimationIsSupported') === true) {
css3AnimationIsSupported = true;
}
methods[options]();
}
return;
}
/* Check if element has data attributes. They have top priority
For details https://twitter.com/aamirafridi/status/403848044069679104 - Can't find a better solution :/
jQuery 1.3.2 doesn't support $.data().KEY hence writting the following */
var dataAttributes = {},
attr;
$.each(o, function(key) {
// Check if element has this data attribute
attr = $this.attr('data-' + key);
if (typeof attr !== 'undefined') {
// Now check if value is boolean or not
switch (attr) {
case 'true':
attr = true;
break;
case 'false':
attr = false;
break;
}
o[key] = attr;
}
});
// Reintroduce speed as an option. It calculates duration as a factor of the container width
// measured in pixels per second.
if (o.speed) {
o.duration = parseInt($this.width(), 10) / o.speed * 1000;
}
// Shortcut to see if direction is upward or downward
verticalDir = o.direction === 'up' || o.direction === 'down';
// no gap if not duplicated
o.gap = o.duplicated ? parseInt(o.gap) : 0;
// wrap inner content into a div
$this.wrapInner('<div class="js-marquee"></div>');
// Make copy of the element
var $el = $this.find('.js-marquee').css({
'margin-right': o.gap,
'float': 'left'
});
if (o.duplicated) {
$el.clone(true).appendTo($this);
}
// wrap both inner elements into one div
$this.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>');
// Save the reference of the wrapper
$marqueeWrapper = $this.find('.js-marquee-wrapper');
// If direction is up or down, get the height of main element
if (verticalDir) {
var containerHeight = $this.height();
$marqueeWrapper.removeAttr('style');
$this.height(containerHeight);
// Change the CSS for js-marquee element
$this.find('.js-marquee').css({
'float': 'none',
'margin-bottom': o.gap,
'margin-right': 0
});
// Remove bottom margin from 2nd element if duplicated
if (o.duplicated) {
$this.find('.js-marquee:last').css({
'margin-bottom': 0
});
}
var elHeight = $this.find('.js-marquee:first').height() + o.gap;
// adjust the animation duration according to the text length
if (o.startVisible && !o.duplicated) {
// Compute the complete animation duration and save it for later reference
// formula is to: (Height of the text node + height of the main container / Height of the main container) * duration;
o._completeDuration = ((parseInt(elHeight, 10) + parseInt(containerHeight, 10)) / parseInt(containerHeight, 10)) * o.duration;
// formula is to: (Height of the text node / height of the main container) * duration
o.duration = (parseInt(elHeight, 10) / parseInt(containerHeight, 10)) * o.duration;
} else {
// formula is to: (Height of the text node + height of the main container / Height of the main container) * duration;
o.duration = ((parseInt(elHeight, 10) + parseInt(containerHeight, 10)) / parseInt(containerHeight, 10)) * o.duration;
}
} else {
// Save the width of the each element so we can use it in animation
elWidth = $this.find('.js-marquee:first').width() + o.gap;
// container width
containerWidth = $this.width();
// adjust the animation duration according to the text length
if (o.startVisible && !o.duplicated) {
// Compute the complete animation duration and save it for later reference
// formula is to: (Width of the text node + width of the main container / Width of the main container) * duration;
o._completeDuration = ((parseInt(elWidth, 10) + parseInt(containerWidth, 10)) / parseInt(containerWidth, 10)) * o.duration;
// (Width of the text node / width of the main container) * duration
o.duration = (parseInt(elWidth, 10) / parseInt(containerWidth, 10)) * o.duration;
} else {
// formula is to: (Width of the text node + width of the main container / Width of the main container) * duration;
o.duration = ((parseInt(elWidth, 10) + parseInt(containerWidth, 10)) / parseInt(containerWidth, 10)) * o.duration;
}
}
// if duplicated then reduce the duration
if (o.duplicated) {
o.duration = o.duration / 2;
}
if (o.allowCss3Support) {
var elm = document.body || document.createElement('div'),
animationName = 'marqueeAnimation-' + Math.floor(Math.random() * 10000000),
domPrefixes = 'Webkit Moz O ms Khtml'.split(' '),
animationString = 'animation',
animationCss3Str = '',
keyframeString = '';
// Check css3 support
if (elm.style.animation !== undefined) {
keyframeString = '@keyframes ' + animationName + ' ';
css3AnimationIsSupported = true;
}
if (css3AnimationIsSupported === false) {
for (var i = 0; i < domPrefixes.length; i++) {
if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
var prefix = '-' + domPrefixes[i].toLowerCase() + '-';
animationString = prefix + animationString;
playState = prefix + playState;
keyframeString = '@' + prefix + 'keyframes ' + animationName + ' ';
css3AnimationIsSupported = true;
break;
}
}
}
if (css3AnimationIsSupported) {
animationCss3Str = animationName + ' ' + o.duration / 1000 + 's ' + o.delayBeforeStart / 1000 + 's infinite ' + o.css3easing;
$this.data('css3AnimationIsSupported', true);
}
}
var _rePositionVertically = function() {
$marqueeWrapper.css('transform', 'translateY(' + (o.direction === 'up' ? containerHeight + 'px' : '-' + elHeight + 'px') + ')');
},
_rePositionHorizontally = function() {
$marqueeWrapper.css('transform', 'translateX(' + (o.direction === 'left' ? containerWidth + 'px' : '-' + elWidth + 'px') + ')');
};
// if duplicated option is set to true than position the wrapper
if (o.duplicated) {
if (verticalDir) {
if (o.startVisible) {
$marqueeWrapper.css('transform', 'translateY(0)');
} else {
$marqueeWrapper.css('transform', 'translateY(' + (o.direction === 'up' ? containerHeight + 'px' : '-' + ((elHeight * 2) - o.gap) + 'px') + ')');
}
} else {
if (o.startVisible) {
$marqueeWrapper.css('transform', 'translateX(0)');
} else {
$marqueeWrapper.css('transform', 'translateX(' + (o.direction === 'left' ? containerWidth + 'px' : '-' + ((elWidth * 2) - o.gap) + 'px') + ')');
}
}
// If the text starts out visible we can skip the two initial loops
if (!o.startVisible) {
loopCount = 1;
}
} else if (o.startVisible) {
// We only have two different loops if marquee is duplicated and starts visible
loopCount = 2;
} else {
if (verticalDir) {
_rePositionVertically();
} else {
_rePositionHorizontally();
}
}
// Animate recursive method
var animate = function() {
if (o.duplicated) {
// When duplicated, the first loop will be scroll longer so double the duration
if (loopCount === 1) {
o._originalDuration = o.duration;
if (verticalDir) {
o.duration = o.direction === 'up' ? o.duration + (containerHeight / ((elHeight) / o.duration)) : o.duration * 2;
} else {
o.duration = o.direction === 'left' ? o.duration + (containerWidth / ((elWidth) / o.duration)) : o.duration * 2;
}
// Adjust the css3 animation as well
if (animationCss3Str) {
animationCss3Str = animationName + ' ' + o.duration / 1000 + 's ' + o.delayBeforeStart / 1000 + 's ' + o.css3easing;
}
loopCount++;
}
// On 2nd loop things back to normal, normal duration for the rest of animations
else if (loopCount === 2) {
o.duration = o._originalDuration;
// Adjust the css3 animation as well
if (animationCss3Str) {
animationName = animationName + '0';
keyframeString = $.trim(keyframeString) + '0 ';
animationCss3Str = animationName + ' ' + o.duration / 1000 + 's 0s infinite ' + o.css3easing;
}
loopCount++;
}
}
if (verticalDir) {
if (o.duplicated) {
// Adjust the starting point of animation only when first loops finishes
if (loopCount > 2) {
$marqueeWrapper.css('transform', 'translateY(' + (o.direction === 'up' ? 0 : '-' + elHeight + 'px') + ')');
}
animationCss = {
'transform': 'translateY(' + (o.direction === 'up' ? '-' + elHeight + 'px' : 0) + ')'
};
} else if (o.startVisible) {
// This loop moves the marquee out of the container
if (loopCount === 2) {
// Adjust the css3 animation as well
if (animationCss3Str) {
animationCss3Str = animationName + ' ' + o.duration / 1000 + 's ' + o.delayBeforeStart / 1000 + 's ' + o.css3easing;
}
animationCss = {
'transform': 'translateY(' + (o.direction === 'up' ? '-' + elHeight + 'px' : containerHeight + 'px') + ')'
};
loopCount++;
} else if (loopCount === 3) {
// Set the duration for the animation that will run forever
o.duration = o._completeDuration;
// Adjust the css3 animation as well
if (animationCss3Str) {
animationName = animationName + '0';
keyframeString = $.trim(keyframeString) + '0 ';
animationCss3Str = animationName + ' ' + o.duration / 1000 + 's 0s infinite ' + o.css3easing;
}
_rePositionVertically();
}
} else {
_rePositionVertically();
animationCss = {
'transform': 'translateY(' + (o.direction === 'up' ? '-' + ($marqueeWrapper.height()) + 'px' : containerHeight + 'px') + ')'
};
}
} else {
if (o.duplicated) {
// Adjust the starting point of animation only when first loops finishes
if (loopCount > 2) {
$marqueeWrapper.css('transform', 'translateX(' + (o.direction === 'left' ? 0 : '-' + elWidth + 'px') + ')');
}
animationCss = {
'transform': 'translateX(' + (o.direction === 'left' ? '-' + elWidth + 'px' : 0) + ')'
};
} else if (o.startVisible) {
// This loop moves the marquee out of the container
if (loopCount === 2) {
// Adjust the css3 animation as well
if (animationCss3Str) {
animationCss3Str = animationName + ' ' + o.duration / 1000 + 's ' + o.delayBeforeStart / 1000 + 's ' + o.css3easing;
}
animationCss = {
'transform': 'translateX(' + (o.direction === 'left' ? '-' + elWidth + 'px' : containerWidth + 'px') + ')'
};
loopCount++;
} else if (loopCount === 3) {
// Set the duration for the animation that will run forever
o.duration = o._completeDuration;
// Adjust the css3 animation as well
if (animationCss3Str) {
animationName = animationName + '0';
keyframeString = $.trim(keyframeString) + '0 ';
animationCss3Str = animationName + ' ' + o.duration / 1000 + 's 0s infinite ' + o.css3easing;
}
_rePositionHorizontally();
}
} else {
_rePositionHorizontally();
animationCss = {
'transform': 'translateX(' + (o.direction === 'left' ? '-' + elWidth + 'px' : containerWidth + 'px') + ')'
};
}
}
// fire event
$this.trigger('beforeStarting');
// If css3 support is available than do it with css3, otherwise use jQuery as fallback
if (css3AnimationIsSupported) {
// Add css3 animation to the element
$marqueeWrapper.css(animationString, animationCss3Str);
var keyframeCss = keyframeString + ' { 100% ' + _objToString(animationCss) + '}',
$styles = $marqueeWrapper.find('style');
// Now add the keyframe animation to the marquee element
if ($styles.length !== 0) {
// Bug fixed for jQuery 1.3.x - Instead of using .last(), use following
$styles.filter(":last").html(keyframeCss);
} else {
$('head').append('<style>' + keyframeCss + '</style>');
}
// Animation iteration event
_prefixedEvent($marqueeWrapper[0], "AnimationIteration", function() {
$this.trigger('finished');
});
// Animation stopped
_prefixedEvent($marqueeWrapper[0], "AnimationEnd", function() {
animate();
$this.trigger('finished');
});
} else {
// Start animating
$marqueeWrapper.animate(animationCss, o.duration, o.easing, function() {
// fire event
$this.trigger('finished');
// animate again
if (o.pauseOnCycle) {
_startAnimationWithDelay();
} else {
animate();
}
});
}
// save the status
$this.data('runningStatus', 'resumed');
};
// bind pause and resume events
$this.on('pause', methods.pause);
$this.on('resume', methods.resume);
if (o.pauseOnHover) {
$this.on('mouseenter', methods.pause);
$this.on('mouseleave', methods.resume);
}
// If css3 animation is supported than call animate method at once
if (css3AnimationIsSupported && o.allowCss3Support) {
animate();
} else {
// Starts the recursive method
_startAnimationWithDelay();
}
});
}; // End of Plugin
// Public: plugin defaults options
$.fn.marquee.defaults = {
// If you wish to always animate using jQuery
allowCss3Support: true,
// works when allowCss3Support is set to true - for full list see http://www.w3.org/TR/2013/WD-css3-transitions-20131119/#transition-timing-function
css3easing: 'linear',
// requires jQuery easing plugin. Default is 'linear'
easing: 'linear',
// pause time before the next animation turn in milliseconds
delayBeforeStart: 1000,
// 'left', 'right', 'up' or 'down'
direction: 'left',
// true or false - should the marquee be duplicated to show an effect of continues flow
duplicated: false,
// duration in milliseconds of the marquee in milliseconds
duration: 5000,
// Speed allows you to set a relatively constant marquee speed regardless of the width of the containing element. Speed is measured in pixels per second.
speed: 0,
// gap in pixels between the tickers
gap: 20,
// on cycle pause the marquee
pauseOnCycle: false,
// on hover pause the marquee - using jQuery plugin https://github.com/tobia/Pause
pauseOnHover: false,
// the marquee is visible initially positioned next to the border towards it will be moving
startVisible: false
};
})(jQuery);
@@ -0,0 +1,38 @@
/**
* jQuery.marquee - scrolling text like old marquee element
* @author Aamir Afridi - aamirafridi(at)gmail(dot)com / http://aamirafridi.com/jquery/jquery-marquee-plugin
*/
(function($){$.fn.marquee=function(options){return this.each(function(){var o=$.extend({},$.fn.marquee.defaults,options),$this=$(this),$marqueeWrapper,containerWidth,animationCss,verticalDir,elWidth,loopCount=3,playState='animation-play-state',css3AnimationIsSupported=!1,_prefixedEvent=function(element,type,callback){var pfx=["webkit","moz","MS","o",""];for(var p=0;p<pfx.length;p++){if(!pfx[p])type=type.toLowerCase();element.addEventListener(pfx[p]+type,callback,!1)}},_objToString=function(obj){var tabjson=[];for(var p in obj){if(obj.hasOwnProperty(p)){tabjson.push(p+':'+obj[p])}}
tabjson.push();return'{'+tabjson.join(',')+'}'},_startAnimationWithDelay=function(){$this.timer=setTimeout(animate,o.delayBeforeStart)},methods={pause:function(){if(css3AnimationIsSupported&&o.allowCss3Support){$marqueeWrapper.css(playState,'paused')}else{if($.fn.pause){$marqueeWrapper.pause()}}
$this.data('runningStatus','paused');$this.trigger('paused')},resume:function(){if(css3AnimationIsSupported&&o.allowCss3Support){$marqueeWrapper.css(playState,'running')}else{if($.fn.resume){$marqueeWrapper.resume()}}
$this.data('runningStatus','resumed');$this.trigger('resumed')},toggle:function(){methods[$this.data('runningStatus')=='resumed'?'pause':'resume']()},destroy:function(){clearTimeout($this.timer);$this.find("*").addBack().off();$this.html($this.find('.js-marquee:first').html())}};if(typeof options==='string'){if($.isFunction(methods[options])){if(!$marqueeWrapper){$marqueeWrapper=$this.find('.js-marquee-wrapper')}
if($this.data('css3AnimationIsSupported')===!0){css3AnimationIsSupported=!0}
methods[options]()}
return}
var dataAttributes={},attr;$.each(o,function(key,value){attr=$this.attr('data-'+key);if(typeof attr!=='undefined'){switch(attr){case 'true':attr=!0;break;case 'false':attr=!1;break}
o[key]=attr}});if(o.speed){o.duration=parseInt($this.width(),10)/o.speed*1000}
verticalDir=o.direction=='up'||o.direction=='down';o.gap=o.duplicated?parseInt(o.gap):0;$this.wrapInner('<div class="js-marquee"></div>');var $el=$this.find('.js-marquee').css({'margin-right':o.gap,'float':'left'});if(o.duplicated){$el.clone(!0).appendTo($this)}
$this.wrapInner('<div style="width:100000px" class="js-marquee-wrapper"></div>');$marqueeWrapper=$this.find('.js-marquee-wrapper');if(verticalDir){var containerHeight=$this.height();$marqueeWrapper.removeAttr('style');$this.height(containerHeight);$this.find('.js-marquee').css({'float':'none','margin-bottom':o.gap,'margin-right':0});if(o.duplicated)$this.find('.js-marquee:last').css({'margin-bottom':0});var elHeight=$this.find('.js-marquee:first').height()+o.gap;if(o.startVisible&&!o.duplicated){o._completeDuration=((parseInt(elHeight,10)+parseInt(containerHeight,10))/parseInt(containerHeight,10))*o.duration;o.duration=(parseInt(elHeight,10)/parseInt(containerHeight,10))*o.duration}else{o.duration=((parseInt(elHeight,10)+parseInt(containerHeight,10))/parseInt(containerHeight,10))*o.duration}}else{elWidth=$this.find('.js-marquee:first').width()+o.gap;containerWidth=$this.width();if(o.startVisible&&!o.duplicated){o._completeDuration=((parseInt(elWidth,10)+parseInt(containerWidth,10))/parseInt(containerWidth,10))*o.duration;o.duration=(parseInt(elWidth,10)/parseInt(containerWidth,10))*o.duration}else{o.duration=((parseInt(elWidth,10)+parseInt(containerWidth,10))/parseInt(containerWidth,10))*o.duration}}
if(o.duplicated){o.duration=o.duration/2}
if(o.allowCss3Support){var
elm=document.body||document.createElement('div'),animationName='marqueeAnimation-'+Math.floor(Math.random()*10000000),domPrefixes='Webkit Moz O ms Khtml'.split(' '),animationString='animation',animationCss3Str='',keyframeString='';if(elm.style.animation!==undefined){keyframeString='@keyframes '+animationName+' ';css3AnimationIsSupported=!0}
if(css3AnimationIsSupported===!1){for(var i=0;i<domPrefixes.length;i++){if(elm.style[domPrefixes[i]+'AnimationName']!==undefined){var prefix='-'+domPrefixes[i].toLowerCase()+'-';animationString=prefix+animationString;playState=prefix+playState;keyframeString='@'+prefix+'keyframes '+animationName+' ';css3AnimationIsSupported=!0;break}}}
if(css3AnimationIsSupported){animationCss3Str=animationName+' '+o.duration/1000+'s '+o.delayBeforeStart/1000+'s infinite '+o.css3easing;$this.data('css3AnimationIsSupported',!0)}}
var _rePositionVertically=function(){$marqueeWrapper.css('transform','translateY('+(o.direction=='up'?containerHeight+'px':'-'+elHeight+'px')+')')},_rePositionHorizontally=function(){$marqueeWrapper.css('transform','translateX('+(o.direction=='left'?containerWidth+'px':'-'+elWidth+'px')+')')};if(o.duplicated){if(verticalDir){if(o.startVisible){$marqueeWrapper.css('transform','translateY(0)')}else{$marqueeWrapper.css('transform','translateY('+(o.direction=='up'?containerHeight+'px':'-'+((elHeight*2)-o.gap)+'px')+')')}}else{if(o.startVisible){$marqueeWrapper.css('transform','translateX(0)')}else{$marqueeWrapper.css('transform','translateX('+(o.direction=='left'?containerWidth+'px':'-'+((elWidth*2)-o.gap)+'px')+')')}}
if(!o.startVisible){loopCount=1}}else if(o.startVisible){loopCount=2}else{if(verticalDir){_rePositionVertically()}else{_rePositionHorizontally()}}
var animate=function(){if(o.duplicated){if(loopCount===1){o._originalDuration=o.duration;if(verticalDir){o.duration=o.direction=='up'?o.duration+(containerHeight/((elHeight)/o.duration)):o.duration*2}else{o.duration=o.direction=='left'?o.duration+(containerWidth/((elWidth)/o.duration)):o.duration*2}
if(animationCss3Str){animationCss3Str=animationName+' '+o.duration/1000+'s '+o.delayBeforeStart/1000+'s '+o.css3easing}
loopCount++}
else if(loopCount===2){o.duration=o._originalDuration;if(animationCss3Str){animationName=animationName+'0';keyframeString=$.trim(keyframeString)+'0 ';animationCss3Str=animationName+' '+o.duration/1000+'s 0s infinite '+o.css3easing}
loopCount++}}
if(verticalDir){if(o.duplicated){if(loopCount>2){$marqueeWrapper.css('transform','translateY('+(o.direction=='up'?0:'-'+elHeight+'px')+')')}
animationCss={'transform':'translateY('+(o.direction=='up'?'-'+elHeight+'px':0)+')'}}else if(o.startVisible){if(loopCount===2){if(animationCss3Str){animationCss3Str=animationName+' '+o.duration/1000+'s '+o.delayBeforeStart/1000+'s '+o.css3easing}
animationCss={'transform':'translateY('+(o.direction=='up'?'-'+elHeight+'px':containerHeight+'px')+')'};loopCount++}else if(loopCount===3){o.duration=o._completeDuration;if(animationCss3Str){animationName=animationName+'0';keyframeString=$.trim(keyframeString)+'0 ';animationCss3Str=animationName+' '+o.duration/1000+'s 0s infinite '+o.css3easing}
_rePositionVertically()}}else{_rePositionVertically();animationCss={'transform':'translateY('+(o.direction=='up'?'-'+($marqueeWrapper.height())+'px':containerHeight+'px')+')'}}}else{if(o.duplicated){if(loopCount>2){$marqueeWrapper.css('transform','translateX('+(o.direction=='left'?0:'-'+elWidth+'px')+')')}
animationCss={'transform':'translateX('+(o.direction=='left'?'-'+elWidth+'px':0)+')'}}else if(o.startVisible){if(loopCount===2){if(animationCss3Str){animationCss3Str=animationName+' '+o.duration/1000+'s '+o.delayBeforeStart/1000+'s '+o.css3easing}
animationCss={'transform':'translateX('+(o.direction=='left'?'-'+elWidth+'px':containerWidth+'px')+')'};loopCount++}else if(loopCount===3){o.duration=o._completeDuration;if(animationCss3Str){animationName=animationName+'0';keyframeString=$.trim(keyframeString)+'0 ';animationCss3Str=animationName+' '+o.duration/1000+'s 0s infinite '+o.css3easing}
_rePositionHorizontally()}}else{_rePositionHorizontally();animationCss={'transform':'translateX('+(o.direction=='left'?'-'+elWidth+'px':containerWidth+'px')+')'}}}
$this.trigger('beforeStarting');if(css3AnimationIsSupported){$marqueeWrapper.css(animationString,animationCss3Str);var keyframeCss=keyframeString+' { 100% '+_objToString(animationCss)+'}',$styles=$marqueeWrapper.find('style');if($styles.length!==0){$styles.filter(":last").html(keyframeCss)}else{$('head').append('<style>'+keyframeCss+'</style>')}
_prefixedEvent($marqueeWrapper[0],"AnimationIteration",function(){$this.trigger('finished')});_prefixedEvent($marqueeWrapper[0],"AnimationEnd",function(){animate();$this.trigger('finished')})}else{$marqueeWrapper.animate(animationCss,o.duration,o.easing,function(){$this.trigger('finished');if(o.pauseOnCycle){_startAnimationWithDelay()}else{animate()}})}
$this.data('runningStatus','resumed')};$this.on('pause',methods.pause);$this.on('resume',methods.resume);if(o.pauseOnHover){$this.on('mouseenter',methods.pause);$this.on('mouseleave',methods.resume)}
if(css3AnimationIsSupported&&o.allowCss3Support){animate()}else{_startAnimationWithDelay()}})};$.fn.marquee.defaults={allowCss3Support:!0,css3easing:'linear',easing:'linear',delayBeforeStart:1000,direction:'left',duplicated:!1,duration:5000,speed:0,gap:20,pauseOnCycle:!1,pauseOnHover:!1,startVisible:!1}})(jQuery);
@@ -0,0 +1,593 @@
/**
* Parallax.js
* @author Matthew Wagerfield - @wagerfield, René Roth - mail@reneroth.org
* @description Creates a parallax effect between an array of layers,
* driving the motion from the gyroscope output of a smartdevice.
* If no gyroscope is available, the cursor position is used.
*/
const rqAnFr = require('raf')
const objectAssign = require('object-assign')
const helpers = {
propertyCache: {},
vendors: [null, ['-webkit-','webkit'], ['-moz-','Moz'], ['-o-','O'], ['-ms-','ms']],
clamp(value, min, max) {
return min < max
? (value < min ? min : value > max ? max : value)
: (value < max ? max : value > min ? min : value)
},
data(element, name) {
return helpers.deserialize(element.getAttribute('data-'+name))
},
deserialize(value) {
if (value === 'true') {
return true
} else if (value === 'false') {
return false
} else if (value === 'null') {
return null
} else if (!isNaN(parseFloat(value)) && isFinite(value)) {
return parseFloat(value)
} else {
return value
}
},
camelCase(value) {
return value.replace(/-+(.)?/g, (match, character) => {
return character ? character.toUpperCase() : ''
})
},
accelerate(element) {
helpers.css(element, 'transform', 'translate3d(0,0,0) rotate(0.0001deg)')
helpers.css(element, 'transform-style', 'preserve-3d')
helpers.css(element, 'backface-visibility', 'hidden')
},
transformSupport(value) {
let element = document.createElement('div'),
propertySupport = false,
propertyValue = null,
featureSupport = false,
cssProperty = null,
jsProperty = null
for (let i = 0, l = helpers.vendors.length; i < l; i++) {
if (helpers.vendors[i] !== null) {
cssProperty = helpers.vendors[i][0] + 'transform'
jsProperty = helpers.vendors[i][1] + 'Transform'
} else {
cssProperty = 'transform'
jsProperty = 'transform'
}
if (element.style[jsProperty] !== undefined) {
propertySupport = true
break
}
}
switch(value) {
case '2D':
featureSupport = propertySupport
break
case '3D':
if (propertySupport) {
let body = document.body || document.createElement('body'),
documentElement = document.documentElement,
documentOverflow = documentElement.style.overflow,
isCreatedBody = false
if (!document.body) {
isCreatedBody = true
documentElement.style.overflow = 'hidden'
documentElement.appendChild(body)
body.style.overflow = 'hidden'
body.style.background = ''
}
body.appendChild(element)
element.style[jsProperty] = 'translate3d(1px,1px,1px)'
propertyValue = window.getComputedStyle(element).getPropertyValue(cssProperty)
featureSupport = propertyValue !== undefined && propertyValue.length > 0 && propertyValue !== 'none'
documentElement.style.overflow = documentOverflow
body.removeChild(element)
if ( isCreatedBody ) {
body.removeAttribute('style')
body.parentNode.removeChild(body)
}
}
break
}
return featureSupport
},
css(element, property, value) {
let jsProperty = helpers.propertyCache[property]
if (!jsProperty) {
for (let i = 0, l = helpers.vendors.length; i < l; i++) {
if (helpers.vendors[i] !== null) {
jsProperty = helpers.camelCase(helpers.vendors[i][1] + '-' + property)
} else {
jsProperty = property
}
if (element.style[jsProperty] !== undefined) {
helpers.propertyCache[property] = jsProperty
break
}
}
}
element.style[jsProperty] = value
}
}
const MAGIC_NUMBER = 30,
DEFAULTS = {
relativeInput: false,
clipRelativeInput: false,
inputElement: null,
hoverOnly: false,
calibrationThreshold: 100,
calibrationDelay: 500,
supportDelay: 500,
calibrateX: false,
calibrateY: true,
invertX: true,
invertY: true,
limitX: false,
limitY: false,
scalarX: 10.0,
scalarY: 10.0,
frictionX: 0.1,
frictionY: 0.1,
originX: 0.5,
originY: 0.5,
pointerEvents: false,
precision: 1,
onReady: null,
selector: null
}
class Parallax {
constructor(element, options) {
this.element = element
const data = {
calibrateX: helpers.data(this.element, 'calibrate-x'),
calibrateY: helpers.data(this.element, 'calibrate-y'),
invertX: helpers.data(this.element, 'invert-x'),
invertY: helpers.data(this.element, 'invert-y'),
limitX: helpers.data(this.element, 'limit-x'),
limitY: helpers.data(this.element, 'limit-y'),
scalarX: helpers.data(this.element, 'scalar-x'),
scalarY: helpers.data(this.element, 'scalar-y'),
frictionX: helpers.data(this.element, 'friction-x'),
frictionY: helpers.data(this.element, 'friction-y'),
originX: helpers.data(this.element, 'origin-x'),
originY: helpers.data(this.element, 'origin-y'),
pointerEvents: helpers.data(this.element, 'pointer-events'),
precision: helpers.data(this.element, 'precision'),
relativeInput: helpers.data(this.element, 'relative-input'),
clipRelativeInput: helpers.data(this.element, 'clip-relative-input'),
hoverOnly: helpers.data(this.element, 'hover-only'),
inputElement: document.querySelector(helpers.data(this.element, 'input-element')),
selector: helpers.data(this.element, 'selector')
}
for (let key in data) {
if (data[key] === null) {
delete data[key]
}
}
objectAssign(this, DEFAULTS, data, options)
if(!this.inputElement) {
this.inputElement = this.element
}
this.calibrationTimer = null
this.calibrationFlag = true
this.enabled = false
this.depthsX = []
this.depthsY = []
this.raf = null
this.bounds = null
this.elementPositionX = 0
this.elementPositionY = 0
this.elementWidth = 0
this.elementHeight = 0
this.elementCenterX = 0
this.elementCenterY = 0
this.elementRangeX = 0
this.elementRangeY = 0
this.calibrationX = 0
this.calibrationY = 0
this.inputX = 0
this.inputY = 0
this.motionX = 0
this.motionY = 0
this.velocityX = 0
this.velocityY = 0
this.onMouseMove = this.onMouseMove.bind(this)
this.onDeviceOrientation = this.onDeviceOrientation.bind(this)
this.onDeviceMotion = this.onDeviceMotion.bind(this)
this.onOrientationTimer = this.onOrientationTimer.bind(this)
this.onMotionTimer = this.onMotionTimer.bind(this)
this.onCalibrationTimer = this.onCalibrationTimer.bind(this)
this.onAnimationFrame = this.onAnimationFrame.bind(this)
this.onWindowResize = this.onWindowResize.bind(this)
this.windowWidth = null
this.windowHeight = null
this.windowCenterX = null
this.windowCenterY = null
this.windowRadiusX = null
this.windowRadiusY = null
this.portrait = false
this.desktop = !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i)
this.motionSupport = !!window.DeviceMotionEvent && !this.desktop
this.orientationSupport = !!window.DeviceOrientationEvent && !this.desktop
this.orientationStatus = 0
this.motionStatus = 0
this.initialise()
}
initialise() {
if (this.transform2DSupport === undefined) {
this.transform2DSupport = helpers.transformSupport('2D')
this.transform3DSupport = helpers.transformSupport('3D')
}
// Configure Context Styles
if (this.transform3DSupport) {
helpers.accelerate(this.element)
}
let style = window.getComputedStyle(this.element)
if (style.getPropertyValue('position') === 'static') {
this.element.style.position = 'relative'
}
// Pointer events
if(!this.pointerEvents) {
this.element.style.pointerEvents = 'none'
}
// Setup
this.updateLayers()
this.updateDimensions()
this.enable()
this.queueCalibration(this.calibrationDelay)
}
doReadyCallback() {
if(this.onReady) {
this.onReady()
}
}
updateLayers() {
if(this.selector) {
this.layers = this.element.querySelectorAll(this.selector)
} else {
this.layers = this.element.children
}
if(!this.layers.length) {
console.warn('ParallaxJS: Your scene does not have any layers.')
}
this.depthsX = []
this.depthsY = []
for (let index = 0; index < this.layers.length; index++) {
let layer = this.layers[index]
if (this.transform3DSupport) {
helpers.accelerate(layer)
}
layer.style.position = index ? 'absolute' : 'relative'
layer.style.display = 'block'
layer.style.left = 0
layer.style.top = 0
let depth = helpers.data(layer, 'depth') || 0
this.depthsX.push(helpers.data(layer, 'depth-x') || depth)
this.depthsY.push(helpers.data(layer, 'depth-y') || depth)
}
}
updateDimensions() {
this.windowWidth = window.innerWidth
this.windowHeight = window.innerHeight
this.windowCenterX = this.windowWidth * this.originX
this.windowCenterY = this.windowHeight * this.originY
this.windowRadiusX = Math.max(this.windowCenterX, this.windowWidth - this.windowCenterX)
this.windowRadiusY = Math.max(this.windowCenterY, this.windowHeight - this.windowCenterY)
}
updateBounds() {
this.bounds = this.inputElement.getBoundingClientRect()
this.elementPositionX = this.bounds.left
this.elementPositionY = this.bounds.top
this.elementWidth = this.bounds.width
this.elementHeight = this.bounds.height
this.elementCenterX = this.elementWidth * this.originX
this.elementCenterY = this.elementHeight * this.originY
this.elementRangeX = Math.max(this.elementCenterX, this.elementWidth - this.elementCenterX)
this.elementRangeY = Math.max(this.elementCenterY, this.elementHeight - this.elementCenterY)
}
queueCalibration(delay) {
clearTimeout(this.calibrationTimer)
this.calibrationTimer = setTimeout(this.onCalibrationTimer, delay)
}
enable() {
if (this.enabled) {
return
}
this.enabled = true
if (this.orientationSupport) {
this.portrait = false
window.addEventListener('deviceorientation', this.onDeviceOrientation)
this.detectionTimer = setTimeout(this.onOrientationTimer, this.supportDelay)
} else if (this.motionSupport) {
this.portrait = false
window.addEventListener('devicemotion', this.onDeviceMotion)
this.detectionTimer = setTimeout(this.onMotionTimer, this.supportDelay)
} else {
this.calibrationX = 0
this.calibrationY = 0
this.portrait = false
window.addEventListener('mousemove', this.onMouseMove)
this.doReadyCallback()
}
window.addEventListener('resize', this.onWindowResize)
this.raf = rqAnFr(this.onAnimationFrame)
}
disable() {
if (!this.enabled) {
return
}
this.enabled = false
if (this.orientationSupport) {
window.removeEventListener('deviceorientation', this.onDeviceOrientation)
} else if (this.motionSupport) {
window.removeEventListener('devicemotion', this.onDeviceMotion)
} else {
window.removeEventListener('mousemove', this.onMouseMove)
}
window.removeEventListener('resize', this.onWindowResize)
rqAnFr.cancel(this.raf)
}
calibrate(x, y) {
this.calibrateX = x === undefined ? this.calibrateX : x
this.calibrateY = y === undefined ? this.calibrateY : y
}
invert(x, y) {
this.invertX = x === undefined ? this.invertX : x
this.invertY = y === undefined ? this.invertY : y
}
friction(x, y) {
this.frictionX = x === undefined ? this.frictionX : x
this.frictionY = y === undefined ? this.frictionY : y
}
scalar(x, y) {
this.scalarX = x === undefined ? this.scalarX : x
this.scalarY = y === undefined ? this.scalarY : y
}
limit(x, y) {
this.limitX = x === undefined ? this.limitX : x
this.limitY = y === undefined ? this.limitY : y
}
origin(x, y) {
this.originX = x === undefined ? this.originX : x
this.originY = y === undefined ? this.originY : y
}
setInputElement(element) {
this.inputElement = element
this.updateDimensions()
}
setPosition(element, x, y) {
x = x.toFixed(this.precision) + 'px'
y = y.toFixed(this.precision) + 'px'
if (this.transform3DSupport) {
helpers.css(element, 'transform', 'translate3d(' + x + ',' + y + ',0)')
} else if (this.transform2DSupport) {
helpers.css(element, 'transform', 'translate(' + x + ',' + y + ')')
} else {
element.style.left = x
element.style.top = y
}
}
onOrientationTimer() {
if (this.orientationSupport && this.orientationStatus === 0) {
this.disable()
this.orientationSupport = false
this.enable()
} else {
this.doReadyCallback()
}
}
onMotionTimer() {
if (this.motionSupport && this.motionStatus === 0) {
this.disable()
this.motionSupport = false
this.enable()
} else {
this.doReadyCallback()
}
}
onCalibrationTimer() {
this.calibrationFlag = true
}
onWindowResize() {
this.updateDimensions()
}
onAnimationFrame() {
this.updateBounds()
let calibratedInputX = this.inputX - this.calibrationX,
calibratedInputY = this.inputY - this.calibrationY
if ((Math.abs(calibratedInputX) > this.calibrationThreshold) || (Math.abs(calibratedInputY) > this.calibrationThreshold)) {
this.queueCalibration(0)
}
if (this.portrait) {
this.motionX = this.calibrateX ? calibratedInputY : this.inputY
this.motionY = this.calibrateY ? calibratedInputX : this.inputX
} else {
this.motionX = this.calibrateX ? calibratedInputX : this.inputX
this.motionY = this.calibrateY ? calibratedInputY : this.inputY
}
this.motionX *= this.elementWidth * (this.scalarX / 100)
this.motionY *= this.elementHeight * (this.scalarY / 100)
if (!isNaN(parseFloat(this.limitX))) {
this.motionX = helpers.clamp(this.motionX, -this.limitX, this.limitX)
}
if (!isNaN(parseFloat(this.limitY))) {
this.motionY = helpers.clamp(this.motionY, -this.limitY, this.limitY)
}
this.velocityX += (this.motionX - this.velocityX) * this.frictionX
this.velocityY += (this.motionY - this.velocityY) * this.frictionY
for (let index = 0; index < this.layers.length; index++) {
let layer = this.layers[index],
depthX = this.depthsX[index],
depthY = this.depthsY[index],
xOffset = this.velocityX * (depthX * (this.invertX ? -1 : 1)),
yOffset = this.velocityY * (depthY * (this.invertY ? -1 : 1))
this.setPosition(layer, xOffset, yOffset)
}
this.raf = rqAnFr(this.onAnimationFrame)
}
rotate(beta, gamma){
// Extract Rotation
let x = (beta || 0) / MAGIC_NUMBER, // -90 :: 90
y = (gamma || 0) / MAGIC_NUMBER // -180 :: 180
// Detect Orientation Change
let portrait = this.windowHeight > this.windowWidth
if (this.portrait !== portrait) {
this.portrait = portrait
this.calibrationFlag = true
}
if (this.calibrationFlag) {
this.calibrationFlag = false
this.calibrationX = x
this.calibrationY = y
}
this.inputX = x
this.inputY = y
}
onDeviceOrientation(event) {
let beta = event.beta
let gamma = event.gamma
if (beta !== null && gamma !== null) {
this.orientationStatus = 1
this.rotate(beta, gamma)
}
}
onDeviceMotion(event) {
let beta = event.rotationRate.beta
let gamma = event.rotationRate.gamma
if (beta !== null && gamma !== null) {
this.motionStatus = 1
this.rotate(beta, gamma)
}
}
onMouseMove(event) {
let clientX = event.clientX,
clientY = event.clientY
// reset input to center if hoverOnly is set and we're not hovering the element
if(this.hoverOnly &&
((clientX < this.elementPositionX || clientX > this.elementPositionX + this.elementWidth) ||
(clientY < this.elementPositionY || clientY > this.elementPositionY + this.elementHeight))) {
this.inputX = 0
this.inputY = 0
return
}
if (this.relativeInput) {
// Clip mouse coordinates inside element bounds.
if (this.clipRelativeInput) {
clientX = Math.max(clientX, this.elementPositionX)
clientX = Math.min(clientX, this.elementPositionX + this.elementWidth)
clientY = Math.max(clientY, this.elementPositionY)
clientY = Math.min(clientY, this.elementPositionY + this.elementHeight)
}
// Calculate input relative to the element.
if(this.elementRangeX && this.elementRangeY) {
this.inputX = (clientX - this.elementPositionX - this.elementCenterX) / this.elementRangeX
this.inputY = (clientY - this.elementPositionY - this.elementCenterY) / this.elementRangeY
}
} else {
// Calculate input relative to the window.
if(this.windowRadiusX && this.windowRadiusY) {
this.inputX = (clientX - this.windowCenterX) / this.windowRadiusX
this.inputY = (clientY - this.windowCenterY) / this.windowRadiusY
}
}
}
destroy() {
this.disable()
clearTimeout(this.calibrationTimer)
clearTimeout(this.detectionTimer)
this.element.removeAttribute('style')
for (let index = 0; index < this.layers.length; index++) {
this.layers[index].removeAttribute('style')
}
delete this.element
delete this.layers
}
version() {
return '3.1.0'
}
}
module.exports = Parallax
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More