-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·364 lines (350 loc) · 24.6 KB
/
index.html
File metadata and controls
executable file
·364 lines (350 loc) · 24.6 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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<!DOCTYPE html>
<html lang="en">
<head>
<title>sandboxTheme JS Features</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
<script src="assets/jquery-3.6.0.js"></script>
<link rel="stylesheet" href="css/style.css" />
<script src="sandboxTheme.js"></script>
<script src="features/feature/feature.js"></script>
<link rel="stylesheet" href="features/feature/feature.css" />
<script src="features/accordeon/accordeon.js"></script>
<link rel="stylesheet" href="features/accordeon/accordeon.css" />
<script src="features/scrolled/scrolled.js"></script>
<link rel="stylesheet" href="features/scrolled/scrolled.css" />
<script src="features/scrollindicator/scrollindicator.js"></script>
<link rel="stylesheet" href="features/scrollindicator/scrollindicator.css" />
<script src="features/scrollto/scrollto.js"></script>
<script src="features/youtube_embed/youtube_embed.js"></script>
<link rel="stylesheet" href="features/youtube_embed/youtube_embed.css" />
<script src="features/frame_embed/frame_embed.js"></script>
<link rel="stylesheet" href="features/frame_embed/frame_embed.css" />
</head>
<body>
<div id="top"></div>
<header class="site-header">
<div class="site-logo">
<svg id="dev-themes-logo" viewBox="0 0 450 140" xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
#dev-themes-logo path,
#dev-themes-logo circle{
fill:currentColor;
}
</style>
<circle id="dev-themes-logo-dot" cx="33.694" cy="106.33" r="2.3722"/>
<path id="dev-themes-logo-dev" d="m46.223 67.959c-0.77756 0-1.3375 0.18127-1.6805 0.54719-0.32016 0.34303-0.48098 0.9395-0.48098 1.7857 0 0.84617 0.16081 1.4509 0.48098 1.8168 0.34303 0.34303 0.90296 0.51409 1.6805 0.51409h3.842v31.389h-3.842c-0.77756 0-1.3375 0.18326-1.6805 0.54914-0.32016 0.34303-0.48098 0.93755-0.48098 1.7837 0 0.84617 0.16081 1.4529 0.48098 1.8188 0.34303 0.34303 0.90296 0.51409 1.6805 0.51409h16.157c3.5905 0 6.7483-0.81233 9.4697-2.4361 2.7215-1.6466 4.8247-4.0023 6.3112-7.0668 1.5094-3.0645 2.2647-6.6764 2.2647-10.839s-0.75533-7.7761-2.2647-10.841c-1.4865-3.0874-3.5897-5.443-6.3112-7.0668-2.7215-1.6466-5.8792-2.4692-9.4697-2.4692zm42.126 0c-0.77757 0-1.3375 0.18127-1.6805 0.54719-0.32016 0.34303-0.48098 0.9395-0.48098 1.7857 0 0.84617 0.16081 1.4509 0.48098 1.8168 0.34303 0.34303 0.90296 0.51409 1.6805 0.51409h3.4993v31.389h-3.4993c-0.77757 0-1.3375 0.18326-1.6805 0.54914-0.32016 0.34303-0.48098 0.93755-0.48098 1.7837 0 0.84617 0.16081 1.4529 0.48098 1.8188 0.34303 0.34303 0.90296 0.51409 1.6805 0.51409h30.668c0.77756 0 1.3253-0.17104 1.6455-0.51409 0.34304-0.36591 0.51603-0.97261 0.51603-1.8188v-10.188c0-0.80043-0.1954-1.3725-0.58419-1.7156-0.38878-0.34303-1.0525-0.51409-1.9901-0.51409-0.93765 0-1.5994 0.17104-1.9882 0.51409-0.38878 0.34303-0.58419 0.91514-0.58419 1.7156v7.8554h-19.039v-13.995h8.8505v3.1215c0 0.80043 0.17104 1.3725 0.51409 1.7156 0.36591 0.34303 1.0072 0.51409 1.922 0.51409 0.91479 0 1.5439-0.17104 1.8869-0.51409 0.36591-0.34303 0.54914-0.91514 0.54914-1.7156v-10.909c0-0.80043-0.18322-1.3725-0.54914-1.7156-0.34303-0.34303-0.97215-0.51409-1.8869-0.51409-0.91477 0-1.5561 0.17104-1.922 0.51409-0.34303 0.34303-0.51409 0.91514-0.51409 1.7156v3.1215h-8.8505v-12.728h18.353v6.3813c0 0.80043 0.19345 1.3725 0.58224 1.7156 0.38878 0.34303 1.0525 0.51409 1.9901 0.51409 0.93765 0 1.6014-0.17104 1.9902-0.51409 0.38878-0.34303 0.58224-0.91514 0.58224-1.7156v-8.7122c0-0.84618-0.17103-1.4426-0.51408-1.7857-0.3202-0.36591-0.86791-0.54719-1.6455-0.54719zm39.725 0c-0.77757 0-1.3394 0.18127-1.6825 0.54719-0.32016 0.34303-0.47904 0.9395-0.47904 1.7857 0 0.84617 0.15885 1.4509 0.47904 1.8168 0.34303 0.34303 0.9049 0.51409 1.6825 0.51409h2.6055l12.213 34.58c0.27441 0.77757 0.6979 1.3375 1.2696 1.6805 0.5946 0.36591 1.3826 0.54914 2.366 0.54914 1.0063 0 1.7962-0.17299 2.3679-0.51604 0.59461-0.34303 1.0405-0.91319 1.3378-1.7136l12.315-34.58h2.6406c0.77757 0 1.3272-0.17104 1.6474-0.51409 0.34304-0.36591 0.51409-0.97066 0.51409-1.8168 0-0.84618-0.17104-1.4426-0.51409-1.7857-0.32019-0.36591-0.86985-0.54719-1.6474-0.54719h-11.456c-0.77758 0-1.3394 0.18127-1.6825 0.54719-0.32016 0.34303-0.47903 0.9395-0.47903 1.7857 0 0.84617 0.15885 1.4509 0.47903 1.8168 0.34304 0.34303 0.90491 0.51409 1.6825 0.51409h3.4292l-10.599 30.325-10.498-30.325h4.8371c0.77755 0 1.3272-0.17104 1.6474-0.51409 0.34303-0.36591 0.51409-0.97066 0.51409-1.8168 0-0.84618-0.17104-1.4426-0.51409-1.7857-0.32016-0.36591-0.86986-0.54719-1.6474-0.54719zm-72.862 4.6638h6.3794c2.7215 0 5.0893 0.60668 7.1018 1.8188 2.0125 1.2121 3.568 2.9956 4.6657 5.3512 1.0977 2.3327 1.6455 5.181 1.6455 8.5428s-0.54774 6.2204-1.6455 8.5759c-1.0977 2.3327-2.6532 4.104-4.6657 5.3161-2.0125 1.1892-4.3803 1.7837-7.1018 1.7837h-6.3794z"/>
<path id="dev-themes-logo-themes" d="m402.02 29.5c-11.523 0.1141-16.429 8.0991-16.429 19.736 0 22.019 30.577 21.335 30.577 41.528 0 9.6973-3.7661 17.341-14.262 17.341s-14.26-7.6434-14.26-17.341v-3.9939h-2.3952v3.879c0 11.066 4.5622 19.851 16.655 19.851 12.207 0 16.772-8.7845 16.772-19.851 0-21.676-30.577-21.105-30.577-41.526 0-9.4691 3.5383-17.343 14.034-17.343 10.382 0 13.917 7.9865 13.917 17.456v1.5968h2.5101v-1.4819c0-10.952-4.4492-19.851-16.542-19.851zm-237.53 0.57056v2.3952h17.456v77.464h2.5081v-77.464h17.456v-2.3952zm44.402 0v79.859h2.5101v-38.788h28.863v38.788h2.5101v-79.859h-2.5101v38.788h-28.863v-38.788zm42.691 0v79.859h30.462v-2.3952h-27.952v-36.964h23.502v-2.2822h-23.502v-35.823h27.952v-2.3952zm39.041 0v79.859h2.2803v-76.095l19.738 75.867h2.8528l19.621-75.867v76.095h2.5101v-79.859h-3.879l-19.623 75.752-19.621-75.752zm55.81 0v79.859h30.462v-2.3952h-27.952v-36.964h23.502v-2.2822h-23.502v-35.823h27.952v-2.3952z"/>
</svg>
</div>
<div class="site-title">sandboxTheme JS</div>
<nav class="header-bar">
<ul class="menu">
<li class="menu-item item-dev"><a href="#">Dev</a></li>
<!-- <li class="menu-item item-docs"><a href="docs/index.html">Docs</a></li> -->
<li class="menu-item item-features"><a href="index.html">Features</a></li>
<li class="menu-item item-about"><a rel="scrollto" href="#about">About</a></li>
</ul>
</nav>
</header>
<main>
<aside id="content-before" class="content-before sidebar">
<h2>Features</h2>
<ol class="menu">
<li class="menu-item item-feature"><a rel="scrollto" href="#feature">Feature</a></li>
<li class="menu-item item-accordeon"><a rel="scrollto" href="#accordeon">Accordeon</a></li>
<li class="menu-item item-scrolled"><a rel="scrollto" href="#scrolled">Scrolled</a></li>
<li class="menu-item item-scrollindicator"><a rel="scrollto" href="#scrollindicator">Scrollindicator</a></li>
<li class="menu-item item-scrollto"><a rel="scrollto" href="#scrollto">Scrollto</a></li>
<li class="menu-item item-youtube_embed"><a rel="scrollto" href="#youtube_embed">Youtube Embed</a></li>
<li class="menu-item item-frame_embed"><a rel="scrollto" href="#frame_embed">Iframe Embed</a></li>
</ol>
<!--
<h3>ABOUT</h3>
<p>Diese Webstie soll ein paar wichtige Aktionen erklären die sich sehr nützlich und hilfreich für deine nächste Websitedarstelle können.</p>
<br>
<p>Als aller erstes wir erklärt wofür SVG verwendet wird und die Vorteile von SVG</p>
<br>
<p>Danach wird die Accordeon Function erklärt.Zum Beispiel wofür sie genutzt wir und was diese Function überhaupt machen kann</p>
-->
</aside>
<article id="content">
<h1 class="title">sandboxTheme JS Features</h1>
<section id="feature">
<h2>Feature</h2>
<div class="content">
<p>Feature ist das Grundgerüst eines Features. Du kannst dieses Feature einfach als Codebasis verwenden.</p>
<p>In Feature gibt es sehr viele Erklärungen zu jeder einzelnen Methode.</p>
<p>In der Javascript-Console deines Browsers kannst du die Logs von Feature ansehen.</p>
<h3>Config</h3>
<pre class="language-js"><code class="language-js">options: {
classNames:{
active: 'active',
dummy: 'dummy'
},
selectors: {
container: '.feature-dummy',
dummy: '.dummy',
},
texts: {
dummy: 'move your mouse over the box'
}
},</code></pre>
<h3>Beispiel</h3>
<div class="feature-dummy">
<h4>Dummy Box</h4>
</div>
<p>Bewege deine Maus über die Dummy Box und beobachte dabei die Javascript Console deines Browsers</p>
<img src="img/features-feature-console.png" />
</div>
<p class="more">
<a target="_blank" rel="noreferrer noopener" href="https://github.com/netzgestaltung/sandboxTheme-js/blob/main/features/feature/feature.js">Source File</a>
</p>
</section>
<section id="accordeon">
<h2>Accordeon</h2>
<div class="content">
<p>Zeigt und versteckt Inhalte, die sich in einem konfigurierbaren Container befinden, gruppiert nach Überschriften, die ebenfalls konfiguriert werden können.</p>
<h3>Config</h3>
<p>Alle Überschriften "H3", die in einen Element mit ".content" class Attribut enthalten sind, verstecken alle darauf folgenden Inhalte bis zur jeweils nächsten "H3" Überschrift.</p>
<pre class="language-js"><code class="language-js">options: {
/**
* Index of Accordeon to open.
*
* First number is the index of the content if there are more then one.
* Second number ist the index of the accordeon in that content to open.
* Empty string let all accordeons be closed exept there is a hash opener in the URL.
*
* @type {String} String containing two numbers.
* @example
* '01' Opens the second accordeon in the first content occurances
*/
open_index: '',
selectors: {
content: '.content',
heading: 'h3'
},
classNames: {
heading: 'heading',
content: 'content',
active: 'active',
enabled: 'enabled',
}
},</code></pre>
<p><strong>open_index:</strong> Legt fest, welches accordeon beim Seitenladen geöffnet sein soll.</p>
<p>Wird von einem Hash, beispielsweise "#accordeon-02" überschrieben.</p>
<p><strong>selectors:</strong> Legt die Container- und Überschriftenelemente fest.</p>
<h3>Beispiel</h3>
<p>Ich bin ein Beispiel</p>
<h4>HTML</h4>
<pre class="language-html"><code class="language-html"><div class="content">
<h3>Beispiel</h3>
<p>Ich bin ein Beispiel</p>
</div></code></pre>
</div>
<p class="more">
<a target="_blank" rel="noreferrer noopener" href="https://github.com/netzgestaltung/sandboxTheme-js/blob/main/features/accordeon/accordeon.js">Source File</a>
</p>
</section>
<section id="scrolled">
<h2>Scrolled</h2>
<div class="content">
<p>Überwacht ob vom Beginn der Seite aus gescrollt wurde und fügt dem HTML "body" Element eine Klasse "scrolled" hinzu wenn es zutrifft.</p>
<h3>Config</h3>
<pre class="language-js"><code class="language-js">/**
* @member {object} config feature options.
* @property {number} offset the scroll treshold when to trigger the switch
*
* @memberof andboxTheme.features.scrolled
*/
config: {
offset: 100
},</code></pre>
<p><strong>Offset:</strong> In der Configuration kann eingestell werden ab welcher Scrollweite in Pixel das geschehen soll</p>
<h3>Beispiel</h3>
<p>Scrolle rauf und runter um den Effekt zu sehen.</p>
<svg id="dev-themes-logo" viewBox="0 0 450 140" xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
#dev-themes-logo path,
#dev-themes-logo circle{
fill:currentColor;
}
</style>
<circle id="dev-themes-logo-dot" cx="33.694" cy="106.33" r="2.3722"/>
<path id="dev-themes-logo-dev" d="m46.223 67.959c-0.77756 0-1.3375 0.18127-1.6805 0.54719-0.32016 0.34303-0.48098 0.9395-0.48098 1.7857 0 0.84617 0.16081 1.4509 0.48098 1.8168 0.34303 0.34303 0.90296 0.51409 1.6805 0.51409h3.842v31.389h-3.842c-0.77756 0-1.3375 0.18326-1.6805 0.54914-0.32016 0.34303-0.48098 0.93755-0.48098 1.7837 0 0.84617 0.16081 1.4529 0.48098 1.8188 0.34303 0.34303 0.90296 0.51409 1.6805 0.51409h16.157c3.5905 0 6.7483-0.81233 9.4697-2.4361 2.7215-1.6466 4.8247-4.0023 6.3112-7.0668 1.5094-3.0645 2.2647-6.6764 2.2647-10.839s-0.75533-7.7761-2.2647-10.841c-1.4865-3.0874-3.5897-5.443-6.3112-7.0668-2.7215-1.6466-5.8792-2.4692-9.4697-2.4692zm42.126 0c-0.77757 0-1.3375 0.18127-1.6805 0.54719-0.32016 0.34303-0.48098 0.9395-0.48098 1.7857 0 0.84617 0.16081 1.4509 0.48098 1.8168 0.34303 0.34303 0.90296 0.51409 1.6805 0.51409h3.4993v31.389h-3.4993c-0.77757 0-1.3375 0.18326-1.6805 0.54914-0.32016 0.34303-0.48098 0.93755-0.48098 1.7837 0 0.84617 0.16081 1.4529 0.48098 1.8188 0.34303 0.34303 0.90296 0.51409 1.6805 0.51409h30.668c0.77756 0 1.3253-0.17104 1.6455-0.51409 0.34304-0.36591 0.51603-0.97261 0.51603-1.8188v-10.188c0-0.80043-0.1954-1.3725-0.58419-1.7156-0.38878-0.34303-1.0525-0.51409-1.9901-0.51409-0.93765 0-1.5994 0.17104-1.9882 0.51409-0.38878 0.34303-0.58419 0.91514-0.58419 1.7156v7.8554h-19.039v-13.995h8.8505v3.1215c0 0.80043 0.17104 1.3725 0.51409 1.7156 0.36591 0.34303 1.0072 0.51409 1.922 0.51409 0.91479 0 1.5439-0.17104 1.8869-0.51409 0.36591-0.34303 0.54914-0.91514 0.54914-1.7156v-10.909c0-0.80043-0.18322-1.3725-0.54914-1.7156-0.34303-0.34303-0.97215-0.51409-1.8869-0.51409-0.91477 0-1.5561 0.17104-1.922 0.51409-0.34303 0.34303-0.51409 0.91514-0.51409 1.7156v3.1215h-8.8505v-12.728h18.353v6.3813c0 0.80043 0.19345 1.3725 0.58224 1.7156 0.38878 0.34303 1.0525 0.51409 1.9901 0.51409 0.93765 0 1.6014-0.17104 1.9902-0.51409 0.38878-0.34303 0.58224-0.91514 0.58224-1.7156v-8.7122c0-0.84618-0.17103-1.4426-0.51408-1.7857-0.3202-0.36591-0.86791-0.54719-1.6455-0.54719zm39.725 0c-0.77757 0-1.3394 0.18127-1.6825 0.54719-0.32016 0.34303-0.47904 0.9395-0.47904 1.7857 0 0.84617 0.15885 1.4509 0.47904 1.8168 0.34303 0.34303 0.9049 0.51409 1.6825 0.51409h2.6055l12.213 34.58c0.27441 0.77757 0.6979 1.3375 1.2696 1.6805 0.5946 0.36591 1.3826 0.54914 2.366 0.54914 1.0063 0 1.7962-0.17299 2.3679-0.51604 0.59461-0.34303 1.0405-0.91319 1.3378-1.7136l12.315-34.58h2.6406c0.77757 0 1.3272-0.17104 1.6474-0.51409 0.34304-0.36591 0.51409-0.97066 0.51409-1.8168 0-0.84618-0.17104-1.4426-0.51409-1.7857-0.32019-0.36591-0.86985-0.54719-1.6474-0.54719h-11.456c-0.77758 0-1.3394 0.18127-1.6825 0.54719-0.32016 0.34303-0.47903 0.9395-0.47903 1.7857 0 0.84617 0.15885 1.4509 0.47903 1.8168 0.34304 0.34303 0.90491 0.51409 1.6825 0.51409h3.4292l-10.599 30.325-10.498-30.325h4.8371c0.77755 0 1.3272-0.17104 1.6474-0.51409 0.34303-0.36591 0.51409-0.97066 0.51409-1.8168 0-0.84618-0.17104-1.4426-0.51409-1.7857-0.32016-0.36591-0.86986-0.54719-1.6474-0.54719zm-72.862 4.6638h6.3794c2.7215 0 5.0893 0.60668 7.1018 1.8188 2.0125 1.2121 3.568 2.9956 4.6657 5.3512 1.0977 2.3327 1.6455 5.181 1.6455 8.5428s-0.54774 6.2204-1.6455 8.5759c-1.0977 2.3327-2.6532 4.104-4.6657 5.3161-2.0125 1.1892-4.3803 1.7837-7.1018 1.7837h-6.3794z"/>
<path id="dev-themes-logo-themes" d="m402.02 29.5c-11.523 0.1141-16.429 8.0991-16.429 19.736 0 22.019 30.577 21.335 30.577 41.528 0 9.6973-3.7661 17.341-14.262 17.341s-14.26-7.6434-14.26-17.341v-3.9939h-2.3952v3.879c0 11.066 4.5622 19.851 16.655 19.851 12.207 0 16.772-8.7845 16.772-19.851 0-21.676-30.577-21.105-30.577-41.526 0-9.4691 3.5383-17.343 14.034-17.343 10.382 0 13.917 7.9865 13.917 17.456v1.5968h2.5101v-1.4819c0-10.952-4.4492-19.851-16.542-19.851zm-237.53 0.57056v2.3952h17.456v77.464h2.5081v-77.464h17.456v-2.3952zm44.402 0v79.859h2.5101v-38.788h28.863v38.788h2.5101v-79.859h-2.5101v38.788h-28.863v-38.788zm42.691 0v79.859h30.462v-2.3952h-27.952v-36.964h23.502v-2.2822h-23.502v-35.823h27.952v-2.3952zm39.041 0v79.859h2.2803v-76.095l19.738 75.867h2.8528l19.621-75.867v76.095h2.5101v-79.859h-3.879l-19.623 75.752-19.621-75.752zm55.81 0v79.859h30.462v-2.3952h-27.952v-36.964h23.502v-2.2822h-23.502v-35.823h27.952v-2.3952z"/>
</svg>
<h4>Code</h4>
<pre class="language-css"><code class="language-css">#dev-themes-logo{
width:297px;
transition:all ease 150ms;
}
.scrolled #dev-themes-logo{
width:150px;
}</code></pre>
</div>
<p class="more">
<a target="_blank" rel="noreferrer noopener" href="https://github.com/netzgestaltung/sandboxTheme-js/blob/main/features/scrolled/scrolled.js">Source File</a>
</p>
</section>
<section id="scrollindicator">
<h2>Scroll Indicator</h2>
<div class="content">
<p>Zeigt in einem Horizontalen Balken an wie weit bereits gescrollt wurde</p>
<h3>Config</h3>
<pre class="language-js"><code class="language-js">options: {
selectors: {
progress: 'progress.scroll',
}
},</code></pre>
<h3>Beispiel</h3>
<progress class="indicator scroll" value="0"></progress>
<h4>HTML</h4>
<pre class="language-html"><code class="language-html"><progress class="indicator scroll" value="0"></progress></code></pre>
</div>
<p class="more">
<a target="_blank" rel="noreferrer noopener" href="https://github.com/netzgestaltung/sandboxTheme-js/blob/main/features/scrollindicator/scrollindicator.js">Source File</a>
</p>
</section>
<section id="scrollto">
<h2>Scroll to</h2>
<div class="content">
<p>Scroll to erweitert langweilige HTML Sprungmarken und fügt diesen einen Scrolleffekt hinzu.</p>
<h3>Config</h3>
<pre class="language-js"><code class="language-js">options: {
/**
* options for the scrollIntoView method
* @link https://developer.mozilla.org/de/docs/Web/API/Element/scrollIntoView
*/
scrollIntoViewOptions: {
behavior:'smooth'
}
},</code></pre>
<h3>Beispiele</h3>
<h4>Klicke auf den Link</h4>
<a rel="scrollto" class="to-top" href="#top">Gehe ganz nach oben</a>
<h4>HTML</h4>
<pre class="language-html"><code class="language-html"><a rel="scrollto" href="#top">Gehe ganz nach oben</a></code></pre>
<p>Das Attribut "rel" muß den Wert "scrollto" eingetragen haben und es muß auf der Seite ein Element mit der ID des Hashwertes des "href" Attributs geben.</p>
<h4>Klicke auf den Button</h4>
<button rel="scrollto" class="to-top" data-href="#top">Gehe ganz nach oben</button>
<h4>HTML</h4>
<pre class="language-html"><code class="language-html"><button rel="scrollto" data-href="#top">Gehe ganz nach oben</button></code></pre>
<p>Das Attribut "rel" muß den Wert "scrollto" eingetragen haben und es muß auf der Seite ein Element mit der ID des Hashwertes des "data-href" Attributs geben.</p>
</div>
<p class="more">
<a target="_blank" rel="noreferrer noopener" href="https://github.com/netzgestaltung/sandboxTheme-js/blob/main/features/scrollto/scrollto.js">Source File</a>
</p>
</section>
<section id="youtube_embed">
<h2>Youtube Einbettung DSGVO</h2>
<div class="content">
<p>Eine Figure mit einem Link zu einem Youtube Video und einem Lokalen Vorschaubild werden auf Klick zu einem Youtube Iframe.</p>
<p>In der Figcaption ist der nötige Hinweis zur Datenschutzerklärung einzugeben.</p>
<h3>Config</h3>
<pre class="language-js"><code class="language-js">options: {
youtube_api_src: 'https://www.youtube.com/iframe_api',
autoplay: true,
classNames:{
preview: 'youtube-preview',
iframe: 'youtube-iframe',
started: 'started',
api_script: 'youtube-api',
},
selectors: {
preview: 'figure.youtube-preview',
caption: 'figcaption',
api_script: '#youtube-api',
}
},</code></pre>
<h3>Beispiel</h3>
<figure class="youtube-preview">
<a target="_blank" rel="noopener, noreferrer" href="https://youtu.be/aqz-KE-bpKQ"><img src="img/big-buck-bunny-preview.jpg" /></a>
<figcaption>Mit Klick auf das Vorschaubild wird eine Verbindung zu Youtube aufgebaut. Lesen Sie sich unsere <a href="datenschutzerklaerung.html">Datenschutzerklärung</a> durch!</figcaption>
</figure>
<h4>HTML</h4>
<pre class="language-html"><code class="language-html"><figure class="youtube-preview">
<a target="_blank" rel="noopener, noreferrer" href="https://youtu.be/aqz-KE-bpKQ"><img src="img/big-buck-bunny-preview.jpg" /></a>
<figcaption>Mit Klick auf das Vorschaubild wird eine Verbindung zu Youtube aufgebaut. Lesen Sie sich unsere <a href="datenschutzerklaerung.html">Datenschutzerklärung</a> durch!</figcaption>
</figure></code></pre>
</div>
<p class="more">
<a target="_blank" rel="noreferrer noopener" href="https://github.com/netzgestaltung/sandboxTheme-js/blob/main/features/youtube_embed/youtube_embed.js">Source File</a>
</p>
</section>
<section id="frame_embed">
<h2>Iframe Einbettung DSGVO</h2>
<div class="content">
<p>Eine Figure mit einem Link zur Iframe-Quelle und einem Lokalen Vorschaubild werden auf Klick zu einem eingebetteten Iframe.</p>
<p>In der Figcaption ist der jeweils nötige Hinweis zur Datenschutzerklärung einzugeben.</p>
<h3>Config</h3>
<pre class="language-js"><code class="language-js">options: {
classNames:{
started: 'started'
},
selectors: {
preview: 'figure.frame-preview',
frame: '.frame',
}
},</code></pre>
<h3>Beispiel</h3>
<figure class="frame-preview">
<a target="_blank" rel="noopener, noreferrer" href="https://goo.gl/maps/rjSFFuS6f7zcEKGn7" data-map="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d21483.034914841264!2d13.3314537!3d47.6964719!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x99c9d125e18f64fb!2sMIMAZ%20Immobilien!5e0!3m2!1sde!2sat!4v1651136568844!5m2!1sde!2sat"><img src="img/google-places-preview.png" /></a>
<figcaption>Mit Klick auf das Vorschaubild wird eine Verbindung zu Google Maps aufgebaut. Lesen Sie sich unsere <a href="datenschutzerklaerung.html">Datenschutzerklärung</a> durch!</figcaption>
</figure>
<h4>HTML</h4>
<pre class="language-html"><code class="language-html"><figure class="frame-preview">
<a target="_blank" rel="noopener, noreferrer" href="https://goo.gl/maps/rjSFFuS6f7zcEKGn7" data-map="https://www.google.at/maps/place/MIMAZ+Immobilien/@47.6964719,13.3457582,7z/data=!4m2!3m1!1s0x0:0x99c9d125e18f64fb?sa=X&ved=2ahUKEwjy6_2E7Lj3AhXk4IUKHasjCqwQ_BJ6BAg6EAU"><img src="img/google-places-preview.png" /></a>
<figcaption>Mit Klick auf das Vorschaubild wird eine Verbindung zu Google Maps aufgebaut. Lesen Sie sich unsere <a href="datenschutzerklaerung.html">Datenschutzerklärung</a> durch!</figcaption>
</figure></code></pre>
</div>
<p class="more">
<a target="_blank" rel="noreferrer noopener" href="https://github.com/netzgestaltung/sandboxTheme-js/blob/main/features/frame_embed/frame_embed.js">Source File</a>
</p>
</section>
<div class="content content-extra">
<div class="large-box"></div>
</div>
</article>
<aside id="content-after" class="content-after">
<div id="about-dev-themes">
</div>
</aside>
</main>
<footer>
<h5>beste seite auf der welt</h5>
<button rel="scrollto" data-href="#top">to top</button>
<h5>Get to:</h5>
<a rel="scrollto" href="#">Dev</a>
<a rel="scrollto" href="#about">About</a>
<a href="index.html">Features</a>
</footer>
<div class="background"></div>
<div class="site-actions"></div>
<script>
// Custom page actions
;(function(){
'use strict';
/**
* @var {object} sandboxTheme_data
*/
var sandboxTheme_data = {
id: 1,
slug: 'sandboxTheme-js',
title: 'sandboxTheme JS',
info: {
is_front_page: true,
is_archive: false,
}
};
/**
* @namespace sandboxTheme
*/
window.sandboxTheme = window.sandboxTheme || {};
if ( typeof sandboxTheme.init === 'function' ) {
sandboxTheme.init(sandboxTheme_data);
}
})();
</script>
</body>
</html>