2015-07-07 13:59:21 +08:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>{{ $title }}</title>
|
2016-05-26 17:34:24 +08:00
|
|
|
<meta name="description" content="{{ $description }}">
|
2015-07-07 13:59:21 +08:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
|
2016-05-26 17:34:24 +08:00
|
|
|
<meta name="theme-color" content="{{ array_get($forum, 'attributes.themePrimaryColor') }}">
|
2015-07-07 13:59:21 +08:00
|
|
|
|
2016-05-26 17:34:24 +08:00
|
|
|
@foreach ($cssUrls as $url)
|
|
|
|
<link rel="stylesheet" href="{{ $url }}">
|
2015-07-07 13:59:21 +08:00
|
|
|
@endforeach
|
2015-07-07 17:53:13 +08:00
|
|
|
|
2016-06-04 16:35:46 +08:00
|
|
|
@if ($faviconUrl = array_get($forum, 'attributes.faviconUrl'))
|
|
|
|
<link href="{{ $faviconUrl }}" rel="shortcut icon">
|
|
|
|
@endif
|
|
|
|
|
2015-07-07 17:53:13 +08:00
|
|
|
{!! $head !!}
|
2015-07-07 13:59:21 +08:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2015-07-27 13:15:35 +08:00
|
|
|
{!! $layout !!}
|
2015-07-07 13:59:21 +08:00
|
|
|
|
|
|
|
<div id="modal"></div>
|
|
|
|
<div id="alerts"></div>
|
|
|
|
|
2016-05-26 17:34:24 +08:00
|
|
|
@if ($allowJs)
|
2015-11-02 14:17:36 +08:00
|
|
|
<script>
|
|
|
|
document.getElementById('flarum-loading').style.display = 'block';
|
|
|
|
</script>
|
|
|
|
|
2016-05-26 17:34:24 +08:00
|
|
|
@foreach ($jsUrls as $url)
|
|
|
|
<script src="{{ $url }}"></script>
|
2015-11-02 14:17:36 +08:00
|
|
|
@endforeach
|
|
|
|
|
|
|
|
<script>
|
|
|
|
document.getElementById('flarum-loading').style.display = 'none';
|
2016-05-26 17:34:24 +08:00
|
|
|
@if (! $debug)
|
2015-11-02 14:17:36 +08:00
|
|
|
try {
|
|
|
|
@endif
|
|
|
|
var app = System.get('flarum/app').default;
|
2016-05-26 17:34:24 +08:00
|
|
|
var modules = {!! json_encode($modules) !!};
|
2015-11-02 14:17:36 +08:00
|
|
|
|
2016-05-26 17:34:24 +08:00
|
|
|
for (var i in modules) {
|
|
|
|
var module = System.get(modules[i]);
|
|
|
|
if (module.default) module.default(app);
|
|
|
|
}
|
2015-11-02 14:17:36 +08:00
|
|
|
|
2016-05-26 17:34:24 +08:00
|
|
|
app.boot({!! json_encode($payload) !!});
|
|
|
|
@if (! $debug)
|
2015-11-02 14:17:36 +08:00
|
|
|
} catch (e) {
|
2016-05-26 17:34:24 +08:00
|
|
|
window.location += (window.location.search ? '&' : '?') + 'nojs=1';
|
|
|
|
throw e;
|
2015-11-02 14:17:36 +08:00
|
|
|
}
|
|
|
|
@endif
|
|
|
|
</script>
|
2016-05-26 17:34:24 +08:00
|
|
|
@else
|
|
|
|
<script>
|
|
|
|
window.history.replaceState(null, null, window.location.toString().replace(/([&?]nojs=1$|nojs=1&)/, ''));
|
|
|
|
</script>
|
2015-07-07 13:59:21 +08:00
|
|
|
@endif
|
2015-07-07 17:53:13 +08:00
|
|
|
|
|
|
|
{!! $foot !!}
|
2015-07-07 13:59:21 +08:00
|
|
|
</body>
|
|
|
|
</html>
|