init
This commit is contained in:
43
resources/views/components/layouts/main.edge
Normal file
43
resources/views/components/layouts/main.edge
Normal file
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title ?? 'Imago Vault' }}</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
@if($slots.head)
|
||||
{{{ await $slots.head() }}}
|
||||
@end
|
||||
</head>
|
||||
<body class="bg-gray-950 text-gray-100 min-h-screen">
|
||||
|
||||
{{-- Flash: success --}}
|
||||
@if(flashMessages.has('success'))
|
||||
<div id="flash-success"
|
||||
class="fixed top-4 right-4 z-50 bg-green-600 text-white px-6 py-3 rounded-lg shadow-lg text-sm font-medium pointer-events-none">
|
||||
{{ flashMessages.get('success') }}
|
||||
</div>
|
||||
@end
|
||||
|
||||
{{-- Flash: error --}}
|
||||
@if(flashMessages.has('error'))
|
||||
<div id="flash-error"
|
||||
class="fixed top-4 right-4 z-50 bg-red-600 text-white px-6 py-3 rounded-lg shadow-lg text-sm font-medium pointer-events-none">
|
||||
{{ flashMessages.get('error') }}
|
||||
</div>
|
||||
@end
|
||||
|
||||
{{{ await $slots.main() }}}
|
||||
|
||||
<script>
|
||||
// Auto-dismiss flash messages after 4 s
|
||||
setTimeout(() => {
|
||||
document.querySelectorAll('[id^="flash-"]').forEach(el => {
|
||||
el.style.transition = 'opacity 0.5s'
|
||||
el.style.opacity = '0'
|
||||
setTimeout(() => el.remove(), 500)
|
||||
})
|
||||
}, 4000)
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user