diff --git a/app/Views/_assets/admin.ts b/app/Views/_assets/admin.ts index d05abf005a8d3966672ab5ad97e2552df187c9ea..1c54fec275396cba346155ede9fe37c95988f5d4 100644 --- a/app/Views/_assets/admin.ts +++ b/app/Views/_assets/admin.ts @@ -5,6 +5,7 @@ import MarkdownEditor from "./modules/MarkdownEditor"; import MultiSelect from "./modules/MultiSelect"; import SidebarToggler from "./modules/SidebarToggler"; import Slugify from "./modules/Slugify"; +import Soundbites from "./modules/Soundbites"; import Time from "./modules/Time"; import Tooltip from "./modules/Tooltip"; @@ -17,3 +18,4 @@ SidebarToggler(); ClientTimezone(); DateTimePicker(); Time(); +Soundbites(); diff --git a/app/Views/_assets/soundbites.ts b/app/Views/_assets/soundbites.ts deleted file mode 100644 index fa8b6be11633e94f747419f15274cdbfd2371e21..0000000000000000000000000000000000000000 --- a/app/Views/_assets/soundbites.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Soundbites from "./modules/Soundbites"; - -Soundbites(); diff --git a/app/Views/admin/_layout.php b/app/Views/admin/_layout.php index 3f1289cc29c55cdbee539e237bb3d42e460e1224..6a8d1706679c353851225363792b033cecdfd09b 100644 --- a/app/Views/admin/_layout.php +++ b/app/Views/admin/_layout.php @@ -10,7 +10,6 @@ <link rel="stylesheet" href="/assets/admin.css"/> <link rel="stylesheet" href="/assets/index.css"/> <script src="/assets/admin.js" type="module" defer></script> - <script src="/assets/soundbites.js" type="module" defer></script> </head> <body class="relative bg-gray-100 holy-grail-grid"> diff --git a/app/Views/episode.php b/app/Views/episode.php index 08a6ae1191b439ef0705ce649cf8299ee97c0c29..2fbcf29a89cb84d412e8a2956c5f785b875df9e9 100644 --- a/app/Views/episode.php +++ b/app/Views/episode.php @@ -15,7 +15,6 @@ <link rel="stylesheet" href="/assets/index.css"/> <link rel="canonical" href="<?= current_url() ?>" /> <script src="/assets/podcast.js" type="module" defer></script> - <script src="/assets/soundbites.js" type="module" defer></script> <meta property="og:title" content="<?= $episode->title ?>" /> <meta property="og:locale" content="<?= $podcast->language_code ?>" /> <meta property="og:site_name" content="<?= $podcast->title ?>" /> @@ -106,54 +105,7 @@ Your browser does not support the audio tag. </audio> </div> - </header> - - <?php if (count($episode->soundbites) > 0): ?> - <div class="w-full max-w-3xl px-2 py-6 mx-auto md:px-6"> - <?= data_table( - [ - [ - 'header' => lang('Episode.soundbites'), - 'cell' => function ($soundbite) { - return icon_button( - 'play', - lang('Episode.soundbites_form.play'), - null, - ['variant' => 'primary'], - [ - 'class' => 'mb-1 mr-1', - 'data-type' => 'play-soundbite', - 'data-soundbite-start-time' => - $soundbite->start_time, - 'data-soundbite-duration' => $soundbite->duration, - ] - ); - }, - ], - [ - 'header' => lang('Episode.soundbites_form.start_time'), - 'cell' => function ($soundbite) { - return format_duration($soundbite->start_time); - }, - ], - [ - 'header' => lang('Episode.soundbites_form.duration'), - 'cell' => function ($soundbite) { - return format_duration($soundbite->duration); - }, - ], - [ - 'header' => lang('Episode.soundbites_form.label'), - 'cell' => function ($soundbite) { - return $soundbite->label; - }, - ], - ], - $episode->soundbites - ) ?> - </div> -<?php endif; ?> - + </header> <section class="w-full max-w-3xl px-2 py-6 mx-auto prose md:px-6"> <?= $episode->description_html ?> </section>