<!DOCTYPE html>
<html lang="ko">

<head>
  <title><?= LAYOUTS[$viewDatas['layout']]['title'] ?></title>
  <?php foreach (LAYOUTS[$viewDatas['layout']]['metas'] as $meta): ?>
    <?= $meta ?>
  <?php endforeach; ?>
  <?php foreach (LAYOUTS[$viewDatas['layout']]['stylesheets'] as $stylesheet): ?>
    <?= $stylesheet ?>
  <?php endforeach; ?>
  <?php foreach (LAYOUTS[$viewDatas['layout']]['javascripts'] as $javascript): ?>
    <?= $javascript ?>
  <?php endforeach; ?>
  <link href="/css/<?= $viewDatas['layout'] ?>.css" media="screen" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>.js"></script>
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn' t work if you view the page via file:// -->
  <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
  <?php if ($error = session('error')): ?><?= $viewDatas['helper']->alert($error) ?><?php endif ?>
  <div class="middle"><?= $this->renderSection('content') ?></div>
</body>

</html>