<?php
/**
 * 一款Typecho文档类主题
 *
 * @package BearDocs
 * @author BearNotion
 * @version v1.1.1-release
 * @link https://www.bearnotion.ru/
 */


//隐藏起来的mid分类数组
$skip_mid_array=array(2);


if (!defined('__TYPECHO_ROOT_DIR__')) exit;
    $this->need('header.php');
?>
    <style>
        .uk-card-index {
            height: calc(33.33vh - 80px); /* 1/3 页面高度减去 80px */
        }
    </style>
    <div class="uk-section uk-section-muted">
        <div class="uk-container">
            <div class="uk-grid-medium uk-flex-middle uk-child-width-<?php echo General::getColumnNumber(General::Options('categoryShowColumnMiddle'));?>@m uk-child-width-<?php echo General::getColumnNumber(General::Options('categoryShowColumnLarge'));?>@l uk-grid-match" data-uk-grid>
                <?php $this->widget('Widget_Metas_Category_List')->to($categorys); ?>
                <?php while($categorys->next()): ?>
                    <?php if (in_array($categorys->mid, $skip_mid_array)) continue; ?>
                    <?php if ($categorys->levels === 0): ?>
                        <div class="uk-card-index">
                            <div class="uk-card uk-card-default uk-card-hover uk-card-body uk-inline uk-border-rounded uk-flex uk-flex-center uk-flex-middle" style="height: 100%;">
                                <a class="uk-position-cover" href="<?php $categorys->permalink(); ?>"></a>
                                <div class="uk-grid-medium" data-uk-grid>
                                    <!-- 左边图片部分 -->
                                    <div class="uk-width-1-2">
                                        <image src="/static/images/category-<?php echo $categorys->mid?>.png" class="uk-width-1-1"/>
                                    </div>
                                    <!-- 右边文字部分 -->
                                    <div class="uk-width-1-2 uk-flex uk-flex-center uk-flex-middle">
                                        <div>
                                            <h4 class="uk-card-title uk-margin-remove uk-text-secondary uk-category-name uk-text-center"><?php $categorys->name(); ?></h4>
                                            <p class="uk-text-muted uk-margin-remove uk-category-desc"><?php echo General::getCategoryDescriptionData($categorys->description)['desc']; ?></p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php endif; ?>
                <?php endwhile; ?>
            </div>
        </div>
    </div>






<?php $this->need('footer.php'); ?>