mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-17 21:49:04 +01:00
Format php files
This commit is contained in:
parent
085cef77a7
commit
a18df4a0f8
@ -24,5 +24,4 @@ return function (App $app) {
|
|||||||
throw new ValidationException(sprintf('Invalid value for field "%s" of type "%s"', $field->name(), $field->type()));
|
throw new ValidationException(sprintf('Invalid value for field "%s" of type "%s"', $field->name(), $field->type()));
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -48,5 +48,4 @@ return function (Languages $languages) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -30,5 +30,4 @@ return function (App $app) {
|
|||||||
return $value;
|
return $value;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -20,5 +20,4 @@ return function (App $app) {
|
|||||||
'names' => LanguageCodes::names(),
|
'names' => LanguageCodes::names(),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -36,5 +36,4 @@ return function (App $app) {
|
|||||||
return $value;
|
return $value;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -24,5 +24,4 @@ return function (App $app) {
|
|||||||
return $value;
|
return $value;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -46,5 +46,4 @@ return function (Site $site) {
|
|||||||
return str_replace("\r\n", "\n", (string) $value);
|
return str_replace("\r\n", "\n", (string) $value);
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -32,5 +32,4 @@ return function (App $app) {
|
|||||||
return (string) $value;
|
return (string) $value;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -30,5 +30,4 @@ return function (App $app) {
|
|||||||
return $value;
|
return $value;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -37,5 +37,4 @@ return function (App $app) {
|
|||||||
return array_values(array_filter($value));
|
return array_values(array_filter($value));
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -32,5 +32,4 @@ return function (App $app) {
|
|||||||
return (string) $value;
|
return (string) $value;
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -27,5 +27,4 @@ return function (App $app) {
|
|||||||
return str_replace("\r\n", "\n", (string) $value);
|
return str_replace("\r\n", "\n", (string) $value);
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,6 @@ class ErrorHandlers
|
|||||||
{
|
{
|
||||||
public function __construct(protected ViewFactory $viewFactory, protected Request $request)
|
public function __construct(protected ViewFactory $viewFactory, protected Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,7 +11,6 @@ class FieldFactory
|
|||||||
{
|
{
|
||||||
public function __construct(protected Container $container, protected Config $config, protected Translations $translations)
|
public function __construct(protected Container $container, protected Config $config, protected Translations $translations)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -163,7 +163,6 @@ class File implements Arrayable, Stringable
|
|||||||
return $this->hash = $hash;
|
return $this->hash = $hash;
|
||||||
}
|
}
|
||||||
throw new RuntimeException('Cannot calculate file hash');
|
throw new RuntimeException('Cannot calculate file hash');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUriGenerator(FileUriGenerator $uriGenerator): void
|
public function setUriGenerator(FileUriGenerator $uriGenerator): void
|
||||||
|
@ -14,7 +14,6 @@ class FileFactory
|
|||||||
*/
|
*/
|
||||||
public function __construct(protected Container $container, protected array $associations = [])
|
public function __construct(protected Container $container, protected array $associations = [])
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function make(string $path): File
|
public function make(string $path): File
|
||||||
|
@ -14,7 +14,6 @@ class FileUploader
|
|||||||
{
|
{
|
||||||
public function __construct(protected Config $config)
|
public function __construct(protected Config $config)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,7 +13,6 @@ class FileUriGenerator
|
|||||||
{
|
{
|
||||||
public function __construct(protected Config $config, protected Router $router, protected Site $site)
|
public function __construct(protected Config $config, protected Router $router, protected Site $site)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function generate(File $file): string
|
public function generate(File $file): string
|
||||||
|
@ -35,8 +35,10 @@ class JpegHandler extends AbstractHandler
|
|||||||
];
|
];
|
||||||
|
|
||||||
foreach ($this->decoder->decode($this->data) as $segment) {
|
foreach ($this->decoder->decode($this->data) as $segment) {
|
||||||
if ($segment['type'] > 0xbf && $segment['type'] < 0xc3
|
if (
|
||||||
|| $segment['type'] > 0xc8 && $segment['type'] < 0xcc) {
|
$segment['type'] > 0xbf && $segment['type'] < 0xc3
|
||||||
|
|| $segment['type'] > 0xc8 && $segment['type'] < 0xcc
|
||||||
|
) {
|
||||||
$info['colorDepth'] = ord($segment['value'][0]);
|
$info['colorDepth'] = ord($segment['value'][0]);
|
||||||
$info['height'] = unpack('n', $segment['value'], 1)[1];
|
$info['height'] = unpack('n', $segment['value'], 1)[1];
|
||||||
$info['width'] = unpack('n', $segment['value'], 3)[1];
|
$info['width'] = unpack('n', $segment['value'], 3)[1];
|
||||||
|
@ -9,7 +9,6 @@ class Desaturate extends AbstractTransform
|
|||||||
{
|
{
|
||||||
final public function __construct()
|
final public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function fromArray(array $data): static
|
public static function fromArray(array $data): static
|
||||||
|
@ -9,7 +9,6 @@ class EdgeDetect extends AbstractTransform
|
|||||||
{
|
{
|
||||||
final public function __construct()
|
final public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function fromArray(array $data): static
|
public static function fromArray(array $data): static
|
||||||
|
@ -9,7 +9,6 @@ class Emboss extends AbstractTransform
|
|||||||
{
|
{
|
||||||
final public function __construct()
|
final public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function fromArray(array $data): static
|
public static function fromArray(array $data): static
|
||||||
|
@ -9,7 +9,6 @@ class Invert extends AbstractTransform
|
|||||||
{
|
{
|
||||||
final public function __construct()
|
final public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function fromArray(array $data): static
|
public static function fromArray(array $data): static
|
||||||
|
@ -9,7 +9,6 @@ class Sharpen extends AbstractTransform
|
|||||||
{
|
{
|
||||||
final public function __construct()
|
final public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function fromArray(array $data): static
|
public static function fromArray(array $data): static
|
||||||
|
@ -9,7 +9,6 @@ class Smoothen extends AbstractTransform
|
|||||||
{
|
{
|
||||||
final public function __construct()
|
final public function __construct()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function fromArray(array $data): static
|
public static function fromArray(array $data): static
|
||||||
|
@ -8,7 +8,6 @@ class TemplateFactory
|
|||||||
{
|
{
|
||||||
public function __construct(protected Container $container)
|
public function __construct(protected Container $container)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function make(string $name): Template
|
public function make(string $name): Template
|
||||||
|
@ -72,7 +72,6 @@ class BackupController extends AbstractController
|
|||||||
return $this->redirectToReferer(default: '/dashboard/');
|
return $this->redirectToReferer(default: '/dashboard/');
|
||||||
}
|
}
|
||||||
throw new RuntimeException($this->translate('panel.backup.error.cannotDelete.invalidFilename'));
|
throw new RuntimeException($this->translate('panel.backup.error.cannotDelete.invalidFilename'));
|
||||||
|
|
||||||
} catch (TranslatedException $e) {
|
} catch (TranslatedException $e) {
|
||||||
$this->panel()->notify($this->translate('panel.backup.error.cannotDelete', $e->getTranslatedMessage()), 'error');
|
$this->panel()->notify($this->translate('panel.backup.error.cannotDelete', $e->getTranslatedMessage()), 'error');
|
||||||
return $this->redirectToReferer(default: '/dashboard/');
|
return $this->redirectToReferer(default: '/dashboard/');
|
||||||
|
@ -130,7 +130,6 @@ class PagesController extends AbstractController
|
|||||||
throw new UnexpectedValueException('Unexpected missing page route');
|
throw new UnexpectedValueException('Unexpected missing page route');
|
||||||
}
|
}
|
||||||
return $this->redirect($this->generateRoute('panel.pages.edit.lang', ['page' => trim($page->route(), '/'), 'language' => $this->site()->languages()->default()]));
|
return $this->redirect($this->generateRoute('panel.pages.edit.lang', ['page' => trim($page->route(), '/'), 'language' => $this->site()->languages()->default()]));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($page->languages()->available()->has($language)) {
|
if ($page->languages()->available()->has($language)) {
|
||||||
@ -334,7 +333,6 @@ class PagesController extends AbstractController
|
|||||||
} catch (TranslatedException $e) {
|
} catch (TranslatedException $e) {
|
||||||
$this->panel()->notify($this->translate('upload.error', $e->getTranslatedMessage()), 'error');
|
$this->panel()->notify($this->translate('upload.error', $e->getTranslatedMessage()), 'error');
|
||||||
return $this->redirect($this->generateRoute('panel.pages.edit', ['page' => $routeParams->get('page')]));
|
return $this->redirect($this->generateRoute('panel.pages.edit', ['page' => $routeParams->get('page')]));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,7 +363,6 @@ class PagesController extends AbstractController
|
|||||||
|
|
||||||
$this->panel()->notify($this->translate('panel.pages.page.fileDeleted'), 'success');
|
$this->panel()->notify($this->translate('panel.pages.page.fileDeleted'), 'success');
|
||||||
return $this->redirect($this->generateRoute('panel.pages.edit', ['page' => $routeParams->get('page')]));
|
return $this->redirect($this->generateRoute('panel.pages.edit', ['page' => $routeParams->get('page')]));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -196,7 +196,6 @@ class UsersController extends AbstractController
|
|||||||
$userData = [...$user->toArray(), ...$data];
|
$userData = [...$user->toArray(), ...$data];
|
||||||
|
|
||||||
Yaml::encodeToFile($userData, FileSystem::joinPaths($this->config->get('system.panel.paths.accounts'), $user->username() . '.yaml'));
|
Yaml::encodeToFile($userData, FileSystem::joinPaths($this->config->get('system.panel.paths.accounts'), $user->username() . '.yaml'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,6 @@ class UserFactory
|
|||||||
{
|
{
|
||||||
public function __construct(protected Container $container)
|
public function __construct(protected Container $container)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +24,6 @@ class Schemes
|
|||||||
|
|
||||||
public function __construct(protected Container $container)
|
public function __construct(protected Container $container)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,13 +166,10 @@ class Container
|
|||||||
$loaderInstance = $this->build($loader, $parameters);
|
$loaderInstance = $this->build($loader, $parameters);
|
||||||
|
|
||||||
$service = $loaderInstance->load($this);
|
$service = $loaderInstance->load($this);
|
||||||
|
|
||||||
} elseif ($object === null) {
|
} elseif ($object === null) {
|
||||||
$service = $this->build($name, $parameters);
|
$service = $this->build($name, $parameters);
|
||||||
|
|
||||||
} elseif ($object instanceof Closure) {
|
} elseif ($object instanceof Closure) {
|
||||||
$service = $this->call($object, $parameters);
|
$service = $this->call($object, $parameters);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$service = $object;
|
$service = $object;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ class LanguagesServiceLoader implements ServiceLoaderInterface
|
|||||||
{
|
{
|
||||||
public function __construct(protected Config $config, protected Request $request)
|
public function __construct(protected Config $config, protected Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load(Container $container): Languages
|
public function load(Container $container): Languages
|
||||||
|
@ -13,7 +13,6 @@ class SchemesServiceLoader implements ResolutionAwareServiceLoaderInterface
|
|||||||
{
|
{
|
||||||
public function __construct(protected Config $config, protected Languages $languages)
|
public function __construct(protected Config $config, protected Languages $languages)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load(Container $container): object
|
public function load(Container $container): object
|
||||||
|
@ -15,7 +15,6 @@ class SiteServiceLoader implements ResolutionAwareServiceLoaderInterface
|
|||||||
{
|
{
|
||||||
public function __construct(protected Config $config, protected Languages $languages, protected Schemes $schemes)
|
public function __construct(protected Config $config, protected Languages $languages, protected Schemes $schemes)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load(Container $container): Site
|
public function load(Container $container): Site
|
||||||
@ -28,7 +27,6 @@ class SiteServiceLoader implements ResolutionAwareServiceLoaderInterface
|
|||||||
'path' => $this->config->get('system.content.path'),
|
'path' => $this->config->get('system.content.path'),
|
||||||
'languages' => $this->languages,
|
'languages' => $this->languages,
|
||||||
] + $config]);
|
] + $config]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,7 +12,6 @@ class TranslationsServiceLoader implements ResolutionAwareServiceLoaderInterface
|
|||||||
{
|
{
|
||||||
public function __construct(protected Config $config, protected Languages $languages)
|
public function __construct(protected Config $config, protected Languages $languages)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function load(Container $container): object
|
public function load(Container $container): object
|
||||||
|
@ -204,7 +204,6 @@ class Debug
|
|||||||
. ($reference ? '<span class="__note" title="Reference">&</span>' : '')
|
. ($reference ? '<span class="__note" title="Reference">&</span>' : '')
|
||||||
. static::outputData($value, $indent + self::INDENT_SPACES)
|
. static::outputData($value, $indent + self::INDENT_SPACES)
|
||||||
. ',';
|
. ',';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return sprintf("<span class=\"__type-array\">array</span>(<span class=\"__note\">%d</span>) [<span class=\"__formwork-dump-toggle\" onclick=\"__formwork_dump_toggle(this)\" data-target=\"__formwork-dump-id-%2\$d\">▼</span>\n<div class=\"__formwork-dump-collapsed\" id=\"__formwork-dump-id-%d\">%s</div>%s]", count($data), ++static::$counter, implode("\n", $parts), str_repeat(' ', $indent));
|
return sprintf("<span class=\"__type-array\">array</span>(<span class=\"__note\">%d</span>) [<span class=\"__formwork-dump-toggle\" onclick=\"__formwork_dump_toggle(this)\" data-target=\"__formwork-dump-id-%2\$d\">▼</span>\n<div class=\"__formwork-dump-collapsed\" id=\"__formwork-dump-id-%d\">%s</div>%s]", count($data), ++static::$counter, implode("\n", $parts), str_repeat(' ', $indent));
|
||||||
|
@ -157,7 +157,6 @@ class MimeType
|
|||||||
$mimeType = static::fromExtension('svg');
|
$mimeType = static::fromExtension('svg');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $mimeType ?: self::DEFAULT_MIME_TYPE;
|
return $mimeType ?: self::DEFAULT_MIME_TYPE;
|
||||||
|
@ -13,7 +13,6 @@ class ViewFactory
|
|||||||
*/
|
*/
|
||||||
public function __construct(protected array $methods, protected App $app, protected Config $config)
|
public function __construct(protected array $methods, protected App $app, protected Config $config)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title><?= $message ?? 'Internal Server Error' ?> | Formwork</title>
|
<title><?= $message ?? 'Internal Server Error' ?> | Formwork</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@ -19,7 +20,8 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2 {
|
h1,
|
||||||
|
h2 {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
letter-spacing: -0.027rem;
|
letter-spacing: -0.027rem;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
@ -71,6 +73,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
|
@ -10,5 +10,4 @@ return function (Config $config, Panel $panel) {
|
|||||||
|
|
||||||
'icon' => fn (string $icon) => FileSystem::read(FileSystem::joinPaths($config->get('system.panel.paths.assets'), '/icons/svg/', $icon . '.svg')),
|
'icon' => fn (string $icon) => FileSystem::read(FileSystem::joinPaths($config->get('system.panel.paths.assets'), '/icons/svg/', $icon . '.svg')),
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -13,4 +13,3 @@
|
|||||||
'disabled' => $field->isDisabled(),
|
'disabled' => $field->isDisabled(),
|
||||||
'hidden' => $field->isHidden(),
|
'hidden' => $field->isHidden(),
|
||||||
]) ?>>
|
]) ?>>
|
||||||
|
|
||||||
|
@ -7,25 +7,13 @@
|
|||||||
'disabled' => $field->isDisabled(),
|
'disabled' => $field->isDisabled(),
|
||||||
'hidden' => $field->isHidden(),
|
'hidden' => $field->isHidden(),
|
||||||
]) ?>>
|
]) ?>>
|
||||||
<?php
|
<?php if (!$field->isRequired()) : ?>
|
||||||
if (!$field->isRequired()):
|
|
||||||
?>
|
|
||||||
<option value="" <?php if ($field->value() === '') : ?> selected<?php endif ?>><?= $this->translate('page.none') ?></option>
|
<option value="" <?php if ($field->value() === '') : ?> selected<?php endif ?>><?= $this->translate('page.none') ?></option>
|
||||||
<?php
|
<?php endif ?>
|
||||||
endif
|
<?php if ($field->get('allowSite')) : ?>
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if ($field->get('allowSite')):
|
|
||||||
?>
|
|
||||||
<option value="." <?php if ($field->value() === '.') : ?> selected<?php endif ?>><?= $this->translate('panel.pages.newPage.site') ?> (/)</option>
|
<option value="." <?php if ($field->value() === '.') : ?> selected<?php endif ?>><?= $this->translate('panel.pages.newPage.site') ?> (/)</option>
|
||||||
<?php
|
<?php endif ?>
|
||||||
endif
|
<?php foreach ($field->collection() as $page) : ?>
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
foreach ($field->collection() as $page):
|
|
||||||
?>
|
|
||||||
<option value="<?= $page->route() ?>" <?php if ($page->route() === $field->value()) : ?> selected<?php endif ?>><?= str_repeat('— ', $page->level() - 1) . $page->title() ?></option>
|
<option value="<?= $page->route() ?>" <?php if ($page->route() === $field->value()) : ?> selected<?php endif ?>><?= str_repeat('— ', $page->level() - 1) . $page->title() ?></option>
|
||||||
<?php
|
<?php endforeach ?>
|
||||||
endforeach
|
|
||||||
?>
|
|
||||||
</select>
|
</select>
|
@ -1,6 +1,8 @@
|
|||||||
<div id="slugModal" class="modal" aria-labelledby="slugModalLabel">
|
<div id="slugModal" class="modal" aria-labelledby="slugModalLabel">
|
||||||
<div class="modal-container">
|
<div class="modal-container">
|
||||||
<div class="modal-header"><div class="caption" id="slugModalLabel"><?= $this->translate('panel.pages.changeSlug') ?></div></div>
|
<div class="modal-header">
|
||||||
|
<div class="caption" id="slugModalLabel"><?= $this->translate('panel.pages.changeSlug') ?></div>
|
||||||
|
</div>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<label class="form-label" for="page-slug"><?= $this->translate('panel.pages.newPage.slug') ?>:</label>
|
<label class="form-label" for="page-slug"><?= $this->translate('panel.pages.newPage.slug') ?>:</label>
|
||||||
<span class="form-label-suggestion">(<?= $this->translate('panel.pages.newPage.slugSuggestion') ?>)</span>
|
<span class="form-label-suggestion">(<?= $this->translate('panel.pages.newPage.slugSuggestion') ?>)</span>
|
||||||
|
@ -13,4 +13,3 @@
|
|||||||
<?php $this->insert('fields', ['fields' => $fields]) ?>
|
<?php $this->insert('fields', ['fields' => $fields]) ?>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
<script src="<?= $this->assets()->uri('js/app.min.js', true) ?>" integrity="<?= $this->assets()->integrityHash('js/app.min.js') ?>"></script>
|
<script src="<?= $this->assets()->uri('js/app.min.js', true) ?>" integrity="<?= $this->assets()->integrityHash('js/app.min.js') ?>"></script>
|
||||||
<script>Formwork.app.load(<?= $appConfig ?>);</script>
|
<script>
|
||||||
|
Formwork.app.load(<?= $appConfig ?>);
|
||||||
|
</script>
|
@ -5,7 +5,8 @@ $posts = $page->children()->published();
|
|||||||
|
|
||||||
// If the route has the param `{tagName}`
|
// If the route has the param `{tagName}`
|
||||||
if ($router->params()->has('tagName')) {
|
if ($router->params()->has('tagName')) {
|
||||||
$posts = $posts->filterBy('tags', // Filter posts by tags...
|
$posts = $posts->filterBy(
|
||||||
|
'tags', // Filter posts by tags...
|
||||||
fn ($tags) => $tags
|
fn ($tags) => $tags
|
||||||
->map(fn ($tag) => $this->slug($tag)) // where the collection of their slugs...
|
->map(fn ($tag) => $this->slug($tag)) // where the collection of their slugs...
|
||||||
->contains($router->params()->get('tagName')) // contains the value of the `tagName` param.
|
->contains($router->params()->get('tagName')) // contains the value of the `tagName` param.
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="<?= $site->languages()->current() ?>">
|
<html lang="<?= $site->languages()->current() ?>">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title><?= $page->title() ?> | <?= $site->title() ?></title>
|
<title><?= $page->title() ?> | <?= $site->title() ?></title>
|
||||||
<?= $this->insert('_meta') ?>
|
<?= $this->insert('_meta') ?>
|
||||||
@ -7,6 +8,7 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="<?= $this->assets()->uri('css/style.min.css') ?>">
|
<link rel="stylesheet" type="text/css" href="<?= $this->assets()->uri('css/style.min.css') ?>">
|
||||||
<script src="<?= $this->assets()->uri('js/script.min.js') ?>"></script>
|
<script src="<?= $this->assets()->uri('js/script.min.js') ?>"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<?= $this->insert('_menu') ?>
|
<?= $this->insert('_menu') ?>
|
||||||
<?= $this->insert('_cover-image') ?>
|
<?= $this->insert('_cover-image') ?>
|
||||||
@ -17,4 +19,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
x
Reference in New Issue
Block a user