Advertisement
clickio

nextmoto.it

Jul 4th, 2025
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. nextmoto.it
  2.  
  3. 1. Paste this code in the <head> section of the AMP page:
  4.  
  5. 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.
  6.  
  7. <script async src="https://cdn.ampproject.org/v0/amp-list-0.1.js" custom-element="amp-list"></script>
  8. <script async src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js" custom-element="amp-iframe"></script>
  9. <script async src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js" custom-template="amp-mustache"></script>
  10. <script async src="https://cdn.ampproject.org/v0/amp-bind-0.1.js" custom-element="amp-bind"></script>
  11.  
  12. 2. Insert the following CSS styles in your tag <style amp-custom> on the AMP page:
  13.  
  14. <amp-state id="tsvisibilityState">
  15. <script type="application/json">
  16.     {
  17.         "clhideTs": false
  18.     }
  19. </script>
  20. </amp-state>
  21. <div style="height:100px">
  22. <amp-list id="clickio-ts-list" layout="fill" data-block-on-consent src="https://cns.clickiocdn.com/amp_360?source_url=SOURCE_URL&canon=CANONICAL_URL&counter=COUNTER&document_referrer=DOCUMENT_REFERRER&viewer=VIEWER&scr_w=AVAILABLE_SCREEN_WIDTH&scr_h=AVAILABLE_SCREEN_HEIGHT&sid=231167&said=723003&btype=hsticky">
  23. <template type="amp-mustache">
  24. <div id="cl-top-sticky" class="cl-ts-visible" [class]="tsvisibilityState.clhideTs ? 'cl-ts-hidden' : 'cl-ts-visible' " >
  25.     <amp-iframe data-block-on-consent resizable
  26.        id="clickio-ts-creative"
  27.        height="100"
  28.        layout="fixed-height"
  29.        frameborder="0"
  30.        sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-top-navigation allow-top-navigation-by-user-activation"
  31.        src="{{_frame_src}}"    
  32.        on="message:AMP.setState({tsvisibilityState: {clhideTs: true}})">
  33.         <div placeholder></div>
  34.         <div overflow></div>
  35.     </amp-iframe>
  36.     <button class="cl-ts-close-button" on="tap:AMP.setState({tsvisibilityState: {clhideTs: true}})" style=""></button>
  37. </div>
  38. </template>
  39. </amp-list>
  40. </div>
  41.  
  42.  
  43. 3. Add this code at the beginning of the <body> of your AMP page before all other elements:
  44.  
  45. #cl-top-sticky{position:fixed;top:0px;left:0;width:100%;height:100px;z-index:2147483640;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="100"][width="0"]){display:none}#clickio-ts-list:has(#clickio-ts-creative[style*="width:"][style*="0px"]){display:none;}#clickio-ts-list{height:100px}
  46. aside.m-ctr{z-index:2147483646;}label.fsc{z-index:2147483640;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement