framework/views/frontend/app.blade.php
2021-04-20 16:50:40 -07:00

42 lines
1.1 KiB
PHP

<!doctype html>
<html @if ($direction) dir="{{ $direction }}" @endif
@if ($language) lang="{{ $language }}" @endif>
<head>
<meta charset="utf-8">
<title>{{ $title }}</title>
{!! $head !!}
</head>
<body>
{!! $layout !!}
<div id="modal"></div>
<div id="alerts"></div>
<script>
document.getElementById('flarum-loading').style.display = 'block';
var flarum = {extensions: {}};
</script>
{!! $js !!}
<script>
document.getElementById('flarum-loading').style.display = 'none';
try {
app.load(@json($payload));
app.bootExtensions(flarum.extensions);
app.boot();
} catch (e) {
var error = document.getElementById('flarum-loading-error');
error.innerHTML += document.getElementById('flarum-content').textContent;
error.style.display = 'block';
throw e;
}
</script>
{!! $foot !!}
</body>
</html>