<?php
	declare(strict_types = 1);
	namespace Kimendisch\Sbgg_Jetzt;
	use Flake\Lang;
	use Flake\Lang_Dict;
	use Flake\Page;
	
	// HANDLE AUTHENTICATION //
	require("./page/admin/auth_handler.php");
	
	
	// LANGUAGE MANAGER //
	// hack: fake get param from constant
	$_GET["lang"] = "en";
	
	// initialize
	$lang = new Lang(list: ["de", "en"], default: "en");
	
	// load dict
	$dict = new Lang_Dict($lang);
	require("./page/strings.php");
	
	
	// PAGE INIT //
	Page::start();
	
	Page::title("SBGG.jetzt - Admin Area");
	Page::icon("./asset/logo-256.png");
	
	Page::lang($lang->get());
	Page::viewport(scale: 1, zoom: true);
	
	Page::robots(index: false, follow: false);
	Page::author("Kim Endisch");
	
	Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
	Page::css("./page/start/style.css");
	
	Page::font("ubuntu");
	Page::font("tabler");
?>





<div class="page-container">
	<div class="page">
		<div class="title">
			<h1><?= $dict->get("page_title_h1") ?></h1>
			<h2>Admin Area</h2>
		</div>
		
		<div class="section">
			<div class="header">
				<span class="icon ti ti-direction-sign"></span>
				<span class="text">Actions</span>
			</div>
			<div class="content rows">
				<div class="box">
					<span class="title">Newsletter</span>
					
					<div class="button-list">
						<a href="/admin/newsletter" class="button">
							<span class="icon ti ti-news"></span>
							<span class="text">Manage Content</span>
						</a>
					</div>
				</div>
				
				<div class="box">
					<span class="title">Admin Session</span>
					
					<div class="button-list">
						<a href="?logout" class="button">
							<span class="icon ti ti-logout"></span>
							<span class="text">Logout</span>
						</a>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>



<?php require(dirname(__DIR__) . "/footer.php"); ?>
