mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Massive JavaScript cleanup
- Use JSX for templates - Docblock/comment everything - Mostly passes ESLint (still some work to do) - Lots of renaming, refactoring, etc. CSS hasn't been updated yet.
This commit is contained in:
@@ -24,14 +24,19 @@
|
||||
@foreach ($scripts as $file)
|
||||
<script src="{{ str_replace(public_path(), '', $file) }}"></script>
|
||||
@endforeach
|
||||
|
||||
<script>
|
||||
var app = require('flarum/app')['default'];
|
||||
app.preload = {
|
||||
data: {!! json_encode($data) !!},
|
||||
document: {!! json_encode($document) !!},
|
||||
session: {!! json_encode($session) !!}
|
||||
};
|
||||
app.boot();
|
||||
var app;
|
||||
System.import('flarum/app').then(function(module) {
|
||||
app = module.default;
|
||||
app.preload = {
|
||||
data: {!! json_encode($data) !!},
|
||||
document: {!! json_encode($document) !!},
|
||||
session: {!! json_encode($session) !!}
|
||||
};
|
||||
initLocale(app);
|
||||
app.boot();
|
||||
});
|
||||
</script>
|
||||
|
||||
@if ($content)
|
||||
|
@@ -10,27 +10,27 @@
|
||||
* this template. They are distinguished by their ID attributes:
|
||||
*
|
||||
* - #page
|
||||
* - #page-back-button
|
||||
* - #page-navigation
|
||||
* - #header
|
||||
* - #header-back-button
|
||||
* - #header-navigation
|
||||
* - #home-link
|
||||
* - #header-primary-controls
|
||||
* - #header-secondary-controls
|
||||
* - #header-primary
|
||||
* - #header-secondary
|
||||
* - #footer
|
||||
* - #footer-primary-controls
|
||||
* - #footer-secondary-controls
|
||||
* - #footer-primary
|
||||
* - #footer-secondary
|
||||
* - #content
|
||||
* - #composer
|
||||
*/
|
||||
?>
|
||||
<div class="global-page" id="page">
|
||||
<div id="page" class="global-page">
|
||||
|
||||
<div id="back-control"></div>
|
||||
<div id="page-navigation"></div>
|
||||
|
||||
<div class="global-drawer">
|
||||
|
||||
<header class="global-header" id="header">
|
||||
<div id="back-button"></div>
|
||||
<header id="header" class="global-header">
|
||||
<div id="header-navigation"></div>
|
||||
<div class="container">
|
||||
<h1 class="header-title">
|
||||
<a href="{{ $forum->attributes->baseUrl }}" id="home-link">
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<footer class="global-footer" id="footer">
|
||||
<footer id="footer" class="global-footer">
|
||||
<div class="container">
|
||||
<div id="footer-primary" class="footer-primary"></div>
|
||||
<div id="footer-secondary" class="footer-secondary"></div>
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
<main class="global-content">
|
||||
<div id="content"></div>
|
||||
|
||||
<div class="composer-container">
|
||||
<div class="container">
|
||||
<div id="composer"></div>
|
||||
|
Reference in New Issue
Block a user