<?php

use Jet\Tr;
use Jet\SysConf_URI;

require_once 'parts/init_libs.php';
?>
<!DOCTYPE html>
<html>
<head>
	<title><?= $this->getString( 'page_title', 'JetApplication admin' ) ?></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	
	<jet_layout_meta_tags/>
	<jet_layout_css/>
	<jet_layout_javascripts/>
	
	<link rel="icon" href="<?= SysConf_URI::getImages() ?>favicon.png" type="image/png">
</head>
<body>
<script type="text/javascript">
	$(document).ready(function () {
		const main_toolbar = document.getElementById("main-toolbar");
		if (!main_toolbar) {
			return;
		}
		const main_col = document.getElementById("main-col");
		const main_toolbar_initial_offset = main_toolbar.offsetTop;
		const main_toolbar_height = main_toolbar.offsetHeight;
		const main_col_initial_padding_top = main_col.style.paddingTop;

		window.onscroll = function () {
			if (window.scrollY > main_toolbar_initial_offset) {
				main_toolbar.classList.add("main-toolbar-sticky");
				main_col.style.paddingTop = main_toolbar_height + 'px';
			} else {
				main_toolbar.classList.remove("main-toolbar-sticky");
				main_col.style.paddingTop = main_col_initial_padding_top;
			}
		};
	});
</script>


<div class="container-fluid">
	<div class="row">
		<div class="col-md-12" id="system-messages-area">
			<jet_module module="Admin.UI" action="messages"/>
		</div>
	</div>
	
	<jet_layout_main_position/>
</div>


<div id="__progress__">
	
	<div class="loading text-center">
		<div id="__progress_prc__"></div>
		<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
		<span class="sr-only"><?= Tr::_( 'Loading ...' ); ?></span>
	</div>
</div>

</body>
</html>