mystickymenu
Last commit date
css
6 years ago
fonts
7 years ago
images
6 years ago
js
6 years ago
languages
7 years ago
class-review-box.php
6 years ago
index.php
8 years ago
mystickymenu-affiliate.php
6 years ago
mystickymenu-fonts.php
6 years ago
mystickymenu.php
6 years ago
readme.txt
6 years ago
uninstall.php
7 years ago
welcome-bar.php
6 years ago
welcome-bar.php
1723 lines
| 1 | <?php |
| 2 | |
| 3 | function mysticky_welcome_bar_backend() { |
| 4 | $upgarde_url = admin_url("admin.php?page=my-stickymenu-upgrade"); |
| 5 | $nonce = wp_create_nonce('mysticky_option_welcomebar_update'); |
| 6 | $nonce_reset = wp_create_nonce('mysticky_option_welcomebar_reset'); |
| 7 | |
| 8 | $welcomebar = get_option( 'mysticky_option_welcomebar' ); |
| 9 | if ( $welcomebar == '' || empty($welcomebar)) { |
| 10 | $welcomebar = mysticky_welcomebar_pro_widget_default_fields(); |
| 11 | } |
| 12 | $mysticky_welcomebar_showx_desktop = $mysticky_welcomebar_showx_mobile = ''; |
| 13 | $mysticky_welcomebar_btn_desktop = $mysticky_welcomebar_btn_mobile = ''; |
| 14 | $mysticky_welcomebar_display_desktop = $mysticky_welcomebar_display_mobile = ''; |
| 15 | if( isset($welcomebar['mysticky_welcomebar_x_desktop']) ) { |
| 16 | $mysticky_welcomebar_showx_desktop = ' mysticky-welcomebar-showx-desktop'; |
| 17 | } |
| 18 | if( isset($welcomebar['mysticky_welcomebar_x_mobile']) ) { |
| 19 | $mysticky_welcomebar_showx_mobile = ' mysticky-welcomebar-showx-mobile'; |
| 20 | } |
| 21 | if( isset($welcomebar['mysticky_welcomebar_btn_desktop']) ) { |
| 22 | $mysticky_welcomebar_btn_desktop = ' mysticky-welcomebar-btn-desktop'; |
| 23 | } |
| 24 | if( isset($welcomebar['mysticky_welcomebar_btn_mobile']) ) { |
| 25 | $mysticky_welcomebar_btn_mobile = ' mysticky-welcomebar-btn-mobile'; |
| 26 | } |
| 27 | $display = ' mysticky-welcomebar-attention-'.$welcomebar['mysticky_welcomebar_attentionselect']; |
| 28 | $display_main_class = "mysticky-welcomebar-position-" . $welcomebar['mysticky_welcomebar_position'] . $mysticky_welcomebar_showx_desktop . $mysticky_welcomebar_showx_mobile . $mysticky_welcomebar_btn_desktop . $mysticky_welcomebar_btn_mobile . $display; |
| 29 | ?> |
| 30 | <form class="mysticky-welcomebar-form" id="mysticky_welcomebar_form" method="post" action="#"> |
| 31 | <div class="mysticky-welcomebar-header-title"> |
| 32 | <h3><?php _e('Welcome Bar', 'myStickymenu'); ?></h3> |
| 33 | <label for="mysticky-welcomebar-contact-form-enabled" class="mysticky-welcomebar-switch"> |
| 34 | <input type="checkbox" id="mysticky-welcomebar-contact-form-enabled" name="mysticky_option_welcomebar[mysticky_welcomebar_enable]" value="1" <?php checked( @$welcomebar['mysticky_welcomebar_enable'], '1' );?> /> |
| 35 | <span class="slider"></span> |
| 36 | </label> |
| 37 | </div> |
| 38 | <div class="mysticky-welcomebar-setting-wrap"> |
| 39 | <div class="mysticky-welcomebar-setting-left"> |
| 40 | <div class="mysticky-welcomebar-setting-block"> |
| 41 | <div class="mysticky-welcomebar-subheader-title"> |
| 42 | <h4><?php _e('Design', 'myStickymenu'); ?></h4> |
| 43 | </div> |
| 44 | <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-setting-position"> |
| 45 | <label><?php _e('Position', 'myStickymenu'); ?></label> |
| 46 | <div class="mysticky-welcomebar-setting-content-right"> |
| 47 | <label> |
| 48 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_position]" value= "top" type="radio" <?php checked( @$welcomebar['mysticky_welcomebar_position'], 'top' );?> /> |
| 49 | <?php _e("Top", 'mystickymenu'); ?> |
| 50 | </label> |
| 51 | <label> |
| 52 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_position]" value="bottom" type="radio" disabled /> |
| 53 | <?php _e("Bottom", 'mystickymenu'); ?> |
| 54 | </label> |
| 55 | <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span> |
| 56 | </div> |
| 57 | </div> |
| 58 | <div class="mysticky-welcomebar-setting-content"> |
| 59 | <label><?php _e('Height', 'myStickymenu'); ?></label> |
| 60 | <div class="mysticky-welcomebar-setting-content-right"> |
| 61 | <div class="px-wrap"> |
| 62 | <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_height" name="mysticky_option_welcomebar[mysticky_welcomebar_height]" value="60" disabled /> |
| 63 | <span class="input-px">PX</span> |
| 64 | </div> |
| 65 | <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span> |
| 66 | </div> |
| 67 | </div> |
| 68 | <div class="mysticky-welcomebar-setting-content"> |
| 69 | <label><?php _e('Background Color', 'myStickymenu'); ?></label> |
| 70 | <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker"> |
| 71 | <input type="text" id="mysticky_welcomebar_bgcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_bgcolor]" class="my-color-field" data-alpha="true" value="<?php echo $welcomebar['mysticky_welcomebar_bgcolor'];?>" /> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div class="mysticky-welcomebar-setting-content"> |
| 75 | <label><?php _e('Background Text Color', 'myStickymenu'); ?></label> |
| 76 | <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker"> |
| 77 | <input type="text" id="mysticky_welcomebar_bgtxtcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_bgtxtcolor]" class="my-color-field" data-alpha="true" value="<?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'];?>" /> |
| 78 | </div> |
| 79 | </div> |
| 80 | <div class="mysticky-welcomebar-setting-content"> |
| 81 | <label><?php _e('Font', 'myStickymenu'); ?></label> |
| 82 | <div class="mysticky-welcomebar-setting-content-right"> |
| 83 | <select name="mysticky_option_welcomebar[mysticky_welcomebar_font]" class="form-fonts"> |
| 84 | <option value=""><?php _e( 'Select font family', 'myStickymenu' );?></option> |
| 85 | <?php $group= ''; foreach( myStickymenu_fonts() as $key=>$value): |
| 86 | if ($value != $group){ |
| 87 | echo '<optgroup label="' . $value . '">'; |
| 88 | $group = $value; |
| 89 | } |
| 90 | ?> |
| 91 | <option value="<?php echo esc_attr($key);?>" <?php selected( @$welcomebar['mysticky_welcomebar_font'], $key ); ?>><?php echo esc_html($key);?></option> |
| 92 | <?php endforeach;?> |
| 93 | </select> |
| 94 | </div> |
| 95 | </div> |
| 96 | <div class="mysticky-welcomebar-setting-content"> |
| 97 | <label><?php _e('Font Size', 'myStickymenu'); ?></label> |
| 98 | <div class="mysticky-welcomebar-setting-content-right"> |
| 99 | <div class="px-wrap"> |
| 100 | <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_fontsize" name="mysticky_option_welcomebar[mysticky_welcomebar_fontsize]" value="<?php echo @$welcomebar['mysticky_welcomebar_fontsize'];?>" /> |
| 101 | <span class="input-px">PX</span> |
| 102 | </div> |
| 103 | </div> |
| 104 | </div> |
| 105 | <div class="mysticky-welcomebar-setting-content"> |
| 106 | <label><?php _e('Bar Text', 'myStickymenu'); ?></label> |
| 107 | <div class="mysticky-welcomebar-setting-content-right"> |
| 108 | <?php |
| 109 | $settings = array( |
| 110 | 'media_buttons' => false, |
| 111 | 'textarea_name' => 'mysticky_option_welcomebar[mysticky_welcomebar_bar_text]', |
| 112 | 'tinymce' => false, |
| 113 | 'quicktags' => array( |
| 114 | 'buttons' => 'strong,em,link' |
| 115 | ) |
| 116 | ); |
| 117 | wp_editor( stripslashes($welcomebar['mysticky_welcomebar_bar_text']), 'mysticky_bar_text', $settings ); |
| 118 | // add more buttons to the html editor |
| 119 | function underline_tag_add_quicktags() { |
| 120 | if ( wp_script_is('quicktags') ){ ?> |
| 121 | <script type="text/javascript"> |
| 122 | QTags.addButton( 'underline_tag', 'U', '<u>', '</u>', 'underline', 'underline', 20, '' ); |
| 123 | </script> |
| 124 | <?php |
| 125 | } |
| 126 | } |
| 127 | add_action( 'admin_print_footer_scripts', 'underline_tag_add_quicktags' ); |
| 128 | ?> |
| 129 | <!--<textarea id="mysticky_bar_text" class="mystickyinput" name="mysticky_option_welcomebar[mysticky_welcomebar_bar_text]" rows="4" style="display: none;"><?php echo stripslashes($welcomebar['mysticky_welcomebar_bar_text']);?> </textarea>--> |
| 130 | </div> |
| 131 | </div> |
| 132 | <div class="mysticky-welcomebar-setting-content"> |
| 133 | <label><?php _e('Show X', 'myStickymenu'); ?></label> |
| 134 | <div class="mysticky-welcomebar-setting-content-right"> |
| 135 | <label> |
| 136 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_x_desktop]" value= "desktop" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_x_desktop'], 'desktop' );?> /> |
| 137 | <?php _e( 'Desktop', 'mystickymenu' );?> |
| 138 | </label> |
| 139 | <label> |
| 140 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_x_mobile]" value= "mobile" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_x_mobile'], 'mobile' );?> /> |
| 141 | <?php _e( 'Mobile', 'mystickymenu' );?> |
| 142 | </label> |
| 143 | </div> |
| 144 | </div> |
| 145 | </div> |
| 146 | <div class="mysticky-welcomebar-setting-block"> |
| 147 | <div class="mysticky-welcomebar-subheader-title"> |
| 148 | <h4><?php _e('Button', 'myStickymenu'); ?></h4> |
| 149 | </div> |
| 150 | <div class="mysticky-welcomebar-setting-content"> |
| 151 | <label><?php _e('Button', 'myStickymenu'); ?></label> |
| 152 | <div class="mysticky-welcomebar-setting-content-right"> |
| 153 | <label> |
| 154 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_btn_desktop]" value= "desktop" type="checkbox" <?php checked( @$welcomebar['mysticky_welcomebar_btn_desktop'], 'desktop' );?> /> |
| 155 | <?php _e( 'Desktop', 'mystickymenu' );?> |
| 156 | </label> |
| 157 | <label> |
| 158 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_btn_mobile]" value= "mobile" type="checkbox"<?php checked( @$welcomebar['mysticky_welcomebar_btn_mobile'], 'mobile' );?> /> |
| 159 | <?php _e( 'Mobile', 'mystickymenu' );?> |
| 160 | </label> |
| 161 | </div> |
| 162 | </div> |
| 163 | <div class="mysticky-welcomebar-setting-content"> |
| 164 | <label><?php _e('Button Color', 'myStickymenu'); ?></label> |
| 165 | <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker mysticky_welcomebar_btn_color"> |
| 166 | <input type="text" id="mysticky_welcomebar_btncolor" name="mysticky_option_welcomebar[mysticky_welcomebar_btncolor]" class="my-color-field" data-alpha="true" value="<?php echo esc_attr($welcomebar['mysticky_welcomebar_btncolor']);?>" /> |
| 167 | </div> |
| 168 | </div> |
| 169 | <div class="mysticky-welcomebar-setting-content"> |
| 170 | <label><?php _e('Button Text Color', 'myStickymenu'); ?></label> |
| 171 | <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-colorpicker mysticky_welcomebar_btn_color"> |
| 172 | <input type="text" id="mysticky_welcomebar_btntxtcolor" name="mysticky_option_welcomebar[mysticky_welcomebar_btntxtcolor]" class="my-color-field" data-alpha="true" value="<?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'];?>" /> |
| 173 | </div> |
| 174 | </div> |
| 175 | <div class="mysticky-welcomebar-setting-content"> |
| 176 | <label><?php _e('Button Text', 'myStickymenu'); ?></label> |
| 177 | <div class="mysticky-welcomebar-setting-content-right"> |
| 178 | <input type="text" id="mysticky_welcomebar_btn_text" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_btn_text]" value="<?php echo $welcomebar['mysticky_welcomebar_btn_text'];?>" /> |
| 179 | </div> |
| 180 | </div> |
| 181 | <!-- --> |
| 182 | <div class="mysticky-welcomebar-setting-content"> |
| 183 | <label><?php _e('Attention Effect', 'myStickymenu'); ?></label> |
| 184 | <div class="mysticky-welcomebar-setting-content-right"> |
| 185 | <div class="mysticky-welcomebar-setting-attention"> |
| 186 | <select name="mysticky_option_welcomebar[mysticky_welcomebar_attentionselect]" class="mysticky-welcomebar-attention mysticky_welcomebar_disable"> |
| 187 | <option value="default" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], ' ' ); ?>><?php _e( 'None', 'myStickymenu' );?></option> |
| 188 | <option value="flash" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'flash' ); ?>><?php _e( 'Flash', 'myStickymenu' );?></option> |
| 189 | <option value="shake" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'shake' ); ?>><?php _e( 'Shake', 'myStickymenu' );?></option> |
| 190 | <option value="swing" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'swing' ); ?>><?php _e( 'Swing', 'myStickymenu' );?></option> |
| 191 | <option value="tada" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'tada' ); ?>><?php _e( 'Tada', 'myStickymenu' );?></option> |
| 192 | <option value="heartbeat" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'heartbeat' ); ?>><?php _e( 'Heartbeat', 'myStickymenu' );?></option> |
| 193 | <option value="wobble" <?php selected( @$welcomebar['mysticky_welcomebar_attentionselect'], 'wobble' ); ?>><?php _e( 'Wobble', 'myStickymenu' );?></option> |
| 194 | </select> |
| 195 | </div> |
| 196 | </div> |
| 197 | </div> |
| 198 | <!-- --> |
| 199 | <div class="mysticky-welcomebar-setting-content"> |
| 200 | <label><?php _e('Button Submission', 'myStickymenu'); ?></label> |
| 201 | <div class="mysticky-welcomebar-setting-content-right mysticky-welcomebar-setting-redirect-wrap"> |
| 202 | <div class="mysticky-welcomebar-setting-action"> |
| 203 | <select name="mysticky_option_welcomebar[mysticky_welcomebar_actionselect]" class="mysticky-welcomebar-action mysticky_welcomebar_disable"> |
| 204 | <option value="redirect_to_url" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'redirect_to_url' ); ?>><?php _e( 'Redirect to URL', 'myStickymenu' );?></option> |
| 205 | <option value="close_bar" <?php selected( @$welcomebar['mysticky_welcomebar_actionselect'], 'close_bar' ); ?>><?php _e( 'Close bar', 'myStickymenu' );?></option> |
| 206 | <option value="thankyou_screen" data-href="<?php echo esc_url($upgarde_url); ?>"><?php _e( 'Thank you screen (Upgrade Now)', 'myStickymenu' );?></option> |
| 207 | </select> |
| 208 | </div> |
| 209 | <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-redirect" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?> > |
| 210 | <input type="text" id="mysticky_welcomebar_redirect" class="mystickyinput mysticky_welcomebar_disable" name="mysticky_option_welcomebar[mysticky_welcomebar_redirect]" value="<?php echo esc_url($welcomebar['mysticky_welcomebar_redirect']);?>" placeholder="<?php echo esc_url("https://www.yourdomain.com"); ?>" /> |
| 211 | </div> |
| 212 | <div class="mysticky-welcomebar-setting-newtab mysticky-welcomebar-redirect" <?php if ( $welcomebar['mysticky_welcomebar_actionselect'] == 'close_bar' ) : ?> style="display:none;" <?php endif;?> > |
| 213 | <label> |
| 214 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_redirect_newtab]" value= "1" type="checkbox" disabled /> |
| 215 | <?php _e( 'Open in a new tab', 'mystickymenu' );?> |
| 216 | </label> |
| 217 | <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span> |
| 218 | </div> |
| 219 | </div> |
| 220 | </div> |
| 221 | <!-- --> |
| 222 | <div class="mysticky-welcomebar-setting-content"> |
| 223 | <label><?php _e('After Submission', 'myStickymenu'); ?></label> |
| 224 | <div class="mysticky-welcomebar-setting-content-right"> |
| 225 | <div class="mysticky-welcomebar-setting-action"> |
| 226 | <select name="mysticky_option_welcomebar[mysticky_welcomebar_aftersubmission]" class="mysticky-welcomebar-aftersubmission mysticky_welcomebar_disable"> |
| 227 | <option value="dont_show_welcomebar" <?php selected( @$welcomebar['mysticky_welcomebar_aftersubmission'], 'dont_show_welcomebar' ); ?>><?php _e( "Don't show the Welcome Bar", 'myStickymenu' );?></option> |
| 228 | <option value="show_welcomebar_next_visit" <?php selected( @$welcomebar['mysticky_welcomebar_aftersubmission'], 'show_welcomebar_next_visit' ); ?>><?php _e( 'Show the Welcome Bar in the next visit', 'myStickymenu' );?></option> |
| 229 | <option value="show_welcomebar_every_page" <?php selected( @$welcomebar['mysticky_welcomebar_aftersubmission'], 'show_welcomebar_every_page' ); ?> ><?php _e( 'Show the Welcome Bar on every page', 'myStickymenu' );?></option> |
| 230 | </select> |
| 231 | </div> |
| 232 | </div> |
| 233 | </div> |
| 234 | |
| 235 | <div class="mysticky-welcomebar-setting-content mysticky-welcomebar-setting-remove-getbar"> |
| 236 | <label><?php _e('Remove myStickymenu Credit', 'myStickymenu'); ?></label> |
| 237 | <div class="mysticky-welcomebar-setting-content-right"> |
| 238 | <div class="mysticky-welcomebar-switch"> |
| 239 | <input type="checkbox" id="mysticky-welcomebar-remove-getbar" name="mysticky_option_welcomebar[mysticky_welcomebar_remove_getbar]" value="1" disabled /> |
| 240 | <span class="slider"></span> |
| 241 | </div> |
| 242 | <span class="myStickymenu-upgrade"><a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( 'Upgrade Now', 'mystickymenu' );?></a></span> |
| 243 | </div> |
| 244 | </div> |
| 245 | </div> |
| 246 | <div class="mysticky-welcomebar-setting-block"> |
| 247 | <div class="mysticky-welcomebar-subheader-title"> |
| 248 | <h4><?php _e('Display Rules', 'myStickymenu'); ?></h4> |
| 249 | </div> |
| 250 | <div class="mysticky-welcomebar-upgrade-main mysticky_device_upgrade"> |
| 251 | <span class="myStickymenu-upgrade"> |
| 252 | <a class="sticky-header-upgrade-now" href="<?php echo esc_url($upgarde_url); ?>" target="_blank"><?php _e( ' Upgrade Now', 'mystickymenu' );?></a> |
| 253 | </span> |
| 254 | <div class="mysticky-welcomebar-setting-content"> |
| 255 | <label><?php _e('Devices', 'myStickymenu'); ?></label> |
| 256 | <div class="mysticky-welcomebar-setting-content-right"> |
| 257 | <label> |
| 258 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_device_desktop]" value= "desktop" type="checkbox" checked disabled /> |
| 259 | <?php _e( 'Desktop', 'mystickymenu' );?> |
| 260 | </label> |
| 261 | <label> |
| 262 | <input name="mysticky_option_welcomebar[mysticky_welcomebar_device_mobile]" value= "mobile" type="checkbox" checked disabled /> |
| 263 | <?php _e( 'Mobile', 'mystickymenu' );?> |
| 264 | </label> |
| 265 | </div> |
| 266 | </div> |
| 267 | <div class="mysticky-welcomebar-setting-content"> |
| 268 | <label><?php _e('Trigger', 'myStickymenu'); ?></label> |
| 269 | <div class="mysticky-welcomebar-setting-content-right"> |
| 270 | <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-trigger-wrap"> |
| 271 | <label> |
| 272 | <input type="radio" name="mysticky_option_welcomebar[mysticky_welcomebar_trigger]" value="after_a_few_seconds" checked disabled /> <?php _e( 'After a few seconds', 'myStickymenu' );?> |
| 273 | </label> |
| 274 | <label> |
| 275 | <input type="radio" name="mysticky_option_welcomebar[mysticky_welcomebar_trigger]" value="after_scroll" disabled /> <?php _e( 'After Scroll', 'myStickymenu' );?> |
| 276 | </label> |
| 277 | </div> |
| 278 | <div class="mysticky-welcomebar-setting-action mysticky-welcomebar-triggersec"> |
| 279 | <div class="px-wrap"> |
| 280 | <input type="number" class="" min="0" step="1" id="mysticky_welcomebar_triggersec" name="mysticky_option_welcomebar[mysticky_welcomebar_triggersec]" value="0" disabled /> |
| 281 | <span class="input-px"><?php echo ( isset($welcomebar['mysticky_welcomebar_trigger']) && $welcomebar['mysticky_welcomebar_trigger'] == 'after_scroll' ) ? '%' : 'Sec'; ?></span> |
| 282 | </div> |
| 283 | </div> |
| 284 | </div> |
| 285 | </div> |
| 286 | <div class="mysticky-welcomebar-setting-content"> |
| 287 | <label><?php _e('Expiry date', 'myStickymenu'); ?></label> |
| 288 | <div class="mysticky-welcomebar-setting-content-right"> |
| 289 | <div class="mysticky-welcomebar-expirydate"> |
| 290 | <input type="text" id="mysticky_welcomebar_expirydate" name="mysticky_option_welcomebar[mysticky_welcomebar_expirydate]" placeholder="<?php _e('No expiry date', 'myStickymenu'); ?>" value="" disabled /> |
| 291 | <span class="dashicons dashicons-calendar-alt"></span> |
| 292 | </div> |
| 293 | </div> |
| 294 | </div> |
| 295 | <div class="mysticky-welcomebar-setting-content show-on-apper"> |
| 296 | <label><?php _e('Page targeting', 'myStickymenu'); ?></label> |
| 297 | <div class="mysticky-welcomebar-setting-content-right"> |
| 298 | <a href="javascript:void(0);" class="create-rule" id="create-rule"><?php esc_html_e( "Add Rule", "mystickyelements" );?></a> |
| 299 | </div> |
| 300 | <div class="mysticky-welcomebar-page-options-html" style="display: none"> |
| 301 | <div class="mysticky-welcomebar-page-option"> |
| 302 | <div class="url-content"> |
| 303 | <div class="mysticky-welcomebar-url-select"> |
| 304 | <select name="mysticky_option_welcomebar[page_settings][__count__][shown_on]" id="url_shown_on___count___option" disabled> |
| 305 | <option value="show_on"><?php esc_html_e("Show on", "mysticky" );?></option> |
| 306 | <option value="not_show_on"><?php esc_html_e("Don't show on", "mysticky" );?></option> |
| 307 | </select> |
| 308 | </div> |
| 309 | <div class="mysticky-welcomebar-url-option"> |
| 310 | <select class="mysticky-welcomebar-url-options" name="mysticky_option_welcomebar[page_settings][__count__][option]" id="url_rules___count___option" disabled> |
| 311 | <option selected="selected" disabled value=""><?php esc_html_e("Select Rule", "mysticky" );?></option> |
| 312 | </select> |
| 313 | </div> |
| 314 | <div class="mysticky-welcomebar-url-box"> |
| 315 | <span class='mysticky-welcomebar-url'><?php echo site_url("/"); ?></span> |
| 316 | </div> |
| 317 | <div class="mysticky-welcomebar-url-values"> |
| 318 | <input type="text" value="" name="mysticky_option_welcomebar[page_settings][__count__][value]" id="url_rules___count___value" disabled /> |
| 319 | </div> |
| 320 | <div class="clear"></div> |
| 321 | </div> |
| 322 | </div> |
| 323 | </div> |
| 324 | <div class="mysticky-welcomebar-page-options mysticky-welcomebar-setting-content-right" id="mysticky-welcomebar-page-options" style="display:none"></div> |
| 325 | </div> |
| 326 | </div> |
| 327 | </div> |
| 328 | </div> |
| 329 | <div class="mysticky-welcomebar-setting-right"> |
| 330 | <div class="mysticky-welcomebar-header-title"> |
| 331 | <h3><?php _e('Preview', 'mystickyelements'); ?></h3> |
| 332 | </div> |
| 333 | <div class="mysticky-welcomebar-preview-screen"> |
| 334 | <link href="https://fonts.googleapis.com/css?family=<?php echo $welcomebar['mysticky_welcomebar_font'] ?>:400,600,700|Lato:400,500,600,700" rel="stylesheet" type="text/css" class="sfba-google-font"> |
| 335 | <div class="mysticky-welcomebar-fixed mysticky-welcomebar-display-desktop <?php echo $display_main_class; ?>" > |
| 336 | <div class="mysticky-welcomebar-content"> |
| 337 | <?php echo wpautop(isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase");?> |
| 338 | </div> |
| 339 | <div class="mysticky-welcomebar-btn"> |
| 340 | <a href="#" ><?php echo isset($welcomebar['mysticky_welcomebar_btn_text']) ? $welcomebar['mysticky_welcomebar_btn_text'] : "Got it!";?></a> |
| 341 | </div> |
| 342 | <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a> |
| 343 | <a href="#" class="mysticky-welcomebar-getbar"><?php _e( 'myStickymenu', 'mystickymenu' );?></a> |
| 344 | </div> |
| 345 | </div> |
| 346 | </div> |
| 347 | </div> |
| 348 | <div class="mysticky-welcomebar-submit"> |
| 349 | <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e('Save', 'mystickymenu');?>"> |
| 350 | </div> |
| 351 | <input type="hidden" name="nonce" value="<?php echo $nonce; ?>"> |
| 352 | <input type="hidden" name="active_tab_element" value="1"> |
| 353 | <input type="hidden" id="save_welcome_bar" name="save_welcome_bar" value=""> |
| 354 | |
| 355 | </form> |
| 356 | <form class="mysticky-welcomebar-form-reset" method="post" action="#"> |
| 357 | <div class="mysticky-welcomebar-submit"> |
| 358 | <input type="submit" name="mysticky_welcomebar_reset" id="reset" class="button button-secondary" value="<?php _e('Reset', 'mystickymenu');?>"> |
| 359 | </div> |
| 360 | <input type="hidden" name="nonce_reset" value="<?php echo $nonce_reset; ?>"> |
| 361 | <input type="hidden" name="active_tab_element" value="1"> |
| 362 | </form> |
| 363 | <div id="mysticky-welcomebar-save-confirm" style="display:none;" title="<?php esc_attr_e( 'myStickymenu is currently off', 'mystickymenu' ); ?>"> |
| 364 | <p> |
| 365 | <?php _e('Your Welcome Bar is currently turned off, would you like to save and show it on your site?', 'mystickymenu' ); ?> |
| 366 | </p> |
| 367 | </div> |
| 368 | <script> |
| 369 | jQuery(".mysticky-welcomebar-fixed").on( |
| 370 | "animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd", |
| 371 | function() { |
| 372 | jQuery(this).removeClass("animation-start"); |
| 373 | } |
| 374 | ); |
| 375 | jQuery(document).ready(function() { |
| 376 | var container = jQuery(".mysticky-welcomebar-fixed"); |
| 377 | var refreshId = setInterval(function() { |
| 378 | container.addClass("animation-start"); |
| 379 | }, 3500); |
| 380 | }); |
| 381 | </script> |
| 382 | <style> |
| 383 | .mysticky-welcomebar-fixed { |
| 384 | min-height: 80px; |
| 385 | background-color: <?php echo $welcomebar['mysticky_welcomebar_bgcolor'] ?>; |
| 386 | font-family: <?php echo $welcomebar['mysticky_welcomebar_font'] ?>; |
| 387 | position: absolute; |
| 388 | left: 0; |
| 389 | right: 0; |
| 390 | display: none; |
| 391 | align-items: center; |
| 392 | justify-content: center; |
| 393 | padding: 20px 30px 20px 10px; |
| 394 | z-index: 9999999; |
| 395 | } |
| 396 | .mysticky-welcomebar-preview-mobile-screen .mysticky-welcomebar-fixed{ |
| 397 | padding: 0 25px; |
| 398 | } |
| 399 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-fixed { |
| 400 | display: flex; |
| 401 | } |
| 402 | .mysticky-welcomebar-position-top { |
| 403 | top:0; |
| 404 | } |
| 405 | .mysticky-welcomebar-position-bottom { |
| 406 | bottom:0; |
| 407 | } |
| 408 | .mysticky-welcomebar-fixed .mysticky-welcomebar-content p a, |
| 409 | .mysticky-welcomebar-fixed .mysticky-welcomebar-content p { |
| 410 | color: <?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'] ?>; |
| 411 | font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px; |
| 412 | font-family: inherit; |
| 413 | margin: 0; |
| 414 | padding: 0; |
| 415 | line-height: 1.2; |
| 416 | font-weight: 400; |
| 417 | } |
| 418 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn { |
| 419 | padding-left: 30px; |
| 420 | display: none; |
| 421 | } |
| 422 | .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn { |
| 423 | display: block; |
| 424 | } |
| 425 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a { |
| 426 | background-color: <?php echo $welcomebar['mysticky_welcomebar_btncolor'] ?>; |
| 427 | font-family: inherit; |
| 428 | color: <?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'] ?>; |
| 429 | border-radius: 4px; |
| 430 | text-decoration: none; |
| 431 | display: inline-block; |
| 432 | vertical-align: top; |
| 433 | line-height: 1.2; |
| 434 | font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px; |
| 435 | font-weight: 400; |
| 436 | padding: 5px 20px; |
| 437 | white-space: nowrap; |
| 438 | } |
| 439 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a:hover { |
| 440 | /*opacity: 0.7;*/ |
| 441 | -moz-box-shadow: 1px 2px 4px rgba(0, 0, 0,0.5); |
| 442 | -webkit-box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5); |
| 443 | box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5); |
| 444 | } |
| 445 | .mysticky-welcomebar-fixed .mysticky-welcomebar-close { |
| 446 | display: none; |
| 447 | vertical-align: top; |
| 448 | width: 20px; |
| 449 | height: 20px; |
| 450 | text-align: center; |
| 451 | text-decoration: none; |
| 452 | line-height: 20px; |
| 453 | border-radius: 5px; |
| 454 | color: #000; |
| 455 | position: absolute; |
| 456 | font-family: Lato; |
| 457 | top: 5px; |
| 458 | right: 5px; |
| 459 | text-shadow: 0 0 0px #fff; |
| 460 | -webkit-transition: all 0.5s ease 0s; |
| 461 | -moz-transition: all 0.5s ease 0s; |
| 462 | transition: all 0.5s ease 0s; |
| 463 | -webkit-transform-origin: 50% 50%; |
| 464 | -moz-transform-origin: 50% 50%; |
| 465 | transform-origin: 50% 50%; |
| 466 | } |
| 467 | .mysticky-welcomebar-fixed .mysticky-welcomebar-close:hover { |
| 468 | opacity: 1; |
| 469 | -webkit-transform: rotate(180deg); |
| 470 | -moz-transform: rotate(180deg); |
| 471 | transform: rotate(180deg); |
| 472 | } |
| 473 | .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close { |
| 474 | display: inline-block; |
| 475 | } |
| 476 | .mysticky-welcomebar-getbar:focus, |
| 477 | .mysticky-welcomebar-getbar:active, |
| 478 | .mysticky-welcomebar-getbar { |
| 479 | background-color: rgba(140,140,140,0.5) !important; |
| 480 | border-radius: 8px !important; |
| 481 | color: #FFFFFF !important; |
| 482 | position: absolute !important; |
| 483 | padding: 3px !important; |
| 484 | bottom: 3px !important; |
| 485 | left: 3px !important; |
| 486 | font-size: 10px !important; |
| 487 | line-height: 1.4 !important; |
| 488 | margin: 0 !important; |
| 489 | display: inline-block !important; |
| 490 | vertical-align: top !important; |
| 491 | font-family: Poppins !important; |
| 492 | text-decoration: none !important; |
| 493 | visibility: visible !important; |
| 494 | } |
| 495 | .mysticky-welcomebar-getbar:hover { |
| 496 | color: #000000 !important; |
| 497 | opacity: 0.5 !important; |
| 498 | } |
| 499 | |
| 500 | @media only screen and (max-width: 1024px) { |
| 501 | .mysticky-welcomebar-fixed { |
| 502 | padding: 0 20px 0 10px; |
| 503 | } |
| 504 | .mysticky-welcomebar-fixed .mysticky-welcomebar-close { |
| 505 | width: 20px; |
| 506 | height: 20px; |
| 507 | line-height: 20px; |
| 508 | right: 0px; |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | /* Animated Buttons */ |
| 513 | .mysticky-welcomebar-btn a { |
| 514 | -webkit-animation-duration: 1s; |
| 515 | animation-duration: 1s; |
| 516 | } |
| 517 | @-webkit-keyframes flash { |
| 518 | from, |
| 519 | 50%, |
| 520 | to { |
| 521 | opacity: 1; |
| 522 | } |
| 523 | |
| 524 | 25%, |
| 525 | 75% { |
| 526 | opacity: 0; |
| 527 | } |
| 528 | } |
| 529 | @keyframes flash { |
| 530 | from, |
| 531 | 50%, |
| 532 | to { |
| 533 | opacity: 1; |
| 534 | } |
| 535 | |
| 536 | 25%, |
| 537 | 75% { |
| 538 | opacity: 0; |
| 539 | } |
| 540 | } |
| 541 | .mysticky-welcomebar-attention-flash.animation-start .mysticky-welcomebar-btn a { |
| 542 | -webkit-animation-name: flash; |
| 543 | animation-name: flash; |
| 544 | } |
| 545 | |
| 546 | @keyframes shake { |
| 547 | from, |
| 548 | to { |
| 549 | -webkit-transform: translate3d(0, 0, 0); |
| 550 | transform: translate3d(0, 0, 0); |
| 551 | } |
| 552 | |
| 553 | 10%, |
| 554 | 30%, |
| 555 | 50%, |
| 556 | 70%, |
| 557 | 90% { |
| 558 | -webkit-transform: translate3d(-10px, 0, 0); |
| 559 | transform: translate3d(-10px, 0, 0); |
| 560 | } |
| 561 | |
| 562 | 20%, |
| 563 | 40%, |
| 564 | 60%, |
| 565 | 80% { |
| 566 | -webkit-transform: translate3d(10px, 0, 0); |
| 567 | transform: translate3d(10px, 0, 0); |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | .mysticky-welcomebar-attention-shake.animation-start .mysticky-welcomebar-btn a { |
| 572 | -webkit-animation-name: shake; |
| 573 | animation-name: shake; |
| 574 | } |
| 575 | |
| 576 | @-webkit-keyframes swing { |
| 577 | 20% { |
| 578 | -webkit-transform: rotate3d(0, 0, 1, 15deg); |
| 579 | transform: rotate3d(0, 0, 1, 15deg); |
| 580 | } |
| 581 | |
| 582 | 40% { |
| 583 | -webkit-transform: rotate3d(0, 0, 1, -10deg); |
| 584 | transform: rotate3d(0, 0, 1, -10deg); |
| 585 | } |
| 586 | |
| 587 | 60% { |
| 588 | -webkit-transform: rotate3d(0, 0, 1, 5deg); |
| 589 | transform: rotate3d(0, 0, 1, 5deg); |
| 590 | } |
| 591 | |
| 592 | 80% { |
| 593 | -webkit-transform: rotate3d(0, 0, 1, -5deg); |
| 594 | transform: rotate3d(0, 0, 1, -5deg); |
| 595 | } |
| 596 | |
| 597 | to { |
| 598 | -webkit-transform: rotate3d(0, 0, 1, 0deg); |
| 599 | transform: rotate3d(0, 0, 1, 0deg); |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | @keyframes swing { |
| 604 | 20% { |
| 605 | -webkit-transform: rotate3d(0, 0, 1, 15deg); |
| 606 | transform: rotate3d(0, 0, 1, 15deg); |
| 607 | } |
| 608 | |
| 609 | 40% { |
| 610 | -webkit-transform: rotate3d(0, 0, 1, -10deg); |
| 611 | transform: rotate3d(0, 0, 1, -10deg); |
| 612 | } |
| 613 | |
| 614 | 60% { |
| 615 | -webkit-transform: rotate3d(0, 0, 1, 5deg); |
| 616 | transform: rotate3d(0, 0, 1, 5deg); |
| 617 | } |
| 618 | |
| 619 | 80% { |
| 620 | -webkit-transform: rotate3d(0, 0, 1, -5deg); |
| 621 | transform: rotate3d(0, 0, 1, -5deg); |
| 622 | } |
| 623 | |
| 624 | to { |
| 625 | -webkit-transform: rotate3d(0, 0, 1, 0deg); |
| 626 | transform: rotate3d(0, 0, 1, 0deg); |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | .mysticky-welcomebar-attention-swing.animation-start .mysticky-welcomebar-btn a { |
| 631 | -webkit-transform-origin: top center; |
| 632 | transform-origin: top center; |
| 633 | -webkit-animation-name: swing; |
| 634 | animation-name: swing; |
| 635 | } |
| 636 | |
| 637 | @-webkit-keyframes tada { |
| 638 | from { |
| 639 | -webkit-transform: scale3d(1, 1, 1); |
| 640 | transform: scale3d(1, 1, 1); |
| 641 | } |
| 642 | |
| 643 | 10%, |
| 644 | 20% { |
| 645 | -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); |
| 646 | transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); |
| 647 | } |
| 648 | |
| 649 | 30%, |
| 650 | 50%, |
| 651 | 70%, |
| 652 | 90% { |
| 653 | -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
| 654 | transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
| 655 | } |
| 656 | |
| 657 | 40%, |
| 658 | 60%, |
| 659 | 80% { |
| 660 | -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); |
| 661 | transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); |
| 662 | } |
| 663 | |
| 664 | to { |
| 665 | -webkit-transform: scale3d(1, 1, 1); |
| 666 | transform: scale3d(1, 1, 1); |
| 667 | } |
| 668 | } |
| 669 | |
| 670 | @keyframes tada { |
| 671 | from { |
| 672 | -webkit-transform: scale3d(1, 1, 1); |
| 673 | transform: scale3d(1, 1, 1); |
| 674 | } |
| 675 | |
| 676 | 10%, |
| 677 | 20% { |
| 678 | -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); |
| 679 | transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); |
| 680 | } |
| 681 | |
| 682 | 30%, |
| 683 | 50%, |
| 684 | 70%, |
| 685 | 90% { |
| 686 | -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
| 687 | transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
| 688 | } |
| 689 | |
| 690 | 40%, |
| 691 | 60%, |
| 692 | 80% { |
| 693 | -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); |
| 694 | transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); |
| 695 | } |
| 696 | |
| 697 | to { |
| 698 | -webkit-transform: scale3d(1, 1, 1); |
| 699 | transform: scale3d(1, 1, 1); |
| 700 | } |
| 701 | } |
| 702 | |
| 703 | .mysticky-welcomebar-attention-tada.animation-start .mysticky-welcomebar-btn a { |
| 704 | -webkit-animation-name: tada; |
| 705 | animation-name: tada; |
| 706 | } |
| 707 | |
| 708 | @-webkit-keyframes heartBeat { |
| 709 | 0% { |
| 710 | -webkit-transform: scale(1); |
| 711 | transform: scale(1); |
| 712 | } |
| 713 | |
| 714 | 14% { |
| 715 | -webkit-transform: scale(1.3); |
| 716 | transform: scale(1.3); |
| 717 | } |
| 718 | |
| 719 | 28% { |
| 720 | -webkit-transform: scale(1); |
| 721 | transform: scale(1); |
| 722 | } |
| 723 | |
| 724 | 42% { |
| 725 | -webkit-transform: scale(1.3); |
| 726 | transform: scale(1.3); |
| 727 | } |
| 728 | |
| 729 | 70% { |
| 730 | -webkit-transform: scale(1); |
| 731 | transform: scale(1); |
| 732 | } |
| 733 | } |
| 734 | |
| 735 | @keyframes heartBeat { |
| 736 | 0% { |
| 737 | -webkit-transform: scale(1); |
| 738 | transform: scale(1); |
| 739 | } |
| 740 | |
| 741 | 14% { |
| 742 | -webkit-transform: scale(1.3); |
| 743 | transform: scale(1.3); |
| 744 | } |
| 745 | |
| 746 | 28% { |
| 747 | -webkit-transform: scale(1); |
| 748 | transform: scale(1); |
| 749 | } |
| 750 | |
| 751 | 42% { |
| 752 | -webkit-transform: scale(1.3); |
| 753 | transform: scale(1.3); |
| 754 | } |
| 755 | |
| 756 | 70% { |
| 757 | -webkit-transform: scale(1); |
| 758 | transform: scale(1); |
| 759 | } |
| 760 | } |
| 761 | |
| 762 | .mysticky-welcomebar-attention-heartbeat.animation-start .mysticky-welcomebar-btn a { |
| 763 | -webkit-animation-name: heartBeat; |
| 764 | animation-name: heartBeat; |
| 765 | -webkit-animation-duration: 1.3s; |
| 766 | animation-duration: 1.3s; |
| 767 | -webkit-animation-timing-function: ease-in-out; |
| 768 | animation-timing-function: ease-in-out; |
| 769 | } |
| 770 | |
| 771 | @-webkit-keyframes wobble { |
| 772 | from { |
| 773 | -webkit-transform: translate3d(0, 0, 0); |
| 774 | transform: translate3d(0, 0, 0); |
| 775 | } |
| 776 | |
| 777 | 15% { |
| 778 | -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); |
| 779 | transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); |
| 780 | } |
| 781 | |
| 782 | 30% { |
| 783 | -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); |
| 784 | transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); |
| 785 | } |
| 786 | |
| 787 | 45% { |
| 788 | -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); |
| 789 | transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); |
| 790 | } |
| 791 | |
| 792 | 60% { |
| 793 | -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); |
| 794 | transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); |
| 795 | } |
| 796 | |
| 797 | 75% { |
| 798 | -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); |
| 799 | transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); |
| 800 | } |
| 801 | |
| 802 | to { |
| 803 | -webkit-transform: translate3d(0, 0, 0); |
| 804 | transform: translate3d(0, 0, 0); |
| 805 | } |
| 806 | } |
| 807 | |
| 808 | @keyframes wobble { |
| 809 | from { |
| 810 | -webkit-transform: translate3d(0, 0, 0); |
| 811 | transform: translate3d(0, 0, 0); |
| 812 | } |
| 813 | |
| 814 | 15% { |
| 815 | -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); |
| 816 | transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); |
| 817 | } |
| 818 | |
| 819 | 30% { |
| 820 | -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); |
| 821 | transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); |
| 822 | } |
| 823 | |
| 824 | 45% { |
| 825 | -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); |
| 826 | transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); |
| 827 | } |
| 828 | |
| 829 | 60% { |
| 830 | -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); |
| 831 | transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); |
| 832 | } |
| 833 | |
| 834 | 75% { |
| 835 | -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); |
| 836 | transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); |
| 837 | } |
| 838 | |
| 839 | to { |
| 840 | -webkit-transform: translate3d(0, 0, 0); |
| 841 | transform: translate3d(0, 0, 0); |
| 842 | } |
| 843 | } |
| 844 | |
| 845 | .mysticky-welcomebar-attention-wobble.animation-start .mysticky-welcomebar-btn a { |
| 846 | -webkit-animation-name: wobble; |
| 847 | animation-name: wobble; |
| 848 | } |
| 849 | </style> |
| 850 | |
| 851 | <?php |
| 852 | } |
| 853 | |
| 854 | function mysticky_welcomebar_pro_widget_default_fields() { |
| 855 | return array( |
| 856 | 'mysticky_welcomebar_position' => 'top', |
| 857 | 'mysticky_welcomebar_height' => '60', |
| 858 | 'mysticky_welcomebar_bgcolor' => '#03ed96', |
| 859 | 'mysticky_welcomebar_bgtxtcolor' => '#000000', |
| 860 | 'mysticky_welcomebar_font' => 'Poppins', |
| 861 | 'mysticky_welcomebar_fontsize' => '16', |
| 862 | 'mysticky_welcomebar_bar_text' => 'Get 30% off your first purchase', |
| 863 | 'mysticky_welcomebar_x_desktop' => 'desktop', |
| 864 | 'mysticky_welcomebar_x_mobile' => 'mobile', |
| 865 | 'mysticky_welcomebar_btn_desktop' => 'desktop', |
| 866 | 'mysticky_welcomebar_btn_mobile' => 'mobile', |
| 867 | 'mysticky_welcomebar_btncolor' => '#000000', |
| 868 | 'mysticky_welcomebar_btntxtcolor' => '#ffffff', |
| 869 | 'mysticky_welcomebar_btn_text' => 'Got it!', |
| 870 | 'mysticky_welcomebar_actionselect' => 'close_bar', |
| 871 | 'mysticky_welcomebar_aftersubmission' => 'dont_show_welcomebar', |
| 872 | 'mysticky_welcomebar_redirect' => 'https://www.yourdomain.com', |
| 873 | 'mysticky_welcomebar_redirect_newtab' => '', |
| 874 | 'mysticky_welcomebar_device_desktop' => 'desktop', |
| 875 | 'mysticky_welcomebar_device_mobile' => 'mobile', |
| 876 | 'mysticky_welcomebar_trigger' => 'after_a_few_seconds', |
| 877 | 'mysticky_welcomebar_triggersec' => '0', |
| 878 | 'mysticky_welcomebar_expirydate' => '', |
| 879 | 'mysticky_welcomebar_page_settings' => '', |
| 880 | ); |
| 881 | } |
| 882 | |
| 883 | function mysticky_welcome_bar_frontend(){ |
| 884 | $welcomebar = get_option( 'mysticky_option_welcomebar' ); |
| 885 | |
| 886 | if ( ( isset($welcomebar['mysticky_welcomebar_expirydate']) && $welcomebar['mysticky_welcomebar_expirydate'] !='' && strtotime( date('m/d/Y')) > strtotime($welcomebar['mysticky_welcomebar_expirydate']) ) || !isset($welcomebar['mysticky_welcomebar_enable'] ) ) { |
| 887 | return; |
| 888 | } |
| 889 | $mysticky_welcomebar_showx_desktop = $mysticky_welcomebar_showx_mobile = ''; |
| 890 | $mysticky_welcomebar_btn_desktop = $mysticky_welcomebar_btn_mobile = ''; |
| 891 | $mysticky_welcomebar_display_desktop = $mysticky_welcomebar_display_mobile = ''; |
| 892 | if( isset($welcomebar['mysticky_welcomebar_x_desktop']) ) { |
| 893 | $mysticky_welcomebar_showx_desktop = ' mysticky-welcomebar-showx-desktop'; |
| 894 | } |
| 895 | if( isset($welcomebar['mysticky_welcomebar_x_mobile']) ) { |
| 896 | $mysticky_welcomebar_showx_mobile = ' mysticky-welcomebar-showx-mobile'; |
| 897 | } |
| 898 | if( isset($welcomebar['mysticky_welcomebar_btn_desktop']) ) { |
| 899 | $mysticky_welcomebar_btn_desktop = ' mysticky-welcomebar-btn-desktop'; |
| 900 | } |
| 901 | if( isset($welcomebar['mysticky_welcomebar_btn_mobile']) ) { |
| 902 | $mysticky_welcomebar_btn_mobile = ' mysticky-welcomebar-btn-mobile'; |
| 903 | } |
| 904 | $display = ' mysticky-welcomebar-attention-'.$welcomebar['mysticky_welcomebar_attentionselect']; |
| 905 | $mysticky_welcomebar_display_desktop = ' mysticky-welcomebar-display-desktop'; |
| 906 | $mysticky_welcomebar_display_mobile = ' mysticky-welcomebar-display-mobile'; |
| 907 | |
| 908 | $display_main_class = "mysticky-welcomebar-position-" . $welcomebar['mysticky_welcomebar_position'] . $mysticky_welcomebar_showx_desktop . $mysticky_welcomebar_showx_mobile . $mysticky_welcomebar_btn_desktop . $mysticky_welcomebar_btn_mobile . $mysticky_welcomebar_display_desktop . $mysticky_welcomebar_display_mobile .$display; |
| 909 | |
| 910 | if( isset($welcomebar['mysticky_welcomebar_actionselect']) ) { |
| 911 | if( $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' ) { |
| 912 | $mysticky_welcomebar_actionselect_url = esc_url( $welcomebar['mysticky_welcomebar_redirect'] ); |
| 913 | } else { |
| 914 | $mysticky_welcomebar_actionselect_url = 'javascript:void(0)'; |
| 915 | } |
| 916 | } |
| 917 | if( isset($welcomebar['mysticky_welcomebar_enable']) ) { |
| 918 | if ( $welcomebar['mysticky_welcomebar_position'] == 'top' ) { |
| 919 | $welcomebar_enable_block = "top: -60px"; |
| 920 | } else { |
| 921 | $welcomebar_enable_block = "bottom: -60px"; |
| 922 | } |
| 923 | } |
| 924 | |
| 925 | ?> |
| 926 | <div class="mysticky-welcomebar-fixed <?php echo $display_main_class; ?>" style="<?php echo $welcomebar_enable_block; ?>" data-after-triger="after_a_few_seconds" data-triger-sec="0" data-position="<?php echo esc_attr($welcomebar['mysticky_welcomebar_position']);?>" data-height="<?php echo esc_attr($welcomebar['mysticky_welcomebar_height']);?>" data-rediect="<?php echo esc_attr($welcomebar['mysticky_welcomebar_actionselect']);?>" data-aftersubmission="<?php echo esc_attr($welcomebar['mysticky_welcomebar_aftersubmission']);?>"> |
| 927 | <div class="mysticky-welcomebar-content"> |
| 928 | <?php echo wpautop( isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase" );?> |
| 929 | </div> |
| 930 | <div class="mysticky-welcomebar-btn"> |
| 931 | <a href="<?php echo $mysticky_welcomebar_actionselect_url; ?>" <?php if( isset($welcomebar['mysticky_welcomebar_redirect_newtab']) && $welcomebar['mysticky_welcomebar_actionselect'] == 'redirect_to_url' && $welcomebar['mysticky_welcomebar_redirect_newtab']== 1):?> target="_blank" <?php endif;?>><?php echo isset($welcomebar['mysticky_welcomebar_btn_text'])?$welcomebar['mysticky_welcomebar_btn_text']:"Got it!";?></a> |
| 932 | </div> |
| 933 | <a href="javascript:void(0)" class="mysticky-welcomebar-close">X</a> |
| 934 | <a href="https://premio.io/downloads/mystickymenu/?utm_source=credit&domain=<?php echo $_SERVER['HTTP_HOST']; ?>" class="mysticky-welcomebar-getbar" target="_blank" rel="noopener"><?php _e( 'myStickymenu', 'mystickymenu' );?></a> |
| 935 | </div> |
| 936 | <script> |
| 937 | |
| 938 | jQuery(document).ready(function($){ |
| 939 | var mysticky_welcomebar_height = jQuery( '.mysticky-welcomebar-fixed' ).innerHeight(); |
| 940 | if( jQuery( '.mysticky-welcomebar-fixed' ).data('position') == 'top' ) { |
| 941 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' ); |
| 942 | } else { |
| 943 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' ); |
| 944 | } |
| 945 | var welcombar_aftersubmission = $( '.mysticky-welcomebar-fixed' ).data('aftersubmission'); |
| 946 | if( welcombar_aftersubmission == 'dont_show_welcomebar' ){ |
| 947 | var welcomebar_storage = localStorage.getItem("welcomebar_close"); |
| 948 | } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) { |
| 949 | var welcomebar_storage = sessionStorage.getItem("welcomebar_close"); |
| 950 | } else { |
| 951 | sessionStorage.removeItem('welcomebar_close'); |
| 952 | localStorage.removeItem('welcomebar_close'); |
| 953 | var welcomebar_storage = null; |
| 954 | } |
| 955 | if ( welcomebar_storage === null ){ |
| 956 | |
| 957 | var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger'); |
| 958 | |
| 959 | if ( after_trigger == 'after_a_few_seconds' ) { |
| 960 | if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) { |
| 961 | if ( $( window ).width() > 767 ) { |
| 962 | var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000; |
| 963 | var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position'); |
| 964 | var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height'); |
| 965 | setTimeout(function(){ |
| 966 | jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' ); |
| 967 | if ( welcombar_position == 'top' ) { |
| 968 | jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' ); |
| 969 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' ); |
| 970 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 971 | $( 'html' ).css( 'margin-bottom', '' ); |
| 972 | $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' ); |
| 973 | $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' ); |
| 974 | } else { |
| 975 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' ); |
| 976 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 977 | $( 'html' ).css( 'margin-top', '' ); |
| 978 | $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' ); |
| 979 | } |
| 980 | }, trigger_sec ); |
| 981 | } |
| 982 | } |
| 983 | } |
| 984 | if ( $( window ).width() < 767 ) { |
| 985 | if ( after_trigger == 'after_a_few_seconds' ) { |
| 986 | if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) { |
| 987 | var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000; |
| 988 | var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position'); |
| 989 | var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height'); |
| 990 | setTimeout(function(){ |
| 991 | jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' ); |
| 992 | if ( welcombar_position == 'top' ) { |
| 993 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' ); |
| 994 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 995 | $( 'html' ).css( 'margin-bottom', '' ); |
| 996 | $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' ); |
| 997 | $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' ); |
| 998 | } else { |
| 999 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' ); |
| 1000 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1001 | $( 'html' ).css( 'margin-top', '' ); |
| 1002 | $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1003 | } |
| 1004 | }, trigger_sec ); |
| 1005 | } |
| 1006 | } |
| 1007 | } |
| 1008 | mystickyelements_present(); |
| 1009 | } |
| 1010 | $( window ).resize( function(){ |
| 1011 | if( welcombar_aftersubmission == 'dont_show_welcomebar' ){ |
| 1012 | var welcomebar_storage = localStorage.getItem("welcomebar_close"); |
| 1013 | } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) { |
| 1014 | var welcomebar_storage = sessionStorage.getItem("welcomebar_close"); |
| 1015 | } else { |
| 1016 | sessionStorage.removeItem('welcomebar_close'); |
| 1017 | localStorage.removeItem('welcomebar_close'); |
| 1018 | var welcomebar_storage = null; |
| 1019 | } |
| 1020 | if ( welcomebar_storage === null ){ |
| 1021 | var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger'); |
| 1022 | if ( after_trigger == 'after_a_few_seconds' ) { |
| 1023 | var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000; |
| 1024 | var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position'); |
| 1025 | var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height'); |
| 1026 | if ( $( window ).width() < 767 ) { |
| 1027 | if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) { |
| 1028 | setTimeout(function(){ |
| 1029 | jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' ); |
| 1030 | if ( welcombar_position == 'top' ) { |
| 1031 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' ); |
| 1032 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1033 | $( 'html' ).css( 'margin-bottom', '' ); |
| 1034 | $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1035 | $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' ); |
| 1036 | } else { |
| 1037 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' ); |
| 1038 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1039 | $( 'html' ).css( 'margin-top', '' ); |
| 1040 | $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1041 | } |
| 1042 | }, trigger_sec ); |
| 1043 | } |
| 1044 | } else { |
| 1045 | if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) { |
| 1046 | setTimeout(function(){ |
| 1047 | jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' ); |
| 1048 | if ( welcombar_position == 'top' ) { |
| 1049 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' ); |
| 1050 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1051 | $( 'html' ).css( 'margin-bottom', '' ); |
| 1052 | $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1053 | $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' ); |
| 1054 | } else { |
| 1055 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' ); |
| 1056 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1057 | $( 'html' ).css( 'margin-top', '' ); |
| 1058 | $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1059 | } |
| 1060 | }, trigger_sec ); |
| 1061 | } |
| 1062 | } |
| 1063 | } |
| 1064 | mystickyelements_present(); |
| 1065 | } |
| 1066 | } ); |
| 1067 | |
| 1068 | jQuery(window).scroll(function(){ |
| 1069 | if( welcombar_aftersubmission == 'dont_show_welcomebar' ){ |
| 1070 | var welcomebar_storage = localStorage.getItem("welcomebar_close"); |
| 1071 | } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) { |
| 1072 | var welcomebar_storage = sessionStorage.getItem("welcomebar_close"); |
| 1073 | } else { |
| 1074 | sessionStorage.removeItem('welcomebar_close'); |
| 1075 | localStorage.removeItem('welcomebar_close'); |
| 1076 | var welcomebar_storage = null; |
| 1077 | } |
| 1078 | if ( welcomebar_storage === null ){ |
| 1079 | var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height'); |
| 1080 | var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position'); |
| 1081 | if ( welcombar_position == 'top' ) { |
| 1082 | $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' ); |
| 1083 | } |
| 1084 | if ( after_trigger === 'after_scroll' ) { |
| 1085 | var scroll = 100 * $(window).scrollTop() / ($(document).height() - $(window).height()); |
| 1086 | var after_scroll_val = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec'); |
| 1087 | var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position'); |
| 1088 | var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height'); |
| 1089 | if( scroll > after_scroll_val ) { |
| 1090 | if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-desktop' ) ) { |
| 1091 | if ( $( window ).width() > 767 ) { |
| 1092 | jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' ); |
| 1093 | if ( welcombar_position == 'top' ) { |
| 1094 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' ); |
| 1095 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1096 | $( 'html' ).css( 'margin-bottom', '' ); |
| 1097 | $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1098 | $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' ); |
| 1099 | } else { |
| 1100 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' ); |
| 1101 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1102 | $( 'html' ).css( 'margin-top', '' ); |
| 1103 | $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1104 | } |
| 1105 | } |
| 1106 | } |
| 1107 | if ( $( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) { |
| 1108 | if ( $( window ).width() < 767 ) { |
| 1109 | jQuery( '.mysticky-welcomebar-fixed' ).addClass( 'mysticky-welcomebar-animation' ); |
| 1110 | if ( welcombar_position == 'top' ) { |
| 1111 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '0' ); |
| 1112 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1113 | $( 'html' ).css( 'margin-bottom', '' ); |
| 1114 | $( 'html' ).attr( 'style', 'margin-top: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1115 | $( '#mysticky-nav' ).css( 'top', mysticky_welcomebar_height + 'px' ); |
| 1116 | } else { |
| 1117 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '0' ); |
| 1118 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'opacity', '1' ); |
| 1119 | $( 'html' ).css( 'margin-top', '' ); |
| 1120 | $( 'html' ).attr( 'style', 'margin-bottom: ' + mysticky_welcomebar_height + 'px !important' ); |
| 1121 | } |
| 1122 | } |
| 1123 | } |
| 1124 | } |
| 1125 | } |
| 1126 | mystickyelements_present(); |
| 1127 | } |
| 1128 | |
| 1129 | }); |
| 1130 | |
| 1131 | jQuery( '.mysticky-welcomebar-close, .mysticky-welcomebar-btn a' ).on( 'click', function(){ |
| 1132 | if( welcombar_aftersubmission != 'show_welcomebar_every_page' ){ |
| 1133 | if( welcombar_aftersubmission == 'dont_show_welcomebar' ){ |
| 1134 | sessionStorage.removeItem('welcomebar_close'); |
| 1135 | localStorage.setItem('welcomebar_close', 'close'); |
| 1136 | } else if( welcombar_aftersubmission == 'show_welcomebar_next_visit' ) { |
| 1137 | localStorage.removeItem('welcomebar_close'); |
| 1138 | sessionStorage.setItem('welcomebar_close', 'close'); |
| 1139 | } |
| 1140 | } |
| 1141 | var welcombar_position = $( '.mysticky-welcomebar-fixed' ).data('position'); |
| 1142 | var welcombar_height = $( '.mysticky-welcomebar-fixed' ).data('height'); |
| 1143 | jQuery( '.mysticky-welcomebar-fixed' ).slideUp( 'slow' ); |
| 1144 | if ( welcombar_position == 'top' ) { |
| 1145 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'top', '-' + mysticky_welcomebar_height + 'px' ); |
| 1146 | } else { |
| 1147 | jQuery( '.mysticky-welcomebar-fixed' ).css( 'bottom', '-' + mysticky_welcomebar_height + 'px' ); |
| 1148 | } |
| 1149 | jQuery( 'html' ).css( 'margin-top', '' ); |
| 1150 | jQuery( 'html' ).css( 'margin-bottom', '' ); |
| 1151 | $( '#mysticky-nav' ).css( 'top', '0px' ); |
| 1152 | /*if mystickyelements show*/ |
| 1153 | var mystickyelements_show = $( '.mystickyelements-fixed' ).length; |
| 1154 | if( mystickyelements_show && $( window ).width() <= 1024 && $( '.mystickyelements-fixed' ).hasClass( 'mystickyelements-position-mobile-top' ) && welcombar_position == 'top' ) { |
| 1155 | var mystickyelements_height = $( '.mystickyelements-fixed' ).height(); |
| 1156 | $( '.mystickyelements-fixed' ).css( 'top', '' ); |
| 1157 | $( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_height + 'px !important' ); |
| 1158 | } |
| 1159 | } ); |
| 1160 | }); |
| 1161 | function mystickyelements_present() { |
| 1162 | var after_trigger = jQuery( '.mysticky-welcomebar-fixed' ).data('after-triger'); |
| 1163 | var mystickyelements_show = jQuery( '.mystickyelements-fixed' ).length; |
| 1164 | if( mystickyelements_show ) { |
| 1165 | var welcombar_position = jQuery( '.mysticky-welcomebar-fixed' ).data('position'); |
| 1166 | var welcombar_height = jQuery( '.mysticky-welcomebar-fixed' ).innerHeight(); |
| 1167 | var mystickyelements_height = jQuery( '.mystickyelements-fixed' ).height(); |
| 1168 | var mystickyelements_total_height = welcombar_height + mystickyelements_height; |
| 1169 | if ( jQuery( window ).width() <= 1024 && jQuery( '.mystickyelements-fixed' ).hasClass( 'mystickyelements-position-mobile-top' ) ) { |
| 1170 | if ( after_trigger == 'after_a_few_seconds' ) { |
| 1171 | if ( jQuery( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) { |
| 1172 | var trigger_sec = jQuery( '.mysticky-welcomebar-fixed' ).data('triger-sec') * 1000; |
| 1173 | setTimeout(function(){ |
| 1174 | if ( welcombar_position == 'top' ) { |
| 1175 | jQuery( '.mystickyelements-fixed' ).css( 'top', welcombar_height ); |
| 1176 | jQuery( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_total_height + 'px !important' ); |
| 1177 | } else { |
| 1178 | jQuery( '.mystickyelements-fixed' ).css( 'top', '' ); |
| 1179 | jQuery( 'html' ).attr( 'style', 'margin-bottom: ' + welcombar_height + 'px !important' ); |
| 1180 | } |
| 1181 | }, trigger_sec ); |
| 1182 | } |
| 1183 | } else if ( after_trigger === 'after_scroll' ) { |
| 1184 | var scroll = 100 * $(window).scrollTop() / ($(document).height() - $(window).height()); |
| 1185 | var after_scroll_val = $( '.mysticky-welcomebar-fixed' ).data('triger-sec'); |
| 1186 | if( scroll > after_scroll_val ) { |
| 1187 | if ( jQuery( '.mysticky-welcomebar-fixed' ).hasClass( 'mysticky-welcomebar-display-mobile' ) ) { |
| 1188 | if ( welcombar_position == 'top' ) { |
| 1189 | jQuery( '.mystickyelements-fixed' ).css( 'top', welcombar_height ); |
| 1190 | jQuery( 'html' ).attr( 'style', 'margin-top: ' + mystickyelements_total_height + 'px !important' ); |
| 1191 | } else { |
| 1192 | jQuery( '.mystickyelements-fixed' ).css( 'top', '' ); |
| 1193 | jQuery( 'html' ).attr( 'style', 'margin-bottom: ' + welcombar_height + 'px !important' ); |
| 1194 | } |
| 1195 | } |
| 1196 | } |
| 1197 | } |
| 1198 | } |
| 1199 | } |
| 1200 | } |
| 1201 | jQuery(".mysticky-welcomebar-fixed").on( |
| 1202 | "animationend MSAnimationEnd webkitAnimationEnd oAnimationEnd", |
| 1203 | function() { |
| 1204 | jQuery(this).removeClass("animation-start"); |
| 1205 | } |
| 1206 | ); |
| 1207 | jQuery(document).ready(function() { |
| 1208 | var container = jQuery(".mysticky-welcomebar-fixed"); |
| 1209 | var refreshId = setInterval(function() { |
| 1210 | container.addClass("animation-start"); |
| 1211 | }, 3500); |
| 1212 | }); |
| 1213 | |
| 1214 | </script> |
| 1215 | <style> |
| 1216 | .mysticky-welcomebar-fixed { |
| 1217 | height: 60px; |
| 1218 | background-color: <?php echo $welcomebar['mysticky_welcomebar_bgcolor'] ?>; |
| 1219 | font-family: <?php echo $welcomebar['mysticky_welcomebar_font'] ?>; |
| 1220 | position: fixed; |
| 1221 | left: 0; |
| 1222 | right: 0; |
| 1223 | display: flex; |
| 1224 | align-items: center; |
| 1225 | justify-content: center; |
| 1226 | padding: 20px 50px; |
| 1227 | z-index: 9999999; |
| 1228 | opacity: 0; |
| 1229 | } |
| 1230 | .mysticky-welcomebar-animation { |
| 1231 | -webkit-transition: all 0.5s ease 0s; |
| 1232 | -moz-transition: all 0.5s ease 0s; |
| 1233 | transition: all 0.5s ease 0s; |
| 1234 | } |
| 1235 | .mysticky-welcomebar-position-top { |
| 1236 | top: -60px; |
| 1237 | } |
| 1238 | .mysticky-welcomebar-position-bottom { |
| 1239 | bottom: -60px; |
| 1240 | } |
| 1241 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-fixed { |
| 1242 | top: 0; |
| 1243 | } |
| 1244 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-fixed { |
| 1245 | bottom: 0; |
| 1246 | } |
| 1247 | .mysticky-welcomebar-fixed .mysticky-welcomebar-content p a, |
| 1248 | .mysticky-welcomebar-fixed .mysticky-welcomebar-content p { |
| 1249 | color: <?php echo $welcomebar['mysticky_welcomebar_bgtxtcolor'] ?>; |
| 1250 | font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px; |
| 1251 | margin: 0; |
| 1252 | padding: 0; |
| 1253 | line-height: 1.2; |
| 1254 | font-family: inherit; |
| 1255 | font-weight: 400; |
| 1256 | } |
| 1257 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn { |
| 1258 | padding-left: 30px; |
| 1259 | display: none; |
| 1260 | line-height: 1; |
| 1261 | } |
| 1262 | .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn { |
| 1263 | display: block; |
| 1264 | } |
| 1265 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a { |
| 1266 | background-color: <?php echo $welcomebar['mysticky_welcomebar_btncolor'] ?>; |
| 1267 | font-family: inherit; |
| 1268 | color: <?php echo $welcomebar['mysticky_welcomebar_btntxtcolor'] ?>; |
| 1269 | border-radius: 4px; |
| 1270 | text-decoration: none; |
| 1271 | display: inline-block; |
| 1272 | vertical-align: top; |
| 1273 | line-height: 1.2; |
| 1274 | font-size: <?php echo $welcomebar['mysticky_welcomebar_fontsize'] ?>px; |
| 1275 | font-weight: 400; |
| 1276 | padding: 5px 20px; |
| 1277 | white-space: nowrap; |
| 1278 | } |
| 1279 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a:hover { |
| 1280 | /*opacity: 0.7;*/ |
| 1281 | -moz-box-shadow: 1px 2px 4px rgba(0, 0, 0,0.5); |
| 1282 | -webkit-box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5); |
| 1283 | box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5); |
| 1284 | } |
| 1285 | .mysticky-welcomebar-fixed .mysticky-welcomebar-close { |
| 1286 | display: none; |
| 1287 | vertical-align: top; |
| 1288 | width: 30px; |
| 1289 | height: 30px; |
| 1290 | text-align: center; |
| 1291 | line-height: 30px; |
| 1292 | border-radius: 5px; |
| 1293 | color: #000; |
| 1294 | position: absolute; |
| 1295 | top: 5px; |
| 1296 | right: 10px; |
| 1297 | outline: none; |
| 1298 | font-family: Lato; |
| 1299 | text-decoration: none; |
| 1300 | text-shadow: 0 0 0px #fff; |
| 1301 | -webkit-transition: all 0.5s ease 0s; |
| 1302 | -moz-transition: all 0.5s ease 0s; |
| 1303 | transition: all 0.5s ease 0s; |
| 1304 | -webkit-transform-origin: 50% 50%; |
| 1305 | -moz-transform-origin: 50% 50%; |
| 1306 | transform-origin: 50% 50%; |
| 1307 | } |
| 1308 | .mysticky-welcomebar-fixed .mysticky-welcomebar-close:hover { |
| 1309 | opacity: 1; |
| 1310 | -webkit-transform: rotate(180deg); |
| 1311 | -moz-transform: rotate(180deg); |
| 1312 | transform: rotate(180deg); |
| 1313 | } |
| 1314 | .mysticky-welcomebar-fixed .mysticky-welcomebar-close span.dashicons { |
| 1315 | font-size: 27px; |
| 1316 | } |
| 1317 | .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close { |
| 1318 | display: inline-block; |
| 1319 | } |
| 1320 | .mysticky-welcomebar-getbar:focus, |
| 1321 | .mysticky-welcomebar-getbar:active, |
| 1322 | .mysticky-welcomebar-getbar { |
| 1323 | background-color: rgba(140,140,140,0.5) !important; |
| 1324 | border-radius: 8px !important; |
| 1325 | color: #FFFFFF !important; |
| 1326 | position: absolute !important; |
| 1327 | padding: 3px !important; |
| 1328 | bottom: 5px !important; |
| 1329 | left: 10px !important; |
| 1330 | font-size: 12px !important; |
| 1331 | line-height: 1.4 !important; |
| 1332 | margin: 0 !important; |
| 1333 | display: inline-block !important; |
| 1334 | vertical-align: top !important; |
| 1335 | font-family: Poppins !important; |
| 1336 | text-decoration: none !important; |
| 1337 | visibility: visible !important; |
| 1338 | outline: 0 !important; |
| 1339 | } |
| 1340 | .mysticky-welcomebar-getbar:hover { |
| 1341 | color: #000000 !important; |
| 1342 | opacity: 0.5 !important; |
| 1343 | } |
| 1344 | /* Animated Buttons */ |
| 1345 | .mysticky-welcomebar-btn a { |
| 1346 | -webkit-animation-duration: 1s; |
| 1347 | animation-duration: 1s; |
| 1348 | } |
| 1349 | @-webkit-keyframes flash { |
| 1350 | from, |
| 1351 | 50%, |
| 1352 | to { |
| 1353 | opacity: 1; |
| 1354 | } |
| 1355 | |
| 1356 | 25%, |
| 1357 | 75% { |
| 1358 | opacity: 0; |
| 1359 | } |
| 1360 | } |
| 1361 | @keyframes flash { |
| 1362 | from, |
| 1363 | 50%, |
| 1364 | to { |
| 1365 | opacity: 1; |
| 1366 | } |
| 1367 | |
| 1368 | 25%, |
| 1369 | 75% { |
| 1370 | opacity: 0; |
| 1371 | } |
| 1372 | } |
| 1373 | .mysticky-welcomebar-attention-flash.animation-start .mysticky-welcomebar-btn a { |
| 1374 | -webkit-animation-name: flash; |
| 1375 | animation-name: flash; |
| 1376 | } |
| 1377 | |
| 1378 | @keyframes shake { |
| 1379 | from, |
| 1380 | to { |
| 1381 | -webkit-transform: translate3d(0, 0, 0); |
| 1382 | transform: translate3d(0, 0, 0); |
| 1383 | } |
| 1384 | |
| 1385 | 10%, |
| 1386 | 30%, |
| 1387 | 50%, |
| 1388 | 70%, |
| 1389 | 90% { |
| 1390 | -webkit-transform: translate3d(-10px, 0, 0); |
| 1391 | transform: translate3d(-10px, 0, 0); |
| 1392 | } |
| 1393 | |
| 1394 | 20%, |
| 1395 | 40%, |
| 1396 | 60%, |
| 1397 | 80% { |
| 1398 | -webkit-transform: translate3d(10px, 0, 0); |
| 1399 | transform: translate3d(10px, 0, 0); |
| 1400 | } |
| 1401 | } |
| 1402 | |
| 1403 | .mysticky-welcomebar-attention-shake.animation-start .mysticky-welcomebar-btn a { |
| 1404 | -webkit-animation-name: shake; |
| 1405 | animation-name: shake; |
| 1406 | } |
| 1407 | |
| 1408 | @-webkit-keyframes swing { |
| 1409 | 20% { |
| 1410 | -webkit-transform: rotate3d(0, 0, 1, 15deg); |
| 1411 | transform: rotate3d(0, 0, 1, 15deg); |
| 1412 | } |
| 1413 | |
| 1414 | 40% { |
| 1415 | -webkit-transform: rotate3d(0, 0, 1, -10deg); |
| 1416 | transform: rotate3d(0, 0, 1, -10deg); |
| 1417 | } |
| 1418 | |
| 1419 | 60% { |
| 1420 | -webkit-transform: rotate3d(0, 0, 1, 5deg); |
| 1421 | transform: rotate3d(0, 0, 1, 5deg); |
| 1422 | } |
| 1423 | |
| 1424 | 80% { |
| 1425 | -webkit-transform: rotate3d(0, 0, 1, -5deg); |
| 1426 | transform: rotate3d(0, 0, 1, -5deg); |
| 1427 | } |
| 1428 | |
| 1429 | to { |
| 1430 | -webkit-transform: rotate3d(0, 0, 1, 0deg); |
| 1431 | transform: rotate3d(0, 0, 1, 0deg); |
| 1432 | } |
| 1433 | } |
| 1434 | |
| 1435 | @keyframes swing { |
| 1436 | 20% { |
| 1437 | -webkit-transform: rotate3d(0, 0, 1, 15deg); |
| 1438 | transform: rotate3d(0, 0, 1, 15deg); |
| 1439 | } |
| 1440 | |
| 1441 | 40% { |
| 1442 | -webkit-transform: rotate3d(0, 0, 1, -10deg); |
| 1443 | transform: rotate3d(0, 0, 1, -10deg); |
| 1444 | } |
| 1445 | |
| 1446 | 60% { |
| 1447 | -webkit-transform: rotate3d(0, 0, 1, 5deg); |
| 1448 | transform: rotate3d(0, 0, 1, 5deg); |
| 1449 | } |
| 1450 | |
| 1451 | 80% { |
| 1452 | -webkit-transform: rotate3d(0, 0, 1, -5deg); |
| 1453 | transform: rotate3d(0, 0, 1, -5deg); |
| 1454 | } |
| 1455 | |
| 1456 | to { |
| 1457 | -webkit-transform: rotate3d(0, 0, 1, 0deg); |
| 1458 | transform: rotate3d(0, 0, 1, 0deg); |
| 1459 | } |
| 1460 | } |
| 1461 | |
| 1462 | .mysticky-welcomebar-attention-swing.animation-start .mysticky-welcomebar-btn a { |
| 1463 | -webkit-transform-origin: top center; |
| 1464 | transform-origin: top center; |
| 1465 | -webkit-animation-name: swing; |
| 1466 | animation-name: swing; |
| 1467 | } |
| 1468 | |
| 1469 | @-webkit-keyframes tada { |
| 1470 | from { |
| 1471 | -webkit-transform: scale3d(1, 1, 1); |
| 1472 | transform: scale3d(1, 1, 1); |
| 1473 | } |
| 1474 | |
| 1475 | 10%, |
| 1476 | 20% { |
| 1477 | -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); |
| 1478 | transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); |
| 1479 | } |
| 1480 | |
| 1481 | 30%, |
| 1482 | 50%, |
| 1483 | 70%, |
| 1484 | 90% { |
| 1485 | -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
| 1486 | transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
| 1487 | } |
| 1488 | |
| 1489 | 40%, |
| 1490 | 60%, |
| 1491 | 80% { |
| 1492 | -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); |
| 1493 | transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); |
| 1494 | } |
| 1495 | |
| 1496 | to { |
| 1497 | -webkit-transform: scale3d(1, 1, 1); |
| 1498 | transform: scale3d(1, 1, 1); |
| 1499 | } |
| 1500 | } |
| 1501 | |
| 1502 | @keyframes tada { |
| 1503 | from { |
| 1504 | -webkit-transform: scale3d(1, 1, 1); |
| 1505 | transform: scale3d(1, 1, 1); |
| 1506 | } |
| 1507 | |
| 1508 | 10%, |
| 1509 | 20% { |
| 1510 | -webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); |
| 1511 | transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg); |
| 1512 | } |
| 1513 | |
| 1514 | 30%, |
| 1515 | 50%, |
| 1516 | 70%, |
| 1517 | 90% { |
| 1518 | -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
| 1519 | transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
| 1520 | } |
| 1521 | |
| 1522 | 40%, |
| 1523 | 60%, |
| 1524 | 80% { |
| 1525 | -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); |
| 1526 | transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); |
| 1527 | } |
| 1528 | |
| 1529 | to { |
| 1530 | -webkit-transform: scale3d(1, 1, 1); |
| 1531 | transform: scale3d(1, 1, 1); |
| 1532 | } |
| 1533 | } |
| 1534 | |
| 1535 | .mysticky-welcomebar-attention-tada.animation-start .mysticky-welcomebar-btn a { |
| 1536 | -webkit-animation-name: tada; |
| 1537 | animation-name: tada; |
| 1538 | } |
| 1539 | |
| 1540 | @-webkit-keyframes heartBeat { |
| 1541 | 0% { |
| 1542 | -webkit-transform: scale(1); |
| 1543 | transform: scale(1); |
| 1544 | } |
| 1545 | |
| 1546 | 14% { |
| 1547 | -webkit-transform: scale(1.3); |
| 1548 | transform: scale(1.3); |
| 1549 | } |
| 1550 | |
| 1551 | 28% { |
| 1552 | -webkit-transform: scale(1); |
| 1553 | transform: scale(1); |
| 1554 | } |
| 1555 | |
| 1556 | 42% { |
| 1557 | -webkit-transform: scale(1.3); |
| 1558 | transform: scale(1.3); |
| 1559 | } |
| 1560 | |
| 1561 | 70% { |
| 1562 | -webkit-transform: scale(1); |
| 1563 | transform: scale(1); |
| 1564 | } |
| 1565 | } |
| 1566 | |
| 1567 | @keyframes heartBeat { |
| 1568 | 0% { |
| 1569 | -webkit-transform: scale(1); |
| 1570 | transform: scale(1); |
| 1571 | } |
| 1572 | |
| 1573 | 14% { |
| 1574 | -webkit-transform: scale(1.3); |
| 1575 | transform: scale(1.3); |
| 1576 | } |
| 1577 | |
| 1578 | 28% { |
| 1579 | -webkit-transform: scale(1); |
| 1580 | transform: scale(1); |
| 1581 | } |
| 1582 | |
| 1583 | 42% { |
| 1584 | -webkit-transform: scale(1.3); |
| 1585 | transform: scale(1.3); |
| 1586 | } |
| 1587 | |
| 1588 | 70% { |
| 1589 | -webkit-transform: scale(1); |
| 1590 | transform: scale(1); |
| 1591 | } |
| 1592 | } |
| 1593 | |
| 1594 | .mysticky-welcomebar-attention-heartbeat.animation-start .mysticky-welcomebar-btn a { |
| 1595 | -webkit-animation-name: heartBeat; |
| 1596 | animation-name: heartBeat; |
| 1597 | -webkit-animation-duration: 1.3s; |
| 1598 | animation-duration: 1.3s; |
| 1599 | -webkit-animation-timing-function: ease-in-out; |
| 1600 | animation-timing-function: ease-in-out; |
| 1601 | } |
| 1602 | |
| 1603 | @-webkit-keyframes wobble { |
| 1604 | from { |
| 1605 | -webkit-transform: translate3d(0, 0, 0); |
| 1606 | transform: translate3d(0, 0, 0); |
| 1607 | } |
| 1608 | |
| 1609 | 15% { |
| 1610 | -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); |
| 1611 | transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); |
| 1612 | } |
| 1613 | |
| 1614 | 30% { |
| 1615 | -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); |
| 1616 | transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); |
| 1617 | } |
| 1618 | |
| 1619 | 45% { |
| 1620 | -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); |
| 1621 | transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); |
| 1622 | } |
| 1623 | |
| 1624 | 60% { |
| 1625 | -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); |
| 1626 | transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); |
| 1627 | } |
| 1628 | |
| 1629 | 75% { |
| 1630 | -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); |
| 1631 | transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); |
| 1632 | } |
| 1633 | |
| 1634 | to { |
| 1635 | -webkit-transform: translate3d(0, 0, 0); |
| 1636 | transform: translate3d(0, 0, 0); |
| 1637 | } |
| 1638 | } |
| 1639 | |
| 1640 | @keyframes wobble { |
| 1641 | from { |
| 1642 | -webkit-transform: translate3d(0, 0, 0); |
| 1643 | transform: translate3d(0, 0, 0); |
| 1644 | } |
| 1645 | |
| 1646 | 15% { |
| 1647 | -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); |
| 1648 | transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); |
| 1649 | } |
| 1650 | |
| 1651 | 30% { |
| 1652 | -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); |
| 1653 | transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); |
| 1654 | } |
| 1655 | |
| 1656 | 45% { |
| 1657 | -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); |
| 1658 | transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); |
| 1659 | } |
| 1660 | |
| 1661 | 60% { |
| 1662 | -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); |
| 1663 | transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); |
| 1664 | } |
| 1665 | |
| 1666 | 75% { |
| 1667 | -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); |
| 1668 | transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); |
| 1669 | } |
| 1670 | |
| 1671 | to { |
| 1672 | -webkit-transform: translate3d(0, 0, 0); |
| 1673 | transform: translate3d(0, 0, 0); |
| 1674 | } |
| 1675 | } |
| 1676 | |
| 1677 | .mysticky-welcomebar-attention-wobble.animation-start .mysticky-welcomebar-btn a { |
| 1678 | -webkit-animation-name: wobble; |
| 1679 | animation-name: wobble; |
| 1680 | } |
| 1681 | @media only screen and (max-width: 767px) { |
| 1682 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-fixed { |
| 1683 | top: -60px; |
| 1684 | } |
| 1685 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-fixed { |
| 1686 | bottom: -60px; |
| 1687 | } |
| 1688 | .mysticky-welcomebar-display-mobile.mysticky-welcomebar-position-top.mysticky-welcomebar-fixed { |
| 1689 | top: 0; |
| 1690 | } |
| 1691 | .mysticky-welcomebar-display-mobile.mysticky-welcomebar-position-bottom.mysticky-welcomebar-fixed { |
| 1692 | bottom: 0; |
| 1693 | } |
| 1694 | .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-desktop .mysticky-welcomebar-close { |
| 1695 | display: none; |
| 1696 | } |
| 1697 | .mysticky-welcomebar-fixed.mysticky-welcomebar-showx-mobile .mysticky-welcomebar-close { |
| 1698 | display: inline-block; |
| 1699 | } |
| 1700 | .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn { |
| 1701 | display: none; |
| 1702 | } |
| 1703 | .mysticky-welcomebar-fixed.mysticky-welcomebar-btn-mobile .mysticky-welcomebar-btn { |
| 1704 | display: block; |
| 1705 | } |
| 1706 | } |
| 1707 | @media only screen and (max-width: 480px) { |
| 1708 | .mysticky-welcomebar-fixed { |
| 1709 | height: auto; |
| 1710 | min-height: 60px; |
| 1711 | padding: 15px 36px 35px 10px; |
| 1712 | } |
| 1713 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn { |
| 1714 | padding-left: 10px; |
| 1715 | } |
| 1716 | .mysticky-welcomebar-fixed .mysticky-welcomebar-close { |
| 1717 | right: 7px; |
| 1718 | } |
| 1719 | } |
| 1720 | </style> |
| 1721 | <?php |
| 1722 | } |
| 1723 | add_action( 'wp_footer', 'mysticky_welcome_bar_frontend' ); |