Commit 8a359bc7 authored by agnez's avatar agnez

page le réseau

parent 81d3c0df
......@@ -191,8 +191,25 @@ main .uk-container{
}
}
}
#snippet_la_carte{
#snippet_devenir_benevole{
color: white;
background-color:@global-muted-color;
> div{
background: url(images/devenir_benevole.png) right bottom no-repeat @global-muted-color;
background-size:auto 80%;
margin: 0 3em;
> div{
padding:3em 0 2em;
}
}
h2{
color: white;
}
}
#snippet_partenaires{
>div{
padding:3em 0 2em;
}
}
#gasap-footer{
......
......@@ -2,16 +2,16 @@
<div class="largeur3">
<div class="uk-grid uk-text-center">
<div class="uk-width-1 uk-width-small-1-2">
<a href="<?php echo esc_url( get_permalink(87) ); ?>">
<div><a href="<?php echo esc_url( get_permalink(87) ); ?>">
<img src="<?php echo get_stylesheet_directory_uri() . '/assets/img/pic_contact.png'?>">
</a>
<a href="<?php echo esc_url( get_permalink(87) ); ?>" class="uk-button uk-button-primary"><?php esc_html_e( 'Contact', 'beans_gasap' ) ?></a>
</a></div>
<div><a href="<?php echo esc_url( get_permalink(87) ); ?>" class="uk-button uk-button-primary"><?php esc_html_e( 'Contact', 'beans_gasap' ) ?></a></div>
</div>
<div class="uk-width-1 uk-width-small-1-2">
<a href="<?php echo esc_url( get_permalink(14) ); ?>">
<div><a href="<?php echo esc_url( get_permalink(14) ); ?>">
<img src="<?php echo get_stylesheet_directory_uri() . '/assets/img/pic_calendar.png'?>">
</a>
<a href="<?php echo esc_url( get_permalink(14) ); ?>" class="uk-button uk-button-primary"><?php esc_html_e( 'Calendar', 'beans_gasap' ) ?></a>
</a></div>
<div><a href="<?php echo esc_url( get_permalink(14) ); ?>" class="uk-button uk-button-primary"><?php esc_html_e( 'Calendar', 'beans_gasap' ) ?></a></div>
</div>
</div>
</div>
......
......@@ -25,7 +25,8 @@
<div><?php edit_post_link( esc_html__( 'Edit gasap', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?></div>
</div>
</div><?php
endwhile;
endwhile;
wp_reset_postdata();
}?>
</div>
</div>
......
<section id="3producteurs" class="uk-block largeur1">
<div class="uk-text-center"><?php
$producteurs_nourrissent = new WP_Query( array( 'post_type' => 'contentpiece','p' => 204) ); //FIX db entry
while($producteurs_nourrissent->have_posts()) : $producteurs_nourrissent->the_post(); ?>
<h2><?php the_title(); ?></h2>
<div><?php the_content(); ?></div>
<?php edit_post_link( esc_html__( 'Edit', 'beans_gasap' ), '<p class="edit-link">', '</p>' ); ?>
<?php endwhile;
wp_reset_postdata();?>
</div>
<?php
$do_not_duplicate = array();
$active_prod = get_query_var( 'choix_prod' );
......@@ -23,6 +32,7 @@
</div>
<?php $do_not_duplicate[] = get_the_ID();
endwhile;
wp_reset_postdata();
?></div><?php
if(get_query_var($active_prod) !== '') {
......@@ -52,7 +62,7 @@ if(get_query_var($active_prod) !== '') {
</div>
</div>
<?php endwhile;
?>
wp_reset_postdata();?>
</section>
<?php
wp_reset_postdata();
......
......@@ -10,6 +10,7 @@
<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div>
<?php endwhile;
wp_reset_postdata();
//2 blocks
$argstroisetapes = array(
......@@ -35,7 +36,8 @@
edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );
?></div>
</div><?php
endwhile;?>
endwhile;
wp_reset_postdata();?>
</div>
</div>
</article>
......
......@@ -22,7 +22,7 @@ function gasap_enqueue_uikit_assets() {
beans_compiler_add_fragment( 'uikit', get_stylesheet_directory_uri() . '/assets/less/style.less', 'less' );
beans_compiler_add_fragment( 'uikit', get_stylesheet_directory_uri() . '/assets/less/gasap.less', 'less' );
// Remove unnecessary components.
//beans_uikit_dequeue_components( array( 'breadcrumb', 'comment', 'pagination', 'form', 'table' ) );
//beans_uikit_dequeue_components( array( 'breadcrumb', 'comment', 'pagination', 'form', 'table' ) );
}
// Remove this action and callback function if you are not adding CSS in the style.css file.
......@@ -45,14 +45,14 @@ require_once( get_stylesheet_directory() . '/assets/helpers/shared.php' );
// Force layout.
add_filter( 'beans_layout', 'gasap_force_layout' );
function gasap_force_layout() {
return 'c';
return 'c';
}
// ?? ça fait quoi ça encore ?
add_filter( 'beans_post_meta_post_types_gasap', 'gasap_register_beans_layout' );
function gasap_register_beans_layout( $conditions ) {
$conditions[] = 'piece';
return $conditions;
$conditions[] = 'piece';
return $conditions;
}
add_action( 'beans_post_append_markup', 'gasap_post_edit_link' );
......@@ -65,4 +65,17 @@ add_filter( 'query_vars', 'gasap_prodlink_add_custom_query_var' );
function gasap_prodlink_add_custom_query_var( $vars ){
$vars[] = "choix_prod"; //pour template part three_producers
return $vars;
}
//http://wordpress.stackexchange.com/questions/125554/get-image-description#answer-125613
function wp_get_attachment( $attachment_id ) {
$attachment = get_post( $attachment_id );
return array(
'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),
'caption' => $attachment->post_excerpt,
'description' => $attachment->post_content,
'href' => get_permalink( $attachment->ID ),
'src' => $attachment->guid,
'title' => $attachment->post_title
);
}
\ No newline at end of file
......@@ -80,10 +80,12 @@ function add_contentpieces_after_les_mangeurs() { ?>
<img src="<?php echo $image[0];?>" />
<div><?php the_title(); ?></div>
</div>
<?php endwhile;?>
<?php endwhile;
wp_reset_postdata();?>
</div>
</div>
<?php endwhile; ?>
<?php endwhile;
wp_reset_postdata();?>
</div>
</article>
......@@ -110,7 +112,8 @@ function add_contentpieces_after_les_mangeurs() { ?>
<div><?php the_content(); ?></div>
<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );?>
</div><?php
endwhile;?>
endwhile;
wp_reset_postdata();?>
</div>
</div></article>
......@@ -137,7 +140,8 @@ function add_contentpieces_after_les_mangeurs() { ?>
the_content();
edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );?>
</div><?php
endwhile;?>
endwhile;
wp_reset_postdata();?>
</div>
</div></article>
......@@ -164,7 +168,8 @@ function add_contentpieces_after_les_mangeurs() { ?>
<?php the_content(); ?>
<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div>
<?php endwhile; ?>
<?php endwhile;
wp_reset_postdata();?>
</div>
</article>
......
......@@ -37,7 +37,8 @@ function add_page_le_gasap_content_pieces() {
<div><?php the_content(); ?>
<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div></div>
<?php endwhile;?>
<?php endwhile;
wp_reset_postdata();?>
</div>
</div></section>
<?php
......@@ -62,7 +63,8 @@ function add_page_le_gasap_content_pieces() {
<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div>
</div>
<?php endwhile; ?>
<?php endwhile;
wp_reset_postdata();?>
</div></section>
<?php
include (get_stylesheet_directory() . '/assets/template_parts/three_steps.php');// Comment devenir membre en 3 étapes ?
......
......@@ -97,20 +97,28 @@ function add_contentpieces_after_lereaseau() { ?>
<?php the_content(); ?>
<?php edit_post_link( esc_html__( 'Edit worker', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
</div><?php
endwhile; ?>
endwhile;
wp_reset_postdata();?>
</div>
</div>
</article>
<article id="snippet_devenir_benevole">
<h2><?php esc_html_e( 'Dévenir bénévole', 'beans_gasap' ); ?></h2>
<div class="uk-text-center">TODO
<a class="uk-button uk-button-primary" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Dévenir bénévole', 'beans_gasap' ); ?></a> <?php //TODO enter href to wantet page ?>
</div>
<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
while($devenir_benevole->have_posts()) : $devenir_benevole->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();?>
<a class="uk-button uk-button-success" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Dévenir bénévole', 'beans_gasap' ); ?></a> <?php //TODO enter href to wantet page ?>
</div></div>
</article>
<article id="snippet_partenaires" class="uk-slidenav-position" data-uk-slider="{center:true}">
<div class="uk-slider-container">
<ul class="uk-slider uk-grid-width-medium-1-3 uk-grid-width-large-1-4"> <?php
<h2><?php esc_html_e( 'Nos partenaires', 'beans_gasap' ) ?></h2>
<ul class="uk-slider uk-grid-width-medium-1-3 uk-grid-width-large-1-5"> <?php
$argspartner = array(
'post_type' => 'partner',
'order_by' => 'rand'
......@@ -118,7 +126,7 @@ function add_contentpieces_after_lereaseau() { ?>
$looppartner = new WP_Query( $argspartner );
while ( $looppartner->have_posts() ) : $looppartner->the_post();
if ( has_post_thumbnail() ) { ?>
<li><a href="<?php echo get_post_meta( get_the_ID(), '_partenaire_url', true ) ?>" title="<?php the_title(); ?>" target="_blank"><?php the_post_thumbnail('medium'); ?></a></li><?php
<li><a href="<?php echo get_post_meta( get_the_ID(), '_partenaire_url', true ) ?>" title="<?php the_title(); ?>" target="_blank"><?php the_post_thumbnail('thumbnail'); ?></a></li><?php
}
endwhile;
wp_reset_postdata();?>
......@@ -159,9 +167,33 @@ function add_contentpieces_after_lereaseau() { ?>
</div>
</article>
<article id="snippet_documents">
<h3><?php esc_html_e( 'Tous nos documents fondateurs', 'beans_gasap' ); ?></h3>
piece avec locuments attachés => boutons (grid 3)
<article id="snippet_documents">
<div class="largeur3">
<h3><?php esc_html_e( 'Tous nos documents fondateurs', 'beans_gasap' ); ?></h3>
<div><?php esc_html_e( 'Tous nos documents de référence sont téléchargeables ici :', 'beans_gasap' ); ?></div>
<?php
$args_documents = array(
'post_type' => 'attachment',
'orderby'=> 'date',
'order' => 'ASC',
'post_status' => 'inherit',
'tax_query' => array(
array(
'taxonomy' => 'media_usage',
'field' => 'term_id',
'terms' => 40 //FIX db entry
)
)
);
$documents = new WP_Query( $args_documents );
while ( $documents->have_posts() ) : $documents->the_post();
$attachment_meta = wp_get_attachment(get_the_ID());?>
<div class="uk-width-1 uk-width-small-1-2 uk-width-medium-1-3">
<a class="uk-button uk-button-success" download="<?php echo $attachment_meta['href'];?>" title="<?php echo $attachment_meta['description']; ?>"><?php the_title(); ?></a>
</div>
<?php endwhile;
wp_reset_postdata();?>
</div>
</article>
<?php
include (get_stylesheet_directory() . '/assets/template_parts/three_producers.php');
......
......@@ -44,10 +44,12 @@ function add_contentpieces_after_les_producteurs() { ?>
<img src="<?php echo $image[0];?>" />
<div><?php the_title(); ?></div>
</div>
<?php endwhile;?>
<?php endwhile;
wp_reset_postdata();?>
</div>
</div>
<?php endwhile; ?>
<?php endwhile;
wp_reset_postdata();?>
</div>
</article>
......@@ -74,7 +76,8 @@ function add_contentpieces_after_les_producteurs() { ?>
the_content();
edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );?>
</div><?php
endwhile;?>
endwhile;
wp_reset_postdata();?>
</div>
</div></article>
......@@ -85,6 +88,7 @@ function add_contentpieces_after_les_producteurs() { ?>
<h3><?php the_title(); ?></h3>
<div class="largeur2"><?php the_content(); ?></div><?php
endwhile;
wp_reset_postdata();
$argslesengagements = array(
'post_type' => 'contentpiece',
'orderby'=> 'date',
......@@ -106,10 +110,15 @@ function add_contentpieces_after_les_producteurs() { ?>
<div><?php the_content(); ?></div>
<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );?>
</div><?php
endwhile;?>
endwhile;
wp_reset_postdata();?>
</div>
</div></article>
Comment devenir producteur pour les GASAP ?
<?php
include (get_stylesheet_directory() . '/assets/template_parts/gasap_map.php');
include (get_stylesheet_directory() . '/assets/template_parts/three_producers.php');
include (get_stylesheet_directory() . '/assets/template_parts/latest_news.php');
include (get_stylesheet_directory() . '/assets/template_parts/contact_calendar.php');
include (get_stylesheet_directory() . '/assets/template_parts/footer.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