<?php

	$section_slug = $outlay->getSegment(0);
	$utility_sections = array(
		'sitemap'        		=> 1,
		'404'            		=> 1,
		'500'        			=> 1,
		'privacy'     			=> 1,
		'search'      			=> 1,
	);

	if (isset($utility_sections[$section_slug]) || http_response_code() == 404) {
        $section_slug = 'utility';
    }

?>
<!doctype html>
<html lang="en">

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php if(($outlay['layout_type']) == 'home') { ?>
<title><?php echo h($outlay['title']); ?></title>
<?php } else { ?>
	<title><?php echo h($outlay['title']); ?> - Trilix Responsive Grid System</title>
<?php } ?>
<?php /* <?php $outlay->getMetatags(); ?> */ ?>
<?php if(isset($outlay['meta_description'])) { ?>
	<meta name="description" content="<?php echo h($outlay['meta_description']); ?>" />
<?php } ?>
<?php if(isset($outlay['meta_keywords'])) { ?>
	<meta name="keywords" content="<?php echo h($outlay['meta_keywords']); ?>" />
<?php } ?>

<?php // PUT YO FONTS HERE! ?>
<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/global/fontface/index.php' ?>
<?php // END FONTS ?>

<link rel="stylesheet" href="/css/global.css" />
<?php // echo $outlay->asset("/css/global.css"); ?>

<?php echo $outlay['css']; ?>

<?php include $_SERVER['DOCUMENT_ROOT'] . '/includes/global/favicon/index.php' ?>

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#b6bd00">
<meta name="apple-mobile-web-app-title" content="Trilix Responsive Grid System" />
<meta name="application-name" content="Trilix Responsive Grid System" />
<meta name="msapplication-TileColor" content="#b6bd00" />
<meta name="theme-color" content="#ffffff" />

<?php if (isset($outlay['og_image']) && $outlay['og_image'] != '') { ?>
<meta property="og:image" content="<?php echo htmlspecialchars("https://$_SERVER[HTTP_HOST]"); ?>/images/social/og.jpg" />
<?php if (isset($outlay['og_image_type']) && $outlay['og_image_type'] != '') { ?>
<meta property="og:image:type" content="<?php echo h($outlay['og_image_type']); ?>" />
<?php } ?>
<?php if (isset($outlay['og_image_width']) && $outlay['og_image_width']) { ?>
<meta property="og:image:width" content="<?php echo h($outlay['og_image_width']); ?>" />
<?php } ?>
<?php if (isset($outlay['og_image_height']) && $outlay['og_image_height']) { ?>
<meta property="og:image:height" content="<?php echo h($outlay['og_image_height']); ?>" />
<?php } ?>
<?php } else { ?>
<meta property="og:image" content="<?php echo "https://$_SERVER[HTTP_HOST]"; ?>/images/social/open-graph/trlx.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<?php } ?>
<meta property="og:title" content="<?php echo h($outlay['title']); ?>  - Trilix Responsive Grid System" />
<?php if (isset($outlay['metatags.description'])) { ?>
	<meta property="og:description" content="<?php echo h($outlay['metatags.description']); ?>" />
<?php } ?>
<meta property="og:url" content="<?php echo "http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}"; ?>" />
<meta property="og:site_name" content="Trilix Responsive Grid System" />
<?php if (isset($outlay['nosnippet']) && $outlay['nosnippet']) { ?>
<meta name="googlebot" content="nosnippet" />
<?php } ?>

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@trilix" />
<meta name="twitter:title" content="<?php echo h($outlay['title']); ?> - Trilix Responsive Grid System" />
<?php if ($outlay['metatags.description'] != '') { ?>
	<meta name="twitter:description" content="<?php echo h($outlay['metatags.description']); ?>" />
<?php } ?>
<meta name="twitter:image" content="<?php echo "https://$_SERVER[HTTP_HOST]"; ?>/images/social/twitter/trlx.png" />
</head>

<body class="<?php echo $outlay['body_class']; ?>">
	<div id="wrapper" class="wrapper">
		<header>

		</header>
		<?php if(isset($outlay['layout_type']) && $outlay['layout_type'] == 'home') { ?>
			<?php echo $outlay->placeholder('content'); ?>
		<?php } else { ?>
			<div class="main-content">
				<?php echo $outlay->placeholder('content'); ?>
			</div>
		<?php } ?>
		<footer>

		</footer>
		<div class="slide-drawer drawer-right">
			<div class="drawer-content">
				<div class="close-button">
					<a href="#" id="close-button"><div class="icon"><figure></figure></div></a>
				</div>
				<div class="menu-search">
					<form method="get" action="/search/">
						<div class="field-container">
							<input placeholder="Search" class="text" name="q" autocomplete="off" type="text" value="" />
							<button type="submit" class="search-submit"><i class="fa fa-search" aria-hidden="true"></i></button>
						</div>
					</form>
				</div>
				<nav class="slide-menu">
					<ul>
						<li class="nav-head"><a href="#">Menu Header Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
					</ul>
				</nav>
				<nav class="slide-menu">
					<ul>
						<li class="nav-head"><a href="#">Menu Header Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
					</ul>
				</nav>
				<nav class="slide-menu">
					<ul>
						<li class="nav-head"><a href="#">Menu Header Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
					</ul>
				</nav>
				<nav class="slide-menu">
					<ul>
						<li class="nav-head"><a href="#">Menu Header Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
						<li><a href="#">Menu Item</a></li>
					</ul>
				</nav>
				<nav class="slide-menu menu-social">
					<ul>
						<li><a href="#" class="facebook"><i class="fa fa-facebook fa-lg"></i></a></li>
						<li><a href="#" class="twitter"><i class="fa fa-twitter fa-lg"></i></a></li>
						<li><a href="#" class="youtube"><i class="fa fa-youtube-play fa-lg"></i></a></li>
						<li><a href="#" class="pinterest"><i class="fa fa-pinterest fa-lg"></i></a></li>
						<li><a href="#" class="linkedin"><i class="fa fa-linkedin fa-lg"></i></a></li>
					</ul>
				</nav>
			</div>
		</div>
	</div>
	<?php // echo $outlay->asset("/js/global.js"); ?>
	<script src="/js/global.js"></script>
	<?php echo $outlay['js']; ?>
</body>
</html>