Commit 1525448d authored by agnez's avatar agnez

page contact

parent d7054776
......@@ -47,6 +47,7 @@ h2{
.uk-panel.uk-panel-box.gasap-panel-box{
text-align: center;
color: @global-muted-color;
padding:0 1em;
background-color: white;
border: 3px solid @global-success-background;
......@@ -194,7 +195,8 @@ main .uk-container{
}
}
}
#snippet_devenir_benevole{
#snippet_devenir_benevole,
#snippet_presse{
color: white;
background-color:@global-muted-color;
> div{
......@@ -209,6 +211,11 @@ main .uk-container{
color: white;
}
}
#snippet_presse{
> div{
background: url(images/devenir_benevole.png) right bottom no-repeat @global-muted-color;
}
}
#snippet_partenaires{
>div{
padding:3em 0 2em;
......@@ -255,8 +262,12 @@ main .uk-container{
color: white;
text-align: left;
}
#nl_form{
input{
display: inline;
}
}
}
.largeur1{
max-width:950px;
margin: 0 auto;
......
......@@ -9,7 +9,11 @@
</div>
<div class="uk-width-1 uk-width-medium-1-3">
<h4><?php esc_html_e( 'Nous suivre', 'beans_gasap' ) ?></h4>
Newsletter subscription
<div><?php esc_html_e( 'Inscrivez-vous à notre newsletter pour recevoir nos prochaines actualités.', 'beans_gasap' ) ?></div>
<div id="nl_form">
<input type="email" name="EMAIL" placeholder="<?php esc_html_e( 'Votre adresse mail', 'beans_gasap' ) ?>" required />
<input type="submit" value="<?php esc_html_e( 'go', 'beans_gasap' ) ?>" />
</div>
</div>
<div class="uk-width-1 uk-width-medium-1-3">
<h4><?php esc_html_e( 'Navigation', 'beans_gasap' ) ?></h4>
......
......@@ -8,12 +8,13 @@
<?php endwhile;
wp_reset_postdata();?>
</div>
<?php
<?php //deux producteurs
$do_not_duplicate = array();
$active_prod = get_query_var( 'choix_prod' );
$href = get_page_link(). '#presentation_producteur';
$loop = new WP_Query( array(
$short_producteurs = new WP_Query( array(
'post_type' => 'producer',
'order_by' => 'rand',
'posts_per_page' => '2',
......@@ -21,13 +22,13 @@
));
?><div class="uk-grid"><?php
while ( $loop->have_posts() ) : $loop->the_post(); ?>
while ( $short_producteurs->have_posts() ) : $short_producteurs->the_post(); ?>
<div class="uk-width-1 uk-width-medium-1-2"><?php
if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
<h2><?php echo get_the_title(); ?></h2>
<?php echo get_the_term_list( get_the_ID(), 'producertype', '<div>', ', ', '</div>' ); ?>
<a class="uk-button uk-button-success" href="<?php echo esc_url( add_query_arg( 'choix_prod', get_the_ID(), $href ) )?>"><?php esc_html_e( 'Discover', 'beans_gasap' ); ?></a>
<a class="uk-button uk-button-success" href="<?php echo esc_url( add_query_arg( 'choix_prod', get_the_ID(), $href ) )?>" data-uk-smooth-scroll><?php esc_html_e( 'Discover', 'beans_gasap' ); ?></a>
<?php edit_post_link( esc_html__( 'Edit producer', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div>
<?php $do_not_duplicate[] = get_the_ID();
......@@ -35,37 +36,31 @@
wp_reset_postdata();
?></div><?php
if(get_query_var($active_prod) !== '') {
$loop2 = new WP_Query( array( 'p' => $active_prod) );
} else {
$loop2 = new WP_Query( array(
'post_type' => 'producer',
'order_by' => 'rand',
'posts_per_page' => 1,
'post__not_in' => $do_not_duplicate
));
}
while ( $loop2->have_posts() ) : $loop2->the_post();
?>
<div id="presentation_producteur" class="uk-block">
<div class="uk-grid">
<div class="uk-width-1 uk-width-medium-1-2">
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
</div>
<div class="uk-width-1 uk-width-medium-1-2">
<h2><?php the_title(); ?></h2>
<?php the_content() ?>
<?php edit_post_link( esc_html__( 'Edit producer', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div>
</div>
// fiche proucteur
if(get_query_var($active_prod) !== '') {
$fiche_producteur = new WP_Query( array( 'p' => $active_prod) );
} else {
$fiche_producteur = new WP_Query( array(
'post_type' => 'producer',
'order_by' => 'rand',
'posts_per_page' => 1,
'post__not_in' => $do_not_duplicate
));
}
while ( $fiche_producteur->have_posts() ) : $fiche_producteur->the_post();?>
<div id="presentation_producteur" class="uk-block">
<div class="uk-grid">
<div class="uk-width-1 uk-width-medium-1-2">
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
</div>
</div>
<?php endwhile;
wp_reset_postdata();?>
</section>
<?php
wp_reset_postdata();
<div class="uk-width-1 uk-width-medium-1-2">
<h2><?php the_title(); ?></h2>
<?php the_content() ?>
<?php edit_post_link( esc_html__( 'Edit producer', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div>
</div>
</div><?php
endwhile;
wp_reset_postdata();?>
</section><?php
wp_reset_postdata();
\ No newline at end of file
......@@ -102,6 +102,7 @@ function add_contentpieces_after_lereaseau() { ?>
</div>
</div>
</article>
<article id="snippet_devenir_benevole"><div>
<div class="largeur3 uk-text-center"><?php
$devenir_benevole = new WP_Query( array( 'post_type' => 'contentpiece','p' => 203) ); //FIX db entry
......
......@@ -38,14 +38,29 @@ function page_contact_before() {
</div></article>
<article id="snippet_contact_prod">
<h3><?php esc_html_e( 'Produire pour les Gasaps', 'beans_gasap' ); ?></h3>
contact form to create
<div class="uk-text-center"><?php
$contact_producteurs = new WP_Query( array( 'post_type' => 'contentpiece','p' => 692) ); //FIX db entry
while($contact_producteurs->have_posts()) : $contact_producteurs->the_post(); ?>
<h2><?php the_title(); ?></h2>
<div><?php the_content(); ?></div>
<?php echo do_shortcode( '[contact-form-7 id="693" title="Contact form 1"]' ); ?>
<?php edit_post_link( esc_html__( 'Edit', 'beans_gasap' ), '<p class="edit-link">', '</p>' ); ?>
<?php endwhile;
wp_reset_postdata();?>
</div>
</article>
<article id="snippet_presse">
<h3><?php esc_html_e( 'Presse', 'beans_gasap' ); ?></h3>
snippet to create
</article>
<article id="snippet_presse"><div>
<div class="largeur3 uk-text-center"><?php
$presse = new WP_Query( array( 'post_type' => 'contentpiece','p' => 694) ); //FIX db entry
while($presse->have_posts()) : $presse->the_post(); ?>
<h2><?php the_title(); ?></h2>
<div><?php the_content(); ?></div>
<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<p class="edit-link">', '</p>' ); ?>
<?php endwhile;
wp_reset_postdata();?>
</div></div>
</article>
<article id="snippet_p87">
<?php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment