Files

104 lines
5.1 KiB
PHP
Raw Permalink Normal View History

2022-07-01 02:23:15 +02:00
<!DOCTYPE html>
2026-10-12 07:47:42 -04:00
{{-- The theme's scheme class, id and setting attributes (ThemeDocument::htmlAttributes); values are escaped here. --}}
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" @foreach ($theme->htmlAttributes() as $attribute => $value){{ $attribute }}="{{ $value }}" @endforeach>
2018-05-26 17:20:36 -07:00
<head>
<title>{{ config('app.name', 'Pterodactyl') }}</title>
@section('meta')
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
2026-10-12 07:47:42 -04:00
<meta content="width=device-width, initial-scale=1" name="viewport">
2018-05-26 17:20:36 -07:00
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="robots" content="noindex">
2026-10-05 18:10:18 -04:00
{{-- An extension that registers one of these elements (registerHeadTags)
2026-11-05 14:23:59 -05:00
replaces the panel's default instead of adding a second one. An uploaded
logo is the default icon. --}}
@unless ($extensionHead->replaces('link', 'apple-touch-icon'))
<link rel="apple-touch-icon" sizes="180x180" href="{{ $siteConfiguration['logo'] ?? '/favicons/apple-touch-icon.png' }}">
@endunless
2026-10-05 18:10:18 -04:00
@unless ($extensionHead->replaces('link', 'icon'))
2026-11-05 14:23:59 -05:00
@isset($siteConfiguration['logo'])
<link rel="icon" href="{{ $siteConfiguration['logo'] }}">
@else
2026-11-02 01:50:03 +01:00
<link rel="icon" type="image/svg+xml" href="/favicons/favicon.svg">
<link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
2026-11-05 14:23:59 -05:00
@endisset
2026-10-05 18:10:18 -04:00
@endunless
@unless ($extensionHead->replaces('link', 'manifest'))
<link rel="manifest" href="/favicons/manifest.json">
@endunless
@unless ($extensionHead->replaces('link', 'mask-icon'))
2026-10-06 18:41:46 +01:00
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#3d7bfd">
2026-10-05 18:10:18 -04:00
@endunless
@unless ($extensionHead->replaces('link', 'shortcut icon'))
2026-11-02 01:50:03 +01:00
<link rel="shortcut icon" href="{{ $siteConfiguration['logo'] ?? '/favicons/favicon.ico' }}">
2026-10-05 18:10:18 -04:00
@endunless
@unless ($extensionHead->replaces('meta', 'msapplication-config'))
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
@endunless
{{-- data-theme-token: the SPA keeps this tag equal to the --theme-color token.
A theme-color registered by an extension is left exactly as rendered. --}}
@unless ($extensionHead->replaces('meta', 'theme-color'))
<meta name="theme-color" content="#0e4688" data-theme-token>
@endunless
{{ $extensionHead }}
2018-05-26 17:20:36 -07:00
@show
2026-10-06 13:52:09 -04:00
{{-- @json escapes < > & ' " so a stored value such as "<!--<script" cannot
change how the browser parses these inline scripts. --}}
@section('user-data')
@if(!is_null(Auth::user()))
<script>
2026-10-06 13:52:09 -04:00
window.PterodactylUser = @json(Auth::user()->toVueObject());
2019-12-15 18:05:44 -08:00
</script>
@endif
@if(!empty($siteConfiguration))
<script>
2026-10-06 13:52:09 -04:00
window.SiteConfiguration = @json($siteConfiguration);
</script>
@endif
@show
2026-10-12 07:47:42 -04:00
{{-- The "system" scheme preference is resolved before any stylesheet applies. --}}
@if ($theme->systemScheme)
<script>
(function (root) {
var scheme = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
root.className = scheme;
if (window.SiteConfiguration && window.SiteConfiguration.theme) {
window.SiteConfiguration.theme.scheme = scheme;
}
})(document.documentElement);
</script>
@endif
{{-- Setting tokens, escaped by their settings (ThemeSetting::tokenValue), so they print as is. --}}
<style id="theme-settings">{!! $theme->style() !!}</style>
2020-08-25 21:00:43 -07:00
@yield('assets')
2026-10-12 21:24:43 -04:00
{!! $asset->css($asset::STYLESHEET_ENTRY) !!}
2026-10-12 07:47:42 -04:00
@if ($theme->stylesheet !== null)
<link rel="stylesheet" href="{{ $theme->stylesheet }}">
@endif
{!! $asset->cssImports('resources/scripts/index.tsx') !!}
{{-- The import map must precede any module script: it lets runtime-loaded
extension and theme bundles share the panel's React/TanStack/SDK module instances. --}}
{!! $asset->importMap() !!}
@foreach ($theme->modulePreloads() as $entry)
<link rel="modulepreload" href="{{ $entry }}">
@endforeach
2018-05-26 17:20:36 -07:00
</head>
2026-10-05 18:10:18 -04:00
<body class="{{ $css['body'] ?? 'bg-background' }}">
@section('content')
2018-05-28 00:35:54 +02:00
@yield('above-container')
@yield('container')
2018-05-28 00:35:54 +02:00
@yield('below-container')
@show
2018-05-26 17:20:36 -07:00
@section('scripts')
2026-10-05 18:10:18 -04:00
{!! $asset->js('resources/scripts/index.tsx') !!}
2018-05-26 17:20:36 -07:00
@show
</body>
</html>