feat: add heading component + update ecs rules to fix views

This commit is contained in:
Yassine Doghri 2021-09-08 15:51:33 +00:00
parent a50abc138d
commit 23bdc6f8e3
116 changed files with 2560 additions and 2004 deletions

View File

@ -1 +1,2 @@
/// <reference types="vite/client" /> /// <reference types="vite/client" />
declare module "*";

View File

@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace App\Views\Components;
use Exception;
use ViewComponents\Component;
class Heading extends Component
{
protected string $level = '';
/**
* @var "small"|"base"|"large"
*/
protected string $size = 'base';
public function render(): string
{
if ($this->level === '') {
throw new Exception('level property must be set for Heading component.');
}
$sizeClasses = [
'small' => 'tracking-wide text-base',
'base' => 'text-xl',
'large' => 'text-3xl',
];
$class = 'relative z-10 font-bold text-pine-800 font-display before:w-full before:absolute before:h-1/2 before:left-0 before:bottom-0 before:rounded-full before:bg-pine-100 before:-z-10 ' . $sizeClasses[$this->size];
$level = $this->level;
return <<<HTML
<h{$level} class="{$class}">{$this->slot}</h{$level}>
HTML;
}
}

View File

@ -1,4 +1,6 @@
<?php if (session()->has('message')): ?> <?php declare(strict_types=1);
if (session()->has('message')): ?>
<div class="px-4 py-2 mb-4 font-semibold text-green-900 bg-green-200 border border-green-700"> <div class="px-4 py-2 mb-4 font-semibold text-green-900 bg-green-200 border border-green-700">
<?= session('message') ?> <?= session('message') ?>
</div> </div>

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
use CodeIgniter\CLI\CLI; use CodeIgniter\CLI\CLI;
CLI::error('ERROR: ' . $code); CLI::error('ERROR: ' . $code);

View File

@ -1,19 +1,16 @@
<?php <?php
declare(strict_types=1);
use CodeIgniter\CLI\CLI; use CodeIgniter\CLI\CLI;
// The main Exception // The main Exception
CLI::newLine(); CLI::newLine();
CLI::write('[' . $exception::class . ']', 'light_gray', 'red'); CLI::write('[' . $exception::class . ']', 'light_gray', 'red');
CLI::newLine(); CLI::newLine();
CLI::write($message); CLI::write($message);
CLI::newLine(); CLI::newLine();
CLI::write( CLI::write('at ' . CLI::color(clean_path($exception->getFile()) . ':' . $exception->getLine(), 'green', ), );
'at ' .
CLI::color(
clean_path($exception->getFile()) . ':' . $exception->getLine(),
'green',
),
);
CLI::newLine(); CLI::newLine();
// The backtrace // The backtrace
if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) { if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) {
@ -24,8 +21,7 @@ if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) {
} }
foreach ($backtraces as $i => $error) { foreach ($backtraces as $i => $error) {
$padFile = ' '; // 4 spaces $padFile = ' ';
$padClass = ' '; // 7 spaces
$c = str_pad($i + 1, 3, ' ', STR_PAD_LEFT); $c = str_pad($i + 1, 3, ' ', STR_PAD_LEFT);
if (isset($error['file'])) { if (isset($error['file'])) {
@ -33,9 +29,7 @@ if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) {
CLI::write($c . $padFile . CLI::color($filepath, 'yellow')); CLI::write($c . $padFile . CLI::color($filepath, 'yellow'));
} else { } else {
CLI::write( CLI::write($c . $padFile . CLI::color('[internal function]', 'yellow'), );
$c . $padFile . CLI::color('[internal function]', 'yellow'),
);
} }
$function = ''; $function = '';
@ -47,7 +41,7 @@ if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) {
: $error['type']; : $error['type'];
$function .= $function .=
$padClass . $error['class'] . $type . $error['function']; $padClass . $error['class'] . $type . $error['function'];
} elseif (!isset($error['class']) && isset($error['function'])) { } elseif (! isset($error['class']) && isset($error['function'])) {
$function .= $padClass . $error['function']; $function .= $padClass . $error['function'];
} }
@ -57,7 +51,7 @@ if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) {
return match (true) { return match (true) {
is_object($value) => 'Object(' . $value::class . ')', is_object($value) => 'Object(' . $value::class . ')',
is_array($value) => $value !== [] ? '[...]' : '[]', is_array($value) => $value !== [] ? '[...]' : '[]',
is_null($value) => 'null', $value === null => 'null',
default => var_export($value, true), default => var_export($value, true),
}; };
}, array_values($error['args'] ?? [])), }, array_values($error['args'] ?? [])),

View File

@ -1,5 +1,7 @@
<?php <?php
declare(strict_types=1);
// On the CLI, we still want errors in productions // On the CLI, we still want errors in productions
// so just use the exception template. // so just use the exception template.
include __DIR__ . '/error_exception.php'; include __DIR__ . '/error_exception.php';

View File

@ -1,4 +1,4 @@
<?php <?php declare(strict_types=1);
use CodeIgniter\CodeIgniter; use CodeIgniter\CodeIgniter;
use Config\Services; use Config\Services;
@ -82,7 +82,7 @@ $errorId = uniqid('error', true); ?>
<!-- Class/Method --> <!-- Class/Method -->
<?php if (isset($row['class'])) : ?> <?php if (isset($row['class'])) : ?>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp;<?= esc($row['class'] . $row['type'] . $row['function']) ?> &nbsp;&nbsp;&mdash;&nbsp;&nbsp;<?= esc($row['class'] . $row['type'] . $row['function']) ?>
<?php if (!empty($row['args'])) : ?> <?php if (! empty($row['args'])) : ?>
<?php $args_id = $errorId . 'args' . $index ?> <?php $args_id = $errorId . 'args' . $index ?>
( <a href="#" onclick="return toggle('<?= esc($args_id, 'attr') ?>');">arguments</a> ) ( <a href="#" onclick="return toggle('<?= esc($args_id, 'attr') ?>');">arguments</a> )
<div class="args" id="<?= esc($args_id, 'attr') ?>"> <div class="args" id="<?= esc($args_id, 'attr') ?>">
@ -91,7 +91,7 @@ $errorId = uniqid('error', true); ?>
<?php <?php
$params = null; $params = null;
// Reflection by name is not available for closure function // Reflection by name is not available for closure function
if (!str_ends_with($row['function'], '}')) { if (! str_ends_with($row['function'], '}')) {
$mirror = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']); $mirror = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']);
$params = $mirror->getParameters(); $params = $mirror->getParameters();
} }
@ -111,7 +111,7 @@ $errorId = uniqid('error', true); ?>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php if (!isset($row['class']) && isset($row['function'])): ?> <?php if (! isset($row['class']) && isset($row['function'])): ?>
&nbsp;&nbsp;&mdash;&nbsp;&nbsp; <?= esc($row['function']) ?>() &nbsp;&nbsp;&mdash;&nbsp;&nbsp; <?= esc($row['function']) ?>()
<?php endif; ?> <?php endif; ?>
</p> </p>
@ -132,7 +132,7 @@ $errorId = uniqid('error', true); ?>
<!-- Server --> <!-- Server -->
<div class="content" id="server"> <div class="content" id="server">
<?php foreach (['_SERVER', '_SESSION'] as $var): ?> <?php foreach (['_SERVER', '_SESSION'] as $var): ?>
<?php if (empty($GLOBALS[$var]) || !is_array($GLOBALS[$var])) { <?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) {
continue; continue;
} ?> } ?>
@ -165,7 +165,7 @@ $errorId = uniqid('error', true); ?>
<!-- Constants --> <!-- Constants -->
<?php $constants = get_defined_constants(true); ?> <?php $constants = get_defined_constants(true); ?>
<?php if (!empty($constants['user'])): ?> <?php if (! empty($constants['user'])): ?>
<h3>Constants</h3> <h3>Constants</h3>
<table> <table>
@ -234,7 +234,7 @@ $errorId = uniqid('error', true); ?>
<?php $empty = true; ?> <?php $empty = true; ?>
<?php foreach (['_GET', '_POST', '_COOKIE'] as $var): ?> <?php foreach (['_GET', '_POST', '_COOKIE'] as $var): ?>
<?php if (empty($GLOBALS[$var]) || !is_array($GLOBALS[$var])) { <?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) {
continue; continue;
} ?> } ?>
@ -276,7 +276,7 @@ $errorId = uniqid('error', true); ?>
<?php endif; ?> <?php endif; ?>
<?php $headers = $request->getHeaders(); ?> <?php $headers = $request->getHeaders(); ?>
<?php if (!empty($headers)): ?> <?php if (! empty($headers)): ?>
<h3>Headers</h3> <h3>Headers</h3>
@ -292,7 +292,7 @@ $errorId = uniqid('error', true); ?>
<?php if (empty($value)) { <?php if (empty($value)) {
continue; continue;
} ?> } ?>
<?php if (!is_array($value)) { <?php if (! is_array($value)) {
$value = [$value]; $value = [$value];
} ?> } ?>
<?php foreach ($value as $h) : ?> <?php foreach ($value as $h) : ?>
@ -389,7 +389,7 @@ $errorId = uniqid('error', true); ?>
<p> <p>
Displayed at <?= esc(date('H:i:sa')) ?> &mdash; Displayed at <?= esc(date('H:i:sa')) ?> &mdash;
PHP: <?= esc(phpversion()) ?> &mdash; PHP: <?= esc(PHP_VERSION) ?> &mdash;
CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?> CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?>
</p> </p>

View File

@ -1,10 +1,8 @@
<?php <?php declare(strict_types=1);
use CodeIgniter\Pager\PagerRenderer; use CodeIgniter\Pager\PagerRenderer;
/** /** @var PagerRenderer $pager */
* @var PagerRenderer $pager
*/
$pager->setSurroundCount(2); $pager->setSurroundCount(2);
?> ?>
@ -24,7 +22,7 @@ $pager->setSurroundCount(2);
) ?>" class="block px-3 py-2 text-gray-700 hover:bg-gray-200 hover:text-black"> ) ?>" class="block px-3 py-2 text-gray-700 hover:bg-gray-200 hover:text-black">
<span aria-hidden="true"><?= lang( <span aria-hidden="true"><?= lang(
'Pager.previous', 'Pager.previous',
) ?></span> ) ?></span>
</a> </a>
</li> </li>
<?php endif; ?> <?php endif; ?>
@ -49,14 +47,14 @@ $pager->setSurroundCount(2);
<li> <li>
<a href="<?= $pager->getNextPage() ?>" aria-label="<?= lang( <a href="<?= $pager->getNextPage() ?>" aria-label="<?= lang(
'Pager.next', 'Pager.next',
) ?>" class="block px-3 py-2 text-gray-700 hover:bg-gray-200 hover:text-black"> ) ?>" class="block px-3 py-2 text-gray-700 hover:bg-gray-200 hover:text-black">
<span aria-hidden="true"><?= lang('Pager.next') ?></span> <span aria-hidden="true"><?= lang('Pager.next') ?></span>
</a> </a>
</li> </li>
<li> <li>
<a href="<?= $pager->getLast() ?>" aria-label="<?= lang( <a href="<?= $pager->getLast() ?>" aria-label="<?= lang(
'Pager.last', 'Pager.last',
) ?>" class="block px-3 py-2 text-gray-700 hover:bg-gray-200 hover:text-black"> ) ?>" class="block px-3 py-2 text-gray-700 hover:bg-gray-200 hover:text-black">
<span aria-hidden="true"><?= lang('Pager.last') ?></span> <span aria-hidden="true"><?= lang('Pager.last') ?></span>
</a> </a>
</li> </li>

25
ecs.php
View File

@ -1,9 +1,11 @@
<?php <?php
use PhpCsFixer\Fixer\Whitespace\IndentationTypeFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\CodingStandard\Fixer\Naming\StandardizeHereNowDocKeywordFixer; use Symplify\CodingStandard\Fixer\Naming\StandardizeHereNowDocKeywordFixer;
use Symplify\EasyCodingStandard\ValueObject\Option; use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList; use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
return static function (ContainerConfigurator $containerConfigurator): void { return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters(); $parameters = $containerConfigurator->parameters();
@ -12,21 +14,32 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$parameters->set(Option::PATHS, [ $parameters->set(Option::PATHS, [
__DIR__ . '/app', __DIR__ . '/app',
__DIR__ . '/modules', __DIR__ . '/modules',
__DIR__ . '/themes',
__DIR__ . '/tests', __DIR__ . '/tests',
__DIR__ . '/public', __DIR__ . '/public',
__DIR__ . '/public',
]); ]);
$parameters->set(Option::SKIP, [ $parameters->set(Option::SKIP, [
// TODO: restrict some rules for views?
__DIR__ . '/app/Views/*',
__DIR__ . '/modules/**/Views/*',
// skip specific generated files // skip specific generated files
__DIR__ . '/modules/Admin/Language/*/PersonsTaxonomy.php', __DIR__ . '/modules/Admin/Language/*/PersonsTaxonomy.php',
StandardizeHereNowDocKeywordFixer::class => [ StandardizeHereNowDocKeywordFixer::class => [
__DIR__ . '/app/View/Components', __DIR__ . '/app/Views/Components/*',
__DIR__ . '/modules/**/View/Components', __DIR__ . '/modules/**/Views/Components/*',
__DIR__ . '/themes/**/Views/Components/*',
],
LineLengthFixer::class => [
__DIR__ . '/app/Views/*',
__DIR__ . '/modules/**/Views/*',
__DIR__ . '/themes/*',
],
IndentationTypeFixer::class => [
__DIR__ . '/app/Views/*',
__DIR__ . '/modules/**/Views/*',
__DIR__ . '/themes/*',
] ]
]); ]);

View File

@ -4,7 +4,6 @@ module.exports = {
mode: "jit", mode: "jit",
purge: [ purge: [
"./app/Views/**/*.php", "./app/Views/**/*.php",
"./app/View/Components/**/*.php",
"./modules/**/Views/**/*.php", "./modules/**/Views/**/*.php",
"./themes/**/*.php", "./themes/**/*.php",
"./app/Helpers/*.php", "./app/Helpers/*.php",
@ -49,6 +48,9 @@ module.exports = {
gridTemplateColumns: { gridTemplateColumns: {
podcasts: "repeat(auto-fill, minmax(14rem, 1fr))", podcasts: "repeat(auto-fill, minmax(14rem, 1fr))",
}, },
zIndex: {
"-10": "-10",
},
}, },
}, },
variants: {}, variants: {},

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
@ -8,9 +9,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
<?= service('vite')->asset('js/admin.ts', 'js') ?> ->asset('styles/index.css', 'css') ?>
<?= service('vite')->asset('js/audio-player.ts', 'js') ?> <?= service('vite')
->asset('js/admin.ts', 'js') ?>
<?= service('vite')
->asset('js/audio-player.ts', 'js') ?>
</head> </head>
<body class="relative bg-pine-50 holy-grail-grid"> <body class="relative bg-pine-50 holy-grail-grid">
@ -38,7 +42,8 @@
aria-haspopup="true" aria-haspopup="true"
aria-expanded="false"> aria-expanded="false">
<?= icon('account-circle', 'text-2xl opacity-60 mr-2') ?> <?= icon('account-circle', 'text-2xl opacity-60 mr-2') ?>
<?= user()->username ?> <?= user()
->username ?>
<?= icon('caret-down', 'ml-auto text-2xl') ?> <?= icon('caret-down', 'ml-auto text-2xl') ?>
</button> </button>
<nav <nav
@ -80,9 +85,9 @@
<div class="flex flex-col"> <div class="flex flex-col">
<?= render_breadcrumb('text-gray-800 text-xs') ?> <?= render_breadcrumb('text-gray-800 text-xs') ?>
<div class="flex flex-wrap items-center"> <div class="flex flex-wrap items-center">
<h1 class="text-3xl font-bold font-display"><?= $this->renderSection( <Heading level="1" size="large"><?= $this->renderSection(
'pageTitle', 'pageTitle',
) ?></h1> ) ?></Heading>
<?= $this->renderSection('headerLeft') ?> <?= $this->renderSection('headerLeft') ?>
</div> </div>
</div> </div>

View File

@ -1,4 +1,5 @@
<?php <?php declare(strict_types=1);
$navigation = [ $navigation = [
'podcasts' => [ 'podcasts' => [
'icon' => 'mic', 'icon' => 'mic',
@ -12,8 +13,15 @@ $navigation = [
'icon' => 'star-smile', 'icon' => 'star-smile',
'items' => ['fediverse-blocked-actors', 'fediverse-blocked-domains'], 'items' => ['fediverse-blocked-actors', 'fediverse-blocked-domains'],
], ],
'users' => ['icon' => 'group', 'items' => ['user-list', 'user-create']], 'users' => [
'pages' => ['icon' => 'pages', 'items' => ['page-list', 'page-create']], 'icon' => 'group',
'items' => ['user-list', 'user-create'],
],
'pages' => [
'icon' => 'pages',
'items' => ['page-list', 'page-create'],
],
]; ?> ]; ?>
<nav class="flex flex-col flex-1 py-4 overflow-y-auto gap-y-4"> <nav class="flex flex-col flex-1 py-4 overflow-y-auto gap-y-4">
@ -29,7 +37,7 @@ $navigation = [
<li class="inline-flex"> <li class="inline-flex">
<a class="w-full py-1 pl-14 pr-2 text-sm outline-none hover:opacity-100 focus:ring<?= $isActive <a class="w-full py-1 pl-14 pr-2 text-sm outline-none hover:opacity-100 focus:ring<?= $isActive
? ' font-semibold opacity-100 inline-flex items-center' ? ' font-semibold opacity-100 inline-flex items-center'
: ' opacity-75' ?>" href="<?= route_to($item) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') .lang( : ' opacity-75' ?>" href="<?= route_to($item) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang(
'AdminNavigation.' . $item, 'AdminNavigation.' . $item,
) ?></a> ) ?></a>
</li> </li>

View File

@ -21,7 +21,7 @@
'id' => 'user', 'id' => 'user',
'class' => 'form-select mb-4', 'class' => 'form-select mb-4',
'required' => 'required', 'required' => 'required',
'placeholder' => lang('Contributor.form.user_placeholder') 'placeholder' => lang('Contributor.form.user_placeholder'),
]) ?> ]) ?>
<Forms.Label for="role"><?= lang('Contributor.form.role') ?></Forms.Label> <Forms.Label for="role"><?= lang('Contributor.form.role') ?></Forms.Label>
@ -29,14 +29,19 @@
'id' => 'role', 'id' => 'role',
'class' => 'form-select mb-4', 'class' => 'form-select mb-4',
'required' => 'required', 'required' => 'required',
'placeholder' => lang('Contributor.form.role_placeholder') 'placeholder' => lang('Contributor.form.role_placeholder'),
]) ?> ]) ?>
<?= button( <?= button(
lang('Contributor.form.submit_add'), lang('Contributor.form.submit_add'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -26,8 +26,13 @@
<?= button( <?= button(
lang('Contributor.form.submit_edit'), lang('Contributor.form.submit_edit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -46,7 +46,9 @@
'variant' => 'info', 'variant' => 'info',
'size' => 'small', 'size' => 'small',
], ],
['class' => 'mr-2'], [
'class' => 'mr-2',
],
) . ) .
button( button(
lang('Contributor.remove'), lang('Contributor.remove'),
@ -59,7 +61,9 @@
'variant' => 'danger', 'variant' => 'danger',
'size' => 'small', 'size' => 'small',
], ],
['class' => 'mr-2'], [
'class' => 'mr-2',
],
); );
}, },
], ],

View File

@ -1,4 +1,5 @@
<?php <?php declare(strict_types=1);
$podcastNavigation = [ $podcastNavigation = [
'dashboard' => [ 'dashboard' => [
'icon' => 'dashboard', 'icon' => 'dashboard',
@ -7,7 +8,7 @@ $podcastNavigation = [
]; ?> ]; ?>
<a href="<?= route_to('podcast-view', $podcast->id) ?>" class="flex items-center px-4 py-2 border-b border-pine-900 focus:ring"> <a href="<?= route_to('podcast-view', $podcast->id) ?>" class="flex items-center px-4 py-2 border-b border-pine-900 focus:ring">
<?= icon('arrow-left', 'mr-2' ) ?> <?= icon('arrow-left', 'mr-2') ?>
<img <img
src="<?= $podcast->image->thumbnail_url ?>" src="<?= $podcast->image->thumbnail_url ?>"
alt="<?= $podcast->title ?>" alt="<?= $podcast->title ?>"
@ -27,9 +28,9 @@ $podcastNavigation = [
'episode', 'episode',
$podcast->handle, $podcast->handle,
$episode->slug, $episode->slug,
) ?>" class="inline-flex items-center text-xs outline-none hover:underline focus:ring"><?= lang( ) ?>" class="inline-flex items-center text-xs outline-none hover:underline focus:ring"><?= lang(
'EpisodeNavigation.go_to_page', 'EpisodeNavigation.go_to_page',
) ?> ) ?>
<?= icon('external-link', 'ml-1 opacity-60') ?> <?= icon('external-link', 'ml-1 opacity-60') ?>
</a> </a>
</div> </div>
@ -51,7 +52,7 @@ $podcastNavigation = [
$item, $item,
$podcast->id, $podcast->id,
$episode->id $episode->id
) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') .lang('EpisodeNavigation.' . $item) ?></a> ) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang('EpisodeNavigation.' . $item) ?></a>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>

View File

@ -26,7 +26,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.info_section_title'), lang('Episode.form.info_section_title'),
lang('Episode.form.info_section_subtitle'), lang('Episode.form.info_section_subtitle'),
) ?> ) ?>
<Forms.Label for="audio_file" hint="<?= lang('Episode.form.audio_file_hint') ?>"><?= lang('Episode.form.audio_file') ?></Forms.Label> <Forms.Label for="audio_file" hint="<?= lang('Episode.form.audio_file_hint') ?>"><?= lang('Episode.form.audio_file') ?></Forms.Label>
<?= form_input([ <?= form_input([
@ -62,7 +62,7 @@
<Forms.Label for="slug"><?= lang('Episode.form.permalink') ?></Forms.Label> <Forms.Label for="slug"><?= lang('Episode.form.permalink') ?></Forms.Label>
<permalink-edit class="inline-flex items-center mb-4 text-xs" edit-label="<?= lang('Common.edit') ?>" copy-label="<?= lang('Common.copy') ?>" copied-label="<?= lang('Common.copied') ?>"> <permalink-edit class="inline-flex items-center mb-4 text-xs" edit-label="<?= lang('Common.edit') ?>" copy-label="<?= lang('Common.copy') ?>" copied-label="<?= lang('Common.copied') ?>">
<span slot="domain"><?= base_url('/@'. $podcast->handle . '/episodes' ) . '/' ?></span> <span slot="domain"><?= base_url('/@' . $podcast->handle . '/episodes') . '/' ?></span>
<?= form_input([ <?= form_input([
'id' => 'slug', 'id' => 'slug',
'name' => 'slug', 'name' => 'slug',
@ -70,7 +70,7 @@
'value' => old('slug'), 'value' => old('slug'),
'required' => 'required', 'required' => 'required',
'data-slugify' => 'slug', 'data-slugify' => 'slug',
'slot' => 'slug-input' 'slot' => 'slug-input',
]) ?> ]) ?>
</permalink-edit> </permalink-edit>
@ -98,38 +98,54 @@
</div> </div>
<?= form_fieldset('', ['class' => 'mb-4']) ?> <?= form_fieldset('', [
'class' => 'mb-4',
]) ?>
<legend> <legend>
<?= lang('Episode.form.type.label') . <?= lang('Episode.form.type.label') .
hint_tooltip(lang('Episode.form.type.hint'), 'ml-1') ?> hint_tooltip(lang('Episode.form.type.hint'), 'ml-1') ?>
</legend> </legend>
<?= form_radio( <?= form_radio(
['id' => 'full', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'full',
'name' => 'type',
'class' => 'form-radio-btn',
],
'full', 'full',
old('type') ? old('type') == 'full' : true, old('type') ? old('type') === 'full' : true,
) ?> ) ?>
<label for="full" class="inline-flex items-center"> <label for="full" class="inline-flex items-center">
<?= lang('Episode.form.type.full') ?> <?= lang('Episode.form.type.full') ?>
</label> </label>
<?= form_radio( <?= form_radio(
['id' => 'trailer', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'trailer',
'name' => 'type',
'class' => 'form-radio-btn',
],
'trailer', 'trailer',
old('type') && old('type') == 'trailer', old('type') && old('type') === 'trailer',
) ?> ) ?>
<label for="trailer" class="inline-flex items-center"> <label for="trailer" class="inline-flex items-center">
<?= lang('Episode.form.type.trailer') ?> <?= lang('Episode.form.type.trailer') ?>
</label> </label>
<?= form_radio( <?= form_radio(
['id' => 'bonus', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'bonus',
'name' => 'type',
'class' => 'form-radio-btn',
],
'bonus', 'bonus',
old('type') && old('type') == 'bonus', old('type') && old('type') === 'bonus',
) ?> ) ?>
<label for="bonus" class="inline-flex items-center"> <label for="bonus" class="inline-flex items-center">
<?= lang('Episode.form.type.bonus') ?> <?= lang('Episode.form.type.bonus') ?>
</label> </label>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
<?= form_fieldset('', ['class' => 'flex mb-6 gap-1']) ?> <?= form_fieldset('', [
'class' => 'flex mb-6 gap-1',
]) ?>
<legend> <legend>
<?= lang('Episode.form.parental_advisory.label') . <?= lang('Episode.form.parental_advisory.label') .
hint_tooltip(lang('Episode.form.parental_advisory.hint'), 'ml-1') ?> hint_tooltip(lang('Episode.form.parental_advisory.hint'), 'ml-1') ?>
@ -180,7 +196,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.show_notes_section_title'), lang('Episode.form.show_notes_section_title'),
lang('Episode.form.show_notes_section_subtitle'), lang('Episode.form.show_notes_section_subtitle'),
) ?> ) ?>
<div class="mb-4"> <div class="mb-4">
<Forms.Label for="description"><?= lang('Episode.form.description') ?></Forms.Label> <Forms.Label for="description"><?= lang('Episode.form.description') ?></Forms.Label>
@ -197,7 +213,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.location_section_title'), lang('Episode.form.location_section_title'),
lang('Episode.form.location_section_subtitle'), lang('Episode.form.location_section_subtitle'),
) ?> ) ?>
<Forms.Label for="location_name" hint="<?= lang('Episode.form.location_name_hint') ?>" isOptional="true"><?= lang('Episode.form.location_name') ?></Forms.Label> <Forms.Label for="location_name" hint="<?= lang('Episode.form.location_name_hint') ?>" isOptional="true"><?= lang('Episode.form.location_name') ?></Forms.Label>
<?= form_input([ <?= form_input([
@ -213,7 +229,9 @@
lang('Episode.form.additional_files_section_subtitle'), lang('Episode.form.additional_files_section_subtitle'),
) ?> ) ?>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?> <?= form_fieldset('', [
'class' => 'flex flex-col mb-4',
]) ?>
<legend><?= lang('Episode.form.transcript') . <legend><?= lang('Episode.form.transcript') .
'<small class="ml-1 lowercase">(' . '<small class="ml-1 lowercase">(' .
lang('Common.optional') . lang('Common.optional') .
@ -264,7 +282,9 @@
</div> </div>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?> <?= form_fieldset('', [
'class' => 'flex flex-col mb-4',
]) ?>
<legend><?= lang('Episode.form.chapters') . <legend><?= lang('Episode.form.chapters') .
'<small class="ml-1 lowercase">(' . '<small class="ml-1 lowercase">(' .
lang('Common.optional') . lang('Common.optional') .
@ -320,7 +340,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.advanced_section_title'), lang('Episode.form.advanced_section_title'),
lang('Episode.form.advanced_section_subtitle'), lang('Episode.form.advanced_section_subtitle'),
) ?> ) ?>
<Forms.Label for="custom_rss" hint="<?= lang('Episode.form.custom_rss_hint') ?>" isOptional="true"><?= lang('Episode.form.custom_rss') ?></Forms.Label> <Forms.Label for="custom_rss" hint="<?= lang('Episode.form.custom_rss_hint') ?>" isOptional="true"><?= lang('Episode.form.custom_rss') ?></Forms.Label>
<Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', '', false) ?></Forms.XMLEditor> <Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', '', false) ?></Forms.XMLEditor>
@ -331,9 +351,14 @@
<?= button( <?= button(
lang('Episode.form.submit_create'), lang('Episode.form.submit_create'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
) ?> ],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -33,7 +33,7 @@
'" '"
class="w-48" class="w-48"
/>', />',
) ?> ) ?>
<Forms.Label for="audio_file" hint="<?= lang('Episode.form.audio_file_hint') ?>"><?= lang('Episode.form.audio_file') ?></Forms.Label> <Forms.Label for="audio_file" hint="<?= lang('Episode.form.audio_file_hint') ?>"><?= lang('Episode.form.audio_file') ?></Forms.Label>
<?= form_input([ <?= form_input([
@ -76,7 +76,7 @@
'value' => old('slug', $episode->slug), 'value' => old('slug', $episode->slug),
'required' => 'required', 'required' => 'required',
'data-slugify' => 'slug', 'data-slugify' => 'slug',
'slot' => 'slug-input' 'slot' => 'slug-input',
]) ?> ]) ?>
</permalink-edit> </permalink-edit>
@ -103,38 +103,54 @@
</div> </div>
</div> </div>
<?= form_fieldset('', ['class' => 'flex mb-4 gap-1']) ?> <?= form_fieldset('', [
'class' => 'flex mb-4 gap-1',
]) ?>
<legend> <legend>
<?= lang('Episode.form.type.label') . <?= lang('Episode.form.type.label') .
hint_tooltip(lang('Episode.form.type.hint'), 'ml-1') ?> hint_tooltip(lang('Episode.form.type.hint'), 'ml-1') ?>
</legend> </legend>
<?= form_radio( <?= form_radio(
['id' => 'full', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'full',
'name' => 'type',
'class' => 'form-radio-btn',
],
'full', 'full',
old('type') ? old('type') === 'full' : $episode->type === 'full', old('type') ? old('type') === 'full' : $episode->type === 'full',
) ?> ) ?>
<label for="full" class="inline-flex items-center"> <label for="full" class="inline-flex items-center">
<?= lang('Episode.form.type.full') ?> <?= lang('Episode.form.type.full') ?>
</label> </label>
<?= form_radio( <?= form_radio(
['id' => 'trailer', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'trailer',
'name' => 'type',
'class' => 'form-radio-btn',
],
'trailer', 'trailer',
old('type') ? old('type') === 'trailer' : $episode->type === 'trailer', old('type') ? old('type') === 'trailer' : $episode->type === 'trailer',
) ?> ) ?>
<label for="trailer" class="inline-flex items-center"> <label for="trailer" class="inline-flex items-center">
<?= lang('Episode.form.type.trailer') ?> <?= lang('Episode.form.type.trailer') ?>
</label> </label>
<?= form_radio( <?= form_radio(
['id' => 'bonus', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'bonus',
'name' => 'type',
'class' => 'form-radio-btn',
],
'bonus', 'bonus',
old('type') ? old('type') === 'bonus' : $episode->type === 'bonus', old('type') ? old('type') === 'bonus' : $episode->type === 'bonus',
) ?> ) ?>
<label for="bonus" class="inline-flex items-center"> <label for="bonus" class="inline-flex items-center">
<?= lang('Episode.form.type.bonus') ?> <?= lang('Episode.form.type.bonus') ?>
</label> </label>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
<?= form_fieldset('', ['class' => 'mb-6']) ?> <?= form_fieldset('', [
'class' => 'mb-6',
]) ?>
<legend> <legend>
<?= lang('Episode.form.parental_advisory.label') . <?= lang('Episode.form.parental_advisory.label') .
hint_tooltip(lang('Episode.form.parental_advisory.hint'), 'ml-1') ?> hint_tooltip(lang('Episode.form.parental_advisory.hint'), 'ml-1') ?>
@ -149,7 +165,7 @@
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'undefined' ? old('parental_advisory') === 'undefined'
: $episode->parental_advisory === null, : $episode->parental_advisory === null,
) ?> ) ?>
<label for="undefined"><?= lang( <label for="undefined"><?= lang(
'Episode.form.parental_advisory.undefined', 'Episode.form.parental_advisory.undefined',
) ?></label> ) ?></label>
@ -163,7 +179,7 @@
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'clean' ? old('parental_advisory') === 'clean'
: $episode->parental_advisory === 'clean', : $episode->parental_advisory === 'clean',
) ?> ) ?>
<label for="clean"><?= lang( <label for="clean"><?= lang(
'Episode.form.parental_advisory.clean', 'Episode.form.parental_advisory.clean',
) ?></label> ) ?></label>
@ -177,7 +193,7 @@
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'explicit' ? old('parental_advisory') === 'explicit'
: $episode->parental_advisory === 'explicit', : $episode->parental_advisory === 'explicit',
) ?> ) ?>
<label for="explicit"><?= lang( <label for="explicit"><?= lang(
'Episode.form.parental_advisory.explicit', 'Episode.form.parental_advisory.explicit',
) ?></label> ) ?></label>
@ -189,7 +205,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.show_notes_section_title'), lang('Episode.form.show_notes_section_title'),
lang('Episode.form.show_notes_section_subtitle'), lang('Episode.form.show_notes_section_subtitle'),
) ?> ) ?>
<div class="mb-4"> <div class="mb-4">
<Forms.Label for="description"><?= lang('Episode.form.description') ?></Forms.Label> <Forms.Label for="description"><?= lang('Episode.form.description') ?></Forms.Label>
@ -206,7 +222,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.location_section_title'), lang('Episode.form.location_section_title'),
lang('Episode.form.location_section_subtitle'), lang('Episode.form.location_section_subtitle'),
) ?> ) ?>
<Forms.Label for="location_name" hint="<?= lang('Episode.form.location_name_hint') ?>" isOptional="true"><?= lang('Episode.form.location_name') ?></Forms.Label> <Forms.Label for="location_name" hint="<?= lang('Episode.form.location_name_hint') ?>" isOptional="true"><?= lang('Episode.form.location_name') ?></Forms.Label>
<?= form_input([ <?= form_input([
@ -226,7 +242,9 @@
]), ]),
) ?> ) ?>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?> <?= form_fieldset('', [
'class' => 'flex flex-col mb-4',
]) ?>
<legend><?= lang('Episode.form.transcript') . <legend><?= lang('Episode.form.transcript') .
'<small class="ml-1 lowercase">(' . '<small class="ml-1 lowercase">(' .
lang('Common.optional') . lang('Common.optional') .
@ -307,7 +325,9 @@
</div> </div>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?> <?= form_fieldset('', [
'class' => 'flex flex-col mb-4',
]) ?>
<legend><?= lang('Episode.form.chapters') . <legend><?= lang('Episode.form.chapters') .
'<small class="ml-1 lowercase">(' . '<small class="ml-1 lowercase">(' .
lang('Common.optional') . lang('Common.optional') .
@ -392,7 +412,7 @@
<?= form_section( <?= form_section(
lang('Episode.form.advanced_section_title'), lang('Episode.form.advanced_section_title'),
lang('Episode.form.advanced_section_subtitle'), lang('Episode.form.advanced_section_subtitle'),
) ?> ) ?>
<Forms.Label for="custom_rss" hint="<?= lang('Episode.form.custom_rss_hint') ?>" isOptional="true"><?= lang('Episode.form.custom_rss') ?></Forms.Label> <Forms.Label for="custom_rss" hint="<?= lang('Episode.form.custom_rss_hint') ?>" isOptional="true"><?= lang('Episode.form.custom_rss') ?></Forms.Label>
<Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', $episode->custom_rss_string, false) ?></Forms.XMLEditor> <Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', $episode->custom_rss_string, false) ?></Forms.XMLEditor>
@ -404,14 +424,22 @@
<?= button( <?= button(
lang('Episode.delete'), lang('Episode.delete'),
route_to('episode-delete', $podcast->id, $episode->id), route_to('episode-delete', $podcast->id, $episode->id),
['variant' => 'danger', 'iconLeft' => 'delete-bin'], [
'variant' => 'danger',
'iconLeft' => 'delete-bin',
],
) ?> ) ?>
<?= button( <?= button(
lang('Episode.form.submit_edit'), lang('Episode.form.submit_edit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
</div> </div>

View File

@ -18,9 +18,9 @@
'style' 'style'
] ?>" class="w-12 h-12 mr-1 border-2 border-gray-400 rounded-lg hover:border-white" title="<?= lang( ] ?>" class="w-12 h-12 mr-1 border-2 border-gray-400 rounded-lg hover:border-white" title="<?= lang(
"Episode.embeddable_player.{$themeKey}", "Episode.embeddable_player.{$themeKey}",
) ?>" data-type="theme-picker" data-url="<?= $episode->getEmbeddablePlayerUrl( ) ?>" data-type="theme-picker" data-url="<?= $episode->getEmbeddablePlayerUrl(
$themeKey, $themeKey,
) ?>"></button> ) ?>"></button>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
@ -39,8 +39,13 @@
'file-copy', 'file-copy',
lang('Episode.embeddable_player.clipboard_iframe'), lang('Episode.embeddable_player.clipboard_iframe'),
'', '',
['variant' => 'default'], [
['data-type' => 'clipboard-copy', 'data-clipboard-target' => 'iframe'], 'variant' => 'default',
],
[
'data-type' => 'clipboard-copy',
'data-clipboard-target' => 'iframe',
],
) ?> ) ?>
</div> </div>
@ -57,8 +62,13 @@
'file-copy', 'file-copy',
lang('Episode.embeddable_player.clipboard_url'), lang('Episode.embeddable_player.clipboard_url'),
'', '',
['variant' => 'default'], [
['data-type' => 'clipboard-copy', 'data-clipboard-target' => 'url'], 'variant' => 'default',
],
[
'data-type' => 'clipboard-copy',
'data-clipboard-target' => 'url',
],
) ?> ) ?>
</div> </div>

View File

@ -31,7 +31,7 @@
'header' => lang('Episode.list.episode'), 'header' => lang('Episode.list.episode'),
'cell' => function ($episode, $podcast) { 'cell' => function ($episode, $podcast) {
return '<div class="flex">' . return '<div class="flex">' .
'<div class="relative flex-shrink-0 mr-2">'. '<div class="relative flex-shrink-0 mr-2">' .
'<time class="absolute px-1 text-xs font-semibold text-white rounded bottom-2 right-2 bg-black/50" datetime="PT<?= $episode->audio_file_duration ?>S">' . '<time class="absolute px-1 text-xs font-semibold text-white rounded bottom-2 right-2 bg-black/50" datetime="PT<?= $episode->audio_file_duration ?>S">' .
format_duration( format_duration(
$episode->audio_file_duration, $episode->audio_file_duration,
@ -121,7 +121,7 @@
$episodes, $episodes,
'mb-6', 'mb-6',
$podcast $podcast
) ?> ) ?>
<?= $pager->links() ?> <?= $pager->links() ?>

View File

@ -12,8 +12,13 @@
<?= button( <?= button(
lang('Person.create'), lang('Person.create'),
route_to('person-create'), route_to('person-create'),
['variant' => 'primary', 'iconLeft' => 'add'], [
['class' => 'mr-2'], 'variant' => 'primary',
'iconLeft' => 'add',
],
[
'class' => 'mr-2',
],
) ?> ) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
@ -105,8 +110,13 @@
<?= button( <?= button(
lang('Person.episode_form.submit_add'), lang('Person.episode_form.submit_add'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -14,13 +14,15 @@
<?= anchor( <?= anchor(
route_to('episode-view', $podcast->id, $episode->id), route_to('episode-view', $podcast->id, $episode->id),
icon('arrow-left', 'mr-2 text-lg') . lang('Episode.publish_form.back_to_episode_dashboard'), icon('arrow-left', 'mr-2 text-lg') . lang('Episode.publish_form.back_to_episode_dashboard'),
['class' => 'inline-flex items-center font-semibold mr-4 text-sm'], [
'class' => 'inline-flex items-center font-semibold mr-4 text-sm',
],
) ?> ) ?>
<?= form_open(route_to('episode-publish', $podcast->id, $episode->id), [ <?= form_open(route_to('episode-publish', $podcast->id, $episode->id), [
'method' => 'post', 'method' => 'post',
'class' => 'mx-auto flex flex-col max-w-xl items-start', 'class' => 'mx-auto flex flex-col max-w-xl items-start',
'data-submit' => 'validate-message' 'data-submit' => 'validate-message',
]) ?> ]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_hidden('client_timezone', 'UTC') ?> <?= form_hidden('client_timezone', 'UTC') ?>
@ -28,7 +30,7 @@
<label for="message" class="text-lg font-semibold"><?= lang( <label for="message" class="text-lg font-semibold"><?= lang(
'Episode.publish_form.post', 'Episode.publish_form.post',
) ?></label> ) ?></label>
<small class="max-w-md mb-2 text-gray-600"><?= lang('Episode.publish_form.post_hint') ?></small> <small class="max-w-md mb-2 text-gray-600"><?= lang('Episode.publish_form.post_hint') ?></small>
<div class="mb-8 overflow-hidden bg-white shadow-md rounded-xl"> <div class="mb-8 overflow-hidden bg-white shadow-md rounded-xl">
<div class="flex px-4 py-3"> <div class="flex px-4 py-3">
@ -48,10 +50,12 @@
'name' => 'message', 'name' => 'message',
'class' => 'form-textarea min-w-0 w-full', 'class' => 'form-textarea min-w-0 w-full',
'placeholder' => 'Write your message...', 'placeholder' => 'Write your message...',
'autofocus' => '' 'autofocus' => '',
], ],
old('message', '', false), old('message', '', false),
['rows' => 2], [
'rows' => 2,
],
) ?> ) ?>
</div> </div>
<div class="flex"> <div class="flex">
@ -92,10 +96,12 @@
</footer> </footer>
</div> </div>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?> <?= form_fieldset('', [
'class' => 'flex flex-col mb-4',
]) ?>
<legend class="text-lg font-semibold"><?= lang( <legend class="text-lg font-semibold"><?= lang(
'Episode.publish_form.publication_date', 'Episode.publish_form.publication_date',
) ?></legend> ) ?></legend>
<label for="now" class="inline-flex items-center"> <label for="now" class="inline-flex items-center">
<?= form_radio( <?= form_radio(
[ [
@ -105,10 +111,10 @@
], ],
'now', 'now',
old('publication_method') ? old('publish') === 'now' : true, old('publication_method') ? old('publish') === 'now' : true,
) ?> ) ?>
<span class="ml-2"><?= lang( <span class="ml-2"><?= lang(
'Episode.publish_form.publication_method.now', 'Episode.publish_form.publication_method.now',
) ?></span> ) ?></span>
</label> </label>
<div class="inline-flex flex-wrap items-center radio-toggler"> <div class="inline-flex flex-wrap items-center radio-toggler">
<?= form_radio( <?= form_radio(
@ -120,17 +126,17 @@
'schedule', 'schedule',
old('publication_method') && old('publication_method') &&
old('publication_method') === 'schedule', old('publication_method') === 'schedule',
) ?> ) ?>
<label for="schedule" class="ml-2"><?= lang( <label for="schedule" class="ml-2"><?= lang(
'Episode.publish_form.publication_method.schedule', 'Episode.publish_form.publication_method.schedule',
) ?></label> ) ?></label>
<div class="w-full mt-2 radio-toggler-element"> <div class="w-full mt-2 radio-toggler-element">
<?= form_label( <?= form_label(
lang('Episode.publish_form.scheduled_publication_date'), lang('Episode.publish_form.scheduled_publication_date'),
'scheduled_publication_date', 'scheduled_publication_date',
[], [],
lang('Episode.publish_form.scheduled_publication_date_hint'), lang('Episode.publish_form.scheduled_publication_date_hint'),
) ?> ) ?>
<div class="flex" data-picker="datetime"> <div class="flex" data-picker="datetime">
<?= form_input([ <?= form_input([
'id' => 'scheduled_publication_date', 'id' => 'scheduled_publication_date',
@ -162,14 +168,16 @@
<?= button( <?= button(
lang('Episode.publish_form.submit'), lang('Episode.publish_form.submit'),
'', '',
['variant' => 'primary'], [
'variant' => 'primary',
],
[ [
'class' => 'self-end mt-4', 'class' => 'self-end mt-4',
'type' => 'submit', 'type' => 'submit',
'data-btn-text-warning' => lang('Episode.publish_form.message_warning_submit'), 'data-btn-text-warning' => lang('Episode.publish_form.message_warning_submit'),
'data-btn-text' => lang('Episode.publish_form.submit_edit') 'data-btn-text' => lang('Episode.publish_form.submit_edit'),
], ],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -13,13 +13,15 @@
<?= anchor( <?= anchor(
route_to('episode-view', $podcast->id, $episode->id), route_to('episode-view', $podcast->id, $episode->id),
icon('arrow-left', 'mr-2 text-lg') . lang('Episode.publish_form.back_to_episode_dashboard'), icon('arrow-left', 'mr-2 text-lg') . lang('Episode.publish_form.back_to_episode_dashboard'),
['class' => 'inline-flex items-center font-semibold mr-4 text-sm'], [
'class' => 'inline-flex items-center font-semibold mr-4 text-sm',
],
) ?> ) ?>
<?= form_open(route_to('episode-publish_edit', $podcast->id, $episode->id), [ <?= form_open(route_to('episode-publish_edit', $podcast->id, $episode->id), [
'method' => 'post', 'method' => 'post',
'class' => 'mx-auto flex flex-col max-w-xl items-start', 'class' => 'mx-auto flex flex-col max-w-xl items-start',
'data-submit' => 'validate-message' 'data-submit' => 'validate-message',
]) ?> ]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_hidden('client_timezone', 'UTC') ?> <?= form_hidden('client_timezone', 'UTC') ?>
@ -28,7 +30,7 @@
<label for="message" class="text-lg font-semibold"><?= lang( <label for="message" class="text-lg font-semibold"><?= lang(
'Episode.publish_form.post', 'Episode.publish_form.post',
) ?></label> ) ?></label>
<small class="max-w-md mb-2 text-gray-600"><?= lang('Episode.publish_form.post_hint') ?></small> <small class="max-w-md mb-2 text-gray-600"><?= lang('Episode.publish_form.post_hint') ?></small>
<div class="mb-8 overflow-hidden bg-white shadow-md rounded-xl"> <div class="mb-8 overflow-hidden bg-white shadow-md rounded-xl">
<div class="flex px-4 py-3"> <div class="flex px-4 py-3">
@ -48,11 +50,13 @@
'name' => 'message', 'name' => 'message',
'class' => 'form-textarea', 'class' => 'form-textarea',
'placeholder' => 'Write your message...', 'placeholder' => 'Write your message...',
'autofocus' => '' 'autofocus' => '',
], ],
old('message', $post->message, false), old('message', $post->message, false),
['rows' => 2], [
) ?> 'rows' => 2,
],
) ?>
</div> </div>
<div class="flex"> <div class="flex">
<img src="<?= $episode->image <img src="<?= $episode->image
@ -95,10 +99,12 @@
</footer> </footer>
</div> </div>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?> <?= form_fieldset('', [
'class' => 'flex flex-col mb-4',
]) ?>
<legend class="text-lg font-semibold"><?= lang( <legend class="text-lg font-semibold"><?= lang(
'Episode.publish_form.publication_date', 'Episode.publish_form.publication_date',
) ?></legend> ) ?></legend>
<label for="now" class="inline-flex items-center"> <label for="now" class="inline-flex items-center">
<?= form_radio( <?= form_radio(
[ [
@ -108,10 +114,10 @@
], ],
'now', 'now',
old('publication_method') && old('publish') === 'now', old('publication_method') && old('publish') === 'now',
) ?> ) ?>
<span class="ml-2"><?= lang( <span class="ml-2"><?= lang(
'Episode.publish_form.publication_method.now', 'Episode.publish_form.publication_method.now',
) ?></span> ) ?></span>
</label> </label>
<div class="inline-flex flex-wrap items-center radio-toggler"> <div class="inline-flex flex-wrap items-center radio-toggler">
<?= form_radio( <?= form_radio(
@ -124,17 +130,17 @@
old('publication_method') old('publication_method')
? old('publication_method') === 'schedule' ? old('publication_method') === 'schedule'
: true, : true,
) ?> ) ?>
<label for="schedule" class="ml-2"><?= lang( <label for="schedule" class="ml-2"><?= lang(
'Episode.publish_form.publication_method.schedule', 'Episode.publish_form.publication_method.schedule',
) ?></label> ) ?></label>
<div class="w-full mt-2 radio-toggler-element"> <div class="w-full mt-2 radio-toggler-element">
<?= form_label( <?= form_label(
lang('Episode.publish_form.scheduled_publication_date'), lang('Episode.publish_form.scheduled_publication_date'),
'scheduled_publication_date', 'scheduled_publication_date',
[], [],
lang('Episode.publish_form.scheduled_publication_date_hint'), lang('Episode.publish_form.scheduled_publication_date_hint'),
) ?> ) ?>
<div class="flex" data-picker="datetime"> <div class="flex" data-picker="datetime">
<?= form_input([ <?= form_input([
'id' => 'scheduled_publication_date', 'id' => 'scheduled_publication_date',
@ -172,17 +178,21 @@
<?= anchor( <?= anchor(
route_to('episode-publish-cancel', $podcast->id, $episode->id), route_to('episode-publish-cancel', $podcast->id, $episode->id),
lang('Episode.publish_form.cancel_publication'), lang('Episode.publish_form.cancel_publication'),
['class' => 'py-2 px-3 rounded-full bg-red-100 text-red-900 font-semibold mr-4'], [
'class' => 'py-2 px-3 rounded-full bg-red-100 text-red-900 font-semibold mr-4',
],
) ?> ) ?>
<?= button( <?= button(
lang('Episode.publish_form.submit_edit'), lang('Episode.publish_form.submit_edit'),
'', '',
['variant' => 'primary'], [
'variant' => 'primary',
],
[ [
'type' => 'submit', 'type' => 'submit',
'data-btn-text-warning' => lang('Episode.publish_form.message_warning_submit'), 'data-btn-text-warning' => lang('Episode.publish_form.message_warning_submit'),
'data-btn-text' => lang('Episode.publish_form.submit_edit') 'data-btn-text' => lang('Episode.publish_form.submit_edit'),
], ],
) ?> ) ?>
</div> </div>

View File

@ -13,7 +13,10 @@
<?= form_open_multipart( <?= form_open_multipart(
route_to('episode-soundbites-edit', $podcast->id, $episode->id), route_to('episode-soundbites-edit', $podcast->id, $episode->id),
['method' => 'post', 'class' => 'flex flex-col'], [
'method' => 'post',
'class' => 'flex flex-col',
],
) ?> ) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
@ -31,20 +34,20 @@
'start_time', 'start_time',
[], [],
lang('Episode.soundbites_form.start_time_hint'), lang('Episode.soundbites_form.start_time_hint'),
) ?></th> ) ?></th>
<th class="w-3/12 px-1 py-2"><?= form_label( <th class="w-3/12 px-1 py-2"><?= form_label(
lang('Episode.soundbites_form.duration'), lang('Episode.soundbites_form.duration'),
'duration', 'duration',
[], [],
lang('Episode.soundbites_form.duration_hint'), lang('Episode.soundbites_form.duration_hint'),
) ?></th> ) ?></th>
<th class="w-7/12 px-1 py-2"><?= form_label( <th class="w-7/12 px-1 py-2"><?= form_label(
lang('Episode.soundbites_form.label'), lang('Episode.soundbites_form.label'),
'label', 'label',
[], [],
lang('Episode.soundbites_form.label_hint'), lang('Episode.soundbites_form.label_hint'),
true, true,
) ?></th> ) ?></th>
<th class="w-1/12 px-1 py-2"></th> <th class="w-1/12 px-1 py-2"></th>
</tr> </tr>
</thead> </thead>
@ -66,7 +69,7 @@
'data-soundbite-id' => $soundbite->id, 'data-soundbite-id' => $soundbite->id,
'required' => 'required', 'required' => 'required',
], ],
) ?></td> ) ?></td>
<td class="px-1 py-2 font-medium bg-white border border-light-blue-500"><?= form_input( <td class="px-1 py-2 font-medium bg-white border border-light-blue-500"><?= form_input(
[ [
'type' => 'number', 'type' => 'number',
@ -82,7 +85,7 @@
'data-soundbite-id' => $soundbite->id, 'data-soundbite-id' => $soundbite->id,
'required' => 'required', 'required' => 'required',
], ],
) ?></td> ) ?></td>
<td class="px-1 py-2 font-medium bg-white border border-light-blue-500"><?= form_input( <td class="px-1 py-2 font-medium bg-white border border-light-blue-500"><?= form_input(
[ [
'id' => "soundbites[{$soundbite->id}][label]", 'id' => "soundbites[{$soundbite->id}][label]",
@ -90,12 +93,14 @@
'class' => 'form-input w-full border-none', 'class' => 'form-input w-full border-none',
'value' => $soundbite->label, 'value' => $soundbite->label,
], ],
) ?></td> ) ?></td>
<td class="px-4 py-2"><?= icon_button( <td class="px-4 py-2"><?= icon_button(
'play', 'play',
lang('Episode.soundbites_form.play'), lang('Episode.soundbites_form.play'),
'', '',
['variant' => 'primary'], [
'variant' => 'primary',
],
[ [
'class' => 'mb-1 mr-1', 'class' => 'mb-1 mr-1',
'data-type' => 'play-soundbite', 'data-type' => 'play-soundbite',
@ -103,7 +108,7 @@
'data-soundbite-start-time' => $soundbite->start_time, 'data-soundbite-start-time' => $soundbite->start_time,
'data-soundbite-duration' => $soundbite->duration, 'data-soundbite-duration' => $soundbite->duration,
], ],
) ?> ) ?>
<?= icon_button( <?= icon_button(
'delete-bin', 'delete-bin',
lang('Episode.soundbites_form.delete'), lang('Episode.soundbites_form.delete'),
@ -113,9 +118,11 @@
$episode->id, $episode->id,
$soundbite->id, $soundbite->id,
), ),
['variant' => 'danger'], [
'variant' => 'danger',
],
[], [],
) ?> ) ?>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
@ -134,7 +141,7 @@
'data-type' => 'soundbite-field', 'data-type' => 'soundbite-field',
'data-field-type' => 'start-time', 'data-field-type' => 'start-time',
], ],
) ?></td> ) ?></td>
<td class="px-1 py-4 font-medium bg-white border border-light-blue-500"><?= form_input( <td class="px-1 py-4 font-medium bg-white border border-light-blue-500"><?= form_input(
[ [
'type' => 'number', 'type' => 'number',
@ -149,7 +156,7 @@
'data-type' => 'soundbite-field', 'data-type' => 'soundbite-field',
'data-field-type' => 'duration', 'data-field-type' => 'duration',
], ],
) ?></td> ) ?></td>
<td class="px-1 py-4 font-medium bg-white border border-light-blue-500"><?= form_input( <td class="px-1 py-4 font-medium bg-white border border-light-blue-500"><?= form_input(
[ [
'id' => 'soundbites[0][label]', 'id' => 'soundbites[0][label]',
@ -157,19 +164,21 @@
'class' => 'form-input w-full border-none', 'class' => 'form-input w-full border-none',
'value' => old('label'), 'value' => old('label'),
], ],
) ?></td> ) ?></td>
<td class="px-4 py-2"><?= icon_button( <td class="px-4 py-2"><?= icon_button(
'play', 'play',
lang('Episode.soundbites_form.play'), lang('Episode.soundbites_form.play'),
'', '',
['variant' => 'primary'], [
'variant' => 'primary',
],
[ [
'data-type' => 'play-soundbite', 'data-type' => 'play-soundbite',
'data-soundbite-id' => 0, 'data-soundbite-id' => 0,
'data-soundbite-start-time' => 0, 'data-soundbite-start-time' => 0,
'data-soundbite-duration' => 0, 'data-soundbite-duration' => 0,
], ],
) ?> ) ?>
</td> </td>
@ -183,13 +192,15 @@
'timer', 'timer',
lang('Episode.soundbites_form.bookmark'), lang('Episode.soundbites_form.bookmark'),
'', '',
['variant' => 'info'], [
'variant' => 'info',
],
[ [
'data-type' => 'get-soundbite', 'data-type' => 'get-soundbite',
'data-start-time-field-name' => 'soundbites[0][start_time]', 'data-start-time-field-name' => 'soundbites[0][start_time]',
'data-duration-field-name' => 'soundbites[0][duration]', 'data-duration-field-name' => 'soundbites[0][duration]',
], ],
) ?></td></tr> ) ?></td></tr>
</tbody> </tbody>
</table> </table>
@ -199,8 +210,13 @@
<?= button( <?= button(
lang('Episode.soundbites_form.submit_edit'), lang('Episode.soundbites_form.submit_edit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -29,7 +29,7 @@
], ],
'yes', 'yes',
old('understand', false), old('understand', false),
) ?> ) ?>
<span class="ml-2"><?= lang('Episode.unpublish_form.understand') ?></span> <span class="ml-2"><?= lang('Episode.unpublish_form.understand') ?></span>
</label> </label>
@ -42,8 +42,12 @@
<?= button( <?= button(
lang('Episode.unpublish_form.submit'), lang('Episode.unpublish_form.submit'),
'', '',
['variant' => 'danger'], [
['type' => 'submit'], 'variant' => 'danger',
],
[
'type' => 'submit',
],
) ?> ) ?>
</div> </div>

View File

@ -38,7 +38,7 @@
'PodcastByEpisode', 'PodcastByEpisode',
'ByDay', 'ByDay',
$episode->id, $episode->id,
) ?>"/> ) ?>"/>
<Charts.XY title="<?= lang('Charts.episode_by_month') ?>" dataUrl="<?= route_to( <Charts.XY title="<?= lang('Charts.episode_by_month') ?>" dataUrl="<?= route_to(
'analytics-filtered-data', 'analytics-filtered-data',
@ -46,9 +46,10 @@
'PodcastByEpisode', 'PodcastByEpisode',
'ByMonth', 'ByMonth',
$episode->id, $episode->id,
) ?>"/> ) ?>"/>
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -35,8 +35,13 @@
<?= button( <?= button(
lang('Fediverse.block_lists_form.submit'), lang('Fediverse.block_lists_form.submit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>
@ -66,7 +71,10 @@
'fediverse-unblock-actor', 'fediverse-unblock-actor',
$blockedActor->username, $blockedActor->username,
), ),
['variant' => 'info', 'size' => 'small'], [
'variant' => 'info',
'size' => 'small',
],
[ [
'class' => 'mr-2', 'class' => 'mr-2',
'type' => 'submit', 'type' => 'submit',

View File

@ -34,8 +34,13 @@
<?= button( <?= button(
lang('Fediverse.block_lists_form.submit'), lang('Fediverse.block_lists_form.submit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>
@ -64,7 +69,10 @@
'fediverse-unblock-domain', 'fediverse-unblock-domain',
$blockedDomain->name, $blockedDomain->name,
), ),
['variant' => 'info', 'size' => 'small'], [
'variant' => 'info',
'size' => 'small',
],
[ [
'class' => 'mr-2', 'class' => 'mr-2',
'type' => 'submit', 'type' => 'submit',

View File

@ -39,8 +39,13 @@
<?= button( <?= button(
lang('User.form.submit_password_change'), lang('User.form.submit_password_change'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -11,6 +11,8 @@
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= view('_partials/_user_info.php', ['user' => user()]) ?> <?= view('_partials/_user_info.php', [
'user' => user(),
]) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -16,7 +16,9 @@
]) ?> ]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_label(lang('Page.form.title'), 'title', ['class' => 'max-w-sm']) ?> <?= form_label(lang('Page.form.title'), 'title', [
'class' => 'max-w-sm',
]) ?>
<?= form_input([ <?= form_input([
'id' => 'title', 'id' => 'title',
'name' => 'title', 'name' => 'title',
@ -32,7 +34,7 @@
[], [],
) ?> ) ?>
<permalink-edit class="inline-flex items-center w-full max-w-sm mb-4 text-xs" edit-label="<?= lang('Common.edit') ?>" copy-label="<?= lang('Common.copy') ?>" copied-label="<?= lang('Common.copied') ?>"> <permalink-edit class="inline-flex items-center w-full max-w-sm mb-4 text-xs" edit-label="<?= lang('Common.edit') ?>" copy-label="<?= lang('Common.copy') ?>" copied-label="<?= lang('Common.copied') ?>">
<span slot="domain" class="flex-shrink-0"><?= base_url('pages' ) . '/' ?></span> <span slot="domain" class="flex-shrink-0"><?= base_url('pages') . '/' ?></span>
<?= form_input([ <?= form_input([
'id' => 'slug', 'id' => 'slug',
'name' => 'slug', 'name' => 'slug',
@ -53,8 +55,13 @@
<?= button( <?= button(
lang('Page.form.submit_create'), lang('Page.form.submit_create'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -16,7 +16,9 @@
]) ?> ]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_label(lang('Page.form.title'), 'title', ['class' => 'max-w-sm']) ?> <?= form_label(lang('Page.form.title'), 'title', [
'class' => 'max-w-sm',
]) ?>
<?= form_input([ <?= form_input([
'id' => 'title', 'id' => 'title',
'name' => 'title', 'name' => 'title',
@ -52,8 +54,13 @@
<?= button( <?= button(
lang('Page.form.submit_edit'), lang('Page.form.submit_edit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -40,18 +40,28 @@
'variant' => 'secondary', 'variant' => 'secondary',
'size' => 'small', 'size' => 'small',
], ],
['class' => 'mr-2'], [
'class' => 'mr-2',
],
) . ) .
button( button(
lang('Page.edit'), lang('Page.edit'),
route_to('page-edit', $page->id), route_to('page-edit', $page->id),
['variant' => 'info', 'size' => 'small'], [
['class' => 'mr-2'], 'variant' => 'info',
'size' => 'small',
],
[
'class' => 'mr-2',
],
) . ) .
button( button(
lang('Page.delete'), lang('Page.delete'),
route_to('page-delete', $page->id), route_to('page-delete', $page->id),
['variant' => 'danger', 'size' => 'small'], [
'variant' => 'danger',
'size' => 'small',
],
); );
}, },
], ],

View File

@ -83,8 +83,13 @@
<?= button( <?= button(
lang('Person.form.submit_create'), lang('Person.form.submit_create'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>

View File

@ -84,8 +84,13 @@
<?= button( <?= button(
lang('Person.form.submit_edit'), lang('Person.form.submit_edit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>

View File

@ -12,8 +12,13 @@
<?= button( <?= button(
lang('Person.create'), lang('Person.create'),
route_to('person-create'), route_to('person-create'),
['variant' => 'primary', 'iconLeft' => 'add'], [
['class' => 'mr-2'], 'variant' => 'primary',
'iconLeft' => 'add',
],
[
'class' => 'mr-2',
],
) ?> ) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
@ -41,19 +46,19 @@
$person->id, $person->id,
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang( ) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'Person.edit', 'Person.edit',
) ?>"><?= icon('edit') ?></a> ) ?>"><?= icon('edit') ?></a>
<a class="inline-flex p-2 mr-2 text-gray-700 bg-red-100 rounded-full shadow-xs hover:bg-gray-200" href="<?= route_to( <a class="inline-flex p-2 mr-2 text-gray-700 bg-red-100 rounded-full shadow-xs hover:bg-gray-200" href="<?= route_to(
'person-delete', 'person-delete',
$person->id, $person->id,
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang( ) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'Person.delete', 'Person.delete',
) ?>"><?= icon('delete-bin') ?></a> ) ?>"><?= icon('delete-bin') ?></a>
<a class="inline-flex p-2 text-gray-700 bg-gray-100 rounded-full shadow-xs hover:bg-gray-200" href="<?= route_to( <a class="inline-flex p-2 text-gray-700 bg-gray-100 rounded-full shadow-xs hover:bg-gray-200" href="<?= route_to(
'person-view', 'person-view',
$person->id, $person->id,
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang( ) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'Person.view', 'Person.view',
) ?>"><?= icon('eye') ?></a> ) ?>"><?= icon('eye') ?></a>
</footer> </footer>
</article> </article>
<?php endforeach; ?> <?php endforeach; ?>

View File

@ -13,8 +13,13 @@
<?= button( <?= button(
lang('Person.edit'), lang('Person.edit'),
route_to('person-edit', $person->id), route_to('person-edit', $person->id),
['variant' => 'secondary', 'iconLeft' => 'edit'], [
['class' => 'mr-2'], 'variant' => 'secondary',
'iconLeft' => 'edit',
],
[
'class' => 'mr-2',
],
) ?> ) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,4 +1,5 @@
<?php <?php declare(strict_types=1);
$podcastNavigation = [ $podcastNavigation = [
'dashboard' => [ 'dashboard' => [
'icon' => 'dashboard', 'icon' => 'dashboard',
@ -45,10 +46,10 @@ $podcastNavigation = [
<a href="<?= route_to( <a href="<?= route_to(
'podcast-activity', 'podcast-activity',
$podcast->handle, $podcast->handle,
) ?>" class="inline-flex items-center text-sm outline-none hover:underline focus:ring" ) ?>" class="inline-flex items-center text-sm outline-none hover:underline focus:ring"
data-toggle="tooltip" data-placement="bottom" title="<?= lang( data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'PodcastNavigation.go_to_page', 'PodcastNavigation.go_to_page',
) ?>">@<?= $podcast->handle ?> ) ?>">@<?= $podcast->handle ?>
<?= icon('external-link', 'ml-1 opacity-60') ?> <?= icon('external-link', 'ml-1 opacity-60') ?>
</a> </a>
</div> </div>
@ -69,7 +70,7 @@ $podcastNavigation = [
: 'opacity-75' ?>" href="<?= route_to( : 'opacity-75' ?>" href="<?= route_to(
$item, $item,
$podcast->id, $podcast->id,
) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') .lang('PodcastNavigation.' . $item) ?></a> ) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang('PodcastNavigation.' . $item) ?></a>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>

View File

@ -16,22 +16,23 @@
$podcast->id, $podcast->id,
'Podcast', 'Podcast',
'ByDay', 'ByDay',
) ?>"/> ) ?>"/>
<Charts.XY class="col-span-1" title="<?= lang('Charts.podcast_by_month') ?>" dataUrl="<?= route_to( <Charts.XY class="col-span-1" title="<?= lang('Charts.podcast_by_month') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'Podcast', 'Podcast',
'ByMonth', 'ByMonth',
) ?>"/> ) ?>"/>
<Charts.XY class="col-span-1" title="<?= lang('Charts.podcast_by_bandwidth') ?>" dataUrl="<?= route_to( <Charts.XY class="col-span-1" title="<?= lang('Charts.podcast_by_bandwidth') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'Podcast', 'Podcast',
'BandwidthByDay', 'BandwidthByDay',
) ?>"/> ) ?>"/>
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -16,15 +16,16 @@
$podcast->id, $podcast->id,
'Podcast', 'Podcast',
'TotalListeningTimeByDay', 'TotalListeningTimeByDay',
) ?>"/> ) ?>"/>
<Charts.XY class="col-span-1" title="<?= lang('Charts.monthly_listening_time') ?>" dataUrl="<?= route_to( <Charts.XY class="col-span-1" title="<?= lang('Charts.monthly_listening_time') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'Podcast', 'Podcast',
'TotalListeningTimeByMonth', 'TotalListeningTimeByMonth',
) ?>"/> ) ?>"/>
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -16,20 +16,21 @@
$podcast->id, $podcast->id,
'PodcastByCountry', 'PodcastByCountry',
'Weekly', 'Weekly',
) ?>" /> ) ?>" />
<Charts.Pie title="<?= lang('Charts.by_country_yearly') ?>" dataUrl="<?= route_to( <Charts.Pie title="<?= lang('Charts.by_country_yearly') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'PodcastByCountry', 'PodcastByCountry',
'Yearly', 'Yearly',
) ?>" /> ) ?>" />
<Charts.Map class="col-span-2" title="<?= lang('Charts.podcast_by_region') ?>" dataUrl="<?= route_to( <Charts.Map class="col-span-2" title="<?= lang('Charts.podcast_by_region') ?>" dataUrl="<?= route_to(
'analytics-full-data', 'analytics-full-data',
$podcast->id, $podcast->id,
'PodcastByRegion', 'PodcastByRegion',
) ?>" /> ) ?>" />
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -16,32 +16,33 @@
$podcast->id, $podcast->id,
'PodcastByPlayer', 'PodcastByPlayer',
'ByAppWeekly', 'ByAppWeekly',
) ?>" /> ) ?>" />
<Charts.Pie title="<?= lang('Charts.by_service_weekly') ?>" dataUrl="<?= route_to( <Charts.Pie title="<?= lang('Charts.by_service_weekly') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'PodcastByService', 'PodcastByService',
'ByServiceWeekly', 'ByServiceWeekly',
) ?>" /> ) ?>" />
<Charts.Pie title="<?= lang('Charts.by_device_weekly') ?>" dataUrl="<?= route_to( <Charts.Pie title="<?= lang('Charts.by_device_weekly') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'PodcastByPlayer', 'PodcastByPlayer',
'ByDeviceWeekly', 'ByDeviceWeekly',
) ?>" /> ) ?>" />
<Charts.Pie title="<?= lang('Charts.by_os_weekly') ?>" dataUrl="<?= route_to( <Charts.Pie title="<?= lang('Charts.by_os_weekly') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'PodcastByPlayer', 'PodcastByPlayer',
'ByOsWeekly', 'ByOsWeekly',
) ?>" /> ) ?>" />
<Charts.XY class="col-span-2" title="<?= lang('Charts.podcast_bots') ?>" dataUrl="<?= route_to( <Charts.XY class="col-span-2" title="<?= lang('Charts.podcast_bots') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'PodcastByPlayer', 'PodcastByPlayer',
'Bots', 'Bots',
) ?>" /> ) ?>" />
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -16,13 +16,14 @@
$podcast->id, $podcast->id,
'Podcast', 'Podcast',
'ByWeekday', 'ByWeekday',
) ?>" /> ) ?>" />
<Charts.Bar title="<?= lang('Charts.by_hour') ?>" dataUrl="<?= route_to( <Charts.Bar title="<?= lang('Charts.by_hour') ?>" dataUrl="<?= route_to(
'analytics-full-data', 'analytics-full-data',
$podcast->id, $podcast->id,
'PodcastByHour', 'PodcastByHour',
) ?>" /> ) ?>" />
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -16,15 +16,16 @@
$podcast->id, $podcast->id,
'Podcast', 'Podcast',
'UniqueListenersByDay', 'UniqueListenersByDay',
) ?>"/> ) ?>"/>
<Charts.XY class="col-span-1" title="<?= lang('Charts.unique_monthly_listeners') ?>" dataUrl="<?= route_to( <Charts.XY class="col-span-1" title="<?= lang('Charts.unique_monthly_listeners') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'Podcast', 'Podcast',
'UniqueListenersByMonth', 'UniqueListenersByMonth',
) ?>"/> ) ?>"/>
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -16,26 +16,27 @@
$podcast->id, $podcast->id,
'WebsiteByReferer', 'WebsiteByReferer',
'ByDomainWeekly', 'ByDomainWeekly',
) ?>" /> ) ?>" />
<Charts.Pie title="<?= lang('Charts.by_domain_yearly') ?>" dataUrl="<?= route_to( <Charts.Pie title="<?= lang('Charts.by_domain_yearly') ?>" dataUrl="<?= route_to(
'analytics-data', 'analytics-data',
$podcast->id, $podcast->id,
'WebsiteByReferer', 'WebsiteByReferer',
'ByDomainYearly', 'ByDomainYearly',
) ?>" /> ) ?>" />
<Charts.Pie title="<?= lang('Charts.by_entry_page') ?>" dataUrl="<?= route_to( <Charts.Pie title="<?= lang('Charts.by_entry_page') ?>" dataUrl="<?= route_to(
'analytics-full-data', 'analytics-full-data',
$podcast->id, $podcast->id,
'WebsiteByEntryPage', 'WebsiteByEntryPage',
) ?>" /> ) ?>" />
<Charts.Pie title="<?= lang('Charts.by_browser') ?>" dataUrl="<?= route_to( <Charts.Pie title="<?= lang('Charts.by_browser') ?>" dataUrl="<?= route_to(
'analytics-full-data', 'analytics-full-data',
$podcast->id, $podcast->id,
'WebsiteByBrowser', 'WebsiteByBrowser',
) ?>" /> ) ?>" />
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,4 +1,5 @@
<?php <?php declare(strict_types=1);
?> ?>
<?= $this->extend('_layout') ?> <?= $this->extend('_layout') ?>
@ -64,21 +65,31 @@
]) ?> ]) ?>
</div> </div>
<?= form_fieldset('', ['class' => 'mb-4']) ?> <?= form_fieldset('', [
'class' => 'mb-4',
]) ?>
<legend> <legend>
<?= lang('Podcast.form.type.label') . <?= lang('Podcast.form.type.label') .
hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?> hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?>
</legend> </legend>
<?= form_radio( <?= form_radio(
['id' => 'episodic', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'episodic',
'name' => 'type',
'class' => 'form-radio-btn',
],
'episodic', 'episodic',
old('type') ? old('type') == 'episodic' : true, old('type') ? old('type') === 'episodic' : true,
) ?> ) ?>
<label for="episodic"><?= lang('Podcast.form.type.episodic') ?></label> <label for="episodic"><?= lang('Podcast.form.type.episodic') ?></label>
<?= form_radio( <?= form_radio(
['id' => 'serial', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'serial',
'name' => 'type',
'class' => 'form-radio-btn',
],
'serial', 'serial',
old('type') && old('type') == 'serial', old('type') && old('type') === 'serial',
) ?> ) ?>
<label for="serial"><?= lang('Podcast.form.type.serial') ?></label> <label for="serial"><?= lang('Podcast.form.type.serial') ?></label>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
@ -94,7 +105,7 @@
<?= form_section( <?= form_section(
lang('Podcast.form.classification_section_title'), lang('Podcast.form.classification_section_title'),
lang('Podcast.form.classification_section_subtitle'), lang('Podcast.form.classification_section_subtitle'),
) ?> ) ?>
<?= form_label(lang('Podcast.form.language'), 'language') ?> <?= form_label(lang('Podcast.form.language'), 'language') ?>
<?= form_dropdown('language', $languageOptions, [old('language', $browserLang)], [ <?= form_dropdown('language', $languageOptions, [old('language', $browserLang)], [
@ -108,7 +119,7 @@
'id' => 'category', 'id' => 'category',
'class' => 'form-select mb-4', 'class' => 'form-select mb-4',
'required' => 'required', 'required' => 'required',
'placeholder' => lang('Podcast.form.category_placeholder') 'placeholder' => lang('Podcast.form.category_placeholder'),
]) ?> ]) ?>
<?= form_label( <?= form_label(
@ -126,7 +137,9 @@
selected="<?= htmlspecialchars(json_encode(old('other_categories', []))) ?>" selected="<?= htmlspecialchars(json_encode(old('other_categories', []))) ?>"
options="<?= htmlspecialchars(json_encode($categoryOptions)) ?>" /> options="<?= htmlspecialchars(json_encode($categoryOptions)) ?>" />
<?= form_fieldset('', ['class' => 'mb-4']) ?> <?= form_fieldset('', [
'class' => 'mb-4',
]) ?>
<legend> <legend>
<?= lang('Podcast.form.parental_advisory.label') . <?= lang('Podcast.form.parental_advisory.label') .
hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?> hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?>
@ -177,28 +190,28 @@
<?= form_section( <?= form_section(
lang('Podcast.form.author_section_title'), lang('Podcast.form.author_section_title'),
lang('Podcast.form.author_section_subtitle'), lang('Podcast.form.author_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Podcast.form.owner_name'), lang('Podcast.form.owner_name'),
'owner_name', 'owner_name',
[], [],
lang('Podcast.form.owner_name_hint'), lang('Podcast.form.owner_name_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'owner_name', 'id' => 'owner_name',
'name' => 'owner_name', 'name' => 'owner_name',
'class' => 'form-input mb-4', 'class' => 'form-input mb-4',
'value' => old('owner_name'), 'value' => old('owner_name'),
'required' => 'required', 'required' => 'required',
]) ?> ]) ?>
<?= form_label( <?= form_label(
lang('Podcast.form.owner_email'), lang('Podcast.form.owner_email'),
'owner_email', 'owner_email',
[], [],
lang('Podcast.form.owner_email_hint'), lang('Podcast.form.owner_email_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'owner_email', 'id' => 'owner_email',
'name' => 'owner_email', 'name' => 'owner_email',
@ -206,7 +219,7 @@
'value' => old('owner_email'), 'value' => old('owner_email'),
'type' => 'email', 'type' => 'email',
'required' => 'required', 'required' => 'required',
]) ?> ]) ?>
<?= form_label( <?= form_label(
lang('Podcast.form.publisher'), lang('Podcast.form.publisher'),
@ -214,13 +227,13 @@
[], [],
lang('Podcast.form.publisher_hint'), lang('Podcast.form.publisher_hint'),
true, true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'publisher', 'id' => 'publisher',
'name' => 'publisher', 'name' => 'publisher',
'class' => 'form-input mb-4', 'class' => 'form-input mb-4',
'value' => old('publisher'), 'value' => old('publisher'),
]) ?> ]) ?>
<?= form_label(lang('Podcast.form.copyright'), 'copyright', [], '', true) ?> <?= form_label(lang('Podcast.form.copyright'), 'copyright', [], '', true) ?>
<?= form_input([ <?= form_input([
@ -277,10 +290,12 @@
<?= form_label( <?= form_label(
lang('Podcast.form.partner_id'), lang('Podcast.form.partner_id'),
'partner_id', 'partner_id',
['class' => 'text-sm'], [
'class' => 'text-sm',
],
lang('Podcast.form.partner_id_hint'), lang('Podcast.form.partner_id_hint'),
true, true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'partner_id', 'id' => 'partner_id',
'name' => 'partner_id', 'name' => 'partner_id',
@ -292,7 +307,9 @@
<?= form_label( <?= form_label(
lang('Podcast.form.partner_link_url'), lang('Podcast.form.partner_link_url'),
'partner_link_url', 'partner_link_url',
['class' => 'text-sm'], [
'class' => 'text-sm',
],
lang('Podcast.form.partner_link_url_hint'), lang('Podcast.form.partner_link_url_hint'),
true, true,
) ?> ) ?>
@ -307,7 +324,9 @@
<?= form_label( <?= form_label(
lang('Podcast.form.partner_image_url'), lang('Podcast.form.partner_image_url'),
'partner_image_url', 'partner_image_url',
['class' => 'text-sm'], [
'class' => 'text-sm',
],
lang('Podcast.form.partner_image_url_hint'), lang('Podcast.form.partner_image_url_hint'),
true, true,
) ?> ) ?>
@ -325,14 +344,14 @@
<?= form_section( <?= form_section(
lang('Podcast.form.advanced_section_title'), lang('Podcast.form.advanced_section_title'),
lang('Podcast.form.advanced_section_subtitle'), lang('Podcast.form.advanced_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Podcast.form.custom_rss'), lang('Podcast.form.custom_rss'),
'custom_rss', 'custom_rss',
[], [],
lang('Podcast.form.custom_rss_hint'), lang('Podcast.form.custom_rss_hint'),
true, true,
) ?> ) ?>
<Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', '', false) ?></Forms.XMLEditor> <Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', '', false) ?></Forms.XMLEditor>
<?= form_section_close() ?> <?= form_section_close() ?>
@ -340,7 +359,7 @@
<?= form_section( <?= form_section(
lang('Podcast.form.status_section_title'), lang('Podcast.form.status_section_title'),
lang('Podcast.form.status_section_subtitle'), lang('Podcast.form.status_section_subtitle'),
) ?> ) ?>
<Forms.Toggler class="mb-2" id="lock" name="lock" value="yes" checked="<?= old('complete', true) ?>" hint="<?= lang('Podcast.form.lock_hint') ?>"> <Forms.Toggler class="mb-2" id="lock" name="lock" value="yes" checked="<?= old('complete', true) ?>" hint="<?= lang('Podcast.form.lock_hint') ?>">
<?= lang('Podcast.form.lock') ?> <?= lang('Podcast.form.lock') ?>
@ -357,9 +376,14 @@
<?= button( <?= button(
lang('Podcast.form.submit_create'), lang('Podcast.form.submit_create'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
) ?> ],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -1,4 +1,5 @@
<?php <?php declare(strict_types=1);
?> ?>
<?= $this->extend('_layout') ?> <?= $this->extend('_layout') ?>
@ -39,7 +40,7 @@
<small class="mb-4 text-gray-600"><?= lang( <small class="mb-4 text-gray-600"><?= lang(
'Common.forms.image_size_hint', 'Common.forms.image_size_hint',
) ?></small> ) ?></small>
<?= form_label(lang('Podcast.form.title'), 'title') ?> <?= form_label(lang('Podcast.form.title'), 'title') ?>
@ -53,22 +54,32 @@
<span class="mb-4 text-sm"><?= $podcast->link ?></span> <span class="mb-4 text-sm"><?= $podcast->link ?></span>
<?= form_fieldset('', ['class' => 'mb-4']) ?> <?= form_fieldset('', [
'class' => 'mb-4',
]) ?>
<legend><?= lang('Podcast.form.type.label') . <legend><?= lang('Podcast.form.type.label') .
hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?> hint_tooltip(lang('Podcast.form.type.hint'), 'ml-1') ?>
</legend> </legend>
<?= form_radio( <?= form_radio(
['id' => 'episodic', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'episodic',
'name' => 'type',
'class' => 'form-radio-btn',
],
'episodic', 'episodic',
old('type') ? old('type') == 'episodic' : $podcast->type == 'episodic', old('type') ? old('type') === 'episodic' : $podcast->type === 'episodic',
) ?> ) ?>
<label for="episodic"><?= lang('Podcast.form.type.episodic') ?></label> <label for="episodic"><?= lang('Podcast.form.type.episodic') ?></label>
<?= form_radio( <?= form_radio(
['id' => 'serial', 'name' => 'type', 'class' => 'form-radio-btn'], [
'id' => 'serial',
'name' => 'type',
'class' => 'form-radio-btn',
],
'serial', 'serial',
old('type') ? old('type') == 'serial' : $podcast->type == 'serial', old('type') ? old('type') === 'serial' : $podcast->type === 'serial',
) ?> ) ?>
<label for="serial"><?= lang('Podcast.form.type.serial') ?></label> <label for="serial"><?= lang('Podcast.form.type.serial') ?></label>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
@ -80,9 +91,9 @@
<?= form_section_close() ?> <?= form_section_close() ?>
<?= form_section( <?= form_section(
lang('Podcast.form.classification_section_title'), lang('Podcast.form.classification_section_title'),
lang('Podcast.form.classification_section_subtitle'), lang('Podcast.form.classification_section_subtitle'),
) ?> ) ?>
<?= form_label(lang('Podcast.form.language'), 'language') ?> <?= form_label(lang('Podcast.form.language'), 'language') ?>
@ -95,7 +106,7 @@ lang('Podcast.form.classification_section_subtitle'),
'class' => 'form-select mb-4', 'class' => 'form-select mb-4',
'required' => 'required', 'required' => 'required',
], ],
) ?> ) ?>
<?= form_label(lang('Podcast.form.category'), 'category') ?> <?= form_label(lang('Podcast.form.category'), 'category') ?>
<?= form_dropdown( <?= form_dropdown(
@ -107,7 +118,7 @@ lang('Podcast.form.classification_section_subtitle'),
'class' => 'form-select mb-4', 'class' => 'form-select mb-4',
'required' => 'required', 'required' => 'required',
], ],
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Podcast.form.other_categories'), lang('Podcast.form.other_categories'),
@ -115,7 +126,7 @@ lang('Podcast.form.classification_section_subtitle'),
[], [],
'', '',
true, true,
) ?> ) ?>
<Forms.MultiSelect <Forms.MultiSelect
id="other_categories" id="other_categories"
@ -125,7 +136,9 @@ lang('Podcast.form.classification_section_subtitle'),
selected="<?= json_encode(old('other_categories', $podcast->other_categories_ids)) ?>" selected="<?= json_encode(old('other_categories', $podcast->other_categories_ids)) ?>"
options="<?= htmlspecialchars(json_encode($categoryOptions)) ?>" /> options="<?= htmlspecialchars(json_encode($categoryOptions)) ?>" />
<?= form_fieldset('', ['class' => 'mb-4']) ?> <?= form_fieldset('', [
'class' => 'mb-4',
]) ?>
<legend><?= lang('Podcast.form.parental_advisory.label') . <legend><?= lang('Podcast.form.parental_advisory.label') .
hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?></legend> hint_tooltip(lang('Podcast.form.parental_advisory.hint'), 'ml-1') ?></legend>
<?= form_radio( <?= form_radio(
@ -133,12 +146,12 @@ lang('Podcast.form.classification_section_subtitle'),
'id' => 'undefined', 'id' => 'undefined',
'name' => 'parental_advisory', 'name' => 'parental_advisory',
'class' => 'form-radio-btn', 'class' => 'form-radio-btn',
], ],
'undefined', 'undefined',
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'undefined' ? old('parental_advisory') === 'undefined'
: $podcast->parental_advisory === null, : $podcast->parental_advisory === null,
) ?> ) ?>
<label for="undefined"><?= lang( <label for="undefined"><?= lang(
'Podcast.form.parental_advisory.undefined', 'Podcast.form.parental_advisory.undefined',
@ -148,12 +161,12 @@ lang('Podcast.form.classification_section_subtitle'),
'id' => 'clean', 'id' => 'clean',
'name' => 'parental_advisory', 'name' => 'parental_advisory',
'class' => 'form-radio-btn', 'class' => 'form-radio-btn',
], ],
'clean', 'clean',
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'clean' ? old('parental_advisory') === 'clean'
: $podcast->parental_advisory === 'clean', : $podcast->parental_advisory === 'clean',
) ?> ) ?>
<label for="clean"><?= lang( <label for="clean"><?= lang(
'Podcast.form.parental_advisory.clean', 'Podcast.form.parental_advisory.clean',
@ -163,12 +176,12 @@ lang('Podcast.form.classification_section_subtitle'),
'id' => 'explicit', 'id' => 'explicit',
'name' => 'parental_advisory', 'name' => 'parental_advisory',
'class' => 'form-radio-btn', 'class' => 'form-radio-btn',
], ],
'explicit', 'explicit',
old('parental_advisory') old('parental_advisory')
? old('parental_advisory') === 'explicit' ? old('parental_advisory') === 'explicit'
: $podcast->parental_advisory === 'explicit', : $podcast->parental_advisory === 'explicit',
) ?> ) ?>
<label for="explicit"><?= lang( <label for="explicit"><?= lang(
'Podcast.form.parental_advisory.explicit', 'Podcast.form.parental_advisory.explicit',
@ -179,14 +192,14 @@ lang('Podcast.form.classification_section_subtitle'),
<?= form_section( <?= form_section(
lang('Podcast.form.author_section_title'), lang('Podcast.form.author_section_title'),
lang('Podcast.form.author_section_subtitle'), lang('Podcast.form.author_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Podcast.form.owner_name'), lang('Podcast.form.owner_name'),
'owner_name', 'owner_name',
[], [],
lang('Podcast.form.owner_name_hint'), lang('Podcast.form.owner_name_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'owner_name', 'id' => 'owner_name',
@ -289,13 +302,13 @@ lang('Podcast.form.classification_section_subtitle'),
[], [],
lang('Podcast.form.partner_id_hint'), lang('Podcast.form.partner_id_hint'),
true, true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'partner_id', 'id' => 'partner_id',
'name' => 'partner_id', 'name' => 'partner_id',
'class' => 'form-input w-full', 'class' => 'form-input w-full',
'value' => old('partner_id', $podcast->partner_id), 'value' => old('partner_id', $podcast->partner_id),
]) ?> ]) ?>
</div> </div>
<div class="flex flex-col flex-1"> <div class="flex flex-col flex-1">
<?= form_label( <?= form_label(
@ -304,13 +317,13 @@ lang('Podcast.form.classification_section_subtitle'),
[], [],
lang('Podcast.form.partner_link_url_hint'), lang('Podcast.form.partner_link_url_hint'),
true, true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'partner_link_url', 'id' => 'partner_link_url',
'name' => 'partner_link_url', 'name' => 'partner_link_url',
'class' => 'form-input w-full', 'class' => 'form-input w-full',
'value' => old('partner_link_url', $podcast->partner_link_url), 'value' => old('partner_link_url', $podcast->partner_link_url),
]) ?> ]) ?>
</div> </div>
<div class="flex flex-col flex-1"> <div class="flex flex-col flex-1">
<?= form_label( <?= form_label(
@ -319,13 +332,13 @@ lang('Podcast.form.classification_section_subtitle'),
[], [],
lang('Podcast.form.partner_image_url_hint'), lang('Podcast.form.partner_image_url_hint'),
true, true,
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'partner_image_url', 'id' => 'partner_image_url',
'name' => 'partner_image_url', 'name' => 'partner_image_url',
'class' => 'form-input w-full', 'class' => 'form-input w-full',
'value' => old('partner_image_url', $podcast->partner_image_url), 'value' => old('partner_image_url', $podcast->partner_image_url),
]) ?> ]) ?>
</div> </div>
</div> </div>
<?= form_section_close() ?> <?= form_section_close() ?>
@ -333,7 +346,7 @@ lang('Podcast.form.classification_section_subtitle'),
<?= form_section( <?= form_section(
lang('Podcast.form.advanced_section_title'), lang('Podcast.form.advanced_section_title'),
lang('Podcast.form.advanced_section_subtitle'), lang('Podcast.form.advanced_section_subtitle'),
) ?> ) ?>
<?= form_label( <?= form_label(
lang('Podcast.form.custom_rss'), lang('Podcast.form.custom_rss'),
@ -341,7 +354,7 @@ lang('Podcast.form.classification_section_subtitle'),
[], [],
lang('Podcast.form.custom_rss_hint'), lang('Podcast.form.custom_rss_hint'),
true, true,
) ?> ) ?>
<Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', $podcast->custom_rss_string, false) ?></Forms.XMLEditor> <Forms.XMLEditor id="custom_rss" name="custom_rss"><?= old('custom_rss', $podcast->custom_rss_string, false) ?></Forms.XMLEditor>
<?= form_section_close() ?> <?= form_section_close() ?>
@ -349,7 +362,7 @@ lang('Podcast.form.classification_section_subtitle'),
<?= form_section( <?= form_section(
lang('Podcast.form.status_section_title'), lang('Podcast.form.status_section_title'),
lang('Podcast.form.status_section_subtitle'), lang('Podcast.form.status_section_subtitle'),
) ?> ) ?>
<Forms.Toggler class="mb-2" id="lock" name="lock" value="yes" checked="<?= old('complete', $podcast->is_locked) ?>" hint="<?= lang('Podcast.form.lock_hint') ?>"> <Forms.Toggler class="mb-2" id="lock" name="lock" value="yes" checked="<?= old('complete', $podcast->is_locked) ?>" hint="<?= lang('Podcast.form.lock_hint') ?>">
<?= lang('Podcast.form.lock') ?> <?= lang('Podcast.form.lock') ?>

View File

@ -27,14 +27,14 @@
lang('PodcastImport.old_podcast_section_subtitle'), lang('PodcastImport.old_podcast_section_subtitle'),
[], [],
'inline-flex text-xs p-2 text-blue-800 font-semibold bg-blue-100 border border-blue-300 rounded', 'inline-flex text-xs p-2 text-blue-800 font-semibold bg-blue-100 border border-blue-300 rounded',
) ?> ) ?>
<?= form_label( <?= form_label(
lang('PodcastImport.imported_feed_url'), lang('PodcastImport.imported_feed_url'),
'imported_feed_url', 'imported_feed_url',
[], [],
lang('PodcastImport.imported_feed_url_hint'), lang('PodcastImport.imported_feed_url_hint'),
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'imported_feed_url', 'id' => 'imported_feed_url',
'name' => 'imported_feed_url', 'name' => 'imported_feed_url',
@ -43,7 +43,7 @@
'placeholder' => 'https://...', 'placeholder' => 'https://...',
'type' => 'url', 'type' => 'url',
'required' => 'required', 'required' => 'required',
]) ?> ]) ?>
<?= form_section_close() ?> <?= form_section_close() ?>
@ -55,7 +55,7 @@
'handle', 'handle',
[], [],
lang('Podcast.form.handle_hint'), lang('Podcast.form.handle_hint'),
) ?> ) ?>
<div class="relative mb-4"> <div class="relative mb-4">
<?= icon('at', 'absolute text-xl h-full inset-0 text-gray-400 left-3') ?> <?= icon('at', 'absolute text-xl h-full inset-0 text-gray-400 left-3') ?>
<?= form_input([ <?= form_input([
@ -79,7 +79,7 @@
'id' => 'category', 'id' => 'category',
'class' => 'form-select mb-4', 'class' => 'form-select mb-4',
'required' => 'required', 'required' => 'required',
'placeholder' => lang('Podcast.form.category_placeholder') 'placeholder' => lang('Podcast.form.category_placeholder'),
]) ?> ]) ?>
<?= form_section_close() ?> <?= form_section_close() ?>
@ -90,9 +90,11 @@
lang('PodcastImport.advanced_params_section_subtitle'), lang('PodcastImport.advanced_params_section_subtitle'),
) ?> ) ?>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?> <?= form_fieldset('', [
'class' => 'flex flex-col mb-4',
]) ?>
<legend><?= lang('PodcastImport.slug_field.label') ?></legend> <legend><?= lang('PodcastImport.slug_field.label') ?></legend>
<label for="title" class="inline-flex items-center"> <label for="link" class="inline-flex items-center">
<?= form_radio( <?= form_radio(
[ [
'id' => 'title', 'id' => 'title',
@ -101,10 +103,10 @@
], ],
'title', 'title',
old('slug_field') ? old('slug_field') === 'title' : true, old('slug_field') ? old('slug_field') === 'title' : true,
) ?> ) ?>
<span class="ml-2"><?= lang('PodcastImport.slug_field.title') ?></span> <span class="ml-2"><?= lang('PodcastImport.slug_field.title') ?></span>
</label> </label>
<label for="link" class="inline-flex items-center"> <label for="title" class="inline-flex items-center">
<?= form_radio( <?= form_radio(
[ [
'id' => 'link', 'id' => 'link',
@ -113,12 +115,14 @@
], ],
'link', 'link',
old('slug_field') && old('slug_field') === 'link', old('slug_field') && old('slug_field') === 'link',
) ?> ) ?>
<span class="ml-2"><?= lang('PodcastImport.slug_field.link') ?></span> <span class="ml-2"><?= lang('PodcastImport.slug_field.link') ?></span>
</label> </label>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
<?= form_fieldset('', ['class' => 'flex flex-col mb-4']) ?> <?= form_fieldset('', [
'class' => 'flex flex-col mb-4',
]) ?>
<legend><?= lang('PodcastImport.description_field') ?></legend> <legend><?= lang('PodcastImport.description_field') ?></legend>
<label for="description" class="inline-flex items-center"> <label for="description" class="inline-flex items-center">
<?= form_radio( <?= form_radio(
@ -129,9 +133,9 @@
], ],
'description', 'description',
old('description_field') old('description_field')
? old('description_field') == 'description' ? old('description_field') === 'description'
: true, : true,
) ?> ) ?>
<span class="ml-2">&lt;description&gt;</span> <span class="ml-2">&lt;description&gt;</span>
</label> </label>
<label for="summary" class="inline-flex items-center"> <label for="summary" class="inline-flex items-center">
@ -142,8 +146,8 @@
'class' => 'form-radio text-pine-600', 'class' => 'form-radio text-pine-600',
], ],
'summary', 'summary',
old('description_field') && old('description_field') == 'summary', old('description_field') && old('description_field') === 'summary',
) ?> ) ?>
<span class="ml-2">&lt;itunes:summary&gt;</span> <span class="ml-2">&lt;itunes:summary&gt;</span>
</label> </label>
<label for="subtitle_summary" class="inline-flex items-center"> <label for="subtitle_summary" class="inline-flex items-center">
@ -155,8 +159,8 @@
], ],
'subtitle_summary', 'subtitle_summary',
old('description_field') && old('description_field') &&
old('description_field') == 'subtitle_summary', old('description_field') === 'subtitle_summary',
) ?> ) ?>
<span class="ml-2">&lt;itunes:subtitle&gt; + &lt;itunes:summary&gt;</span> <span class="ml-2">&lt;itunes:subtitle&gt; + &lt;itunes:summary&gt;</span>
</label> </label>
<label for="content" class="inline-flex items-center"> <label for="content" class="inline-flex items-center">
@ -167,8 +171,8 @@
'class' => 'form-radio text-pine-700', 'class' => 'form-radio text-pine-700',
], ],
'content', 'content',
old('description_field') && old('description_field') == 'content', old('description_field') && old('description_field') === 'content',
) ?> ) ?>
<span class="ml-2">&lt;content:encoded&gt;</span> <span class="ml-2">&lt;content:encoded&gt;</span>
</label> </label>
<?= form_fieldset_close() ?> <?= form_fieldset_close() ?>
@ -183,7 +187,7 @@
], ],
'yes', 'yes',
old('force_renumber', false), old('force_renumber', false),
) ?> ) ?>
<span class="ml-2"><?= lang('PodcastImport.force_renumber') ?></span> <span class="ml-2"><?= lang('PodcastImport.force_renumber') ?></span>
<?= hint_tooltip(lang('PodcastImport.force_renumber_hint'), 'ml-1') ?> <?= hint_tooltip(lang('PodcastImport.force_renumber_hint'), 'ml-1') ?>
</label> </label>
@ -221,8 +225,13 @@
<?= button( <?= button(
lang('PodcastImport.submit'), lang('PodcastImport.submit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -1,10 +1,10 @@
<section class="flex flex-col"> <section class="flex flex-col">
<header class="flex justify-between py-2"> <header class="flex justify-between py-2">
<h2 class="text-xl"><?= lang('Podcast.latest_episodes') ?></h1> <Heading level="2"><?= lang('Podcast.latest_episodes') ?></Heading>
<a href="<?= route_to( <a href="<?= route_to(
'episode-list', 'episode-list',
$podcast->id, $podcast->id,
) ?>" class="inline-flex items-center text-sm underline hover:no-underline"> ) ?>" class="inline-flex items-center text-sm underline hover:no-underline">
<?= lang('Podcast.see_all_episodes') ?> <?= lang('Podcast.see_all_episodes') ?>
<?= icon('chevron-right', 'ml-2') ?> <?= icon('chevron-right', 'ml-2') ?>
</a> </a>
@ -18,7 +18,7 @@
$episode->published_at, $episode->published_at,
$episode->publication_status, $episode->publication_status,
'absolute top-2 right-2 text-sm' 'absolute top-2 right-2 text-sm'
); ?> ); ?>
<img <img
src="<?= $episode->image->medium_url ?>" src="<?= $episode->image->medium_url ?>"
alt="<?= $episode->title ?>" class="object-cover w-full" /> alt="<?= $episode->title ?>" class="object-cover w-full" />
@ -29,7 +29,7 @@
'episode-view', 'episode-view',
$podcast->id, $podcast->id,
$episode->id, $episode->id,
) ?>" ) ?>"
class="text-sm font-semibold truncate hover:underline" class="text-sm font-semibold truncate hover:underline"
> >
<?= episode_numbering( <?= episode_numbering(
@ -37,7 +37,7 @@
$episode->season_number, $episode->season_number,
'font-semibold text-gray-600', 'font-semibold text-gray-600',
true, true,
) ?> ) ?>
<span class="mx-1">-</span> <span class="mx-1">-</span>
<?= $episode->title ?> <?= $episode->title ?>
</a> </a>
@ -62,30 +62,30 @@
'episode-edit', 'episode-edit',
$podcast->id, $podcast->id,
$episode->id, $episode->id,
) ?>"><?= lang('Episode.edit') ?></a> ) ?>"><?= lang('Episode.edit') ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to( <a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'embeddable-player-add', 'embeddable-player-add',
$podcast->id, $podcast->id,
$episode->id, $episode->id,
) ?>"><?= lang( ) ?>"><?= lang(
'Episode.embeddable_player.add', 'Episode.embeddable_player.add',
) ?></a> ) ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to( <a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'episode-persons-manage', 'episode-persons-manage',
$podcast->id, $podcast->id,
$episode->id, $episode->id,
) ?>"><?= lang('Person.persons') ?></a> ) ?>"><?= lang('Person.persons') ?></a>
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to( <a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
'episode', 'episode',
$podcast->handle, $podcast->handle,
$episode->slug, $episode->slug,
) ?>"><?= lang('Episode.go_to_page') ?></a> ) ?>"><?= lang('Episode.go_to_page') ?></a>
<hr class="my-2 border border-gray-100"> <hr class="my-2 border border-gray-100">
<a class="px-4 py-1 font-semibold text-red-600 hover:bg-gray-100" href="<?= route_to( <a class="px-4 py-1 font-semibold text-red-600 hover:bg-gray-100" href="<?= route_to(
'episode-delete', 'episode-delete',
$podcast->id, $podcast->id,
$episode->id, $episode->id,
) ?>"><?= lang('Episode.delete') ?></a> ) ?>"><?= lang('Episode.delete') ?></a>
</nav> </nav>
</div> </div>
</article> </article>

View File

@ -12,8 +12,13 @@
<?= button( <?= button(
lang('Podcast.create'), lang('Podcast.create'),
route_to('podcast-create'), route_to('podcast-create'),
['variant' => 'accent', 'iconLeft' => 'add'], [
['class' => 'mr-2'], 'variant' => 'accent',
'iconLeft' => 'add',
],
[
'class' => 'mr-2',
],
) ?> ) ?>
<?= button(lang('Podcast.import'), route_to('podcast-import'), [ <?= button(lang('Podcast.import'), route_to('podcast-import'), [
'variant' => 'primary', 'variant' => 'primary',
@ -45,13 +50,13 @@
$podcast->id, $podcast->id,
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang( ) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'Podcast.edit', 'Podcast.edit',
) ?>"><?= icon('edit') ?></a> ) ?>"><?= icon('edit') ?></a>
<a class="inline-flex p-2 text-gray-700 bg-gray-100 rounded-full shadow-xs hover:bg-gray-200" href="<?= route_to( <a class="inline-flex p-2 text-gray-700 bg-gray-100 rounded-full shadow-xs hover:bg-gray-200" href="<?= route_to(
'podcast-view', 'podcast-view',
$podcast->id, $podcast->id,
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang( ) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
'Podcast.view', 'Podcast.view',
) ?>"><?= icon('eye') ?></a> ) ?>"><?= icon('eye') ?></a>
</footer> </footer>
</article> </article>
<?php endforeach; ?> <?php endforeach; ?>

View File

@ -12,8 +12,13 @@
<?= button( <?= button(
lang('Person.create'), lang('Person.create'),
route_to('person-create'), route_to('person-create'),
['variant' => 'primary', 'iconLeft' => 'add'], [
['class' => 'mr-2'], 'variant' => 'primary',
'iconLeft' => 'add',
],
[
'class' => 'mr-2',
],
) ?> ) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
@ -114,8 +119,13 @@
<?= button( <?= button(
lang('Person.podcast_form.submit_add'), lang('Person.podcast_form.submit_add'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -35,7 +35,7 @@
'platformName' => $platform->label, 'platformName' => $platform->label,
]), ]),
], ],
) ?> ) ?>
<div class="inline-flex bg-gray-200"> <div class="inline-flex bg-gray-200">
<?= anchor($platform->home_url, icon('external-link', 'mx-auto'), [ <?= anchor($platform->home_url, icon('external-link', 'mx-auto'), [
'class' => 'flex-1 text-gray-600 hover:text-gray-900', 'class' => 'flex-1 text-gray-600 hover:text-gray-900',
@ -103,8 +103,8 @@
'type' => 'text', 'type' => 'text',
'placeholder' => lang("Platforms.description.{$platform->type}"), 'placeholder' => lang("Platforms.description.{$platform->type}"),
]) ?> ]) ?>
<Forms.Toggler class="mb-1 text-sm" id="<?= $platform->slug . '_visible' ?>" name="<?= 'platforms[' . $platform->slug . '][visible]'?>" value="yes" checked="<?= old($platform->slug . '_visible', $platform->is_visible ? $platform->is_visible : false ) ?>"><?= lang('Platforms.visible') ?></Forms.Toggler> <Forms.Toggler class="mb-1 text-sm" id="<?= $platform->slug . '_visible' ?>" name="<?= 'platforms[' . $platform->slug . '][visible]'?>" value="yes" checked="<?= old($platform->slug . '_visible', $platform->is_visible ? $platform->is_visible : false) ?>"><?= lang('Platforms.visible') ?></Forms.Toggler>
<Forms.Toggler class="text-sm" id="<?= $platform->slug . '_on_embeddable_player' ?>" name="<?= 'platforms[' . $platform->slug . '][on_embeddable_player]'?>" value="yes" checked="<?= old($platform->slug . '_on_embeddable_player', $platform->is_on_embeddable_player ? $platform->is_on_embeddable_player : false ) ?>"><?= lang('Platforms.on_embeddable_player') ?></Forms.Toggler> <Forms.Toggler class="text-sm" id="<?= $platform->slug . '_on_embeddable_player' ?>" name="<?= 'platforms[' . $platform->slug . '][on_embeddable_player]'?>" value="yes" checked="<?= old($platform->slug . '_on_embeddable_player', $platform->is_on_embeddable_player ? $platform->is_on_embeddable_player : false) ?>"><?= lang('Platforms.on_embeddable_player') ?></Forms.Toggler>
</div> </div>
</div> </div>
@ -113,9 +113,14 @@
<?= button( <?= button(
lang('Platforms.submit'), lang('Platforms.submit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
) ?> ],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -12,8 +12,13 @@
<?= button( <?= button(
lang('Podcast.edit'), lang('Podcast.edit'),
route_to('podcast-edit', $podcast->id), route_to('podcast-edit', $podcast->id),
['variant' => 'primary', 'iconLeft' => 'edit'], [
['class' => 'mr-2'], 'variant' => 'primary',
'iconLeft' => 'edit',
],
[
'class' => 'mr-2',
],
) ?> ) ?>
<?= button(lang('Episode.create'), route_to('episode-create', $podcast->id), [ <?= button(lang('Episode.create'), route_to('episode-create', $podcast->id), [
'variant' => 'accent', 'variant' => 'accent',

View File

@ -11,7 +11,9 @@
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= form_open(route_to('user-create'), ['class' => 'flex flex-col max-w-sm']) ?> <?= form_open(route_to('user-create'), [
'class' => 'flex flex-col max-w-sm',
]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_label(lang('User.form.email'), 'email') ?> <?= form_label(lang('User.form.email'), 'email') ?>
@ -43,8 +45,13 @@
<?= button( <?= button(
lang('User.form.submit_create'), lang('User.form.submit_create'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -1,11 +1,15 @@
<?= $this->extend('_layout') ?> <?= $this->extend('_layout') ?>
<?= $this->section('title') ?> <?= $this->section('title') ?>
<?= lang('User.edit_roles', ['username' => $user->username]) ?> <?= lang('User.edit_roles', [
'username' => $user->username,
]) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
<?= $this->section('pageTitle') ?> <?= $this->section('pageTitle') ?>
<?= lang('User.edit_roles', ['username' => $user->username]) ?> <?= lang('User.edit_roles', [
'username' => $user->username,
]) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
@ -22,8 +26,13 @@
<?= button( <?= button(
lang('User.form.submit_edit'), lang('User.form.submit_edit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -40,8 +40,12 @@
'username' => $user->username, 'username' => $user->username,
]), ]),
route_to('user-edit', $user->id), route_to('user-edit', $user->id),
['variant' => 'info'], [
['class' => 'ml-2'], 'variant' => 'info',
],
[
'class' => 'ml-2',
],
); );
}, },
], ],
@ -63,7 +67,9 @@
'variant' => 'secondary', 'variant' => 'secondary',
'size' => 'small', 'size' => 'small',
], ],
['class' => 'mr-2'], [
'class' => 'mr-2',
],
) . ) .
button( button(
lang('User.' . ($user->isBanned() ? 'unban' : 'ban')), lang('User.' . ($user->isBanned() ? 'unban' : 'ban')),
@ -71,13 +77,21 @@
$user->isBanned() ? 'user-unban' : 'user-ban', $user->isBanned() ? 'user-unban' : 'user-ban',
$user->id, $user->id,
), ),
['variant' => 'warning', 'size' => 'small'], [
['class' => 'mr-2'], 'variant' => 'warning',
'size' => 'small',
],
[
'class' => 'mr-2',
],
) . ) .
button( button(
lang('User.delete'), lang('User.delete'),
route_to('user-delete', $user->id), route_to('user-delete', $user->id),
['variant' => 'danger', 'size' => 'small'], [
'variant' => 'danger',
'size' => 'small',
],
); );
}, },
], ],

View File

@ -1,12 +1,16 @@
<?= $this->extend('_layout') ?> <?= $this->extend('_layout') ?>
<?= $this->section('title') ?> <?= $this->section('title') ?>
<?= lang('User.view', ['username' => $user->username]) ?> <?= lang('User.view', [
'username' => $user->username,
]) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= view('_partials/_user_info.php', ['user' => $user]) ?> <?= view('_partials/_user_info.php', [
'user' => $user,
]) ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -1,6 +1,7 @@
<?= helper('page') ?> <?= helper('page') ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
@ -9,8 +10,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
<?= service('vite')->asset('js/audio-player.ts', 'js') ?> ->asset('styles/index.css', 'css') ?>
<?= service('vite')
->asset('js/audio-player.ts', 'js') ?>
</head> </head>
<body class="flex flex-col min-h-screen mx-auto bg-gray-100"> <body class="flex flex-col min-h-screen mx-auto bg-gray-100">

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
@ -9,8 +10,10 @@
) ?>" /> ) ?>" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="canonical" href="<?= $episode->link ?>" /> <link rel="canonical" href="<?= $episode->link ?>" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
<?= service('vite')->asset('js/embed.ts', 'js') ?> ->asset('styles/index.css', 'css') ?>
<?= service('vite')
->asset('js/embed.ts', 'js') ?>
</head> </head>
<body class="flex w-full h-screen" style="background: <?= $themeData[ <body class="flex w-full h-screen" style="background: <?= $themeData[
@ -33,7 +36,7 @@
[ [
'castopod' => 'Castopod', 'castopod' => 'Castopod',
], ],
) ?>" target="_blank" rel="noopener noreferrer"> ) ?>" target="_blank" rel="noopener noreferrer">
<?= icon('podcasting/castopod') ?> <?= icon('podcasting/castopod') ?>
</a> </a>
</div> </div>
@ -48,7 +51,7 @@
$episode->season_number, $episode->season_number,
'text-xs', 'text-xs',
true, true,
) ?> ) ?>
</a> </a>
<vm-player <vm-player
id="castopod-vm-player" id="castopod-vm-player"

View File

@ -1,6 +1,7 @@
<?= helper('page') ?> <?= helper('page') ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
@ -8,7 +9,8 @@
<meta name="description" content="Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience."/> <meta name="description" content="Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience."/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
->asset('styles/index.css', 'css') ?>
</head> </head>
<body class="flex flex-col min-h-screen mx-auto bg-pine-50"> <body class="flex flex-col min-h-screen mx-auto bg-pine-50">

View File

@ -1,13 +1,15 @@
<?= helper('page') ?> <?= helper('page') ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<title><?= $page->title ?></title> <title><?= $page->title ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
->asset('styles/index.css', 'css') ?>
</head> </head>
<body class="flex flex-col min-h-screen mx-auto"> <body class="flex flex-col min-h-screen mx-auto">

View File

@ -1,7 +1,8 @@
<?= helper('page') ?> <?= helper('page') ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
@ -13,9 +14,12 @@
<meta name="monetization" content="<?= $podcast->payment_pointer ?>" /> <meta name="monetization" content="<?= $podcast->payment_pointer ?>" />
<?php endif; ?> <?php endif; ?>
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
<?= service('vite')->asset('js/podcast.ts', 'js') ?> ->asset('styles/index.css', 'css') ?>
<?= service('vite')->asset('js/audio-player.ts', 'js') ?> <?= service('vite')
->asset('js/podcast.ts', 'js') ?>
<?= service('vite')
->asset('js/audio-player.ts', 'js') ?>
</head> </head>
<body class="flex w-full min-h-screen pb-20 overflow-x-hidden lg:mx-auto lg:container bg-pine-50 sm:pb-0"> <body class="flex w-full min-h-screen pb-20 overflow-x-hidden lg:mx-auto lg:container bg-pine-50 sm:pb-0">
@ -68,7 +72,7 @@
'menu', 'menu',
) ?><span class="sr-only"><?= lang( ) ?><span class="sr-only"><?= lang(
'Podcast.toggle_podcast_sidebar', 'Podcast.toggle_podcast_sidebar',
) ?></span></button> ) ?></span></button>
<!-- Funding links modal --> <!-- Funding links modal -->
<div id="funding-links" class="fixed top-0 left-0 z-50 flex items-center justify-center hidden w-screen h-screen"> <div id="funding-links" class="fixed top-0 left-0 z-50 flex items-center justify-center hidden w-screen h-screen">
@ -82,7 +86,9 @@
<div class="flex justify-between px-4 py-2 border-b"> <div class="flex justify-between px-4 py-2 border-b">
<h3 class="self-center text-lg"><?= lang( <h3 class="self-center text-lg"><?= lang(
'Podcast.funding_links', 'Podcast.funding_links',
['podcastTitle' => $podcast->title], [
'podcastTitle' => $podcast->title,
],
) ?></h3> ) ?></h3>
<button <button
data-toggle="funding-links" data-toggle="funding-links"

View File

@ -1,7 +1,8 @@
<?= helper('page') ?> <?= helper('page') ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
@ -13,9 +14,12 @@
<meta name="monetization" content="<?= $podcast->payment_pointer ?>" /> <meta name="monetization" content="<?= $podcast->payment_pointer ?>" />
<?php endif; ?> <?php endif; ?>
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
<?= service('vite')->asset('js/podcast.ts', 'js') ?> ->asset('styles/index.css', 'css') ?>
<?= service('vite')->asset('js/audio-player.ts', 'js') ?> <?= service('vite')
->asset('js/podcast.ts', 'js') ?>
<?= service('vite')
->asset('js/audio-player.ts', 'js') ?>
</head> </head>
<body class="flex w-full min-h-screen pt-12 pb-20 overflow-x-hidden bg-pine-50 lg:mx-auto lg:container sm:pb-0"> <body class="flex w-full min-h-screen pt-12 pb-20 overflow-x-hidden bg-pine-50 lg:mx-auto lg:container sm:pb-0">
@ -49,7 +53,8 @@
<img src="<?= $userPodcast->image <img src="<?= $userPodcast->image
->thumbnail_url ?>" class="w-8 h-8 mr-2 rounded-full" /><?= $userPodcast->title ?> ->thumbnail_url ?>" class="w-8 h-8 mr-2 rounded-full" /><?= $userPodcast->title ?>
<?php if ( <?php if (
interact_as_actor()->id === interact_as_actor()
->id ===
$userPodcast->actor_id $userPodcast->actor_id
): ?> ): ?>
</span> </span>
@ -109,7 +114,7 @@
'menu', 'menu',
) ?><span class="sr-only"><?= lang( ) ?><span class="sr-only"><?= lang(
'Podcast.toggle_podcast_sidebar', 'Podcast.toggle_podcast_sidebar',
) ?></span></button> ) ?></span></button>
<!-- Funding links modal --> <!-- Funding links modal -->
<div id="funding-links" class="fixed top-0 left-0 z-50 flex items-center justify-center hidden w-screen h-screen"> <div id="funding-links" class="fixed top-0 left-0 z-50 flex items-center justify-center hidden w-screen h-screen">
@ -120,7 +125,9 @@
<div class="flex justify-between px-4 py-2 border-b"> <div class="flex justify-between px-4 py-2 border-b">
<h3 class="self-center text-lg"><?= lang( <h3 class="self-center text-lg"><?= lang(
'Podcast.funding_links', 'Podcast.funding_links',
['podcastTitle' => $podcast->title], [
'podcastTitle' => $podcast->title,
],
) ?></h3> ) ?></h3>
<button data-toggle="funding-links" data-toggle-class="hidden" aria-label="<?= lang( <button data-toggle="funding-links" data-toggle-class="hidden" aria-label="<?= lang(
'Common.close', 'Common.close',

View File

@ -4,12 +4,16 @@
[ [
'numberOfLikes' => $comment->likes_count, 'numberOfLikes' => $comment->likes_count,
], ],
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $comment->likes_count ?></button> ) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $comment->likes_count ?></button>
<?php if($comment->replies_count): ?> <?php if ($comment->replies_count): ?>
<?= anchor( <?= anchor(
route_to('comment', $podcast->handle, $episode->slug, $comment->id), route_to('comment', $podcast->handle, $episode->slug, $comment->id),
icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', ['numberOfReplies' => $comment->replies_count]), icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
['class' => 'inline-flex items-center text-xs hover:underline'] 'numberOfReplies' => $comment->replies_count,
) ?> ]),
[
'class' => 'inline-flex items-center text-xs hover:underline',
]
) ?>
<?php endif; ?> <?php endif; ?>
</footer> </footer>

View File

@ -5,20 +5,24 @@
[ [
'numberOfLikes' => $comment->likes_count, 'numberOfLikes' => $comment->likes_count,
], ],
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $comment->likes_count ?></button> ) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $comment->likes_count ?></button>
<?= button( <?= button(
lang('Comment.reply'), lang('Comment.reply'),
route_to('comment', $podcast->handle, $episode->slug, $comment->id), route_to('comment', $podcast->handle, $episode->slug, $comment->id),
[ [
'size' => 'small', 'size' => 'small',
], ],
) ?> ) ?>
</form> </form>
<?php if($comment->replies_count): ?> <?php if ($comment->replies_count): ?>
<?= anchor( <?= anchor(
route_to('comment', $podcast->handle, $episode->slug, $comment->id), route_to('comment', $podcast->handle, $episode->slug, $comment->id),
icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', ['numberOfReplies' => $comment->replies_count]), icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
['class' => 'inline-flex items-center text-xs hover:underline'] 'numberOfReplies' => $comment->replies_count,
) ?> ]),
[
'class' => 'inline-flex items-center text-xs hover:underline',
]
) ?>
<?php endif; ?> <?php endif; ?>
</footer> </footer>

View File

@ -4,12 +4,16 @@
[ [
'numberOfLikes' => $comment->likes_count, 'numberOfLikes' => $comment->likes_count,
], ],
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $comment->likes_count ?></button> ) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $comment->likes_count ?></button>
<?php if($comment->replies_count): ?> <?php if ($comment->replies_count): ?>
<?= anchor( <?= anchor(
route_to('post', $podcast->handle, $comment->id), route_to('post', $podcast->handle, $comment->id),
icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', ['numberOfReplies' => $comment->replies_count]), icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
['class' => 'inline-flex items-center text-xs hover:underline'] 'numberOfReplies' => $comment->replies_count,
) ?> ]),
[
'class' => 'inline-flex items-center text-xs hover:underline',
]
) ?>
<?php endif; ?> <?php endif; ?>
</footer> </footer>

View File

@ -5,20 +5,24 @@
[ [
'numberOfLikes' => $comment->likes_count, 'numberOfLikes' => $comment->likes_count,
], ],
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $comment->likes_count ?></button> ) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $comment->likes_count ?></button>
<?= button( <?= button(
lang('Comment.reply'), lang('Comment.reply'),
route_to('post', $podcast->handle, $comment->id), route_to('post', $podcast->handle, $comment->id),
[ [
'size' => 'small', 'size' => 'small',
], ],
) ?> ) ?>
</form> </form>
<?php if($comment->replies_count): ?> <?php if ($comment->replies_count): ?>
<?= anchor( <?= anchor(
route_to('post', $podcast->handle, $comment->id), route_to('post', $podcast->handle, $comment->id),
icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', ['numberOfReplies' => $comment->replies_count]), icon('caret-down', 'text-xl mr-1') . lang('Comment.view_replies', [
['class' => 'inline-flex items-center text-xs hover:underline'] 'numberOfReplies' => $comment->replies_count,
) ?> ]),
[
'class' => 'inline-flex items-center text-xs hover:underline',
]
) ?>
<?php endif; ?> <?php endif; ?>
</footer> </footer>

View File

@ -4,8 +4,8 @@
[ [
'numberOfLikes' => $reply->likes_count, 'numberOfLikes' => $reply->likes_count,
], ],
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $reply->likes_count ?></button> ) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $reply->likes_count ?></button>
<?php if($reply->replies_count): ?> <?php if ($reply->replies_count): ?>
<?= anchor( <?= anchor(
route_to('comment', $podcast->handle, $episode->slug, $reply->id), route_to('comment', $podcast->handle, $episode->slug, $reply->id),
icon('chat', 'text-2xl mr-1 text-gray-400') . $reply->replies_count, icon('chat', 'text-2xl mr-1 text-gray-400') . $reply->replies_count,
@ -15,6 +15,6 @@
'numberOfReplies' => $reply->replies_count, 'numberOfReplies' => $reply->replies_count,
]), ]),
], ],
) ?> ) ?>
<?php endif; ?> <?php endif; ?>
</footer> </footer>

View File

@ -5,13 +5,13 @@
[ [
'numberOfLikes' => $reply->likes_count, 'numberOfLikes' => $reply->likes_count,
], ],
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $reply->likes_count ?></button> ) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $reply->likes_count ?></button>
<?= button( <?= button(
lang('Comment.reply'), lang('Comment.reply'),
route_to('comment', $podcast->handle, $episode->slug, $reply->id), route_to('comment', $podcast->handle, $episode->slug, $reply->id),
[ [
'size' => 'small', 'size' => 'small',
], ],
) ?> ) ?>
</form> </form>
</footer> </footer>

View File

@ -2,7 +2,9 @@
<div class="-mt-2 overflow-hidden border-b border-l border-r post-replies rounded-b-xl"> <div class="-mt-2 overflow-hidden border-b border-l border-r post-replies rounded-b-xl">
<?php foreach ($comment->replies as $reply): ?> <?php foreach ($comment->replies as $reply): ?>
<?= view('podcast/_partials/comment_reply', ['reply' => $reply]) ?> <?= view('podcast/_partials/comment_reply', [
'reply' => $reply,
]) ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>

View File

@ -24,18 +24,21 @@
[ [
'rows' => 1, 'rows' => 1,
], ],
) ?> ) ?>
<?= button( <?= button(
lang('Comment.form.submit_reply'), lang('Comment.form.submit_reply'),
'', '',
['variant' => 'primary', 'size' => 'small'], [
'variant' => 'primary',
'size' => 'small',
],
[ [
'type' => 'submit', 'type' => 'submit',
'class' => 'self-end', 'class' => 'self-end',
'name' => 'action', 'name' => 'action',
'value' => 'reply', 'value' => 'reply',
], ],
) ?> ) ?>
</div> </div>
<?= form_close() ?> <?= form_close() ?>

View File

@ -4,7 +4,7 @@
<time class="absolute px-1 text-xs font-semibold text-white rounded bottom-2 right-2 bg-black/50" datetime="PT<?= $episode->audio_file_duration ?>S"> <time class="absolute px-1 text-xs font-semibold text-white rounded bottom-2 right-2 bg-black/50" datetime="PT<?= $episode->audio_file_duration ?>S">
<?= format_duration( <?= format_duration(
$episode->audio_file_duration, $episode->audio_file_duration,
) ?> ) ?>
</time> </time>
<img loading="lazy" src="<?= $episode->image <img loading="lazy" src="<?= $episode->image
->thumbnail_url ?>" alt="<?= $episode->title ?>" class="object-cover w-20 h-20 rounded-lg" /> ->thumbnail_url ?>" alt="<?= $episode->title ?>" class="object-cover w-20 h-20 rounded-lg" />

View File

@ -15,7 +15,7 @@
$episode->season_number, $episode->season_number,
'text-xs font-semibold text-gray-600', 'text-xs font-semibold text-gray-600',
true, true,
) ?> ) ?>
<span class="mx-1">-</span> <span class="mx-1">-</span>
<?= $episode->title ?> <?= $episode->title ?>
</div> </div>

View File

@ -52,7 +52,7 @@
$podcast->handle, $podcast->handle,
) ?>" class="hover:underline"><?= lang('Podcast.posts', [ ) ?>" class="hover:underline"><?= lang('Podcast.posts', [
'numberOfPosts' => $podcast->actor->posts_count, 'numberOfPosts' => $podcast->actor->posts_count,
]) ?></a> ]) ?></a>
</div> </div>
</div> </div>
</header> </header>

View File

@ -8,7 +8,7 @@
'numberOfReplies' => $post->replies_count, 'numberOfReplies' => $post->replies_count,
]), ]),
], ],
) ?> ) ?>
<?= anchor_popup( <?= anchor_popup(
route_to('post-remote-action', $podcast->handle, $post->id, 'reblog'), route_to('post-remote-action', $podcast->handle, $post->id, 'reblog'),
icon('repeat', 'text-2xl mr-1 text-gray-400') . $post->reblogs_count, icon('repeat', 'text-2xl mr-1 text-gray-400') . $post->reblogs_count,
@ -20,7 +20,7 @@
'numberOfReblogs' => $post->reblogs_count, 'numberOfReblogs' => $post->reblogs_count,
]), ]),
], ],
) ?> ) ?>
<?= anchor_popup( <?= anchor_popup(
route_to('post-remote-action', $podcast->handle, $post->id, 'favourite'), route_to('post-remote-action', $podcast->handle, $post->id, 'favourite'),
icon('heart', 'text-2xl mr-1 text-gray-400') . $post->favourites_count, icon('heart', 'text-2xl mr-1 text-gray-400') . $post->favourites_count,
@ -32,5 +32,5 @@
'numberOfFavourites' => $post->favourites_count, 'numberOfFavourites' => $post->favourites_count,
]), ]),
], ],
) ?> ) ?>
</footer> </footer>

View File

@ -1,9 +1,10 @@
<footer class="px-6 py-3"> <footer class="px-6 py-3">
<form action="<?= route_to( <form action="<?= route_to(
'post-attempt-action', 'post-attempt-action',
interact_as_actor()->username, interact_as_actor()
->username,
$post->id, $post->id,
) ?>" method="POST" class="flex justify-around"> ) ?>" method="POST" class="flex justify-around">
<?= csrf_field() ?> <?= csrf_field() ?>
<?= anchor( <?= anchor(
route_to('post', $podcast->handle, $post->id), route_to('post', $podcast->handle, $post->id),
@ -14,13 +15,13 @@
'numberOfReplies' => $post->replies_count, 'numberOfReplies' => $post->replies_count,
]), ]),
], ],
) ?> ) ?>
<button type="submit" name="action" value="reblog" class="inline-flex items-center hover:underline" title="<?= lang( <button type="submit" name="action" value="reblog" class="inline-flex items-center hover:underline" title="<?= lang(
'Post.reblogs', 'Post.reblogs',
[ [
'numberOfReblogs' => $post->reblogs_count, 'numberOfReblogs' => $post->reblogs_count,
], ],
) ?>"><?= icon('repeat', 'text-2xl mr-1 text-gray-400') . ) ?>"><?= icon('repeat', 'text-2xl mr-1 text-gray-400') .
$post->reblogs_count ?></button> $post->reblogs_count ?></button>
<button type="submit" name="action" value="favourite" class="inline-flex items-center hover:underline" title="<?= lang( <button type="submit" name="action" value="favourite" class="inline-flex items-center hover:underline" title="<?= lang(
'Post.favourites', 'Post.favourites',
@ -33,7 +34,7 @@
'-more-dropdown' ?>" type="button" class="px-2 py-1 text-2xl text-gray-500 outline-none focus:ring" data-dropdown="button" data-dropdown-target="<?= $post->id . '-more-dropdown' ?>" type="button" class="px-2 py-1 text-2xl text-gray-500 outline-none focus:ring" data-dropdown="button" data-dropdown-target="<?= $post->id .
'-more-dropdown-menu' ?>" aria-label="<?= lang( '-more-dropdown-menu' ?>" aria-label="<?= lang(
'Common.more', 'Common.more',
) ?>" aria-haspopup="true" aria-expanded="false"><?= icon('more') ?> ) ?>" aria-haspopup="true" aria-expanded="false"><?= icon('more') ?>
</button> </button>
</form> </form>
<nav id="<?= $post->id . <nav id="<?= $post->id .
@ -48,7 +49,8 @@
) ?> ) ?>
<form action="<?= route_to( <form action="<?= route_to(
'post-attempt-block-actor', 'post-attempt-block-actor',
interact_as_actor()->username, interact_as_actor()
->username,
$post->id, $post->id,
) ?>" method="POST"> ) ?>" method="POST">
<?= csrf_field() ?> <?= csrf_field() ?>
@ -61,7 +63,8 @@
</form> </form>
<form action="<?= route_to( <form action="<?= route_to(
'post-attempt-block-domain', 'post-attempt-block-domain',
interact_as_actor()->username, interact_as_actor()
->username,
$post->id, $post->id,
) ?>" method="POST"> ) ?>" method="POST">
<?= csrf_field() ?> <?= csrf_field() ?>

View File

@ -4,7 +4,9 @@
<div class="px-6 pt-8 pb-4 bg-gray-50"> <div class="px-6 pt-8 pb-4 bg-gray-50">
<?= anchor_popup( <?= anchor_popup(
route_to('post-remote-action', $podcast->handle, $post->id, 'reply'), route_to('post-remote-action', $podcast->handle, $post->id, 'reply'),
lang('Post.reply_to', ['actorUsername' => $post->actor->username]), lang('Post.reply_to', [
'actorUsername' => $post->actor->username,
]),
[ [
'class' => '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', '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',
@ -17,7 +19,9 @@
<?php if ($post->has_replies): ?> <?php if ($post->has_replies): ?>
<?php foreach ($post->replies as $reply): ?> <?php foreach ($post->replies as $reply): ?>
<?= view('podcast/_partials/reply', ['reply' => $reply]) ?> <?= view('podcast/_partials/reply', [
'reply' => $reply,
]) ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -24,18 +24,21 @@
[ [
'rows' => 1, 'rows' => 1,
], ],
) ?> ) ?>
<?= button( <?= button(
lang('Post.form.submit_reply'), lang('Post.form.submit_reply'),
'', '',
['variant' => 'primary', 'size' => 'small'], [
'variant' => 'primary',
'size' => 'small',
],
[ [
'type' => 'submit', 'type' => 'submit',
'class' => 'self-end', 'class' => 'self-end',
'name' => 'action', 'name' => 'action',
'value' => 'reply', 'value' => 'reply',
], ],
) ?> ) ?>
</div> </div>
<?= form_close() ?> <?= form_close() ?>

View File

@ -1,11 +1,13 @@
<?php if ($preview_card->type === 'image'): ?> <?php declare(strict_types=1);
if ($preview_card->type === 'image'): ?>
<a href="<?= $preview_card->url ?>" class="flex flex-col bg-gray-100" target="_blank" rel="noopener noreferrer"> <a href="<?= $preview_card->url ?>" class="flex flex-col bg-gray-100" target="_blank" rel="noopener noreferrer">
<?php if ($preview_card->image): ?> <?php if ($preview_card->image): ?>
<div class="relative group"> <div class="relative group">
<?= icon( <?= icon(
'external-link', 'external-link',
'absolute inset-0 m-auto text-6xl bg-pine-800 ring-4 ring-white bg-opacity-50 group-hover:bg-opacity-75 text-white rounded-full p-2', 'absolute inset-0 m-auto text-6xl bg-pine-800 ring-4 ring-white bg-opacity-50 group-hover:bg-opacity-75 text-white rounded-full p-2',
) ?> ) ?>
<img src="<?= $preview_card->image ?>" alt="<?= $preview_card->title ?>" class="object-cover w-full h-80" /> <img src="<?= $preview_card->image ?>" alt="<?= $preview_card->title ?>" class="object-cover w-full h-80" />
</div> </div>
<?php endif; ?> <?php endif; ?>
@ -21,7 +23,7 @@
<?= icon( <?= icon(
'play', 'play',
'absolute inset-0 m-auto text-6xl bg-pine-800 ring-4 ring-white bg-opacity-50 group-hover:bg-opacity-75 text-white rounded-full p-2', 'absolute inset-0 m-auto text-6xl bg-pine-800 ring-4 ring-white bg-opacity-50 group-hover:bg-opacity-75 text-white rounded-full p-2',
) ?> ) ?>
<img class="object-cover w-full h-80" src="<?= $preview_card->image ?>" alt="<?= $preview_card->title ?>" /> <img class="object-cover w-full h-80" src="<?= $preview_card->image ?>" alt="<?= $preview_card->title ?>" />
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -2,7 +2,7 @@
<p class="inline-flex px-6 pt-4 text-xs text-gray-700"><?= icon( <p class="inline-flex px-6 pt-4 text-xs text-gray-700"><?= icon(
'repeat', 'repeat',
'text-lg mr-2 text-gray-400', 'text-lg mr-2 text-gray-400',
) . ) .
lang('Post.actor_shared', [ lang('Post.actor_shared', [
'actor' => $post->actor->display_name, 'actor' => $post->actor->display_name,
]) ?></p> ]) ?></p>

View File

@ -2,7 +2,7 @@
<p class="inline-flex px-6 pt-4 text-xs text-gray-700"><?= icon( <p class="inline-flex px-6 pt-4 text-xs text-gray-700"><?= icon(
'repeat', 'repeat',
'text-lg mr-2 text-gray-400', 'text-lg mr-2 text-gray-400',
) . ) .
lang('Post.actor_shared', [ lang('Post.actor_shared', [
'actor' => $post->actor->display_name, 'actor' => $post->actor->display_name,
]) ?></p> ]) ?></p>

View File

@ -8,7 +8,7 @@
'numberOfReplies' => $reply->replies_count, 'numberOfReplies' => $reply->replies_count,
]), ]),
], ],
) ?> ) ?>
<?= anchor_popup( <?= anchor_popup(
route_to('post-remote-action', $podcast->handle, $reply->id, 'reblog'), route_to('post-remote-action', $podcast->handle, $reply->id, 'reblog'),
icon('repeat', 'text-xl mr-1 text-gray-400') . $reply->reblogs_count, icon('repeat', 'text-xl mr-1 text-gray-400') . $reply->reblogs_count,
@ -20,7 +20,7 @@
'numberOfReblogs' => $reply->reblogs_count, 'numberOfReblogs' => $reply->reblogs_count,
]), ]),
], ],
) ?> ) ?>
<?= anchor_popup( <?= anchor_popup(
route_to('post-remote-action', $podcast->handle, $reply->id, 'favourite'), route_to('post-remote-action', $podcast->handle, $reply->id, 'favourite'),
icon('heart', 'text-xl mr-1 text-gray-400') . $reply->favourites_count, icon('heart', 'text-xl mr-1 text-gray-400') . $reply->favourites_count,
@ -32,5 +32,5 @@
'numberOfFavourites' => $reply->favourites_count, 'numberOfFavourites' => $reply->favourites_count,
]), ]),
], ],
) ?> ) ?>
</footer> </footer>

View File

@ -1,9 +1,10 @@
<footer class="mt-2 text-sm"> <footer class="mt-2 text-sm">
<form action="<?= route_to( <form action="<?= route_to(
'post-attempt-action', 'post-attempt-action',
interact_as_actor()->username, interact_as_actor()
->username,
$reply->id, $reply->id,
) ?>" method="POST" class="flex items-start"> ) ?>" method="POST" class="flex items-start">
<?= csrf_field() ?> <?= csrf_field() ?>
<?= anchor( <?= anchor(
route_to('post', $podcast->handle, $reply->id), route_to('post', $podcast->handle, $reply->id),
@ -14,13 +15,13 @@
'numberOfReplies' => $reply->replies_count, 'numberOfReplies' => $reply->replies_count,
]), ]),
], ],
) ?> ) ?>
<button type="submit" name="action" value="reblog" class="inline-flex items-center mr-6 hover:underline" title="<?= lang( <button type="submit" name="action" value="reblog" class="inline-flex items-center mr-6 hover:underline" title="<?= lang(
'Post.reblogs', 'Post.reblogs',
[ [
'numberOfReblogs' => $reply->reblogs_count, 'numberOfReblogs' => $reply->reblogs_count,
], ],
) ?>"><?= icon('repeat', 'text-xl mr-1 text-gray-400') . ) ?>"><?= icon('repeat', 'text-xl mr-1 text-gray-400') .
$reply->reblogs_count ?></button> $reply->reblogs_count ?></button>
<button type="submit" name="action" value="favourite" class="inline-flex items-center mr-6 hover:underline" title="<?= lang( <button type="submit" name="action" value="favourite" class="inline-flex items-center mr-6 hover:underline" title="<?= lang(
'Post.favourites', 'Post.favourites',
@ -33,7 +34,7 @@
'-more-dropdown' ?>" type="button" class="text-xl text-gray-500 outline-none focus:ring" data-dropdown="button" data-dropdown-target="<?= $reply->id . '-more-dropdown' ?>" type="button" class="text-xl text-gray-500 outline-none focus:ring" data-dropdown="button" data-dropdown-target="<?= $reply->id .
'-more-dropdown-menu' ?>" aria-label="<?= lang( '-more-dropdown-menu' ?>" aria-label="<?= lang(
'Common.more', 'Common.more',
) ?>" aria-haspopup="true" aria-expanded="false"><?= icon('more') ?> ) ?>" aria-haspopup="true" aria-expanded="false"><?= icon('more') ?>
</button> </button>
</form> </form>
<nav id="<?= $reply->id . <nav id="<?= $reply->id .
@ -48,7 +49,8 @@
) ?> ) ?>
<form action="<?= route_to( <form action="<?= route_to(
'post-attempt-block-actor', 'post-attempt-block-actor',
interact_as_actor()->username, interact_as_actor()
->username,
$reply->id, $reply->id,
) ?>" method="POST"> ) ?>" method="POST">
<?= csrf_field() ?> <?= csrf_field() ?>
@ -61,7 +63,8 @@
</form> </form>
<form action="<?= route_to( <form action="<?= route_to(
'post-attempt-block-domain', 'post-attempt-block-domain',
interact_as_actor()->username, interact_as_actor()
->username,
$reply->id, $reply->id,
) ?>" method="POST"> ) ?>" method="POST">
<?= csrf_field() ?> <?= csrf_field() ?>

View File

@ -1,6 +1,6 @@
<aside id="main-sidebar" class="fixed top-0 right-0 flex flex-col items-start flex-shrink-0 w-64 h-screen px-6 py-4 overflow-y-auto transform translate-x-full lg:sticky lg:translate-x-0"> <aside id="main-sidebar" class="fixed top-0 right-0 flex flex-col items-start flex-shrink-0 w-64 h-screen px-6 py-4 overflow-y-auto transform translate-x-full lg:sticky lg:translate-x-0">
<?php if ( <?php if (
in_array(true, array_column($podcast->fundingPlatforms, 'is_visible')) in_array(true, array_column($podcast->fundingPlatforms, 'is_visible'), true)
): ?> ): ?>
<h2 class="mb-2 text-sm font-semibold"><?= lang( <h2 class="mb-2 text-sm font-semibold"><?= lang(
'Podcast.sponsor_title', 'Podcast.sponsor_title',
@ -13,7 +13,7 @@
<?php endif; ?> <?php endif; ?>
<?php if ( <?php if (
in_array(true, array_column($podcast->socialPlatforms, 'is_visible')) in_array(true, array_column($podcast->socialPlatforms, 'is_visible'), true)
): ?> ): ?>
<h2 class="mb-2 text-sm font-semibold"> <?= lang('Podcast.find_on', [ <h2 class="mb-2 text-sm font-semibold"> <?= lang('Podcast.find_on', [
'podcastTitle' => $podcast->title, 'podcastTitle' => $podcast->title,

View File

@ -15,11 +15,14 @@
<meta property="og:site_name" content="<?= $podcast->title ?>" /> <meta property="og:site_name" content="<?= $podcast->title ?>" />
<meta property="og:url" content="<?= current_url() ?>" /> <meta property="og:url" content="<?= current_url() ?>" />
<meta property="og:image" content="<?= $podcast->image->large_url ?>" /> <meta property="og:image" content="<?= $podcast->image->large_url ?>" />
<meta property="og:image:width" content="<?= config('Images')->largeSize ?>" /> <meta property="og:image:width" content="<?= config('Images')
<meta property="og:image:height" content="<?= config('Images')->largeSize ?>" /> ->largeSize ?>" />
<meta property="og:image:height" content="<?= config('Images')
->largeSize ?>" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
@ -28,15 +31,15 @@
<a href="<?= route_to( <a href="<?= route_to(
'podcast-activity', 'podcast-activity',
$podcast->handle, $podcast->handle,
) ?>" class="px-4 py-1 mr-8 font-semibold border-b-4 text-pine-800 border-pine-500"><?= lang( ) ?>" class="px-4 py-1 mr-8 font-semibold border-b-4 text-pine-800 border-pine-500"><?= lang(
'Podcast.activity', 'Podcast.activity',
) ?></a> ) ?></a>
<a href="<?= route_to( <a href="<?= route_to(
'podcast-episodes', 'podcast-episodes',
$podcast->handle, $podcast->handle,
) ?>" class="px-4 py-1 rounded-full hover:bg-pine-100"><?= lang( ) ?>" class="px-4 py-1 rounded-full hover:bg-pine-100"><?= lang(
'Podcast.episodes', 'Podcast.episodes',
) ?></a> ) ?></a>
</nav> </nav>
<section class="max-w-2xl px-6 py-8 mx-auto space-y-8"> <section class="max-w-2xl px-6 py-8 mx-auto space-y-8">
<?php foreach ($posts as $post): ?> <?php foreach ($posts as $post): ?>
@ -45,7 +48,9 @@
'post' => $post->reblog_of_post, 'post' => $post->reblog_of_post,
]) ?> ]) ?>
<?php else: ?> <?php else: ?>
<?= view('podcast/_partials/post', ['post' => $post]) ?> <?= view('podcast/_partials/post', [
'post' => $post,
]) ?>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</section> </section>

View File

@ -15,11 +15,14 @@
<meta property="og:site_name" content="<?= $podcast->title ?>" /> <meta property="og:site_name" content="<?= $podcast->title ?>" />
<meta property="og:url" content="<?= current_url() ?>" /> <meta property="og:url" content="<?= current_url() ?>" />
<meta property="og:image" content="<?= $podcast->image->large_url ?>" /> <meta property="og:image" content="<?= $podcast->image->large_url ?>" />
<meta property="og:image:width" content="<?= config('Images')->largeSize ?>" /> <meta property="og:image:width" content="<?= config('Images')
<meta property="og:image:height" content="<?= config('Images')->largeSize ?>" /> ->largeSize ?>" />
<meta property="og:image:height" content="<?= config('Images')
->largeSize ?>" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
@ -28,15 +31,15 @@
<a href="<?= route_to( <a href="<?= route_to(
'podcast-activity', 'podcast-activity',
$podcast->handle, $podcast->handle,
) ?>" class="px-4 py-1 mr-8 font-semibold border-b-4 text-pine-800 border-pine-500"><?= lang( ) ?>" class="px-4 py-1 mr-8 font-semibold border-b-4 text-pine-800 border-pine-500"><?= lang(
'Podcast.activity', 'Podcast.activity',
) ?></a> ) ?></a>
<a href="<?= route_to( <a href="<?= route_to(
'podcast-episodes', 'podcast-episodes',
$podcast->handle, $podcast->handle,
) ?>" class="px-4 py-1 rounded-full hover:bg-pine-100"><?= lang( ) ?>" class="px-4 py-1 rounded-full hover:bg-pine-100"><?= lang(
'Podcast.episodes', 'Podcast.episodes',
) ?></a> ) ?></a>
</nav> </nav>
<section class="max-w-2xl px-6 py-8 mx-auto"> <section class="max-w-2xl px-6 py-8 mx-auto">
@ -60,7 +63,9 @@
'placeholder' => lang('Post.form.message_placeholder'), 'placeholder' => lang('Post.form.message_placeholder'),
], ],
old('message', '', false), old('message', '', false),
['rows' => 2], [
'rows' => 2,
],
) ?> ) ?>
<?= form_input([ <?= form_input([
'id' => 'episode_url', 'id' => 'episode_url',
@ -77,8 +82,14 @@
<?= button( <?= button(
lang('Post.form.submit'), lang('Post.form.submit'),
'', '',
['variant' => 'primary', 'size' => 'small'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
'size' => 'small',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
</div> </div>
<?= form_close() ?> <?= form_close() ?>
@ -91,7 +102,9 @@
'post' => $post->reblog_of_post, 'post' => $post->reblog_of_post,
]) ?> ]) ?>
<?php else: ?> <?php else: ?>
<?= view('podcast/_partials/post_authenticated', ['post' => $post]) ?> <?= view('podcast/_partials/post_authenticated', [
'post' => $post,
]) ?>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>

View File

@ -3,12 +3,13 @@
<?= $this->section('meta-tags') ?> <?= $this->section('meta-tags') ?>
<title><?= lang('Comment.title', [ <title><?= lang('Comment.title', [
'actorDisplayName' => $comment->actor->display_name, 'actorDisplayName' => $comment->actor->display_name,
'episodeTitle' => $episode->title 'episodeTitle' => $episode->title,
]) ?></title> ]) ?></title>
<meta name="description" content="<?= $comment->message ?>"/> <meta name="description" content="<?= $comment->message ?>"/>
<meta property="og:title" content="<?= lang('Comment.title', [ <meta property="og:title" content="<?= lang('Comment.title', [
'actorDisplayName' => $comment->actor->display_name, 'actorDisplayName' => $comment->actor->display_name,
'episodeTitle' => $episode->title ]) ?>"/> 'episodeTitle' => $episode->title,
]) ?>"/>
<meta property="og:locale" content="<?= service( <meta property="og:locale" content="<?= service(
'request', 'request',
)->getLocale() ?>" /> )->getLocale() ?>" />

View File

@ -12,8 +12,10 @@
<meta property="og:site_name" content="<?= $podcast->title ?>" /> <meta property="og:site_name" content="<?= $podcast->title ?>" />
<meta property="og:url" content="<?= current_url() ?>" /> <meta property="og:url" content="<?= current_url() ?>" />
<meta property="og:image" content="<?= $episode->image->large_url ?>" /> <meta property="og:image" content="<?= $episode->image->large_url ?>" />
<meta property="og:image:width" content="<?= config('Images')->largeSize ?>" /> <meta property="og:image:width" content="<?= config('Images')
<meta property="og:image:height" content="<?= config('Images')->largeSize ?>" /> ->largeSize ?>" />
<meta property="og:image:height" content="<?= config('Images')
->largeSize ?>" />
<meta property="og:description" content="$description" /> <meta property="og:description" content="$description" />
<meta property="article:published_time" content="<?= $episode->published_at ?>" /> <meta property="article:published_time" content="<?= $episode->published_at ?>" />
<meta property="article:modified_time" content="<?= $episode->updated_at ?>" /> <meta property="article:modified_time" content="<?= $episode->updated_at ?>" />
@ -21,10 +23,10 @@
<meta property="og:audio:type" content="<?= $episode->audio_file_mimetype ?>" /> <meta property="og:audio:type" content="<?= $episode->audio_file_mimetype ?>" />
<link rel="alternate" type="application/json+oembed" href="<?= base_url( <link rel="alternate" type="application/json+oembed" href="<?= base_url(
route_to('episode-oembed-json', $podcast->handle, $episode->slug), route_to('episode-oembed-json', $podcast->handle, $episode->slug),
) ?>" title="<?= $episode->title ?> oEmbed json" /> ) ?>" title="<?= $episode->title ?> oEmbed json" />
<link rel="alternate" type="text/xml+oembed" href="<?= base_url( <link rel="alternate" type="text/xml+oembed" href="<?= base_url(
route_to('episode-oembed-xml', $podcast->handle, $episode->slug), route_to('episode-oembed-xml', $podcast->handle, $episode->slug),
) ?>" title="<?= $episode->title ?> oEmbed xml" /> ) ?>" title="<?= $episode->title ?> oEmbed xml" />
<meta name="twitter:title" content="<?= $episode->title ?>" /> <meta name="twitter:title" content="<?= $episode->title ?>" />
<meta name="twitter:description" content="<?= $episode->description ?>" /> <meta name="twitter:description" content="<?= $episode->description ?>" />
<meta name="twitter:image" content="<?= $episode->image->large_url ?>" /> <meta name="twitter:image" content="<?= $episode->image->large_url ?>" />
@ -33,7 +35,7 @@
<meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" /> <meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" />
<meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl( <meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl(
'light', 'light',
) ?>" /> ) ?>" />
<meta name="twitter:player:width" content="600" /> <meta name="twitter:player:width" content="600" />
<meta name="twitter:player:height" content="200" /> <meta name="twitter:player:height" content="200" />
<?= $this->endSection() ?> <?= $this->endSection() ?>
@ -46,7 +48,9 @@
) ?>" class="inline-flex items-center px-4 py-2 mb-2 text-sm"><?= icon( ) ?>" class="inline-flex items-center px-4 py-2 mb-2 text-sm"><?= icon(
'arrow-left', 'arrow-left',
'mr-2 text-lg', 'mr-2 text-lg',
) . lang('Episode.back_to_episodes', ['podcast' => $podcast->title]) ?></a> ) . lang('Episode.back_to_episodes', [
'podcast' => $podcast->title,
]) ?></a>
<header class="flex flex-col px-6 mb-4 rounded-b-xl"> <header class="flex flex-col px-6 mb-4 rounded-b-xl">
<div class="flex flex-wrap items-start"> <div class="flex flex-wrap items-start">
<img src="<?= $episode->image <img src="<?= $episode->image
@ -85,12 +89,16 @@
<div class="tab-panels"> <div class="tab-panels">
<section id="comments" class="space-y-6 tab-panel"> <section id="comments" class="space-y-6 tab-panel">
<?php foreach ($episode->comments as $comment): ?> <?php foreach ($episode->comments as $comment): ?>
<?= view('podcast/_partials/comment', ['comment' => $comment]) ?> <?= view('podcast/_partials/comment', [
'comment' => $comment,
]) ?>
<?php endforeach; ?> <?php endforeach; ?>
</section> </section>
<section id="activity" class="space-y-8 tab-panel"> <section id="activity" class="space-y-8 tab-panel">
<?php foreach ($episode->posts as $post): ?> <?php foreach ($episode->posts as $post): ?>
<?= view('podcast/_partials/post', ['post' => $post]) ?> <?= view('podcast/_partials/post', [
'post' => $post,
]) ?>
<?php endforeach; ?> <?php endforeach; ?>
</section> </section>
<section id="description" class="prose tab-panel"> <section id="description" class="prose tab-panel">

View File

@ -12,8 +12,10 @@
<meta property="og:site_name" content="<?= $podcast->title ?>" /> <meta property="og:site_name" content="<?= $podcast->title ?>" />
<meta property="og:url" content="<?= current_url() ?>" /> <meta property="og:url" content="<?= current_url() ?>" />
<meta property="og:image" content="<?= $episode->image->large_url ?>" /> <meta property="og:image" content="<?= $episode->image->large_url ?>" />
<meta property="og:image:width" content="<?= config('Images')->largeSize ?>" /> <meta property="og:image:width" content="<?= config('Images')
<meta property="og:image:height" content="<?= config('Images')->largeSize ?>" /> ->largeSize ?>" />
<meta property="og:image:height" content="<?= config('Images')
->largeSize ?>" />
<meta property="og:description" content="$description" /> <meta property="og:description" content="$description" />
<meta property="article:published_time" content="<?= $episode->published_at ?>" /> <meta property="article:published_time" content="<?= $episode->published_at ?>" />
<meta property="article:modified_time" content="<?= $episode->updated_at ?>" /> <meta property="article:modified_time" content="<?= $episode->updated_at ?>" />
@ -21,10 +23,10 @@
<meta property="og:audio:type" content="<?= $episode->audio_file_mimetype ?>" /> <meta property="og:audio:type" content="<?= $episode->audio_file_mimetype ?>" />
<link rel="alternate" type="application/json+oembed" href="<?= base_url( <link rel="alternate" type="application/json+oembed" href="<?= base_url(
route_to('episode-oembed-json', $podcast->handle, $episode->slug), route_to('episode-oembed-json', $podcast->handle, $episode->slug),
) ?>" title="<?= $episode->title ?> oEmbed json" /> ) ?>" title="<?= $episode->title ?> oEmbed json" />
<link rel="alternate" type="text/xml+oembed" href="<?= base_url( <link rel="alternate" type="text/xml+oembed" href="<?= base_url(
route_to('episode-oembed-xml', $podcast->handle, $episode->slug), route_to('episode-oembed-xml', $podcast->handle, $episode->slug),
) ?>" title="<?= $episode->title ?> oEmbed xml" /> ) ?>" title="<?= $episode->title ?> oEmbed xml" />
<meta name="twitter:title" content="<?= $episode->title ?>" /> <meta name="twitter:title" content="<?= $episode->title ?>" />
<meta name="twitter:description" content="<?= $episode->description ?>" /> <meta name="twitter:description" content="<?= $episode->description ?>" />
<meta name="twitter:image" content="<?= $episode->image->large_url ?>" /> <meta name="twitter:image" content="<?= $episode->image->large_url ?>" />
@ -33,7 +35,7 @@
<meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" /> <meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" />
<meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl( <meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl(
'light', 'light',
) ?>" /> ) ?>" />
<meta name="twitter:player:width" content="600" /> <meta name="twitter:player:width" content="600" />
<meta name="twitter:player:height" content="200" /> <meta name="twitter:player:height" content="200" />
<?= $this->endSection() ?> <?= $this->endSection() ?>
@ -46,7 +48,9 @@
) ?>" class="inline-flex items-center px-4 py-2 mb-2 text-sm"><?= icon( ) ?>" class="inline-flex items-center px-4 py-2 mb-2 text-sm"><?= icon(
'arrow-left', 'arrow-left',
'mr-2 mb- text-lg', 'mr-2 mb- text-lg',
) . lang('Episode.back_to_episodes', ['podcast' => $podcast->title]) ?></a> ) . lang('Episode.back_to_episodes', [
'podcast' => $podcast->title,
]) ?></a>
<header class="flex flex-col px-6 mb-4 rounded-b-xl"> <header class="flex flex-col px-6 mb-4 rounded-b-xl">
<div class="flex flex-wrap items-start"> <div class="flex flex-wrap items-start">
<img src="<?= $episode->image <img src="<?= $episode->image
@ -77,7 +81,7 @@
<label for="comments"><?= lang('Episode.comments') . '(' . $episode->comments_count . ')' ?></label> <label for="comments"><?= lang('Episode.comments') . '(' . $episode->comments_count . ')' ?></label>
<input type="radio" name="tabset" id="activity" aria-controls="activity" /> <input type="radio" name="tabset" id="activity" aria-controls="activity" />
<label for="activity"><?= lang('Episode.activity') . '('. $episode->posts_count .')' ?></label> <label for="activity"><?= lang('Episode.activity') . '(' . $episode->posts_count . ')' ?></label>
<input type="radio" name="tabset" id="description" aria-controls="description" /> <input type="radio" name="tabset" id="description" aria-controls="description" />
<label for="description"><?= lang('Episode.description') ?></label> <label for="description"><?= lang('Episode.description') ?></label>
@ -92,7 +96,8 @@
<?= view('_message_block') ?> <?= view('_message_block') ?>
<img src="<?= interact_as_actor() <img src="<?= interact_as_actor()
->avatar_image_url ?>" alt="<?= interact_as_actor()->display_name ?>" class="w-12 h-12 mr-4 rounded-full" /> ->avatar_image_url ?>" alt="<?= interact_as_actor()
->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
<div class="flex flex-col flex-1 min-w-0"> <div class="flex flex-col flex-1 min-w-0">
<?= form_textarea( <?= form_textarea(
[ [
@ -113,13 +118,21 @@
<?= button( <?= button(
lang('Comment.form.submit'), lang('Comment.form.submit'),
'', '',
['variant' => 'primary', 'size' => 'small'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
'size' => 'small',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
</div> </div>
<?= form_close() ?> <?= form_close() ?>
<?php foreach ($episode->comments as $comment): ?> <?php foreach ($episode->comments as $comment): ?>
<?= view('podcast/_partials/comment_authenticated', ['comment' => $comment]) ?> <?= view('podcast/_partials/comment_authenticated', [
'comment' => $comment,
]) ?>
<?php endforeach; ?> <?php endforeach; ?>
</section> </section>
<section id="activity" class="space-y-8 tab-panel"> <section id="activity" class="space-y-8 tab-panel">
@ -131,7 +144,8 @@
<?= view('_message_block') ?> <?= view('_message_block') ?>
<img src="<?= interact_as_actor() <img src="<?= interact_as_actor()
->avatar_image_url ?>" alt="<?= interact_as_actor()->display_name ?>" class="w-12 h-12 mr-4 rounded-full" /> ->avatar_image_url ?>" alt="<?= interact_as_actor()
->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
<div class="flex flex-col flex-1 min-w-0"> <div class="flex flex-col flex-1 min-w-0">
<?= form_textarea( <?= form_textarea(
[ [
@ -157,8 +171,14 @@
<?= button( <?= button(
lang('Post.form.submit'), lang('Post.form.submit'),
'', '',
['variant' => 'primary', 'size' => 'small'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
'size' => 'small',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
</div> </div>
<?= form_close() ?> <?= form_close() ?>

View File

@ -15,11 +15,14 @@
<meta property="og:site_name" content="<?= $podcast->title ?>" /> <meta property="og:site_name" content="<?= $podcast->title ?>" />
<meta property="og:url" content="<?= current_url() ?>" /> <meta property="og:url" content="<?= current_url() ?>" />
<meta property="og:image" content="<?= $podcast->image->large_url ?>" /> <meta property="og:image" content="<?= $podcast->image->large_url ?>" />
<meta property="og:image:width" content="<?= config('Images')->largeSize ?>" /> <meta property="og:image:width" content="<?= config('Images')
<meta property="og:image:height" content="<?= config('Images')->largeSize ?>" /> ->largeSize ?>" />
<meta property="og:image:height" content="<?= config('Images')
->largeSize ?>" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
@ -29,13 +32,13 @@
$podcast->handle, $podcast->handle,
) ?>" class="px-4 py-1 mr-8 rounded-full hover:bg-pine-100"><?= lang( ) ?>" class="px-4 py-1 mr-8 rounded-full hover:bg-pine-100"><?= lang(
'Podcast.activity', 'Podcast.activity',
) ?></a> ) ?></a>
<a href="<?= route_to( <a href="<?= route_to(
'podcast-episodes', 'podcast-episodes',
$podcast->handle, $podcast->handle,
) ?>" class="px-4 py-1 font-semibold border-b-4 text-pine-800 border-pine-500"><?= lang( ) ?>" class="px-4 py-1 font-semibold border-b-4 text-pine-800 border-pine-500"><?= lang(
'Podcast.episodes', 'Podcast.episodes',
) ?></a> ) ?></a>
<?php if ($activeQuery): ?> <?php if ($activeQuery): ?>
<button id="episode-lists-dropdown" type="button" class="inline-flex items-center px-2 py-1 text-sm font-semibold outline-none focus:ring" data-dropdown="button" data-dropdown-target="episode-lists-dropdown-menu" aria-label="<?= lang( <button id="episode-lists-dropdown" type="button" class="inline-flex items-center px-2 py-1 text-sm font-semibold outline-none focus:ring" data-dropdown="button" data-dropdown-target="episode-lists-dropdown-menu" aria-label="<?= lang(
'Common.more', 'Common.more',
@ -68,12 +71,12 @@
<?php if ($episodes): ?> <?php if ($episodes): ?>
<h1 class="mb-4 text-xl font-semibold"> <h1 class="mb-4 text-xl font-semibold">
<?php if ($activeQuery['type'] == 'year'): ?> <?php if ($activeQuery['type'] === 'year'): ?>
<?= lang('Podcast.list_of_episodes_year', [ <?= lang('Podcast.list_of_episodes_year', [
'year' => $activeQuery['value'], 'year' => $activeQuery['value'],
'episodeCount' => count($episodes), 'episodeCount' => count($episodes),
]) ?> ]) ?>
<?php elseif ($activeQuery['type'] == 'season'): ?> <?php elseif ($activeQuery['type'] === 'season'): ?>
<?= lang('Podcast.list_of_episodes_season', [ <?= lang('Podcast.list_of_episodes_season', [
'seasonNumber' => $activeQuery['value'], 'seasonNumber' => $activeQuery['value'],
'episodeCount' => count($episodes), 'episodeCount' => count($episodes),
@ -83,7 +86,7 @@
<?php foreach ($episodes as $episode): ?> <?php foreach ($episodes as $episode): ?>
<?= view('podcast/_partials/episode_card', [ <?= view('podcast/_partials/episode_card', [
'episode' => $episode, 'episode' => $episode,
'podcast' => $podcast 'podcast' => $podcast,
]) ?> ]) ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php else: ?> <?php else: ?>

View File

@ -6,7 +6,7 @@
<title><?= $podcast->title ?></title> <title><?= $podcast->title ?></title>
<meta name="description" content="<?= htmlspecialchars( <meta name="description" content="<?= htmlspecialchars(
$podcast->description, $podcast->description,
) ?>" /> ) ?>" />
<link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<link rel="canonical" href="<?= current_url() ?>" /> <link rel="canonical" href="<?= current_url() ?>" />
<meta property="og:title" content="<?= $podcast->title ?>" /> <meta property="og:title" content="<?= $podcast->title ?>" />
@ -15,11 +15,14 @@
<meta property="og:site_name" content="<?= $podcast->title ?>" /> <meta property="og:site_name" content="<?= $podcast->title ?>" />
<meta property="og:url" content="<?= current_url() ?>" /> <meta property="og:url" content="<?= current_url() ?>" />
<meta property="og:image" content="<?= $podcast->image->large_url ?>" /> <meta property="og:image" content="<?= $podcast->image->large_url ?>" />
<meta property="og:image:width" content="<?= config('Images')->largeSize ?>" /> <meta property="og:image:width" content="<?= config('Images')
<meta property="og:image:height" content="<?= config('Images')->largeSize ?>" /> ->largeSize ?>" />
<meta property="og:image:height" content="<?= config('Images')
->largeSize ?>" />
<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:card" content="summary_large_image" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
@ -68,12 +71,12 @@
<?php if ($episodes) : ?> <?php if ($episodes) : ?>
<h1 class="mb-4 text-xl font-semibold"> <h1 class="mb-4 text-xl font-semibold">
<?php if ($activeQuery['type'] == 'year') : ?> <?php if ($activeQuery['type'] === 'year') : ?>
<?= lang('Podcast.list_of_episodes_year', [ <?= lang('Podcast.list_of_episodes_year', [
'year' => $activeQuery['value'], 'year' => $activeQuery['value'],
'episodeCount' => count($episodes), 'episodeCount' => count($episodes),
]) ?> ]) ?>
<?php elseif ($activeQuery['type'] == 'season') : ?> <?php elseif ($activeQuery['type'] === 'season') : ?>
<?= lang('Podcast.list_of_episodes_season', [ <?= lang('Podcast.list_of_episodes_season', [
'seasonNumber' => $activeQuery['value'], 'seasonNumber' => $activeQuery['value'],
'episodeCount' => count($episodes), 'episodeCount' => count($episodes),
@ -83,7 +86,7 @@
<?php foreach ($episodes as $episode) : ?> <?php foreach ($episodes as $episode) : ?>
<?= view('podcast/_partials/episode_card', [ <?= view('podcast/_partials/episode_card', [
'episode' => $episode, 'episode' => $episode,
'podcast' => $podcast 'podcast' => $podcast,
]) ?> ]) ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php else : ?> <?php else : ?>

View File

@ -1,7 +1,8 @@
<?= helper('page') ?> <?= helper('page') ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
@ -23,7 +24,8 @@
<meta property="og:image" content="<?= $actor->avatar_image_url ?>" /> <meta property="og:image" content="<?= $actor->avatar_image_url ?>" />
<meta property="og:description" content="<?= $actor->summary ?>" /> <meta property="og:description" content="<?= $actor->summary ?>" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
->asset('styles/index.css', 'css') ?>
</head> </head>
@ -70,8 +72,13 @@
<?= button( <?= button(
lang('Fediverse.follow.submit'), lang('Fediverse.follow.submit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>
</main> </main>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>"> <html lang="<?= service('request')
->getLocale() ?>">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
@ -24,8 +25,10 @@
<meta property="og:image" content="<?= $post->actor->avatar_image_url ?>" /> <meta property="og:image" content="<?= $post->actor->avatar_image_url ?>" />
<meta property="og:description" content="<?= $post->message ?>" /> <meta property="og:description" content="<?= $post->message ?>" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
<?= service('vite')->asset('js/podcast.ts', 'js') ?> ->asset('styles/index.css', 'css') ?>
<?= service('vite')
->asset('js/podcast.ts', 'js') ?>
</head> </head>
<body class="min-h-screen mx-auto bg-pine-50"> <body class="min-h-screen mx-auto bg-pine-50">
@ -39,7 +42,10 @@
<?= form_open( <?= form_open(
route_to('post-attempt-remote-action', $post->id, $action), route_to('post-attempt-remote-action', $post->id, $action),
['method' => 'post', 'class' => 'flex flex-col mt-8'], [
'method' => 'post',
'class' => 'flex flex-col mt-8',
],
) ?> ) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= view('_message_block') ?> <?= view('_message_block') ?>
@ -61,8 +67,13 @@
<?= button( <?= button(
lang('Fediverse.' . $action . '.submit'), lang('Fediverse.' . $action . '.submit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>
</main> </main>

View File

@ -8,7 +8,8 @@
<meta name="description" content="Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience."/> <meta name="description" content="Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience."/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
->asset('styles/index.css', 'css') ?>
</head> </head>
<body class="flex flex-col items-center justify-center min-h-screen mx-auto bg-gray-100"> <body class="flex flex-col items-center justify-center min-h-screen mx-auto bg-gray-100">

View File

@ -10,7 +10,9 @@
<p class="mb-4 text-gray-600"><?= lang('Auth.enterEmailForInstructions') ?></p> <p class="mb-4 text-gray-600"><?= lang('Auth.enterEmailForInstructions') ?></p>
<?= form_open(route_to('forgot'), ['class' => 'flex flex-col']) ?> <?= form_open(route_to('forgot'), [
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_label(lang('Auth.emailAddress'), 'email') ?> <?= form_label(lang('Auth.emailAddress'), 'email') ?>
@ -25,8 +27,13 @@
<?= button( <?= button(
lang('Auth.sendInstructions'), lang('Auth.sendInstructions'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -8,7 +8,9 @@
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= form_open(route_to('login'), ['class' => 'flex flex-col']) ?> <?= form_open(route_to('login'), [
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_label(lang('Auth.emailOrUsername'), 'login') ?> <?= form_label(lang('Auth.emailOrUsername'), 'login') ?>
@ -32,8 +34,13 @@
<?= button( <?= button(
lang('Auth.loginAction'), lang('Auth.loginAction'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>
@ -47,11 +54,11 @@
<?php if ($config->allowRegistration): ?> <?php if ($config->allowRegistration): ?>
<a class="underline hover:no-underline" href="<?= route_to( <a class="underline hover:no-underline" href="<?= route_to(
'register', 'register',
) ?>"><?= lang('Auth.needAnAccount') ?></a> ) ?>"><?= lang('Auth.needAnAccount') ?></a>
<?php endif; ?> <?php endif; ?>
<a class="underline hover:no-underline" href="<?= route_to( <a class="underline hover:no-underline" href="<?= route_to(
'forgot', 'forgot',
) ?>"><?= lang('Auth.forgotYourPassword') ?></a> ) ?>"><?= lang('Auth.forgotYourPassword') ?></a>
</div> </div>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -8,7 +8,9 @@
<?= $this->section('content') ?> <?= $this->section('content') ?>
<?= form_open(route_to('register'), ['class' => 'flex flex-col']) ?> <?= form_open(route_to('register'), [
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_label(lang('Auth.email'), 'email') ?> <?= form_label(lang('Auth.email'), 'email') ?>
@ -47,8 +49,13 @@
<?= button( <?= button(
lang('Auth.register'), lang('Auth.register'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>
@ -61,9 +68,9 @@
<p class="py-4 text-sm text-center"> <p class="py-4 text-sm text-center">
<?= lang( <?= lang(
'Auth.alreadyRegistered', 'Auth.alreadyRegistered',
) ?> <a class="underline hover:no-underline" href="<?= route_to( ) ?> <a class="underline hover:no-underline" href="<?= route_to(
'login', 'login',
) ?>"><?= lang('Auth.signIn') ?></a> ) ?>"><?= lang('Auth.signIn') ?></a>
</p> </p>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -10,7 +10,9 @@
<p class="mb-4"><?= lang('Auth.enterCodeEmailPassword') ?></p> <p class="mb-4"><?= lang('Auth.enterCodeEmailPassword') ?></p>
<?= form_open(route_to('reset-password'), ['class' => 'flex flex-col']) ?> <?= form_open(route_to('reset-password'), [
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?> <?= csrf_field() ?>
<?= form_label(lang('Auth.token'), 'token') ?> <?= form_label(lang('Auth.token'), 'token') ?>
@ -45,8 +47,13 @@
<?= button( <?= button(
lang('Auth.resetPassword'), lang('Auth.resetPassword'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -7,8 +7,10 @@
<meta name="description" content="Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience."/> <meta name="description" content="Castopod is an open-source hosting platform made for podcasters who want engage and interact with their audience."/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<?= service('vite')->asset('styles/index.css', 'css') ?> <?= service('vite')
<?= service('vite')->asset('js/install.ts', 'js') ?> ->asset('styles/index.css', 'css') ?>
<?= service('vite')
->asset('js/install.ts', 'js') ?>
</head> </head>
<body class="flex flex-col min-h-screen mx-auto"> <body class="flex flex-col min-h-screen mx-auto">

View File

@ -28,15 +28,21 @@
'id' => 'cache_handler', 'id' => 'cache_handler',
'name' => 'cache_handler', 'name' => 'cache_handler',
'class' => 'form-select mb-6', 'class' => 'form-select mb-6',
'value' => config('Database')->default['DBPrefix'], 'value' => config('Database')
->default['DBPrefix'],
], ],
) ?> ) ?>
<?= button( <?= button(
lang('Install.form.next') . icon('arrow-right', 'ml-2'), lang('Install.form.next') . icon('arrow-right', 'ml-2'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

Some files were not shown because too many files have changed in this diff Show More