<div class="lp-container">    
    <div class="wrap-landing-hero wrap-landing-hero-only grid-50">        

        <div class="wrap-slider">
            <?php if( is_admin() ): ?>
                <img style="width: 100%" src="<?php echo get_stylesheet_directory_uri() . '/assets/images/placeholder-img.jpg' ?>">
            <?php else: ?>

                <?php $images = get_field( 'gallery' );
                if( $images ): ?>
                    <div class="slider slider-for">
                        <?php 
                        foreach( $images as $image ): ?>
                            <div class="item">
                                <?php if( $image['type'] == 'video' ): ?>
                                    <video src="<?php echo esc_url( $image['url'] ); ?>" controls></video>
                                <?php elseif( $image['description'] ): ?>
                                    <?php echo wp_oembed_get( $image['description'], array( 'height' => 500 ) ); ?>
                                <?php else: ?>
                                    <img src="<?php echo esc_url( $image['url'] ); ?>" alt="<?php echo esc_attr( $image['alt'] ); ?>" />
                                <?php endif; ?>
                            </div>
                        <?php 
                        endforeach; ?>
                    </div>

                    <div class="slider slider-nav">
                        <?php foreach( $images as $image ): ?>                              
                            <div class="item <?php if( $image['description'] ) echo 'is-video'; ?>">
                                <?php if( $image['type'] == 'video' ): ?>
                                    <video src="<?php echo esc_url( $image['url'] ); ?>"></video>
                                <?php else: ?>  
                                    <img src="<?php echo esc_url( $image['sizes']['thumbnail'] ); ?>" alt="<?php echo esc_attr( $image['alt'] ); ?>" />
                                <?php endif; ?>
                            </div>                                    
                        <?php endforeach; ?>
                    </div>
                <?php endif; ?>     

            <?php endif; ?>       
        </div>
    </div>
</div>