<?php
/**
* GrayMatter Theme for Bludit
* Design was copied from a Flatpress Theme by Marc Thibeault
* Some code copied from Blog-X theme
*
* Author:  Rick Hays
* Date:    2022-12-12
*
*/
?>

<div class="home">
    <?php Theme::plugins('pageBegin'); ?>

    <!-- Cover image -->
    <?php if ($page->coverImage()): ?>
        <img class="card-img-top mb-3 rounded-0" alt="Cover Image" src="<?php echo $page->coverImage(); ?>"/>
    <?php endif ?>

    <a href="<?php echo $page->permalink(); ?>">
        <h3><?php echo $page->title(); ?></h3>
    </a>

    <?php echo $page->content(); ?>

    <h6 class="card-subtitle mb-3 text-right"><?php echo $page->date(); ?> - <?php echo $L->get('Reading time') . ': ' . $page->readingTime(); ?></h6>
    <h6 class="card-subtitle mb-3 text-right">
        <?php echo $page->user('nickname'); ?> &nbsp; <img src="<?php echo ($page->user('profilePicture')?$page->user('profilePicture'):Theme::src('img/no-image.jpg')) ?>" alt="mdo" width="45" height="45" class="rounded-circle">
    </h6>

    <div class="text-right">
        <?php foreach (Theme::socialNetworks() as $key=>$label): ?>
            <a class="" href="<?php echo $site->{$key}(); ?>" target="_blank">
                <img height="20" width="20" class="" src="<?php echo DOMAIN_THEME.'img/'.$key.'.svg' ?>" alt="<?php echo $label ?>" />
                <span class="d-inline d-sm-none"><?php echo $label; ?></span>
            </a>
        <?php endforeach; ?>
    </div>

	<?php Theme::plugins('pageEnd'); ?>

</div>
