Templates

1. Create folder to store assets files for your template in '/public/assets/brixy/templates/'.

2. Create 'img', 'css', 'js', 'lib' folders and copy the template asset files into them.

3. To use your template in the app, you need to create files named header.php and footer.php in folder '/brixy/App/Views/Templates/your_template_name/'.

header.php example:

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>My App</title>
	<meta content="width=device-width, initial-scale=1.0" name="viewport">
	<meta content="" name="keywords">
	<meta content="" name="description">
	
	<!-- Favicons -->
	<link href="<?= base_url(BRIXY_TMPL_APP_ASSETS_PATH . '/' . $tmpl_folder . '/img/favicon.png') ?>" rel="icon">
	<link href="<?= base_url(BRIXY_TMPL_APP_ASSETS_PATH . '/' . $tmpl_folder . '/img/apple-touch-icon.png') ?>" rel="apple-touch-icon">

	<!-- Google Fonts -->
	<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,900" rel="stylesheet">

	<!-- Libraries CSS Files -->
	<link href="<?= base_url(BRIXY_TMPL_APP_ASSETS_PATH . '/' . $tmpl_folder . '/lib/library_name/css/library.min.css') ?>" rel="stylesheet">

	<!-- Stylesheet Files -->
	<link href="<?= base_url(BRIXY_TMPL_APP_ASSETS_PATH . '/' . $tmpl_folder . '/css/style.css?' . filemtime(BRIXY_TMPL_APP_ASSETS_PATH . '/' . $tmpl_folder . '/css/style.css')) ?>" rel="stylesheet">
        
    <!-- IMPORTANT: before close head tag -->
	<?= view(BRIXY_TMPL_PATH . 'sub-header');	?> 

	<script>
	let brixy_data = {
		resources : {},
		scripts_included : {},
		libs_included : {},
		cssfiles_included : {},
	};
	</script>			
</head>

footer.php example:

		</div>
		<!-- JS Files -->
		<script type="text/javascript" src="<?= base_url(BRIXY_TMPL_APP_ASSETS_PATH . '/' . $tmpl_folder . '/js/script.js?' . filemtime(BRIXY_TMPL_APP_ASSETS_PATH . '/' . $tmpl_folder . '/js/script.js')) ?>" defer></script>

        <!-- IMPORTANT: before close body tag -->
		<?= view(BRIXY_TMPL_PATH . 'sub-footer');	?>
	</body>
</html>