<html>
	<head>
		<link rel="stylesheet" type="text/css" href="main.css">
		<link href="https://fonts.googleapis.com/css?family=Abril+Fatface|Barlow+Condensed:400,700|Permanent+Marker" rel="stylesheet">
		<script type="text/javascript" src="app.js"></script>
	</head>

	<br><br><br><br><br><br><br><br>

	<div class="projects">

	<?php
		$dir = new DirectoryIterator(dirname(__FILE__));
foreach ($dir as $fileinfo) {
  if (!$fileinfo->isDot()) {
    var_dump($fileinfo->getFilename());
  }
		$id = 0;
		foreach($files as $file) {
			if ($id>1) {
				$str = file_get_contents("data/configs/".$file);
				$json = json_decode($str, true);
				?><div class="proj_container" onclick="loadProject(this)">
				<div class="close" onclick="closeProject(this)">X</div><div class="block"><?php
				
				foreach ($json as $k => $v) {
					
					if ($k=="title" || $k=="body") {
						?><m class="<?php echo $k ?>"><?php echo $v ?></m><?php
					} else if ($k=="images") {
						?><div id="paths"><?php
						foreach ($v as $key => $path) {
							?><hid path="<?php echo $path ?>"></hid><?php
						}
						?></div><?php
					} else {
						?><img class="<?php echo $k ?>" src="data/images/<?php echo $v ?>"></m><?php
					}
				}


				?></div></div><?php
			}
			$id++;
		}
	?>



	</div>

		<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><h1>oi?</h1>


</html>