SHOW:
|
|
- or go back to the newest paste.
| 1 | - | Carasycaretas_AMP_320x50 HS(Top) |
| 1 | + | Carasycaretas_AMP_Splash |
| 2 | ||
| 3 | 1. Paste this code in the <head> section of the AMP page: | |
| 4 | Important: This code should only be added once. Ensure these elements are not already present before adding. In AMP, each library can only be included once, and duplicating the inclusion will result in an error, causing your AMP page to become invalid. | |
| 5 | ||
| 6 | <script async src="https://cdn.ampproject.org/v0/amp-list-0.1.mjs" custom-element="amp-list" type="module" crossorigin="anonymous"></script> | |
| 7 | <script async nomodule src="https://cdn.ampproject.org/v0/amp-list-0.1.js" custom-element="amp-list" crossorigin="anonymous"></script> | |
| 8 | ||
| 9 | <script async src="https://cdn.ampproject.org/v0/amp-mustache-0.2.mjs" custom-template="amp-mustache" type="module" crossorigin="anonymous"></script> | |
| 10 | <script async nomodule src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js" custom-template="amp-mustache" crossorigin="anonymous"></script> | |
| 11 | ||
| 12 | - | <script async src="https://cdn.ampproject.org/v0/amp-bind-0.1.mjs" custom-element="amp-bind" type="module" crossorigin="anonymous"></script> |
| 12 | + | |
| 13 | - | <script async nomodule src="https://cdn.ampproject.org/v0/amp-bind-0.1.js" custom-element="amp-bind" crossorigin="anonymous"></script> |
| 13 | + | |
| 14 | 2. Insert the following CSS styles in your tag <style amp-custom> on the AMP page: | |
| 15 | ||
| 16 | #clickio-splash-list{right:auto;left:0;min-height:1px;width:100%}#clickio-splash-iframe{margin:0;overflow:visible;min-width:100%;opacity:0}#clickio-splash-iframe,#clickio-splash-list{position:fixed;top:100vh;bottom:-100px;z-index:-1}#clickio-splash-iframe:not([height="100"]){top:0;bottom:0;max-height:100%;max-width:100%;opacity:1;z-index:2147483647}#clickio-splash-list:has(#clickio-splash-iframe:not([height="100"])){z-index:2147483647}#clickio-splash-list:has(#clickio-splash-iframe[height="100"][width="0"]){display:none}#clickio-splash-iframe[height="100"][width="0"]{display:none}
| |
| 17 | ||
| 18 | - | #cl-top-sticky{position:fixed;top:66px;left:0;width:100%;height:50px;z-index:2147483646;box-shadow:0 2px 5px rgba(0,0,0,.3);background-color:#fff}.cl-ts-hidden{display:none}.cl-ts-visible{display:block}.cl-ts-close-button{position:absolute;bottom:-28px;width:28px;height:28px;right:0;background:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="341 8 13 13"><path fill="%234F4F4F" fill-rule="evenodd" d="M354 9.31 352.69 8l-5.19 5.19L342.31 8 341 9.31l5.19 5.19-5.19 5.19 1.31 1.31 5.19-5.19 5.19 5.19 1.31-1.31-5.19-5.19z"/></svg>') 9px 9px no-repeat #fff;box-shadow:-1px 2px 1px 0 rgba(0,0,0,.2);border:none;border-radius:0 0 0 12px}#clickio-ts-list:has(#clickio-ts-creative[height="50"][width="0"]){display:none}#clickio-ts-list:has(#clickio-ts-creative[style*="width:"][style*="0px"]){display:none;}#clickio-ts-list{height:50px}
|
| 18 | + | |
| 19 | 3. Add this code at the beginning of the <body> of your AMP page before all other elements: | |
| 20 | ||
| 21 | <amp-list id="clickio-splash-list" layout="fill" data-block-on-consent="_till_responded" src="https://cns.clickiocdn.com/splash?source_url=SOURCE_URL&canonical_url=CANONICAL_URL&counter=COUNTER&document_referrer=DOCUMENT_REFERRER&viewer=VIEWER&scr_w=AVAILABLE_SCREEN_WIDTH&scr_h=AVAILABLE_SCREEN_HEIGHT&sid=238851&said=733755&btype=splash"> | |
| 22 | <template type="amp-mustache"> | |
| 23 | <div> | |
| 24 | - | <amp-state id="tsvisibilityState"> |
| 24 | + | <amp-iframe width="{{scr_w}}" height="100" layout="responsive" id="clickio-splash-iframe" sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-top-navigation allow-top-navigation-by-user-activation" resizable frameborder="0" src="{{iframeSrc}}?canon={{canonSrc}}&w={{scr_w}}&h={{scr_h}}">
|
| 25 | - | <script type="application/json"> |
| 25 | + | <div overflow></div> |
| 26 | - | {
|
| 26 | + | <div placeholder></div> |
| 27 | - | "clhideTs": false |
| 27 | + | </amp-iframe> |
| 28 | - | } |
| 28 | + | |
| 29 | - | </script> |
| 29 | + | |
| 30 | - | </amp-state> |
| 30 | + | |
| 31 | - | <div style="height:50px"> |
| 31 | + |