<div id="glossary" class="subpage">
    <?php require(get_template_directory() . '/subpage-top.php'); ?>
    <?php require(get_template_directory() . '/subpage-calculator.php'); ?>

    <div class="content">
        <h1>Słownik pojęć</h1>

        <div class="row">
            <div class="wrap">
                <?php
                $params = array('limit' => -1);
                $pods = pods('slownik_pojec', $params);
                $openedGlossary = get_post();
                $i = 1;

                while ($pods->fetch()): ?>
                    <?php $isOpened = isset($openedGlossary) && $pods->field('ID') == $openedGlossary->ID; ?>

                    <div class="col <?php echo $pods->field('szerokie') ? 'one ' : 'half '; echo $isOpened ? 'active' : ''; ?>">
                        <h3><?php echo $pods->field('post_title'); ?></h3>

                        <div class="text"><?php echo wpautop($pods->field('post_content')); ?></div>
                    </div>
                <?php endwhile; ?>
            </div>
        </div>
    </div>
</div>