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}]({$person->image->thumbnail_url})
",
- [
- '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`
diff --git a/app/Resources/js/modules/play-episode-button.ts b/app/Resources/js/modules/play-episode-button.ts
index 7ec0d417..d8c51fd4 100644
--- a/app/Resources/js/modules/play-episode-button.ts
+++ b/app/Resources/js/modules/play-episode-button.ts
@@ -188,35 +188,43 @@ export class PlayEpisodeButton extends LitElement {
static styles = css`
button {
- background-color: #ffffff;
+ background-color: #009486;
cursor: pointer;
display: inline-flex;
align-items: center;
- padding: 0.25rem 0.5rem;
+ padding: 0.5rem 0.5rem;
font-size: 0.875rem;
line-height: 1.25rem;
- font-weight: 600;
- border-width: 2px;
- border-style: solid;
+ border: 2px solid transparent;
border-radius: 9999px;
- border-color: rgba(207, 247, 243, 1);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
button:hover {
- border-color: #009486;
- background-color: #ebf8f8;
+ background-color: #00564a;
}
button:focus {
- background-color: #ebf8f8;
+ box-shadow: 0 0 0 2px #e7f9e4, 0 0 0 calc(2px + 2px) #009486;
+ }
+
+ button.playing {
+ background-color: #f2faf9;
+ border: 2px solid #009486;
+ }
+
+ button.playing:hover {
+ background-color: #e7f9e4;
+ }
+
+ button.playing svg {
+ color: #009486;
}
svg {
font-size: 1.5rem;
- margin-right: 0.25rem;
- color: #009486;
+ color: #ffffff;
}
@keyframes spin {
@@ -231,33 +239,37 @@ export class PlayEpisodeButton extends LitElement {
`;
render(): TemplateResult<1> {
- return 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 @@
+
+
+
+
+
+ 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 @@
-
+ = $this->include('_partials/_nav_header') ?>