Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
165 lines (153 loc) · 4.13 KB
/
Copy pathindex.html
File metadata and controls
165 lines (153 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>discreto | live preview</title>
<meta name="HandheldFriendly" content="true"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="mobile-web-app-capable" content="yes"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<!--[if IEMobile]><meta http-equiv="cleartype" content="on"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style>
html, body {
height: 100%;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
font-weight: 300;
line-height: 1.4;
background: radial-gradient(#78b9e6, #d6dbdc) fixed center;
overflow: auto;
}
#live {
width: 720px;
max-width: 100%;
padding: 2em 1em;
margin: 0 auto;
box-sizing: border-box;
}
h1 {
font-size: 2em;
font-weight: 400;
margin: 0 0 2em;
}
h2 {
font-size: 1.5em;
font-weight: 400;
margin: 1.6em 0 0.8em;
}
h3 {
font-size: 1.3em;
font-weight: 200;
margin: 1em 0 0.5em;
}
p, ul, ol, dl, blockquote, iframe, article {
margin: 0 0 1em;
}
ul {
list-style: square outside;
}
ul, ol {
padding-left: 1em;
}
a {
text-decoration: underline;
}
a, a:visited {
color: #002b36;
}
a:hover, a:active {
color: #1e6ea7;
}
strong {
font-weight: 600;
}
code {
font-size: 1em;
color: inherit;
background: transparent;
border: none;
}
pre {
white-space: pre-wrap;
word-break: break-all;
word-wrap: break-word;
}
.ratio-16-9 {
position: relative;
margin-bottom: 1em;
}
.ratio-16-9:before {
content: "";
display: block;
padding-top: 56.25%;
}
.ratio-16-9 > * {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.logo {
display: inline-block;
vertical-align: bottom;
width: 48px;
height: auto;
}
.rollable, .rollable.unrolled {
overflow: hidden;
transition: max-height ease-in 250ms;
max-height: 240px;
}
.rolled {
max-height: 0;
transition: max-height ease-out 250ms;
}
</style>
</head>
<body>
<div id="live">
<h1><img class="logo" src="../img/discreto.png" alt=""/> discreto</h1>
<!-- Players & viewers -->
<h2>Embedded media</h2>
<p>You'll need to accept YouTube & SoundCloud to listen to the music:</p>
<div class="ratio-16-9">
<iframe data-discreto="youtube*"
data-src="https://www.youtube.com/embed/S-u6qdeaPoE?autoplay=1&autohide=1&showinfo=0"
frameborder="0" allowfullscreen></iframe>
</div>
<iframe data-discreto="soundcloud*"
data-src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/608315862&auto_play=true&hide_related=true&show_comments=false&show_user=false&show_reposts=false&show_teaser=false&visual=true"
width="100%" height="300" scrolling="no" frameborder="no"></iframe>
<!-- Embedded -->
<h2>Embedded services</h2>
<p>Google Maps has no consent defined, but you can still accept it once:</p>
<div class="ratio-16-9">
<iframe data-discreto="googleMaps*"
data-src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2625.4056418605937!2d2.3877619156740817!3d48.85047477928667!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47e67274a4ac0037%3A0xe1b6cd2c8095d4c5!2sRue%20de%20Montreuil%2C%2075011%20Paris!5e0!3m2!1sfr!2sfr!4v1580168960990!5m2!1sfr!2sfr"
frameborder="0" allowfullscreen></iframe>
</div>
<!-- DOM -->
<h2>DOM elements</h2>
<p>You can switch between two messages, depending on the user's choice:</p>
<div class="rollable rolled" data-class="unrolled" data-discreto="_consent">
<p><strong>Custom consent</strong> is on, turn off to hide this message.</p>
</div>
<div class="rollable rolled" data-class="rolled" data-discreto="_consent">
<p>Turn <strong>Custom consent</strong> back on!</p>
</div>
<!-- Custom HTML -->
<h2>Custom HTML</h2>
<p>You can inject custom HTML, including <script>:</p>
<div class="rollable rolled" data-class="rolled" data-discreto="_html">
<p>Enable <strong>Custom HTML</strong> to see the comments.</p>
</div>
<!-- Comments will be injected here: _.$('#live').appendChild() -->
</div>
<script>window.discretoConf="./config.json";</script>
<script src="../src/discreto.js" type="module"></script>
</body>
</html>