hypothetical/resources/views/templates/base.blade.php

66 lines
3 KiB
PHP
Raw Permalink Normal View History

<!DOCTYPE html>
<html lang="{{ Language::getSessionLanguage() }}">
2022-05-23 21:01:33 -04:00
@php
// Determine whether the device is mobile
$device_mobile = !is_null(Request::header('User-Agent')) && (preg_match('/Mobi/', Request::header('User-Agent')) || preg_match('/iP(hone|ad|od);/', Request::header('User-Agent')));
// If an overridden title has been set (error pages) then use that, otherwise use the Meta model to populate metadata
if (isset($title)) {
$meta = [ 'title' => $title . ' - ' . env('APP_NAME'), 'description' => '', 'keywords' => '' ];
} else {
$meta = App\Models\Meta::getData(Request::path());
}
2022-05-23 21:01:33 -04:00
@endphp
<head>
2019-03-19 14:29:29 -04:00
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
2019-04-03 17:10:46 -04:00
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
2017-02-13 22:42:12 -05:00
<meta name="theme-color" content="#fcfcfc" />
<title>{{ $meta['title'] }}</title>
2019-03-19 14:33:17 -04:00
<meta name="title" content="{{ $meta['title'] }}" />
<meta name="description" content="{{ $meta['description'] }}" />
<meta name="keywords" content="{{ $meta['keywords'] }}" />
<meta name="dc:title" content="{{ $meta['title'] }}" />
<meta name="dc:description" content="{{ $meta['description'] }}" />
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ $meta['title'] }}" />
<meta property="og:description" content="{{ $meta['description'] }}" />
<meta property="og:url" content="{{ Request::url() }}" />
<meta property="og:image" content="{{ asset('/img/social-image-opengraph.jpg') }}" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ $meta['title'] }}" />
<meta name="twitter:description" content="{{ $meta['description'] }}" />
<meta name="twitter:image" content="{{ asset('/img/social-image-card.jpg') }}" />
<link rel="shortcut icon" href="{{ URL::to('/') }}/favicon.ico?version={{ Version::get() }}" />
<link rel="icon" href="{{ URL::to('/') }}/favicon.ico?version={{ Version::get() }}" type="image/x-icon" />
<link rel="icon" href="{{ URL::to('/') }}/favicon.png?version={{ Version::get() }}" type="image/png" />
<link rel="canonical" href="{{ Request::url() }}" />
@yield('page-includes')
</head>
<body class="{{ $device_mobile ? 'mobile-browser' : 'desktop-browser' }}">
<div class="site-content">
@yield('page-top')
<div class="page-content">
@yield('page-content')
</div>
@yield('page-bottom')
</div>
2018-04-06 00:29:22 -04:00
@if(Config::get('app.debug') && Config::get('app.env') === 'local')
2018-04-06 00:29:22 -04:00
<script id="__bs_script__">//<![CDATA[
2022-03-23 13:55:18 -04:00
document.write("<script async src='http://HOST:3000/browser-sync/browser-sync-client.js?version={{ Version::get() }}'><\/script>".replace("HOST", location.hostname));
2018-04-06 00:29:22 -04:00
//]]></script>
@endif
</body>
</html>