<?php /* Template Name: Standart wykończenia */ ?>

<?php get_header() ?>

<section class="page standard">
    <div class="page__titles">
        <h1><?php echo get_field('title') ?></h1>
        <div class="page__title"><?php echo get_field('subtitle') ?></div>
    </div>

    <div class="standard__tiles">
        <?php foreach (get_field('standard') as $key => $tile): ?>
            <div class="standard__tile<?php if ($key == 2 || $key == 3 || $key == 6 || $key == 7): ?> standard__tile2<?php endif; ?>">
                <div class="standard__image">
                    <img src="<?php echo $tile['image'] ?>" />
                    <div class="standard__triangle"></div>
                </div>
                <div class="standard__rest">
                    <div class="standard__block">
                        <h2><?php echo nl2br($tile['title']) ?></h2>
                        <div class="standard__desc description">
                            <?php echo $tile['description'] ?>
                        </div>
                    </div>
                </div>
            </div>
        <?php endforeach; ?>
    </div>

    <div class="page__button">
        <?php $button = get_field('button') ?>
        <a href="<?php echo $button['link'] ?>" class="button button2"><?php echo $button['name'] ?></a>
    </div>
</section>

<?php get_footer() ?>