From 932140077c671f0486a2cd08ceb6126c7ecde87f Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Wed, 13 Oct 2021 15:43:40 +0000 Subject: [PATCH] feat: redesign public podcast and episode pages + remove any information clutter for better ux - add About podcast page - use different layout for episode pages - improve on user feedback with design - restructure app theme folders - update js packages to latest versions --- app/Config/Routes.php | 9 +- app/Controllers/EpisodeCommentController.php | 3 +- app/Controllers/EpisodeController.php | 41 ++++- app/Controllers/PodcastController.php | 9 +- app/Controllers/PostController.php | 5 +- app/Helpers/components_helper.php | 94 +---------- app/Helpers/misc_helper.php | 28 ++++ app/Language/en/Comment.php | 2 +- app/Language/en/Common.php | 6 +- app/Language/en/Episode.php | 7 +- app/Language/en/Podcast.php | 7 +- app/Language/en/Post.php | 2 +- app/Language/fr/Common.php | 6 +- app/Language/fr/Episode.php | 7 +- app/Language/fr/Podcast.php | 7 +- app/Libraries/CommentObject.php | 7 +- app/Models/EpisodeCommentModel.php | 4 +- app/Resources/icons/send-plane.svg | 6 + app/Resources/js/app.ts | 3 + app/Resources/js/audio-player.ts | 2 +- .../js/modules/play-episode-button.ts | 80 ++++++---- app/Resources/js/podcast.ts | 2 - app/Resources/styles/index.css | 2 + app/Resources/styles/layout.css | 46 +++--- app/Resources/styles/readMore.css | 53 +++++++ app/Resources/styles/seeMore.css | 52 ++++++ app/Views/Components/Button.php | 2 +- app/Views/Components/DropdownMenu.php | 3 + app/Views/Components/Forms/MarkdownEditor.php | 2 +- app/Views/Components/ReadMore.php | 23 +++ app/Views/Components/SeeMore.php | 23 +++ modules/Admin/Language/en/AdminNavigation.php | 1 + modules/Admin/Language/en/Common.php | 2 +- modules/Admin/Language/en/Episode.php | 4 - modules/Admin/Language/en/Podcast.php | 1 - modules/Admin/Language/fr/Common.php | 2 +- modules/Admin/Language/fr/Episode.php | 3 - modules/Admin/Language/fr/Podcast.php | 1 - modules/Fediverse/Entities/Post.php | 8 - package-lock.json | 72 ++++----- package.json | 35 ++-- tailwind.config.js | 3 +- themes/cp_admin/_layout.php | 45 +----- themes/cp_admin/_partials/_nav_header.php | 87 ++++++++++ themes/cp_admin/episode/edit.php | 4 +- themes/cp_admin/page/edit.php | 2 +- themes/cp_admin/podcast/edit.php | 2 +- themes/cp_admin/podcast/import.php | 12 +- themes/cp_app/_admin_navbar.php | 132 +++++++++------ themes/cp_app/_layout.php | 6 +- themes/cp_app/_persons_modal.php | 46 ++++++ themes/cp_app/episode/_layout.php | 143 +++++++++++++++++ themes/cp_app/episode/_partials/card.php | 29 ++++ .../_partials/comment.php | 10 +- .../episode/_partials/comment_actions.php | 42 +++++ .../_partials/comment_actions_from_post.php | 42 +++++ .../_partials/comment_card.php} | 23 ++- .../_partials/comment_reply.php | 2 +- .../_partials/comment_reply_actions.php | 32 ++++ .../_partials/comment_with_replies.php | 29 ++++ .../cp_app/episode/_partials/navigation.php | 22 +++ .../cp_app/episode/_partials/preview_card.php | 27 ++++ themes/cp_app/episode/activity.php | 68 ++++++++ .../cp_app/{podcast => episode}/comment.php | 4 +- themes/cp_app/episode/comments.php | 69 ++++++++ themes/cp_app/home.php | 4 +- themes/cp_app/map.php | 4 +- themes/cp_app/page.php | 4 +- themes/cp_app/podcast/_layout copy.php | 123 -------------- themes/cp_app/podcast/_layout.php | 146 +++++------------ .../cp_app/podcast/_layout_authenticated.php | 115 -------------- themes/cp_app/podcast/_navigation.php | 23 --- .../podcast/_partials/comment_actions.php | 19 --- .../comment_actions_authenticated.php | 22 --- .../_partials/comment_actions_from_post.php | 19 --- ...omment_actions_from_post_authenticated.php | 22 --- .../_partials/comment_authenticated.php | 26 --- .../cp_app/podcast/_partials/comment_card.php | 38 ----- .../_partials/comment_reply_actions.php | 20 --- .../comment_reply_actions_authenticated.php | 11 -- .../_partials/comment_reply_authenticated.php | 19 --- .../_partials/comment_with_replies.php | 10 -- .../comment_with_replies_authenticated.php | 25 --- .../cp_app/podcast/_partials/episode_card.php | 43 ----- .../_partials/episode_preview_card.php | 26 --- .../podcast/_partials/funding_links_modal.php | 39 +++++ themes/cp_app/podcast/_partials/header.php | 58 ------- .../cp_app/podcast/_partials/navigation.php | 24 +++ themes/cp_app/podcast/_partials/post.php | 36 ----- .../cp_app/podcast/_partials/post_actions.php | 36 ----- .../_partials/post_actions_authenticated.php | 92 ----------- .../podcast/_partials/post_with_replies.php | 27 ---- .../post_with_replies_authenticated.php | 27 ---- .../_partials/reblog_authenticated.php | 43 ----- .../podcast/_partials/reply_actions.php | 36 ----- .../_partials/reply_actions_authenticated.php | 92 ----------- .../podcast/_partials/reply_authenticated.php | 24 --- themes/cp_app/podcast/_partials/sidebar.php | 116 ++++++-------- themes/cp_app/podcast/about.php | 46 ++++++ themes/cp_app/podcast/activity.php | 55 +++++-- .../cp_app/podcast/activity_authenticated.php | 73 --------- .../cp_app/podcast/comment_authenticated.php | 41 ----- themes/cp_app/podcast/episode.php | 113 ------------- .../cp_app/podcast/episode_authenticated.php | 150 ------------------ themes/cp_app/podcast/episodes.php | 38 ++--- .../cp_app/podcast/episodes_authenticated.php | 63 -------- themes/cp_app/podcast/follow.php | 20 +-- themes/cp_app/podcast/post_authenticated.php | 40 ----- themes/cp_app/post/_partials/actions.php | 124 +++++++++++++++ .../_partials/card.php} | 21 ++- .../post/_partials/post_with_replies.php | 49 ++++++ .../_partials/preview_card.php | 0 .../{podcast => post}/_partials/reblog.php | 10 +- .../{podcast => post}/_partials/reply.php | 8 +- .../cp_app/post/_partials/reply_actions.php | 124 +++++++++++++++ themes/cp_app/{podcast => post}/post.php | 28 ++-- .../remote_action.php} | 2 +- themes/cp_auth/_layout.php | 2 +- themes/cp_install/_layout.php | 2 +- vite.config.ts | 1 + 120 files changed, 1794 insertions(+), 2138 deletions(-) create mode 100644 app/Resources/icons/send-plane.svg create mode 100644 app/Resources/js/app.ts create mode 100644 app/Resources/styles/readMore.css create mode 100644 app/Resources/styles/seeMore.css create mode 100644 app/Views/Components/ReadMore.php create mode 100644 app/Views/Components/SeeMore.php create mode 100644 themes/cp_admin/_partials/_nav_header.php create mode 100644 themes/cp_app/_persons_modal.php create mode 100644 themes/cp_app/episode/_layout.php create mode 100644 themes/cp_app/episode/_partials/card.php rename themes/cp_app/{podcast => episode}/_partials/comment.php (77%) create mode 100644 themes/cp_app/episode/_partials/comment_actions.php create mode 100644 themes/cp_app/episode/_partials/comment_actions_from_post.php rename themes/cp_app/{podcast/_partials/comment_card_authenticated.php => episode/_partials/comment_card.php} (58%) rename themes/cp_app/{podcast => episode}/_partials/comment_reply.php (93%) create mode 100644 themes/cp_app/episode/_partials/comment_reply_actions.php create mode 100644 themes/cp_app/episode/_partials/comment_with_replies.php create mode 100644 themes/cp_app/episode/_partials/navigation.php create mode 100644 themes/cp_app/episode/_partials/preview_card.php create mode 100644 themes/cp_app/episode/activity.php rename themes/cp_app/{podcast => episode}/comment.php (92%) create mode 100644 themes/cp_app/episode/comments.php delete mode 100644 themes/cp_app/podcast/_layout copy.php delete mode 100644 themes/cp_app/podcast/_layout_authenticated.php delete mode 100644 themes/cp_app/podcast/_navigation.php delete mode 100644 themes/cp_app/podcast/_partials/comment_actions.php delete mode 100644 themes/cp_app/podcast/_partials/comment_actions_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/comment_actions_from_post.php delete mode 100644 themes/cp_app/podcast/_partials/comment_actions_from_post_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/comment_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/comment_card.php delete mode 100644 themes/cp_app/podcast/_partials/comment_reply_actions.php delete mode 100644 themes/cp_app/podcast/_partials/comment_reply_actions_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/comment_reply_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/comment_with_replies.php delete mode 100644 themes/cp_app/podcast/_partials/comment_with_replies_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/episode_card.php delete mode 100644 themes/cp_app/podcast/_partials/episode_preview_card.php create mode 100644 themes/cp_app/podcast/_partials/funding_links_modal.php delete mode 100644 themes/cp_app/podcast/_partials/header.php create mode 100644 themes/cp_app/podcast/_partials/navigation.php delete mode 100644 themes/cp_app/podcast/_partials/post.php delete mode 100644 themes/cp_app/podcast/_partials/post_actions.php delete mode 100644 themes/cp_app/podcast/_partials/post_actions_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/post_with_replies.php delete mode 100644 themes/cp_app/podcast/_partials/post_with_replies_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/reblog_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/reply_actions.php delete mode 100644 themes/cp_app/podcast/_partials/reply_actions_authenticated.php delete mode 100644 themes/cp_app/podcast/_partials/reply_authenticated.php delete mode 100644 themes/cp_app/podcast/activity_authenticated.php delete mode 100644 themes/cp_app/podcast/comment_authenticated.php delete mode 100644 themes/cp_app/podcast/episode.php delete mode 100644 themes/cp_app/podcast/episode_authenticated.php delete mode 100644 themes/cp_app/podcast/episodes_authenticated.php delete mode 100644 themes/cp_app/podcast/post_authenticated.php create mode 100644 themes/cp_app/post/_partials/actions.php rename themes/cp_app/{podcast/_partials/post_authenticated.php => post/_partials/card.php} (63%) create mode 100644 themes/cp_app/post/_partials/post_with_replies.php rename themes/cp_app/{podcast => post}/_partials/preview_card.php (100%) rename themes/cp_app/{podcast => post}/_partials/reblog.php (83%) rename themes/cp_app/{podcast => post}/_partials/reply.php (77%) create mode 100644 themes/cp_app/post/_partials/reply_actions.php rename themes/cp_app/{podcast => post}/post.php (65%) rename themes/cp_app/{podcast/post_remote_action.php => post/remote_action.php} (97%) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 04b8ebfd..9234895e 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -114,6 +114,9 @@ $routes->group('@(:podcastHandle)', function ($routes): void { ], ], ]); + $routes->get('activity', 'EpisodeController::activity/$1/$2', [ + 'as' => 'episode-activity', + ]); $routes->options('comments', 'ActivityPubController::preflight'); $routes->get('comments', 'EpisodeController::comments/$1/$2', [ 'as' => 'episode-comments', @@ -128,7 +131,7 @@ $routes->group('@(:podcastHandle)', function ($routes): void { ], ]); $routes->get('comments/(:uuid)', 'EpisodeCommentController::view/$1/$2/$3', [ - 'as' => 'comment', + 'as' => 'episode-comment', 'application/activity+json' => [ 'controller-method' => 'EpisodeController::commentObject/$1/$2', ], @@ -140,10 +143,10 @@ $routes->group('@(:podcastHandle)', function ($routes): void { ], ]); $routes->get('comments/(:uuid)/replies', 'EpisodeCommentController::replies/$1/$2/$3', [ - 'as' => 'comment-replies', + 'as' => 'episode-comment-replies', ]); $routes->post('comments/(:uuid)/like', 'EpisodeCommentController::attemptLike/$1/$2/$3', [ - 'as' => 'comment-attempt-like', + 'as' => 'episode-comment-attempt-like', ]); $routes->get('oembed.json', 'EpisodeController::oembedJSON/$1/$2', [ 'as' => 'episode-oembed-json', diff --git a/app/Controllers/EpisodeCommentController.php b/app/Controllers/EpisodeCommentController.php index 4dcef861..f64c1db3 100644 --- a/app/Controllers/EpisodeCommentController.php +++ b/app/Controllers/EpisodeCommentController.php @@ -104,9 +104,8 @@ class EpisodeCommentController extends BaseController // if user is logged in then send to the authenticated activity view if (can_user_interact()) { helper('form'); - return view('podcast/comment_authenticated', $data); } - return view('podcast/comment', $data, [ + return view('episode/comment', $data, [ 'cache' => DECADE, 'cache_name' => $cacheName, ]); diff --git a/app/Controllers/EpisodeController.php b/app/Controllers/EpisodeController.php index 9aacdc68..d5ddd9f7 100644 --- a/app/Controllers/EpisodeController.php +++ b/app/Controllers/EpisodeController.php @@ -87,10 +87,47 @@ class EpisodeController extends BaseController if (can_user_interact()) { helper('form'); - return view('podcast/episode_authenticated', $data); } // The page cache is set to a decade so it is deleted manually upon podcast update - return view('podcast/episode', $data, [ + return view('episode/comments', $data, [ + 'cache' => $secondsToNextUnpublishedEpisode + ? $secondsToNextUnpublishedEpisode + : DECADE, + 'cache_name' => $cacheName, + ]); + } + + return $cachedView; + } + + public function activity(): string + { + // Prevent analytics hit when authenticated + if (! can_user_interact()) { + $this->registerPodcastWebpageHit($this->episode->podcast_id); + } + + $locale = service('request') + ->getLocale(); + $cacheName = + "page_podcast#{$this->podcast->id}_episode#{$this->episode->id}_{$locale}" . + (can_user_interact() ? '_authenticated' : ''); + + if (! ($cachedView = cache($cacheName))) { + $data = [ + 'podcast' => $this->podcast, + 'episode' => $this->episode, + ]; + + $secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode( + $this->podcast->id, + ); + + if (can_user_interact()) { + helper('form'); + } + // The page cache is set to a decade so it is deleted manually upon podcast update + return view('episode/activity', $data, [ 'cache' => $secondsToNextUnpublishedEpisode ? $secondsToNextUnpublishedEpisode : DECADE, diff --git a/app/Controllers/PodcastController.php b/app/Controllers/PodcastController.php index 21ce0ed0..f330064d 100644 --- a/app/Controllers/PodcastController.php +++ b/app/Controllers/PodcastController.php @@ -87,7 +87,6 @@ class PodcastController extends BaseController // if user is logged in then send to the authenticated activity view if (can_user_interact()) { helper('form'); - return view('podcast/activity_authenticated', $data); } $secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode( @@ -129,10 +128,9 @@ class PodcastController extends BaseController 'podcast' => $this->podcast, ]; - // if user is logged in then send to the authenticated activity view + // // if user is logged in then send to the authenticated activity view if (can_user_interact()) { helper('form'); - return view('podcast/about_authenticated', $data); } $secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode( @@ -256,11 +254,6 @@ class PodcastController extends BaseController $secondsToNextUnpublishedEpisode = (new EpisodeModel())->getSecondsToNextUnpublishedEpisode( $this->podcast->id, ); - - // if user is logged in then send to the authenticated episodes view - if (can_user_interact()) { - return view('podcast/episodes_authenticated', $data); - } return view('podcast/episodes', $data, [ 'cache' => $secondsToNextUnpublishedEpisode ? $secondsToNextUnpublishedEpisode diff --git a/app/Controllers/PostController.php b/app/Controllers/PostController.php index 184825ad..69837feb 100644 --- a/app/Controllers/PostController.php +++ b/app/Controllers/PostController.php @@ -88,9 +88,8 @@ class PostController extends FediversePostController // if user is logged in then send to the authenticated activity view if (can_user_interact()) { helper('form'); - return view('podcast/post_authenticated', $data); } - return view('podcast/post', $data, [ + return view('post/post', $data, [ 'cache' => DECADE, 'cache_name' => $cacheName, ]); @@ -242,7 +241,7 @@ class PostController extends FediversePostController helper('form'); - return view('podcast/post_remote_action', $data, [ + return view('post/remote_action', $data, [ 'cache' => DECADE, 'cache_name' => $cacheName, ]); diff --git a/app/Helpers/components_helper.php b/app/Helpers/components_helper.php index 657eca2d..6a85dbf3 100644 --- a/app/Helpers/components_helper.php +++ b/app/Helpers/components_helper.php @@ -8,7 +8,6 @@ declare(strict_types=1); * @link https://castopod.org/ */ use App\Entities\Location; -use App\Entities\Person; use CodeIgniter\I18n\Time; use CodeIgniter\View\Table; @@ -189,11 +188,11 @@ if (! function_exists('episode_numbering')) { $transKey = ''; $args = []; if ($episodeNumber !== null) { - $args['episodeNumber'] = $episodeNumber; + $args['episodeNumber'] = sprintf('%02d', $episodeNumber); } if ($seasonNumber !== null) { - $args['seasonNumber'] = $seasonNumber; + $args['seasonNumber'] = sprintf('%02d', $seasonNumber); } if ($episodeNumber !== null && $seasonNumber !== null) { @@ -250,95 +249,6 @@ if (! function_exists('location_link')) { // ------------------------------------------------------------------------ -if (! function_exists('person_list')) { - /** - * Returns list of persons images - * - * @param Person[] $persons - */ - function person_list(array $persons, string $class = ''): string - { - if ($persons === []) { - return ''; - } - - $personList = "
"; - - foreach ($persons as $person) { - $personList .= anchor( - $person->information_url ?? '#', - "{$person->full_name}", - [ - 'class' => - 'flex-shrink-0 focus:outline-none focus:ring focus:ring-inset', - 'target' => '_blank', - 'rel' => 'noreferrer noopener', - 'title' => - '' . - $person->full_name . - '' . - implode( - '', - array_map(function ($role) { - return '
' . - lang( - 'PersonsTaxonomy.persons.' . - $role->group . - '.roles.' . - $role->role . - '.label', - ); - }, $person->roles), - ), - 'data-toggle' => 'tooltip', - 'data-placement' => 'bottom', - ], - ); - } - - return $personList . '
'; - } -} - -// ------------------------------------------------------------------------ - -if (! function_exists('play_episode_button')) { - /** - * Returns play episode button - */ - function play_episode_button( - string $episodeId, - string $episodeThumbnail, - string $episodeTitle, - string $podcastTitle, - string $source, - string $mediaType, - string $class = '' - ): string { - $playLabel = lang('Common.play_episode_button.play'); - $playingLabel = lang('Common.play_episode_button.playing'); - - return << - CODE_SAMPLE; - } -} - -// ------------------------------------------------------------------------ - if (! function_exists('audio_player')) { /** * Returns audio player diff --git a/app/Helpers/misc_helper.php b/app/Helpers/misc_helper.php index 21a7ae5c..f988de62 100644 --- a/app/Helpers/misc_helper.php +++ b/app/Helpers/misc_helper.php @@ -159,6 +159,34 @@ if (! function_exists('format_duration')) { } } + +if (! function_exists('format_duration_symbol')) { + /** + * Formats duration in seconds to an hh(h) mm(min) ss(s) string. Doesn't show leading zeros if any. + * + * ⚠️ This uses php's gmdate function so any duration > 86000 seconds (24 hours) will not be formatted properly. + * + * @param int $seconds seconds to format + */ + function format_duration_symbol(int $seconds): string + { + if ($seconds < 60) { + return $seconds . 's'; + } + if ($seconds < 3600) { + // < 1 hour: returns MM:SS + return ltrim(gmdate('i\m\i\n s\s', $seconds), '0'); + } + if ($seconds < 36000) { + // < 10 hours: returns H:MM:SS + return ltrim(gmdate('h\h i\min s\s', $seconds), '0'); + } + return gmdate('h\h i\min s\s', $seconds); + } +} + +//-------------------------------------------------------------------- + if (! function_exists('podcast_uuid')) { /** * Generate UUIDv5 for podcast. For more information, see diff --git a/app/Language/en/Comment.php b/app/Language/en/Comment.php index aff97d5e..741f7896 100644 --- a/app/Language/en/Comment.php +++ b/app/Language/en/Comment.php @@ -14,7 +14,7 @@ return [ 'form' => [ 'episode_message_placeholder' => 'Write a comment...', 'reply_to_placeholder' => 'Reply to @{actorUsername}', - 'submit' => 'Send!', + 'submit' => 'Send', 'submit_reply' => 'Reply', ], 'likes' => '{numberOfLikes, plural, diff --git a/app/Language/en/Common.php b/app/Language/en/Common.php index debed348..3284040f 100644 --- a/app/Language/en/Common.php +++ b/app/Language/en/Common.php @@ -22,7 +22,7 @@ return [ 'home' => 'Home', 'explicit' => 'Explicit', 'mediumDate' => '{0,date,medium}', - 'powered_by' => 'Powered by {castopod}.', + 'powered_by' => 'Powered by {castopod}', 'actions' => 'Actions', 'pageInfo' => 'Page {currentPage} out of {pageCount}', 'go_back' => 'Go back', @@ -30,4 +30,8 @@ return [ 'play' => 'Play', 'playing' => 'Playing', ], + 'read_more' => 'Read more', + 'read_less' => 'Read less', + 'see_more' => 'See more', + 'see_less' => 'See less', ]; diff --git a/app/Language/en/Episode.php b/app/Language/en/Episode.php index 565b7ba1..74c32b3f 100644 --- a/app/Language/en/Episode.php +++ b/app/Language/en/Episode.php @@ -15,10 +15,15 @@ return [ 'number_abbr' => 'Ep. {episodeNumber}', 'season_episode' => 'Season {seasonNumber} episode {episodeNumber}', 'season_episode_abbr' => 'S{seasonNumber}E{episodeNumber}', + 'persons' => '{personsCount, plural, + one {# person} + other {# persons} + }', + 'persons_list' => 'Persons', 'back_to_episodes' => 'Back to episodes of {podcast}', 'comments' => 'Comments', 'activity' => 'Activity', - 'description' => 'Description', + 'description' => 'Episode description', 'number_of_comments' => '{numberOfComments, plural, one {# comment} other {# comments} diff --git a/app/Language/en/Podcast.php b/app/Language/en/Podcast.php index 0c311ed8..9896a00a 100644 --- a/app/Language/en/Podcast.php +++ b/app/Language/en/Podcast.php @@ -14,7 +14,7 @@ return [ 'create' => 'Create podcast', 'import' => 'Import podcast', 'new_episode' => 'New Episode', - 'feed' => 'RSS', + 'feed' => 'RSS Podcast feed', 'view' => 'View podcast', 'edit' => 'Edit podcast', 'delete' => 'Delete podcast', @@ -48,4 +48,9 @@ return [ 'funding_links' => 'Funding links for {podcastTitle}', 'find_on' => 'Find {podcastTitle} on', 'listen_on' => 'Listen on', + 'persons' => '{personsCount, plural, + one {# person} + other {# persons} + }', + 'persons_list' => 'Persons', ]; diff --git a/app/Language/en/Post.php b/app/Language/en/Post.php index a60ef30f..dc348d91 100644 --- a/app/Language/en/Post.php +++ b/app/Language/en/Post.php @@ -18,7 +18,7 @@ return [ 'episode_message_placeholder' => 'Write a message for the episode...', 'episode_url_placeholder' => 'Episode URL', 'reply_to_placeholder' => 'Reply to @{actorUsername}', - 'submit' => 'Send!', + 'submit' => 'Send', 'submit_reply' => 'Reply', ], 'favourites' => '{numberOfFavourites, plural, diff --git a/app/Language/fr/Common.php b/app/Language/fr/Common.php index 6fc0c30d..c5694c39 100644 --- a/app/Language/fr/Common.php +++ b/app/Language/fr/Common.php @@ -22,7 +22,7 @@ return [ 'home' => 'Accueil', 'explicit' => 'Explicite', 'mediumDate' => '{0,date,medium}', - 'powered_by' => 'Propulsé par {castopod}.', + 'powered_by' => 'Propulsé par {castopod}', 'actions' => 'Actions', 'pageInfo' => 'Page {currentPage} sur {pageCount}', 'go_back' => 'Retour en arrière', @@ -30,4 +30,8 @@ return [ 'play' => 'Lire', 'playing' => 'En cours', ], + 'read_more' => 'Lire plus', + 'read_less' => 'Lire moins', + 'see_more' => 'Voir plus', + 'see_less' => 'Voir moins', ]; diff --git a/app/Language/fr/Episode.php b/app/Language/fr/Episode.php index c6f565c8..ee8a1e4b 100644 --- a/app/Language/fr/Episode.php +++ b/app/Language/fr/Episode.php @@ -15,10 +15,15 @@ return [ 'number_abbr' => 'Ep. {episodeNumber}', 'season_episode' => 'Saison {seasonNumber} épisode {episodeNumber}', 'season_episode_abbr' => 'S{seasonNumber}E{episodeNumber}', + 'persons' => '{personsCount, plural, + one {# intervenant·e} + other {# intervenant·e·s} + }', + 'persons_list' => 'Liste des intervenant·e·s', 'back_to_episodes' => 'Retour aux épisodes de {podcast}', 'comments' => 'Commentaires', 'activity' => 'Activité', - 'description' => 'Description', + 'description' => 'Description de l’épisode', 'number_of_comments' => '{numberOfComments, plural, one {# commentaire} other {# commentaires} diff --git a/app/Language/fr/Podcast.php b/app/Language/fr/Podcast.php index d332a933..d9d0a35d 100644 --- a/app/Language/fr/Podcast.php +++ b/app/Language/fr/Podcast.php @@ -14,7 +14,7 @@ return [ 'create' => 'Créer un podcast', 'import' => 'Importer un podcast', 'new_episode' => 'Créer un épisode', - 'feed' => 'RSS', + 'feed' => 'Podcast RSS feed', 'view' => 'Voir le podcast', 'edit' => 'Modifier le podcast', 'delete' => 'Supprimer le podcast', @@ -48,4 +48,9 @@ return [ 'funding_links' => 'Liens de financement pour {podcastTitle}', 'find_on' => 'Trouvez {podcastTitle} sur', 'listen_on' => 'Écoutez sur', + 'persons' => '{personsCount, plural, + one {# intervenant·e} + other {# intervenant·e·s} + }', + 'persons_list' => 'Liste des intervenant·e·s', ]; diff --git a/app/Libraries/CommentObject.php b/app/Libraries/CommentObject.php index 7a4b7ce2..e7fcac7f 100644 --- a/app/Libraries/CommentObject.php +++ b/app/Libraries/CommentObject.php @@ -35,7 +35,12 @@ class CommentObject extends ObjectType $this->inReplyTo = $comment->reply_to_comment->uri; } - $this->replies = url_to('comment-replies', $comment->actor->username, $comment->episode->slug, $comment->id); + $this->replies = url_to( + 'episode-comment-replies', + $comment->actor->username, + $comment->episode->slug, + $comment->id + ); $this->cc = [$comment->actor->followers_url]; } diff --git a/app/Models/EpisodeCommentModel.php b/app/Models/EpisodeCommentModel.php index cd950438..34408025 100644 --- a/app/Models/EpisodeCommentModel.php +++ b/app/Models/EpisodeCommentModel.php @@ -93,7 +93,7 @@ class EpisodeCommentModel extends UuidModel if ($registerActivity) { // set post id and uri to construct NoteObject $comment->id = $newCommentId; - $comment->uri = url_to('comment', $comment->actor->username, $comment->episode->slug, $comment->id); + $comment->uri = url_to('episode-comment', $comment->actor->username, $comment->episode->slug, $comment->id); $createActivity = new CreateActivity(); $createActivity @@ -193,7 +193,7 @@ class EpisodeCommentModel extends UuidModel $episode = model('EpisodeModel', false) ->find((int) $data['data']['episode_id']); - $data['data']['uri'] = url_to('comment', $actor->username, $episode->slug, $uuid4->toString()); + $data['data']['uri'] = url_to('episode-comment', $actor->username, $episode->slug, $uuid4->toString()); } return $data; diff --git a/app/Resources/icons/send-plane.svg b/app/Resources/icons/send-plane.svg new file mode 100644 index 00000000..74ffbcf9 --- /dev/null +++ b/app/Resources/icons/send-plane.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/Resources/js/app.ts b/app/Resources/js/app.ts new file mode 100644 index 00000000..f1093cda --- /dev/null +++ b/app/Resources/js/app.ts @@ -0,0 +1,3 @@ +import Dropdown from "./modules/Dropdown"; + +Dropdown(); diff --git a/app/Resources/js/audio-player.ts b/app/Resources/js/audio-player.ts index 0a120376..41a17ab8 100644 --- a/app/Resources/js/audio-player.ts +++ b/app/Resources/js/audio-player.ts @@ -39,7 +39,7 @@ import "./modules/play-episode-button"; const player = html` + HTML; + } +} diff --git a/app/Views/Components/SeeMore.php b/app/Views/Components/SeeMore.php new file mode 100644 index 00000000..22481be7 --- /dev/null +++ b/app/Views/Components/SeeMore.php @@ -0,0 +1,23 @@ + + +
{$this->slot}
+ + + HTML; + } +} diff --git a/modules/Admin/Language/en/AdminNavigation.php b/modules/Admin/Language/en/AdminNavigation.php index 92a5f59b..68cbefb3 100644 --- a/modules/Admin/Language/en/AdminNavigation.php +++ b/modules/Admin/Language/en/AdminNavigation.php @@ -10,6 +10,7 @@ declare(strict_types=1); return [ 'go_to_website' => 'View site', + 'go_to_admin' => 'Go to admin', 'dashboard' => 'Dashboard', 'admin' => 'Home', 'podcasts' => 'Podcasts', diff --git a/modules/Admin/Language/en/Common.php b/modules/Admin/Language/en/Common.php index f05e5d6a..c5048cb9 100644 --- a/modules/Admin/Language/en/Common.php +++ b/modules/Admin/Language/en/Common.php @@ -22,7 +22,7 @@ return [ 'home' => 'Home', 'explicit' => 'Explicit', 'mediumDate' => '{0,date,medium}', - 'powered_by' => 'Powered by {castopod}.', + 'powered_by' => 'Powered by {castopod}', 'actions' => 'Actions', 'pageInfo' => 'Page {currentPage} out of {pageCount}', 'go_back' => 'Go back', diff --git a/modules/Admin/Language/en/Episode.php b/modules/Admin/Language/en/Episode.php index 17611483..990297f8 100644 --- a/modules/Admin/Language/en/Episode.php +++ b/modules/Admin/Language/en/Episode.php @@ -15,10 +15,6 @@ return [ 'number_abbr' => 'Ep. {episodeNumber}', 'season_episode' => 'Season {seasonNumber} episode {episodeNumber}', 'season_episode_abbr' => 'S{seasonNumber}E{episodeNumber}', - 'back_to_episodes' => 'Back to episodes of {podcast}', - 'comments' => 'Comments', - 'activity' => 'Activity', - 'description' => 'Description', 'number_of_comments' => '{numberOfComments, plural, one {# comment} other {# comments} diff --git a/modules/Admin/Language/en/Podcast.php b/modules/Admin/Language/en/Podcast.php index 2a107c52..d2aaa101 100644 --- a/modules/Admin/Language/en/Podcast.php +++ b/modules/Admin/Language/en/Podcast.php @@ -14,7 +14,6 @@ return [ 'create' => 'Create podcast', 'import' => 'Import podcast', 'new_episode' => 'New Episode', - 'feed' => 'RSS', 'view' => 'View podcast', 'edit' => 'Edit podcast', 'delete' => 'Delete podcast', diff --git a/modules/Admin/Language/fr/Common.php b/modules/Admin/Language/fr/Common.php index 2ab2171c..e02f1b02 100644 --- a/modules/Admin/Language/fr/Common.php +++ b/modules/Admin/Language/fr/Common.php @@ -22,7 +22,7 @@ return [ 'home' => 'Accueil', 'explicit' => 'Explicite', 'mediumDate' => '{0,date,medium}', - 'powered_by' => 'Propulsé par {castopod}.', + 'powered_by' => 'Propulsé par {castopod}', 'actions' => 'Actions', 'pageInfo' => 'Page {currentPage} sur {pageCount}', 'go_back' => 'Retour en arrière', diff --git a/modules/Admin/Language/fr/Episode.php b/modules/Admin/Language/fr/Episode.php index bafa6231..857b6754 100644 --- a/modules/Admin/Language/fr/Episode.php +++ b/modules/Admin/Language/fr/Episode.php @@ -16,9 +16,6 @@ return [ 'season_episode' => 'Saison {seasonNumber} épisode {episodeNumber}', 'season_episode_abbr' => 'S{seasonNumber}E{episodeNumber}', 'back_to_episodes' => 'Retour aux épisodes de {podcast}', - 'comments' => 'Commentaires', - 'activity' => 'Activité', - 'description' => 'Description', 'number_of_comments' => '{numberOfComments, plural, one {# commentaire} other {# commentaires} diff --git a/modules/Admin/Language/fr/Podcast.php b/modules/Admin/Language/fr/Podcast.php index a4919c6d..0d332120 100644 --- a/modules/Admin/Language/fr/Podcast.php +++ b/modules/Admin/Language/fr/Podcast.php @@ -14,7 +14,6 @@ return [ 'create' => 'Créer un podcast', 'import' => 'Importer un podcast', 'new_episode' => 'Créer un épisode', - 'feed' => 'RSS', 'view' => 'Voir le podcast', 'edit' => 'Modifier le podcast', 'delete' => 'Supprimer le podcast', diff --git a/modules/Fediverse/Entities/Post.php b/modules/Fediverse/Entities/Post.php index c6639646..6177aa37 100644 --- a/modules/Fediverse/Entities/Post.php +++ b/modules/Fediverse/Entities/Post.php @@ -31,7 +31,6 @@ use RuntimeException; * @property Time $published_at * @property Time $created_at * - * @property bool $has_preview_card * @property PreviewCard|null $preview_card * * @property bool $has_replies @@ -48,8 +47,6 @@ class Post extends UuidEntity protected ?PreviewCard $preview_card = null; - protected bool $has_preview_card = false; - /** * @var Post[]|null */ @@ -119,11 +116,6 @@ class Post extends UuidEntity return $this->preview_card; } - public function getHasPreviewCard(): bool - { - return $this->getPreviewCard() !== null; - } - /** * @return Post[] */ diff --git a/package-lock.json b/package-lock.json index 76d0a2a4..90940192 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,34 +15,35 @@ "@codemirror/commands": "^0.19.5", "@codemirror/lang-xml": "^0.19.2", "@codemirror/state": "^0.19.2", - "@codemirror/view": "^0.19.8", + "@codemirror/view": "^0.19.9", "@github/clipboard-copy-element": "^1.1.2", - "@github/markdown-toolbar-element": "^1.5.1", + "@github/markdown-toolbar-element": "^1.5.3", "@github/time-elements": "^3.1.2", "@popperjs/core": "^2.10.2", - "@vime/core": "^5.0.33", + "@vime/core": "^5.0.34", "choices.js": "^9.0.1", "flatpickr": "^4.6.9", "leaflet": "^1.7.1", "leaflet.markercluster": "^1.5.1", - "lit": "^2.0.0", - "marked": "^3.0.4", + "lit": "^2.0.2", + "marked": "^3.0.7", "xml-formatter": "^2.4.1" }, "devDependencies": { - "@commitlint/cli": "^13.2.0", + "@commitlint/cli": "^13.2.1", "@commitlint/config-conventional": "^13.2.0", "@semantic-release/changelog": "^6.0.0", "@semantic-release/exec": "^6.0.1", "@semantic-release/git": "^10.0.0", "@semantic-release/gitlab": "^7.0.3", + "@tailwindcss/aspect-ratio": "^0.3.0", "@tailwindcss/forms": "^0.3.4", - "@tailwindcss/line-clamp": "^0.2.1", + "@tailwindcss/line-clamp": "^0.2.2", "@tailwindcss/typography": "^0.4.1", "@types/leaflet": "^1.7.5", "@types/marked": "^3.0.1", - "@typescript-eslint/eslint-plugin": "^4.32.0", - "@typescript-eslint/parser": "^4.32.0", + "@typescript-eslint/eslint-plugin": "^4.33.0", + "@typescript-eslint/parser": "^4.33.0", "cross-env": "^7.0.3", "cssnano": "^5.0.8", "cz-conventional-changelog": "^3.3.0", @@ -51,7 +52,7 @@ "eslint-plugin-prettier": "^4.0.0", "husky": "^7.0.2", "is-ci": "^3.0.0", - "lint-staged": "^11.1.2", + "lint-staged": "^11.2.3", "postcss-import": "^14.0.2", "postcss-preset-env": "^6.7.0", "postcss-reporter": "^7.0.3", @@ -64,7 +65,7 @@ "tailwindcss": "^2.2.16", "tailwindcss-scroll-snap": "^1.1.0", "typescript": "^4.4.3", - "vite": "^2.6.1" + "vite": "^2.6.5" } }, "node_modules/@amcharts/amcharts4": { @@ -2098,6 +2099,15 @@ "node": ">=10" } }, + "node_modules/@tailwindcss/aspect-ratio": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.3.0.tgz", + "integrity": "sha512-DMgWskNJR6FNPLbQ8Xoq/PKV/9DfNKh5dvKB+SM8x7lVl4+pnxlZ3Ns4+yGmurA/ze708HrnCG1tXk85HolJmw==", + "dev": true, + "peerDependencies": { + "tailwindcss": ">=2.0.0 || >=3.0.0-alpha.1" + } + }, "node_modules/@tailwindcss/forms": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.3.4.tgz", @@ -5947,20 +5957,6 @@ "resolved": "https://registry.npmjs.org/fscreen/-/fscreen-1.2.0.tgz", "integrity": "sha512-hlq4+BU0hlPmwsFjwGGzZ+OZ9N/wq9Ljg/sq3pX+2CD7hrJsX9tJgWWK/wiNTFM212CLHWhicOoqwXyZGGetJg==" }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -8205,12 +8201,6 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, - "node_modules/nanocolors": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", - "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==", - "dev": true - }, "node_modules/nanoid": { "version": "3.1.30", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz", @@ -18922,6 +18912,13 @@ "defer-to-connect": "^2.0.0" } }, + "@tailwindcss/aspect-ratio": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@tailwindcss/aspect-ratio/-/aspect-ratio-0.3.0.tgz", + "integrity": "sha512-DMgWskNJR6FNPLbQ8Xoq/PKV/9DfNKh5dvKB+SM8x7lVl4+pnxlZ3Ns4+yGmurA/ze708HrnCG1tXk85HolJmw==", + "dev": true, + "requires": {} + }, "@tailwindcss/forms": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.3.4.tgz", @@ -21927,13 +21924,6 @@ "resolved": "https://registry.npmjs.org/fscreen/-/fscreen-1.2.0.tgz", "integrity": "sha512-hlq4+BU0hlPmwsFjwGGzZ+OZ9N/wq9Ljg/sq3pX+2CD7hrJsX9tJgWWK/wiNTFM212CLHWhicOoqwXyZGGetJg==" }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -23646,12 +23636,6 @@ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, - "nanocolors": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", - "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==", - "dev": true - }, "nanoid": { "version": "3.1.30", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz", diff --git a/package.json b/package.json index e9ba0a51..9af9cb36 100644 --- a/package.json +++ b/package.json @@ -27,62 +27,63 @@ "prepare": "is-ci || husky install" }, "dependencies": { - "@amcharts/amcharts4-geodata": "^4.1.22", "@amcharts/amcharts4": "^4.10.22", + "@amcharts/amcharts4-geodata": "^4.1.22", "@codemirror/basic-setup": "^0.19.0", "@codemirror/commands": "^0.19.5", "@codemirror/lang-xml": "^0.19.2", "@codemirror/state": "^0.19.2", - "@codemirror/view": "^0.19.8", + "@codemirror/view": "^0.19.9", "@github/clipboard-copy-element": "^1.1.2", - "@github/markdown-toolbar-element": "^1.5.1", + "@github/markdown-toolbar-element": "^1.5.3", "@github/time-elements": "^3.1.2", "@popperjs/core": "^2.10.2", - "@vime/core": "^5.0.33", + "@vime/core": "^5.0.34", "choices.js": "^9.0.1", "flatpickr": "^4.6.9", - "leaflet.markercluster": "^1.5.1", "leaflet": "^1.7.1", - "lit": "^2.0.0", - "marked": "^3.0.4", + "leaflet.markercluster": "^1.5.1", + "lit": "^2.0.2", + "marked": "^3.0.7", "xml-formatter": "^2.4.1" }, "devDependencies": { - "@commitlint/cli": "^13.2.0", + "@commitlint/cli": "^13.2.1", "@commitlint/config-conventional": "^13.2.0", "@semantic-release/changelog": "^6.0.0", "@semantic-release/exec": "^6.0.1", "@semantic-release/git": "^10.0.0", "@semantic-release/gitlab": "^7.0.3", + "@tailwindcss/aspect-ratio": "^0.3.0", "@tailwindcss/forms": "^0.3.4", - "@tailwindcss/line-clamp": "^0.2.1", + "@tailwindcss/line-clamp": "^0.2.2", "@tailwindcss/typography": "^0.4.1", "@types/leaflet": "^1.7.5", "@types/marked": "^3.0.1", - "@typescript-eslint/eslint-plugin": "^4.32.0", - "@typescript-eslint/parser": "^4.32.0", + "@typescript-eslint/eslint-plugin": "^4.33.0", + "@typescript-eslint/parser": "^4.33.0", "cross-env": "^7.0.3", "cssnano": "^5.0.8", "cz-conventional-changelog": "^3.3.0", + "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "eslint": "^7.32.0", "husky": "^7.0.2", "is-ci": "^3.0.0", - "lint-staged": "^11.1.2", + "lint-staged": "^11.2.3", "postcss-import": "^14.0.2", "postcss-preset-env": "^6.7.0", "postcss-reporter": "^7.0.3", - "prettier-plugin-organize-imports": "^2.3.4", "prettier": "2.4.1", + "prettier-plugin-organize-imports": "^2.3.4", "semantic-release": "^18.0.0", - "stylelint-config-standard": "^22.0.0", "stylelint": "^13.13.1", + "stylelint-config-standard": "^22.0.0", "svgo": "^2.7.0", - "tailwindcss-scroll-snap": "^1.1.0", "tailwindcss": "^2.2.16", + "tailwindcss-scroll-snap": "^1.1.0", "typescript": "^4.4.3", - "vite": "^2.6.1" + "vite": "^2.6.5" }, "lint-staged": { "*.{js,ts,css,md,json}": "prettier --write", diff --git a/tailwind.config.js b/tailwind.config.js index ea55a83c..dcb69af6 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -16,7 +16,6 @@ module.exports = { fontFamily: { sans: ["Inter", ...defaultTheme.fontFamily.sans], display: ["Kumbh Sans", ...defaultTheme.fontFamily.sans], - // body: ["Inter", ...defaultTheme.fontFamily.sans], }, colors: { pine: { @@ -49,6 +48,7 @@ module.exports = { 112: "28rem", }, gridTemplateColumns: { + podcastLayout: "1fr minmax(auto, 768px) 1fr", podcasts: "repeat(auto-fill, minmax(14rem, 1fr))", }, zIndex: { @@ -67,6 +67,7 @@ module.exports = { require("@tailwindcss/forms"), require("@tailwindcss/typography"), require("@tailwindcss/line-clamp"), + require("@tailwindcss/aspect-ratio"), require("tailwindcss-scroll-snap"), ], }; diff --git a/themes/cp_admin/_layout.php b/themes/cp_admin/_layout.php index 5269b9e9..c2f21224 100644 --- a/themes/cp_admin/_layout.php +++ b/themes/cp_admin/_layout.php @@ -19,48 +19,7 @@ -
- - - -
+ include('_partials/_nav_header') ?> diff --git a/themes/cp_app/podcast/_layout_authenticated.php b/themes/cp_app/podcast/_layout_authenticated.php deleted file mode 100644 index eef37085..00000000 --- a/themes/cp_app/podcast/_layout_authenticated.php +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - renderSection('meta-tags') ?> - payment_pointer): ?> - - - - asset('styles/index.css', 'css') ?> - asset('js/podcast.ts', 'js') ?> - asset('js/audio-player.ts', 'js') ?> - - - - include('_admin_navbar') ?> -
- - include('podcast/_partials/header') ?> - -
- - renderSection('content') ?> -
- - include('podcast/_partials/sidebar') ?> - - - - - -
- diff --git a/themes/cp_app/podcast/_navigation.php b/themes/cp_app/podcast/_navigation.php deleted file mode 100644 index 66ce97f9..00000000 --- a/themes/cp_app/podcast/_navigation.php +++ /dev/null @@ -1,23 +0,0 @@ - route_to('podcast-activity', $podcast->handle), - 'label' => lang('Podcast.activity'), - ], - [ - 'uri' => route_to('podcast-episodes', $podcast->handle), - 'label' => lang('Podcast.episodes'), - ], - [ - 'uri' => route_to('podcast-about', $podcast->handle), - 'label' => lang('Podcast.about'), - ], -] -?> - \ No newline at end of file diff --git a/themes/cp_app/podcast/_partials/comment_actions.php b/themes/cp_app/podcast/_partials/comment_actions.php deleted file mode 100644 index 93d9eb4a..00000000 --- a/themes/cp_app/podcast/_partials/comment_actions.php +++ /dev/null @@ -1,19 +0,0 @@ -
- - replies_count): ?> - handle, $episode->slug, $comment->id), - icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [ - 'numberOfReplies' => $comment->replies_count, - ]), - [ - 'class' => 'inline-flex items-center text-xs hover:underline', - ] -) ?> - -
diff --git a/themes/cp_app/podcast/_partials/comment_actions_authenticated.php b/themes/cp_app/podcast/_partials/comment_actions_authenticated.php deleted file mode 100644 index d4812080..00000000 --- a/themes/cp_app/podcast/_partials/comment_actions_authenticated.php +++ /dev/null @@ -1,22 +0,0 @@ -
-
- - -
- replies_count): ?> - handle, $comment->episode->slug, $comment->id), - icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [ - 'numberOfReplies' => $comment->replies_count, - ]), - [ - 'class' => 'inline-flex items-center text-xs hover:underline', - ] -) ?> - -
diff --git a/themes/cp_app/podcast/_partials/comment_actions_from_post.php b/themes/cp_app/podcast/_partials/comment_actions_from_post.php deleted file mode 100644 index 5026e64e..00000000 --- a/themes/cp_app/podcast/_partials/comment_actions_from_post.php +++ /dev/null @@ -1,19 +0,0 @@ -
- - replies_count): ?> - handle, $comment->id), - icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [ - 'numberOfReplies' => $comment->replies_count, - ]), - [ - 'class' => 'inline-flex items-center text-xs hover:underline', - ] -) ?> - -
diff --git a/themes/cp_app/podcast/_partials/comment_actions_from_post_authenticated.php b/themes/cp_app/podcast/_partials/comment_actions_from_post_authenticated.php deleted file mode 100644 index a5783ef4..00000000 --- a/themes/cp_app/podcast/_partials/comment_actions_from_post_authenticated.php +++ /dev/null @@ -1,22 +0,0 @@ -
-
- - -
- replies_count): ?> - handle, $comment->id), - icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [ - 'numberOfReplies' => $comment->replies_count, - ]), - [ - 'class' => 'inline-flex items-center text-xs hover:underline', - ] -) ?> - -
diff --git a/themes/cp_app/podcast/_partials/comment_authenticated.php b/themes/cp_app/podcast/_partials/comment_authenticated.php deleted file mode 100644 index 0958e546..00000000 --- a/themes/cp_app/podcast/_partials/comment_authenticated.php +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/themes/cp_app/podcast/_partials/comment_card.php b/themes/cp_app/podcast/_partials/comment_card.php deleted file mode 100644 index c587234b..00000000 --- a/themes/cp_app/podcast/_partials/comment_card.php +++ /dev/null @@ -1,38 +0,0 @@ - diff --git a/themes/cp_app/podcast/_partials/comment_reply_actions.php b/themes/cp_app/podcast/_partials/comment_reply_actions.php deleted file mode 100644 index 80213166..00000000 --- a/themes/cp_app/podcast/_partials/comment_reply_actions.php +++ /dev/null @@ -1,20 +0,0 @@ -
- - replies_count): ?> - handle, $episode->slug, $reply->id), - icon('chat', 'text-2xl mr-1 text-gray-400') . $reply->replies_count, - [ - 'class' => 'inline-flex items-center hover:underline', - 'title' => lang('Comment.replies', [ - 'numberOfReplies' => $reply->replies_count, - ]), - ], -) ?> - -
diff --git a/themes/cp_app/podcast/_partials/comment_reply_actions_authenticated.php b/themes/cp_app/podcast/_partials/comment_reply_actions_authenticated.php deleted file mode 100644 index b11b9c01..00000000 --- a/themes/cp_app/podcast/_partials/comment_reply_actions_authenticated.php +++ /dev/null @@ -1,11 +0,0 @@ -
-
- - -
-
diff --git a/themes/cp_app/podcast/_partials/comment_reply_authenticated.php b/themes/cp_app/podcast/_partials/comment_reply_authenticated.php deleted file mode 100644 index 96028088..00000000 --- a/themes/cp_app/podcast/_partials/comment_reply_authenticated.php +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/themes/cp_app/podcast/_partials/comment_with_replies.php b/themes/cp_app/podcast/_partials/comment_with_replies.php deleted file mode 100644 index 305b988f..00000000 --- a/themes/cp_app/podcast/_partials/comment_with_replies.php +++ /dev/null @@ -1,10 +0,0 @@ -include('podcast/_partials/comment_card') ?> -
- -replies as $reply): ?> - $reply, - ]) ?> - - -
diff --git a/themes/cp_app/podcast/_partials/comment_with_replies_authenticated.php b/themes/cp_app/podcast/_partials/comment_with_replies_authenticated.php deleted file mode 100644 index dfd69dcc..00000000 --- a/themes/cp_app/podcast/_partials/comment_with_replies_authenticated.php +++ /dev/null @@ -1,25 +0,0 @@ -include('podcast/_partials/comment_card_authenticated') ?> -
-
-<?= interact_as_actor()
-    ->display_name ?> -
- - -
-
- -replies as $reply): ?> - $reply, - ]) ?> - -
diff --git a/themes/cp_app/podcast/_partials/episode_card.php b/themes/cp_app/podcast/_partials/episode_card.php deleted file mode 100644 index a77d2b15..00000000 --- a/themes/cp_app/podcast/_partials/episode_card.php +++ /dev/null @@ -1,43 +0,0 @@ -
-
-
- - <?= $episode->title ?> -
-
- -

- number, - $episode->season_number, - 'text-xs font-semibold text-gray-600', - true, - ) ?> - - - title ?> -

- published_at, 'text-xs whitespace-nowrap') ?> -
-
- id, $episode->image->thumbnail_url, $episode->title, $podcast->title, $episode->audio_file_web_url, $episode->audio_file_mimetype, 'mt-auto') ?> - handle, $episode->slug), - icon('chat', 'text-xl mr-1 text-gray-400') . - $episode->comments_count, - [ - 'class' => - 'inline-flex items-center hover:underline', - 'title' => lang('Episode.number_of_comments', [ - 'numberOfComments' => $episode->comments_count, - ]), - ], - ) ?> -
-
-
-
diff --git a/themes/cp_app/podcast/_partials/episode_preview_card.php b/themes/cp_app/podcast/_partials/episode_preview_card.php deleted file mode 100644 index 6ad4b909..00000000 --- a/themes/cp_app/podcast/_partials/episode_preview_card.php +++ /dev/null @@ -1,26 +0,0 @@ -
-
- - <?= $episode->title ?> -
-
- -
- number, - $episode->season_number, - 'text-xs font-semibold text-gray-600', - true, -) ?> - - - title ?> -
- published_at, 'text-xs whitespace-nowrap') ?> -
- id, $episode->image->thumbnail_url, $episode->title, $episode->podcast->title, $episode->audio_file_web_url, $episode->audio_file_mimetype, 'mt-auto') ?> -
-
diff --git a/themes/cp_app/podcast/_partials/funding_links_modal.php b/themes/cp_app/podcast/_partials/funding_links_modal.php new file mode 100644 index 00000000..371b191b --- /dev/null +++ b/themes/cp_app/podcast/_partials/funding_links_modal.php @@ -0,0 +1,39 @@ + \ No newline at end of file diff --git a/themes/cp_app/podcast/_partials/header.php b/themes/cp_app/podcast/_partials/header.php deleted file mode 100644 index f5d57ea9..00000000 --- a/themes/cp_app/podcast/_partials/header.php +++ /dev/null @@ -1,58 +0,0 @@ -
- -
- <?= $podcast->title ?> - handle), - icon( - 'social/castopod', - 'mr-2 text-xl text-pink-200 group-hover:text-pink-50', - ) . lang('Podcast.follow'), - [ - 'width' => 420, - 'height' => 620, - 'class' => - 'group inline-flex items-center px-4 py-2 text-xs tracking-wider font-semibold text-white uppercase rounded-full shadow focus:outline-none focus:ring bg-rose-600', - ], - ) ?> -
-
-

title . - ($podcast->parental_advisory === 'explicit' - ? '' . - lang('Common.explicit') . - '' - : '') ?>

-

@handle ?>

-
description_html ?>
- location, 'text-sm mb-4') ?> -
- - category->code, - ) ?> - - other_categories as $other_category): ?> - - code, - ) ?> - - -
- persons, 'mb-6') ?> - -
-
diff --git a/themes/cp_app/podcast/_partials/navigation.php b/themes/cp_app/podcast/_partials/navigation.php new file mode 100644 index 00000000..21de9841 --- /dev/null +++ b/themes/cp_app/podcast/_partials/navigation.php @@ -0,0 +1,24 @@ + route_to('podcast-activity', $podcast->handle), + 'label' => lang('Podcast.activity'), + ], + [ + 'uri' => route_to('podcast-episodes', $podcast->handle), + 'label' => lang('Podcast.episodes'), + ], + [ + 'uri' => route_to('podcast-about', $podcast->handle), + 'label' => lang('Podcast.about'), + ], +] +?> + \ No newline at end of file diff --git a/themes/cp_app/podcast/_partials/post.php b/themes/cp_app/podcast/_partials/post.php deleted file mode 100644 index 3d40f460..00000000 --- a/themes/cp_app/podcast/_partials/post.php +++ /dev/null @@ -1,36 +0,0 @@ - diff --git a/themes/cp_app/podcast/_partials/post_actions.php b/themes/cp_app/podcast/_partials/post_actions.php deleted file mode 100644 index bf29cccc..00000000 --- a/themes/cp_app/podcast/_partials/post_actions.php +++ /dev/null @@ -1,36 +0,0 @@ -
- handle, $post->id), - icon('chat', 'text-2xl mr-1 text-gray-400') . $post->replies_count, - [ - 'class' => 'inline-flex items-center hover:underline', - 'title' => lang('Post.replies', [ - 'numberOfReplies' => $post->replies_count, - ]), - ], -) ?> - handle, $post->id, 'reblog'), - icon('repeat', 'text-2xl mr-1 text-gray-400') . $post->reblogs_count, - [ - 'class' => 'inline-flex items-center hover:underline', - 'width' => 420, - 'height' => 620, - 'title' => lang('Post.reblogs', [ - 'numberOfReblogs' => $post->reblogs_count, - ]), - ], -) ?> - handle, $post->id, 'favourite'), - icon('heart', 'text-2xl mr-1 text-gray-400') . $post->favourites_count, - [ - 'class' => 'inline-flex items-center hover:underline', - 'width' => 420, - 'height' => 620, - 'title' => lang('Post.favourites', [ - 'numberOfFavourites' => $post->favourites_count, - ]), - ], -) ?> -
diff --git a/themes/cp_app/podcast/_partials/post_actions_authenticated.php b/themes/cp_app/podcast/_partials/post_actions_authenticated.php deleted file mode 100644 index a50c87db..00000000 --- a/themes/cp_app/podcast/_partials/post_actions_authenticated.php +++ /dev/null @@ -1,92 +0,0 @@ -
-
- - handle, $post->id), - icon('chat', 'text-2xl mr-1 text-gray-400') . $post->replies_count, - [ - 'class' => 'inline-flex items-center hover:underline', - 'title' => lang('Post.replies', [ - 'numberOfReplies' => $post->replies_count, - ]), - ], -) ?> - - - -
- -
diff --git a/themes/cp_app/podcast/_partials/post_with_replies.php b/themes/cp_app/podcast/_partials/post_with_replies.php deleted file mode 100644 index ddf3489f..00000000 --- a/themes/cp_app/podcast/_partials/post_with_replies.php +++ /dev/null @@ -1,27 +0,0 @@ -include('podcast/_partials/post') ?> -
- -
-handle, $post->id, 'reply'), - lang('Post.reply_to', [ - 'actorUsername' => $post->actor->username, - ]), - [ - 'class' => - 'text-center justify-center font-semibold rounded-full shadow relative z-10 px-4 py-2 w-full bg-rose-600 text-white inline-flex items-center hover:bg-rose-700', - 'width' => 420, - 'height' => 620, - ], -) ?> -
- - -has_replies): ?> - replies as $reply): ?> - $reply, - ]) ?> - - -
diff --git a/themes/cp_app/podcast/_partials/post_with_replies_authenticated.php b/themes/cp_app/podcast/_partials/post_with_replies_authenticated.php deleted file mode 100644 index 9dbd498a..00000000 --- a/themes/cp_app/podcast/_partials/post_with_replies_authenticated.php +++ /dev/null @@ -1,27 +0,0 @@ -include('podcast/_partials/post_authenticated') ?> -
-
-<?= interact_as_actor()
-    ->display_name ?> -
- - -
-
- -has_replies): ?> - replies as $reply): ?> - $reply, - ]) ?> - - -
diff --git a/themes/cp_app/podcast/_partials/reblog_authenticated.php b/themes/cp_app/podcast/_partials/reblog_authenticated.php deleted file mode 100644 index cc8a4b41..00000000 --- a/themes/cp_app/podcast/_partials/reblog_authenticated.php +++ /dev/null @@ -1,43 +0,0 @@ - diff --git a/themes/cp_app/podcast/_partials/reply_actions.php b/themes/cp_app/podcast/_partials/reply_actions.php deleted file mode 100644 index a11b9da3..00000000 --- a/themes/cp_app/podcast/_partials/reply_actions.php +++ /dev/null @@ -1,36 +0,0 @@ -
- handle, $reply->id), - icon('chat', 'text-xl mr-1 text-gray-400') . $reply->replies_count, - [ - 'class' => 'inline-flex items-center hover:underline', - 'title' => lang('Post.replies', [ - 'numberOfReplies' => $reply->replies_count, - ]), - ], -) ?> - handle, $reply->id, 'reblog'), - icon('repeat', 'text-xl mr-1 text-gray-400') . $reply->reblogs_count, - [ - 'class' => 'inline-flex items-center hover:underline', - 'width' => 420, - 'height' => 620, - 'title' => lang('Post.reblogs', [ - 'numberOfReblogs' => $reply->reblogs_count, - ]), - ], -) ?> - handle, $reply->id, 'favourite'), - icon('heart', 'text-xl mr-1 text-gray-400') . $reply->favourites_count, - [ - 'class' => 'inline-flex items-center hover:underline', - 'width' => 420, - 'height' => 620, - 'title' => lang('Post.favourites', [ - 'numberOfFavourites' => $reply->favourites_count, - ]), - ], -) ?> -
diff --git a/themes/cp_app/podcast/_partials/reply_actions_authenticated.php b/themes/cp_app/podcast/_partials/reply_actions_authenticated.php deleted file mode 100644 index ea54f20d..00000000 --- a/themes/cp_app/podcast/_partials/reply_actions_authenticated.php +++ /dev/null @@ -1,92 +0,0 @@ -
-
- - handle, $reply->id), - icon('chat', 'text-xl mr-1 text-gray-400') . $reply->replies_count, - [ - 'class' => 'inline-flex items-center mr-6 hover:underline', - 'title' => lang('Post.replies', [ - 'numberOfReplies' => $reply->replies_count, - ]), - ], -) ?> - - - -
- -
diff --git a/themes/cp_app/podcast/_partials/reply_authenticated.php b/themes/cp_app/podcast/_partials/reply_authenticated.php deleted file mode 100644 index 582c7594..00000000 --- a/themes/cp_app/podcast/_partials/reply_authenticated.php +++ /dev/null @@ -1,24 +0,0 @@ - diff --git a/themes/cp_app/podcast/_partials/sidebar.php b/themes/cp_app/podcast/_partials/sidebar.php index 6e0853f5..2af44f6b 100644 --- a/themes/cp_app/podcast/_partials/sidebar.php +++ b/themes/cp_app/podcast/_partials/sidebar.php @@ -1,65 +1,49 @@ - \ No newline at end of file diff --git a/themes/cp_app/podcast/about.php b/themes/cp_app/podcast/about.php index 436beeae..a616a64f 100644 --- a/themes/cp_app/podcast/about.php +++ b/themes/cp_app/podcast/about.php @@ -29,7 +29,53 @@ section('content') ?> +
+
description_html ?>
+
+ + category->code, + ) ?> + + other_categories as $other_category): ?> + + code, + ) ?> + + +
+
+ persons !== []): ?> + + + location): ?> + location, 'text-xs font-semibold p-2') ?> + +
+
+ + + lang('Podcast.persons_list', [ + 'podcastTitle' => $podcast->title, + ]), + 'persons' => $podcast->persons, +]) ?> endSection() ?> diff --git a/themes/cp_app/podcast/activity.php b/themes/cp_app/podcast/activity.php index 1a1b5176..1fa7a529 100644 --- a/themes/cp_app/podcast/activity.php +++ b/themes/cp_app/podcast/activity.php @@ -27,21 +27,52 @@ section('content') ?> -
+
- - reblog_of_id !== null): ?> - $post->reblog_of_post, - 'podcast' => $podcast, + + +
+ + + + + <?= interact_as_actor()
+        ->display_name ?> +
+ + + +
+
+
+ + +
+ $post): ?> + reblog_of_id !== null): ?> + $key, + 'post' => $post->reblog_of_post, + 'podcast' => $podcast, ]) ?> - - $post, - 'podcast' => $podcast, + + $key, + 'post' => $post, + 'podcast' => $podcast, ]) ?> - - + + +
+
endSection() ?> diff --git a/themes/cp_app/podcast/activity_authenticated.php b/themes/cp_app/podcast/activity_authenticated.php deleted file mode 100644 index 8e582c70..00000000 --- a/themes/cp_app/podcast/activity_authenticated.php +++ /dev/null @@ -1,73 +0,0 @@ -extend('podcast/_layout_authenticated') ?> - -section('meta-tags') ?> - - -<?= $podcast->title ?> - - - - - - - - - - - - - -asset('styles/index.css', 'css') ?> -endSection() ?> - -section('content') ?> - -include('podcast/_navigation') ?> - -
-
- - - - - <?= interact_as_actor()
-        ->display_name ?> -
- - - -
-
-
- -
- - reblog_of_id !== null): ?> - $post->reblog_of_post, - 'podcast' => $podcast, -]) ?> - - $post, - 'podcast' => $podcast, -]) ?> - - -
-
- -endSection() ?> diff --git a/themes/cp_app/podcast/comment_authenticated.php b/themes/cp_app/podcast/comment_authenticated.php deleted file mode 100644 index ea145a42..00000000 --- a/themes/cp_app/podcast/comment_authenticated.php +++ /dev/null @@ -1,41 +0,0 @@ -extend('podcast/_layout_authenticated') ?> - -section('meta-tags') ?> - <?= lang('Comment.title', [ - 'actorDisplayName' => $comment->actor->display_name, - 'episodeTitle' => $episode->title, -]) ?> - - - - - - - -endSection() ?> - -section('content') ?> -
- -
- include( - 'podcast/_partials/comment_with_replies_authenticated', - ) ?> -
-
- -endSection() ?> diff --git a/themes/cp_app/podcast/episode.php b/themes/cp_app/podcast/episode.php deleted file mode 100644 index dcccf80c..00000000 --- a/themes/cp_app/podcast/episode.php +++ /dev/null @@ -1,113 +0,0 @@ -extend('podcast/_layout') ?> - -section('meta-tags') ?> -<?= $episode->title ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -endSection() ?> - -section('content') ?> -
- $podcast->title, - ]) ?> -
-
- <?= $episode->title ?> -
-

title ?>

- number, - $episode->season_number, - 'text-gray-700', - ) ?> -
- published_at) ?> - - -
- location, 'text-sm mb-4') ?> - persons) ?> - id, $episode->image->thumbnail_url, $episode->title, $podcast->title, $episode->audio_file_web_url, $episode->audio_file_mimetype) ?> -
-
-
- -
- - - - - - - - - -
-
- comments as $comment): ?> - $comment, - ]) ?> - -
-
- posts as $post): ?> - $post, - 'podcast' => $podcast, - ]) ?> - -
-
- getDescriptionHtml('-+Website+-') ?> -
-
-
-
- -endSection() -?> diff --git a/themes/cp_app/podcast/episode_authenticated.php b/themes/cp_app/podcast/episode_authenticated.php deleted file mode 100644 index 0ffc7ed5..00000000 --- a/themes/cp_app/podcast/episode_authenticated.php +++ /dev/null @@ -1,150 +0,0 @@ -extend('podcast/_layout_authenticated') ?> - -section('meta-tags') ?> -<?= $episode->title ?> - - - - - - - - - - - - - - - - - - - - - - - - - - -endSection() ?> - -section('content') ?> -
- $podcast->title, - ]) ?> -
-
- <?= $episode->title ?> -
-

title ?>

- number, - $episode->season_number, - 'text-gray-700', - ) ?> -
- published_at) ?> - - -
- location, 'text-sm mb-4') ?> - persons) ?> - id, $episode->image->thumbnail_url, $episode->title, $podcast->title, $episode->audio_file_web_url, $episode->audio_file_mimetype) ?> -
-
-
- -
- - - - - - - - - -
-
-
- - - - - <?= interact_as_actor()
-                    ->display_name ?> -
- - -
-
- comments as $comment): ?> - $comment, - 'podcast' => $podcast, - ]) ?> - -
-
-
- - - - - <?= interact_as_actor()
-                    ->display_name ?> -
- - - -
-
-
- posts as $post): ?> - $post, - 'podcast' => $podcast, - ]) ?> - -
-
- getDescriptionHtml('-+Website+-') ?> -
-
-
-
- -endSection() -?> diff --git a/themes/cp_app/podcast/episodes.php b/themes/cp_app/podcast/episodes.php index ed4a9a52..d4c26f62 100644 --- a/themes/cp_app/podcast/episodes.php +++ b/themes/cp_app/podcast/episodes.php @@ -27,10 +27,10 @@ section('content') ?> -
+
-
-

+
+

$activeQuery['value'], @@ -44,34 +44,28 @@

-
- $episode, 'podcast' => $podcast, ]) ?> diff --git a/themes/cp_app/podcast/episodes_authenticated.php b/themes/cp_app/podcast/episodes_authenticated.php deleted file mode 100644 index 0986f2eb..00000000 --- a/themes/cp_app/podcast/episodes_authenticated.php +++ /dev/null @@ -1,63 +0,0 @@ -extend('podcast/_layout_authenticated') ?> - -section('meta-tags') ?> - - -<?= $podcast->title ?> - - - - - - - - - - - - - -asset('styles/index.css', 'css') ?> -endSection() ?> - -section('content') ?> - -include('podcast/_navigation') ?> - -
- - -

- - $activeQuery['value'], - 'episodeCount' => count($episodes), -]) ?> - - $activeQuery['value'], - 'episodeCount' => count($episodes), -]) ?> - -

- - $episode, - 'podcast' => $podcast, -]) ?> - - -

-

- -
- -endSection() -?> diff --git a/themes/cp_app/podcast/follow.php b/themes/cp_app/podcast/follow.php index 32682ae9..e98440f7 100644 --- a/themes/cp_app/podcast/follow.php +++ b/themes/cp_app/podcast/follow.php @@ -49,16 +49,16 @@
- - + + - - + +
@@ -68,7 +68,7 @@

- 'Castopod', + 'Castopod' . icon('social/castopod', 'ml-1 text-lg') . '', ]) ?>

diff --git a/themes/cp_app/podcast/post_authenticated.php b/themes/cp_app/podcast/post_authenticated.php deleted file mode 100644 index f0469935..00000000 --- a/themes/cp_app/podcast/post_authenticated.php +++ /dev/null @@ -1,40 +0,0 @@ -extend('podcast/_layout_authenticated') ?> - -section('meta-tags') ?> - <?= lang('Post.title', [ - 'actorDisplayName' => $post->actor->display_name, - ]) ?> - - - - - - - -endSection() ?> - -section('content') ?> -
- -
- include( - 'podcast/_partials/post_with_replies_authenticated', - ) ?> -
-
- -endSection() -?> diff --git a/themes/cp_app/post/_partials/actions.php b/themes/cp_app/post/_partials/actions.php new file mode 100644 index 00000000..2f92da4b --- /dev/null +++ b/themes/cp_app/post/_partials/actions.php @@ -0,0 +1,124 @@ +
+ +
+ + handle, $post->id), + icon('chat', 'text-2xl mr-1 text-gray-400') . $post->replies_count, + [ + 'class' => 'inline-flex items-center hover:underline', + 'title' => lang('Post.replies', [ + 'numberOfReplies' => $post->replies_count, + ]), + ], +) ?> + + + +
+ + + handle, $post->id), + icon('chat', 'text-2xl mr-1 text-gray-400') . $post->replies_count, + [ + 'class' => 'inline-flex items-center hover:underline', + 'title' => lang('Post.replies', [ + 'numberOfReplies' => $post->replies_count, + ]), + ], + ) ?> + handle, $post->id, 'reblog'), + icon('repeat', 'text-2xl mr-1 text-gray-400') . $post->reblogs_count, + [ + 'class' => 'inline-flex items-center hover:underline', + 'width' => 420, + 'height' => 620, + 'title' => lang('Post.reblogs', [ + 'numberOfReblogs' => $post->reblogs_count, + ]), + ], + ) ?> + handle, $post->id, 'favourite'), + icon('heart', 'text-2xl mr-1 text-gray-400') . $post->favourites_count, + [ + 'class' => 'inline-flex items-center hover:underline', + 'width' => 420, + 'height' => 620, + 'title' => lang('Post.favourites', [ + 'numberOfFavourites' => $post->favourites_count, + ]), + ], + ) ?> + +
diff --git a/themes/cp_app/podcast/_partials/post_authenticated.php b/themes/cp_app/post/_partials/card.php similarity index 63% rename from themes/cp_app/podcast/_partials/post_authenticated.php rename to themes/cp_app/post/_partials/card.php index 9a60f6b3..74e4f4de 100644 --- a/themes/cp_app/podcast/_partials/post_authenticated.php +++ b/themes/cp_app/post/_partials/card.php @@ -1,7 +1,7 @@ -
+ diff --git a/themes/cp_app/post/_partials/post_with_replies.php b/themes/cp_app/post/_partials/post_with_replies.php new file mode 100644 index 00000000..fc3b66a2 --- /dev/null +++ b/themes/cp_app/post/_partials/post_with_replies.php @@ -0,0 +1,49 @@ + $index, + 'post' => $post, + 'podcast' => $podcast, +]) ?> +
+
+ +
+ <?= interact_as_actor()
+            ->display_name ?> +
+ + +
+
+ + handle, $post->id, 'reply'), + lang('Post.reply_to', [ + 'actorUsername' => $post->actor->username, + ]), + [ + 'class' => + 'text-center justify-center font-semibold rounded-full shadow relative z-10 px-4 py-2 w-full bg-rose-600 text-white inline-flex items-center hover:bg-rose-700', + 'width' => 420, + 'height' => 620, + ], + ) ?> + +
+ + has_replies): ?> + replies as $reply): ?> + $podcast, + 'reply' => $reply, + ]) ?> + + +
\ No newline at end of file diff --git a/themes/cp_app/podcast/_partials/preview_card.php b/themes/cp_app/post/_partials/preview_card.php similarity index 100% rename from themes/cp_app/podcast/_partials/preview_card.php rename to themes/cp_app/post/_partials/preview_card.php diff --git a/themes/cp_app/podcast/_partials/reblog.php b/themes/cp_app/post/_partials/reblog.php similarity index 83% rename from themes/cp_app/podcast/_partials/reblog.php rename to themes/cp_app/post/_partials/reblog.php index d5ef3ba1..71914ded 100644 --- a/themes/cp_app/podcast/_partials/reblog.php +++ b/themes/cp_app/post/_partials/reblog.php @@ -1,4 +1,4 @@ -
+

message_html ?>
episode_id): ?> - $post->episode, ]) ?> - has_preview_card): ?> - preview_card_id): ?> + $post->preview_card, ]) ?> - include('podcast/_partials/post_actions') ?> + include('post/_partials/actions') ?>
diff --git a/themes/cp_app/podcast/_partials/reply.php b/themes/cp_app/post/_partials/reply.php similarity index 77% rename from themes/cp_app/podcast/_partials/reply.php rename to themes/cp_app/post/_partials/reply.php index 912276ad..e39bc418 100644 --- a/themes/cp_app/podcast/_partials/reply.php +++ b/themes/cp_app/post/_partials/reply.php @@ -11,14 +11,14 @@ ->display_name ?>@actor->username . ($reply->actor->is_local ? '' : '@' . $reply->actor->domain) ?>
- published_at, 'flex-shrink-0 ml-auto text-xs text-gray-600') ?> + published_at, 'flex-shrink-0 ml-auto text-xs text-gray-600') ?>

message_html ?>

- has_preview_card): ?> - preview_card_id): ?> + $reply->preview_card, ]) ?> - include('podcast/_partials/reply_actions') ?> + include('post/_partials/reply_actions') ?>

diff --git a/themes/cp_app/post/_partials/reply_actions.php b/themes/cp_app/post/_partials/reply_actions.php new file mode 100644 index 00000000..322f1ed3 --- /dev/null +++ b/themes/cp_app/post/_partials/reply_actions.php @@ -0,0 +1,124 @@ +
+ +
+ + handle, $reply->id), + icon('chat', 'text-xl mr-1 text-gray-400') . $reply->replies_count, + [ + 'class' => 'inline-flex items-center mr-6 hover:underline', + 'title' => lang('Post.replies', [ + 'numberOfReplies' => $reply->replies_count, + ]), + ], +) ?> + + + +
+ + + handle, $reply->id), + icon('chat', 'text-xl mr-1 text-gray-400') . $reply->replies_count, + [ + 'class' => 'inline-flex items-center hover:underline', + 'title' => lang('Post.replies', [ + 'numberOfReplies' => $reply->replies_count, + ]), + ], + ) ?> + handle, $reply->id, 'reblog'), + icon('repeat', 'text-xl mr-1 text-gray-400') . $reply->reblogs_count, + [ + 'class' => 'inline-flex items-center hover:underline', + 'width' => 420, + 'height' => 620, + 'title' => lang('Post.reblogs', [ + 'numberOfReblogs' => $reply->reblogs_count, + ]), + ], + ) ?> + handle, $reply->id, 'favourite'), + icon('heart', 'text-xl mr-1 text-gray-400') . $reply->favourites_count, + [ + 'class' => 'inline-flex items-center hover:underline', + 'width' => 420, + 'height' => 620, + 'title' => lang('Post.favourites', [ + 'numberOfFavourites' => $reply->favourites_count, + ]), + ], + ) ?> + +
diff --git a/themes/cp_app/podcast/post.php b/themes/cp_app/post/post.php similarity index 65% rename from themes/cp_app/podcast/post.php rename to themes/cp_app/post/post.php index 3990e38d..3cc1299f 100644 --- a/themes/cp_app/podcast/post.php +++ b/themes/cp_app/post/post.php @@ -18,21 +18,21 @@ endSection() ?> section('content') ?> -
- -
- include('podcast/_partials/post_with_replies') ?> -
+ lang('Post.back_to_actor_posts', [ + 'actor' => $post->actor->display_name, + ]) ?> + +
+ 1, + 'post' => $post, + 'podcast' => $podcast, + ]) ?>
- -endSection() -?> +endSection() ?> diff --git a/themes/cp_app/podcast/post_remote_action.php b/themes/cp_app/post/remote_action.php similarity index 97% rename from themes/cp_app/podcast/post_remote_action.php rename to themes/cp_app/post/remote_action.php index 6e2205ab..36c7ffd3 100644 --- a/themes/cp_app/podcast/post_remote_action.php +++ b/themes/cp_app/post/remote_action.php @@ -38,7 +38,7 @@ ) ?>
- include('podcast/_partials/post') ?> + include('post/_partials/card') ?>
diff --git a/themes/cp_auth/_layout.php b/themes/cp_auth/_layout.php index 30fca7a6..6df0641b 100644 --- a/themes/cp_auth/_layout.php +++ b/themes/cp_auth/_layout.php @@ -31,7 +31,7 @@ renderSection('footer') ?> - 'Castopod', + 'Castopod' . icon('social/castopod', 'ml-1 text-lg') . '', ]) ?> diff --git a/themes/cp_install/_layout.php b/themes/cp_install/_layout.php index eccc912f..dd384d75 100644 --- a/themes/cp_install/_layout.php +++ b/themes/cp_install/_layout.php @@ -26,7 +26,7 @@ diff --git a/vite.config.ts b/vite.config.ts index f8b3ed54..617f6fa3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -14,6 +14,7 @@ export default defineConfig({ input: { "podcast.ts": "app/Resources/js/podcast.ts", "install.ts": "app/Resources/js/install.ts", + "app.ts": "app/Resources/js/app.ts", "admin.ts": "app/Resources/js/admin.ts", "charts.ts": "app/Resources/js/charts.ts", "map.ts": "app/Resources/js/map.ts",