mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-11 10:46:43 +02:00
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
This commit is contained in:
parent
e3bd9df00e
commit
932140077c
120 changed files with 1793 additions and 2137 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue