<?php
$colors = ["zukunft" => "darkorange", "ressourcen" => "darkgreen", "menschen" => "darkblue"];
$icons = ["zukunft" => "", "ressourcen" => "", "menschen" => ""];
$category = $_view["category"];
?>

<div class="row g-c wissen-cards">
    <div class="col">
        <div class="bg-<?= $colors[$category]; ?> wissen-main d-flex h-100 mobile-w-100">
            <div class="align-self-center">
                <h3 class="headline small"><span class="icon"><?= $icons[$category]; ?></span><?= ucfirst($category); ?></h3>
                <p><?= $_view["categoryDescriptions"][$category]; ?></p>
                <a class="read-more" href="<?= $_con->getLink(["magazine", "overview", $category]); ?>">Alle Artikel</a> <span class="icon rm"></span>
            </div>
        </div>
    </div>
    <?php foreach ($_view["articles"] as $row) { ?>
        <?= $_con->getRenderedView("magazine/indexCardCategory.partial", $row); ?>
        <?php if ($row !== end($_view["articles"])) { ?>
            <div class="col-md-auto d-none d-lg-block">
                <div class="vertical-spacer lightgray h-100"></div>
            </div>
        <?php } ?>
    <?php } ?>
</div>