2024-01-28 13:23:24 +00:00
|
|
|
{{ define "main" }}
|
2024-04-28 07:11:54 +00:00
|
|
|
|
|
|
|
{{ if or ( .HasShortcode "audio" ) ( .HasShortcode "video" ) ( .HasShortcode "archive-audio" ) }}
|
|
|
|
|
|
|
|
<script>
|
|
|
|
(function() {
|
|
|
|
const players = Array.from(document.querySelectorAll('.player')).map(
|
|
|
|
p => new Plyr(p, {
|
|
|
|
controls: ['play', 'progress', 'current-time', 'mute', 'volume', 'download', 'fullscreen'],
|
|
|
|
{{/* autoplay: true, */}}
|
|
|
|
{{/* settings: ['speed'] */}}
|
|
|
|
})
|
|
|
|
);
|
|
|
|
{{/* Stop other players when starting */}}
|
|
|
|
players.forEach(function(p){
|
|
|
|
p.on('play', event => {
|
|
|
|
const instance = event.detail.plyr;
|
|
|
|
console.log('Stop others players');
|
|
|
|
players.forEach(function(p){ if(p != instance) p.stop()});
|
|
|
|
})
|
|
|
|
});
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
2024-01-28 13:23:24 +00:00
|
|
|
<main class="container py-5 flex-grow-1">
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="col-12 mw-md mh-100">
|
|
|
|
<div class="py-4">
|
|
|
|
<div class="py-2">
|
2024-03-10 15:07:04 +00:00
|
|
|
<h1 class="display-1 text-center fw-bold text-primary">
|
2024-01-28 13:23:24 +00:00
|
|
|
{{ .Title }}
|
|
|
|
</h1>
|
|
|
|
{{ partial "shared/post-meta" . }}
|
|
|
|
{{ partial "shared/post-categories" . }}
|
|
|
|
</div>
|
|
|
|
<div class="markdown-content py-2">
|
|
|
|
{{ .Content }}
|
2024-02-18 08:34:15 +00:00
|
|
|
{{ partial "shared/post-isbn" . }}
|
2024-01-28 13:23:24 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
{{ end }}
|