framework/views/app.blade.php
Toby Zerner fa5c7cb123 Build very rough HTML-only content
And redirect to the "no JS" mode if the JS app crashes on boot.

ClientView/ClientAction is all a bit of a mess and will need to be
radically cleaned up at some point...
2015-08-06 12:21:11 +09:30

50 lines
1.2 KiB
PHP

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ $title }}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<meta name="theme-color" content="{{ $forum->attributes->themePrimaryColor }}">
@foreach ($styles as $file)
<link rel="stylesheet" href="{{ str_replace(public_path(), '', $file) }}">
@endforeach
{!! $head !!}
</head>
<body>
{!! $layout !!}
<div id="modal"></div>
<div id="alerts"></div>
@if (! $noJs)
@foreach ($scripts as $file)
<script src="{{ str_replace(public_path(), '', $file) }}"></script>
@endforeach
<script>
try {
var app = System.get('flarum/app').default;
babelHelpers._extends(app, {!! json_encode($app) !!});
@foreach ($bootstrappers as $bootstrapper)
System.get('{{ $bootstrapper }}');
@endforeach
app.boot();
} catch (e) {
window.location = window.location + '?nojs=1';
throw e;
}
</script>
@endif
{!! $foot !!}
</body>
</html>