File: /home/xedaptot/ai.naniguide.com/resources/views/layouts/install.blade.php
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title', trans('install.page.title')) — {{ config('app.name', 'Acelle Mail') }}</title>
<link rel="icon" href="{{ AppUrl::asset('refactor/images/favicon.svg') }}" type="image/svg+xml">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,[email protected],100..700,0..1,-50..200&display=swap" rel="stylesheet">
@php $cssVer = '20260429-install-mc-step-bar'; @endphp
<link href="{{ asset('refactor/css/app.css') }}?v={{ $cssVer }}" rel="stylesheet">
<link href="{{ asset('refactor/css/components.css') }}?v={{ $cssVer }}" rel="stylesheet">
<link href="{{ asset('refactor/css/auth.css') }}?v={{ $cssVer }}" rel="stylesheet">
<script>(function(){var t=localStorage.getItem('mc-theme');if(!t&&window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches)t='dark';if(t)document.documentElement.setAttribute('data-theme',t);})();</script>
@yield('head')
</head>
<body class="install-body">
@php
// Filesystem-based locale list (DB may not exist yet during install)
$installLocaleNames = [
'en' => 'English',
'de' => 'Deutsch',
'es' => 'Español',
'it' => 'Italiano',
'ja' => '日本語',
'pt' => 'Português',
'tr' => 'Türkçe',
];
$installLocales = [];
foreach (array_diff(scandir(resource_path('lang')) ?: [], ['.', '..', 'default']) as $dir) {
if (is_dir(resource_path('lang/' . $dir))) {
$installLocales[$dir] = $installLocaleNames[$dir] ?? strtoupper($dir);
}
}
ksort($installLocales);
$currentLocale = app()->getLocale();
$currentLocaleName = $installLocales[$currentLocale] ?? strtoupper($currentLocale);
@endphp
{{-- Install container — full screen --}}
<div class="install-wrapper">
{{-- Top bar with logo --}}
<div class="install-topbar">
<div class="install-topbar-inner">
<div class="install-logo">
@if (function_exists('getDefaultLogoUrl') && getDefaultLogoUrl('dark'))
<img src="{{ getDefaultLogoUrl('dark') }}" alt="{{ config('app.name', 'Acelle Mail') }}">
@else
<span class="install-logo-text">{{ config('app.name', 'Acelle Mail') }}</span>
@endif
</div>
<div class="install-topbar-badge">
<span class="material-symbols-rounded" style="font-size:14px">rocket_launch</span>
{{ trans('install.page.title') }}
</div>
<div class="auth-topbar-actions">
{{-- Theme toggle --}}
<button type="button" class="auth-theme-toggle" id="installThemeToggle"
aria-label="{{ trans('install.topbar.toggle_dark_mode') }}"
title="{{ trans('install.topbar.toggle_dark_mode') }}">
<span class="material-symbols-rounded auth-theme-icon-light">dark_mode</span>
<span class="material-symbols-rounded auth-theme-icon-dark">light_mode</span>
</button>
{{-- Language switcher --}}
@if (count($installLocales) > 1)
<div class="auth-lang-switcher">
<button type="button" class="auth-lang-btn" id="installLangBtn"
aria-label="{{ trans('install.topbar.select_language') }}">
<span class="material-symbols-rounded auth-lang-icon">language</span>
<span class="auth-lang-current">{{ $currentLocaleName }}</span>
<span class="material-symbols-rounded auth-lang-chevron">expand_more</span>
</button>
<div class="auth-lang-dropdown" id="installLangDropdown">
@foreach ($installLocales as $code => $name)
<a href="#" class="auth-lang-option {{ $code === $currentLocale ? 'active' : '' }}"
data-lang-code="{{ $code }}">
<span class="auth-lang-option-code">{{ strtoupper(substr($code, 0, 2)) }}</span>
<span class="auth-lang-option-name">{{ $name }}</span>
@if ($code === $currentLocale)
<span class="material-symbols-rounded auth-lang-check">check</span>
@endif
</a>
@endforeach
</div>
</div>
@endif
</div>
</div>
</div>
{{-- Step navigation --}}
@yield('steps')
{{-- Main content --}}
<div class="install-main">
<div class="install-content">
{{-- Flash messages --}}
@if (session('alert-success'))
<div class="install-alert install-alert-success">
<span class="material-symbols-rounded">check_circle</span>
{{ session('alert-success') }}
</div>
@endif
@if (session('alert-error'))
<div class="install-alert install-alert-danger">
<span class="material-symbols-rounded">error</span>
{{ session('alert-error') }}
</div>
@endif
{{-- Validation errors --}}
@if (count($errors) > 0)
<div class="install-alert install-alert-danger">
<span class="material-symbols-rounded">error</span>
<div>
@foreach ($errors->all() as $error)
<div>{{ $error }}</div>
@endforeach
</div>
</div>
@endif
@yield('content')
</div>
</div>
{{-- Footer --}}
<div class="install-footer">
©{{ date('Y') }} {{ config('app.name', 'Acelle Mail') }}. {{ trans('install.footer.rights') }}
</div>
</div>
{{-- Language switcher JS --}}
<script>
(function() {
var btn = document.getElementById('installLangBtn');
var dropdown = document.getElementById('installLangDropdown');
if (btn && dropdown) {
btn.addEventListener('click', function(e) {
e.stopPropagation();
dropdown.classList.toggle('is-open');
btn.classList.toggle('is-open');
});
document.addEventListener('click', function() {
dropdown.classList.remove('is-open');
btn.classList.remove('is-open');
});
dropdown.addEventListener('click', function(e) { e.stopPropagation(); });
document.querySelectorAll('#installLangDropdown .auth-lang-option').forEach(function(opt) {
opt.addEventListener('click', function(e) {
e.preventDefault();
var code = opt.dataset.langCode;
document.cookie = 'last_language_code=' + code + ';path=/;max-age=' + (365 * 24 * 60 * 60);
window.location.reload();
});
});
}
})();
</script>
{{-- Theme toggle JS --}}
<script>
(function() {
var btn = document.getElementById('installThemeToggle');
if (!btn) return;
btn.addEventListener('click', function() {
var html = document.documentElement;
var current = html.getAttribute('data-theme');
var next = current === 'dark' ? '' : 'dark';
if (next) {
html.setAttribute('data-theme', next);
localStorage.setItem('mc-theme', next);
} else {
html.removeAttribute('data-theme');
localStorage.removeItem('mc-theme');
}
});
})();
</script>
@yield('scripts')
</body>
</html>