Refactor app.blade.php to comment out existing PWA manifest and service worker registration, and add new commented-out HTML structure for PWA integration
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<link rel="manifest" href="{{ asset('manifest.json') }}">
|
||||
{{-- <link rel="manifest" href="{{ asset('manifest.json') }}">
|
||||
<meta name="theme-color" content="#007bff">
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
@@ -9,7 +9,7 @@
|
||||
console.log('Service Worker registration failed:', err);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</script> --}}
|
||||
|
||||
{{-- <!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
@@ -86,4 +86,30 @@
|
||||
</body>
|
||||
</html> --}}
|
||||
|
||||
{{-- <!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>@yield('title', 'App')</title>
|
||||
|
||||
<!-- ✅ Add this -->
|
||||
<link rel="manifest" href="{{ asset('manifest.json') }}">
|
||||
<meta name="theme-color" content="#007bff">
|
||||
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
.then(reg => console.log('Service Worker registered:', reg.scope))
|
||||
.catch(err => console.error('Service Worker registration failed:', err));
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@yield('content')
|
||||
</body>
|
||||
</html> --}}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user