<?php
/**
 * Copyright © Magefan (support@magefan.com). All rights reserved.
 * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
 *
 * Glory to Ukraine! Glory to the heroes!
 */
?>
<?php
/**
 * Blog post info template
 *
 * @var $block \Magefan\Blog\Block\Post\Info
 */
?>

<?php $_post = $block->getPost() ?>

<div class="post-info">
	<?php if ($block->authorEnabled()) { ?>
        <?php if ($_author = $_post->getAuthor()) { ?>
        <div class="item post-author">
            <span class="label"><?= $block->escapeHtml(__('Post by:')) ?></span>
            <span class="value">
                <?php if ($authorPageEnabled = $block->authorPageEnabled()) { ?>
                <a title="<?= $block->escapeHtml($_author->getTitle()) ?>"
                   href="<?= $block->escapeUrl($_author->getAuthorUrl()) ?>">
                <?php } ?>

                <?= $block->escapeHtml($_author->getTitle()) ?>

                <?php if ($authorPageEnabled) { ?>
                </a>
                <?php } ?>
            </span>
        </div>
        <?php } ?>
    <?php } ?>
</div>
