<?php
get_header();
get_sidebar();
$url =  nap_attachment_image($ID);
 ?>
<div id="home">
	
    <div data-defaultimg ='<?php echo $url ;?>' class="transition img-wrapper" style ="background-image: url('<?php echo $url ;?>')"></div>
	<div class="news-btn circle-btn add-icon font-small animated zoomIn"><span>Nouveautés</span></div>
	<aside class="news-wrapper container ">
		<div class="news-header crete">
			<h2>Nouveautés</h2>
			<span class="close-btn"></span>
		</div>
		<div class="news-content">
                    <?php
                    if( get_field('nap_nouveautes',135) ):
                       
                        while ( has_sub_field('nap_nouveautes',135) ) :
                    ?>
			<article class = "row <?php the_sub_field('nv_taille');?>">
                            <a href="<?php echo  the_sub_field('nv_lien');?>">
				<figure>
                                    <img src="<?php the_sub_field('nv_image');?>" alt="Nouveautés">
					<figcaption>
						<?php htmlspecialchars(the_sub_field('nv_titre'));?>
					</figcaption>
				</figure>
                                </a>
			</article>
                    <?php
                        endwhile;
                    endif;
                    ?>
			
		</div>
	</aside>
</div><!--END home -->
<?php


get_footer();