<?php
	include $root."includes/start-meta.php";
	echo '<link rel="stylesheet" href="'.$root.'styles/default.css" />';
	$usragent=$_SERVER['HTTP_USER_AGENT'];
	if (!strpos($usragent, 'PaleMoon') !== false && (!isset($_COOKIE['scrollbar']) || $_COOKIE['scrollbar'] !== "true")) {
		echo '<link rel="stylesheet" href="'.$root.'styles/noscroll.css" />';
	} else {
		echo '<link rel="stylesheet" href="'.$root.'styles/scroll.css" />';
	}
	echo '<link rel="stylesheet" href="'.$root.'styles/fonts.css" />';
	echo '<link rel="stylesheet" href="'.$root.'styles/cursor.css" />';
	echo '<meta property="og:url" content="'.(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http")."://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'" />';
	if (isset($_GET['post']) && $_GET['post'] != 'archive') {
		$ogtype = 'article';
		$ogtitle = file_get_contents('./'.$_GET['post']);
		$ogtitle = explode('<h1>', $ogtitle)[1];
		$ogtitle = explode('</h1', $ogtitle)[0];
	} else {
		$ogtype = 'website';
		$ogtitle = $title;
	}
	echo '<meta property="og:type" content="'.$ogtype.'" />';
	echo '<meta property="og:title" content="'.$ogtitle.'" />';
	echo '<meta property="og:image" content="/images/banner.gif" />';
	echo '<meta property="og:image:type" content="image/gif" />';
	echo '<meta property="og:image:width" content="240" />';
	echo '<meta property="og:image:height" content="60" />';
echo '</head>';
?>
