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

<a href="<?= $_view["link"]; ?>" class="article-card mobile-w-100 h-100">
    <div class="row g-0 h-100">
        <div class="col-xl-4 col-lg-3">
            <div class="article-picture h-100 d-none d-lg-block" data-lazybg="<?= $image; ?>"> </div>
        </div>
        <div class="col-xl-8 col-lg-9">
            <div class="article-content small h-100">
                <?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 } ?>
                <h4 class="txt-big crop-text-1"><b><?= $_view["title"]; ?></b></h4>
                <p class="mb-0  crop-text-2"><?= $_view["preview"]; ?></p>
                <div class="article-author mt-2">
                    <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>
        </div>
    </div>
</a>