| 1 |
<?php |
| 2 |
/** |
| 3 |
* @var SE_License_SDK_Insights $this |
| 4 |
* @var array $what_tracked |
| 5 |
* @var string $terms_policy_text |
| 6 |
*/ |
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; |
| 9 |
} |
| 10 |
?> |
| 11 |
<div class="se-sdk-product-<?php echo esc_attr( $this->client->getSlug() ); ?> se-sdk-insights-notice updated" style="--se-sdk-primary-color: <?php echo esc_attr( $this->client->getPrimaryColor() ); ?>;"> |
| 12 |
<?php if ( $this->client->getProductLogo() ) { ?> |
| 13 |
<div class="se-sdk-insights-notice-branding"> |
| 14 |
<img width="100" height="100" src="<?php echo esc_attr( $this->client->getProductLogo() ); ?>" alt="<?php echo esc_attr( $this->client->getPackageName() ); ?>"> |
| 15 |
</div> |
| 16 |
<?php } ?> |
| 17 |
<div class="se-sdk-insights-notice-data"> |
| 18 |
<div class="se-sdk-insights-notice--message"> |
| 19 |
<?php echo wp_kses_post( $this->notice ); ?> |
| 20 |
</div> |
| 21 |
<?php if ( $what_tracked ) { ?> |
| 22 |
<details> |
| 23 |
<summary><?php esc_html_e( 'What we collect?', 'storeengine-sdk' ); ?></summary> |
| 24 |
<div class="description"> |
| 25 |
<ul> |
| 26 |
<?php foreach ( $what_tracked as $key => $item ) { ?> |
| 27 |
<li class="trac-<?php echo esc_attr( $key ); ?>">� |
| 28 |
<?php echo esc_html( $item ); ?></li> |
| 29 |
<?php } ?> |
| 30 |
</ul> |
| 31 |
</div> |
| 32 |
</details> |
| 33 |
<?php } ?> |
| 34 |
<div class="se-sdk-insights--opt-in-submit"> |
| 35 |
<?php if ( $terms_policy_text ) { ?> |
| 36 |
<p class="se-sdk-insights-notice--des"><?php echo wp_kses_post( $terms_policy_text ); ?></p> |
| 37 |
<?php } ?> |
| 38 |
<div class="buttons"> |
| 39 |
<a href="<?php echo esc_url( $this->get_opt_in_url() ); ?>" class="button button-primary"><?php esc_html_e( 'Yes, keep me updated', 'storeengine-sdk' ); ?></a> |
| 40 |
<a href="<?php echo esc_url( $this->get_opt_out_url() ); ?>" class="button button-secondary"><?php esc_html_e( 'No thanks', 'storeengine-sdk' ); ?></a> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
</div> |
| 45 |
<style> |
| 46 |
.se-sdk-insights-notice { |
| 47 |
display: flex; |
| 48 |
flex-direction: row; |
| 49 |
gap: 24px; |
| 50 |
color: #1E1E1E; |
| 51 |
padding: 24px 32px !important; |
| 52 |
border-width: 0 !important; |
| 53 |
border-left-color: var( --se-sdk-primary-color ) !important; |
| 54 |
border-left-width: 4px !important; |
| 55 |
} |
| 56 |
|
| 57 |
@media (max-width: 768px) { |
| 58 |
.se-sdk-insights-notice { |
| 59 |
display: flex; |
| 60 |
flex-direction: column; |
| 61 |
gap: 0; |
| 62 |
padding: 12px 16px !important; |
| 63 |
} |
| 64 |
|
| 65 |
.se-sdk-insights--opt-in-submit { |
| 66 |
display: flex; |
| 67 |
flex-direction: column; |
| 68 |
} |
| 69 |
|
| 70 |
.se-sdk-insights-notice-branding { |
| 71 |
display: flex; |
| 72 |
justify-content: center; |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
.se-sdk-insights-notice details summary, |
| 77 |
.se-sdk-insights-notice a, |
| 78 |
.se-sdk-insights-notice .highlight { |
| 79 |
background-color: transparent; |
| 80 |
color: var( --se-sdk-primary-color ); |
| 81 |
} |
| 82 |
|
| 83 |
.se-sdk-insights-notice details { |
| 84 |
margin-bottom: 16px; |
| 85 |
} |
| 86 |
.se-sdk-insights-notice details summary { |
| 87 |
cursor: pointer; |
| 88 |
text-decoration: underline; |
| 89 |
font-size: 14px; |
| 90 |
} |
| 91 |
|
| 92 |
.se-sdk-insights-notice a:focus { |
| 93 |
box-shadow: 0 0 0 2px var( --se-sdk-primary-color ); |
| 94 |
} |
| 95 |
|
| 96 |
.se-sdk-insights-notice--title { |
| 97 |
color: #1E1E1E; |
| 98 |
font-size: 20px; |
| 99 |
font-style: normal; |
| 100 |
font-weight: 600; |
| 101 |
line-height: 30px; |
| 102 |
margin: 0 0 8px; |
| 103 |
} |
| 104 |
|
| 105 |
.se-sdk-insights-notice.updated p { |
| 106 |
margin: 0; |
| 107 |
padding: 0; |
| 108 |
} |
| 109 |
|
| 110 |
.se-sdk-insights-notice--des { |
| 111 |
color: #595959; |
| 112 |
font-size: 14px; |
| 113 |
font-style: normal; |
| 114 |
font-weight: 400; |
| 115 |
line-height: 20px; |
| 116 |
margin-bottom: 16px; |
| 117 |
} |
| 118 |
|
| 119 |
.se-sdk-insights-notice .description { |
| 120 |
margin-bottom: 16px; |
| 121 |
color: #0F0E16; |
| 122 |
font-size: 14px; |
| 123 |
font-style: normal; |
| 124 |
font-weight: 500; |
| 125 |
line-height: 20px; |
| 126 |
} |
| 127 |
|
| 128 |
.se-sdk-insights-notice .description ul { |
| 129 |
list-style: none; |
| 130 |
} |
| 131 |
.se-sdk-insights-notice .description li { |
| 132 |
margin-bottom: 8px; |
| 133 |
} |
| 134 |
|
| 135 |
.se-sdk-insights-notice--message { |
| 136 |
margin-bottom: 16px; |
| 137 |
} |
| 138 |
|
| 139 |
.se-sdk-insights--opt-in-submit { |
| 140 |
display: flex; |
| 141 |
flex-direction: column; |
| 142 |
gap: 16px; |
| 143 |
margin: 0; |
| 144 |
padding: 0 |
| 145 |
} |
| 146 |
|
| 147 |
.se-sdk-insights--opt-in-submit .buttons { |
| 148 |
margin-right: auto; |
| 149 |
display: flex; |
| 150 |
gap: 12px |
| 151 |
} |
| 152 |
|
| 153 |
.se-sdk-insights--opt-in-submit .buttons a.button-primary { |
| 154 |
border-radius: 4px; |
| 155 |
padding: 6px 12px; |
| 156 |
color: #FFFFFF; |
| 157 |
background: var( --se-sdk-primary-color ); |
| 158 |
text-align: center; |
| 159 |
font-size: 14px; |
| 160 |
font-style: normal; |
| 161 |
font-weight: 500; |
| 162 |
line-height: 20px; |
| 163 |
border: none; |
| 164 |
height: auto !important; |
| 165 |
} |
| 166 |
.se-sdk-insights--opt-in-submit .buttons a.button-primary:focus { |
| 167 |
box-shadow: 0 0 0 1px #fff, 0 0 0 3px var( --se-sdk-primary-color ); |
| 168 |
} |
| 169 |
|
| 170 |
.se-sdk-insights--opt-in-submit .buttons a.button-secondary { |
| 171 |
border: 1px solid #DEDEDE; |
| 172 |
border-radius: 4px; |
| 173 |
padding: 6px 12px; |
| 174 |
text-align: center; |
| 175 |
font-size: 14px; |
| 176 |
font-style: normal; |
| 177 |
font-weight: 500; |
| 178 |
line-height: 20px; |
| 179 |
color: #0F0E16; |
| 180 |
background: #FFFFFF; |
| 181 |
height: auto !important; |
| 182 |
} |
| 183 |
.se-sdk-insights--opt-in-submit .buttons a.button-secondary:focus { |
| 184 |
box-shadow: 0 0 0 1px #fff, 0 0 0 2px #DEDEDE; |
| 185 |
} |
| 186 |
</style> |
| 187 |
<?php |
| 188 |
|