<!DOCTYPE html>
<!-- Page: homepage -->
<html lang="fr">

	<?php include('blocks/d.head.html'); ?>
	
	<body>

		<?php include('blocks/d.nav.html'); ?>

		<!-- Hero image -->
		<aside id="indexFullW">
			<div id="AScontent">
				<div id="imglegend">
					<p>Refuge de Pointe Basse</p>
				</div>
			</div>
		</aside>

		<!-- Load wiki content -->
<?php
	require_once($config['models_folder']."d.wiki.php");
	$wikiPage = new Kabano\WikiPage();
	$wikiPage->checkPermalink('index');
	$wikiPage->md2html();
?>

		<!-- Main content -->
		<section id="index">
			<h1><?=$wikiPage->name?></h1>

			<?php if($user->rankIsHigher('moderator')) { ?>
				<!-- Edit shortcut -->
				<span class="subtitle">
					<a href="<?=$config['rel_root_folder']?>wiki/index/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a>
				</span>
			<?php } ?>

			<br><br>

			<?=$wikiPage->content_html?>
		</section>

		<?php include('blocks/d.footer.html'); ?>

	</body>
</html>
