完善功能
This commit is contained in:
58
web10/resources/views/frontend/layouts/app.blade.php
Normal file
58
web10/resources/views/frontend/layouts/app.blade.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ $title ?? $siteTitle }}</title>
|
||||
<meta name="description" content="{{ $description ?? $siteDescription }}">
|
||||
<meta property="og:title" content="{{ $title ?? $siteTitle }}">
|
||||
<meta property="og:description" content="{{ $description ?? $siteDescription }}">
|
||||
<meta property="og:type" content="{{ $ogType ?? 'website' }}">
|
||||
<meta property="og:url" content="{{ url()->current() }}">
|
||||
@if(!empty($ogImage))
|
||||
<meta property="og:image" content="{{ $ogImage }}">
|
||||
@endif
|
||||
<script type="application/ld+json">
|
||||
{!! json_encode([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'WebSite',
|
||||
'name' => $siteTitle,
|
||||
'url' => url('/'),
|
||||
'potentialAction' => [
|
||||
'@type' => 'SearchAction',
|
||||
'target' => route('search.index') . '?q={search_term_string}',
|
||||
'query-input' => 'required name=search_term_string',
|
||||
],
|
||||
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) !!}
|
||||
</script>
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
@if($gaId)
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ $gaId }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ $gaId }}');
|
||||
</script>
|
||||
@endif
|
||||
@stack('head')
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-shell">
|
||||
@include('frontend.partials.header')
|
||||
|
||||
<div class="app-body">
|
||||
<aside class="sidebar">
|
||||
@include('frontend.partials.sidebar')
|
||||
</aside>
|
||||
<main class="content">
|
||||
@yield('content')
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@include('frontend.partials.footer')
|
||||
</div>
|
||||
@stack('scripts')
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user