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" />
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">
<?= session('message') ?>
</div>

View File

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

View File

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

View File

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

View File

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

View File

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

25
ecs.php
View File

@ -1,9 +1,11 @@
<?php
use PhpCsFixer\Fixer\Whitespace\IndentationTypeFixer;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\CodingStandard\Fixer\Naming\StandardizeHereNowDocKeywordFixer;
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
return static function (ContainerConfigurator $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
@ -12,21 +14,32 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$parameters->set(Option::PATHS, [
__DIR__ . '/app',
__DIR__ . '/modules',
__DIR__ . '/themes',
__DIR__ . '/tests',
__DIR__ . '/public',
__DIR__ . '/public',
]);
$parameters->set(Option::SKIP, [
// TODO: restrict some rules for views?
__DIR__ . '/app/Views/*',
__DIR__ . '/modules/**/Views/*',
// skip specific generated files
__DIR__ . '/modules/Admin/Language/*/PersonsTaxonomy.php',
StandardizeHereNowDocKeywordFixer::class => [
__DIR__ . '/app/View/Components',
__DIR__ . '/modules/**/View/Components',
__DIR__ . '/app/Views/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",
purge: [
"./app/Views/**/*.php",
"./app/View/Components/**/*.php",
"./modules/**/Views/**/*.php",
"./themes/**/*.php",
"./app/Helpers/*.php",
@ -49,6 +48,9 @@ module.exports = {
gridTemplateColumns: {
podcasts: "repeat(auto-fill, minmax(14rem, 1fr))",
},
zIndex: {
"-10": "-10",
},
},
},
variants: {},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,7 +16,9 @@
]) ?>
<?= 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([
'id' => 'title',
'name' => 'title',
@ -52,8 +54,13 @@
<?= button(
lang('Page.form.submit_edit'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
[
'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?>
<?= form_close() ?>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,8 +12,13 @@
<?= button(
lang('Podcast.edit'),
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), [
'variant' => 'accent',

View File

@ -11,7 +11,9 @@
<?= $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() ?>
<?= form_label(lang('User.form.email'), 'email') ?>
@ -43,8 +45,13 @@
<?= button(
lang('User.form.submit_create'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
[
'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?>
<?= form_close() ?>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,7 @@
<?= helper('page') ?>
<!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>">
<html lang="<?= service('request')
->getLocale() ?>">
<head>
<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="viewport" content="width=device-width, initial-scale=1.0"/>
<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>
<body class="flex flex-col min-h-screen mx-auto bg-pine-50">

View File

@ -1,13 +1,15 @@
<?= helper('page') ?>
<!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>">
<html lang="<?= service('request')
->getLocale() ?>">
<head>
<meta charset="UTF-8"/>
<title><?= $page->title ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<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>
<body class="flex flex-col min-h-screen mx-auto">

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,9 @@
<div class="px-6 pt-8 pb-4 bg-gray-50">
<?= anchor_popup(
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' =>
'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 foreach ($post->replies as $reply): ?>
<?= view('podcast/_partials/reply', ['reply' => $reply]) ?>
<?= view('podcast/_partials/reply', [
'reply' => $reply,
]) ?>
<?php endforeach; ?>
<?php endif; ?>
</div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="<?= service('request')->getLocale() ?>">
<html lang="<?= service('request')
->getLocale() ?>">
<head>
<meta charset="UTF-8"/>
@ -24,8 +25,10 @@
<meta property="og:image" content="<?= $post->actor->avatar_image_url ?>" />
<meta property="og:description" content="<?= $post->message ?>" />
<?= service('vite')->asset('styles/index.css', 'css') ?>
<?= service('vite')->asset('js/podcast.ts', 'js') ?>
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')
->asset('js/podcast.ts', 'js') ?>
</head>
<body class="min-h-screen mx-auto bg-pine-50">
@ -39,7 +42,10 @@
<?= form_open(
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() ?>
<?= view('_message_block') ?>
@ -61,8 +67,13 @@
<?= button(
lang('Fediverse.' . $action . '.submit'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
[
'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?>
<?= form_close() ?>
</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="viewport" content="width=device-width, initial-scale=1.0"/>
<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>
<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>
<?= form_open(route_to('forgot'), ['class' => 'flex flex-col']) ?>
<?= form_open(route_to('forgot'), [
'class' => 'flex flex-col',
]) ?>
<?= csrf_field() ?>
<?= form_label(lang('Auth.emailAddress'), 'email') ?>
@ -25,8 +27,13 @@
<?= button(
lang('Auth.sendInstructions'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
[
'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?>
<?= form_close() ?>

View File

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

View File

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

View File

@ -10,7 +10,9 @@
<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() ?>
<?= form_label(lang('Auth.token'), 'token') ?>
@ -45,8 +47,13 @@
<?= button(
lang('Auth.resetPassword'),
'',
['variant' => 'primary'],
['type' => 'submit', 'class' => 'self-end'],
[
'variant' => 'primary',
],
[
'type' => 'submit',
'class' => 'self-end',
],
) ?>
<?= 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="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
<?= service('vite')->asset('styles/index.css', 'css') ?>
<?= service('vite')->asset('js/install.ts', 'js') ?>
<?= service('vite')
->asset('styles/index.css', 'css') ?>
<?= service('vite')
->asset('js/install.ts', 'js') ?>
</head>
<body class="flex flex-col min-h-screen mx-auto">

View File

@ -28,15 +28,21 @@
'id' => 'cache_handler',
'name' => 'cache_handler',
'class' => 'form-select mb-6',
'value' => config('Database')->default['DBPrefix'],
'value' => config('Database')
->default['DBPrefix'],
],
) ?>
<?= button(
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() ?>

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