fix: Add Livewire config and custom 404 page for subdirectory support

- Add config/livewire.php with app_url and asset_url settings
- Add custom 404 error page with consistent design
- Add error translations for all 8 languages

For subdirectory deployment:
1. Set APP_URL to include subdirectory (e.g., https://example.com/kb)
2. Set ASSET_URL if using CDN
3. Clear config cache after deployment
This commit is contained in:
2025-11-29 17:27:40 +09:00
parent ac56889a87
commit 9625268e67
10 changed files with 209 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ __('messages.errors.404_title') }} - {{ config('app.name') }}</title>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
<body class="font-sans antialiased">
<div class="min-h-screen bg-gray-100 flex flex-col items-center justify-center">
<div class="text-center">
<h1 class="text-9xl font-bold text-gray-300">404</h1>
<h2 class="text-2xl font-semibold text-gray-700 mt-4">
{{ __('messages.errors.page_not_found') }}
</h2>
<p class="text-gray-500 mt-2">
{{ __('messages.errors.page_not_found_description') }}
</p>
<div class="mt-8">
<a href="{{ url('/') }}" class="inline-flex items-center px-6 py-3 bg-indigo-600 text-white font-medium rounded-md hover:bg-indigo-700 transition">
<svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"></path>
</svg>
{{ __('messages.errors.back_to_home') }}
</a>
</div>
</div>
</div>
</body>
</html>