Update Kirby and add password guard
This commit is contained in:
parent
aaf1aa7890
commit
55d4e45891
987 changed files with 160116 additions and 66454 deletions
|
|
@ -1,3 +1,15 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Toolkit\Html;
|
||||
|
||||
/**
|
||||
* @var \Kirby\Cms\App $kirby
|
||||
* @var string $icons
|
||||
* @var array<string, mixed> $assets
|
||||
* @var array<string, mixed> $fiber
|
||||
* @var string $panelUrl
|
||||
* @var string $nonce
|
||||
*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
@ -8,23 +20,39 @@
|
|||
|
||||
<title>Kirby Panel</title>
|
||||
|
||||
<link nonce="<?= $nonce ?>" rel="stylesheet" href="<?= $assetUrl ?>/css/app.css">
|
||||
<link nonce="<?= $nonce ?>" rel="stylesheet" href="<?= $pluginCss ?>">
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": <?= json_encode($assets['import-maps'] ?? []) ?>
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php if ($customCss) : ?>
|
||||
<link nonce="<?= $nonce ?>" rel="stylesheet" href="<?= $customCss ?>">
|
||||
<script nonce="<?= $nonce ?>">
|
||||
if (
|
||||
!window.CSS ||
|
||||
window.CSS.supports("display", "grid") === false ||
|
||||
!window.fetch
|
||||
) {
|
||||
window.location.href = "<?= $panelUrl ?>browser";
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php foreach ($assets['css'] as $css): ?>
|
||||
<link nonce="<?= $nonce ?>" rel="stylesheet" href="<?= $css ?>">
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php foreach ($assets['icons'] as $icon): ?>
|
||||
<?= Html::tag('link', null, $icon) ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php foreach ($assets['js'] as $js): ?>
|
||||
<?php if (($js['type'] ?? null) === 'module'): ?>
|
||||
<link rel="modulepreload" href="<?= $js['src'] ?>">
|
||||
<?php endif ?>
|
||||
|
||||
<link nonce="<?= $nonce ?>" rel="apple-touch-icon" href="<?= $assetUrl ?>/apple-touch-icon.png" />
|
||||
<link nonce="<?= $nonce ?>" rel="shortcut icon" href="<?= $assetUrl ?>/favicon.png">
|
||||
<?php endforeach ?>
|
||||
|
||||
<base href="<?= $panelUrl ?>">
|
||||
</head>
|
||||
<body>
|
||||
<svg aria-hidden="true" class="k-icons" xmlns="http://www.w3.org/2000/svg" overflow="hidden" nonce="<?= $nonce ?>">
|
||||
<defs />
|
||||
</svg>
|
||||
|
||||
<div id="app"></div>
|
||||
|
||||
<noscript>
|
||||
|
|
@ -33,14 +61,21 @@
|
|||
|
||||
<?= $icons ?>
|
||||
|
||||
<script nonce="<?= $nonce ?>">window.panel = <?= json_encode($options, JSON_UNESCAPED_SLASHES) ?></script>
|
||||
<script nonce="<?= $nonce ?>" src="<?= $assetUrl ?>/js/plugins.js" defer></script>
|
||||
<script nonce="<?= $nonce ?>" src="<?= $assetUrl ?>/js/vendor.js" defer></script>
|
||||
<script nonce="<?= $nonce ?>" src="<?= $pluginJs ?>" defer></script>
|
||||
<?php if (isset($config['js'])) : ?>
|
||||
<script nonce="<?= $nonce ?>" src="<?= Url::to($config['js']) ?>" defer></script>
|
||||
<?php endif ?>
|
||||
<script nonce="<?= $nonce ?>" src="<?= $assetUrl ?>/js/app.js" defer></script>
|
||||
<script nonce="<?= $nonce ?>">
|
||||
// Fiber setup
|
||||
window.fiber = <?= json_encode($fiber) ?>;
|
||||
</script>
|
||||
|
||||
<?php foreach ($assets['js'] as $key => $js): ?>
|
||||
<?php if ($key === 'index'): ?>
|
||||
<script type="module" nonce="<?= $nonce ?>" defer>
|
||||
<?= $assets['plugin-imports'] ?>
|
||||
import('<?= $js['src'] ?>')
|
||||
</script>
|
||||
<?php else: ?>
|
||||
<?= Html::tag('script', '', $js) . PHP_EOL ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue