File tree Expand file tree Collapse file tree 3 files changed +414
-0
lines changed
Expand file tree Collapse file tree 3 files changed +414
-0
lines changed Original file line number Diff line number Diff line change 1+ < div id ="player ">
2+ < div class ="listen "> Listen to this article instead</ div >
3+ < div id ="waveform ">
4+ {{ $waveform := resources.Get "img/waveform.svg" | minify }}
5+ < img src ="{{ $waveform.Permalink }} " alt ="waveform ">
6+ </ div >
7+ < audio controls
8+ class ="audio_controls {{ .Get "class " }}"
9+ {{ with .Get "id" }}id="{{ . }} "{{ end }}
10+ {{ with .Get "preload" }}preload="{{ . }} "{{ else }}preload ="metadata "{{ end }}
11+
12+ style ="{{ with .Get "style " }}{{ . | safeCSS }}; {{ end }}"
13+ {{ with .Get "title" }}data-info-title="{{ . }} "{{ end }}
14+ >
15+ {{ if .Get "src" }}
16+ < source {{ with .Get "src" }}src="{{ . }} "{{ end }}
17+ {{ with .Get "type" }}type="audio/{{ . }} "{{ end }} >
18+ {{ else if .Get "backup_src" }}
19+ < source src ="{{ .Get "backup_src " }}"
20+ {{ with .Get "backup_type" }}type="audio/{{ . }} "{{ end }}
21+ {{ with .Get "backup_codec" }}codecs="{{ . }} "{{ end }}
22+ >
23+ {{ end }}
24+ Your browser does not support the audio element
25+ </ audio >
26+ </ div >
Original file line number Diff line number Diff line change @@ -77,3 +77,23 @@ figcaption h4 {
7777input [type = "search" ] {
7878 -webkit-appearance : textfield;
7979}
80+
81+ # player {
82+ padding : 20px 20px ;
83+ margin : 20px 0 ;
84+ border-radius : 3px ;
85+ box-shadow : 0 0 8px 0 # eee ;
86+ }
87+
88+ # player .listen {
89+ color : # 19BC9C ;
90+ margin-bottom : 7px ;
91+ }
92+
93+ # player # waveform img {
94+ width : 100% ;
95+ }
96+
97+ # player audio {
98+ width : 100% ;
99+ }
You can’t perform that action at this time.
0 commit comments