Carasycaretas_AMP_Splash
1. Paste this code in the <head> section of the AMP page:
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.
<script async src="https://cdn.ampproject.org/v0/amp-list-0.1.mjs" custom-element="amp-list" type="module" crossorigin="anonymous"></script>
<script async nomodule src="https://cdn.ampproject.org/v0/amp-list-0.1.js" custom-element="amp-list" crossorigin="anonymous"></script>
<script async src="https://cdn.ampproject.org/v0/amp-mustache-0.2.mjs" custom-template="amp-mustache" type="module" crossorigin="anonymous"></script>
<script async nomodule src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js" custom-template="amp-mustache" crossorigin="anonymous"></script>
2. Insert the following CSS styles in your tag <style amp-custom> on the AMP page:
#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}
3. Add this code at the beginning of the <body> of your AMP page before all other elements:
<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">
<template type="amp-mustache">
<div>
<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}}">
<div overflow></div>
<div placeholder></div>
</amp-iframe>
</div>
</template>
</amp-list>
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|0 👍
/0 👎
0 B
|0 👍
/0 👎