<?php snippet('html-head', [
    'pageTitle' => $page->title()->value() . ' — Codex — ' . $site->title()->value(),
]) ?>

<body data-screen-label="Character">

<?php snippet('effects') ?>
<?php snippet('header') ?>

<section class="character-section">
  <div class="character-header">
    <h1 class="reveal"><?= $page->title()->html() ?></h1>
  </div>

  <div class="character-content">
    <div class="character-description">
      <h2>Description</h2>
      <?= $page->description()->kt() ?>
    </div>

    <?php if ($page->traits()->isNotEmpty()): ?>
    <div class="character-traits">
      <h2>Traits</h2>
      <ul>
        <?php foreach ($page->traits()->split() as $trait): ?>
        <li><?= $trait ?></li>
        <?php endforeach ?>
      </ul>
    </div>
    <?php endif ?>

    <?php if ($page->relationships()->isNotEmpty()): ?>
    <div class="character-relationships">
      <h2>Relationships</h2>
      <ul>
        <?php foreach ($page->relationships()->toPages() as $rel): ?>
        <li><a href="<?= $rel->url() ?>"><?= $rel->title()->html() ?></a></li>
        <?php endforeach ?>
      </ul>
    </div>
    <?php endif ?>
  </div>
</section>

<?php snippet('menu', ['currentPage' => $page]) ?>
<?php snippet('scripts') ?>

</body>
</html>