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 = '';
@ -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;
@ -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);
?> ?>

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">

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',

View File

@ -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') ?>
@ -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') .
@ -331,8 +351,13 @@
<?= 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

@ -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,13 +103,19 @@
</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',
) ?> ) ?>
@ -117,7 +123,11 @@
<?= 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',
) ?> ) ?>
@ -125,7 +135,11 @@
<?= 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',
) ?> ) ?>
@ -134,7 +148,9 @@
</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') ?>
@ -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') .
@ -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

@ -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

@ -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') ?>
@ -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,7 +96,9 @@
</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>
@ -162,12 +168,14 @@
<?= 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'),
], ],
) ?> ) ?>

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') ?>
@ -48,10 +50,12 @@
'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">
@ -95,7 +99,9 @@
</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>
@ -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() ?>
@ -95,7 +98,9 @@
'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',
@ -113,7 +118,9 @@
$episode->id, $episode->id,
$soundbite->id, $soundbite->id,
), ),
['variant' => 'danger'], [
'variant' => 'danger',
],
[], [],
) ?> ) ?>
</td> </td>
@ -162,7 +169,9 @@
'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,
@ -183,7 +192,9 @@
'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]',
@ -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

@ -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

@ -50,5 +50,6 @@
</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',
@ -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() ?>

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',

View File

@ -33,5 +33,6 @@
) ?>"/> ) ?>"/>
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -26,5 +26,6 @@
) ?>"/> ) ?>"/>
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -31,5 +31,6 @@
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -43,5 +43,6 @@
) ?>" /> ) ?>" />
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -24,5 +24,6 @@
) ?>" /> ) ?>" />
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -26,5 +26,6 @@
) ?>"/> ) ?>"/>
</div> </div>
<?= service('vite')->asset('js/charts.ts', 'js') ?> <?= service('vite')
->asset('js/charts.ts', 'js') ?>
<?= $this->endSection() ?> <?= $this->endSection() ?>

View File

@ -37,5 +37,6 @@
<?= 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() ?>
@ -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') ?>
@ -277,7 +290,9 @@
<?= 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,
) ?> ) ?>
@ -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,
) ?> ) ?>
@ -357,8 +376,13 @@
<?= 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') ?>
@ -53,21 +54,31 @@
<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() ?>
@ -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(

View File

@ -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',
@ -104,7 +106,7 @@
) ?> ) ?>
<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',
@ -118,7 +120,9 @@
</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,7 +133,7 @@
], ],
'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>
@ -142,7 +146,7 @@
'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>
@ -155,7 +159,7 @@
], ],
'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>
@ -167,7 +171,7 @@
'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>
@ -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,6 +1,6 @@
<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,

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',

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

@ -113,8 +113,13 @@
<?= 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[

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">
@ -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>
@ -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

@ -8,8 +8,12 @@
<?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

@ -17,8 +17,12 @@
<?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

@ -8,8 +8,12 @@
<?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

@ -17,8 +17,12 @@
<?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

@ -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

@ -28,7 +28,10 @@
<?= 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',

View File

@ -1,7 +1,8 @@
<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() ?>
@ -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

@ -28,7 +28,10 @@
<?= 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',

View File

@ -1,4 +1,6 @@
<?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">

View File

@ -1,7 +1,8 @@
<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() ?>
@ -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') ?>
@ -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') ?>
@ -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 ?>" />
@ -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 ?>" />
@ -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
@ -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') ?>
@ -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

@ -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() ?>

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() ?>

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() ?>

View File

@ -43,8 +43,13 @@
<?= button( <?= button(
icon('check', 'mr-2') . lang('Install.form.submit'), icon('check', 'mr-2') . lang('Install.form.submit'),
'', '',
['variant' => 'primary'], [
['type' => 'submit', 'class' => 'self-end'], 'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?> ) ?>
<?= form_close() ?> <?= form_close() ?>

View File

@ -71,8 +71,13 @@
<?= 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() ?>

View File

@ -3,7 +3,8 @@
<?= $this->section('content') ?> <?= $this->section('content') ?>
adz adz
<form action="<?= '/' . <form action="<?= '/' .
config('Install')->gateway . config('Install')
->gateway .
'/instance-config' ?>" class="flex flex-col w-full max-w-sm" method="post" accept-charset="utf-8"> '/instance-config' ?>" class="flex flex-col w-full max-w-sm" method="post" accept-charset="utf-8">
<?= csrf_field() ?> <?= csrf_field() ?>
@ -17,7 +18,8 @@ adz
'class' => 'form-input mb-4', 'class' => 'form-input mb-4',
'value' => old( 'value' => old(
'hostname', 'hostname',
host_url() === null ? config('App')->baseURL : host_url(), host_url() === null ? config('App')
->baseURL : host_url(),
), ),
'required' => 'required', 'required' => 'required',
]) ?> ]) ?>
@ -68,8 +70,13 @@ adz
<?= 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() ?>