mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-03-09 08:08:00 +01:00
Added Maintenance Mode
This commit is contained in:
parent
3275e9ce15
commit
75d39276ed
100
resources/views/maintenance.blade.php
Normal file
100
resources/views/maintenance.blade.php
Normal file
@ -0,0 +1,100 @@
|
||||
<!DOCTYPE html>
|
||||
@include('layouts.lang')
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
@include('layouts.analytics')
|
||||
|
||||
@if(env('CUSTOM_META_TAGS') == 'true' and config('advanced-config.title') != '')
|
||||
<title>{{ config('advanced-config.title') }}</title>
|
||||
@else
|
||||
<title>{{ config('app.name') }}</title>
|
||||
@endif
|
||||
|
||||
@if(env('CUSTOM_META_TAGS') == 'true')
|
||||
@include('layouts.meta')
|
||||
@else
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
@endif
|
||||
|
||||
<!-- Custom icons font-awesome -->
|
||||
<script src="https://kit.fontawesome.com/c4a5e06183.js" crossorigin="anonymous"></script>
|
||||
|
||||
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,600,800&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/normalize.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/animate.css') }}">
|
||||
@if(file_exists(base_path("littlelink/images/avatar.png" )))
|
||||
<link rel="icon" type="image/png" href="{{ asset('littlelink/images/avatar.png') }}">
|
||||
@else
|
||||
<link rel="icon" type="image/svg+xml" href="{{ asset('littlelink/images/logo.svg') }}">
|
||||
@endif
|
||||
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/brands.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/animations.css') }}">
|
||||
<?php // override dark/light mode if override cookie is set
|
||||
$color_scheme_override = isset($_COOKIE["color_scheme_override"]) ? $_COOKIE["color_scheme_override"] : false; ?>
|
||||
@if ($color_scheme_override == 'dark')
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
|
||||
@elseif ($color_scheme_override == 'light')
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
|
||||
@elseif (config('advanced-config.theme') == 'dark')
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
|
||||
@elseif (config('advanced-config.theme') == 'light')
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
|
||||
@else
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-auto.css') }}">
|
||||
@endif
|
||||
|
||||
{{-- custom font for logo text --}}
|
||||
<style>@font-face{font-family:'ll';src:url({{ asset('littlelink/fonts/littlelink-custom.otf') }}) format("opentype")}</style>
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.containerr {
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (min-width:700px) {
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="containerr" style="">
|
||||
<div class="column">
|
||||
<!-- Your Image Here -->
|
||||
@if(file_exists(base_path("littlelink/images/avatar.png" )))
|
||||
<img alt="avatar" src="{{ asset('littlelink/images/avatar.png') }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="200px" height="200px">
|
||||
@else
|
||||
<div class="logo-container">
|
||||
<img src="{{ asset('littlelink/images/logo.svg') }}" alt="Logo" style="width:200px; height:200px;">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div style="padding-bottom:5%;">
|
||||
<h1 style="font-size: 300%;"><i class="fa-solid fa-screwdriver-wrench"></i> Maintenance Mode <i class="fa-solid fa-screwdriver-wrench"></i></h1>
|
||||
<h2>We are performing scheduled site maintenance at this time.</h2>
|
||||
<h3>Please check back with us later.</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -161,6 +161,8 @@ exit(); ?>
|
||||
<h1 class="loadingtxt">Finishing up</h1>
|
||||
|
||||
@include('components.finishing')
|
||||
|
||||
<?php if(file_exists(base_path("storage/MAINTENANCE"))){unlink(base_path("storage/MAINTENANCE"));} ?>
|
||||
@endif
|
||||
|
||||
@if($_SERVER['QUERY_STRING'] === 'success')
|
||||
@ -194,6 +196,8 @@ exit(); ?>
|
||||
@if($_SERVER['QUERY_STRING'] === 'error')
|
||||
<?php //on error ?>
|
||||
|
||||
<?php if(file_exists(base_path("storage/MAINTENANCE"))){unlink(base_path("storage/MAINTENANCE"));} ?>
|
||||
|
||||
<div class="logo-container fadein">
|
||||
<img class="logo-img" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
||||
<div class="logo-centered">l</div>
|
||||
|
@ -17,6 +17,13 @@ use App\Http\Controllers\UserController;
|
||||
|
|
||||
*/
|
||||
|
||||
// Displays Maintenance Mode page
|
||||
if(env('MAINTENANCE_MODE') == 'true' or file_exists(base_path("storage/MAINTENANCE"))){
|
||||
Route::get('/{any}', function () {
|
||||
return view('maintenance');
|
||||
})->where('any', '.*');
|
||||
} else {
|
||||
|
||||
// Prevents section below from being run by 'composer update'
|
||||
if(file_exists(base_path('storage/app/ISINSTALLED'))){
|
||||
// generates new APP KEY if no one is set
|
||||
@ -128,6 +135,9 @@ Route::get('/updating', function (\Codedge\Updater\UpdaterManager $updater) {
|
||||
// Check if new version is available
|
||||
if($updater->source()->isNewVersionAvailable() and (file_exists(base_path("backups/CANUPDATE")) or env('SKIP_UPDATE_BACKUP') == true)) {
|
||||
|
||||
$tst = base_path('storage/');
|
||||
file_put_contents($tst.'MAINTENANCE', '');
|
||||
|
||||
// Get the current installed version
|
||||
echo $updater->source()->getVersionInstalled();
|
||||
|
||||
@ -151,5 +161,6 @@ Route::get('/updating', function (\Codedge\Updater\UpdaterManager $updater) {
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
require __DIR__.'/auth.php';
|
||||
|
Loading…
x
Reference in New Issue
Block a user