<?= $this->layout('_layout', ['title' => $title]); ?>

<main class="main">
    <?= $this->insert('includes/aside_info') ?>
    <div class="content">
        <div class="h2-title h2-title-content flex-s-c">
            <span>My Account</span>
        </div>

        <?= $this->insert('user/_user'); ?>
        <br>

        <div class="h2-title h2-title-content flex-s-c">
            <span>My Characters</span>
        </div>

        <div class="flex-c-c my-characters">
            <?php if ($characters) : foreach ($characters as $char) : ?>
                    <a href="<?= __redirect("user/manage/character/{$char['name']}") ?>">
                        <div>
                            <img src="<?= __avatar($char['image']) ?>" width="100" height="100">
                        </div>
                        <div>
                            <?= $char['name'] ?>
                        </div>
                    </a>
                <?php endforeach;
            else : ?>
                <div class="warning">Não há personagem criado no momento</div>
            <?php endif; ?>

        </div>
    </div>
</main>