<?php /*template name: nosidebar*/ get_header(); ?>

<div class="uk-cover-container uk-text-center banner uk-margin-large-bottom" uk-scrollspy="cls: uk-animation-fade; delay: 300">
    <canvas class="uk-visible@m" width="" height="350"></canvas>
    <canvas class="uk-hidden@m" width="" height="350"></canvas>

    <?php
      $banner = get_field('banner');
      if ( $banner ) :
      ?>
        <img uk-img data-src="<?php echo esc_url($banner['url']); ?>" alt="<?php echo esc_attr($banner['alt']); ?>" data-width data-height uk-cover>
      <?php else : ?>
        <img uk-img data-src="<?php echo get_template_directory_uri(); ?>/images/tile-guy-flooring-and-ronovations-front-desk-2.webp" data-width data-height uk-cover>
      <?php endif; ?>

    	<div class="uk-position-cover uk-text-center uk-container uk-flex uk-flex-center uk-flex-middle" uk-scrollspy="cls: uk-animation-fade; delay: 500">
        <div>

            <?php if ( get_field('banner_title') ) { ?>
				<h1 class="white uk-margin-medium-bottom"><?php the_field('banner_title'); ?></h1>
            <?php } else { ?>
				<h1 class="white uk-margin-medium-bottom"><?php the_title(); ?></h1>
            <?php }  ?>

            <?php if ( get_field('banner_extra_text') ) : ?>
            <div class="uk-width-4-5@m uk-margin-auto">
              <h5 class="white"><?php the_field('banner_extra_text'); ?></h5>
            </div>
            <?php endif; ?>

            <?php if ( get_field('button') ) : ?>
            <div class="uk-text-center">
              <a href="<?php echo home_url(); ?>/contact" class=" red-btn">
                <div class="uk-grid-collapse" uk-grid>
                  <div class="uk-width-auto">
                    <div class="icon-bg"><i class="fa-sharp fa-solid fa-diamonds-4"></i></div>
                  </div>
                  <div class="uk-width-expand">
                    <div class="btn-bg"><?php the_field('button'); ?></div>
                  </div>
                </div>
              </a>
            </div>
            <?php endif; ?>

        </div>

    </div>
</div>




<div class="uk-container" uk-scrollspy="cls: uk-animation-fade; delay: 300">
	<main role="main">
			<section>

				<?php if (have_posts()): while (have_posts()) : the_post(); ?>

					<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

						<?php the_content(); ?>

						<div class="uk-clearfix"></div>

						<p class="uk-text-right"><?php edit_post_link( __('Edit this page'), '', '', 0, 'post-edit-link uk-text-large uk-padding-small uk-button-large uk-button uk-button-primary' ); ?></p>

					</article>

			<?php endwhile; ?><?php endif; ?>

			</section>
	</main>
</div>

<?php get_footer(); ?>
