View difference between Paste ID: Wt4C57iV and SXf8MJ7C
SHOW: | | - or go back to the newest paste.
1
---unit tag---
2
<amp-state id="tsvisibilityState">
3
<script type="application/json">
4
    {
5
        "clhideTs": false
6
    }
7
</script>
8
</amp-state>
9
<div style="height:100px">
10
<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=241963&said=722999&btype=hsticky
11-
<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=230667&said=722988&btype=hsticky
11+
12
<template type="amp-mustache"> 
13
<div id="cl-top-sticky" class="cl-ts-visible" [class]="tsvisibilityState.clhideTs ? 'cl-ts-hidden' : 'cl-ts-visible' " >
14
    <amp-iframe data-block-on-consent resizable
15
        id="clickio-ts-creative"
16
        height="100"
17
        layout="fixed-height"
18
        frameborder="0"
19
        sandbox="allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-top-navigation allow-top-navigation-by-user-activation"
20
        src="{{_frame_src}}"    
21
        on="message:AMP.setState({tsvisibilityState: {clhideTs: true}})">
22
        <div placeholder></div>
23
        <div overflow></div>
24
    </amp-iframe>
25
    <button class="cl-ts-close-button" on="tap:AMP.setState({tsvisibilityState: {clhideTs: true}})" style=""></button>
26
</div>
27
</template>
28
</amp-list>
29
</div>
30
31
32
---CSS Rules---
33
34-
#cl-top-sticky {
34+
 #cl-top-sticky {
35
    position: fixed;
36
    top: 0;
37
    left: 0;
38
    width: 100%;
39
    height: 100px;
40
    z-index: 2147483646;
41
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
42
    background-color: #fff;
43
}
44
.cl-ts-hidden {
45
    display: none;
46
}
47
.cl-ts-visible {
48
    display: block;
49
}
50
.cl-ts-close-button {
51
    position: absolute;
52
    bottom: -28px;
53
    width: 28px;
54
    height: 28px;
55
    right: 0;
56
    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>')
57
        9px 9px no-repeat #fff;
58
    box-shadow: -1px 2px 1px 0 rgba(0, 0, 0, 0.2);
59
    border: none;
60
    border-radius: 0 0 0 12px;
61
}
62
#clickio-ts-list:has(#clickio-ts-creative[height="100"][width="0"]) {
63
    display: none;
64
}