<?php
/**
 * Template part pour l'affichage de la page d'accueil, importé par page.php
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package plougasnou
 */

?>

    <div id="slider-accueil">
			<?php echo do_shortcode('[metaslider id="76"]'); ?>
    </div>
	<main id="primary" class="primary-accueil">
		<nav id="menu-pratique">
			<ul>
				<li class="picto-cantine"><a href="<?php echo get_permalink(639); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-cantine.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-cantine.png'"/><br>menus<br>cantine</a></li>
				<li class="picto-dechetterie"><a href="https://www.morlaix-communaute.bzh/Reduire-trier-les-dechets/Les-decheteries/Horaires-des-decheteries" target="_blank"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-dechetterie.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-dechetterie.png'"/><br>horaires<br>déchetterie</a></li>				
				<li class="picto-affichage-legal"><a href="https://portails.extrazimut.net/front/MAIRIE-PLOUGASNOU-PORTAIL-1/PLOUGASNOU-SITE/" target="_blank"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-affichage-legal.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/affichage-legal.png'"/><br>affichage<br>légal</a></li>				
				<li class="picto-marees"><a href="<?php echo get_permalink(468); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-marees.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-marees.png'"/><br>horaire<br>des marées</a></li>
				<li class="picto-poste"><a href="<?php echo get_permalink(704); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-laposte.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-laposte.png'"/><br>horaires<br>de la poste</a></li>
				<li class="picto-plan"><a href="https://www.google.com/maps/place/29630+Plougasnou/@48.6788274,-3.8493466,13z/data=!3m1!4b1!4m5!3m4!1s0x4813d8d85bc9d82f:0x23851bede248b6fa!8m2!3d48.695548!4d-3.790033" target="_blank"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-plan.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-plan.png'"/><br>plan<br>de plougasnou</a></li>
				<li class="picto-medical"><a href="<?php echo get_permalink(423); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-medical.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-cmedical.png'"/><br>annuaire<br>medical</a></li>
<!--
				<li class="picto-travaux"><a href=""><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-travaux.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-travaux.png'"/><br>les<br>travaux</a></li>
-->
				<li class="picto-transports"><a href="https://www.lineotim.com/fr/bgn-Rechercher-une-fiche-horaire.html#fiches" target="_blank"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-transports.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-transports.png'"/><br>transports<br>collectifs</a></li>
				<li class="picto-location-salle"><a href="https://www.plougasnou.fr/vie-municipale/location-de-salles/"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-location-salle.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-location-salle.png'"/><br>location<br>de salles</a></li>
			</ul>
		</nav>


<!-- Le slider d'actus définitif -->		
<div class="fond-pleine-largeur">	
		
<div id="slider">
   <div id="prevSlide">
      <img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-fleche-gauche.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>/img/picto-fleche-gauche.png'"/>
   </div>
    <div id="slider-window">
    <h2>les actualités</h2>
		 <ul id="slides">
			<?php
			// 1. Les derniers articles de la catégorie, plus les sticky
            $args = array(
            'post_type' => 'post',
            'posts_per_page' => 3,
             array( 'post__in' => get_option( 'sticky_posts' ), 'category_name' => 'pagedaccueil')                       
             );

            // 2. on exécute la query
           $my_query = new WP_Query($args);

           // 3. on lance la boucle !
           if($my_query->have_posts()) : while ($my_query->have_posts() ) : $my_query->the_post();
           ?> 
			 
           <li>

             <?php $pierreimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "medium_large" ); ?>
			   <div class="conteneur-image-actu">
<a href=<?php the_permalink() ?> class="slide-actus-image" style= "display:block; background-image: url('<?php echo $pierreimage[0]; ?>')">&nbsp;</a>								   
			   </div>   
             <!-- .slide-actus-image -->

             <div class="slide-actu-texte">
                <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>  
				 <p class="slider-actu-date">
				 publié le <?php the_time('j F Y'); ?>
				 </p>
                <?php the_excerpt(); ?>
				 <a class="lirelasuite" href="<?php the_permalink() ?>">Lire la suite</a>
             </div><!-- slide-actu-texte -->     
            </li>   
						 
          <?php    
          endwhile;
          endif;
          // 4. On réinitialise à la requête principale (important)
          wp_reset_postdata();
          
			?>
		 </ul> <!-- #slides -->
	</div><!-- #slider-window-->		
	   <div id="nextSlide">
      <img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-fleche-droite.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>/img/picto-fleche-droite.png'"/>
      </div>
	  <div id="voir-les-actus">
		  <a href="/actus">
		<img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-plus.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>/img/picto-plus.png'"/>
		  <span>Voir toutes les actus</span>
			</a>
	  </div>
</div> <!-- #slider -->				
</div> 	<!-- fin .fond-pleine-largeur -->
		


		
		


		<nav id="menu-demarches">
			<h1>Vos démarches</h1>
			<ul>
				<li><a href="https://www.service-public.fr/particuliers/vosdroits/N358" target="_blank"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-demarches-identite.svg" alt="Carte d'identité" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-demarches-identite.png'"/></a></li>
				<li><a href="https://www.service-public.fr/particuliers/vosdroits/N360" target="_blank"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-demarches-passeport.svg" alt="Passeport" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-demarches-passeport.png'"/></a></li>	
				<li><a href="https://www.service-public.fr/particuliers/vosdroits/F1427" target="_blank"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-demarches-acte-naissance.svg" alt="Acte de naissance" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-acte-naissance.png'"/></a></li>	
				<li><a href="https://www.morlaix-communaute.bzh/mon-quotidien/urbanisme/realiser-des-travaux"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-demarches-declaration-travaux.svg" alt="Carte d'identité" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-demarches-declaration-travaux.png'"/></a></li>	
				<li><a href="<?php echo get_permalink(1262); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-demarches-rv-elu.svg" alt="Demander un rendez-vous" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>img/picto-demarches-rv-elu.png'"/></a></li>
			</ul>
			<p>
			Renseignements à l'accueil de la mairie
		    </p>
		</nav> <!-- #menu-demarches -->

    <div class="fond-pleine-largeur">			
		<nav id="kiosque">
			<h1>Le kiosque</h1>
			<ul>
				<li><a href="https://www.calameo.com/read/00253859104f22a5156b2" target="_blank"><img src="https://www.plougasnou.fr/wp-content/uploads/2025/07/Couv-ete-2025.jpg" alt="" style="width:150px"/><p>Magazine municipal</p><p><i>été 2025</i></p></a></li>
				<li><a href="https://www.calameo.com/read/003120150acf047c72b3f" target="_blank"><img src="https://www.plougasnou.fr/wp-content/uploads/2025/01/couv-plougasnou-magazine-janvier-2025.jpg" alt="" style="width:150px"/><p>Magazine municipal</p><p><i>janvier 2025</i></p></a></li>
				<li><a href="https://www.calameo.com/read/0025385914cd896345b5b" target="_blank"><img src="https://www.plougasnou.fr/wp-content/uploads/2024/07/Couv-ete-2024-copie.jpg" alt="" style="width:150px"/><p>Magazine municipal</p><p><i>été 2024</i></p></a></li>
				<li><a href="https://www.calameo.com/read/00253859112f45caf657b" target="_blank"><img src="https://www.plougasnou.fr/wp-content/uploads/2024/04/plougasnou-magazine-2023-decembre.webp" alt="" style="width:150px"/><p>Magazine municipal</p><p><i>décembre 2023</i></p></a></li>
				<li><a href="https://www.calameo.com/read/002538591cfdc5db33640" target="_blank"><img src="https://www.plougasnou.fr/wp-content/uploads/2023/11/plougasnou-magazine-ete-2023.jpg" alt="" style="width:150px"/><p>Magazine municipal</p><p><i>été 2023</i></p></a></li>
				<!--<li><a href="https://www.calameo.com/books/00253859146590cb624c0" target="_blank"><img src="https://www.plougasnou.fr/wp-content/uploads/2023/11/plougasnou-magazine-janvier-2023.jpg" alt="" style="width:150px"/><p>Magazine municipal</p><p><i>janvier 2023</i></p></a></li>	-->		
			</ul>
			<p style="clear:both;">&nbsp;</p>
			<div id="voir-les-archives">
		  		<a href="/vie-municipale/plougasnou-magazine/">
				<img src="<?php echo get_stylesheet_directory_uri(); ?>/img/picto-plus.svg" alt="" onerror="this.removeAttribute('onerror'); this.src='<?php echo get_stylesheet_directory_uri(); ?>/img/picto-plus.png'"/>
		 		 <span>Voir les archives</span>
				</a>
	  		</div> <!-- ferme voir-les-archives -->
		</nav><!-- kiosque -->

	</div>	<!-- .pleine-largeur -->	