mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Replace Ember app with Mithril app
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
@@ -6,32 +6,29 @@
|
||||
<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="{{ $config['modulePrefix'] }}/config/environment" content="{{ rawurlencode(json_encode($config)) }}">
|
||||
<base href="/">
|
||||
@foreach ($styles as $file)
|
||||
<link rel="stylesheet" href="{{ str_replace(public_path(), '', $file) }}">
|
||||
<link rel="stylesheet" href="{{ str_replace(public_path(), '', $file) }}">
|
||||
@endforeach
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="assets-loading" class="fade">Loading...</div>
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
var loading = document.getElementById('assets-loading');
|
||||
if (loading) {
|
||||
loading.className += ' in';
|
||||
}
|
||||
}, 1000);
|
||||
</script>
|
||||
{!! $layout !!}
|
||||
|
||||
{!! $content !!}
|
||||
<div id="modal"></div>
|
||||
<div id="alerts"></div>
|
||||
|
||||
<script>
|
||||
var FLARUM_DATA = {!! json_encode($data) !!};
|
||||
var FLARUM_SESSION = {!! json_encode($session) !!};
|
||||
var FLARUM_ALERT = {!! json_encode($alert) !!};
|
||||
</script>
|
||||
@foreach ($scripts as $file)
|
||||
<script src="{{ str_replace(public_path(), '', $file) }}"></script>
|
||||
<script src="{{ str_replace(public_path(), '', $file) }}"></script>
|
||||
@endforeach
|
||||
<script>
|
||||
var app = require('flarum/app')['default'];
|
||||
app.config = {!! json_encode($config) !!};
|
||||
app.preload = {
|
||||
data: {!! json_encode($data) !!},
|
||||
session: {!! json_encode($session) !!}
|
||||
};
|
||||
app.boot();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user