icons
9 years ago
layouts
9 years ago
providers
9 years ago
alert.php
9 years ago
layouts.php
9 years ago
modal.php
9 years ago
option.php
9 years ago
social.php
9 years ago
modal.php
137 lines
| 1 | <script id="hustle-modal-tpl" type="text/template"> |
| 2 | |
| 3 | <div id="wph-modal-{{type}}--{{id}}" class="wph-modal {{custom_size_class}} wph-modal-container <# if ( customize_css ) { #>wph-customize-css<# } #> wph-slide--{{position}} wph-modal--{{style}} wph-modal--{{type}} wph-modal--{{id}} {{animation_in}} {{fullscreen}}" {{custom_size_attr}}> |
| 4 | |
| 5 | <# if ( ( style === "simple" || style === "minimal" ) && ( type === "popup" || type === "slide_in" ) ){ #> |
| 6 | |
| 7 | <div class="wph-modal--close"><a class="wph-icon i-close" href=""></a></div> |
| 8 | |
| 9 | <# } #> |
| 10 | |
| 11 | <div class='wph-modal--content<# if(image && style === "simple" ){ #> wph-modal--image_{{image_position}}<# } #><# if( !optin_title && !subtitle && style !== "simple" ){ #> wph-modal--noheader<# } #><# if( (!cta_label || !cta_url) && style === "minimal" ) { #> wph-modal--nofooter<# } #>'> |
| 12 | |
| 13 | <# if ( image && style === "simple" ){ #> |
| 14 | |
| 15 | <figure class='wph-modal--image<# if( ( !cta_label || !cta_url ) && !optin_message && !optin_title && !subtitle && style === "simple" ) { #>_full<# } #>{{_.class( _.isTrue( hide_image_on_mobile ), " mobile-hidden" )}}'> |
| 16 | |
| 17 | <img src="{{image}}"> |
| 18 | |
| 19 | </figure> |
| 20 | |
| 21 | <# } #> |
| 22 | |
| 23 | <# if ( style === "simple" ){ #> |
| 24 | |
| 25 | <div class='wph-modal--wrap{{_.class( !optin_title && !subtitle && !optin_message && ( !cta_label || !cta_url ) && !_.isTrue( types[type].add_never_see_link ) && style === "simple", " hidden" )}}'> |
| 26 | |
| 27 | <# } #> |
| 28 | |
| 29 | <# if ( optin_title || subtitle || ( style === "cabriolet" && ( type === "popup" || type === "slide_in" ) && ( !optin_title && !subtitle ) ) || ( style === "cabriolet" && ( optin_title || subtitle ) ) ){ #> |
| 30 | |
| 31 | <header<# if ( ( !cta_label || !cta_url ) && !_.isTrue( types[type].add_never_see_link ) && !optin_message && style === "simple"){ #> class="wph-modal--nocontent"<# } #><# if ( ( !optin_title && !subtitle ) && style === "cabriolet" ){ #> class="wph-modal--nocontent"<# } #>> |
| 32 | |
| 33 | <# if ( optin_title ){ #> |
| 34 | |
| 35 | <h2 class="wph-modal--title">{{optin_title}}</h2> |
| 36 | |
| 37 | <# } #> |
| 38 | |
| 39 | <# if ( subtitle ){ #> |
| 40 | |
| 41 | <h4 class="wph-modal--subtitle">{{subtitle}}</h4> |
| 42 | |
| 43 | <# } #> |
| 44 | |
| 45 | <# if ( style === "cabriolet" && ( type === "popup" || type === "slide_in" ) ){ #> |
| 46 | |
| 47 | <div class="wph-modal--close"><a class="wph-icon i-close" href=""></a></div> |
| 48 | |
| 49 | <# } #> |
| 50 | |
| 51 | </header> |
| 52 | |
| 53 | <# } #> |
| 54 | |
| 55 | <# if ( ( ( image || optin_message || ( cta_label && cta_url ) || _.isTrue( types[type].add_never_see_link ) ) && style === "cabriolet" ) || ( ( image || optin_message ) && style === "minimal" ) || ( ( optin_message || ( cta_label && cta_url ) || _.isTrue( types[type].add_never_see_link ) ) && style === "simple" ) ){ #> |
| 56 | |
| 57 | <section<# if(image && style !== "simple" ) { #> class="wph-modal--image_{{image_position}}"<# } #>> |
| 58 | |
| 59 | <# if ( image && style !== "simple" ){ #> |
| 60 | |
| 61 | <figure class='wph-modal--image<# if ( (!optin_message && style === "minimal") ) { #>_full<# } #><# if( (!cta_label || !cta_url) && !optin_message && style === "cabriolet" ) { #>_full<# } #>{{_.class( _.isTrue( hide_image_on_mobile ), " mobile-hidden" )}}'> |
| 62 | |
| 63 | <img src="{{image}}"> |
| 64 | |
| 65 | </figure> |
| 66 | |
| 67 | <# } #> |
| 68 | |
| 69 | <div class='wph-modal--message<# if ( ( !optin_message && style === "minimal" ) || ( !optin_message && ( !cta_label || !cta_url ) && !_.isTrue( types[type].add_never_see_link ) && style !== "minimal" ) ){ #> hidden<# } #>'> |
| 70 | |
| 71 | <# if ( optin_provider === "custom_content" ){ #> |
| 72 | |
| 73 | {{{content}}} |
| 74 | |
| 75 | <# } else { #> |
| 76 | |
| 77 | {{{optin_message}}} |
| 78 | |
| 79 | <# } #> |
| 80 | |
| 81 | <# if ( ( ( cta_label && cta_url ) || _.isTrue( types[type].add_never_see_link ) ) && style !== "minimal" ){ #> |
| 82 | |
| 83 | <div class="wph-modal--clear"> |
| 84 | |
| 85 | <# if ( cta_label && cta_url ){ #> |
| 86 | |
| 87 | <a href="{{cta_url}}" target="{{cta_target}}" class="wph-modal--cta">{{cta_label}}</a> |
| 88 | |
| 89 | <# } #> |
| 90 | |
| 91 | <# if ( _.isTrue( types[type].add_never_see_link ) ){ #> |
| 92 | |
| 93 | <a href="#0" class="wph-modal-never-see-again" ><?php _e("Never see this message again", Opt_In::TEXT_DOMAIN); ?></a> |
| 94 | |
| 95 | <# } #> |
| 96 | |
| 97 | </div> |
| 98 | |
| 99 | <# } #> |
| 100 | |
| 101 | </div> |
| 102 | |
| 103 | </section> |
| 104 | |
| 105 | <# } #> |
| 106 | |
| 107 | <# if ( style === "simple" ){ #> |
| 108 | |
| 109 | </div> |
| 110 | |
| 111 | <# } #> |
| 112 | |
| 113 | <# if ( ( (cta_label && cta_url) || _.isTrue( types[type].add_never_see_link ) ) && style === "minimal" ) { #> |
| 114 | |
| 115 | <footer<# if (_.isTrue( types[type].add_never_see_link) && (!cta_label || !cta_url)){ #> class="wph-modal--has_nsam"<# } #><# if ((cta_label && cta_url) && (_.isFalse( types[type].add_never_see_link))){ #> class="wph-modal--has_cta"<# } #><# if ((cta_label && cta_url) && _.isTrue( types[type].add_never_see_link )){ #> class="wph-modal--has_both"<# } #>> |
| 116 | |
| 117 | <# if ( _.isTrue( types[type].add_never_see_link ) ){ #> |
| 118 | |
| 119 | <a href="#0" class="wph-modal-never-see-again" ><?php _e("Never see this message again", Opt_In::TEXT_DOMAIN); ?></a> |
| 120 | |
| 121 | <# } #> |
| 122 | |
| 123 | <# if ( cta_label && cta_url ){ #> |
| 124 | |
| 125 | <a href="{{cta_url}}" target="{{cta_target}}" class="wph-modal--cta">{{cta_label}}</a> |
| 126 | |
| 127 | <# } #> |
| 128 | |
| 129 | </footer><?php //FOR MINIMAL STYLE ONLY || available only if user added some data to call-to-action button section ?> |
| 130 | |
| 131 | <# } #> |
| 132 | |
| 133 | </div> |
| 134 | |
| 135 | </div> |
| 136 | |
| 137 | </script> |