<?php
    $image = $_view["imageLink"] ?? $_con->getLink(["media", "image", "wpPost", $_view["id"], $_view["imageHeader"], "680", "0", "60"]);
?>

<a href="<?= $_view["link"]; ?>" class="article-card h-100 mobile-w-100">
    <div class="article-picture ar-480-320" data-lazybg="<?= $image; ?>"> </div>
    <div class="article-content">
        <?php if ($_view["categories"] ?? null) { ?>
            <?= $_con->getRenderedView("magazine/categories.partial", $_view["categories"] ?? []); ?>
        <?php } ?>
        <?php if ($_view["company"] ?? null) { ?>
            <div class="article-company"> <b><?= $_view["company"]; ?></b> </div>
        <?php } ?>
        <h3 class="headline small mb-2"><?= $_view["title"]; ?></h3>
        <p class="mb-0"><?= $_view["preview"]; ?></p>
        <div class="article-author mt-3">
            <p class="txt-small mb-0">
                <?php if ($_view["author"] ?? null) { ?>
                    <nobr><?=$_view["author"];?></nobr> • 
                <?php } ?>
                <nobr><?= $_view["dateCreated"]; ?></nobr>
            </p>
        </div>
        <object class="d-block d-lg-none">
            <a class="d-inline-block read-more" href="<?= $_view["link"]; ?>"><b>Artikel lesen</b></a><span class="icon rm"></span>
        </object>
    </div>
</a>