1
0
mirror of https://github.com/flarum/core.git synced 2025-07-19 15:51:16 +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;
}
}
#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>
@if (! $noJs)
<script>
document.getElementById('flarum-loading').style.display = 'block';
</script>
@foreach ($scripts as $file)
<script src="{{ $forum->attributes->baseUrl . str_replace(public_path(), '', $file) }}"></script>
@endforeach
<script>
document.getElementById('flarum-loading').style.display = 'none';
@if (! $forum->attributes->debug)
try {
@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
<div class="Alert">
<div class="container">