mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
Replace Ember app with Mithril app
This commit is contained in:
17
views/admin.blade.php
Normal file
17
views/admin.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="global-page" id="page">
|
||||
<div id="back-control"></div>
|
||||
<div class="global-drawer">
|
||||
<header class="global-header" id="header">
|
||||
<div id="back-button"></div>
|
||||
<div class="container">
|
||||
<h1 class="header-title"><a href="#" onclick="app.history.home()">Flarum Demo Forum</a></h1>
|
||||
<div id="header-primary" class="header-primary"></div>
|
||||
<div id="header-secondary" class="header-secondary"></div>
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
<main class="global-content">
|
||||
<div class="side-nav admin-nav title-control" id="admin-nav"></div>
|
||||
<div class="admin-content" id="content"></div>
|
||||
</main>
|
||||
</div>
|
27
views/forum.blade.php
Normal file
27
views/forum.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="global-page" id="page">
|
||||
<div id="back-control"></div>
|
||||
<div class="global-drawer">
|
||||
<header class="global-header" id="header">
|
||||
<div id="back-button"></div>
|
||||
<div class="container">
|
||||
<h1 class="header-title"><a href="#" onclick="app.history.home()">Flarum Demo Forum</a></h1>
|
||||
<div id="header-primary" class="header-primary"></div>
|
||||
<div id="header-secondary" class="header-secondary"></div>
|
||||
</div>
|
||||
</header>
|
||||
<footer class="global-footer" id="footer">
|
||||
<div class="container">
|
||||
<div id="footer-primary" class="footer-primary"></div>
|
||||
<div id="footer-secondary" class="footer-secondary"></div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<main class="global-content">
|
||||
<div id="content"></div>
|
||||
<div class="composer-container">
|
||||
<div class="container">
|
||||
<div id="composer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
@@ -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