<?php require PATH . '/theme/view/common/head.php'; ?>
<?php require PATH . '/theme/view/common/header.php'; ?>
<div class="layout-section">
    <div class="container-fluid">
        <div class="layout-heading mb-4">
            <div>
                <h1 class="h2">
                    <?php echo Input::cleaner(mb_convert_case(str_replace('+', ' ', tagger($Route->params->self,true)), MB_CASE_TITLE, "UTF-8"));?>
                </h1>
                <div class="fs-sm text-muted">
                    <?php echo $TotalRecord.' '.$this->translate('games in total');?>
                </div>
            </div>
        </div>
        <div class="card-masonry mb-4">
            <?php
                    $i = 1;
                    foreach ($Listings as $Listing) {
                    ?>
            <a href="<?php echo play($Listing['id'],$Listing['self']);?>" class="card <?php if($i == 1 || $i == 10 || $i == 15 || $i == 20) echo 'large';?>">
                <?php echo picture(GAME_FOLDER,($i == 1 || $i == 10 || $i == 15 ? $Listing['image'] : 'thumb-'.$Listing['image']),'img-fluid',$Listing['title'],GAME_X.','.GAME_Y);?>
                <div class="card-body">
                    <h3>
                        <?php echo $Listing['title'];?>
                    </h3>
                </div>
            </a>
            <?php $i++; } ?>
        </div>
        <div class="text-center">
            <?php echo $Pagination;?>
        </div>
    </div>
</div>
<?php require PATH . '/theme/view/common/javascript.php'; ?>
<?php require PATH . '/theme/view/common/footer.php'; ?>