bar-preview.php
1 week ago
bar-settings.php
1 week ago
customize-bar.php
1 week ago
display-rules.php
1 week ago
email-signup.php
7 months ago
help.php
1 month ago
poptin-plugin.php
7 months ago
poptin-popup.php
7 months ago
sticky-header-settings.php
1 week ago
stickymenu-dashboard.php
1 week ago
bar-preview.php
191 lines
| 1 | <?php |
| 2 | /** |
| 3 | * MSB BarPreview |
| 4 | * |
| 5 | * @author : Premio <contact@premio.io> |
| 6 | * @license : GPL2 |
| 7 | * */ |
| 8 | |
| 9 | if (defined('ABSPATH') === false) { |
| 10 | exit; |
| 11 | } |
| 12 | $button_postion_relative_text = (isset($welcomebar['mysticky_welcomebar_button_postion_relative_text']) ) ? esc_attr($welcomebar['mysticky_welcomebar_button_postion_relative_text']) : ''; |
| 13 | $button_text_postion = (isset($welcomebar['mysticky_welcomebar_button_text_postion']) ) ? esc_attr($welcomebar['mysticky_welcomebar_button_text_postion']) : 'center'; |
| 14 | $button_text_postion_clss = ''; |
| 15 | if ( $button_postion_relative_text == 1 ) { |
| 16 | $button_text_postion_clss = 'mysticky-welcomebar-position-' . $button_text_postion; |
| 17 | } |
| 18 | ?> |
| 19 | <div class="mysticky-welcomebar-preview-wrap"> |
| 20 | <div class="mysticky-welcomebar-setting-right mysticky-welcomebar-preview"> |
| 21 | <div class="mysticky-welcomebar-backword-page"> |
| 22 | <a href="<?php echo esc_url(admin_url("admin.php?page=my-stickymenu-welcomebar"));?>"><span class="dashicons dashicons-arrow-left-alt2 back-dashboard" style="color: unset;font-size: 17px;"></span> <?php esc_html_e('Back to Dashboard', 'mystickymenu'); ?></a> |
| 23 | </div> |
| 24 | <div class="mysticky-welcomebar-header-title"> |
| 25 | <h3><?php esc_html_e('Preview', 'mystickymenu'); ?></h3> |
| 26 | </div> |
| 27 | <div class="mysticky-welcomebar-preview-screen"> |
| 28 | <div class="mysticky-welcomebar-fixed mysticky-welcomebar-display-desktop <?php echo esc_attr($display_main_class); ?>" > |
| 29 | <div class="mysticky-welcomebar-fixed-wrap <?php echo esc_attr($button_text_postion_clss);?>"> |
| 30 | <?php |
| 31 | $content_width = (isset($welcomebar['mysticky_welcomebar_enable_lead']) && $welcomebar['mysticky_welcomebar_enable_lead'] === '1') ? '90%' : '75%'; |
| 32 | ?> |
| 33 | <div class="mysticky-welcomebar-content" style="width:<?php echo esc_attr($content_width); ?>"> |
| 34 | <div class="mysticky-welcomebar-static_text" style="display:<?php echo (isset($welcomebar['mysticky_welcomebar_text_type']) && $welcomebar['mysticky_welcomebar_text_type'] == 'static_text') ? 'block' : 'none'; ?>"> |
| 35 | <?php echo isset($welcomebar['mysticky_welcomebar_bar_text'])? stripslashes($welcomebar['mysticky_welcomebar_bar_text']) :"Get 30% off your first purchase";?> |
| 36 | </div> |
| 37 | </div> |
| 38 | |
| 39 | <div class="mysticky-welcomebar-lead-content gap-2" <?php if((isset($welcomebar['mysticky_welcomebar_enable_lead']) && $welcomebar['mysticky_welcomebar_enable_lead'] != 1)) :?> style="display:none;" <?php endif; ?>> |
| 40 | <input type="text" class="preview-lead-name" placeholder="<?php echo esc_attr($welcomebar['lead_name_placeholder']);?>"/> |
| 41 | <input type="text" class="preview-lead-email" placeholder="<?php echo esc_attr($welcomebar['lead_email_placeholder']);?>" style="display:<?php echo (isset($welcomebar['mysticky_welcomebar_lead_input']) && $welcomebar['mysticky_welcomebar_lead_input'] == 'email_address') ? 'flex' : 'none';?>"/> |
| 42 | <input type="text" class="preview-lead-phone" placeholder="<?php echo esc_attr($welcomebar['lead_phone_placeholder']);?>" style="display:<?php echo (isset($welcomebar['mysticky_welcomebar_lead_input']) && $welcomebar['mysticky_welcomebar_lead_input'] == 'phone') ? 'flex' : 'none';?>"/> |
| 43 | </div> |
| 44 | |
| 45 | <div class="mysticky-welcomebar-btn"> |
| 46 | <?php |
| 47 | $mysticky_welcomebar_btn_text = isset($welcomebar['mysticky_welcomebar_btn_text']) ? stripslashes($welcomebar['mysticky_welcomebar_btn_text']) : "Got it!"; |
| 48 | $allowedTags = [ |
| 49 | 'p' => array( |
| 50 | 'style' => array(), |
| 51 | ), |
| 52 | 'br' => array(), |
| 53 | 'em' => array(), |
| 54 | 'span' => array( |
| 55 | 'style' => array(), |
| 56 | ), |
| 57 | 'u' => array(), |
| 58 | 'strong' => array(), |
| 59 | 'underline' => array(), |
| 60 | ]; |
| 61 | ?> |
| 62 | <a class="msb-welcomebar-btn" href="#" > |
| 63 | <span class="button-text"> |
| 64 | <?php echo wp_kses($mysticky_welcomebar_btn_text, $allowedTags);?> |
| 65 | </span> |
| 66 | </a> |
| 67 | </div> |
| 68 | <?php |
| 69 | $x_color = (isset($welcomebar['mysticky_welcomebar_x_color'])) ? esc_attr($welcomebar['mysticky_welcomebar_x_color']) : '#000000'; |
| 70 | ?> |
| 71 | <span class="mysticky-welcomebar-close" style="color:<?php echo esc_attr($x_color);?>" tabindex="0" role="button" aria-label="close">X</span> |
| 72 | </div> |
| 73 | </div> |
| 74 | </div> |
| 75 | <div class="timer-message" <?php if(isset($welcomebar['mysticky_welcomebar_enable_lead']) && $welcomebar['mysticky_welcomebar_enable_lead'] != 1):?> style="display:none;"<?php endif;?>> |
| 76 | <p><span class="dashicons dashicons-info"></span> The elements will be displayed in 1-line on your actual website. <a class="save_change" href="#"><?php esc_html_e('Save changes', 'mystickymenu'); ?></a> and <a href="<?php echo esc_url(site_url());?>" target="_blank" class="visit_site_link"><span class="dashicons dashicons-migrate" style="color: #2271b1 !important;"></span> visit your website</a> to check how it’d look like</p> |
| 77 | </div> |
| 78 | <div class="mysticky-welcomebar-full-screen flex justify-center items-center"> |
| 79 | <button type="button" class="welcomebar-full-screen-btn"> |
| 80 | <?php esc_html_e( 'Show Fullscreen Preview', 'mystickymenu' );?> |
| 81 | <span class="dashicons dashicons-fullscreen-alt"></span> |
| 82 | </button> |
| 83 | |
| 84 | <button type="button" class="welcomebar-minimise-screen-btn" style="display:none;"> |
| 85 | <?php esc_html_e( 'Minimise Preview', 'mystickymenu' );?> |
| 86 | <span class="dashicons dashicons-fullscreen-exit-alt"></span> |
| 87 | </button> |
| 88 | </div> |
| 89 | </div> |
| 90 | <style> |
| 91 | .morphext > .morphext__animated { |
| 92 | display: inline-block; |
| 93 | } |
| 94 | .mysticky-welcomebar-fixed { |
| 95 | background-color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_bgcolor']); ?>; |
| 96 | font-family: <?php echo esc_attr($welcomebar['mysticky_welcomebar_font']); ?>; |
| 97 | position: absolute; |
| 98 | left: 0; |
| 99 | right: 0; |
| 100 | opacity: 0; |
| 101 | z-index: 9; |
| 102 | -webkit-transition: all 1s ease 0s; |
| 103 | -moz-transition: all 1s ease 0s; |
| 104 | transition: all 1s ease 0s; |
| 105 | } |
| 106 | .mysticky-welcomebar-fixed-wrap { |
| 107 | width: 98%; |
| 108 | min-height: 60px; |
| 109 | padding: 10px 29px 10px 20px; |
| 110 | display: flex; |
| 111 | align-items: center; |
| 112 | justify-content: center; |
| 113 | } |
| 114 | .mysticky-welcomebar-preview-mobile-screen .mysticky-welcomebar-fixed{ |
| 115 | padding: 0 25px; |
| 116 | } |
| 117 | .mysticky-welcomebar-position-top { |
| 118 | top:0; |
| 119 | } |
| 120 | .mysticky-welcomebar-position-bottom { |
| 121 | bottom:0; |
| 122 | } |
| 123 | .mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in { |
| 124 | top: -80px; |
| 125 | } |
| 126 | .mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in { |
| 127 | bottom: -80px; |
| 128 | } |
| 129 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in.entry-effect { |
| 130 | top:0; |
| 131 | opacity: 1; |
| 132 | } |
| 133 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in.entry-effect { |
| 134 | bottom:0; |
| 135 | opacity: 1; |
| 136 | } |
| 137 | .mysticky-welcomebar-entry-effect-fade { |
| 138 | opacity: 0; |
| 139 | } |
| 140 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-entry-effect-fade.entry-effect { |
| 141 | opacity: 1; |
| 142 | } |
| 143 | .mysticky-welcomebar-entry-effect-none { |
| 144 | display: none; |
| 145 | } |
| 146 | .mysticky-welcomebar-display-desktop.mysticky-welcomebar-entry-effect-none.entry-effect { |
| 147 | display: block; |
| 148 | opacity: 1; |
| 149 | } .mysticky-welcomebar-position-top.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed { |
| 150 | top: 0; |
| 151 | } |
| 152 | .mysticky-welcomebar-position-bottom.mysticky-welcomebar-entry-effect-slide-in.entry-effect.mysticky-welcomebar-fixed { |
| 153 | bottom: 0; |
| 154 | } |
| 155 | .mysticky-welcomebar-fixed .mysticky-welcomebar-content p a, |
| 156 | .mysticky-welcomebar-fixed .mysticky-welcomebar-content p { |
| 157 | color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_bgtxtcolor']); ?>; |
| 158 | font-size: <?php echo esc_attr($welcomebar['mysticky_welcomebar_fontsize']); ?>px; |
| 159 | font-family: inherit; |
| 160 | margin: 0; |
| 161 | padding: 0; |
| 162 | line-height: 1.2; |
| 163 | font-weight: 400; |
| 164 | } |
| 165 | .mysticky-welcomebar-fixed.mysticky-site-front.mysticky-welcomebar-btn-desktop .mysticky-welcomebar-btn { |
| 166 | display: block; |
| 167 | margin-left:5px; |
| 168 | } |
| 169 | .mysticky-welcomebar-fixed .mysticky-welcomebar-btn a { |
| 170 | background-color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btncolor']); ?>; |
| 171 | font-family: inherit; |
| 172 | color: <?php echo esc_attr($welcomebar['mysticky_welcomebar_btntxtcolor']); ?>; |
| 173 | border-radius: 4px; |
| 174 | text-decoration: none; |
| 175 | display: inline-block; |
| 176 | vertical-align: top; |
| 177 | line-height: 1.2; |
| 178 | font-size: <?php echo esc_attr($welcomebar['mysticky_welcomebar_fontsize']) ?>px; |
| 179 | font-weight: 400; |
| 180 | padding: 5px 15px; |
| 181 | white-space: nowrap; |
| 182 | text-align: center; |
| 183 | } |
| 184 | |
| 185 | @media only screen and (max-width: 1024px) { |
| 186 | .mysticky-welcomebar-fixed { |
| 187 | padding: 0 10px 0 10px; |
| 188 | } |
| 189 | } |
| 190 | </style> |
| 191 | </div> |