diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 9234895e8f73e2cfb305b4398a512a2d052aa848..45eff6b951398187e732c9314a89febe178a1df7 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -36,7 +36,7 @@ $routes->addPlaceholder('slug', '[a-zA-Z0-9\-]{1,128}'); $routes->addPlaceholder('base64', '[A-Za-z0-9\.\_]+\-{0,2}'); $routes->addPlaceholder('platformType', '\bpodcasting|\bsocial|\bfunding'); $routes->addPlaceholder('postAction', '\bfavourite|\breblog|\breply'); -$routes->addPlaceholder('embeddablePlayerTheme', '\blight|\bdark|\blight-transparent|\bdark-transparent'); +$routes->addPlaceholder('embedTheme', '\blight|\bdark|\blight-transparent|\bdark-transparent'); $routes->addPlaceholder( 'uuid', '[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}', @@ -154,17 +154,13 @@ $routes->group('@(:podcastHandle)', function ($routes): void { $routes->get('oembed.xml', 'EpisodeController::oembedXML/$1/$2', [ 'as' => 'episode-oembed-xml', ]); - $routes->group('embeddable-player', function ($routes): void { - $routes->get('/', 'EpisodeController::embeddablePlayer/$1/$2', [ - 'as' => 'embeddable-player', + $routes->group('embed', function ($routes): void { + $routes->get('/', 'EpisodeController::embed/$1/$2', [ + 'as' => 'embed', ]); - $routes->get( - '(:embeddablePlayerTheme)', - 'EpisodeController::embeddablePlayer/$1/$2/$3', - [ - 'as' => 'embeddable-player-theme', - ], - ); + $routes->get('(:embedTheme)', 'EpisodeController::embed/$1/$2/$3', [ + 'as' => 'embed-theme', + ],); }); }); diff --git a/app/Controllers/EpisodeController.php b/app/Controllers/EpisodeController.php index d5ddd9f780253ad6a7fd74cd790e53e008812772..0b439a61f672b22665d338c49c505441f35becdd 100644 --- a/app/Controllers/EpisodeController.php +++ b/app/Controllers/EpisodeController.php @@ -138,7 +138,7 @@ class EpisodeController extends BaseController return $cachedView; } - public function embeddablePlayer(string $theme = 'light-transparent'): string + public function embed(string $theme = 'light-transparent'): string { header('Content-Security-Policy: frame-ancestors http://*:* https://*:*'); @@ -150,13 +150,13 @@ class EpisodeController extends BaseController $session = Services::session(); $session->start(); if (isset($_SERVER['HTTP_REFERER'])) { - $session->set('embeddable_player_domain', parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)); + $session->set('embed_domain', parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)); } $locale = service('request') ->getLocale(); - $cacheName = "page_podcast#{$this->podcast->id}_episode#{$this->episode->id}_embeddable_player_{$theme}_{$locale}"; + $cacheName = "page_podcast#{$this->podcast->id}_episode#{$this->episode->id}_embed_{$theme}_{$locale}"; if (! ($cachedView = cache($cacheName))) { $themeData = EpisodeModel::$themes[$theme]; @@ -173,7 +173,7 @@ class EpisodeController extends BaseController ); // The page cache is set to a decade so it is deleted manually upon podcast update - return view('embeddable_player', $data, [ + return view('embed', $data, [ 'cache' => $secondsToNextUnpublishedEpisode ? $secondsToNextUnpublishedEpisode : DECADE, @@ -196,7 +196,7 @@ class EpisodeController extends BaseController 'author_url' => $this->podcast->link, 'html' => '<iframe src="' . - $this->episode->embeddable_player_url . + $this->episode->embed_url . '" width="100%" height="144" frameborder="0" scrolling="no"></iframe>', 'width' => 600, 'height' => 144, @@ -226,7 +226,7 @@ class EpisodeController extends BaseController 'html', htmlentities( '<iframe src="' . - $this->episode->embeddable_player_url . + $this->episode->embed_url . '" width="100%" height="144" frameborder="0" scrolling="no"></iframe>', ), ); diff --git a/app/Database/Migrations/2017-12-01-160000_add_podcasts_platforms.php b/app/Database/Migrations/2017-12-01-160000_add_podcasts_platforms.php index 660f6578a603a9fdbfe0d82df4d446c46a124019..febec481826d7c29799d2904400e078f3a563c9c 100644 --- a/app/Database/Migrations/2017-12-01-160000_add_podcasts_platforms.php +++ b/app/Database/Migrations/2017-12-01-160000_add_podcasts_platforms.php @@ -41,7 +41,7 @@ class AddPodcastsPlatforms extends Migration 'constraint' => 1, 'default' => 0, ], - 'is_on_embeddable_player' => [ + 'is_on_embed' => [ 'type' => 'TINYINT', 'constraint' => 1, 'default' => 0, diff --git a/app/Entities/Episode.php b/app/Entities/Episode.php index c01219dd8d6aeac9ccafc7b1390c3a4034d233ac..5f2689b88afbe55d6778b31e77e1f945b8cae27e 100644 --- a/app/Entities/Episode.php +++ b/app/Entities/Episode.php @@ -78,7 +78,7 @@ use RuntimeException; * * @property Person[] $persons; * @property Soundbite[] $soundbites; - * @property string $embeddable_player_url; + * @property string $embed_url; */ class Episode extends Entity { @@ -96,7 +96,7 @@ class Episode extends Entity protected string $audio_file_opengraph_url; - protected string $embeddable_player_url; + protected string $embed_url; protected Image $image; @@ -422,18 +422,12 @@ class Episode extends Entity return url_to('episode', $this->getPodcast()->handle, $this->attributes['slug']); } - public function getEmbeddablePlayerUrl(string $theme = null): string + public function getEmbedUrl(string $theme = null): string { return base_url( $theme - ? route_to( - 'embeddable-player-theme', - $this->getPodcast() - ->handle, - $this->attributes['slug'], - $theme, - ) - : route_to('embeddable-player', $this->getPodcast()->handle, $this->attributes['slug']), + ? route_to('embed-theme', $this->getPodcast() ->handle, $this->attributes['slug'], $theme,) + : route_to('embed', $this->getPodcast()->handle, $this->attributes['slug']), ); } diff --git a/app/Entities/Platform.php b/app/Entities/Platform.php index 34965c94329a60306a6cb030b0c268685189ee60..0d43f89f349a640d992a63b8fbae556adade5fb2 100644 --- a/app/Entities/Platform.php +++ b/app/Entities/Platform.php @@ -21,7 +21,7 @@ use CodeIgniter\Entity\Entity; * @property string|null $link_url * @property string|null $link_content * @property bool|null $is_visible - * @property bool|null $is_on_embeddable_player + * @property bool|null $is_on_embed */ class Platform extends Entity { @@ -37,6 +37,6 @@ class Platform extends Entity 'link_url' => '?string', 'link_content' => '?string', 'is_visible' => '?boolean', - 'is_on_embeddable_player' => '?boolean', + 'is_on_embed' => '?boolean', ]; } diff --git a/app/Helpers/components_helper.php b/app/Helpers/components_helper.php index 2fd41ade90c28f1bb42b8ef07f9ffc16684187c8..00474d3cf2f8ff29b0eddafffe39bb43b557661c 100644 --- a/app/Helpers/components_helper.php +++ b/app/Helpers/components_helper.php @@ -106,9 +106,9 @@ if (! function_exists('publication_pill')) { { $class = match ($publicationStatus) { 'published' => 'text-pine-600 border-pine-600 bg-pine-50', - 'scheduled' => 'text-red-600 border-red-600 bg-red-50', - 'not_published' => 'text-gray-600 border-gray-600 bg-gray-50', - default => 'text-gray-600 border-gray-600 bg-gray-50', + 'scheduled' => 'text-red-600 border-red-600 bg-red-50', + 'not_published' => 'text-gray-600 border-gray-600 bg-gray-50', + default => 'text-gray-600 border-gray-600 bg-gray-50', }; $label = lang('Episode.publication_status.' . $publicationStatus); @@ -292,7 +292,10 @@ if (! function_exists('audio_player')) { if (! function_exists('relative_time')) { function relative_time(Time $time, string $class = ''): string { - $translatedDate = lang('Common.mediumDate', [$time]); + $formatter = new IntlDateFormatter(service( + 'request' + )->getLocale(), IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE); + $translatedDate = $time->toLocalizedString($formatter->getPattern()); $datetime = $time->format(DateTime::ISO8601); return <<<CODE_SAMPLE diff --git a/app/Language/en/Common.php b/app/Language/en/Common.php index 72a38b4f1ba585b434d17e55d6179d56984fc291..a29d9e6ce1bd3676db02c3c45f614c177d69e32c 100644 --- a/app/Language/en/Common.php +++ b/app/Language/en/Common.php @@ -13,17 +13,10 @@ return [ 'no' => 'No', 'cancel' => 'Cancel', 'optional' => 'Optional', - 'more' => 'More', - 'no_data' => 'No data found!', 'close' => 'Close', - 'edit' => 'Edit', - 'copy' => 'Copy', - 'copied' => 'Copied!', 'home' => 'Home', 'explicit' => 'Explicit', - 'mediumDate' => '{0,date,medium}', 'powered_by' => 'Powered by {castopod}', - 'pageInfo' => 'Page {currentPage} out of {pageCount}', 'go_back' => 'Go back', 'play_episode_button' => [ 'play' => 'Play', diff --git a/app/Language/en/Episode.php b/app/Language/en/Episode.php index 8df3865216827cd6a3e7a660f55f5dfc358ac1b2..74c32b3f920e9e99214a7dbc9ac15106a0f9eb77 100644 --- a/app/Language/en/Episode.php +++ b/app/Language/en/Episode.php @@ -19,7 +19,7 @@ return [ one {# person} other {# persons} }', - 'persons_list' => 'Persons for {episodeTitle}', + 'persons_list' => 'Persons', 'back_to_episodes' => 'Back to episodes of {podcast}', 'comments' => 'Comments', 'activity' => 'Activity', diff --git a/app/Language/en/Podcast.php b/app/Language/en/Podcast.php index 9896a00a4635df6ddf46294791f7a91a1fa009d5..c3dd50401fd4aeb26da189565616bf1a5710440d 100644 --- a/app/Language/en/Podcast.php +++ b/app/Language/en/Podcast.php @@ -9,21 +9,7 @@ declare(strict_types=1); */ return [ - 'all_podcasts' => 'All podcasts', - 'no_podcast' => 'No podcast found!', - 'create' => 'Create podcast', - 'import' => 'Import podcast', - 'new_episode' => 'New Episode', 'feed' => 'RSS Podcast feed', - 'view' => 'View podcast', - 'edit' => 'Edit podcast', - 'delete' => 'Delete podcast', - 'see_episodes' => 'See episodes', - 'see_contributors' => 'See contributors', - 'go_to_page' => 'Go to page', - 'latest_episodes' => 'Latest episodes', - 'see_all_episodes' => 'See all episodes', - 'by' => 'By {publisher}', 'season' => 'Season {seasonNumber}', 'list_of_episodes_year' => '{year} episodes ({episodeCount})', 'list_of_episodes_season' => diff --git a/app/Language/fr/Common.php b/app/Language/fr/Common.php index c5694c3974a11f72b8a17f4a89eb0293945849e5..6c28fe3f314167842eef221a3cacfb93490782fc 100644 --- a/app/Language/fr/Common.php +++ b/app/Language/fr/Common.php @@ -13,18 +13,11 @@ return [ 'no' => 'Non', 'cancel' => 'Annuler', 'optional' => 'Optionnel', - 'more' => 'Plus', - 'no_data' => 'Aucune donnée trouvée !', 'close' => 'Fermer', 'edit' => 'Modifier', - 'copy' => 'Copier', - 'copied' => 'Copié !', 'home' => 'Accueil', 'explicit' => 'Explicite', - 'mediumDate' => '{0,date,medium}', 'powered_by' => 'Propulsé par {castopod}', - 'actions' => 'Actions', - 'pageInfo' => 'Page {currentPage} sur {pageCount}', 'go_back' => 'Retour en arrière', 'play_episode_button' => [ 'play' => 'Lire', diff --git a/app/Language/fr/Episode.php b/app/Language/fr/Episode.php index ee8a1e4bd2361557c42eedf8d3e9e372d27e1664..fc848d9f3bcfc6a86a2a599446a672d218e863e6 100644 --- a/app/Language/fr/Episode.php +++ b/app/Language/fr/Episode.php @@ -19,7 +19,7 @@ return [ one {# intervenant·e} other {# intervenant·e·s} }', - 'persons_list' => 'Liste des intervenant·e·s', + 'persons_list' => 'Intervenant·e·s', 'back_to_episodes' => 'Retour aux épisodes de {podcast}', 'comments' => 'Commentaires', 'activity' => 'Activité', diff --git a/app/Language/fr/Podcast.php b/app/Language/fr/Podcast.php index d9d0a35d2b964ae79f251227b848acbfecd79c1b..d74d1f8daba32b244d43aa38775191e6e716a447 100644 --- a/app/Language/fr/Podcast.php +++ b/app/Language/fr/Podcast.php @@ -9,21 +9,7 @@ declare(strict_types=1); */ return [ - 'all_podcasts' => 'Tous les podcasts', - 'no_podcast' => 'Aucun podcast trouvé !', - 'create' => 'Créer un podcast', - 'import' => 'Importer un podcast', - 'new_episode' => 'Créer un épisode', 'feed' => 'Podcast RSS feed', - 'view' => 'Voir le podcast', - 'edit' => 'Modifier le podcast', - 'delete' => 'Supprimer le podcast', - 'see_episodes' => 'Voir les épisodes', - 'see_contributors' => 'Voir les contributeurs', - 'go_to_page' => 'Aller à la page', - 'latest_episodes' => 'Derniers épisodes', - 'see_all_episodes' => 'Voir tous les épisodes', - 'by' => 'Par {publisher}', 'season' => 'Saison {seasonNumber}', 'list_of_episodes_year' => 'Épisodes de {year} ({episodeCount})', 'list_of_episodes_season' => @@ -52,5 +38,5 @@ return [ one {# intervenant·e} other {# intervenant·e·s} }', - 'persons_list' => 'Liste des intervenant·e·s', + 'persons_list' => 'Intervenant·e·s', ]; diff --git a/app/Models/PlatformModel.php b/app/Models/PlatformModel.php index 5eb5727939f07734d6e855d8a70537a15916902b..fb88923c1f628284895720b22eb89a68b1fe43a1 100644 --- a/app/Models/PlatformModel.php +++ b/app/Models/PlatformModel.php @@ -102,7 +102,7 @@ class PlatformModel extends Model ! ($found = cache("podcast#{$podcastId}_platforms_{$platformType}_withLinks")) ) { $found = $this->select( - 'platforms.*, podcasts_platforms.link_url, podcasts_platforms.link_content, podcasts_platforms.is_visible, podcasts_platforms.is_on_embeddable_player', + 'platforms.*, podcasts_platforms.link_url, podcasts_platforms.link_content, podcasts_platforms.is_visible, podcasts_platforms.is_on_embed', ) ->join( 'podcasts_platforms', @@ -127,7 +127,7 @@ class PlatformModel extends Model $cacheName = "podcast#{$podcastId}_platforms_{$platformType}"; if (! ($found = cache($cacheName))) { $found = $this->select( - 'platforms.*, podcasts_platforms.link_url, podcasts_platforms.link_content, podcasts_platforms.is_visible, podcasts_platforms.is_on_embeddable_player', + 'platforms.*, podcasts_platforms.link_url, podcasts_platforms.link_content, podcasts_platforms.is_visible, podcasts_platforms.is_on_embed', ) ->join('podcasts_platforms', 'podcasts_platforms.platform_slug = platforms.slug') ->where('podcasts_platforms.podcast_id', $podcastId) diff --git a/app/Resources/js/embed.ts b/app/Resources/js/embed.ts index 4689cf43ea92e68987e212c39dfe667fee284daa..9bad25389ec1030c7b954802a27f22df73e9e9e5 100644 --- a/app/Resources/js/embed.ts +++ b/app/Resources/js/embed.ts @@ -35,6 +35,14 @@ import { import "@vime/core/themes/default.css"; import "@vime/core/themes/light.css"; +// Register Castopod's icons library +const library: HTMLVmIconLibraryElement | null = document.querySelector( + 'vm-icon-library[name="castopod-icons"]' +); +if (library) { + library.resolver = (iconName) => `/assets/icons/${iconName}.svg`; +} + // Vime elements for audio player customElements.define("vm-player", VmPlayer); customElements.define("vm-file", VmFile); @@ -68,11 +76,3 @@ customElements.define("vm-menu-radio-group", VmMenuRadioGroup); customElements.define("vm-menu-radio", VmMenuRadio); customElements.define("vm-settings", VmSettings); customElements.define("vm-skeleton", VmSkeleton); - -// Register Castopod's icons library -const library: HTMLVmIconLibraryElement | null = document.querySelector( - 'vm-icon-library[name="castopod-icons"]' -); -if (library) { - library.resolver = (iconName) => `/assets/icons/${iconName}.svg`; -} diff --git a/app/Resources/js/modules/ThemePicker.ts b/app/Resources/js/modules/ThemePicker.ts index 57b0a75bbcb2a3e7bcf4749b490cb16b7cd57e1b..d302e463be1460460e09379282e5fd972b69aed6 100644 --- a/app/Resources/js/modules/ThemePicker.ts +++ b/app/Resources/js/modules/ThemePicker.ts @@ -1,9 +1,8 @@ const ThemePicker = (): void => { const buttons: NodeListOf<HTMLButtonElement> | null = document.querySelectorAll("button[data-type='theme-picker']"); - const iframe: HTMLIFrameElement | null = document.querySelector( - `iframe[id="embeddable_player"]` - ); + const iframe: HTMLIFrameElement | null = + document.querySelector(`iframe[id="embed"]`); const iframeTextArea: HTMLFormElement | null = document.querySelector(`[id="iframe"]`); const urlTextArea: HTMLFormElement | null = diff --git a/app/Resources/js/modules/play-episode-button.ts b/app/Resources/js/modules/play-episode-button.ts index d8c51fd49052184c6f67a0d8007e4c65b97ba45a..44f4a873280c980a40616ce579b3f8f68ec5d42e 100644 --- a/app/Resources/js/modules/play-episode-button.ts +++ b/app/Resources/js/modules/play-episode-button.ts @@ -206,7 +206,8 @@ export class PlayEpisodeButton extends LitElement { } button:focus { - box-shadow: 0 0 0 2px #e7f9e4, 0 0 0 calc(2px + 2px) #009486; + outline: none; + box-shadow: 0 0 0 2px #e7f9e4, 0 0 0 4px #009486; } button.playing { diff --git a/app/Resources/styles/formInputTabs.css b/app/Resources/styles/formInputTabs.css index 38d323df14109c2708e949bde27d4a4fc705af8b..fac80a185a6a3a460521b23ece4e9bf3bab0fb07 100644 --- a/app/Resources/styles/formInputTabs.css +++ b/app/Resources/styles/formInputTabs.css @@ -31,6 +31,6 @@ } .form-input-tabs > input:checked + label { - @apply font-semibold opacity-100 text-pine-700; + @apply font-semibold opacity-100 text-pine-500; } } diff --git a/app/Resources/styles/index.css b/app/Resources/styles/index.css index ac4f5db5a5fe66b5e43f6bc6b2634df397a3e039..7ac86a77e647622afe93215bb8daff148ffab462 100644 --- a/app/Resources/styles/index.css +++ b/app/Resources/styles/index.css @@ -8,7 +8,6 @@ @import "./switch.css"; @import "./charts.css"; @import "./post.css"; -@import "./tabs.css"; @import "./radioToggler.css"; @import "./formInputTabs.css"; @import "./stickyHeader.css"; diff --git a/app/Resources/styles/tabs.css b/app/Resources/styles/tabs.css deleted file mode 100644 index 4389ead476a98845a2c1983ed0fb9a771271302e..0000000000000000000000000000000000000000 --- a/app/Resources/styles/tabs.css +++ /dev/null @@ -1,38 +0,0 @@ -@layer components { - .tabset { - @apply grid grid-cols-3; - } - - .tabset > input[type="radio"] { - @apply absolute -left-full; - } - - .tabset .tab-panel { - @apply hidden; - } - - /* Logic for 3 tabs at most */ - .tabset > input:first-child:checked ~ .tab-panels > .tab-panel:first-child, - .tabset > input:nth-child(3):checked ~ .tab-panels > .tab-panel:nth-child(2), - .tabset > input:nth-child(5):checked ~ .tab-panels > .tab-panel:nth-child(3) { - @apply block; - } - - /* Styling */ - .tabset > label { - @apply relative inline-block w-full px-4 py-3 text-center cursor-pointer opacity-70 hover:opacity-100; - } - - .tabset > input:checked + label::after { - @apply absolute inset-x-0 bottom-0 w-1/3 h-1 mx-auto bg-pine-500; - content: ""; - } - - .tabset > input:checked + label { - @apply font-semibold opacity-100 text-pine-700; - } - - .tabset .tab-panels { - @apply col-span-3 p-6; - } -} diff --git a/modules/Admin/Config/Routes.php b/modules/Admin/Config/Routes.php index 626803b7190170b571697e032eb312b692846e23..d259ce905c98cdbde8766717a302d56dcfcbfd16 100644 --- a/modules/Admin/Config/Routes.php +++ b/modules/Admin/Config/Routes.php @@ -320,10 +320,10 @@ $routes->group( ], ); $routes->get( - 'embeddable-player', - 'EpisodeController::embeddablePlayer/$1/$2', + 'embed', + 'EpisodeController::embed/$1/$2', [ - 'as' => 'embeddable-player-add', + 'as' => 'embed-add', 'filter' => 'permission:podcast_episodes-edit', ], ); diff --git a/modules/Admin/Controllers/EpisodeController.php b/modules/Admin/Controllers/EpisodeController.php index 078fad1cd278739282bb44e9cdb85d98bcad21c4..312953217f0db7c388aa532f522e6d5c8a4a76ed 100644 --- a/modules/Admin/Controllers/EpisodeController.php +++ b/modules/Admin/Controllers/EpisodeController.php @@ -822,7 +822,7 @@ class EpisodeController extends BaseController return redirect()->route('soundbites-edit', [$this->podcast->id, $this->episode->id]); } - public function embeddablePlayer(): string + public function embed(): string { helper(['form']); @@ -836,7 +836,7 @@ class EpisodeController extends BaseController 0 => $this->podcast->title, 1 => $this->episode->title, ]); - return view('episode/embeddable_player', $data); + return view('episode/embed', $data); } public function attemptCommentCreate(): RedirectResponse diff --git a/modules/Admin/Controllers/PodcastPlatformController.php b/modules/Admin/Controllers/PodcastPlatformController.php index bc49bc374eb73d80258bd025f4a2755173307a28..d22b626c1925189fe6ef01b4c18a799e2323cf9c 100644 --- a/modules/Admin/Controllers/PodcastPlatformController.php +++ b/modules/Admin/Controllers/PodcastPlatformController.php @@ -85,11 +85,8 @@ class PodcastPlatformController extends BaseController 'is_visible' => array_key_exists('visible', $podcastPlatform) && $podcastPlatform['visible'] === 'yes', - 'is_on_embeddable_player' => - array_key_exists( - 'on_embeddable_player', - $podcastPlatform, - ) && $podcastPlatform['on_embeddable_player'] === 'yes', + 'is_on_embed' => + array_key_exists('on_embed', $podcastPlatform,) && $podcastPlatform['on_embed'] === 'yes', ]; } diff --git a/modules/Admin/Language/en/Breadcrumb.php b/modules/Admin/Language/en/Breadcrumb.php index a8df8411e5ce07ba7be79b7fcbcf2061ba845b40..9a1ef1c2f9c8c8d2bfffded0113d73e938bef5ef 100644 --- a/modules/Admin/Language/en/Breadcrumb.php +++ b/modules/Admin/Language/en/Breadcrumb.php @@ -41,5 +41,5 @@ return [ 'listening-time' => 'listening time', 'time-periods' => 'time periods', 'soundbites' => 'soundbites', - 'embeddable-player' => 'embeddable player', + 'embed' => 'embeddable player', ]; diff --git a/modules/Admin/Language/en/Common.php b/modules/Admin/Language/en/Common.php index c5048cb9f38564cdef5e439c71cdbf66f544d5c6..f3a6a913645b70a88a65223795d1ba78a9751346 100644 --- a/modules/Admin/Language/en/Common.php +++ b/modules/Admin/Language/en/Common.php @@ -21,7 +21,6 @@ return [ 'copied' => 'Copied!', 'home' => 'Home', 'explicit' => 'Explicit', - 'mediumDate' => '{0,date,medium}', 'powered_by' => 'Powered by {castopod}', 'actions' => 'Actions', 'pageInfo' => 'Page {currentPage} out of {pageCount}', diff --git a/modules/Admin/Language/en/Episode.php b/modules/Admin/Language/en/Episode.php index 990297f8b9171e3a3b4591df72bb3ff3b0a50e44..073af0210a9d8747a8f2af251a33284272ce4649 100644 --- a/modules/Admin/Language/en/Episode.php +++ b/modules/Admin/Language/en/Episode.php @@ -160,9 +160,9 @@ return [ 'delete' => 'Delete soundbite', 'bookmark' => 'Click while playing to get current position, click again to get duration.', - 'submit_edit' => 'Save all soundbites', + 'submit' => 'Save soundbites', ], - 'embeddable_player' => [ + 'embed' => [ 'title' => 'Embeddable player', 'label' => 'Pick a theme color, copy the embeddable player to clipboard, then paste it on your website.', diff --git a/modules/Admin/Language/en/EpisodeNavigation.php b/modules/Admin/Language/en/EpisodeNavigation.php index bbc0d29832f9162b1daba17b4c398d504ecee8db..1945e25b98abc68f4ce9cf8ef0be7e175d030a43 100644 --- a/modules/Admin/Language/en/EpisodeNavigation.php +++ b/modules/Admin/Language/en/EpisodeNavigation.php @@ -14,6 +14,6 @@ return [ 'episode-view' => 'Home', 'episode-edit' => 'Edit episode', 'episode-persons-manage' => 'Manage persons', - 'embeddable-player-add' => 'Embeddable player', + 'embed-add' => 'Embeddable player', 'soundbites-edit' => 'Soundbites', ]; diff --git a/modules/Admin/Language/en/Platforms.php b/modules/Admin/Language/en/Platforms.php index 27582cdad8bb32477dbdaef513f513f678bf1485..98180c13e52194cc422b4d1109551b26c086ef4a 100644 --- a/modules/Admin/Language/en/Platforms.php +++ b/modules/Admin/Language/en/Platforms.php @@ -13,7 +13,7 @@ return [ 'home_url' => 'Go to {platformName} website', 'submit_url' => 'Submit your podcast on {platformName}', 'visible' => 'Display in podcast homepage?', - 'on_embeddable_player' => 'Display on embeddable player?', + 'on_embed' => 'Display on embeddable player?', 'remove' => 'Remove {platformName}', 'submit' => 'Save', 'messages' => [ diff --git a/modules/Admin/Language/fr/Breadcrumb.php b/modules/Admin/Language/fr/Breadcrumb.php index 35598deccac8aa438b8f165a7f210bc3c2c57067..91b6e0d92a14df7be4235f36cdc0c804a07cad60 100644 --- a/modules/Admin/Language/fr/Breadcrumb.php +++ b/modules/Admin/Language/fr/Breadcrumb.php @@ -41,5 +41,5 @@ return [ 'listening-time' => 'drée d’écoute', 'time-periods' => 'périodes', 'soundbites' => 'extraits sonores', - 'embeddable-player' => 'lecteur intégré', + 'embed' => 'lecteur intégré', ]; diff --git a/modules/Admin/Language/fr/Common.php b/modules/Admin/Language/fr/Common.php index e02f1b02f0764faad08d7a573ffc218c7861df8c..8788589f73503eb75cb98ccd2946ef714362c3f8 100644 --- a/modules/Admin/Language/fr/Common.php +++ b/modules/Admin/Language/fr/Common.php @@ -21,7 +21,6 @@ return [ 'copied' => 'Copié !', 'home' => 'Accueil', 'explicit' => 'Explicite', - 'mediumDate' => '{0,date,medium}', 'powered_by' => 'Propulsé par {castopod}', 'actions' => 'Actions', 'pageInfo' => 'Page {currentPage} sur {pageCount}', diff --git a/modules/Admin/Language/fr/Episode.php b/modules/Admin/Language/fr/Episode.php index 857b6754ffaee2519c70f402cf04ad029acc9f02..b0cc9c80e9ca2cadfb8cdb9e676c9b770073a90d 100644 --- a/modules/Admin/Language/fr/Episode.php +++ b/modules/Admin/Language/fr/Episode.php @@ -168,9 +168,9 @@ return [ 'delete' => 'Supprimer l’extrait sonore', 'bookmark' => 'Cliquez pour récupérer la position actuelle, cliquez à nouveau pour récupérer la durée.', - 'submit_edit' => 'Enregistrer tous les extraits sonores', + 'submit' => 'Enregistrer les extraits sonnores', ], - 'embeddable_player' => [ + 'embed' => [ 'add' => 'Ajouter un lecteur intégré', 'title' => 'Lecteur intégré', 'label' => diff --git a/modules/Admin/Language/fr/EpisodeNavigation.php b/modules/Admin/Language/fr/EpisodeNavigation.php index 9ba3693724f38f86a679c8dd52dd53a06b494dba..d85c74d2c104c3c708838bc6fffd28c079ce84fd 100644 --- a/modules/Admin/Language/fr/EpisodeNavigation.php +++ b/modules/Admin/Language/fr/EpisodeNavigation.php @@ -14,6 +14,6 @@ return [ 'episode-view' => 'Accueil', 'episode-edit' => 'Modifier l’épisode', 'episode-persons-manage' => 'Gestion des intervenants', - 'embeddable-player-add' => 'Lecteur intégré', + 'embed' => 'Lecteur intégré', 'soundbites-edit' => 'Extraits sonores', ]; diff --git a/modules/Admin/Language/fr/Platforms.php b/modules/Admin/Language/fr/Platforms.php index 1a5a59c4d45b2c10e0a264e5f33db6bb2e1e9922..0c149715f2d19ede290ddfa91f89d82e0f6b9d25 100644 --- a/modules/Admin/Language/fr/Platforms.php +++ b/modules/Admin/Language/fr/Platforms.php @@ -13,7 +13,7 @@ return [ 'home_url' => 'Aller au site {platformName}', 'submit_url' => 'Soumettez votre podcast sur {platformName}', 'visible' => 'Afficher sur la page d’accueil du podcast ?', - 'on_embeddable_player' => 'Afficher sur le lecteur intégré ?', + 'on_embed' => 'Afficher sur le lecteur intégré ?', 'remove' => 'Supprimer {platformName}', 'submit' => 'Enregistrer', 'messages' => [ diff --git a/modules/Analytics/Controllers/EpisodeAnalyticsController.php b/modules/Analytics/Controllers/EpisodeAnalyticsController.php index 9b7a996977e16fc4f528069d8956a1ca6c8a6f90..167c5d84e38fe85b1e9083aa607bbbdb1d7ec9a6 100644 --- a/modules/Analytics/Controllers/EpisodeAnalyticsController.php +++ b/modules/Analytics/Controllers/EpisodeAnalyticsController.php @@ -56,8 +56,8 @@ class EpisodeAnalyticsController extends Controller $serviceName = ''; if (isset($_GET['_from'])) { $serviceName = $_GET['_from']; - } elseif ($session->get('embeddable_player_domain') !== null) { - $serviceName = $session->get('embeddable_player_domain'); + } elseif ($session->get('embed_domain') !== null) { + $serviceName = $session->get('embed_domain'); } elseif ($session->get('referer') !== null && $session->get('referer') !== '- Direct -') { $serviceName = parse_url($session->get('referer'), PHP_URL_HOST); } diff --git a/themes/cp_admin/episode/_sidebar.php b/themes/cp_admin/episode/_sidebar.php index 5067330a6c8a0f2908e8f91d78d4b694e973d0f2..8dba09e1fac7116425ab2208fc0ca271ea967a2c 100644 --- a/themes/cp_admin/episode/_sidebar.php +++ b/themes/cp_admin/episode/_sidebar.php @@ -3,11 +3,11 @@ $podcastNavigation = [ 'dashboard' => [ 'icon' => 'dashboard', - 'items' => ['episode-view', 'episode-edit', 'episode-persons-manage', 'embeddable-player-add', 'soundbites-edit'], + 'items' => ['episode-view', 'episode-edit', 'episode-persons-manage', 'embed-add', 'soundbites-edit'], ], ]; ?> -<a href="<?= route_to('podcast-view', $podcast->id) ?>" class="flex items-center px-4 py-2 border-b border-pine-900 focus:ring-castopod"> +<a href="<?= route_to('podcast-view', $podcast->id) ?>" class="flex items-center px-4 py-2 border-b border-pine-900 focus:ring-inset focus:ring-castopod"> <?= icon('arrow-left', 'mr-2') ?> <img src="<?= $podcast->image->thumbnail_url ?>" diff --git a/themes/cp_admin/episode/embeddable_player.php b/themes/cp_admin/episode/embed.php similarity index 58% rename from themes/cp_admin/episode/embeddable_player.php rename to themes/cp_admin/episode/embed.php index b6d40ed877a98e16a5a69e2a2e82e7f924d4a828..099b40b8a6e9bbaf5fdb25457620df0b649e72d7 100644 --- a/themes/cp_admin/episode/embeddable_player.php +++ b/themes/cp_admin/episode/embed.php @@ -1,39 +1,39 @@ <?= $this->extend('_layout') ?> <?= $this->section('title') ?> -<?= lang('Episode.embeddable_player.title') ?> +<?= lang('Episode.embed.title') ?> <?= $this->endSection() ?> <?= $this->section('pageTitle') ?> -<?= lang('Episode.embeddable_player.title') ?> +<?= lang('Episode.embed.title') ?> <?= $this->endSection() ?> <?= $this->section('content') ?> -<p><?= lang('Episode.embeddable_player.label') ?></p> +<p><?= lang('Episode.embed.label') ?></p> <div class="flex w-full mt-6"> <?php foreach ($themes as $themeKey => $theme): ?> <button style="<?= $theme[ 'style' ] ?>" class="w-12 h-12 mr-1 border-2 border-gray-400 rounded-lg hover:border-white" title="<?= lang( - "Episode.embeddable_player.{$themeKey}", - ) ?>" data-type="theme-picker" data-url="<?= $episode->getEmbeddablePlayerUrl( + "Episode.embed.{$themeKey}", + ) ?>" data-type="theme-picker" data-url="<?= $episode->getEmbedUrl( $themeKey, ) ?>"></button> <?php endforeach; ?> </div> -<iframe name="embeddable_player" id="embeddable_player" class="w-full max-w-xl mt-6 h-36" frameborder="0" scrolling="no" style="width: 100%; overflow: hidden;" src="<?= $episode->embeddable_player_url ?>"></iframe> +<iframe name="embed" id="embed" class="w-full max-w-xl mt-6 h-36" frameborder="0" scrolling="no" style="width: 100%; overflow: hidden;" src="<?= $episode->embed_url ?>"></iframe> <div class="flex items-center mt-8 gap-x-2"> - <Forms.Textarea readonly="true" class="w-full max-w-xl" name="iframe" rows="2" value="<?= esc("<iframe width=\"100%\" height=\"280\" frameborder=\"0\" scrolling=\"no\" style=\"width: 100%; height: 280px; overflow: hidden;\" src=\"{$episode->embeddable_player_url}\"></iframe>") ?>" /> - <IconButton glyph="file-copy" data-type="clipboard-copy" data-clipboard-target="iframe"><?= lang('Episode.embeddable_player.clipboard_iframe') ?></IconButton> + <Forms.Textarea readonly="true" class="w-full max-w-xl" name="iframe" rows="2" value="<?= esc("<iframe width=\"100%\" height=\"280\" frameborder=\"0\" scrolling=\"no\" style=\"width: 100%; height: 280px; overflow: hidden;\" src=\"{$episode->embed_url}\"></iframe>") ?>" /> + <IconButton glyph="file-copy" data-type="clipboard-copy" data-clipboard-target="iframe"><?= lang('Episode.embed.clipboard_iframe') ?></IconButton> </div> <div class="flex items-center mt-4 gap-x-2"> - <Forms.Input readonly="true" class="w-full max-w-xl" name="url" value="<?= $episode->embeddable_player_url ?>" /> - <IconButton glyph="file-copy" data-type="clipboard-copy" data-clipboard-target="url"><?= lang('Episode.embeddable_player.clipboard_url') ?></IconButton> + <Forms.Input readonly="true" class="w-full max-w-xl" name="url" value="<?= $episode->embed_url ?>" /> + <IconButton glyph="file-copy" data-type="clipboard-copy" data-clipboard-target="url"><?= lang('Episode.embed.clipboard_url') ?></IconButton> </div> <?= $this->endSection() ?> diff --git a/themes/cp_admin/episode/list.php b/themes/cp_admin/episode/list.php index db2a4a7e796df0fac1f83567647d1762ad09dd98..e035285fd5bfe44dd1f480f9f9f67d1f11a31b19 100644 --- a/themes/cp_admin/episode/list.php +++ b/themes/cp_admin/episode/list.php @@ -84,8 +84,8 @@ ], [ 'type' => 'link', - 'title' => lang('Episode.embeddable_player.title'), - 'uri' => route_to('embeddable-player-add', $podcast->id, $episode->id), + 'title' => lang('Episode.embed.title'), + 'uri' => route_to('embed-add', $podcast->id, $episode->id), ], [ 'type' => 'link', diff --git a/themes/cp_admin/episode/publish.php b/themes/cp_admin/episode/publish.php index d9912438ec21374ecb81ca2264a662e95f8dfba6..083e578ea9e03d5455c16f9cdec86a760a88f0ce 100644 --- a/themes/cp_admin/episode/publish.php +++ b/themes/cp_admin/episode/publish.php @@ -28,7 +28,7 @@ <small class="max-w-md mb-2 text-gray-600"><?= lang('Episode.publish_form.post_hint') ?></small> <div class="mb-8 overflow-hidden bg-white shadow-md rounded-xl"> <div class="flex px-4 py-3"> - <img src="<?= $podcast->actor->avatar_image_url ?>" alt="<?= $podcast->actor->display_name ?>" class="w-12 h-12 mr-4 rounded-full" /> + <img src="<?= $podcast->actor->avatar_image_url ?>" alt="<?= $podcast->actor->display_name ?>" class="w-10 h-10 mr-2 rounded-full" /> <div class="flex flex-col min-w-0"> <p class="flex items-baseline min-w-0"> <span class="mr-2 font-semibold truncate"><?= $podcast->actor->display_name ?></span> diff --git a/themes/cp_admin/episode/publish_edit.php b/themes/cp_admin/episode/publish_edit.php index de8b952726c1c683d82aae368577fc18f5bbb8f9..eff01066e549810c0d2fb5c63baa687f15dc9202 100644 --- a/themes/cp_admin/episode/publish_edit.php +++ b/themes/cp_admin/episode/publish_edit.php @@ -29,7 +29,7 @@ <small class="max-w-md mb-2 text-gray-600"><?= lang('Episode.publish_form.post_hint') ?></small> <div class="mb-8 overflow-hidden bg-white shadow-md rounded-xl"> <div class="flex px-4 py-3"> - <img src="<?= $podcast->actor->avatar_image_url ?>" alt="<?= $podcast->actor->display_name ?>" class="w-12 h-12 mr-4 rounded-full" /> + <img src="<?= $podcast->actor->avatar_image_url ?>" alt="<?= $podcast->actor->display_name ?>" class="w-10 h-10 mr-2 rounded-full" /> <div class="flex flex-col min-w-0"> <p class="flex items-baseline min-w-0"> <span class="mr-2 font-semibold truncate"><?= $podcast->actor->display_name ?></span> diff --git a/themes/cp_admin/episode/soundbites.php b/themes/cp_admin/episode/soundbites.php index d57db65eb8592a7d8e63bd7c180ce81d5a6fdb5a..1555d1474d09b6fcd93bcb0b6a600bc32ee6984f 100644 --- a/themes/cp_admin/episode/soundbites.php +++ b/themes/cp_admin/episode/soundbites.php @@ -8,10 +8,14 @@ <?= lang('Episode.soundbites_form.title') ?> <?= $this->endSection() ?> +<?= $this->section('headerRight') ?> +<Button variant="primary" type="submit" form="soundbites-form"><?= lang('Episode.soundbites_form.submit') ?></Button> +<?= $this->endSection() ?> + <?= $this->section('content') ?> -<form action="<?= route_to('episode-soundbites-edit', $podcast->id, $episode->id) ?>" method="POST" class="flex flex-col"> +<form id="soundbites-form" action="<?= route_to('episode-soundbites-edit', $podcast->id, $episode->id) ?>" method="POST" class="flex flex-col"> <?= csrf_field() ?> <Forms.Section @@ -62,12 +66,7 @@ </audio> <IconButton glyph="timer" variant="info" data-type="get-soundbite" data-start-time-field-name="soundbites[0][start_time]" data-duration-field-name="soundbites[0][duration]" ><?= lang('Episode.soundbites_form.bookmark') ?></IconButton> </div> - </Forms.Section> - -<Button variant="primary" type="submit" class="self-end"><?= lang('Episode.soundbites_form.submit_edit') ?></Button> - </form> - <?= $this->endSection() ?> diff --git a/themes/cp_admin/my_account/change_password.php b/themes/cp_admin/my_account/change_password.php index 944c4f247d6113ead90307b85581aa69ef8e6298..cbafc7327c907d267f9567f2beae9ab5e68c91f0 100644 --- a/themes/cp_admin/my_account/change_password.php +++ b/themes/cp_admin/my_account/change_password.php @@ -11,7 +11,7 @@ <?= $this->section('content') ?> -<form action="<?= route_to('change-password') ?>" method="POST" class="flex flex-col max-w-sm"> +<form action="<?= route_to('change-password') ?>" method="POST" class="flex flex-col max-w-sm gap-y-4"> <?= csrf_field() ?> <Forms.Field name="password" diff --git a/themes/cp_admin/podcast/latest_episodes.php b/themes/cp_admin/podcast/latest_episodes.php index 23edd32a2d2e945654ec6b28762562ff4b772acd..5349011205337e5582030160d266cc0138bcd60f 100644 --- a/themes/cp_admin/podcast/latest_episodes.php +++ b/themes/cp_admin/podcast/latest_episodes.php @@ -58,8 +58,8 @@ ], [ 'type' => 'link', - 'title' => lang('Episode.embeddable_player.title'), - 'uri' => route_to('embeddable-player-add', $podcast->id, $episode->id), + 'title' => lang('Episode.embed.title'), + 'uri' => route_to('embed-add', $podcast->id, $episode->id), ], [ 'type' => 'link', diff --git a/themes/cp_admin/podcast/platforms.php b/themes/cp_admin/podcast/platforms.php index 2b4cad9ae3e4c40d385634fc3c8648f85bb7c050..b6c47a4119147d2588c6dcc04676f254b99520d4 100644 --- a/themes/cp_admin/podcast/platforms.php +++ b/themes/cp_admin/podcast/platforms.php @@ -99,7 +99,7 @@ value="<?= $platform->link_content ?>" placeholder="<?= lang("Platforms.description.{$platform->type}") ?>" /> <Forms.Toggler size="small" class="text-sm" id="<?= $platform->slug . '_visible' ?>" name="<?= 'platforms[' . $platform->slug . '][visible]'?>" value="yes" checked="<?= old($platform->slug . '_visible', $platform->is_visible ? $platform->is_visible : false) ?>"><?= lang('Platforms.visible') ?></Forms.Toggler> - <Forms.Toggler size="small" class="text-sm" id="<?= $platform->slug . '_on_embeddable_player' ?>" name="<?= 'platforms[' . $platform->slug . '][on_embeddable_player]'?>" value="yes" checked="<?= old($platform->slug . '_on_embeddable_player', $platform->is_on_embeddable_player ? $platform->is_on_embeddable_player : false) ?>"><?= lang('Platforms.on_embeddable_player') ?></Forms.Toggler> + <Forms.Toggler size="small" class="text-sm" id="<?= $platform->slug . '_on_embed' ?>" name="<?= 'platforms[' . $platform->slug . '][on_embed]'?>" value="yes" checked="<?= old($platform->slug . '_on_embed', $platform->is_on_embed ? $platform->is_on_embed : false) ?>"><?= lang('Platforms.on_embed') ?></Forms.Toggler> </fieldset> </div> </div> diff --git a/themes/cp_app/embeddable_player.php b/themes/cp_app/embed.php similarity index 57% rename from themes/cp_app/embeddable_player.php rename to themes/cp_app/embed.php index c2055939388ab09abef224c360342828bdd52235..1fc63441bfe31f0ee664a37b5610c21bd11a550f 100644 --- a/themes/cp_app/embeddable_player.php +++ b/themes/cp_app/embed.php @@ -16,46 +16,23 @@ ->asset('js/embed.ts', 'js') ?> </head> -<body class="flex w-full h-screen" style="background: <?= $themeData[ - 'background' -] ?>; color: <?= $themeData['text'] ?>;"> - <img src="<?= $episode->image - ->thumbnail_url ?>" alt="<?= $episode->title ?>" class="flex-shrink w-36 h-36" /> - <div class="flex flex-col items-start flex-1 min-w-0 px-4 py-2 h-36"> - <div class="flex items-center w-full"> - <a href="<?= route_to( - 'podcast-activity', - $podcast->handle, - ) ?>" style="color: <?= $themeData[ - 'text' -] ?>;" class="mr-2 text-xs tracking-wider uppercase truncate opacity-75 hover:opacity-100" target="_blank"> - <?= $podcast->title ?> - </a> - <a href="https://castopod.org/" class="ml-auto text-3xl text-pine-500 hover:opacity-75" title="<?= lang( - 'Common.powered_by', - [ - 'castopod' => 'Castopod', - ], -) ?>" target="_blank" rel="noopener noreferrer"> - <?= icon('podcasting/castopod') ?> - </a> +<body class="flex" style="background: <?= $themeData['background'] ?>; color: <?= $themeData['text'] ?>;"> + <img src="<?= $episode->image->thumbnail_url ?>" alt="<?= $episode->title ?>" class="flex-shrink w-36 h-36" /> + <div class="flex flex-col items-start flex-1 min-w-0 px-4 pt-4 h-36"> + <a href="https://castopod.org/" class="absolute text-2xl top-1 right-2 text-pine-500 hover:opacity-75" title="<?= lang('Common.powered_by', [ + 'castopod' => 'Castopod', + ]) ?>" target="_blank" rel="noopener noreferrer"><?= icon('podcasting/castopod') ?></a> + <div class="flex gap-x-2"> + <?= episode_numbering($episode->number, $episode->season_number, 'text-xs font-semibold !no-underline border px-1 border-gray-500', true) ?> + <a href="<?= route_to('podcast-activity', $podcast->handle) ?>" style="color: <?= $themeData['text'] ?>;" class="text-xs truncate opacity-75 hover:opacity-100" target="_blank"><?= $podcast->title ?></a> </div> - <a href="<?= $episode->link ?>" class="flex items-center mb-2" style="color: <?= $themeData[ - 'text' -] ?>;" target="_blank"> - <?= episode_numbering( - $episode->number, - $episode->season_number, - 'text-xs font-semibold text-gray-600 !no-underline border px-1 border-gray-500 mr-1', - true, -) ?><h1 class="mr-2 text-lg font-semibold truncate opacity-100 hover:opacity-75"> -<?= $episode->title ?> -</h1> + <a href="<?= $episode->link ?>" class="flex flex-col items-start text-sm" style="color: <?= $themeData['text'] ?>;" target="_blank"> + <h1 class="text-lg font-semibold leading-tight opacity-100 line-clamp-2 hover:opacity-75"><?= $episode->title ?></h1> </a> <vm-player id="castopod-vm-player" theme="<?= str_starts_with($theme, 'dark') ? 'dark' : 'light' ?>" - language="${language}" + language="<?= service('request')->getLocale() ?>" icons="castopod-icons" class="w-full mt-auto" style="--vm-player-box-shadow:0; --vm-player-theme: #009486; --vm-control-spacing: 4px; --vm-control-icon-size: 24px; <?= str_ends_with($theme, 'transparent') ? '--vm-controls-bg: transparent;' : '' ?>" diff --git a/themes/cp_app/episode/_layout.php b/themes/cp_app/episode/_layout.php index 37747337210ea7255422b181de53a655824b34e0..8113ffb9d54e9ce6e099476d494e05da3b73a08b 100644 --- a/themes/cp_app/episode/_layout.php +++ b/themes/cp_app/episode/_layout.php @@ -32,7 +32,7 @@ <?php endif; ?> <nav class="flex items-center justify-between h-10 col-start-2 px-2 text-white bg-pine-800"> - <a href="<?= route_to('podcast-episodes', $podcast->handle) ?>" class="inline-flex items-center" title="<?= lang('Episode.back_to_episodes', [ + <a href="<?= route_to('podcast-episodes', $podcast->handle) ?>" class="inline-flex items-center focus:ring-castopod" title="<?= lang('Episode.back_to_episodes', [ 'podcast' => $podcast->title, ]) ?>"> <?= icon('arrow-left', 'mr-2 text-lg') ?> diff --git a/themes/cp_app/episode/_partials/comment_card.php b/themes/cp_app/episode/_partials/comment_card.php index 7f6bca1d9620fb77202c85879d791b2eb8eab83d..eedbcf90a1efa47c18fdb7e8aa3758d17dd86c5f 100644 --- a/themes/cp_app/episode/_partials/comment_card.php +++ b/themes/cp_app/episode/_partials/comment_card.php @@ -1,5 +1,5 @@ <article class="relative z-10 flex w-full p-4 bg-white shadow rounded-conditional-2xl"> - <img src="<?= $comment->actor->avatar_image_url ?>" alt="<?= $comment->display_name ?>" class="w-12 h-12 mr-4 rounded-full" /> + <img src="<?= $comment->actor->avatar_image_url ?>" alt="<?= $comment->display_name ?>" class="w-10 h-10 mr-2 rounded-full" /> <div class="flex-1"> <header class="w-full mb-2 text-sm"> <a href="<?= $comment->actor->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local diff --git a/themes/cp_app/episode/_partials/comment_reply.php b/themes/cp_app/episode/_partials/comment_reply.php index 8f6d464bfd12bd0b00d8ca1f50a65eefefd9aa4f..59b5643fdd9cc03415525baa33c0ef7c89423ef9 100644 --- a/themes/cp_app/episode/_partials/comment_reply.php +++ b/themes/cp_app/episode/_partials/comment_reply.php @@ -1,6 +1,6 @@ <article class="flex px-6 py-4 bg-gray-50"> <img src="<?= $reply->actor->avatar_image_url ?>" alt="<?= $reply->actor - ->display_name ?>" class="w-12 h-12 mr-4 rounded-full ring-gray-50 ring-2" /> + ->display_name ?>" class="w-10 h-10 mr-2 rounded-full ring-gray-50 ring-2" /> <div class="flex flex-col flex-1 min-w-0"> <header class="flex items-center mb-2"> <a href="<?= $reply->actor diff --git a/themes/cp_app/episode/_partials/comment_reply_actions.php b/themes/cp_app/episode/_partials/comment_reply_actions.php index 126167a254dd03b7b38ea82ed0118a99b419ea1a..bae6c3cb139873fd34fee6c561622f8ea4a03fc1 100644 --- a/themes/cp_app/episode/_partials/comment_reply_actions.php +++ b/themes/cp_app/episode/_partials/comment_reply_actions.php @@ -1,13 +1,13 @@ <footer> <?php if (can_user_interact()): ?> - <form action="<?= route_to('comment-attempt-like', interact_as_actor()->username, $episode->slug, $reply->id) ?>" method="POST" class="flex items-center gap-x-4"> + <form action="<?= route_to('comment-attempt-like', interact_as_actor()->username, $reply->episode->slug, $reply->id) ?>" method="POST" class="flex items-center gap-x-4"> <button type="submit" name="action" class="inline-flex items-center hover:underline group" title="<?= lang( 'Comment.likes', [ 'numberOfLikes' => $reply->likes_count, ], ) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $reply->likes_count ?></button> - <Button uri="<?= route_to('episode-comment', $podcast->handle, $episode->slug, $reply->id) ?>" size="small"><?= lang('Comment.reply') ?></Button> + <Button uri="<?= route_to('episode-comment', $reply->episode->podcast->handle, $reply->episode->slug, $reply->id) ?>" size="small"><?= lang('Comment.reply') ?></Button> </form> <?php else: ?> <button type="submit" name="action" class="inline-flex items-center opacity-50 cursor-not-allowed" disabled="disabled" title="<?= lang( @@ -18,7 +18,7 @@ ) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $reply->likes_count ?></button> <?php if ($reply->replies_count): ?> <?= anchor( - route_to('episode-comment', $podcast->handle, $episode->slug, $reply->id), + route_to('episode-comment', $reply->episode->podcast->handle, $reply->episode->slug, $reply->id), icon('chat', 'text-2xl mr-1 text-gray-400') . $reply->replies_count, [ 'class' => 'inline-flex items-center hover:underline', diff --git a/themes/cp_app/episode/_partials/comment_with_replies.php b/themes/cp_app/episode/_partials/comment_with_replies.php index aec689bff1c5e3aded3ca1dfab47ce91faa5e627..45b42537fc7250fa6d154b70eefcee49f32c9078 100644 --- a/themes/cp_app/episode/_partials/comment_with_replies.php +++ b/themes/cp_app/episode/_partials/comment_with_replies.php @@ -5,7 +5,7 @@ <form action="<?= route_to('comment-attempt-reply', $podcast->id, $episode->id, $comment->id) ?>" method="POST" class="flex px-6 pt-8 pb-4 bg-gray-50"> <img src="<?= interact_as_actor() ->avatar_image_url ?>" alt="<?= interact_as_actor() - ->display_name ?>" class="w-12 h-12 mr-4 rounded-full ring-gray-50 ring-2" /> + ->display_name ?>" class="w-10 h-10 mr-2 rounded-full ring-gray-50 ring-2" /> <div class="flex flex-col flex-1"> <Forms.Textarea name="message" diff --git a/themes/cp_app/episode/activity.php b/themes/cp_app/episode/activity.php index fdb1c5fc853afff4eae6300178096cfcf93cbba5..df14e3201609768c96932e01f5f419f71ef807c8 100644 --- a/themes/cp_app/episode/activity.php +++ b/themes/cp_app/episode/activity.php @@ -27,7 +27,7 @@ <meta name="twitter:card" content="player" /> <meta property="twitter:audio:partner" content="<?= $podcast->publisher ?>" /> <meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" /> -<meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl('light') ?>" /> +<meta name="twitter:player" content="<?= $episode->getEmbedUrl('light') ?>" /> <meta name="twitter:player:width" content="600" /> <meta name="twitter:player:height" content="200" /> <?= $this->endSection() ?> @@ -42,7 +42,7 @@ <img src="<?= interact_as_actor() ->avatar_image_url ?>" alt="<?= interact_as_actor() - ->display_name ?>" class="w-12 h-12 mr-4 rounded-full" /> + ->display_name ?>" class="w-10 h-10 mr-2 rounded-full" /> <div class="flex flex-col flex-1 min-w-0 gap-y-2"> <input name="episode_url" value="<?= $episode->link ?>" type="hidden" /> <Forms.Textarea diff --git a/themes/cp_app/episode/comments.php b/themes/cp_app/episode/comments.php index f9d2d11782786133877fc97575f6b4a26d8f8e50..df5d33481778eb10d2c13c1377d9cf574b3e6167 100644 --- a/themes/cp_app/episode/comments.php +++ b/themes/cp_app/episode/comments.php @@ -29,7 +29,7 @@ <meta name="twitter:card" content="player" /> <meta property="twitter:audio:partner" content="<?= $podcast->publisher ?>" /> <meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" /> -<meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl('light') ?>" /> +<meta name="twitter:player" content="<?= $episode->getEmbedUrl('light') ?>" /> <meta name="twitter:player:width" content="600" /> <meta name="twitter:player:height" content="200" /> <?= $this->endSection() ?> diff --git a/themes/cp_app/podcast/_layout.php b/themes/cp_app/podcast/_layout.php index cfc098a37894f171e7f0f428dbbc7ef1fd44907c..5909b6f46bdc342e5ee44363cfa0b1d1d8e0a651 100644 --- a/themes/cp_app/podcast/_layout.php +++ b/themes/cp_app/podcast/_layout.php @@ -31,7 +31,7 @@ </div> <?php endif; ?> - <header class="z-50 flex flex-col-reverse justify-between w-full col-start-2 bg-top bg-no-repeat bg-cover sm:flex-row sm:items-end bg-pine-800" style="background-image: url('<?= $podcast->actor->cover_image_url ?>'); aspect-ratio: 15 / 5;"> + <header class="z-50 flex flex-col-reverse justify-between w-full col-start-2 bg-top bg-no-repeat bg-cover sm:flex-row sm:items-end bg-pine-800" style="background-image: url('<?= $podcast->actor->cover_image_url ?>'); aspect-ratio: 3 / 1;"> <div class="flex items-center pl-4 -mb-6 md:pl-8 md:-mb-8 gap-x-4"> <img src="<?= $podcast->image->thumbnail_url ?>" alt="<?= $podcast->title ?>" loading="lazy" class="h-24 rounded-full md:h-28 ring-4 ring-white" /> <div class="relative flex flex-col text-white -top-2"> diff --git a/themes/cp_app/podcast/activity.php b/themes/cp_app/podcast/activity.php index 603559d6ea2f17c86e2675f7b931b7a88ec39d9e..4e7119e9d9738b34384f32edc573f161892fb6ab 100644 --- a/themes/cp_app/podcast/activity.php +++ b/themes/cp_app/podcast/activity.php @@ -35,7 +35,7 @@ <img src="<?= interact_as_actor() ->avatar_image_url ?>" alt="<?= interact_as_actor() - ->display_name ?>" class="w-12 h-12 mr-4 rounded-full" /> + ->display_name ?>" class="w-10 h-10 mr-2 rounded-full" /> <div class="flex flex-col flex-1 min-w-0 gap-y-2"> <Forms.Textarea name="message" diff --git a/themes/cp_app/post/_partials/post_with_replies.php b/themes/cp_app/post/_partials/post_with_replies.php index fc3b66a22fd9f3c848e08d8c6386efa294799342..a5f5f2ba36111520ca01c85964e71cad9cc2f504 100644 --- a/themes/cp_app/post/_partials/post_with_replies.php +++ b/themes/cp_app/post/_partials/post_with_replies.php @@ -9,7 +9,7 @@ <form action="<?= route_to('post-attempt-action', interact_as_actor()->username, $post->id) ?>" method="POST" class="flex" > <img src="<?= interact_as_actor() ->avatar_image_url ?>" alt="<?= interact_as_actor() - ->display_name ?>" class="w-12 h-12 mr-4 rounded-full ring-gray-50 ring-2" /> + ->display_name ?>" class="w-10 h-10 mr-2 rounded-full ring-gray-50 ring-2" /> <div class="flex flex-col flex-1"> <Forms.Textarea name="message" diff --git a/themes/cp_app/post/_partials/reblog.php b/themes/cp_app/post/_partials/reblog.php index 487a99ed2255fc37d37a1a41ecfd07219e3b9600..f2f7a77145a88253eb59e390cbca4dec39980ad7 100644 --- a/themes/cp_app/post/_partials/reblog.php +++ b/themes/cp_app/post/_partials/reblog.php @@ -8,7 +8,7 @@ ]) ?></p> <header class="flex px-6 py-4"> <img src="<?= $post->actor - ->avatar_image_url ?>" alt="<?= $post->display_name ?>" class="w-12 h-12 mr-4 rounded-full" /> + ->avatar_image_url ?>" alt="<?= $post->display_name ?>" class="w-10 h-10 mr-2 rounded-full" /> <div class="flex flex-col min-w-0"> <a href="<?= $post->actor ->uri ?>" class="flex items-baseline hover:underline" <?= $post diff --git a/themes/cp_app/post/_partials/reply.php b/themes/cp_app/post/_partials/reply.php index e39bc418a8d1b8947859ddc643989aae83d7af49..12dcafde88e2c5ee394dbdcd8bc73ca65e4aa383 100644 --- a/themes/cp_app/post/_partials/reply.php +++ b/themes/cp_app/post/_partials/reply.php @@ -1,6 +1,6 @@ <article class="flex px-6 py-4 bg-gray-50"> <img src="<?= $reply->actor->avatar_image_url ?>" alt="<?= $reply->actor - ->display_name ?>" class="w-12 h-12 mr-4 rounded-full ring-gray-50 ring-2" /> + ->display_name ?>" class="w-10 h-10 mr-2 rounded-full ring-gray-50 ring-2" /> <div class="flex flex-col flex-1 min-w-0"> <header class="flex items-center mb-2"> <a href="<?= $reply->actor diff --git a/themes/cp_install/cache_config.php b/themes/cp_install/cache_config.php index 21ea7740a91b9c6b590015b4b357881429b61fb0..730b5bd776c9f36ef88ae60505fc684817d644e4 100644 --- a/themes/cp_install/cache_config.php +++ b/themes/cp_install/cache_config.php @@ -7,7 +7,7 @@ <div class="flex flex-col mb-2"> <div class="flex items-center"> - <span class="inline-flex items-center justify-center w-12 h-12 mr-2 text-sm font-semibold tracking-wider border-4 rounded-full text-pine-700 border-pine-700">3/4</span> + <span class="inline-flex items-center justify-center w-12 h-12 mr-2 text-sm font-semibold tracking-wider border-4 rounded-full text-pine-500 border-pine-500">3/4</span> <Heading tagName="h1"><?= lang('Install.form.cache_config') ?></h1> </div> diff --git a/themes/cp_install/create_superadmin.php b/themes/cp_install/create_superadmin.php index 16771ce1e568fcd77a5dad75dfa72b4d25184a4e..2c44766f0babc94857e4d10bb0e9ec48a5bf228e 100644 --- a/themes/cp_install/create_superadmin.php +++ b/themes/cp_install/create_superadmin.php @@ -6,7 +6,7 @@ <?= csrf_field() ?> <div class="flex items-center mb-2"> - <span class="inline-flex items-center justify-center w-12 h-12 mr-2 text-sm font-semibold tracking-wider border-4 rounded-full text-pine-700 border-pine-700">4/4</span> + <span class="inline-flex items-center justify-center w-12 h-12 mr-2 text-sm font-semibold tracking-wider border-4 rounded-full text-pine-500 border-pine-500">4/4</span> <Heading tagName="h1"><?= lang('Install.form.create_superadmin') ?></Heading> </div> diff --git a/themes/cp_install/database_config.php b/themes/cp_install/database_config.php index 61b3f249781c329255a580fae762fc3df7cd80e1..c225005da1926d7e42266c64c1112389cf998ee4 100644 --- a/themes/cp_install/database_config.php +++ b/themes/cp_install/database_config.php @@ -7,7 +7,7 @@ <div class="flex flex-col mb-2"> <div class="flex items-center"> - <span class="inline-flex items-center justify-center w-12 h-12 mr-2 text-sm font-semibold tracking-wider border-4 rounded-full text-pine-700 border-pine-700">2/4</span> + <span class="inline-flex items-center justify-center w-12 h-12 mr-2 text-sm font-semibold tracking-wider border-4 rounded-full text-pine-500 border-pine-500">2/4</span> <Heading tagName="h1"><?= lang( 'Install.form.database_config', ) ?></Heading> diff --git a/themes/cp_install/instance_config.php b/themes/cp_install/instance_config.php index 7e8620ac57a4de88b9e6c857d74bca9f7ac2945b..a6a8e8e02f5669fdcfd5e0988bda9ae499aa661a 100644 --- a/themes/cp_install/instance_config.php +++ b/themes/cp_install/instance_config.php @@ -5,8 +5,8 @@ <form action="<?= '/' . config('Install')->gateway . '/instance-config' ?>" class="flex flex-col w-full max-w-sm gap-y-4" method="post" accept-charset="utf-8"> <?= csrf_field() ?> -<div class="flex items-center mb-4"> - <span class="inline-flex items-center justify-center w-12 h-12 mr-2 text-sm font-semibold tracking-wider border-4 rounded-full text-pine-700 border-pine-700">1/4</span> +<div class="flex items-center mb-2"> + <span class="inline-flex items-center justify-center w-12 h-12 mr-2 text-sm font-semibold tracking-wider border-4 rounded-full text-pine-500 border-pine-500">1/4</span> <Heading tagName="h1"><?= lang('Install.form.instance_config') ?></Heading> </div>