<?php
/**
 * The template for displaying comments
 *
 * This is the template that displays the area of the page that contains both the current comments
 * and the comment form.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package WP_Bootstrap_Starter
 */

/*
 * If the current post is protected by a password and
 * the visitor has not yet entered the password we will
 * return early without loading the comments.
 */
if ( post_password_required() ) {
	return;
}
?>

<div class="col-12 commentaire">
    <div class="laissez-commentaire">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-12 col-lg-10">
                    <h2>Partagez votre expérience !</h2>
                                    <p class="chapeau">Laissez un commentaire</p>
    <?php

    if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>

        <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'repose-pied-bureau' ); ?></p>
        <?php
    endif; ?>

    <?php comment_form( $args = array(
        'id_form'           => 'commentform', 
        'id_submit'         => 'commentsubmit',
        'title_reply'       => __( '', 'wp-bootstrap-starter' ),
        'title_reply_to'    => __( 'Leave a Reply to %s', 'wp-bootstrap-starter' ),
        'cancel_reply_link' => __( 'Annuler le commentaire', 'wp-bootstrap-starter' ),
        'label_submit'      => __( 'Envoyer le commentaire', 'wp-bootstrap-starter' ),
        'submit_button'     => __( '<button name="%1$s" type="submit" id="%2$s" class="%3$s button sans-fleche" >%4$s</button>', 'wp-bootstrap-starter' ),
    ));
    ?>
    </div>
    </div>
    </div>
    </div>

   <?php if ( have_comments() ) : ?>


        <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?>
            <nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
                
            </nav>
        <?php endif;?>

            <div class="commentaire-internaute">
                <div class="container">
                    <div class="row">
            <?php
            wp_list_comments( array( 'callback' => 'wp_bootstrap_starter_comment'));
            ?>
                    </div>
                </div>
            </div>

            <?php

    endif;

	?>

</div><!-- #comments -->
