feat: add heading component + update ecs rules to fix views
This commit is contained in:
parent
a50abc138d
commit
23bdc6f8e3
|
@ -1 +1,2 @@
|
|||
/// <reference types="vite/client" />
|
||||
declare module "*";
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use CodeIgniter\CLI\CLI;
|
||||
|
||||
CLI::error('ERROR: ' . $code);
|
||||
|
|
|
@ -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'] ?? [])),
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use CodeIgniter\CodeIgniter;
|
||||
use Config\Services;
|
||||
|
@ -70,9 +70,9 @@ $errorId = uniqid('error', true); ?>
|
|||
<?php if (isset($row['file']) && is_file($row['file'])): ?>
|
||||
<?php
|
||||
if (isset($row['function']) && in_array($row['function'], ['include', 'include_once', 'require', 'require_once'], true)) {
|
||||
echo esc($row['function'] . ' ' . static::cleanPath($row['file']));
|
||||
echo esc($row['function'] . ' ' . static::cleanPath($row['file']));
|
||||
} else {
|
||||
echo esc(static::cleanPath($row['file']) . ' : ' . $row['line']);
|
||||
echo esc(static::cleanPath($row['file']) . ' : ' . $row['line']);
|
||||
}
|
||||
?>
|
||||
<?php else: ?>
|
||||
|
@ -82,7 +82,7 @@ $errorId = uniqid('error', true); ?>
|
|||
<!-- Class/Method -->
|
||||
<?php if (isset($row['class'])) : ?>
|
||||
— <?= 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,9 +91,9 @@ $errorId = uniqid('error', true); ?>
|
|||
<?php
|
||||
$params = null;
|
||||
// Reflection by name is not available for closure function
|
||||
if (!str_ends_with($row['function'], '}')) {
|
||||
$mirror = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']);
|
||||
$params = $mirror->getParameters();
|
||||
if (! str_ends_with($row['function'], '}')) {
|
||||
$mirror = isset($row['class']) ? new ReflectionMethod($row['class'], $row['function']) : new ReflectionFunction($row['function']);
|
||||
$params = $mirror->getParameters();
|
||||
}
|
||||
foreach ($row['args'] as $key => $value): ?>
|
||||
<tr>
|
||||
|
@ -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'])): ?>
|
||||
— <?= esc($row['function']) ?>()
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
@ -132,9 +132,9 @@ $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])) {
|
||||
continue;
|
||||
} ?>
|
||||
<?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) {
|
||||
continue;
|
||||
} ?>
|
||||
|
||||
<h3>$<?= esc($var) ?></h3>
|
||||
|
||||
|
@ -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,9 +234,9 @@ $errorId = uniqid('error', true); ?>
|
|||
|
||||
<?php $empty = true; ?>
|
||||
<?php foreach (['_GET', '_POST', '_COOKIE'] as $var): ?>
|
||||
<?php if (empty($GLOBALS[$var]) || !is_array($GLOBALS[$var])) {
|
||||
continue;
|
||||
} ?>
|
||||
<?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var])) {
|
||||
continue;
|
||||
} ?>
|
||||
|
||||
<?php $empty = false; ?>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -290,11 +290,11 @@ $errorId = uniqid('error', true); ?>
|
|||
<tbody>
|
||||
<?php foreach ($headers as $value): ?>
|
||||
<?php if (empty($value)) {
|
||||
continue;
|
||||
} ?>
|
||||
<?php if (!is_array($value)) {
|
||||
$value = [$value];
|
||||
} ?>
|
||||
continue;
|
||||
} ?>
|
||||
<?php if (! is_array($value)) {
|
||||
$value = [$value];
|
||||
} ?>
|
||||
<?php foreach ($value as $h) : ?>
|
||||
<tr>
|
||||
<td><?= esc($h->getName(), 'html') ?></td>
|
||||
|
@ -389,7 +389,7 @@ $errorId = uniqid('error', true); ?>
|
|||
|
||||
<p>
|
||||
Displayed at <?= esc(date('H:i:sa')) ?> —
|
||||
PHP: <?= esc(phpversion()) ?> —
|
||||
PHP: <?= esc(PHP_VERSION) ?> —
|
||||
CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use CodeIgniter\Pager\PagerRenderer;
|
||||
|
||||
/**
|
||||
* @var PagerRenderer $pager
|
||||
*/
|
||||
/** @var PagerRenderer $pager */
|
||||
$pager->setSurroundCount(2);
|
||||
?>
|
||||
|
||||
|
@ -23,8 +21,8 @@ $pager->setSurroundCount(2);
|
|||
'Pager.previous',
|
||||
) ?>" class="block px-3 py-2 text-gray-700 hover:bg-gray-200 hover:text-black">
|
||||
<span aria-hidden="true"><?= lang(
|
||||
'Pager.previous',
|
||||
) ?></span>
|
||||
'Pager.previous',
|
||||
) ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
@ -48,15 +46,15 @@ $pager->setSurroundCount(2);
|
|||
<?php if ($pager->hasNextPage()): ?>
|
||||
<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">
|
||||
'Pager.next',
|
||||
) ?>" 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">
|
||||
'Pager.last',
|
||||
) ?>" 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
25
ecs.php
|
@ -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/*',
|
||||
]
|
||||
]);
|
||||
|
||||
|
|
|
@ -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: {},
|
||||
|
|
|
@ -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">
|
||||
|
@ -18,13 +22,13 @@
|
|||
<header class="sticky top-0 z-50 flex items-center justify-between h-10 text-white border-b holy-grail__header bg-pine-800 border-pine-900">
|
||||
<div class="inline-flex items-center h-full">
|
||||
<a href="<?= route_to(
|
||||
'admin',
|
||||
) ?>" class="inline-flex items-center h-full px-2 border-r border-pine-900">
|
||||
'admin',
|
||||
) ?>" class="inline-flex items-center h-full px-2 border-r border-pine-900">
|
||||
<?= (isset($podcast) ? icon('arrow-left', 'mr-2') : '') . svg('castopod-logo', 'h-6') ?>
|
||||
</a>
|
||||
<a href="<?= route_to(
|
||||
'home',
|
||||
) ?>" class="inline-flex items-center h-full px-6 text-sm font-semibold outline-none hover:underline focus:ring">
|
||||
'home',
|
||||
) ?>" class="inline-flex items-center h-full px-6 text-sm font-semibold outline-none hover:underline focus:ring">
|
||||
<?= lang('AdminNavigation.go_to_website') ?>
|
||||
<?= icon('external-link', 'ml-1 opacity-60') ?>
|
||||
</a>
|
||||
|
@ -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
|
||||
|
@ -48,14 +53,14 @@
|
|||
data-dropdown="menu"
|
||||
data-dropdown-placement="bottom-end">
|
||||
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
||||
'my-account',
|
||||
) ?>"><?= lang('AdminNavigation.account.my-account') ?></a>
|
||||
'my-account',
|
||||
) ?>"><?= lang('AdminNavigation.account.my-account') ?></a>
|
||||
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
||||
'change-password',
|
||||
) ?>"><?= lang('AdminNavigation.account.change-password') ?></a>
|
||||
'change-password',
|
||||
) ?>"><?= lang('AdminNavigation.account.change-password') ?></a>
|
||||
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
||||
'logout',
|
||||
) ?>"><?= lang('AdminNavigation.account.logout') ?></a>
|
||||
'logout',
|
||||
) ?>"><?= lang('AdminNavigation.account.logout') ?></a>
|
||||
</nav>
|
||||
</header>
|
||||
<aside id="admin-sidebar" class="sticky z-50 flex flex-col text-white transition duration-200 ease-in-out transform -translate-x-full border-r top-10 border-pine-900 bg-pine-800 holy-grail__sidebar md:translate-x-0">
|
||||
|
@ -80,15 +85,15 @@
|
|||
<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(
|
||||
'pageTitle',
|
||||
) ?></h1>
|
||||
<Heading level="1" size="large"><?= $this->renderSection(
|
||||
'pageTitle',
|
||||
) ?></Heading>
|
||||
<?= $this->renderSection('headerLeft') ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap"><?= $this->renderSection(
|
||||
'headerRight',
|
||||
) ?></div>
|
||||
'headerRight',
|
||||
) ?></div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container px-2 py-8 mx-auto md:px-12">
|
||||
|
|
|
@ -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,9 +37,9 @@ $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(
|
||||
'AdminNavigation.' . $item,
|
||||
) ?></a>
|
||||
: ' opacity-75' ?>" href="<?= route_to($item) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang(
|
||||
'AdminNavigation.' . $item,
|
||||
) ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -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',
|
||||
],
|
||||
);
|
||||
},
|
||||
],
|
||||
|
|
|
@ -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 ?>"
|
||||
|
@ -24,12 +25,12 @@ $podcastNavigation = [
|
|||
<div class="flex flex-col items-start flex-1 w-48 px-2">
|
||||
<span class="w-full font-semibold truncate" title="<?= $episode->title ?>"><?= $episode->title ?></span>
|
||||
<a href="<?= route_to(
|
||||
'episode',
|
||||
$podcast->handle,
|
||||
$episode->slug,
|
||||
) ?>" class="inline-flex items-center text-xs outline-none hover:underline focus:ring"><?= lang(
|
||||
'EpisodeNavigation.go_to_page',
|
||||
) ?>
|
||||
'episode',
|
||||
$podcast->handle,
|
||||
$episode->slug,
|
||||
) ?>" 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>
|
||||
|
@ -48,10 +49,10 @@ $podcastNavigation = [
|
|||
<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,
|
||||
$podcast->id,
|
||||
$episode->id
|
||||
) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') .lang('EpisodeNavigation.' . $item) ?></a>
|
||||
$item,
|
||||
$podcast->id,
|
||||
$episode->id
|
||||
) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang('EpisodeNavigation.' . $item) ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
</div>
|
||||
|
||||
<?= form_section(
|
||||
lang('Episode.form.info_section_title'),
|
||||
lang('Episode.form.info_section_subtitle'),
|
||||
) ?>
|
||||
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,15 +62,15 @@
|
|||
|
||||
<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',
|
||||
'class' => 'form-input flex-1 w-0 text-xs',
|
||||
'value' => old('slug'),
|
||||
'required' => 'required',
|
||||
'data-slugify' => 'slug',
|
||||
'slot' => 'slug-input'
|
||||
'id' => 'slug',
|
||||
'name' => 'slug',
|
||||
'class' => 'form-input flex-1 w-0 text-xs',
|
||||
'value' => old('slug'),
|
||||
'required' => 'required',
|
||||
'data-slugify' => 'slug',
|
||||
'slot' => 'slug-input',
|
||||
]) ?>
|
||||
</permalink-edit>
|
||||
|
||||
|
@ -98,89 +98,105 @@
|
|||
</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'],
|
||||
'full',
|
||||
old('type') ? old('type') == 'full' : true,
|
||||
) ?>
|
||||
[
|
||||
'id' => 'full',
|
||||
'name' => 'type',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'full',
|
||||
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'],
|
||||
'trailer',
|
||||
old('type') && old('type') == 'trailer',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'trailer',
|
||||
'name' => 'type',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'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'],
|
||||
'bonus',
|
||||
old('type') && old('type') == 'bonus',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'bonus',
|
||||
'name' => 'type',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'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') ?>
|
||||
</legend>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'undefined',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'undefined',
|
||||
old('parental_advisory')
|
||||
[
|
||||
'id' => 'undefined',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'undefined',
|
||||
old('parental_advisory')
|
||||
? old('parental_advisory') === 'undefined'
|
||||
: true,
|
||||
) ?>
|
||||
) ?>
|
||||
<label for="undefined"><?= lang(
|
||||
'Episode.form.parental_advisory.undefined',
|
||||
) ?></label>
|
||||
'Episode.form.parental_advisory.undefined',
|
||||
) ?></label>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'clean',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'clean',
|
||||
old('parental_advisory') && old('parental_advisory') === 'clean',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'clean',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'clean',
|
||||
old('parental_advisory') && old('parental_advisory') === 'clean',
|
||||
) ?>
|
||||
<label for="clean"><?= lang(
|
||||
'Episode.form.parental_advisory.clean',
|
||||
) ?></label>
|
||||
'Episode.form.parental_advisory.clean',
|
||||
) ?></label>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'explicit',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'explicit',
|
||||
old('parental_advisory') && old('parental_advisory') === 'explicit',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'explicit',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'explicit',
|
||||
old('parental_advisory') && old('parental_advisory') === 'explicit',
|
||||
) ?>
|
||||
<label for="explicit"><?= lang(
|
||||
'Episode.form.parental_advisory.explicit',
|
||||
) ?></label>
|
||||
'Episode.form.parental_advisory.explicit',
|
||||
) ?></label>
|
||||
<?= form_fieldset_close() ?>
|
||||
|
||||
<?= form_section_close() ?>
|
||||
|
||||
|
||||
<?= form_section(
|
||||
lang('Episode.form.show_notes_section_title'),
|
||||
lang('Episode.form.show_notes_section_subtitle'),
|
||||
) ?>
|
||||
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>
|
||||
|
@ -195,9 +211,9 @@
|
|||
<?= form_section_close() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Episode.form.location_section_title'),
|
||||
lang('Episode.form.location_section_subtitle'),
|
||||
) ?>
|
||||
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') .
|
||||
|
@ -226,17 +244,17 @@
|
|||
? 'checked'
|
||||
: '' ?> />
|
||||
<label for="transcript-file-upload-choice"><?= lang(
|
||||
'Common.forms.upload_file',
|
||||
) ?></label>
|
||||
'Common.forms.upload_file',
|
||||
) ?></label>
|
||||
|
||||
<input type="radio" name="transcript-choice" id="transcript-file-remote-url-choice" aria-controls="transcript-file-remote-url-choice" value="remote-url" <?= old(
|
||||
'transcript-choice',
|
||||
) === 'remote-url'
|
||||
'transcript-choice',
|
||||
) === 'remote-url'
|
||||
? 'checked'
|
||||
: '' ?> />
|
||||
<label for="transcript-file-remote-url-choice"><?= lang(
|
||||
'Common.forms.remote_url',
|
||||
) ?></label>
|
||||
'Common.forms.remote_url',
|
||||
) ?></label>
|
||||
|
||||
<div class="py-2 tab-panels">
|
||||
<section id="transcript-file-upload" class="flex items-center tab-panel">
|
||||
|
@ -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') .
|
||||
|
@ -277,17 +297,17 @@
|
|||
? 'checked'
|
||||
: '' ?> />
|
||||
<label for="chapters-file-upload-choice"><?= lang(
|
||||
'Common.forms.upload_file',
|
||||
) ?></label>
|
||||
'Common.forms.upload_file',
|
||||
) ?></label>
|
||||
|
||||
<input type="radio" name="chapters-choice" id="chapters-file-remote-url-choice" aria-controls="chapters-file-remote-url-choice" value="remote-url" <?= old(
|
||||
'chapters-choice',
|
||||
) === 'remote-url'
|
||||
'chapters-choice',
|
||||
) === 'remote-url'
|
||||
? 'checked'
|
||||
: '' ?> />
|
||||
<label for="chapters-file-remote-url-choice"><?= lang(
|
||||
'Common.forms.remote_url',
|
||||
) ?></label>
|
||||
'Common.forms.remote_url',
|
||||
) ?></label>
|
||||
|
||||
<div class="py-2 tab-panels">
|
||||
<section id="chapters-file-upload" class="flex items-center tab-panel">
|
||||
|
@ -318,9 +338,9 @@
|
|||
<?= form_section_close() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Episode.form.advanced_section_title'),
|
||||
lang('Episode.form.advanced_section_subtitle'),
|
||||
) ?>
|
||||
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>
|
||||
|
||||
|
@ -329,11 +349,16 @@
|
|||
<Forms.Toggler id="block" name="block" value="yes" checked="<?= old('block', false) ?>" hint="<?= lang('Episode.form.block_hint') ?>"><?= lang('Episode.form.block') ?></Forms.Toggler>
|
||||
|
||||
<?= button(
|
||||
lang('Episode.form.submit_create'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
['type' => 'submit', 'class' => 'self-end'],
|
||||
) ?>
|
||||
lang('Episode.form.submit_create'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
],
|
||||
) ?>
|
||||
|
||||
<?= form_close() ?>
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
</div>
|
||||
|
||||
<?= form_section(
|
||||
lang('Episode.form.info_section_title'),
|
||||
'<img
|
||||
lang('Episode.form.info_section_title'),
|
||||
'<img
|
||||
src="' .
|
||||
$episode->image->medium_url .
|
||||
'"
|
||||
|
@ -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,93 +103,109 @@
|
|||
</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'],
|
||||
'full',
|
||||
old('type') ? old('type') === 'full' : $episode->type === 'full',
|
||||
) ?>
|
||||
[
|
||||
'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'],
|
||||
'trailer',
|
||||
old('type') ? old('type') === 'trailer' : $episode->type === 'trailer',
|
||||
) ?>
|
||||
[
|
||||
'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'],
|
||||
'bonus',
|
||||
old('type') ? old('type') === 'bonus' : $episode->type === 'bonus',
|
||||
) ?>
|
||||
[
|
||||
'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') ?>
|
||||
</legend>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'undefined',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'undefined',
|
||||
old('parental_advisory')
|
||||
[
|
||||
'id' => 'undefined',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'undefined',
|
||||
old('parental_advisory')
|
||||
? old('parental_advisory') === 'undefined'
|
||||
: $episode->parental_advisory === null,
|
||||
) ?>
|
||||
) ?>
|
||||
<label for="undefined"><?= lang(
|
||||
'Episode.form.parental_advisory.undefined',
|
||||
) ?></label>
|
||||
'Episode.form.parental_advisory.undefined',
|
||||
) ?></label>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'clean',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'clean',
|
||||
old('parental_advisory')
|
||||
[
|
||||
'id' => 'clean',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'clean',
|
||||
old('parental_advisory')
|
||||
? old('parental_advisory') === 'clean'
|
||||
: $episode->parental_advisory === 'clean',
|
||||
) ?>
|
||||
) ?>
|
||||
<label for="clean"><?= lang(
|
||||
'Episode.form.parental_advisory.clean',
|
||||
) ?></label>
|
||||
'Episode.form.parental_advisory.clean',
|
||||
) ?></label>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'explicit',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'explicit',
|
||||
old('parental_advisory')
|
||||
[
|
||||
'id' => 'explicit',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'explicit',
|
||||
old('parental_advisory')
|
||||
? old('parental_advisory') === 'explicit'
|
||||
: $episode->parental_advisory === 'explicit',
|
||||
) ?>
|
||||
) ?>
|
||||
<label for="explicit"><?= lang(
|
||||
'Episode.form.parental_advisory.explicit',
|
||||
) ?></label>
|
||||
'Episode.form.parental_advisory.explicit',
|
||||
) ?></label>
|
||||
<?= form_fieldset_close() ?>
|
||||
|
||||
<?= form_section_close() ?>
|
||||
|
||||
|
||||
<?= form_section(
|
||||
lang('Episode.form.show_notes_section_title'),
|
||||
lang('Episode.form.show_notes_section_subtitle'),
|
||||
) ?>
|
||||
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>
|
||||
|
@ -204,9 +220,9 @@
|
|||
<?= form_section_close() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Episode.form.location_section_title'),
|
||||
lang('Episode.form.location_section_subtitle'),
|
||||
) ?>
|
||||
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') .
|
||||
|
@ -237,30 +255,30 @@
|
|||
? ''
|
||||
: 'checked' ?> />
|
||||
<label for="transcript-file-upload-choice"><?= lang(
|
||||
'Common.forms.upload_file',
|
||||
) ?></label>
|
||||
'Common.forms.upload_file',
|
||||
) ?></label>
|
||||
|
||||
<input type="radio" name="transcript-choice" id="transcript-file-remote-url-choice" aria-controls="transcript-file-remote-url-choice" value="remote-url" <?= $episode->transcript_file_remote_url
|
||||
? 'checked'
|
||||
: '' ?> />
|
||||
<label for="transcript-file-remote-url-choice"><?= lang(
|
||||
'Common.forms.remote_url',
|
||||
) ?></label>
|
||||
'Common.forms.remote_url',
|
||||
) ?></label>
|
||||
|
||||
<div class="py-2 tab-panels">
|
||||
<section id="transcript-file-upload" class="flex items-center tab-panel">
|
||||
<?php if ($episode->transcript_file) : ?>
|
||||
<div class="flex justify-between">
|
||||
<?= anchor(
|
||||
$episode->transcript_file_url,
|
||||
icon('file', 'mr-2 text-gray-500') .
|
||||
$episode->transcript_file_url,
|
||||
icon('file', 'mr-2 text-gray-500') .
|
||||
$episode->transcript_file,
|
||||
[
|
||||
'class' => 'inline-flex items-center text-xs',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noreferrer noopener',
|
||||
],
|
||||
) .
|
||||
[
|
||||
'class' => 'inline-flex items-center text-xs',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noreferrer noopener',
|
||||
],
|
||||
) .
|
||||
anchor(
|
||||
route_to(
|
||||
'transcript-delete',
|
||||
|
@ -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') .
|
||||
|
@ -318,29 +338,29 @@
|
|||
? ''
|
||||
: 'checked' ?> />
|
||||
<label for="chapters-file-upload-choice"><?= lang(
|
||||
'Common.forms.upload_file',
|
||||
) ?></label>
|
||||
'Common.forms.upload_file',
|
||||
) ?></label>
|
||||
|
||||
<input type="radio" name="chapters-choice" id="chapters-file-remote-url-choice" aria-controls="chapters-file-remote-url-choice" value="remote-url" <?= $episode->chapters_file_remote_url
|
||||
? 'checked'
|
||||
: '' ?> />
|
||||
<label for="chapters-file-remote-url-choice"><?= lang(
|
||||
'Common.forms.remote_url',
|
||||
) ?></label>
|
||||
'Common.forms.remote_url',
|
||||
) ?></label>
|
||||
|
||||
<div class="py-2 tab-panels">
|
||||
<section id="chapters-file-upload" class="flex items-center tab-panel">
|
||||
<?php if ($episode->chapters_file) : ?>
|
||||
<div class="flex justify-between">
|
||||
<?= anchor(
|
||||
$episode->chapters_file_url,
|
||||
icon('file', 'mr-2') . $episode->chapters_file,
|
||||
[
|
||||
'class' => 'inline-flex items-center text-xs',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noreferrer noopener',
|
||||
],
|
||||
) .
|
||||
$episode->chapters_file_url,
|
||||
icon('file', 'mr-2') . $episode->chapters_file,
|
||||
[
|
||||
'class' => 'inline-flex items-center text-xs',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noreferrer noopener',
|
||||
],
|
||||
) .
|
||||
anchor(
|
||||
route_to(
|
||||
'chapters-delete',
|
||||
|
@ -390,9 +410,9 @@
|
|||
<?= form_section_close() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Episode.form.advanced_section_title'),
|
||||
lang('Episode.form.advanced_section_subtitle'),
|
||||
) ?>
|
||||
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>
|
||||
|
||||
|
@ -402,17 +422,25 @@
|
|||
|
||||
<div class="flex items-center justify-between">
|
||||
<?= button(
|
||||
lang('Episode.delete'),
|
||||
route_to('episode-delete', $podcast->id, $episode->id),
|
||||
['variant' => 'danger', 'iconLeft' => 'delete-bin'],
|
||||
) ?>
|
||||
lang('Episode.delete'),
|
||||
route_to('episode-delete', $podcast->id, $episode->id),
|
||||
[
|
||||
'variant' => 'danger',
|
||||
'iconLeft' => 'delete-bin',
|
||||
],
|
||||
) ?>
|
||||
|
||||
<?= button(
|
||||
lang('Episode.form.submit_edit'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
['type' => 'submit', 'class' => 'self-end'],
|
||||
) ?>
|
||||
lang('Episode.form.submit_edit'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
|
||||
<?= form_close() ?>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<button style="<?= $theme[
|
||||
'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(
|
||||
$themeKey,
|
||||
) ?>"></button>
|
||||
"Episode.embeddable_player.{$themeKey}",
|
||||
) ?>" data-type="theme-picker" data-url="<?= $episode->getEmbeddablePlayerUrl(
|
||||
$themeKey,
|
||||
) ?>"></button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
|
@ -28,38 +28,48 @@
|
|||
|
||||
<div class="flex items-center w-full mt-8">
|
||||
<?= form_textarea(
|
||||
[
|
||||
'id' => 'iframe',
|
||||
'name' => 'iframe',
|
||||
'class' => 'form-textarea w-full h-20 mr-2',
|
||||
],
|
||||
"<iframe width=\"100%\" height=\"280\" frameborder=\"0\" scrolling=\"no\" style=\"width: 100%; height: 280px; overflow: hidden;\" src=\"{$episode->embeddable_player_url}\"></iframe>",
|
||||
) ?>
|
||||
[
|
||||
'id' => 'iframe',
|
||||
'name' => 'iframe',
|
||||
'class' => 'form-textarea w-full h-20 mr-2',
|
||||
],
|
||||
"<iframe width=\"100%\" height=\"280\" frameborder=\"0\" scrolling=\"no\" style=\"width: 100%; height: 280px; overflow: hidden;\" src=\"{$episode->embeddable_player_url}\"></iframe>",
|
||||
) ?>
|
||||
<?= icon_button(
|
||||
'file-copy',
|
||||
lang('Episode.embeddable_player.clipboard_iframe'),
|
||||
'',
|
||||
['variant' => 'default'],
|
||||
['data-type' => 'clipboard-copy', 'data-clipboard-target' => 'iframe'],
|
||||
) ?>
|
||||
'file-copy',
|
||||
lang('Episode.embeddable_player.clipboard_iframe'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'default',
|
||||
],
|
||||
[
|
||||
'data-type' => 'clipboard-copy',
|
||||
'data-clipboard-target' => 'iframe',
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center w-full mt-4">
|
||||
<?= form_textarea(
|
||||
[
|
||||
'id' => 'url',
|
||||
'name' => 'url',
|
||||
'class' => 'form-textarea w-full h-10 mr-2',
|
||||
],
|
||||
$episode->embeddable_player_url,
|
||||
) ?>
|
||||
[
|
||||
'id' => 'url',
|
||||
'name' => 'url',
|
||||
'class' => 'form-textarea w-full h-10 mr-2',
|
||||
],
|
||||
$episode->embeddable_player_url,
|
||||
) ?>
|
||||
<?= icon_button(
|
||||
'file-copy',
|
||||
lang('Episode.embeddable_player.clipboard_url'),
|
||||
'',
|
||||
['variant' => 'default'],
|
||||
['data-type' => 'clipboard-copy', 'data-clipboard-target' => 'url'],
|
||||
) ?>
|
||||
'file-copy',
|
||||
lang('Episode.embeddable_player.clipboard_url'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'default',
|
||||
],
|
||||
[
|
||||
'data-type' => 'clipboard-copy',
|
||||
'data-clipboard-target' => 'url',
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -26,102 +26,102 @@
|
|||
</p>
|
||||
|
||||
<?= data_table(
|
||||
[
|
||||
[
|
||||
'header' => lang('Episode.list.episode'),
|
||||
'cell' => function ($episode, $podcast) {
|
||||
return '<div class="flex">' .
|
||||
'<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,
|
||||
) .
|
||||
'</time>' .
|
||||
'<img loading="lazy" src="' . $episode->image->thumbnail_url . '" alt="' . $episode->title . '" class="object-cover w-20 h-20 rounded-lg" />' .
|
||||
'</div>' .
|
||||
'<a class="text-sm hover:underline" href="' . route_to(
|
||||
'episode-view',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) . '">' .
|
||||
'<h2 class="inline-flex w-full font-semibold leading-none group">' .
|
||||
episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs font-semibold text-gray-600',
|
||||
true,
|
||||
) .
|
||||
'<span class="mx-1">-</span>' .
|
||||
'<span class="mr-1 group-hover:underline">' . $episode->title . '</span>' .
|
||||
'</h2>' .
|
||||
'<p class="max-w-sm text-xs text-gray-600 line-clamp-2">' . $episode->description . '</p>' .
|
||||
'</a>' .
|
||||
'</div>';
|
||||
},
|
||||
[
|
||||
'header' => lang('Episode.list.episode'),
|
||||
'cell' => function ($episode, $podcast) {
|
||||
return '<div class="flex">' .
|
||||
'<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,
|
||||
) .
|
||||
'</time>' .
|
||||
'<img loading="lazy" src="' . $episode->image->thumbnail_url . '" alt="' . $episode->title . '" class="object-cover w-20 h-20 rounded-lg" />' .
|
||||
'</div>' .
|
||||
'<a class="text-sm hover:underline" href="' . route_to(
|
||||
'episode-view',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) . '">' .
|
||||
'<h2 class="inline-flex w-full font-semibold leading-none group">' .
|
||||
episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs font-semibold text-gray-600',
|
||||
true,
|
||||
) .
|
||||
'<span class="mx-1">-</span>' .
|
||||
'<span class="mr-1 group-hover:underline">' . $episode->title . '</span>' .
|
||||
'</h2>' .
|
||||
'<p class="max-w-sm text-xs text-gray-600 line-clamp-2">' . $episode->description . '</p>' .
|
||||
'</a>' .
|
||||
'</div>';
|
||||
},
|
||||
],
|
||||
[
|
||||
'header' => lang('Episode.list.visibility'),
|
||||
'cell' => function ($episode): string {
|
||||
return publication_pill(
|
||||
$episode->published_at,
|
||||
$episode->publication_status,
|
||||
);
|
||||
},
|
||||
],
|
||||
[
|
||||
'header' => lang('Episode.list.comments'),
|
||||
'cell' => function ($episode): int {
|
||||
return $episode->comments_count;
|
||||
},
|
||||
],
|
||||
[
|
||||
'header' => lang('Episode.list.actions'),
|
||||
'cell' => function ($episode, $podcast) {
|
||||
return '<button id="more-dropdown-<?= $episode->id ?>" type="button" class="inline-flex items-center p-1 outline-none focus:ring" data-dropdown="button" data-dropdown-target="more-dropdown-<?= $episode->id ?>-menu" aria-haspopup="true" aria-expanded="false">' .
|
||||
icon('more') .
|
||||
'</button>' .
|
||||
'<nav id="more-dropdown-<?= $episode->id ?>-menu" class="flex flex-col py-2 text-black whitespace-no-wrap bg-white border rounded shadow" aria-labelledby="more-dropdown-<?= $episode->id ?>" data-dropdown="menu" data-dropdown-placement="bottom-start" data-dropdown-offset-x="0" data-dropdown-offset-y="-24">' .
|
||||
'<a class="px-4 py-1 hover:bg-gray-100" href="' . route_to(
|
||||
'episode-edit',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) . '">' . 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(
|
||||
'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>' .
|
||||
'<a class="px-4 py-1 hover:bg-gray-100" href="' . route_to(
|
||||
'soundbites-edit',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) . '">' . lang('Episode.soundbites') . '</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>' .
|
||||
'<a class="px-4 py-1 hover:bg-gray-100" href="' . route_to(
|
||||
'episode-delete',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) . '">' . lang('Episode.delete') . '</a>' .
|
||||
'</nav>' .
|
||||
'</div>';
|
||||
},
|
||||
],
|
||||
],
|
||||
[
|
||||
'header' => lang('Episode.list.visibility'),
|
||||
'cell' => function ($episode): string {
|
||||
return publication_pill(
|
||||
$episode->published_at,
|
||||
$episode->publication_status,
|
||||
);
|
||||
},
|
||||
],
|
||||
[
|
||||
'header' => lang('Episode.list.comments'),
|
||||
'cell' => function ($episode): int {
|
||||
return $episode->comments_count;
|
||||
},
|
||||
],
|
||||
[
|
||||
'header' => lang('Episode.list.actions'),
|
||||
'cell' => function ($episode, $podcast) {
|
||||
return '<button id="more-dropdown-<?= $episode->id ?>" type="button" class="inline-flex items-center p-1 outline-none focus:ring" data-dropdown="button" data-dropdown-target="more-dropdown-<?= $episode->id ?>-menu" aria-haspopup="true" aria-expanded="false">' .
|
||||
icon('more') .
|
||||
'</button>' .
|
||||
'<nav id="more-dropdown-<?= $episode->id ?>-menu" class="flex flex-col py-2 text-black whitespace-no-wrap bg-white border rounded shadow" aria-labelledby="more-dropdown-<?= $episode->id ?>" data-dropdown="menu" data-dropdown-placement="bottom-start" data-dropdown-offset-x="0" data-dropdown-offset-y="-24">' .
|
||||
'<a class="px-4 py-1 hover:bg-gray-100" href="' . route_to(
|
||||
'episode-edit',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) . '">' . 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(
|
||||
'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>' .
|
||||
'<a class="px-4 py-1 hover:bg-gray-100" href="' . route_to(
|
||||
'soundbites-edit',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) . '">' . lang('Episode.soundbites') . '</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>' .
|
||||
'<a class="px-4 py-1 hover:bg-gray-100" href="' . route_to(
|
||||
'episode-delete',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) . '">' . lang('Episode.delete') . '</a>' .
|
||||
'</nav>' .
|
||||
'</div>';
|
||||
},
|
||||
],
|
||||
],
|
||||
$episodes,
|
||||
'mb-6',
|
||||
$podcast
|
||||
) ?>
|
||||
$episodes,
|
||||
'mb-6',
|
||||
$podcast
|
||||
) ?>
|
||||
|
||||
<?= $pager->links() ?>
|
||||
|
||||
|
|
|
@ -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() ?>
|
||||
|
||||
|
|
|
@ -14,45 +14,49 @@
|
|||
<?= 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') ?>
|
||||
|
||||
|
||||
<label for="message" class="text-lg font-semibold"><?= lang(
|
||||
'Episode.publish_form.post',
|
||||
) ?></label>
|
||||
'Episode.publish_form.post',
|
||||
) ?></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">
|
||||
<img src="<?= $podcast->actor->avatar_image_url ?>" alt="<?= $podcast
|
||||
->actor->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
->actor->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
<p class="flex items-baseline min-w-0">
|
||||
<span class="mr-2 font-semibold truncate"><?= $podcast->actor
|
||||
->display_name ?></span>
|
||||
->display_name ?></span>
|
||||
<span class="text-sm text-gray-500 truncate">@<?= $podcast->actor
|
||||
->username ?></span>
|
||||
->username ?></span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="px-4 mb-2">
|
||||
<?= form_textarea(
|
||||
[
|
||||
'id' => 'message',
|
||||
'name' => 'message',
|
||||
'class' => 'form-textarea min-w-0 w-full',
|
||||
'placeholder' => 'Write your message...',
|
||||
'autofocus' => ''
|
||||
],
|
||||
old('message', '', false),
|
||||
['rows' => 2],
|
||||
) ?>
|
||||
[
|
||||
'id' => 'message',
|
||||
'name' => 'message',
|
||||
'class' => 'form-textarea min-w-0 w-full',
|
||||
'placeholder' => 'Write your message...',
|
||||
'autofocus' => '',
|
||||
],
|
||||
old('message', '', false),
|
||||
[
|
||||
'rows' => 2,
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<img src="<?= $episode->image->thumbnail_url ?>" alt="<?= $episode->title ?>" class="w-24 h-24" />
|
||||
|
@ -61,11 +65,11 @@
|
|||
<div class="flex items-baseline">
|
||||
<span class="flex-1 w-0 mr-2 text-sm font-semibold truncate"><?= $episode->title ?></span>
|
||||
<?= episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs font-semibold text-gray-600',
|
||||
true,
|
||||
) ?>
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs font-semibold text-gray-600',
|
||||
true,
|
||||
) ?>
|
||||
</div>
|
||||
<div class="text-xs text-gray-600">
|
||||
<time datetime="PT<?= $episode->audio_file_duration ?>S">
|
||||
|
@ -78,59 +82,61 @@
|
|||
</div>
|
||||
<footer class="flex justify-around px-6 py-3">
|
||||
<span class="inline-flex items-center"><?= icon(
|
||||
'chat',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
'chat',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
<span class="inline-flex items-center"><?= icon(
|
||||
'repeat',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
'repeat',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
<span class="inline-flex items-center"><?= icon(
|
||||
'heart',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
'heart',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
</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>
|
||||
'Episode.publish_form.publication_date',
|
||||
) ?></legend>
|
||||
<label for="now" class="inline-flex items-center">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'now',
|
||||
'name' => 'publication_method',
|
||||
'class' => 'text-pine-700',
|
||||
],
|
||||
'now',
|
||||
old('publication_method') ? old('publish') === 'now' : true,
|
||||
) ?>
|
||||
[
|
||||
'id' => 'now',
|
||||
'name' => 'publication_method',
|
||||
'class' => 'text-pine-700',
|
||||
],
|
||||
'now',
|
||||
old('publication_method') ? old('publish') === 'now' : true,
|
||||
) ?>
|
||||
<span class="ml-2"><?= lang(
|
||||
'Episode.publish_form.publication_method.now',
|
||||
) ?></span>
|
||||
'Episode.publish_form.publication_method.now',
|
||||
) ?></span>
|
||||
</label>
|
||||
<div class="inline-flex flex-wrap items-center radio-toggler">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'schedule',
|
||||
'name' => 'publication_method',
|
||||
'class' => 'text-pine-700',
|
||||
],
|
||||
'schedule',
|
||||
old('publication_method') &&
|
||||
[
|
||||
'id' => 'schedule',
|
||||
'name' => 'publication_method',
|
||||
'class' => 'text-pine-700',
|
||||
],
|
||||
'schedule',
|
||||
old('publication_method') &&
|
||||
old('publication_method') === 'schedule',
|
||||
) ?>
|
||||
) ?>
|
||||
<label for="schedule" class="ml-2"><?= lang(
|
||||
'Episode.publish_form.publication_method.schedule',
|
||||
) ?></label>
|
||||
'Episode.publish_form.publication_method.schedule',
|
||||
) ?></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'),
|
||||
) ?>
|
||||
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',
|
||||
|
@ -140,8 +146,8 @@
|
|||
'data-input' => '',
|
||||
]) ?>
|
||||
<button class="p-3 border border-l-0 border-gray-500 bg-pine-100 focus:outline-none rounded-r-md hover:bg-pine-200 focus:ring" type="button" title="<?= lang(
|
||||
'Episode.publish_form.scheduled_publication_date_clear',
|
||||
) ?>" data-clear=""><?= icon('close') ?></button>
|
||||
'Episode.publish_form.scheduled_publication_date_clear',
|
||||
) ?>" data-clear=""><?= icon('close') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -150,26 +156,28 @@
|
|||
<div id="publish-warning" class="inline-flex flex-col hidden p-4 text-black bg-yellow-300 border-2 border-yellow-900 rounded-md" role="alert">
|
||||
<p class="flex items-baseline font-semibold">
|
||||
<?= icon('alert', 'mr-2 text-lg flex-shrink-0') . lang(
|
||||
'Episode.publish_form.message_warning',
|
||||
) ?></p>
|
||||
'Episode.publish_form.message_warning',
|
||||
) ?></p>
|
||||
<p>
|
||||
<?= lang(
|
||||
'Episode.publish_form.message_warning_hint',
|
||||
) ?>
|
||||
'Episode.publish_form.message_warning_hint',
|
||||
) ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?= button(
|
||||
lang('Episode.publish_form.submit'),
|
||||
'',
|
||||
['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')
|
||||
],
|
||||
) ?>
|
||||
lang('Episode.publish_form.submit'),
|
||||
'',
|
||||
[
|
||||
'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'),
|
||||
],
|
||||
) ?>
|
||||
|
||||
<?= form_close() ?>
|
||||
|
||||
|
|
|
@ -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') ?>
|
||||
|
@ -27,8 +29,8 @@
|
|||
|
||||
|
||||
<label for="message" class="text-lg font-semibold"><?= lang(
|
||||
'Episode.publish_form.post',
|
||||
) ?></label>
|
||||
'Episode.publish_form.post',
|
||||
) ?></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">
|
||||
|
@ -43,30 +45,32 @@
|
|||
</div>
|
||||
<div class="px-4 mb-2">
|
||||
<?= form_textarea(
|
||||
[
|
||||
'id' => 'message',
|
||||
'name' => 'message',
|
||||
'class' => 'form-textarea',
|
||||
'placeholder' => 'Write your message...',
|
||||
'autofocus' => ''
|
||||
],
|
||||
old('message', $post->message, false),
|
||||
['rows' => 2],
|
||||
) ?>
|
||||
[
|
||||
'id' => 'message',
|
||||
'name' => 'message',
|
||||
'class' => 'form-textarea',
|
||||
'placeholder' => 'Write your message...',
|
||||
'autofocus' => '',
|
||||
],
|
||||
old('message', $post->message, false),
|
||||
[
|
||||
'rows' => 2,
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<img src="<?= $episode->image
|
||||
->thumbnail_url ?>" alt="<?= $episode->title ?>" class="w-24 h-24" />
|
||||
->thumbnail_url ?>" alt="<?= $episode->title ?>" class="w-24 h-24" />
|
||||
<div class="flex flex-col flex-1">
|
||||
<a href="<?= $episode->link ?>" class="flex-1 px-4 py-2 bg-gray-100">
|
||||
<div class="flex items-baseline">
|
||||
<span class="flex-1 w-0 mr-2 text-sm font-semibold truncate"><?= $episode->title ?></span>
|
||||
<?= episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs font-semibold text-gray-600',
|
||||
true,
|
||||
) ?>
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs font-semibold text-gray-600',
|
||||
true,
|
||||
) ?>
|
||||
</div>
|
||||
<div class="text-xs text-gray-600">
|
||||
<?= relative_time($episode->published_at) ?>
|
||||
|
@ -81,60 +85,62 @@
|
|||
</div>
|
||||
<footer class="flex justify-around px-6 py-3">
|
||||
<span class="inline-flex items-center"><?= icon(
|
||||
'chat',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
'chat',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
<span class="inline-flex items-center"><?= icon(
|
||||
'repeat',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
'repeat',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
<span class="inline-flex items-center"><?= icon(
|
||||
'heart',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
'heart',
|
||||
'text-xl mr-1 text-gray-400',
|
||||
) . '0' ?></span>
|
||||
</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>
|
||||
'Episode.publish_form.publication_date',
|
||||
) ?></legend>
|
||||
<label for="now" class="inline-flex items-center">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'now',
|
||||
'name' => 'publication_method',
|
||||
'class' => 'text-pine-700',
|
||||
],
|
||||
'now',
|
||||
old('publication_method') && old('publish') === 'now',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'now',
|
||||
'name' => 'publication_method',
|
||||
'class' => 'text-pine-700',
|
||||
],
|
||||
'now',
|
||||
old('publication_method') && old('publish') === 'now',
|
||||
) ?>
|
||||
<span class="ml-2"><?= lang(
|
||||
'Episode.publish_form.publication_method.now',
|
||||
) ?></span>
|
||||
'Episode.publish_form.publication_method.now',
|
||||
) ?></span>
|
||||
</label>
|
||||
<div class="inline-flex flex-wrap items-center radio-toggler">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'schedule',
|
||||
'name' => 'publication_method',
|
||||
'class' => 'text-pine-700',
|
||||
],
|
||||
'schedule',
|
||||
old('publication_method')
|
||||
[
|
||||
'id' => 'schedule',
|
||||
'name' => 'publication_method',
|
||||
'class' => 'text-pine-700',
|
||||
],
|
||||
'schedule',
|
||||
old('publication_method')
|
||||
? old('publication_method') === 'schedule'
|
||||
: true,
|
||||
) ?>
|
||||
) ?>
|
||||
<label for="schedule" class="ml-2"><?= lang(
|
||||
'Episode.publish_form.publication_method.schedule',
|
||||
) ?></label>
|
||||
'Episode.publish_form.publication_method.schedule',
|
||||
) ?></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'),
|
||||
) ?>
|
||||
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',
|
||||
|
@ -159,32 +165,36 @@
|
|||
<div id="publish-warning" class="inline-flex flex-col hidden p-4 text-black bg-yellow-300 border-2 border-yellow-900 rounded-md" role="alert">
|
||||
<p class="flex items-baseline font-semibold">
|
||||
<?= icon('alert', 'mr-2 text-lg flex-shrink-0') . lang(
|
||||
'Episode.publish_form.message_warning',
|
||||
) ?></p>
|
||||
'Episode.publish_form.message_warning',
|
||||
) ?></p>
|
||||
<p>
|
||||
<?= lang(
|
||||
'Episode.publish_form.message_warning_hint',
|
||||
) ?>
|
||||
'Episode.publish_form.message_warning_hint',
|
||||
) ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between w-full mt-4">
|
||||
<?= 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'],
|
||||
) ?>
|
||||
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',
|
||||
],
|
||||
) ?>
|
||||
|
||||
<?= button(
|
||||
lang('Episode.publish_form.submit_edit'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'data-btn-text-warning' => lang('Episode.publish_form.message_warning_submit'),
|
||||
'data-btn-text' => lang('Episode.publish_form.submit_edit')
|
||||
],
|
||||
) ?>
|
||||
lang('Episode.publish_form.submit_edit'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'data-btn-text-warning' => lang('Episode.publish_form.message_warning_submit'),
|
||||
'data-btn-text' => lang('Episode.publish_form.submit_edit'),
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
|
||||
<?= form_close() ?>
|
||||
|
|
|
@ -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() ?>
|
||||
|
||||
|
@ -27,24 +30,24 @@
|
|||
<tr>
|
||||
<th class="w-3/12 px-1 py-2">
|
||||
<?= form_label(
|
||||
lang('Episode.soundbites_form.start_time'),
|
||||
'start_time',
|
||||
[],
|
||||
lang('Episode.soundbites_form.start_time_hint'),
|
||||
) ?></th>
|
||||
lang('Episode.soundbites_form.start_time'),
|
||||
'start_time',
|
||||
[],
|
||||
lang('Episode.soundbites_form.start_time_hint'),
|
||||
) ?></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>
|
||||
lang('Episode.soundbites_form.duration'),
|
||||
'duration',
|
||||
[],
|
||||
lang('Episode.soundbites_form.duration_hint'),
|
||||
) ?></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>
|
||||
lang('Episode.soundbites_form.label'),
|
||||
'label',
|
||||
[],
|
||||
lang('Episode.soundbites_form.label_hint'),
|
||||
true,
|
||||
) ?></th>
|
||||
<th class="w-1/12 px-1 py-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -52,124 +55,130 @@
|
|||
<?php foreach ($episode->soundbites as $soundbite): ?>
|
||||
<tr>
|
||||
<td class="px-1 py-2 font-medium bg-white border border-light-blue-500"><?= form_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => $episode->audio_file_duration,
|
||||
'step' => 'any',
|
||||
'id' => "soundbites[{$soundbite->id}][start_time]",
|
||||
'name' => "soundbites[{$soundbite->id}][start_time]",
|
||||
'class' => 'form-input w-full border-none text-center',
|
||||
'value' => $soundbite->start_time,
|
||||
'data-type' => 'soundbite-field',
|
||||
'data-field-type' => 'start-time',
|
||||
'data-soundbite-id' => $soundbite->id,
|
||||
'required' => 'required',
|
||||
],
|
||||
) ?></td>
|
||||
[
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => $episode->audio_file_duration,
|
||||
'step' => 'any',
|
||||
'id' => "soundbites[{$soundbite->id}][start_time]",
|
||||
'name' => "soundbites[{$soundbite->id}][start_time]",
|
||||
'class' => 'form-input w-full border-none text-center',
|
||||
'value' => $soundbite->start_time,
|
||||
'data-type' => 'soundbite-field',
|
||||
'data-field-type' => 'start-time',
|
||||
'data-soundbite-id' => $soundbite->id,
|
||||
'required' => 'required',
|
||||
],
|
||||
) ?></td>
|
||||
<td class="px-1 py-2 font-medium bg-white border border-light-blue-500"><?= form_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => $episode->audio_file_duration,
|
||||
'step' => 'any',
|
||||
'id' => "soundbites[{$soundbite->id}][duration]",
|
||||
'name' => "soundbites[{$soundbite->id}][duration]",
|
||||
'class' => 'form-input w-full border-none text-center',
|
||||
'value' => $soundbite->duration,
|
||||
'data-type' => 'soundbite-field',
|
||||
'data-field-type' => 'duration',
|
||||
'data-soundbite-id' => $soundbite->id,
|
||||
'required' => 'required',
|
||||
],
|
||||
) ?></td>
|
||||
[
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => $episode->audio_file_duration,
|
||||
'step' => 'any',
|
||||
'id' => "soundbites[{$soundbite->id}][duration]",
|
||||
'name' => "soundbites[{$soundbite->id}][duration]",
|
||||
'class' => 'form-input w-full border-none text-center',
|
||||
'value' => $soundbite->duration,
|
||||
'data-type' => 'soundbite-field',
|
||||
'data-field-type' => 'duration',
|
||||
'data-soundbite-id' => $soundbite->id,
|
||||
'required' => 'required',
|
||||
],
|
||||
) ?></td>
|
||||
<td class="px-1 py-2 font-medium bg-white border border-light-blue-500"><?= form_input(
|
||||
[
|
||||
'id' => "soundbites[{$soundbite->id}][label]",
|
||||
'name' => "soundbites[{$soundbite->id}][label]",
|
||||
'class' => 'form-input w-full border-none',
|
||||
'value' => $soundbite->label,
|
||||
],
|
||||
) ?></td>
|
||||
[
|
||||
'id' => "soundbites[{$soundbite->id}][label]",
|
||||
'name' => "soundbites[{$soundbite->id}][label]",
|
||||
'class' => 'form-input w-full border-none',
|
||||
'value' => $soundbite->label,
|
||||
],
|
||||
) ?></td>
|
||||
<td class="px-4 py-2"><?= icon_button(
|
||||
'play',
|
||||
lang('Episode.soundbites_form.play'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
[
|
||||
'class' => 'mb-1 mr-1',
|
||||
'data-type' => 'play-soundbite',
|
||||
'data-soundbite-id' => $soundbite->id,
|
||||
'data-soundbite-start-time' => $soundbite->start_time,
|
||||
'data-soundbite-duration' => $soundbite->duration,
|
||||
],
|
||||
) ?>
|
||||
'play',
|
||||
lang('Episode.soundbites_form.play'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'class' => 'mb-1 mr-1',
|
||||
'data-type' => 'play-soundbite',
|
||||
'data-soundbite-id' => $soundbite->id,
|
||||
'data-soundbite-start-time' => $soundbite->start_time,
|
||||
'data-soundbite-duration' => $soundbite->duration,
|
||||
],
|
||||
) ?>
|
||||
<?= icon_button(
|
||||
'delete-bin',
|
||||
lang('Episode.soundbites_form.delete'),
|
||||
route_to(
|
||||
'soundbite-delete',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
$soundbite->id,
|
||||
),
|
||||
['variant' => 'danger'],
|
||||
[],
|
||||
) ?>
|
||||
'delete-bin',
|
||||
lang('Episode.soundbites_form.delete'),
|
||||
route_to(
|
||||
'soundbite-delete',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
$soundbite->id,
|
||||
),
|
||||
[
|
||||
'variant' => 'danger',
|
||||
],
|
||||
[],
|
||||
) ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td class="px-1 py-4 font-medium bg-white border border-light-blue-500"><?= form_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => $episode->audio_file_duration,
|
||||
'step' => 'any',
|
||||
'id' => 'soundbites[0][start_time]',
|
||||
'name' => 'soundbites[0][start_time]',
|
||||
'class' => 'form-input w-full border-none text-center',
|
||||
'value' => old('start_time'),
|
||||
'data-soundbite-id' => '0',
|
||||
'data-type' => 'soundbite-field',
|
||||
'data-field-type' => 'start-time',
|
||||
],
|
||||
) ?></td>
|
||||
[
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => $episode->audio_file_duration,
|
||||
'step' => 'any',
|
||||
'id' => 'soundbites[0][start_time]',
|
||||
'name' => 'soundbites[0][start_time]',
|
||||
'class' => 'form-input w-full border-none text-center',
|
||||
'value' => old('start_time'),
|
||||
'data-soundbite-id' => '0',
|
||||
'data-type' => 'soundbite-field',
|
||||
'data-field-type' => 'start-time',
|
||||
],
|
||||
) ?></td>
|
||||
<td class="px-1 py-4 font-medium bg-white border border-light-blue-500"><?= form_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => $episode->audio_file_duration,
|
||||
'step' => 'any',
|
||||
'id' => 'soundbites[0][duration]',
|
||||
'name' => 'soundbites[0][duration]',
|
||||
'class' => 'form-input w-full border-none text-center',
|
||||
'value' => old('duration'),
|
||||
'data-soundbite-id' => '0',
|
||||
'data-type' => 'soundbite-field',
|
||||
'data-field-type' => 'duration',
|
||||
],
|
||||
) ?></td>
|
||||
[
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => $episode->audio_file_duration,
|
||||
'step' => 'any',
|
||||
'id' => 'soundbites[0][duration]',
|
||||
'name' => 'soundbites[0][duration]',
|
||||
'class' => 'form-input w-full border-none text-center',
|
||||
'value' => old('duration'),
|
||||
'data-soundbite-id' => '0',
|
||||
'data-type' => 'soundbite-field',
|
||||
'data-field-type' => 'duration',
|
||||
],
|
||||
) ?></td>
|
||||
<td class="px-1 py-4 font-medium bg-white border border-light-blue-500"><?= form_input(
|
||||
[
|
||||
'id' => 'soundbites[0][label]',
|
||||
'name' => 'soundbites[0][label]',
|
||||
'class' => 'form-input w-full border-none',
|
||||
'value' => old('label'),
|
||||
],
|
||||
) ?></td>
|
||||
[
|
||||
'id' => 'soundbites[0][label]',
|
||||
'name' => 'soundbites[0][label]',
|
||||
'class' => 'form-input w-full border-none',
|
||||
'value' => old('label'),
|
||||
],
|
||||
) ?></td>
|
||||
<td class="px-4 py-2"><?= icon_button(
|
||||
'play',
|
||||
lang('Episode.soundbites_form.play'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
[
|
||||
'data-type' => 'play-soundbite',
|
||||
'data-soundbite-id' => 0,
|
||||
'data-soundbite-start-time' => 0,
|
||||
'data-soundbite-duration' => 0,
|
||||
],
|
||||
) ?>
|
||||
'play',
|
||||
lang('Episode.soundbites_form.play'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'data-type' => 'play-soundbite',
|
||||
'data-soundbite-id' => 0,
|
||||
'data-soundbite-start-time' => 0,
|
||||
'data-soundbite-duration' => 0,
|
||||
],
|
||||
) ?>
|
||||
|
||||
|
||||
</td>
|
||||
|
@ -180,16 +189,18 @@
|
|||
Your browser does not support the audio tag.
|
||||
</audio>
|
||||
</td><td class="px-4 py-2"><?= icon_button(
|
||||
'timer',
|
||||
lang('Episode.soundbites_form.bookmark'),
|
||||
'',
|
||||
['variant' => 'info'],
|
||||
[
|
||||
'data-type' => 'get-soundbite',
|
||||
'data-start-time-field-name' => 'soundbites[0][start_time]',
|
||||
'data-duration-field-name' => 'soundbites[0][duration]',
|
||||
],
|
||||
) ?></td></tr>
|
||||
'timer',
|
||||
lang('Episode.soundbites_form.bookmark'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'info',
|
||||
],
|
||||
[
|
||||
'data-type' => 'get-soundbite',
|
||||
'data-start-time-field-name' => 'soundbites[0][start_time]',
|
||||
'data-duration-field-name' => 'soundbites[0][duration]',
|
||||
],
|
||||
) ?></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() ?>
|
||||
|
|
|
@ -21,15 +21,15 @@
|
|||
|
||||
<label for="understand" class="inline-flex items-center mb-4">
|
||||
<?= form_checkbox(
|
||||
[
|
||||
'id' => 'understand',
|
||||
'name' => 'understand',
|
||||
'class' => 'text-pine-700',
|
||||
'required' => 'required',
|
||||
],
|
||||
'yes',
|
||||
old('understand', false),
|
||||
) ?>
|
||||
[
|
||||
'id' => 'understand',
|
||||
'name' => 'understand',
|
||||
'class' => 'text-pine-700',
|
||||
'required' => 'required',
|
||||
],
|
||||
'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>
|
||||
|
||||
|
|
|
@ -33,22 +33,23 @@
|
|||
|
||||
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<Charts.XY title="<?= lang('Charts.episode_by_day') ?>" dataUrl="<?= route_to(
|
||||
'analytics-filtered-data',
|
||||
$podcast->id,
|
||||
'PodcastByEpisode',
|
||||
'ByDay',
|
||||
$episode->id,
|
||||
) ?>"/>
|
||||
'analytics-filtered-data',
|
||||
$podcast->id,
|
||||
'PodcastByEpisode',
|
||||
'ByDay',
|
||||
$episode->id,
|
||||
) ?>"/>
|
||||
|
||||
<Charts.XY title="<?= lang('Charts.episode_by_month') ?>" dataUrl="<?= route_to(
|
||||
'analytics-filtered-data',
|
||||
$podcast->id,
|
||||
'PodcastByEpisode',
|
||||
'ByMonth',
|
||||
$episode->id,
|
||||
) ?>"/>
|
||||
'analytics-filtered-data',
|
||||
$podcast->id,
|
||||
'PodcastByEpisode',
|
||||
'ByMonth',
|
||||
$episode->id,
|
||||
) ?>"/>
|
||||
</div>
|
||||
|
||||
|
||||
<?= service('vite')->asset('js/charts.ts', 'js') ?>
|
||||
<?= service('vite')
|
||||
->asset('js/charts.ts', 'js') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<?= view('_partials/_user_info.php', ['user' => user()]) ?>
|
||||
<?= view('_partials/_user_info.php', [
|
||||
'user' => user(),
|
||||
]) ?>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -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',
|
||||
],
|
||||
);
|
||||
},
|
||||
],
|
||||
|
|
|
@ -83,8 +83,13 @@
|
|||
<?= button(
|
||||
lang('Person.form.submit_create'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
['type' => 'submit', 'class' => 'self-end'],
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
],
|
||||
) ?>
|
||||
|
||||
|
||||
|
|
|
@ -84,8 +84,13 @@
|
|||
<?= button(
|
||||
lang('Person.form.submit_edit'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
['type' => 'submit', 'class' => 'self-end'],
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
],
|
||||
) ?>
|
||||
|
||||
|
||||
|
|
|
@ -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() ?>
|
||||
|
||||
|
@ -26,34 +31,34 @@
|
|||
<img
|
||||
alt="<?= $person->full_name ?>"
|
||||
src="<?= $person->image
|
||||
->thumbnail_url ?>" class="object-cover w-full" />
|
||||
->thumbnail_url ?>" class="object-cover w-full" />
|
||||
<div class="p-2">
|
||||
<a href="<?= route_to(
|
||||
'person-view',
|
||||
$person->id,
|
||||
) ?>" class="hover:underline">
|
||||
'person-view',
|
||||
$person->id,
|
||||
) ?>" class="hover:underline">
|
||||
<h2 class="font-semibold"><?= $person->full_name ?></h2>
|
||||
</a>
|
||||
</div>
|
||||
<footer class="flex items-center justify-end p-2">
|
||||
<a class="inline-flex p-2 mr-2 text-teal-700 bg-teal-100 rounded-full shadow-xs hover:bg-teal-200" href="<?= route_to(
|
||||
'person-edit',
|
||||
$person->id,
|
||||
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
|
||||
'Person.edit',
|
||||
) ?>"><?= icon('edit') ?></a>
|
||||
'person-edit',
|
||||
$person->id,
|
||||
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
|
||||
'Person.edit',
|
||||
) ?>"><?= 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>
|
||||
'person-delete',
|
||||
$person->id,
|
||||
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
|
||||
'Person.delete',
|
||||
) ?>"><?= 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>
|
||||
'person-view',
|
||||
$person->id,
|
||||
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
|
||||
'Person.view',
|
||||
) ?>"><?= icon('eye') ?></a>
|
||||
</footer>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -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() ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
$podcastNavigation = [
|
||||
'dashboard' => [
|
||||
'icon' => 'dashboard',
|
||||
|
@ -43,12 +44,12 @@ $podcastNavigation = [
|
|||
<div class="flex flex-col items-start flex-1 w-48 px-2">
|
||||
<span class="w-full font-semibold truncate" title="<?= $podcast->title ?>"><?= $podcast->title ?></span>
|
||||
<a href="<?= route_to(
|
||||
'podcast-activity',
|
||||
$podcast->handle,
|
||||
) ?>" class="inline-flex items-center text-sm outline-none hover:underline focus:ring"
|
||||
'podcast-activity',
|
||||
$podcast->handle,
|
||||
) ?>" 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 ?>
|
||||
'PodcastNavigation.go_to_page',
|
||||
) ?>">@<?= $podcast->handle ?>
|
||||
<?= icon('external-link', 'ml-1 opacity-60') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -67,9 +68,9 @@ $podcastNavigation = [
|
|||
<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,
|
||||
$podcast->id,
|
||||
) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') .lang('PodcastNavigation.' . $item) ?></a>
|
||||
$item,
|
||||
$podcast->id,
|
||||
) ?>"><?= ($isActive ? icon('chevron-right', 'mr-2') : '') . lang('PodcastNavigation.' . $item) ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
|
@ -12,26 +12,27 @@
|
|||
|
||||
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<Charts.XY class="col-span-1" title="<?= lang('Charts.podcast_by_day') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'Podcast',
|
||||
'ByDay',
|
||||
) ?>"/>
|
||||
'analytics-data',
|
||||
$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',
|
||||
) ?>"/>
|
||||
'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',
|
||||
) ?>"/>
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'Podcast',
|
||||
'BandwidthByDay',
|
||||
) ?>"/>
|
||||
</div>
|
||||
|
||||
<?= service('vite')->asset('js/charts.ts', 'js') ?>
|
||||
<?= service('vite')
|
||||
->asset('js/charts.ts', 'js') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -12,19 +12,20 @@
|
|||
|
||||
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<Charts.XY class="col-span-1" title="<?= lang('Charts.daily_listening_time') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'Podcast',
|
||||
'TotalListeningTimeByDay',
|
||||
) ?>"/>
|
||||
'analytics-data',
|
||||
$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',
|
||||
) ?>"/>
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'Podcast',
|
||||
'TotalListeningTimeByMonth',
|
||||
) ?>"/>
|
||||
</div>
|
||||
|
||||
<?= service('vite')->asset('js/charts.ts', 'js') ?>
|
||||
<?= service('vite')
|
||||
->asset('js/charts.ts', 'js') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -12,24 +12,25 @@
|
|||
|
||||
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<Charts.Pie title="<?= lang('Charts.by_country_weekly') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByCountry',
|
||||
'Weekly',
|
||||
) ?>" />
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByCountry',
|
||||
'Weekly',
|
||||
) ?>" />
|
||||
<Charts.Pie title="<?= lang('Charts.by_country_yearly') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByCountry',
|
||||
'Yearly',
|
||||
) ?>" />
|
||||
'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',
|
||||
) ?>" />
|
||||
'analytics-full-data',
|
||||
$podcast->id,
|
||||
'PodcastByRegion',
|
||||
) ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
<?= service('vite')->asset('js/charts.ts', 'js') ?>
|
||||
<?= service('vite')
|
||||
->asset('js/charts.ts', 'js') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -12,36 +12,37 @@
|
|||
|
||||
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<Charts.Pie title="<?= lang('Charts.by_player_weekly') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByPlayer',
|
||||
'ByAppWeekly',
|
||||
) ?>" />
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByPlayer',
|
||||
'ByAppWeekly',
|
||||
) ?>" />
|
||||
<Charts.Pie title="<?= lang('Charts.by_service_weekly') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByService',
|
||||
'ByServiceWeekly',
|
||||
) ?>" />
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByService',
|
||||
'ByServiceWeekly',
|
||||
) ?>" />
|
||||
<Charts.Pie title="<?= lang('Charts.by_device_weekly') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByPlayer',
|
||||
'ByDeviceWeekly',
|
||||
) ?>" />
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByPlayer',
|
||||
'ByDeviceWeekly',
|
||||
) ?>" />
|
||||
<Charts.Pie title="<?= lang('Charts.by_os_weekly') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByPlayer',
|
||||
'ByOsWeekly',
|
||||
) ?>" />
|
||||
'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',
|
||||
) ?>" />
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'PodcastByPlayer',
|
||||
'Bots',
|
||||
) ?>" />
|
||||
</div>
|
||||
|
||||
<?= service('vite')->asset('js/charts.ts', 'js') ?>
|
||||
<?= service('vite')
|
||||
->asset('js/charts.ts', 'js') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -12,17 +12,18 @@
|
|||
|
||||
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<Charts.Bar title="<?= lang('Charts.by_weekday') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'Podcast',
|
||||
'ByWeekday',
|
||||
) ?>" />
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'Podcast',
|
||||
'ByWeekday',
|
||||
) ?>" />
|
||||
<Charts.Bar title="<?= lang('Charts.by_hour') ?>" dataUrl="<?= route_to(
|
||||
'analytics-full-data',
|
||||
$podcast->id,
|
||||
'PodcastByHour',
|
||||
) ?>" />
|
||||
'analytics-full-data',
|
||||
$podcast->id,
|
||||
'PodcastByHour',
|
||||
) ?>" />
|
||||
</div>
|
||||
|
||||
<?= service('vite')->asset('js/charts.ts', 'js') ?>
|
||||
<?= service('vite')
|
||||
->asset('js/charts.ts', 'js') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -12,19 +12,20 @@
|
|||
|
||||
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<Charts.XY class="col-span-1" title="<?= lang('Charts.unique_daily_listeners') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'Podcast',
|
||||
'UniqueListenersByDay',
|
||||
) ?>"/>
|
||||
'analytics-data',
|
||||
$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',
|
||||
) ?>"/>
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'Podcast',
|
||||
'UniqueListenersByMonth',
|
||||
) ?>"/>
|
||||
</div>
|
||||
|
||||
<?= service('vite')->asset('js/charts.ts', 'js') ?>
|
||||
<?= service('vite')
|
||||
->asset('js/charts.ts', 'js') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -12,30 +12,31 @@
|
|||
|
||||
<div class="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
<Charts.Pie title="<?= lang('Charts.by_domain_weekly') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'WebsiteByReferer',
|
||||
'ByDomainWeekly',
|
||||
) ?>" />
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'WebsiteByReferer',
|
||||
'ByDomainWeekly',
|
||||
) ?>" />
|
||||
<Charts.Pie title="<?= lang('Charts.by_domain_yearly') ?>" dataUrl="<?= route_to(
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'WebsiteByReferer',
|
||||
'ByDomainYearly',
|
||||
) ?>" />
|
||||
'analytics-data',
|
||||
$podcast->id,
|
||||
'WebsiteByReferer',
|
||||
'ByDomainYearly',
|
||||
) ?>" />
|
||||
<Charts.Pie title="<?= lang('Charts.by_entry_page') ?>" dataUrl="<?= route_to(
|
||||
'analytics-full-data',
|
||||
$podcast->id,
|
||||
'WebsiteByEntryPage',
|
||||
) ?>" />
|
||||
'analytics-full-data',
|
||||
$podcast->id,
|
||||
'WebsiteByEntryPage',
|
||||
) ?>" />
|
||||
<Charts.Pie title="<?= lang('Charts.by_browser') ?>" dataUrl="<?= route_to(
|
||||
'analytics-full-data',
|
||||
$podcast->id,
|
||||
'WebsiteByBrowser',
|
||||
) ?>" />
|
||||
'analytics-full-data',
|
||||
$podcast->id,
|
||||
'WebsiteByBrowser',
|
||||
) ?>" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?= service('vite')->asset('js/charts.ts', 'js') ?>
|
||||
<?= service('vite')
|
||||
->asset('js/charts.ts', 'js') ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
?>
|
||||
|
||||
<?= $this->extend('_layout') ?>
|
||||
|
@ -61,25 +62,35 @@
|
|||
'class' => 'form-input w-full pl-8',
|
||||
'value' => old('handle'),
|
||||
'required' => 'required',
|
||||
]) ?>
|
||||
]) ?>
|
||||
</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'],
|
||||
'episodic',
|
||||
old('type') ? old('type') == 'episodic' : true,
|
||||
) ?>
|
||||
[
|
||||
'id' => 'episodic',
|
||||
'name' => 'type',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'episodic',
|
||||
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'],
|
||||
'serial',
|
||||
old('type') && old('type') == 'serial',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'serial',
|
||||
'name' => 'type',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'serial',
|
||||
old('type') && old('type') === 'serial',
|
||||
) ?>
|
||||
<label for="serial"><?= lang('Podcast.form.type.serial') ?></label>
|
||||
<?= form_fieldset_close() ?>
|
||||
|
||||
|
@ -92,9 +103,9 @@
|
|||
|
||||
|
||||
<?= 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') ?>
|
||||
<?= 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,101 +137,103 @@
|
|||
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') ?>
|
||||
</legend>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'undefined',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'undefined',
|
||||
old('parental_advisory')
|
||||
[
|
||||
'id' => 'undefined',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'undefined',
|
||||
old('parental_advisory')
|
||||
? old('parental_advisory') === 'undefined'
|
||||
: true,
|
||||
) ?>
|
||||
) ?>
|
||||
<label for="undefined"><?= lang(
|
||||
'Podcast.form.parental_advisory.undefined',
|
||||
) ?></label>
|
||||
'Podcast.form.parental_advisory.undefined',
|
||||
) ?></label>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'clean',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'clean',
|
||||
old('parental_advisory') && old('parental_advisory') === 'clean',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'clean',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'clean',
|
||||
old('parental_advisory') && old('parental_advisory') === 'clean',
|
||||
) ?>
|
||||
<label for="clean"><?= lang(
|
||||
'Podcast.form.parental_advisory.clean',
|
||||
) ?></label>
|
||||
'Podcast.form.parental_advisory.clean',
|
||||
) ?></label>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'explicit',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'explicit',
|
||||
old('parental_advisory') && old('parental_advisory') === 'explicit',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'explicit',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'explicit',
|
||||
old('parental_advisory') && old('parental_advisory') === 'explicit',
|
||||
) ?>
|
||||
<label for="explicit"><?= lang(
|
||||
'Podcast.form.parental_advisory.explicit',
|
||||
) ?></label>
|
||||
'Podcast.form.parental_advisory.explicit',
|
||||
) ?></label>
|
||||
<?= form_fieldset_close() ?>
|
||||
|
||||
<?= form_section_close() ?>
|
||||
|
||||
|
||||
<?= form_section(
|
||||
lang('Podcast.form.author_section_title'),
|
||||
lang('Podcast.form.author_section_subtitle'),
|
||||
) ?>
|
||||
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'),
|
||||
) ?>
|
||||
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',
|
||||
]) ?>
|
||||
'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'),
|
||||
) ?>
|
||||
lang('Podcast.form.owner_email'),
|
||||
'owner_email',
|
||||
[],
|
||||
lang('Podcast.form.owner_email_hint'),
|
||||
) ?>
|
||||
<?= form_input([
|
||||
'id' => 'owner_email',
|
||||
'name' => 'owner_email',
|
||||
'class' => 'form-input mb-4',
|
||||
'value' => old('owner_email'),
|
||||
'type' => 'email',
|
||||
'required' => 'required',
|
||||
]) ?>
|
||||
'id' => 'owner_email',
|
||||
'name' => 'owner_email',
|
||||
'class' => 'form-input mb-4',
|
||||
'value' => old('owner_email'),
|
||||
'type' => 'email',
|
||||
'required' => 'required',
|
||||
]) ?>
|
||||
|
||||
<?= form_label(
|
||||
lang('Podcast.form.publisher'),
|
||||
'publisher',
|
||||
[],
|
||||
lang('Podcast.form.publisher_hint'),
|
||||
true,
|
||||
) ?>
|
||||
lang('Podcast.form.publisher'),
|
||||
'publisher',
|
||||
[],
|
||||
lang('Podcast.form.publisher_hint'),
|
||||
true,
|
||||
) ?>
|
||||
<?= form_input([
|
||||
'id' => 'publisher',
|
||||
'name' => 'publisher',
|
||||
'class' => 'form-input mb-4',
|
||||
'value' => old('publisher'),
|
||||
]) ?>
|
||||
'id' => 'publisher',
|
||||
'name' => 'publisher',
|
||||
'class' => 'form-input mb-4',
|
||||
'value' => old('publisher'),
|
||||
]) ?>
|
||||
|
||||
<?= form_label(lang('Podcast.form.copyright'), 'copyright', [], '', true) ?>
|
||||
<?= form_input([
|
||||
|
@ -275,12 +288,14 @@
|
|||
<div class="flex flex-col mb-4 gap-x-2 gap-y-4 md:flex-row">
|
||||
<div class="flex flex-col flex-shrink">
|
||||
<?= form_label(
|
||||
lang('Podcast.form.partner_id'),
|
||||
'partner_id',
|
||||
['class' => 'text-sm'],
|
||||
lang('Podcast.form.partner_id_hint'),
|
||||
true,
|
||||
) ?>
|
||||
lang('Podcast.form.partner_id'),
|
||||
'partner_id',
|
||||
[
|
||||
'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,
|
||||
) ?>
|
||||
|
@ -323,24 +342,24 @@
|
|||
<?= form_section_close() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Podcast.form.advanced_section_title'),
|
||||
lang('Podcast.form.advanced_section_subtitle'),
|
||||
) ?>
|
||||
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,
|
||||
) ?>
|
||||
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() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Podcast.form.status_section_title'),
|
||||
lang('Podcast.form.status_section_subtitle'),
|
||||
) ?>
|
||||
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') ?>
|
||||
|
@ -355,11 +374,16 @@
|
|||
<?= form_section_close() ?>
|
||||
|
||||
<?= button(
|
||||
lang('Podcast.form.submit_create'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
['type' => 'submit', 'class' => 'self-end'],
|
||||
) ?>
|
||||
lang('Podcast.form.submit_create'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
],
|
||||
) ?>
|
||||
|
||||
<?= form_close() ?>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
?>
|
||||
|
||||
<?= $this->extend('_layout') ?>
|
||||
|
@ -38,8 +39,8 @@
|
|||
|
||||
|
||||
<small class="mb-4 text-gray-600"><?= lang(
|
||||
'Common.forms.image_size_hint',
|
||||
) ?></small>
|
||||
'Common.forms.image_size_hint',
|
||||
) ?></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'],
|
||||
'episodic',
|
||||
old('type') ? old('type') == 'episodic' : $podcast->type == 'episodic',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'episodic',
|
||||
'name' => 'type',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'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'],
|
||||
'serial',
|
||||
old('type') ? old('type') == 'serial' : $podcast->type == 'serial',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'serial',
|
||||
'name' => 'type',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'serial',
|
||||
old('type') ? old('type') === 'serial' : $podcast->type === 'serial',
|
||||
) ?>
|
||||
<label for="serial"><?= lang('Podcast.form.type.serial') ?></label>
|
||||
<?= form_fieldset_close() ?>
|
||||
|
||||
|
@ -80,42 +91,42 @@
|
|||
<?= 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') ?>
|
||||
|
||||
<?= form_dropdown(
|
||||
'language',
|
||||
$languageOptions,
|
||||
[old('language', $podcast->language_code)],
|
||||
[
|
||||
'id' => 'language',
|
||||
'class' => 'form-select mb-4',
|
||||
'required' => 'required',
|
||||
],
|
||||
) ?>
|
||||
'language',
|
||||
$languageOptions,
|
||||
[old('language', $podcast->language_code)],
|
||||
[
|
||||
'id' => 'language',
|
||||
'class' => 'form-select mb-4',
|
||||
'required' => 'required',
|
||||
],
|
||||
) ?>
|
||||
|
||||
<?= form_label(lang('Podcast.form.category'), 'category') ?>
|
||||
<?= form_dropdown(
|
||||
'category',
|
||||
$categoryOptions,
|
||||
[old('category', $podcast->category_id)],
|
||||
[
|
||||
'id' => 'category',
|
||||
'class' => 'form-select mb-4',
|
||||
'required' => 'required',
|
||||
],
|
||||
) ?>
|
||||
'category',
|
||||
$categoryOptions,
|
||||
[old('category', $podcast->category_id)],
|
||||
[
|
||||
'id' => 'category',
|
||||
'class' => 'form-select mb-4',
|
||||
'required' => 'required',
|
||||
],
|
||||
) ?>
|
||||
|
||||
<?= form_label(
|
||||
lang('Podcast.form.other_categories'),
|
||||
'other_categories',
|
||||
[],
|
||||
'',
|
||||
true,
|
||||
) ?>
|
||||
lang('Podcast.form.other_categories'),
|
||||
'other_categories',
|
||||
[],
|
||||
'',
|
||||
true,
|
||||
) ?>
|
||||
|
||||
<Forms.MultiSelect
|
||||
id="other_categories"
|
||||
|
@ -125,68 +136,70 @@ 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(
|
||||
[
|
||||
'id' => 'undefined',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'undefined',
|
||||
old('parental_advisory')
|
||||
[
|
||||
'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',
|
||||
) ?></label>
|
||||
'Podcast.form.parental_advisory.undefined',
|
||||
) ?></label>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'clean',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'clean',
|
||||
old('parental_advisory')
|
||||
[
|
||||
'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',
|
||||
) ?></label>
|
||||
'Podcast.form.parental_advisory.clean',
|
||||
) ?></label>
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'explicit',
|
||||
'name' => 'parental_advisory',
|
||||
'class' => 'form-radio-btn',
|
||||
],
|
||||
'explicit',
|
||||
old('parental_advisory')
|
||||
[
|
||||
'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',
|
||||
) ?></label>
|
||||
'Podcast.form.parental_advisory.explicit',
|
||||
) ?></label>
|
||||
<?= form_fieldset_close() ?>
|
||||
<?= form_section_close() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Podcast.form.author_section_title'),
|
||||
lang('Podcast.form.author_section_subtitle'),
|
||||
) ?>
|
||||
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'),
|
||||
) ?>
|
||||
lang('Podcast.form.owner_name'),
|
||||
'owner_name',
|
||||
[],
|
||||
lang('Podcast.form.owner_name_hint'),
|
||||
) ?>
|
||||
|
||||
<?= form_input([
|
||||
'id' => 'owner_name',
|
||||
|
@ -284,72 +297,72 @@ lang('Podcast.form.classification_section_subtitle'),
|
|||
<div class="flex flex-col mb-4 gap-x-2 gap-y-4 md:flex-row">
|
||||
<div class="flex flex-col flex-shrink w-32">
|
||||
<?= form_label(
|
||||
lang('Podcast.form.partner_id'),
|
||||
'partner_id',
|
||||
lang('Podcast.form.partner_id'),
|
||||
'partner_id',
|
||||
[],
|
||||
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(
|
||||
lang('Podcast.form.partner_link_url'),
|
||||
'partner_link_url',
|
||||
[],
|
||||
lang('Podcast.form.partner_id_hint'),
|
||||
lang('Podcast.form.partner_link_url_hint'),
|
||||
true,
|
||||
) ?>
|
||||
<?= form_input([
|
||||
'id' => 'partner_id',
|
||||
'name' => 'partner_id',
|
||||
'class' => 'form-input w-full',
|
||||
'value' => old('partner_id', $podcast->partner_id),
|
||||
]) ?>
|
||||
'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(
|
||||
lang('Podcast.form.partner_link_url'),
|
||||
'partner_link_url',
|
||||
[],
|
||||
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(
|
||||
lang('Podcast.form.partner_image_url'),
|
||||
'partner_image_url',
|
||||
[],
|
||||
lang('Podcast.form.partner_image_url_hint'),
|
||||
true,
|
||||
) ?>
|
||||
lang('Podcast.form.partner_image_url'),
|
||||
'partner_image_url',
|
||||
[],
|
||||
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),
|
||||
]) ?>
|
||||
'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() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Podcast.form.advanced_section_title'),
|
||||
lang('Podcast.form.advanced_section_subtitle'),
|
||||
) ?>
|
||||
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,
|
||||
) ?>
|
||||
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', $podcast->custom_rss_string, false) ?></Forms.XMLEditor>
|
||||
|
||||
<?= form_section_close() ?>
|
||||
|
||||
<?= form_section(
|
||||
lang('Podcast.form.status_section_title'),
|
||||
lang('Podcast.form.status_section_subtitle'),
|
||||
) ?>
|
||||
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') ?>
|
||||
|
|
|
@ -22,28 +22,28 @@
|
|||
</div>
|
||||
|
||||
<?= form_section(
|
||||
lang('PodcastImport.old_podcast_section_title'),
|
||||
icon('scales', 'mr-2 text-lg flex-shrink-0') .
|
||||
lang('PodcastImport.old_podcast_section_title'),
|
||||
icon('scales', 'mr-2 text-lg flex-shrink-0') .
|
||||
lang('PodcastImport.old_podcast_section_subtitle'),
|
||||
[],
|
||||
'inline-flex text-xs p-2 text-blue-800 font-semibold bg-blue-100 border border-blue-300 rounded',
|
||||
) ?>
|
||||
[],
|
||||
'inline-flex text-xs p-2 text-blue-800 font-semibold bg-blue-100 border border-blue-300 rounded',
|
||||
) ?>
|
||||
|
||||
<?= form_label(
|
||||
lang('PodcastImport.imported_feed_url'),
|
||||
'imported_feed_url',
|
||||
[],
|
||||
lang('PodcastImport.imported_feed_url_hint'),
|
||||
) ?>
|
||||
lang('PodcastImport.imported_feed_url'),
|
||||
'imported_feed_url',
|
||||
[],
|
||||
lang('PodcastImport.imported_feed_url_hint'),
|
||||
) ?>
|
||||
<?= form_input([
|
||||
'id' => 'imported_feed_url',
|
||||
'name' => 'imported_feed_url',
|
||||
'class' => 'form-input',
|
||||
'value' => old('imported_feed_url'),
|
||||
'placeholder' => 'https://...',
|
||||
'type' => 'url',
|
||||
'required' => 'required',
|
||||
]) ?>
|
||||
'id' => 'imported_feed_url',
|
||||
'name' => 'imported_feed_url',
|
||||
'class' => 'form-input',
|
||||
'value' => old('imported_feed_url'),
|
||||
'placeholder' => 'https://...',
|
||||
'type' => 'url',
|
||||
'required' => 'required',
|
||||
]) ?>
|
||||
|
||||
<?= form_section_close() ?>
|
||||
|
||||
|
@ -51,11 +51,11 @@
|
|||
<?= form_section(lang('PodcastImport.new_podcast_section_title'), '') ?>
|
||||
|
||||
<?= form_label(
|
||||
lang('Podcast.form.handle'),
|
||||
'handle',
|
||||
[],
|
||||
lang('Podcast.form.handle_hint'),
|
||||
) ?>
|
||||
lang('Podcast.form.handle'),
|
||||
'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,85 +90,89 @@
|
|||
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">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'title',
|
||||
'name' => 'slug_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'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">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'link',
|
||||
'name' => 'slug_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'link',
|
||||
old('slug_field') && old('slug_field') === 'link',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'title',
|
||||
'name' => 'slug_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'title',
|
||||
old('slug_field') ? old('slug_field') === 'title' : true,
|
||||
) ?>
|
||||
<span class="ml-2"><?= lang('PodcastImport.slug_field.title') ?></span>
|
||||
</label>
|
||||
<label for="title" class="inline-flex items-center">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'link',
|
||||
'name' => 'slug_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'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(
|
||||
[
|
||||
'id' => 'description',
|
||||
'name' => 'description_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'description',
|
||||
old('description_field')
|
||||
? old('description_field') == 'description'
|
||||
[
|
||||
'id' => 'description',
|
||||
'name' => 'description_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'description',
|
||||
old('description_field')
|
||||
? old('description_field') === 'description'
|
||||
: true,
|
||||
) ?>
|
||||
) ?>
|
||||
<span class="ml-2"><description></span>
|
||||
</label>
|
||||
<label for="summary" class="inline-flex items-center">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'summary',
|
||||
'name' => 'description_field',
|
||||
'class' => 'form-radio text-pine-600',
|
||||
],
|
||||
'summary',
|
||||
old('description_field') && old('description_field') == 'summary',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'summary',
|
||||
'name' => 'description_field',
|
||||
'class' => 'form-radio text-pine-600',
|
||||
],
|
||||
'summary',
|
||||
old('description_field') && old('description_field') === 'summary',
|
||||
) ?>
|
||||
<span class="ml-2"><itunes:summary></span>
|
||||
</label>
|
||||
<label for="subtitle_summary" class="inline-flex items-center">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'subtitle_summary',
|
||||
'name' => 'description_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'subtitle_summary',
|
||||
old('description_field') &&
|
||||
old('description_field') == 'subtitle_summary',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'subtitle_summary',
|
||||
'name' => 'description_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'subtitle_summary',
|
||||
old('description_field') &&
|
||||
old('description_field') === 'subtitle_summary',
|
||||
) ?>
|
||||
<span class="ml-2"><itunes:subtitle> + <itunes:summary></span>
|
||||
</label>
|
||||
<label for="content" class="inline-flex items-center">
|
||||
<?= form_radio(
|
||||
[
|
||||
'id' => 'content',
|
||||
'name' => 'description_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'content',
|
||||
old('description_field') && old('description_field') == 'content',
|
||||
) ?>
|
||||
[
|
||||
'id' => 'content',
|
||||
'name' => 'description_field',
|
||||
'class' => 'form-radio text-pine-700',
|
||||
],
|
||||
'content',
|
||||
old('description_field') && old('description_field') === 'content',
|
||||
) ?>
|
||||
<span class="ml-2"><content:encoded></span>
|
||||
</label>
|
||||
<?= form_fieldset_close() ?>
|
||||
|
@ -176,14 +180,14 @@
|
|||
|
||||
<label class="inline-flex items-center mb-4">
|
||||
<?= form_checkbox(
|
||||
[
|
||||
'id' => 'force_renumber',
|
||||
'name' => 'force_renumber',
|
||||
'class' => 'form-checkbox text-pine-700',
|
||||
],
|
||||
'yes',
|
||||
old('force_renumber', false),
|
||||
) ?>
|
||||
[
|
||||
'id' => 'force_renumber',
|
||||
'name' => 'force_renumber',
|
||||
'class' => 'form-checkbox text-pine-700',
|
||||
],
|
||||
'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() ?>
|
||||
|
|
|
@ -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">
|
||||
'episode-list',
|
||||
$podcast->id,
|
||||
) ?>" class="inline-flex items-center text-sm underline hover:no-underline">
|
||||
<?= lang('Podcast.see_all_episodes') ?>
|
||||
<?= icon('chevron-right', 'ml-2') ?>
|
||||
</a>
|
||||
|
@ -15,10 +15,10 @@
|
|||
<article class="snap-center flex flex-col flex-shrink-0 flex-1 w-full min-w-[12rem] max-w-[17rem] overflow-hidden bg-white border-2 border-pine-100 rounded-xl">
|
||||
<div class="relative">
|
||||
<?= publication_pill(
|
||||
$episode->published_at,
|
||||
$episode->publication_status,
|
||||
'absolute top-2 right-2 text-sm'
|
||||
); ?>
|
||||
$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" />
|
||||
|
@ -26,18 +26,18 @@
|
|||
<div class="flex items-start justify-between p-2">
|
||||
<div class="flex flex-col min-w-0">
|
||||
<a href="<?= route_to(
|
||||
'episode-view',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) ?>"
|
||||
'episode-view',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) ?>"
|
||||
class="text-sm font-semibold truncate hover:underline"
|
||||
>
|
||||
<?= episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'font-semibold text-gray-600',
|
||||
true,
|
||||
) ?>
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'font-semibold text-gray-600',
|
||||
true,
|
||||
) ?>
|
||||
<span class="mx-1">-</span>
|
||||
<?= $episode->title ?>
|
||||
</a>
|
||||
|
@ -59,33 +59,33 @@
|
|||
data-dropdown="menu"
|
||||
data-dropdown-placement="bottom">
|
||||
<a class="px-4 py-1 hover:bg-gray-100" href="<?= route_to(
|
||||
'episode-edit',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) ?>"><?= lang('Episode.edit') ?></a>
|
||||
'episode-edit',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) ?>"><?= 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(
|
||||
'embeddable-player-add',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) ?>"><?= 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>
|
||||
'episode-persons-manage',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) ?>"><?= 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>
|
||||
'episode',
|
||||
$podcast->handle,
|
||||
$episode->slug,
|
||||
) ?>"><?= 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>
|
||||
'episode-delete',
|
||||
$podcast->id,
|
||||
$episode->id,
|
||||
) ?>"><?= lang('Episode.delete') ?></a>
|
||||
</nav>
|
||||
</div>
|
||||
</article>
|
||||
|
|
|
@ -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',
|
||||
|
@ -31,27 +36,27 @@
|
|||
<img
|
||||
alt="<?= $podcast->title ?>"
|
||||
src="<?= $podcast->image
|
||||
->medium_url ?>" class="object-cover w-full h-48" />
|
||||
->medium_url ?>" class="object-cover w-full h-48" />
|
||||
<a href="<?= route_to(
|
||||
'podcast-view',
|
||||
$podcast->id,
|
||||
) ?>" class="flex flex-col p-2 hover:underline">
|
||||
'podcast-view',
|
||||
$podcast->id,
|
||||
) ?>" class="flex flex-col p-2 hover:underline">
|
||||
<h2 class="font-semibold truncate"><?= $podcast->title ?></h2>
|
||||
<p class="text-gray-600">@<?= $podcast->handle ?></p>
|
||||
</a>
|
||||
<footer class="flex items-center justify-end p-2">
|
||||
<a class="inline-flex p-2 mr-2 text-blue-700 bg-blue-100 rounded-full shadow-xs hover:bg-blue-200" href="<?= route_to(
|
||||
'podcast-edit',
|
||||
$podcast->id,
|
||||
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
|
||||
'Podcast.edit',
|
||||
) ?>"><?= icon('edit') ?></a>
|
||||
'podcast-edit',
|
||||
$podcast->id,
|
||||
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
|
||||
'Podcast.edit',
|
||||
) ?>"><?= 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>
|
||||
'podcast-view',
|
||||
$podcast->id,
|
||||
) ?>" data-toggle="tooltip" data-placement="bottom" title="<?= lang(
|
||||
'Podcast.view',
|
||||
) ?>"><?= icon('eye') ?></a>
|
||||
</footer>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -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() ?>
|
||||
|
||||
|
|
|
@ -20,22 +20,22 @@
|
|||
<div class="relative flex items-start mb-8">
|
||||
<div class="flex flex-col items-center w-12 mr-4">
|
||||
<?= anchor(
|
||||
$platform->submit_url,
|
||||
icon(
|
||||
$platform->type . '/' . $platform->slug,
|
||||
'text-gray-600 text-4xl',
|
||||
),
|
||||
[
|
||||
'class' => 'mb-1 text-gray-600 hover:text-gray-900',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noopener noreferrer',
|
||||
'data-toggle' => 'tooltip',
|
||||
'data-placement' => 'bottom',
|
||||
'title' => lang('Platforms.submit_url', [
|
||||
'platformName' => $platform->label,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
$platform->submit_url,
|
||||
icon(
|
||||
$platform->type . '/' . $platform->slug,
|
||||
'text-gray-600 text-4xl',
|
||||
),
|
||||
[
|
||||
'class' => 'mb-1 text-gray-600 hover:text-gray-900',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noopener noreferrer',
|
||||
'data-toggle' => 'tooltip',
|
||||
'data-placement' => 'bottom',
|
||||
'title' => lang('Platforms.submit_url', [
|
||||
'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,19 +103,24 @@
|
|||
'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>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?= button(
|
||||
lang('Platforms.submit'),
|
||||
'',
|
||||
['variant' => 'primary'],
|
||||
['type' => 'submit', 'class' => 'self-end'],
|
||||
) ?>
|
||||
lang('Platforms.submit'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
],
|
||||
) ?>
|
||||
|
||||
<?= form_close() ?>
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -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',
|
||||
],
|
||||
);
|
||||
},
|
||||
],
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="<?= service('request')->getLocale() ?>">
|
||||
<html lang="<?= service('request')
|
||||
->getLocale() ?>">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
|
@ -9,31 +10,33 @@
|
|||
) ?>" />
|
||||
<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[
|
||||
'background'
|
||||
] ?>; color: <?= $themeData['text'] ?>;">
|
||||
<img src="<?= $episode->image
|
||||
->thumbnail_url ?>" alt="<?= $episode->title ?>" class="flex-shrink w-36 h-36" />
|
||||
->thumbnail_url ?>" alt="<?= $episode->title ?>" class="flex-shrink w-36 h-36" />
|
||||
<div class="flex flex-col flex-1 min-w-0 px-4 py-2 h-36">
|
||||
<div class="flex items-center">
|
||||
<a href="<?= route_to(
|
||||
'podcast-activity',
|
||||
$podcast->handle,
|
||||
) ?>" style="color: <?= $themeData[
|
||||
'podcast-activity',
|
||||
$podcast->handle,
|
||||
) ?>" style="color: <?= $themeData[
|
||||
'text'
|
||||
] ?>;" class="mr-2 text-xs tracking-wider uppercase truncate opacity-75 hover:opacity-100" target="_blank">
|
||||
<?= $podcast->title ?>
|
||||
</a>
|
||||
<a href="https://castopod.org/" class="ml-auto text-3xl text-pine-700 hover:opacity-75" title="<?= lang(
|
||||
'Common.powered_by',
|
||||
[
|
||||
'castopod' => 'Castopod',
|
||||
],
|
||||
) ?>" target="_blank" rel="noopener noreferrer">
|
||||
'Common.powered_by',
|
||||
[
|
||||
'castopod' => 'Castopod',
|
||||
],
|
||||
) ?>" target="_blank" rel="noopener noreferrer">
|
||||
<?= icon('podcasting/castopod') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -44,11 +47,11 @@
|
|||
<?= $episode->title ?>
|
||||
</h1>
|
||||
<?= episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs',
|
||||
true,
|
||||
) ?>
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs',
|
||||
true,
|
||||
) ?>
|
||||
</a>
|
||||
<vm-player
|
||||
id="castopod-vm-player"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?= helper('page') ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= service('request')->getLocale() ?>">
|
||||
<html lang="<?= service('request')
|
||||
->getLocale() ?>">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
|
@ -8,22 +9,23 @@
|
|||
<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">
|
||||
<header class="py-8 text-white border-b bg-pine-800">
|
||||
<div class="container flex items-center justify-between px-2 py-4 mx-auto">
|
||||
<a href="<?= route_to(
|
||||
'home',
|
||||
) ?>" class="inline-flex items-baseline text-3xl font-semibold font-display"><?= 'castopod' .
|
||||
'home',
|
||||
) ?>" class="inline-flex items-baseline text-3xl font-semibold font-display"><?= 'castopod' .
|
||||
svg('castopod-logo', 'h-6 ml-2') ?></a>
|
||||
</div>
|
||||
</header>
|
||||
<main class="container flex-1 px-4 py-10 mx-auto">
|
||||
<h1 class="mb-2 text-xl"><?= lang('Home.all_podcasts') ?> (<?= count(
|
||||
$podcasts,
|
||||
) ?>)</h1>
|
||||
$podcasts,
|
||||
) ?>)</h1>
|
||||
<section class="grid gap-4 grid-cols-podcasts">
|
||||
<?php if ($podcasts): ?>
|
||||
<?php foreach ($podcasts as $podcast): ?>
|
||||
|
|
|
@ -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">
|
||||
|
@ -15,9 +17,9 @@
|
|||
<div class="container flex flex-col px-2 py-4 mx-auto">
|
||||
<a href="<?= route_to('home') ?>"
|
||||
class="inline-flex items-center mb-2"><?= icon(
|
||||
'arrow-left',
|
||||
'mr-2',
|
||||
) . lang('Page.back_to_home') ?></a>
|
||||
'arrow-left',
|
||||
'mr-2',
|
||||
) . lang('Page.back_to_home') ?></a>
|
||||
<h1 class="text-3xl font-semibold"><?= $page->title ?></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -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">
|
||||
|
@ -28,32 +32,32 @@
|
|||
data-toggle-class="sticky -translate-x-full"
|
||||
class="flex-shrink-0 mr-3 overflow-hidden rounded-full focus:ring-2 focus:outline-none focus:ring-pine-50">
|
||||
<img src="<?= $podcast->image
|
||||
->thumbnail_url ?>" alt="<?= $podcast->title ?>" class="h-10"/>
|
||||
->thumbnail_url ?>" alt="<?= $podcast->title ?>" class="h-10"/>
|
||||
</button>
|
||||
<p class="flex flex-col flex-1 min-w-0 mr-2 text-white">
|
||||
<span class="text-sm font-semibold truncate"><?= $podcast->title ?></span>
|
||||
<span class="text-xs">@<?= $podcast->handle ?></span>
|
||||
</p>
|
||||
<?= anchor_popup(
|
||||
route_to('follow', $podcast->handle),
|
||||
icon(
|
||||
'social/castopod',
|
||||
'mr-2 text-xl text-pink-200 group-hover:text-pink-50',
|
||||
) . lang('Podcast.follow'),
|
||||
[
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'class' =>
|
||||
'group inline-flex mr-2 items-center px-3 py-1 text-xs tracking-wider font-semibold text-white uppercase rounded-full shadow focus:outline-none focus:ring bg-rose-600',
|
||||
],
|
||||
) ?>
|
||||
route_to('follow', $podcast->handle),
|
||||
icon(
|
||||
'social/castopod',
|
||||
'mr-2 text-xl text-pink-200 group-hover:text-pink-50',
|
||||
) . lang('Podcast.follow'),
|
||||
[
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'class' =>
|
||||
'group inline-flex mr-2 items-center px-3 py-1 text-xs tracking-wider font-semibold text-white uppercase rounded-full shadow focus:outline-none focus:ring bg-rose-600',
|
||||
],
|
||||
) ?>
|
||||
<button
|
||||
data-toggle="main-sidebar"
|
||||
data-toggle-class="translate-x-full"
|
||||
data-toggle-body-class="-ml-64"
|
||||
class="p-2 text-xl rounded-full focus:outline-none focus:ring-2 focus:ring-pine-600 text-pine-200 hover:text-pine-50"><?= icon(
|
||||
'menu',
|
||||
) ?><span class="sr-only"><?= lang('Podcast.toggle_podcast_sidebar') ?></span></button>
|
||||
'menu',
|
||||
) ?><span class="sr-only"><?= lang('Podcast.toggle_podcast_sidebar') ?></span></button>
|
||||
</nav>
|
||||
<?= $this->renderSection('content') ?>
|
||||
</main>
|
||||
|
@ -65,10 +69,10 @@
|
|||
data-toggle-class="translate-x-full"
|
||||
data-toggle-body-class="-ml-64"
|
||||
class="fixed z-40 hidden p-4 text-xl rounded-full shadow-2xl sm:block lg:hidden bottom-4 left-4 bg-pine-800 focus:outline-none focus:ring-2 focus:ring-pine-600 text-pine-200 hover:text-pine-50"><?= icon(
|
||||
'menu',
|
||||
) ?><span class="sr-only"><?= lang(
|
||||
'Podcast.toggle_podcast_sidebar',
|
||||
) ?></span></button>
|
||||
'menu',
|
||||
) ?><span class="sr-only"><?= lang(
|
||||
'Podcast.toggle_podcast_sidebar',
|
||||
) ?></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">
|
||||
|
@ -81,9 +85,11 @@
|
|||
<div class="z-10 w-full max-w-xl bg-white rounded-lg shadow-2xl">
|
||||
<div class="flex justify-between px-4 py-2 border-b">
|
||||
<h3 class="self-center text-lg"><?= lang(
|
||||
'Podcast.funding_links',
|
||||
['podcastTitle' => $podcast->title],
|
||||
) ?></h3>
|
||||
'Podcast.funding_links',
|
||||
[
|
||||
'podcastTitle' => $podcast->title,
|
||||
],
|
||||
) ?></h3>
|
||||
<button
|
||||
data-toggle="funding-links"
|
||||
data-toggle-class="hidden"
|
||||
|
@ -103,11 +109,11 @@
|
|||
rel="noopener noreferrer"
|
||||
class="inline-flex items-center font-semibold text-pine-900">
|
||||
<?= icon(
|
||||
$fundingPlatform->type .
|
||||
$fundingPlatform->type .
|
||||
'/' .
|
||||
$fundingPlatform->slug,
|
||||
'mr-2',
|
||||
) . $fundingPlatform->link_url ?>
|
||||
'mr-2',
|
||||
) . $fundingPlatform->link_url ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -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">
|
||||
|
@ -31,32 +35,33 @@
|
|||
<?php if (user()->podcasts !== []): ?>
|
||||
<button type="button" class="inline-flex items-center px-6 py-2 mt-auto font-semibold outline-none focus:ring" id="interact-as-dropdown" data-dropdown="button" data-dropdown-target="interact-as-dropdown-menu" aria-haspopup="true" aria-expanded="false">
|
||||
<img src="<?= interact_as_actor()
|
||||
->avatar_image_url ?>" class="w-8 h-8 mr-2 rounded-full" />
|
||||
->avatar_image_url ?>" class="w-8 h-8 mr-2 rounded-full" />
|
||||
<?= '@' . interact_as_actor()->username ?>
|
||||
<?= icon('caret-down', 'ml-auto') ?>
|
||||
</button>
|
||||
<nav id="interact-as-dropdown-menu" class="absolute z-50 flex flex-col py-2 text-black whitespace-no-wrap bg-white border rounded shadow" aria-labelledby="my-accountDropdown" data-dropdown="menu" data-dropdown-placement="bottom-end">
|
||||
<span class="px-4 text-xs tracking-wider text-gray-700 uppercase"><?= lang(
|
||||
'Admin.choose_interact',
|
||||
) ?></span>
|
||||
'Admin.choose_interact',
|
||||
) ?></span>
|
||||
<form action="<?= route_to(
|
||||
'interact-as-actor',
|
||||
) ?>" method="POST" class="flex flex-col">
|
||||
'interact-as-actor',
|
||||
) ?>" method="POST" class="flex flex-col">
|
||||
<?= csrf_field() ?>
|
||||
<?php foreach (user()->podcasts as $userPodcast): ?>
|
||||
<button class="inline-flex items-center w-full px-4 py-1 hover:bg-gray-100" id="<?= "interact-as-actor-{$userPodcast->id}" ?>" name="actor_id" value="<?= $userPodcast->actor_id ?>">
|
||||
<span class="inline-flex items-center flex-1">
|
||||
<img src="<?= $userPodcast->image
|
||||
->thumbnail_url ?>" class="w-8 h-8 mr-2 rounded-full" /><?= $userPodcast->title ?>
|
||||
->thumbnail_url ?>" class="w-8 h-8 mr-2 rounded-full" /><?= $userPodcast->title ?>
|
||||
<?php if (
|
||||
interact_as_actor()->id ===
|
||||
interact_as_actor()
|
||||
->id ===
|
||||
$userPodcast->actor_id
|
||||
): ?>
|
||||
</span>
|
||||
<?= icon(
|
||||
'check',
|
||||
'ml-4 bg-pine-800 text-white rounded-full',
|
||||
) ?>
|
||||
'check',
|
||||
'ml-4 bg-pine-800 text-white rounded-full',
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
</button>
|
||||
<?php endforeach; ?>
|
||||
|
@ -73,32 +78,32 @@
|
|||
data-toggle-class="sticky -translate-x-full"
|
||||
class="flex-shrink-0 mr-3 overflow-hidden rounded-full focus:ring-2 focus:outline-none focus:ring-pine-50">
|
||||
<img src="<?= $podcast->image
|
||||
->thumbnail_url ?>" alt="<?= $podcast->title ?>" class="h-10"/>
|
||||
->thumbnail_url ?>" alt="<?= $podcast->title ?>" class="h-10"/>
|
||||
</button>
|
||||
<p class="flex flex-col flex-1 min-w-0 mr-2 text-white">
|
||||
<span class="text-sm font-semibold truncate"><?= $podcast->title ?></span>
|
||||
<span class="text-xs">@<?= $podcast->handle ?></span>
|
||||
</p>
|
||||
<?= anchor_popup(
|
||||
route_to('follow', $podcast->handle),
|
||||
icon(
|
||||
'social/castopod',
|
||||
'mr-2 text-xl text-pink-200 group-hover:text-pink-50',
|
||||
) . lang('Podcast.follow'),
|
||||
[
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'class' =>
|
||||
'group inline-flex mr-2 items-center px-3 py-1 text-xs tracking-wider font-semibold text-white uppercase rounded-full shadow focus:outline-none focus:ring bg-rose-600',
|
||||
],
|
||||
) ?>
|
||||
route_to('follow', $podcast->handle),
|
||||
icon(
|
||||
'social/castopod',
|
||||
'mr-2 text-xl text-pink-200 group-hover:text-pink-50',
|
||||
) . lang('Podcast.follow'),
|
||||
[
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'class' =>
|
||||
'group inline-flex mr-2 items-center px-3 py-1 text-xs tracking-wider font-semibold text-white uppercase rounded-full shadow focus:outline-none focus:ring bg-rose-600',
|
||||
],
|
||||
) ?>
|
||||
<button
|
||||
data-toggle="main-sidebar"
|
||||
data-toggle-class="translate-x-full"
|
||||
data-toggle-body-class="-ml-64"
|
||||
class="p-2 text-xl rounded-full focus:outline-none focus:ring-2 focus:ring-pine-600 text-pine-200 hover:text-pine-50"><?= icon(
|
||||
'menu',
|
||||
) ?><span class="sr-only"><?= lang('Podcast.toggle_podcast_sidebar') ?></span></button>
|
||||
'menu',
|
||||
) ?><span class="sr-only"><?= lang('Podcast.toggle_podcast_sidebar') ?></span></button>
|
||||
</nav>
|
||||
<?= $this->renderSection('content') ?>
|
||||
</main>
|
||||
|
@ -106,10 +111,10 @@
|
|||
<?= $this->include('podcast/_partials/sidebar') ?>
|
||||
|
||||
<button data-toggle="main-sidebar" data-toggle-class="translate-x-full" data-toggle-body-class="-ml-64" class="fixed z-40 hidden p-4 text-xl rounded-full shadow-2xl sm:block lg:hidden bottom-4 left-4 bg-pine-800 focus:outline-none focus:ring-2 focus:ring-pine-600 text-pine-200 hover:text-pine-50"><?= icon(
|
||||
'menu',
|
||||
) ?><span class="sr-only"><?= lang(
|
||||
'Podcast.toggle_podcast_sidebar',
|
||||
) ?></span></button>
|
||||
'menu',
|
||||
) ?><span class="sr-only"><?= lang(
|
||||
'Podcast.toggle_podcast_sidebar',
|
||||
) ?></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">
|
||||
|
@ -119,12 +124,14 @@
|
|||
<div class="z-10 w-full max-w-xl bg-white rounded-lg shadow-2xl">
|
||||
<div class="flex justify-between px-4 py-2 border-b">
|
||||
<h3 class="self-center text-lg"><?= lang(
|
||||
'Podcast.funding_links',
|
||||
['podcastTitle' => $podcast->title],
|
||||
) ?></h3>
|
||||
'Podcast.funding_links',
|
||||
[
|
||||
'podcastTitle' => $podcast->title,
|
||||
],
|
||||
) ?></h3>
|
||||
<button data-toggle="funding-links" data-toggle-class="hidden" aria-label="<?= lang(
|
||||
'Common.close',
|
||||
) ?>" class="self-start p-1 text-2xl">
|
||||
'Common.close',
|
||||
) ?>" class="self-start p-1 text-2xl">
|
||||
<?= icon('close') ?>
|
||||
</button>
|
||||
</div>
|
||||
|
@ -136,11 +143,11 @@
|
|||
<?php if ($fundingPlatform->is_visible): ?>
|
||||
<a href="<?= $fundingPlatform->link_url ?>" title="<?= $fundingPlatform->link_content ?>" target="_blank" rel="noopener noreferrer" class="inline-flex items-center font-semibold text-pine-900">
|
||||
<?= icon(
|
||||
$fundingPlatform->type .
|
||||
$fundingPlatform->type .
|
||||
'/' .
|
||||
$fundingPlatform->slug,
|
||||
'text-2xl text-gray-400 mr-2',
|
||||
) . $fundingPlatform->link_url ?>
|
||||
'text-2xl text-gray-400 mr-2',
|
||||
) . $fundingPlatform->link_url ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="flex-1">
|
||||
<header class="w-full mb-2 text-sm">
|
||||
<a href="<?= $comment->actor
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
||||
<span class="mr-2 font-semibold truncate"><?= $comment->actor
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
<footer>
|
||||
<button class="inline-flex items-center opacity-50 cursor-not-allowed hover:underline" title="<?= lang(
|
||||
'Comment.like',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $comment->likes_count ?></button>
|
||||
<?php if($comment->replies_count): ?>
|
||||
'Comment.like',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_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']
|
||||
) ?>
|
||||
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',
|
||||
]
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
|
|
|
@ -1,24 +1,28 @@
|
|||
<footer>
|
||||
<form action="<?= route_to('comment-attempt-like', interact_as_actor()->username, $episode->slug, $comment->id) ?>" method="POST" class="flex items-center gap-x-4">
|
||||
<button type="submit" name="action" class="inline-flex items-center hover:underline group" title="<?= lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $comment->likes_count ?></button>
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= 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',
|
||||
],
|
||||
) ?>
|
||||
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']
|
||||
) ?>
|
||||
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',
|
||||
]
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
<footer>
|
||||
<button class="inline-flex items-center opacity-50 cursor-not-allowed hover:underline" title="<?= lang(
|
||||
'Comment.like',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $comment->likes_count ?></button>
|
||||
<?php if($comment->replies_count): ?>
|
||||
'Comment.like',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_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']
|
||||
) ?>
|
||||
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',
|
||||
]
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
|
|
|
@ -1,24 +1,28 @@
|
|||
<footer>
|
||||
<form action="<?= route_to('post-attempt-action', interact_as_actor()->username, $comment->id) ?>" method="POST" class="flex items-center gap-x-4">
|
||||
<button type="submit" name="action" value="favourite" class="inline-flex items-center hover:underline group" title="<?= lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $comment->likes_count ?></button>
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= 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',
|
||||
],
|
||||
) ?>
|
||||
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']
|
||||
) ?>
|
||||
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',
|
||||
]
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="flex-1">
|
||||
<header class="w-full mb-2 text-sm">
|
||||
<a href="<?= $comment->actor
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
||||
<span class="mr-2 font-semibold truncate"><?= $comment->actor
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="flex-1">
|
||||
<header class="w-full mb-2 text-sm">
|
||||
<a href="<?= $comment->actor
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
||||
<span class="mr-2 font-semibold truncate"><?= $comment->actor
|
||||
|
@ -22,16 +22,16 @@
|
|||
<?php else: ?>
|
||||
<footer>
|
||||
<button class="inline-flex items-center opacity-50 cursor-not-allowed" title="<?= lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?></button>
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?></button>
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="flex-1">
|
||||
<header class="w-full mb-2 text-sm">
|
||||
<a href="<?= $comment->actor
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $comment->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
||||
<span class="mr-2 font-semibold truncate"><?= $comment->actor
|
||||
|
@ -23,16 +23,16 @@
|
|||
<footer>
|
||||
<form action="<?= route_to('comment-attempt-like', interact_as_actor()->username, $episode->slug, $comment->id) ?>" method="POST" class="flex items-center gap-x-4">
|
||||
<button type="submit" name="action" class="inline-flex items-center hover:underline group" title="<?= lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?></button>
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $comment->likes_count,
|
||||
],
|
||||
) ?></button>
|
||||
</form>
|
||||
</footer>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<div class="flex flex-col flex-1 min-w-0">
|
||||
<header class="flex items-center mb-2">
|
||||
<a href="<?= $reply->actor
|
||||
->uri ?>" class="mr-2 text-base font-semibold truncate hover:underline" <?= $reply
|
||||
->uri ?>" class="mr-2 text-base font-semibold truncate hover:underline" <?= $reply
|
||||
->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>><?= $reply->actor
|
||||
->display_name ?><span class="ml-1 text-sm font-normal text-gray-600">@<?= $reply
|
||||
->actor->username .
|
||||
->display_name ?><span class="ml-1 text-sm font-normal text-gray-600">@<?= $reply
|
||||
->actor->username .
|
||||
($reply->actor->is_local ? '' : '@' . $reply->actor->domain) ?></span></a>
|
||||
<?= relative_time($reply->created_at, 'flex-shrink-0 ml-auto text-xs text-gray-600') ?>
|
||||
</header>
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<footer class="flex items-center gap-x-4">
|
||||
<button type="submit" name="action" class="inline-flex items-center opacity-50 cursor-not-allowed" disabled="disabled" title="<?= lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $reply->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-500') . $reply->likes_count ?></button>
|
||||
<?php if($reply->replies_count): ?>
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $reply->likes_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,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'title' => lang('Comment.replies', [
|
||||
'numberOfReplies' => $reply->replies_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('comment', $podcast->handle, $episode->slug, $reply->id),
|
||||
icon('chat', 'text-2xl mr-1 text-gray-400') . $reply->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'title' => lang('Comment.replies', [
|
||||
'numberOfReplies' => $reply->replies_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<footer>
|
||||
<form action="<?= route_to('comment-attempt-like', interact_as_actor()->username, $episode->slug, $reply->id) ?>" method="POST" class="flex items-center gap-x-4">
|
||||
<button type="submit" name="action" class="inline-flex items-center hover:underline group" title="<?= lang(
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $reply->likes_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400 group-hover:text-red-600') . $reply->likes_count ?></button>
|
||||
'Comment.likes',
|
||||
[
|
||||
'numberOfLikes' => $reply->likes_count,
|
||||
],
|
||||
) ?>"><?= 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',
|
||||
],
|
||||
) ?>
|
||||
lang('Comment.reply'),
|
||||
route_to('comment', $podcast->handle, $episode->slug, $reply->id),
|
||||
[
|
||||
'size' => 'small',
|
||||
],
|
||||
) ?>
|
||||
</form>
|
||||
</footer>
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<div class="flex flex-col flex-1 min-w-0">
|
||||
<header class="flex items-center mb-2">
|
||||
<a href="<?= $reply->actor
|
||||
->uri ?>" class="mr-2 text-base font-semibold truncate hover:underline" <?= $reply
|
||||
->uri ?>" class="mr-2 text-base font-semibold truncate hover:underline" <?= $reply
|
||||
->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>><?= $reply->actor
|
||||
->display_name ?><span class="ml-1 text-sm font-normal text-gray-600">@<?= $reply
|
||||
->actor->username .
|
||||
->display_name ?><span class="ml-1 text-sm font-normal text-gray-600">@<?= $reply
|
||||
->actor->username .
|
||||
($reply->actor->is_local ? '' : '@' . $reply->actor->domain) ?></span></a>
|
||||
<?= relative_time($reply->created_at, 'flex-shrink-0 ml-auto text-xs text-gray-600') ?>
|
||||
</header>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -11,31 +11,34 @@
|
|||
->display_name ?>" class="w-12 h-12 mr-4 rounded-full ring-gray-50 ring-2" />
|
||||
<div class="flex flex-col flex-1">
|
||||
<?= form_textarea(
|
||||
[
|
||||
'id' => 'message',
|
||||
'name' => 'message',
|
||||
'class' => 'form-textarea mb-4 w-full',
|
||||
'required' => 'required',
|
||||
'placeholder' => lang('Comment.form.reply_to_placeholder', [
|
||||
'actorUsername' => $comment->actor->username,
|
||||
]),
|
||||
],
|
||||
old('message', '', false),
|
||||
[
|
||||
'rows' => 1,
|
||||
],
|
||||
) ?>
|
||||
[
|
||||
'id' => 'message',
|
||||
'name' => 'message',
|
||||
'class' => 'form-textarea mb-4 w-full',
|
||||
'required' => 'required',
|
||||
'placeholder' => lang('Comment.form.reply_to_placeholder', [
|
||||
'actorUsername' => $comment->actor->username,
|
||||
]),
|
||||
],
|
||||
old('message', '', false),
|
||||
[
|
||||
'rows' => 1,
|
||||
],
|
||||
) ?>
|
||||
<?= button(
|
||||
lang('Comment.form.submit_reply'),
|
||||
'',
|
||||
['variant' => 'primary', 'size' => 'small'],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
'name' => 'action',
|
||||
'value' => 'reply',
|
||||
],
|
||||
) ?>
|
||||
lang('Comment.form.submit_reply'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
'size' => 'small',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
'name' => 'action',
|
||||
'value' => 'reply',
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
<?= form_close() ?>
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<div class="relative 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,
|
||||
) ?>
|
||||
$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" />
|
||||
->thumbnail_url ?>" alt="<?= $episode->title ?>" class="object-cover w-20 h-20 rounded-lg" />
|
||||
</div>
|
||||
<div class="flex flex-col flex-1">
|
||||
<a class="flex justify-between text-sm" href="<?= $episode->link ?>">
|
||||
|
@ -26,16 +26,16 @@
|
|||
<div class="flex mt-auto gap-x-4">
|
||||
<?= play_episode_button($episode->id, $episode->image->thumbnail_url, $episode->title, $podcast->title, $episode->audio_file_web_url, $episode->audio_file_mimetype, 'mt-auto') ?>
|
||||
<?= anchor(
|
||||
route_to('episode', $podcast->handle, $episode->slug),
|
||||
icon('chat', 'text-xl mr-1 text-gray-400') .
|
||||
route_to('episode', $podcast->handle, $episode->slug),
|
||||
icon('chat', 'text-xl mr-1 text-gray-400') .
|
||||
$episode->comments_count,
|
||||
[
|
||||
'class' =>
|
||||
'inline-flex items-center hover:underline',
|
||||
'title' => lang('Episode.number_of_comments', [
|
||||
'numberOfComments' => $episode->comments_count,
|
||||
]),
|
||||
],
|
||||
[
|
||||
'class' =>
|
||||
'inline-flex items-center hover:underline',
|
||||
'title' => lang('Episode.number_of_comments', [
|
||||
'numberOfComments' => $episode->comments_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
<a href="<?= $episode->link ?>" class="flex justify-between flex-1">
|
||||
<div class="flex items-baseline font-semibold">
|
||||
<?= episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs font-semibold text-gray-600',
|
||||
true,
|
||||
) ?>
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-xs font-semibold text-gray-600',
|
||||
true,
|
||||
) ?>
|
||||
<span class="mx-1">-</span>
|
||||
<?= $episode->title ?>
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<header id="main-header" class="fixed top-0 left-0 flex-col flex-shrink-0 h-screen transform -translate-x-full sm:left-auto sm:-translate-x-0 sm:sticky w-80 sm:w-64 lg:w-80 xl:w-112 sm:flex">
|
||||
<img src="<?= $podcast->actor
|
||||
->cover_image_url ?>" alt="" class="object-cover w-full h-48 bg-pine-800"/>
|
||||
->cover_image_url ?>" alt="" class="object-cover w-full h-48 bg-pine-800"/>
|
||||
<div class="flex items-center justify-between px-4 py-2 mb-4 lg:px-6 -mt-14 lg:-mt-16 xl:-mt-20">
|
||||
<img src="<?= $podcast->image
|
||||
->thumbnail_url ?>" alt="<?= $podcast->title ?>" class="h-24 rounded-full shadow-xl xl:h-36 lg:h-28 ring-4 ring-pine-50" />
|
||||
->thumbnail_url ?>" alt="<?= $podcast->title ?>" class="h-24 rounded-full shadow-xl xl:h-36 lg:h-28 ring-4 ring-pine-50" />
|
||||
<?= anchor_popup(
|
||||
route_to('follow', $podcast->handle),
|
||||
icon(
|
||||
'social/castopod',
|
||||
'mr-2 text-xl text-pink-200 group-hover:text-pink-50',
|
||||
) . lang('Podcast.follow'),
|
||||
[
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'class' =>
|
||||
'group inline-flex items-center px-4 py-2 text-xs tracking-wider font-semibold text-white uppercase rounded-full shadow focus:outline-none focus:ring bg-rose-600',
|
||||
],
|
||||
) ?>
|
||||
route_to('follow', $podcast->handle),
|
||||
icon(
|
||||
'social/castopod',
|
||||
'mr-2 text-xl text-pink-200 group-hover:text-pink-50',
|
||||
) . lang('Podcast.follow'),
|
||||
[
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'class' =>
|
||||
'group inline-flex items-center px-4 py-2 text-xs tracking-wider font-semibold text-white uppercase rounded-full shadow focus:outline-none focus:ring bg-rose-600',
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
<div class="px-6">
|
||||
<h1 class="inline-flex items-center text-2xl font-bold leading-none font-display"><?= $podcast->title .
|
||||
|
@ -37,8 +37,8 @@
|
|||
<?php foreach ($podcast->other_categories as $other_category): ?>
|
||||
<span class="px-2 py-1 text-sm text-gray-800 bg-gray-200">
|
||||
<?= lang(
|
||||
'Podcast.category_options.' . $other_category->code,
|
||||
) ?>
|
||||
'Podcast.category_options.' . $other_category->code,
|
||||
) ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
@ -51,8 +51,8 @@
|
|||
'podcast-activity',
|
||||
$podcast->handle,
|
||||
) ?>" class="hover:underline"><?= lang('Podcast.posts', [
|
||||
'numberOfPosts' => $podcast->actor->posts_count,
|
||||
]) ?></a>
|
||||
'numberOfPosts' => $podcast->actor->posts_count,
|
||||
]) ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<article class="relative z-10 w-full bg-white shadow rounded-2xl">
|
||||
<header class="flex px-6 py-4">
|
||||
<img src="<?= $post->actor
|
||||
->avatar_image_url ?>" alt="<?= $post->actor->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
->avatar_image_url ?>" alt="<?= $post->actor->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
<div class="flex flex-col min-w-0">
|
||||
<a href="<?= $post->actor
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
||||
->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
||||
<span class="mr-2 font-semibold truncate"><?= $post->actor
|
||||
->display_name ?></span>
|
||||
->display_name ?></span>
|
||||
<span class="text-sm text-gray-500 truncate">@<?= $post->actor
|
||||
->username .
|
||||
->username .
|
||||
($post->actor->is_local
|
||||
? ''
|
||||
: '@' . $post->actor->domain) ?></span>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
<footer class="flex justify-around px-6 py-3">
|
||||
<?= anchor(
|
||||
route_to('post', $podcast->handle, $post->id),
|
||||
icon('chat', 'text-2xl mr-1 text-gray-400') . $post->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'title' => lang('Post.replies', [
|
||||
'numberOfReplies' => $post->replies_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('post', $podcast->handle, $post->id),
|
||||
icon('chat', 'text-2xl mr-1 text-gray-400') . $post->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'title' => lang('Post.replies', [
|
||||
'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,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'title' => lang('Post.reblogs', [
|
||||
'numberOfReblogs' => $post->reblogs_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('post-remote-action', $podcast->handle, $post->id, 'reblog'),
|
||||
icon('repeat', 'text-2xl mr-1 text-gray-400') . $post->reblogs_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'title' => lang('Post.reblogs', [
|
||||
'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,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'title' => lang('Post.favourites', [
|
||||
'numberOfFavourites' => $post->favourites_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('post-remote-action', $podcast->handle, $post->id, 'favourite'),
|
||||
icon('heart', 'text-2xl mr-1 text-gray-400') . $post->favourites_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'title' => lang('Post.favourites', [
|
||||
'numberOfFavourites' => $post->favourites_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
</footer>
|
||||
|
|
|
@ -1,88 +1,91 @@
|
|||
<footer class="px-6 py-3">
|
||||
<form action="<?= route_to(
|
||||
'post-attempt-action',
|
||||
interact_as_actor()->username,
|
||||
$post->id,
|
||||
) ?>" method="POST" class="flex justify-around">
|
||||
'post-attempt-action',
|
||||
interact_as_actor()
|
||||
->username,
|
||||
$post->id,
|
||||
) ?>" method="POST" class="flex justify-around">
|
||||
<?= csrf_field() ?>
|
||||
<?= anchor(
|
||||
route_to('post', $podcast->handle, $post->id),
|
||||
icon('chat', 'text-2xl mr-1 text-gray-400') . $post->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'title' => lang('Post.replies', [
|
||||
'numberOfReplies' => $post->replies_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('post', $podcast->handle, $post->id),
|
||||
icon('chat', 'text-2xl mr-1 text-gray-400') . $post->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'title' => lang('Post.replies', [
|
||||
'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') .
|
||||
'Post.reblogs',
|
||||
[
|
||||
'numberOfReblogs' => $post->reblogs_count,
|
||||
],
|
||||
) ?>"><?= 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',
|
||||
[
|
||||
'numberOfFavourites' => $post->favourites_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-2xl mr-1 text-gray-400') .
|
||||
'Post.favourites',
|
||||
[
|
||||
'numberOfFavourites' => $post->favourites_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-2xl mr-1 text-gray-400') .
|
||||
$post->favourites_count ?></button>
|
||||
<button id="<?= $post->id .
|
||||
'-more-dropdown' ?>" type="button" class="px-2 py-1 text-2xl text-gray-500 outline-none focus:ring" data-dropdown="button" data-dropdown-target="<?= $post->id .
|
||||
'-more-dropdown-menu' ?>" aria-label="<?= lang(
|
||||
'Common.more',
|
||||
) ?>" aria-haspopup="true" aria-expanded="false"><?= icon('more') ?>
|
||||
'Common.more',
|
||||
) ?>" aria-haspopup="true" aria-expanded="false"><?= icon('more') ?>
|
||||
</button>
|
||||
</form>
|
||||
<nav id="<?= $post->id .
|
||||
'-more-dropdown-menu' ?>" class="flex flex-col py-2 text-sm bg-white border rounded-lg shadow" aria-labelledby="<?= $post->id .
|
||||
'-more-dropdown' ?>" data-dropdown="menu" data-dropdown-placement="bottom">
|
||||
<?= anchor(
|
||||
route_to('post', $podcast->handle, $post->id),
|
||||
lang('Post.expand'),
|
||||
[
|
||||
'class' => 'px-4 py-1 hover:bg-gray-100',
|
||||
],
|
||||
) ?>
|
||||
route_to('post', $podcast->handle, $post->id),
|
||||
lang('Post.expand'),
|
||||
[
|
||||
'class' => 'px-4 py-1 hover:bg-gray-100',
|
||||
],
|
||||
) ?>
|
||||
<form action="<?= route_to(
|
||||
'post-attempt-block-actor',
|
||||
interact_as_actor()->username,
|
||||
$post->id,
|
||||
) ?>" method="POST">
|
||||
'post-attempt-block-actor',
|
||||
interact_as_actor()
|
||||
->username,
|
||||
$post->id,
|
||||
) ?>" method="POST">
|
||||
<?= csrf_field() ?>
|
||||
<button class="w-full px-4 py-1 text-left hover:bg-gray-100"><?= lang(
|
||||
'Post.block_actor',
|
||||
[
|
||||
'actorUsername' => $post->actor->username,
|
||||
],
|
||||
) ?></button>
|
||||
'Post.block_actor',
|
||||
[
|
||||
'actorUsername' => $post->actor->username,
|
||||
],
|
||||
) ?></button>
|
||||
</form>
|
||||
<form action="<?= route_to(
|
||||
'post-attempt-block-domain',
|
||||
interact_as_actor()->username,
|
||||
$post->id,
|
||||
) ?>" method="POST">
|
||||
'post-attempt-block-domain',
|
||||
interact_as_actor()
|
||||
->username,
|
||||
$post->id,
|
||||
) ?>" method="POST">
|
||||
<?= csrf_field() ?>
|
||||
<button class="w-full px-4 py-1 text-left hover:bg-gray-100"><?= lang(
|
||||
'Post.block_domain',
|
||||
[
|
||||
'actorDomain' => $post->actor->domain,
|
||||
],
|
||||
) ?></button>
|
||||
'Post.block_domain',
|
||||
[
|
||||
'actorDomain' => $post->actor->domain,
|
||||
],
|
||||
) ?></button>
|
||||
</form>
|
||||
<?php if ($post->actor->is_local): ?>
|
||||
<hr class="my-2" />
|
||||
<form action="<?= route_to(
|
||||
'post-attempt-delete',
|
||||
$post->actor->username,
|
||||
$post->id,
|
||||
) ?>" method="POST">
|
||||
'post-attempt-delete',
|
||||
$post->actor->username,
|
||||
$post->id,
|
||||
) ?>" method="POST">
|
||||
<?= csrf_field() ?>
|
||||
<button class="w-full px-4 py-1 font-semibold text-left text-red-600 hover:bg-gray-100"><?= lang(
|
||||
'Post.delete',
|
||||
) ?></button>
|
||||
'Post.delete',
|
||||
) ?></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<article class="relative z-10 w-full bg-white shadow rounded-2xl">
|
||||
<header class="flex px-6 py-4">
|
||||
<img src="<?= $post->actor
|
||||
->avatar_image_url ?>" alt="<?= $post->actor->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
->avatar_image_url ?>" alt="<?= $post->actor->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
<div class="flex flex-col min-w-0">
|
||||
<a href="<?= $post->actor
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
||||
->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
||||
<span class="mr-2 font-semibold truncate"><?= $post->actor
|
||||
->display_name ?></span>
|
||||
->display_name ?></span>
|
||||
<span class="text-sm text-gray-500 truncate">@<?= $post->actor
|
||||
->username .
|
||||
->username .
|
||||
($post->actor->is_local
|
||||
? ''
|
||||
: '@' . $post->actor->domain) ?></span>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -11,31 +11,34 @@
|
|||
->display_name ?>" class="w-12 h-12 mr-4 rounded-full ring-gray-50 ring-2" />
|
||||
<div class="flex flex-col flex-1">
|
||||
<?= form_textarea(
|
||||
[
|
||||
'id' => 'message',
|
||||
'name' => 'message',
|
||||
'class' => 'form-textarea mb-4 w-full',
|
||||
'required' => 'required',
|
||||
'placeholder' => lang('Post.form.reply_to_placeholder', [
|
||||
'actorUsername' => $post->actor->username,
|
||||
]),
|
||||
],
|
||||
old('message', '', false),
|
||||
[
|
||||
'rows' => 1,
|
||||
],
|
||||
) ?>
|
||||
[
|
||||
'id' => 'message',
|
||||
'name' => 'message',
|
||||
'class' => 'form-textarea mb-4 w-full',
|
||||
'required' => 'required',
|
||||
'placeholder' => lang('Post.form.reply_to_placeholder', [
|
||||
'actorUsername' => $post->actor->username,
|
||||
]),
|
||||
],
|
||||
old('message', '', false),
|
||||
[
|
||||
'rows' => 1,
|
||||
],
|
||||
) ?>
|
||||
<?= button(
|
||||
lang('Post.form.submit_reply'),
|
||||
'',
|
||||
['variant' => 'primary', 'size' => 'small'],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
'name' => 'action',
|
||||
'value' => 'reply',
|
||||
],
|
||||
) ?>
|
||||
lang('Post.form.submit_reply'),
|
||||
'',
|
||||
[
|
||||
'variant' => 'primary',
|
||||
'size' => 'small',
|
||||
],
|
||||
[
|
||||
'type' => 'submit',
|
||||
'class' => 'self-end',
|
||||
'name' => 'action',
|
||||
'value' => 'reply',
|
||||
],
|
||||
) ?>
|
||||
</div>
|
||||
<?= form_close() ?>
|
||||
|
||||
|
|
|
@ -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',
|
||||
) ?>
|
||||
'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; ?>
|
||||
|
@ -19,9 +21,9 @@
|
|||
<?php if ($preview_card->image): ?>
|
||||
<div class="relative group">
|
||||
<?= 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',
|
||||
) ?>
|
||||
'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; ?>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<article class="relative z-10 w-full bg-white shadow rounded-2xl">
|
||||
<p class="inline-flex px-6 pt-4 text-xs text-gray-700"><?= icon(
|
||||
'repeat',
|
||||
'text-lg mr-2 text-gray-400',
|
||||
) .
|
||||
'repeat',
|
||||
'text-lg mr-2 text-gray-400',
|
||||
) .
|
||||
lang('Post.actor_shared', [
|
||||
'actor' => $post->actor->display_name,
|
||||
]) ?></p>
|
||||
|
@ -11,14 +11,14 @@
|
|||
->avatar_image_url ?>" alt="<?= $post->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
<div class="flex flex-col min-w-0">
|
||||
<a href="<?= $post->actor
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
||||
->actor->is_local
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
||||
->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
||||
<span class="mr-2 font-semibold truncate"><?= $post->actor
|
||||
->display_name ?></span>
|
||||
->display_name ?></span>
|
||||
<span class="text-sm text-gray-500 truncate">@<?= $post->actor
|
||||
->username .
|
||||
->username .
|
||||
($post->actor->is_local
|
||||
? ''
|
||||
: '@' . $post->actor->domain) ?></span>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<article class="relative z-10 w-full bg-white shadow rounded-2xl">
|
||||
<p class="inline-flex px-6 pt-4 text-xs text-gray-700"><?= icon(
|
||||
'repeat',
|
||||
'text-lg mr-2 text-gray-400',
|
||||
) .
|
||||
'repeat',
|
||||
'text-lg mr-2 text-gray-400',
|
||||
) .
|
||||
lang('Post.actor_shared', [
|
||||
'actor' => $post->actor->display_name,
|
||||
]) ?></p>
|
||||
|
@ -11,14 +11,14 @@
|
|||
->avatar_image_url ?>" alt="<?= $post->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
<div class="flex flex-col min-w-0">
|
||||
<a href="<?= $post->actor
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
||||
->actor->is_local
|
||||
->uri ?>" class="flex items-baseline hover:underline" <?= $post
|
||||
->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>>
|
||||
<span class="mr-2 font-semibold truncate"><?= $post->actor
|
||||
->display_name ?></span>
|
||||
->display_name ?></span>
|
||||
<span class="text-sm text-gray-500 truncate">@<?= $post->actor
|
||||
->username .
|
||||
->username .
|
||||
($post->actor->is_local
|
||||
? ''
|
||||
: '@' . $post->actor->domain) ?></span>
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<div class="flex flex-col flex-1 min-w-0">
|
||||
<header class="flex items-center mb-2">
|
||||
<a href="<?= $reply->actor
|
||||
->uri ?>" class="mr-2 text-base font-semibold truncate hover:underline" <?= $reply
|
||||
->uri ?>" class="mr-2 text-base font-semibold truncate hover:underline" <?= $reply
|
||||
->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>><?= $reply->actor
|
||||
->display_name ?><span class="ml-1 text-sm font-normal text-gray-600">@<?= $reply
|
||||
->actor->username .
|
||||
->display_name ?><span class="ml-1 text-sm font-normal text-gray-600">@<?= $reply
|
||||
->actor->username .
|
||||
($reply->actor->is_local ? '' : '@' . $reply->actor->domain) ?></span></a>
|
||||
<?= relative_time($post->published_at, 'flex-shrink-0 ml-auto text-xs text-gray-600') ?>
|
||||
</header>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
<footer class="mt-2 space-x-6 text-sm">
|
||||
<?= anchor(
|
||||
route_to('post', $podcast->handle, $reply->id),
|
||||
icon('chat', 'text-xl mr-1 text-gray-400') . $reply->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'title' => lang('Post.replies', [
|
||||
'numberOfReplies' => $reply->replies_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('post', $podcast->handle, $reply->id),
|
||||
icon('chat', 'text-xl mr-1 text-gray-400') . $reply->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'title' => lang('Post.replies', [
|
||||
'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,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'title' => lang('Post.reblogs', [
|
||||
'numberOfReblogs' => $reply->reblogs_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('post-remote-action', $podcast->handle, $reply->id, 'reblog'),
|
||||
icon('repeat', 'text-xl mr-1 text-gray-400') . $reply->reblogs_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'title' => lang('Post.reblogs', [
|
||||
'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,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'title' => lang('Post.favourites', [
|
||||
'numberOfFavourites' => $reply->favourites_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('post-remote-action', $podcast->handle, $reply->id, 'favourite'),
|
||||
icon('heart', 'text-xl mr-1 text-gray-400') . $reply->favourites_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center hover:underline',
|
||||
'width' => 420,
|
||||
'height' => 620,
|
||||
'title' => lang('Post.favourites', [
|
||||
'numberOfFavourites' => $reply->favourites_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
</footer>
|
||||
|
|
|
@ -1,88 +1,91 @@
|
|||
<footer class="mt-2 text-sm">
|
||||
<form action="<?= route_to(
|
||||
'post-attempt-action',
|
||||
interact_as_actor()->username,
|
||||
$reply->id,
|
||||
) ?>" method="POST" class="flex items-start">
|
||||
'post-attempt-action',
|
||||
interact_as_actor()
|
||||
->username,
|
||||
$reply->id,
|
||||
) ?>" method="POST" class="flex items-start">
|
||||
<?= csrf_field() ?>
|
||||
<?= anchor(
|
||||
route_to('post', $podcast->handle, $reply->id),
|
||||
icon('chat', 'text-xl mr-1 text-gray-400') . $reply->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center mr-6 hover:underline',
|
||||
'title' => lang('Post.replies', [
|
||||
'numberOfReplies' => $reply->replies_count,
|
||||
]),
|
||||
],
|
||||
) ?>
|
||||
route_to('post', $podcast->handle, $reply->id),
|
||||
icon('chat', 'text-xl mr-1 text-gray-400') . $reply->replies_count,
|
||||
[
|
||||
'class' => 'inline-flex items-center mr-6 hover:underline',
|
||||
'title' => lang('Post.replies', [
|
||||
'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') .
|
||||
'Post.reblogs',
|
||||
[
|
||||
'numberOfReblogs' => $reply->reblogs_count,
|
||||
],
|
||||
) ?>"><?= 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',
|
||||
[
|
||||
'numberOfFavourites' => $reply->favourites_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400') .
|
||||
'Post.favourites',
|
||||
[
|
||||
'numberOfFavourites' => $reply->favourites_count,
|
||||
],
|
||||
) ?>"><?= icon('heart', 'text-xl mr-1 text-gray-400') .
|
||||
$reply->favourites_count ?></button>
|
||||
<button id="<?= $reply->id .
|
||||
'-more-dropdown' ?>" type="button" class="text-xl text-gray-500 outline-none focus:ring" data-dropdown="button" data-dropdown-target="<?= $reply->id .
|
||||
'-more-dropdown-menu' ?>" aria-label="<?= lang(
|
||||
'Common.more',
|
||||
) ?>" aria-haspopup="true" aria-expanded="false"><?= icon('more') ?>
|
||||
'Common.more',
|
||||
) ?>" aria-haspopup="true" aria-expanded="false"><?= icon('more') ?>
|
||||
</button>
|
||||
</form>
|
||||
<nav id="<?= $reply->id .
|
||||
'-more-dropdown-menu' ?>" class="flex flex-col py-2 text-sm bg-white border rounded-lg shadow" aria-labelledby="<?= $reply->id .
|
||||
'-more-dropdown' ?>" data-dropdown="menu" data-dropdown-placement="bottom">
|
||||
<?= anchor(
|
||||
route_to('post', $podcast->handle, $reply->id),
|
||||
lang('Post.expand'),
|
||||
[
|
||||
'class' => 'px-4 py-1 hover:bg-gray-100',
|
||||
],
|
||||
) ?>
|
||||
route_to('post', $podcast->handle, $reply->id),
|
||||
lang('Post.expand'),
|
||||
[
|
||||
'class' => 'px-4 py-1 hover:bg-gray-100',
|
||||
],
|
||||
) ?>
|
||||
<form action="<?= route_to(
|
||||
'post-attempt-block-actor',
|
||||
interact_as_actor()->username,
|
||||
$reply->id,
|
||||
) ?>" method="POST">
|
||||
'post-attempt-block-actor',
|
||||
interact_as_actor()
|
||||
->username,
|
||||
$reply->id,
|
||||
) ?>" method="POST">
|
||||
<?= csrf_field() ?>
|
||||
<button class="w-full px-4 py-1 text-left hover:bg-gray-100"><?= lang(
|
||||
'Post.block_actor',
|
||||
[
|
||||
'actorUsername' => $reply->actor->username,
|
||||
],
|
||||
) ?></button>
|
||||
'Post.block_actor',
|
||||
[
|
||||
'actorUsername' => $reply->actor->username,
|
||||
],
|
||||
) ?></button>
|
||||
</form>
|
||||
<form action="<?= route_to(
|
||||
'post-attempt-block-domain',
|
||||
interact_as_actor()->username,
|
||||
$reply->id,
|
||||
) ?>" method="POST">
|
||||
'post-attempt-block-domain',
|
||||
interact_as_actor()
|
||||
->username,
|
||||
$reply->id,
|
||||
) ?>" method="POST">
|
||||
<?= csrf_field() ?>
|
||||
<button class="w-full px-4 py-1 text-left hover:bg-gray-100"><?= lang(
|
||||
'Post.block_domain',
|
||||
[
|
||||
'actorDomain' => $reply->actor->domain,
|
||||
],
|
||||
) ?></button>
|
||||
'Post.block_domain',
|
||||
[
|
||||
'actorDomain' => $reply->actor->domain,
|
||||
],
|
||||
) ?></button>
|
||||
</form>
|
||||
<?php if ($reply->actor->is_local): ?>
|
||||
<hr class="my-2" />
|
||||
<form action="<?= route_to(
|
||||
'post-attempt-delete',
|
||||
$reply->actor->username,
|
||||
$reply->id,
|
||||
) ?>" method="POST">
|
||||
'post-attempt-delete',
|
||||
$reply->actor->username,
|
||||
$reply->id,
|
||||
) ?>" method="POST">
|
||||
<?= csrf_field() ?>
|
||||
<button class="w-full px-4 py-1 font-semibold text-left text-red-600 hover:bg-gray-100"><?= lang(
|
||||
'Post.delete',
|
||||
) ?></button>
|
||||
'Post.delete',
|
||||
) ?></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<div class="flex flex-col flex-1 min-w-0">
|
||||
<header class="flex items-center mb-2">
|
||||
<a href="<?= $reply->actor
|
||||
->uri ?>" class="mr-2 text-base font-semibold truncate hover:underline" <?= $reply
|
||||
->uri ?>" class="mr-2 text-base font-semibold truncate hover:underline" <?= $reply
|
||||
->actor->is_local
|
||||
? ''
|
||||
: 'target="_blank" rel="noopener noreferrer"' ?>><?= $reply->actor
|
||||
->display_name ?><span class="ml-1 text-sm font-normal text-gray-600">@<?= $reply
|
||||
->actor->username .
|
||||
->display_name ?><span class="ml-1 text-sm font-normal text-gray-600">@<?= $reply
|
||||
->actor->username .
|
||||
($reply->actor->is_local ? '' : '@' . $reply->actor->domain) ?></span></a>
|
||||
<?= relative_time($post->published_at, 'flex-shrink-0 ml-auto text-xs text-gray-600') ?>
|
||||
</header>
|
||||
|
|
|
@ -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,
|
||||
|
@ -22,17 +22,17 @@
|
|||
<?php foreach ($podcast->socialPlatforms as $socialPlatform): ?>
|
||||
<?php if ($socialPlatform->is_visible): ?>
|
||||
<?= anchor(
|
||||
$socialPlatform->link_url,
|
||||
icon($socialPlatform->type . '/' . $socialPlatform->slug),
|
||||
[
|
||||
'class' => 'text-2xl text-gray-500 hover:text-gray-700',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noopener noreferrer',
|
||||
'data-toggle' => 'tooltip',
|
||||
'data-placement' => 'bottom',
|
||||
'title' => $socialPlatform->label,
|
||||
],
|
||||
) ?>
|
||||
$socialPlatform->link_url,
|
||||
icon($socialPlatform->type . '/' . $socialPlatform->slug),
|
||||
[
|
||||
'class' => 'text-2xl text-gray-500 hover:text-gray-700',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noopener noreferrer',
|
||||
'data-toggle' => 'tooltip',
|
||||
'data-placement' => 'bottom',
|
||||
'title' => $socialPlatform->label,
|
||||
],
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
@ -52,21 +52,21 @@
|
|||
<?php foreach ($podcast->podcastingPlatforms as $podcastingPlatform): ?>
|
||||
<?php if ($podcastingPlatform->is_visible): ?>
|
||||
<?= anchor(
|
||||
$podcastingPlatform->link_url,
|
||||
icon(
|
||||
$podcastingPlatform->type .
|
||||
$podcastingPlatform->link_url,
|
||||
icon(
|
||||
$podcastingPlatform->type .
|
||||
'/' .
|
||||
$podcastingPlatform->slug,
|
||||
),
|
||||
[
|
||||
'class' => 'text-2xl text-gray-500 hover:text-gray-700',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noopener noreferrer',
|
||||
'data-toggle' => 'tooltip',
|
||||
'data-placement' => 'bottom',
|
||||
'title' => $podcastingPlatform->label,
|
||||
],
|
||||
) ?>
|
||||
),
|
||||
[
|
||||
'class' => 'text-2xl text-gray-500 hover:text-gray-700',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noopener noreferrer',
|
||||
'data-toggle' => 'tooltip',
|
||||
'data-placement' => 'bottom',
|
||||
'title' => $podcastingPlatform->label,
|
||||
],
|
||||
) ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
|
|
@ -15,28 +15,31 @@
|
|||
<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') ?>
|
||||
|
||||
<nav class="sticky z-20 flex justify-center pt-2 text-lg sm:top-0 top-12 bg-pine-50">
|
||||
<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(
|
||||
'Podcast.activity',
|
||||
) ?></a>
|
||||
'podcast-activity',
|
||||
$podcast->handle,
|
||||
) ?>" class="px-4 py-1 mr-8 font-semibold border-b-4 text-pine-800 border-pine-500"><?= lang(
|
||||
'Podcast.activity',
|
||||
) ?></a>
|
||||
<a href="<?= route_to(
|
||||
'podcast-episodes',
|
||||
$podcast->handle,
|
||||
) ?>" class="px-4 py-1 rounded-full hover:bg-pine-100"><?= lang(
|
||||
'Podcast.episodes',
|
||||
) ?></a>
|
||||
'Podcast.episodes',
|
||||
) ?></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>
|
||||
|
|
|
@ -15,28 +15,31 @@
|
|||
<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') ?>
|
||||
|
||||
<nav class="sticky z-20 flex justify-center pt-2 text-lg top-12 sm:top-0 bg-pine-50">
|
||||
<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(
|
||||
'Podcast.activity',
|
||||
) ?></a>
|
||||
'podcast-activity',
|
||||
$podcast->handle,
|
||||
) ?>" class="px-4 py-1 mr-8 font-semibold border-b-4 text-pine-800 border-pine-500"><?= lang(
|
||||
'Podcast.activity',
|
||||
) ?></a>
|
||||
<a href="<?= route_to(
|
||||
'podcast-episodes',
|
||||
$podcast->handle,
|
||||
) ?>" class="px-4 py-1 rounded-full hover:bg-pine-100"><?= lang(
|
||||
'Podcast.episodes',
|
||||
) ?></a>
|
||||
'Podcast.episodes',
|
||||
) ?></a>
|
||||
</nav>
|
||||
|
||||
<section class="max-w-2xl px-6 py-8 mx-auto">
|
||||
|
@ -49,7 +52,7 @@
|
|||
|
||||
<img src="<?= interact_as_actor()
|
||||
->avatar_image_url ?>" alt="<?= interact_as_actor()
|
||||
->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
->display_name ?>" class="w-12 h-12 mr-4 rounded-full" />
|
||||
<div class="flex flex-col flex-1 min-w-0">
|
||||
<?= form_textarea(
|
||||
[
|
||||
|
@ -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>
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
<nav class="py-3">
|
||||
<a href="<?= route_to('episode', $podcast->handle, $episode->slug) ?>"
|
||||
class="inline-flex items-center px-4 py-2 text-sm"><?= icon(
|
||||
'arrow-left',
|
||||
'mr-2 text-lg',
|
||||
) .
|
||||
'arrow-left',
|
||||
'mr-2 text-lg',
|
||||
) .
|
||||
lang('Comment.back_to_episode', [
|
||||
'episodeTitle' => $episode->title,
|
||||
]) ?></a>
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
<?= $this->section('meta-tags') ?>
|
||||
<title><?= lang('Comment.title', [
|
||||
'actorDisplayName' => $comment->actor->display_name,
|
||||
'episodeTitle' => $episode->title
|
||||
]) ?></title>
|
||||
'actorDisplayName' => $comment->actor->display_name,
|
||||
'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() ?>" />
|
||||
|
@ -23,17 +24,17 @@
|
|||
<nav class="py-3">
|
||||
<a href="<?= route_to('episode', $podcast->handle, $episode->slug) ?>"
|
||||
class="inline-flex items-center px-4 py-2 text-sm"><?= icon(
|
||||
'arrow-left',
|
||||
'mr-2 text-lg',
|
||||
) .
|
||||
'arrow-left',
|
||||
'mr-2 text-lg',
|
||||
) .
|
||||
lang('Comment.back_to_episode', [
|
||||
'episodeTitle' => $episode->title,
|
||||
]) ?></a>
|
||||
</nav>
|
||||
<div class="pb-12">
|
||||
<?= $this->include(
|
||||
'podcast/_partials/comment_with_replies_authenticated',
|
||||
) ?>
|
||||
'podcast/_partials/comment_with_replies_authenticated',
|
||||
) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -12,19 +12,21 @@
|
|||
<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 ?>" />
|
||||
<meta property="og:audio" content="<?= $episode->audio_file_opengraph_url ?>" />
|
||||
<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" />
|
||||
route_to('episode-oembed-json', $podcast->handle, $episode->slug),
|
||||
) ?>" 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" />
|
||||
route_to('episode-oembed-xml', $podcast->handle, $episode->slug),
|
||||
) ?>" 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 ?>" />
|
||||
|
@ -32,8 +34,8 @@
|
|||
<meta property="twitter:audio:partner" content="<?= $podcast->publisher ?>" />
|
||||
<meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" />
|
||||
<meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl(
|
||||
'light',
|
||||
) ?>" />
|
||||
'light',
|
||||
) ?>" />
|
||||
<meta name="twitter:player:width" content="600" />
|
||||
<meta name="twitter:player:height" content="200" />
|
||||
<?= $this->endSection() ?>
|
||||
|
@ -44,20 +46,22 @@
|
|||
'podcast-episodes',
|
||||
$podcast->handle,
|
||||
) ?>" 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>
|
||||
'arrow-left',
|
||||
'mr-2 text-lg',
|
||||
) . 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
|
||||
->medium_url ?>" alt="<?= $episode->title ?>" class="mb-4 mr-6 rounded-xl w-52" />
|
||||
->medium_url ?>" alt="<?= $episode->title ?>" class="mb-4 mr-6 rounded-xl w-52" />
|
||||
<div class="flex flex-col items-start flex-1 mb-4" style="min-width: 14rem">
|
||||
<h1 class="text-xl font-bold leading-none font-display line-clamp-2"><?= $episode->title ?></h1>
|
||||
<?= episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-gray-700',
|
||||
) ?>
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-gray-700',
|
||||
) ?>
|
||||
<div class="mb-4 text-xs">
|
||||
<?= relative_time($episode->published_at) ?>
|
||||
<span class="mx-1">•</span>
|
||||
|
@ -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">
|
||||
|
|
|
@ -12,19 +12,21 @@
|
|||
<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 ?>" />
|
||||
<meta property="og:audio" content="<?= $episode->audio_file_opengraph_url ?>" />
|
||||
<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" />
|
||||
route_to('episode-oembed-json', $podcast->handle, $episode->slug),
|
||||
) ?>" 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" />
|
||||
route_to('episode-oembed-xml', $podcast->handle, $episode->slug),
|
||||
) ?>" 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 ?>" />
|
||||
|
@ -32,8 +34,8 @@
|
|||
<meta property="twitter:audio:partner" content="<?= $podcast->publisher ?>" />
|
||||
<meta property="twitter:audio:artist_name" content="<?= $podcast->owner_name ?>" />
|
||||
<meta name="twitter:player" content="<?= $episode->getEmbeddablePlayerUrl(
|
||||
'light',
|
||||
) ?>" />
|
||||
'light',
|
||||
) ?>" />
|
||||
<meta name="twitter:player:width" content="600" />
|
||||
<meta name="twitter:player:height" content="200" />
|
||||
<?= $this->endSection() ?>
|
||||
|
@ -44,20 +46,22 @@
|
|||
'podcast-episodes',
|
||||
$podcast->handle,
|
||||
) ?>" 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>
|
||||
'arrow-left',
|
||||
'mr-2 mb- text-lg',
|
||||
) . 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
|
||||
->medium_url ?>" alt="<?= $episode->title ?>" class="mb-4 mr-6 rounded-xl w-52" />
|
||||
->medium_url ?>" alt="<?= $episode->title ?>" class="mb-4 mr-6 rounded-xl w-52" />
|
||||
<div class="flex flex-col items-start flex-1 mb-4" style="min-width: 14rem">
|
||||
<h1 class="text-xl font-bold leading-none font-display line-clamp-2"><?= $episode->title ?></h1>
|
||||
<?= episode_numbering(
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-gray-700',
|
||||
) ?>
|
||||
$episode->number,
|
||||
$episode->season_number,
|
||||
'text-gray-700',
|
||||
) ?>
|
||||
<div class="mb-4 text-xs">
|
||||
<?= relative_time($episode->published_at) ?>
|
||||
<span class="mx-1">•</span>
|
||||
|
@ -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>
|
||||
|
@ -85,14 +89,15 @@
|
|||
<div class="tab-panels">
|
||||
<section id="comments" class="space-y-6 tab-panel">
|
||||
<?= form_open(route_to('comment-attempt-create', $podcast->id, $episode->id), [
|
||||
'class' => 'flex p-4',
|
||||
]) ?>
|
||||
'class' => 'flex p-4',
|
||||
]) ?>
|
||||
<?= csrf_field() ?>
|
||||
|
||||
<?= 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() ?>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue