diff --git a/.stylelintrc.json b/.stylelintrc.json index 06d264c0..b9a5630c 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -14,6 +14,12 @@ ] } ], + "function-no-unknown": [ + true, + { + "ignoreFunctions": ["theme"] + } + ], "no-descending-specificity": null, "selector-class-pattern": null } diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 30ef2f9a..d46a8855 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -81,6 +81,9 @@ $routes->group('@(:podcastHandle)', static function ($routes): void { $routes->get('manifest.webmanifest', 'WebmanifestController::podcastManifest/$1', [ 'as' => 'podcast-webmanifest', ]); + $routes->get('links', 'PodcastController::links/$1', [ + 'as' => 'podcast-links', + ]); // override default Fediverse Library's actor route $routes->options('/', 'ActivityPubController::preflight'); $routes->get('/', 'PodcastController::activity/$1', [ diff --git a/app/Controllers/PodcastController.php b/app/Controllers/PodcastController.php index f0804871..9784a076 100644 --- a/app/Controllers/PodcastController.php +++ b/app/Controllers/PodcastController.php @@ -318,4 +318,12 @@ class PodcastController extends BaseController ->setContentType('application/activity+json') ->setBody($collection->toJSON()); } + + public function links(): string + { + return view('podcast/links', [ + 'metatags' => get_podcast_metatags($this->podcast, 'links'), + 'podcast' => $this->podcast, + ]); + } } diff --git a/app/Helpers/page_helper.php b/app/Helpers/page_helper.php index 19ebcf3c..253b0135 100644 --- a/app/Helpers/page_helper.php +++ b/app/Helpers/page_helper.php @@ -16,12 +16,18 @@ if (! function_exists('render_page_links')) { * * @return string html pages navigation */ - function render_page_links(string $class = null): string + function render_page_links(string $class = null, string $podcastHandle = null): string { $pages = (new PageModel())->findAll(); $links = anchor(route_to('home'), lang('Common.home'), [ 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent', ]); + if ($podcastHandle !== null) { + $links .= anchor(route_to('podcast-links', $podcastHandle), lang('Podcast.links'), [ + 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent', + ]); + } + $links .= anchor(route_to('credits'), lang('Person.credits'), [ 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent', ]); diff --git a/app/Language/en/Podcast.php b/app/Language/en/Podcast.php index 9b1e749a..dbccf51b 100644 --- a/app/Language/en/Podcast.php +++ b/app/Language/en/Podcast.php @@ -25,6 +25,7 @@ return [ one {# post} other {# posts} }', + 'links' => 'Links', 'activity' => 'Activity', 'episodes' => 'Episodes', 'episodes_title' => 'Episodes of {podcastTitle}', diff --git a/app/Resources/styles/custom.css b/app/Resources/styles/custom.css index 61b409de..25883b74 100644 --- a/app/Resources/styles/custom.css +++ b/app/Resources/styles/custom.css @@ -48,6 +48,17 @@ ); } + .backdrop-gradient-accent { + background-image: linear-gradient( + 180deg, + theme(colors.background.base / 0.4) 0%, + theme(colors.background.base / 0.6) 65.75%, + theme(colors.background.base / 1) 90.28%, + theme(colors.background.base / 1) 97.43%, + theme(colors.background.base / 1) 100% + ); + } + .bg-stripes-gray { background-image: repeating-linear-gradient( -45deg, diff --git a/tailwind.config.js b/tailwind.config.js index 4c4a0a84..b9ae5b2c 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -71,6 +71,7 @@ module.exports = { accent: "hsl(var(--color-accent-base) / )", background: { header: "hsl(var(--color-background-header) / )", + base: "hsl(var(--color-background-base) / )", }, heading: { foreground: "hsl(var(--color-heading-foreground) / )", diff --git a/themes/cp_app/pages/_layout.php b/themes/cp_app/pages/_layout.php index 7f0fb1c5..a7684d62 100644 --- a/themes/cp_app/pages/_layout.php +++ b/themes/cp_app/pages/_layout.php @@ -51,7 +51,7 @@ renderSection('content') ?>