<!DOCTYPE html>
<html lang="<?php echo ACTIVE_LANG;?>" data-theme="<?php if(empty($_COOKIE['mode'])) echo 'dark';?>">

<head>
    <title>
        <?php echo $Config['title'];?>
    </title>
    <meta name="description" content="<?php echo htmlspecialchars($Config['description']);?>">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="theme-color" content="#121217">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="HandheldFriendly" content="True">
    <meta http-equiv="cleartype" content="on">
    <link rel="dns-prefetch" href="//ajax.googleapis.com" />
    <link rel="dns-prefetch" href="//www.googletagmanager.com" />
    <link rel="dns-prefetch" href="//fonts.googleapis.com" />
    <link rel="dns-prefetch" href="//fonts.gstatic.com" />
    <link rel="dns-prefetch" href="//cdnjs.cloudflare.com" />
    <link rel="dns-prefetch" href="//www.google-analytics.com">
    <?php if(isset($Config['share']) AND $Config['share'] == true) { ?>
    <meta property="og:site_name" content="<?php echo APP;?>">
    <meta property="og:url" content="<?php echo $Config['url'];?>">
    <meta property="og:type" content="product">
    <meta property="og:title" content="<?php echo $Config['title'];?>">
    <meta property="og:description" content="<?php echo $Config['description'];?>">
    <?php if(isset($Config['image']) AND $Config['image']) { ?>
    <meta property="og:image" content="<?php echo $Config['image'];?>">
    <?php } ?>
    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="<?php echo $Config['title'];?>">
    <meta name="twitter:url" content="<?php echo $Config['url'];?>">
    <meta name="twitter:description" content="<?php echo $Config['description'];?>">
    <?php if(isset($Config['image'])) { ?>
    <meta name="twitter:image" content="<?php echo $Config['image'];?>" />
    <?php } ?>
    <?php } ?>
    <?php if(isset($Config['url'])) { ?>
    <link rel="canonical" href="<?php echo $Config['url'];?>">
    <?php } ?>
    <link rel="preload" as="font" type="font/woff2" href="<?php echo ASSETS.'/fonts/Inter-Regular.woff2?v=3.19';?>" crossorigin="anonymous">
    <link rel="preload" as="font" type="font/woff2" href="<?php echo ASSETS.'/fonts/Inter-SemiBold.woff2?v=3.19';?>" crossorigin="anonymous">
    <link rel="preload" as="font" type="font/woff2" href="<?php echo ASSETS.'/fonts/Inter-Medium.woff2?v=3.19';?>" crossorigin="anonymous">
    <link rel="preload" as="font" type="font/woff2" href="<?php echo ASSETS.'/fonts/Inter-Bold.woff2?v=3.19';?>" crossorigin="anonymous">
    <link rel="preload" as="font" type="font/woff2" href="<?php echo ASSETS.'/fonts/Inter-ExtraBold.woff2?v=3.19';?>" crossorigin="anonymous">

    <link rel="preload" as="style" href="<?php echo THEME.'/css/theme.css?v='.VERSION;?>" />
    <link rel="preload" as="script" href="<?php echo THEME.'/js/jquery.min.js?v='.VERSION;?>" />
    <link media="all" rel="stylesheet" href="<?php echo THEME.'/css/theme.css?v='.VERSION;?>" type="text/css">
    <link rel="shortcut icon" href="<?php echo LOCAL.'/'.get($Settings,'data.favicon','general').'?v='.VERSION;?>">
    <script type="text/javascript">
    var Base = "<?php echo APP; ?>";
    var Assets = "<?php echo APP.'/public/assets'?>";
    <?php if(isset($AuthUser['id'])) { ?>
    var _Auth = true;
    <?php } else { ?>
    var _Auth = false;
    <?php } ?>
    var __ = function(msgid) {
        return window.i18n[msgid] || msgid;
    };
    window.i18n = {
        'more': '<?php echo $this->translate("more");?>',
        'less': '<?php echo $this->translate("less");?>',
        'No comments yet': '<?php echo $this->translate("No comments yet");?>',
    };
    </script>
    <style type="text/css">
    :root {
        --theme-color: <?php echo get($Settings, 'data.color', 'customize');
        ?>;
        --xp-color: <?php echo get($Settings, 'data.xp_color', 'customize');
        ?>;
        ;
    }
    </style>
</head>

<body class="min-vh-100 layout d-flex flex-column">