1
0
mirror of https://github.com/flarum/core.git synced 2025-07-20 16:21:18 +02:00

Display "Loading..." text while JS is loading

This commit is contained in:
Toby Zerner
2015-11-02 16:47:36 +10:30
parent d650c6c1f2
commit eed3755aa9
3 changed files with 43 additions and 27 deletions

View File

@@ -137,3 +137,10 @@ blockquote ol:last-child {
margin: 0; margin: 0;
} }
} }
#flarum-loading {
text-align: center;
padding: 50px 0;
font-size: 18px;
color: @muted-more-color;
}

View File

@@ -22,11 +22,16 @@
<div id="alerts"></div> <div id="alerts"></div>
@if (! $noJs) @if (! $noJs)
<script>
document.getElementById('flarum-loading').style.display = 'block';
</script>
@foreach ($scripts as $file) @foreach ($scripts as $file)
<script src="{{ $forum->attributes->baseUrl . str_replace(public_path(), '', $file) }}"></script> <script src="{{ $forum->attributes->baseUrl . str_replace(public_path(), '', $file) }}"></script>
@endforeach @endforeach
<script> <script>
document.getElementById('flarum-loading').style.display = 'none';
@if (! $forum->attributes->debug) @if (! $forum->attributes->debug)
try { try {
@endif @endif

View File

@@ -1,3 +1,7 @@
<div id="flarum-loading" style="display: none">
{{ $translator->trans('core.basic.loading_text') }}
</div>
@if (! $noJs) <noscript> @endif @if (! $noJs) <noscript> @endif
<div class="Alert"> <div class="Alert">
<div class="container"> <div class="container">