<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>
<body>
	<div class="projects">
		<?php
		foreach (new DirectoryIterator('../data/configs') as $file) {
			if($file->isDot()) continue;
			$json = file_get_contents("../data/configs/".$file->getFilename());
			$j = json_decode($json);
			echo "<div class='proj_container' onclick='toggle(this)'>";
			foreach($j as $key=>$value){
				if (is_string($value)) {
					if ($key == "thumb") {
						echo "<img onclick='toggle(this.parentElement)' src='../data/images/".$value."'></img>";
					} elseif ($key == "title") {
						echo "<h1>".$value."</h1>";
					}
				} else {
					foreach($value as $key_i=>$value_i){
						echo $key_i . "=>" . $value_i . "<br>";
					}
				}
			}
			echo "</div>";
		}
		?>
	</div>
</body>
</html>