You've already forked Atomcms-edit
Initial commit
This commit is contained in:
+327
@@ -0,0 +1,327 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>{{ setting('hotel_name') }} - {{ __('Maintenance') }}</title>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/flowbite@1.5.1/dist/flowbite.min.css"/>
|
||||
<script src="https://unpkg.com/flowbite@1.5.1/dist/flowbite.js"></script>
|
||||
|
||||
@vite(['resources/themes/' . setting('theme') . '/css/app.css', 'resources/themes/' . setting('theme') . '/js/app.js'], 'build')
|
||||
|
||||
<style>
|
||||
.gradient-bg {
|
||||
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
|
||||
}
|
||||
.glass-effect {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.task-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
@keyframes pulse-glow {
|
||||
0%, 100% { box-shadow: 0 0 20px rgba(234, 179, 8, 0.3); }
|
||||
50% { box-shadow: 0 0 40px rgba(234, 179, 8, 0.6); }
|
||||
}
|
||||
.countdown-glow {
|
||||
animation: pulse-glow 2s ease-in-out infinite;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body class="h-screen overflow-hidden relative gradient-bg">
|
||||
<x-messages.flash-messages/>
|
||||
|
||||
<div class="w-full h-full flex">
|
||||
<!-- Left Sidebar - Tasks -->
|
||||
<div class="bg-[#0f172a]/80 backdrop-blur-xl w-[400px] h-full py-8 hidden lg:flex flex-col border-r border-white/10 relative overflow-hidden">
|
||||
<!-- Decorative elements -->
|
||||
<div class="absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-yellow-400 via-yellow-500 to-yellow-600"></div>
|
||||
<div class="absolute -top-20 -right-20 w-40 h-40 bg-yellow-500/10 rounded-full blur-3xl"></div>
|
||||
|
||||
<!-- Logo -->
|
||||
<div class="px-8 mb-6">
|
||||
<img src="{{ setting('cms_logo') }}" alt="" class="h-16 w-auto">
|
||||
</div>
|
||||
|
||||
<!-- Stats Summary -->
|
||||
<div class="px-8 mb-6">
|
||||
<div class="glass-effect rounded-xl p-4">
|
||||
<div class="flex items-center justify-between mb-3">
|
||||
<span class="text-[var(--color-text-muted)] text-sm uppercase tracking-wider">{{ __('Maintenance Progress') }}</span>
|
||||
@php
|
||||
$totalTasks = ($tasks instanceof \Illuminate\Pagination\LengthAwarePaginator || method_exists($tasks, 'total')) ? $tasks->total() : ($tasks->count() ?? 0);
|
||||
$completedTasks = $tasks->where('completed', true)->count();
|
||||
$progress = $totalTasks > 0 ? round(($completedTasks / $totalTasks) * 100) : 0;
|
||||
@endphp
|
||||
<span class="text-yellow-400 font-bold">{{ $progress }}%</span>
|
||||
</div>
|
||||
<div class="w-full bg-[var(--color-background)]/50 rounded-full h-2">
|
||||
<div class="bg-gradient-to-r from-yellow-400 to-yellow-500 h-2 rounded-full transition-all duration-500" style="width: {{ $progress }}%"></div>
|
||||
</div>
|
||||
<div class="flex justify-between mt-2 text-xs text-[var(--color-text-muted)]">
|
||||
<span>{{ $completedTasks }} {{ __('completed') }}</span>
|
||||
<span>{{ $totalTasks }} {{ __('total') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Tasks List -->
|
||||
<div class="flex-1 overflow-y-auto px-8">
|
||||
<div class="flex items-center gap-2 mb-4">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-yellow-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
|
||||
</svg>
|
||||
<h3 class="text-[var(--color-text)] font-semibold">{{ __('Active Tasks') }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-4">
|
||||
@forelse($tasks as $task)
|
||||
<div class="task-card relative h-[90px] overflow-hidden bg-[#1e293b] rounded-xl p-4 transition-all duration-300 border border-white/5">
|
||||
<!-- Status indicator -->
|
||||
<div class="absolute top-3 right-3">
|
||||
@if($task->completed)
|
||||
<span class="flex items-center gap-1 text-xs text-green-400 bg-green-400/10 px-2 py-1 rounded-full">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
{{ __('Done') }}
|
||||
</span>
|
||||
@else
|
||||
<span class="flex items-center gap-1 text-xs text-yellow-400 bg-yellow-400/10 px-2 py-1 rounded-full">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3 animate-spin" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
||||
</svg>
|
||||
{{ __('In Progress') }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-4 h-full">
|
||||
<!-- User Avatar -->
|
||||
<div class="shrink-0">
|
||||
@if($task->user)
|
||||
<img
|
||||
class="w-12 h-12 rounded-lg -lg"
|
||||
style="image-rendering: auto"
|
||||
src="{{ setting('avatar_imager') }}{{ $task->user->look }}&direction=3&head_direction=3&gesture=sml&action=wav&frame=0"
|
||||
alt=""
|
||||
/>
|
||||
@else
|
||||
<div class="w-12 h-12 bg-[var(--color-background)] rounded-lg flex items-center justify-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-[var(--color-text-muted)]" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />
|
||||
</svg>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Task Info -->
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="text-[var(--color-text)] font-medium text-sm truncate">{{ $task->task }}</p>
|
||||
<p class="text-[var(--color-text-muted)] text-xs mt-1">
|
||||
{{ __('By') }}: <span class="text-yellow-400">{{ $task->user?->username ?? 'System' }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="text-center py-8 text-[var(--color-text-muted)]">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12 mx-auto mb-3 opacity-50" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<p>{{ __('No active maintenance tasks') }}</p>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@if($tasks->hasPages())
|
||||
<div class="mt-6">
|
||||
{{ $tasks->links() }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="px-8 py-4 border-t border-white/10">
|
||||
<div class="flex items-center justify-between text-xs text-[var(--color-text-muted)]">
|
||||
<span>{{ __('Last updated') }}: {{ now()->format('H:i') }}</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="w-2 h-2 bg-green-500 rounded-full animate-pulse"></span>
|
||||
<span>{{ __('System Online') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div class="flex-1 px-6 lg:px-16 text-[var(--color-text)] h-full flex flex-col justify-center relative z-10 overflow-y-auto">
|
||||
<!-- Background decoration -->
|
||||
<div class="absolute top-0 right-0 w-[600px] h-[600px] bg-yellow-500/5 rounded-full blur-3xl -z-10"></div>
|
||||
|
||||
<!-- Header -->
|
||||
<div class="mb-8">
|
||||
<div class="flex items-center gap-4 mb-4">
|
||||
<div class="p-3 bg-yellow-500/20 rounded-xl">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-yellow-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-4xl lg:text-5xl font-bold text-[var(--color-text)]">{{ __('Maintenance Mode') }}</h2>
|
||||
<p class="text-[var(--color-text-muted)]">{{ setting('hotel_name') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$scheduledAt = setting('maintenance_scheduled_at');
|
||||
$duration = (int) setting('maintenance_duration_minutes', 30);
|
||||
$endTime = $scheduledAt ? \Carbon\Carbon::parse($scheduledAt)->addMinutes($duration) : null;
|
||||
$isScheduled = $endTime && $endTime->isFuture();
|
||||
@endphp
|
||||
|
||||
@if($isScheduled)
|
||||
<!-- Countdown Timer -->
|
||||
<div class="mb-8">
|
||||
<div class="glass-effect rounded-2xl p-6 max-w-md">
|
||||
<div class="flex items-center gap-2 mb-4">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-yellow-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span class="text-[var(--color-text-muted)] text-sm uppercase tracking-wider">{{ __('Estimated Completion') }}</span>
|
||||
</div>
|
||||
|
||||
<div id="countdown" class="countdown-glow text-5xl font-mono font-bold text-[var(--color-text)] mb-2" data-end="{{ $endTime->timestamp }}">
|
||||
--:--:--
|
||||
</div>
|
||||
|
||||
<p class="text-[var(--color-text-muted)] text-sm">
|
||||
<span class="text-[var(--color-text-muted)]">{{ __('Date') }}:</span> {{ $endTime->format('d M Y') }}
|
||||
<span class="text-[var(--color-text-muted)] ml-2">{{ __('Time') }}:</span> {{ $endTime->format('H:i') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function updateCountdown() {
|
||||
const countdownEl = document.getElementById('countdown');
|
||||
if (!countdownEl) return;
|
||||
|
||||
const endTime = parseInt(countdownEl.dataset.end) * 1000;
|
||||
const now = Date.now();
|
||||
const diff = endTime - now;
|
||||
|
||||
if (diff <= 0) {
|
||||
countdownEl.textContent = '00:00:00';
|
||||
countdownEl.classList.remove('countdown-glow');
|
||||
return;
|
||||
}
|
||||
|
||||
const hours = Math.floor(diff / (1000 * 60 * 60));
|
||||
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
|
||||
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
|
||||
|
||||
countdownEl.textContent =
|
||||
String(hours).padStart(2, '0') + ':' +
|
||||
String(minutes).padStart(2, '0') + ':' +
|
||||
String(seconds).padStart(2, '0');
|
||||
}
|
||||
|
||||
updateCountdown();
|
||||
setInterval(updateCountdown, 1000);
|
||||
</script>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Message -->
|
||||
<article class="glass-effect rounded-2xl p-8 max-w-2xl">
|
||||
<div class="flex items-start gap-4">
|
||||
<div class="p-2 bg-yellow-500/20 rounded-lg shrink-0">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-yellow-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold text-[var(--color-text)] mb-2">{{ __('Important Information') }}</h3>
|
||||
<div class="prose prose-invert max-w-none text-[var(--color-text-muted)]">
|
||||
<p>{!! setting('maintenance_message') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<!-- Additional Info -->
|
||||
<div class="mt-8 flex flex-wrap gap-4">
|
||||
@if(setting('discord_invitation_link'))
|
||||
<a href="{{ is_array(setting('discord_invitation_link')) ? '' : setting('discord_invitation_link') }}" target="_blank"
|
||||
class="glass-effect hover:bg-white/10 rounded-xl px-6 py-3 flex items-center gap-3 transition-all duration-200">
|
||||
<svg class="h-6 w-6 text-[#5865F2]" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>
|
||||
</svg>
|
||||
<span class="text-[var(--color-text)] font-medium">{{ __('Join our Discord') }}</span>
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if(setting('twitter_url'))
|
||||
<a href="{{ setting('twitter_url') }}" target="_blank"
|
||||
class="glass-effect hover:bg-white/10 rounded-xl px-6 py-3 flex items-center gap-3 transition-all duration-200">
|
||||
<svg class="h-6 w-6 text-[var(--color-text)]" fill="currentColor" viewBox="0 0 24 24">
|
||||
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126h5.835z"/>
|
||||
</svg>
|
||||
<span class="text-[var(--color-text)] font-medium">{{ __('Follow us on X') }}</span>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Mobile Stats (visible only on mobile) -->
|
||||
<div class="lg:hidden mt-8">
|
||||
<div class="glass-effect rounded-xl p-4">
|
||||
<div class="flex items-center justify-between mb-3">
|
||||
<span class="text-[var(--color-text-muted)] text-sm">{{ __('Progress') }}</span>
|
||||
@php
|
||||
$totalTasks = ($tasks instanceof \Illuminate\Pagination\LengthAwarePaginator || method_exists($tasks, 'total')) ? $tasks->total() : ($tasks->count() ?? 0);
|
||||
$completedTasks = $tasks->where('completed', true)->count();
|
||||
$progress = $totalTasks > 0 ? round(($completedTasks / $totalTasks) * 100) : 0;
|
||||
@endphp
|
||||
<span class="text-yellow-400 font-bold">{{ $progress }}%</span>
|
||||
</div>
|
||||
<div class="w-full bg-[var(--color-background)]/50 rounded-full h-2">
|
||||
<div class="bg-yellow-500 h-2 rounded-full" style="width: {{ $progress }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Background Image -->
|
||||
<img class="absolute bottom-0 right-0 opacity-30 hidden lg:block z-0 pointer-events-none" src="/assets/images/maintenance/hotelview.png" alt="">
|
||||
|
||||
@guest
|
||||
<div class="absolute top-6 right-6 z-50">
|
||||
<x-modals.modal-wrapper>
|
||||
<button @click="open = !open"
|
||||
class="glass-effect hover:bg-white/20 px-6 py-3 rounded-xl font-semibold text-[var(--color-text)] transition duration-200 ease-in-out flex items-center gap-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1" />
|
||||
</svg>
|
||||
{{ __('Staff Login') }}
|
||||
</button>
|
||||
|
||||
<x-modals.regular-modal x-model="show {{ session()->get('wrong-auth') }}">
|
||||
<x-auth.login-form/>
|
||||
</x-modals.regular-modal>
|
||||
</x-modals.modal-wrapper>
|
||||
</div>
|
||||
@endguest
|
||||
</body>
|
||||
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" defer></script>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user