source: tanzpartie-hugo/themes/bilberry-hugo-theme/layouts/partials/audio-embed.html @ 16971

Last change on this file since 16971 was 16971, checked in by Henrik Bettermann, 2 years ago
File size: 2.8 KB
Line 
1{{ if eq .type "spotify" }}
2    <div class="responsive-audio spotify">
3        <iframe class="no-js-hidden" src="https://open.spotify.com/embed/track/{{ .id }}" width="300"
4                height="80" allowtransparency="true"></iframe>
5
6        <div class="no-js-message">
7            The spotify player can not be loaded with disabled javascript. <br>
8            The following title is embedded here: <br>
9
10            <a href="https://open.spotify.com/embed/track/{{ .id }}" target="_blank">
11                https://open.spotify.com/embed/track/{{ .id }}
12            </a>
13        </div>
14    </div>
15{{ end }}
16
17{{ if eq .type "soundcloud" }}
18    <div class="responsive-audio soundcloud">
19        <iframe class="no-js-hidden" width="100%" height="166" scrolling="no"
20                src="https://w.soundcloud.com/player/?url={{ .id }}&amp;color=%23ff5500&amp;auto_play=false&amp;hide_related=false&amp;show_comments=false&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true"></iframe>
21
22        <div class="no-js-message">
23            The soundcloud player can not be loaded with disabled JavaScript. <br>
24            The following title is embedded here: <br>
25
26            <a href="{{ .id }}" target="_blank">
27                {{ .id }}
28            </a>
29        </div>
30    </div>
31{{ end }}
32
33{{ if eq .type "tunein" }}
34    <div class="responsive-audio tunein">
35        <iframe class="no-js-hidden" src="https://tunein.com/embed/player/{{ .id }}/" style="width:100%; height:100px;" scrolling="no"
36                ></iframe>
37
38        <div class="no-js-message">
39            The TuneIn player can not be loaded with disabled JavaScript. <br>
40            The following title is embedded here: <br>
41
42            <a href="https://tunein.com/topic/?topicid={{ replace .id "t" "" }}" target="_blank">
43            https://tunein.com/topic/?topicid={{ replace .id "t" "" }}
44            </a>
45        </div>
46    </div>
47{{ end }}
48
49{{ if eq .type "mixcloud" }}
50    <div class="responsive-audio mixcloud">
51        <iframe class="no-js-hidden" width="100%" height="120" src="https://www.mixcloud.com/widget/iframe/?hide_cover=1&feed=/{{ .id }}/"
52                ></iframe>
53
54        <div class="no-js-message">
55            The Mixcloud player can not be loaded with disabled JavaScript. <br>
56            The following title is embedded here: <br>
57
58            <a href="https://mixcloud.com/{{ .id }}" target="_blank">
59                https://mixcloud.com/{{ .id }}
60            </a>
61        </div>
62    </div>
63{{ end }}
64
65{{ if eq .type "audiofile" }}
66    <div class="responsive-audio local">
67        <audio controls>
68            <source src="{{ .url }}" type="audio/ogg"/>
69            <source src="{{ .url }}" type="audio/mpeg"/>
70            <source src="{{ .url }}" type="audio/wav"/>
71
72            Your browser does not support the <code>audio</code> element.
73        </audio>
74    </div>
75{{ end }}
Note: See TracBrowser for help on using the repository browser.