-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.html
202 lines (189 loc) · 6.39 KB
/
index.html
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<html>
<head>
<script async src="dist/ethicalads.js"></script>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css"
/>
<style>
.dark.column,
.dark.columns {
background: #333;
color: #f0f0f0;
}
.column,
.columns {
padding: 2rem;
text-align: center;
}
.container {
margin-top: 5rem;
}
</style>
</head>
<body>
<div class="container">
<h1>EthicalAds</h1>
<div data-ea-publisher="ethicaladsio" data-ea-type="text" id="ad"></div>
<script>
var fn = (placements) => {
if (!placements.length) {
var elem = document.querySelector("#ad");
elem.innerHTML =
"Requests to ethicalads.io are blocked. Check your ad blocker";
}
};
setTimeout(() => {
ethicalads.wait.then(fn);
}, 1000);
</script>
<h2>Style tests</h2>
<span>
Switch ad display type:
</span>
<select id="display_change">
<option value="raise">Raised (default)</option>
<option value="flat">Flat</option>
<option value="bordered">Bordered</option>
</select>
<script>
const element = document.getElementById("display_change");
element.addEventListener("change", (event) => {
const nodes = document.querySelectorAll("[data-ea-type]");
const class_name = event.target.value;
for (const placement of nodes) {
if (!placement.hasAttribute("class_")) {
placement.setAttribute("class_", placement.className);
}
const old_classes = placement.getAttribute("class_");
placement.className = old_classes + " " + class_name;
}
});
</script>
<h3>Vertical image ad</h3>
<div class="row">
<div class="six columns">
<div class="light loaded" data-ea-type="image">
<div class="ea-content">
<a href="#" rel="nofollow" target="_blank"
><img src="https://via.placeholder.com/240x180.png"
/></a>
<div class="ea-text">
<a href="#" rel="nofollow" target="_blank"
><strong>EthicalAds</strong> is a developer-focused,
privacy-obsessed ad network from the fine folks at Read the
Docs</a
>
</div>
</div>
<div class="ea-callout">
<a href="https://ethicalads.io/">Ad by EthicalAds</a>
</div>
</div>
</div>
<div class="six dark columns">
<div class="dark loaded" data-ea-type="image">
<div class="ea-content">
<a href="#" rel="nofollow" target="_blank"
><img src="https://via.placeholder.com/240x180.png"
/></a>
<div class="ea-text">
<a href="#" rel="nofollow" target="_blank"
><strong>EthicalAds</strong> is a developer-focused,
privacy-obsessed ad network from the fine folks at Read the
Docs</a
>
</div>
</div>
<div class="ea-callout">
<a href="https://ethicalads.io/">Ad by EthicalAds</a>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<h3>Horizontal image ad</h3>
<div class="row">
<div class="six columns">
<div class="horizontal light loaded" data-ea-type="image">
<div class="ea-content">
<a href="#" rel="nofollow" target="_blank"
><img src="https://via.placeholder.com/240x180.png"
/></a>
<div class="ea-text">
<a href="#" rel="nofollow" target="_blank"
><strong>EthicalAds</strong> is a developer-focused,
privacy-obsessed ad network from the fine folks at Read the
Docs</a
>
</div>
</div>
<div class="ea-callout">
<a href="https://ethicalads.io/">Ad by EthicalAds</a>
</div>
</div>
</div>
<div class="six dark columns">
<div class="horizontal dark loaded" data-ea-type="image">
<div class="ea-content">
<a href="#" rel="nofollow" target="_blank"
><img src="https://via.placeholder.com/240x180.png"
/></a>
<div class="ea-text">
<a href="#" rel="nofollow" target="_blank"
><strong>EthicalAds</strong> is a developer-focused,
privacy-obsessed ad network from the fine folks at Read the
Docs</a
>
</div>
</div>
<div class="ea-callout">
<a href="https://ethicalads.io/">Ad by EthicalAds</a>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<h3>Text ad</h3>
<div class="row">
<div class="six columns">
<div class="light loaded" data-ea-type="text">
<div class="ea-content">
<div class="ea-text">
<a href="#" rel="nofollow" target="_blank"
><strong>EthicalAds</strong> is a developer-focused,
privacy-obsessed ad network from the fine folks at Read the
Docs</a
>
</div>
</div>
<div class="ea-callout">
<a href="https://ethicalads.io/">Ad by EthicalAds</a>
</div>
</div>
</div>
<div class="six dark columns">
<div class="dark loaded" data-ea-type="text">
<div class="ea-content">
<div class="ea-text">
<a href="#" rel="nofollow" target="_blank"
><strong>EthicalAds</strong> is a developer-focused,
privacy-obsessed ad network from the fine folks at Read the
Docs</a
>
</div>
</div>
<div class="ea-callout">
<a href="https://ethicalads.io/">Ad by EthicalAds</a>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<p></p>
</div>
</body>
</html>