<?php
$hasConfig=true;
$pageTitle="Home: ".session::getUser()['fullname'];
if(isset($isDefaultHomepage)) {
	//An admin is setting up the default homepage for new users
	$pageTitle="Configure default homepage for new users";
}
include realpath(__DIR__).'/../_common/header.php'; ?>

<!--suppress HtmlUnknownTarget -->
<script type="text/javascript" src="homepagebricks.js"></script>
<script type="text/javascript">

let grid=ui.grid(true);
document.getElementById("configbutton").addEventListener("click", Homepage.toggleConfig);
Homepage.init(<?php echo isset($isDefaultHomepage) ? 'true' : 'false' ?>);
</script>

<?php include realpath(__DIR__).'/../_common/footer.php';