public function toHTML($object) { $object = Section::add_post_meta($object); ob_start(); ?> <section id="<?php echo $object->post_name; ?> " class="bucket-section"> <div class="section-header"> <div class="section-header-text-wrapper"> <span class="section-header-text <?php echo $object->header_text_position; ?> " <?php if ($object->header_text_color) { echo 'style="color: ' . $object->header_text_color . '" '; } ?> > <?php echo $object->header_text; ?> </span> </div> <?php if ($object->header_image) { ?> <?php $header_img = wp_get_attachment_image_src($object->header_image, array(2000, 750)); ?> <div class="section-header-image-container"> <img class="section-header-image" src="<?php echo $header_img[0]; ?> " alt=""> </div> <?php } ?> <?php if ($object->header_video_mp4) { ?> <?php $header_video_url = wp_get_attachment_url($object->header_video_mp4); $header_video_meta = wp_get_attachment_metadata($object->header_video_mp4); ?> <div class="section-header-video-container" data-video-src="<?php echo $header_video_url; ?> " data-video-width="<?php echo $header_video_meta['width']; ?> " data-video-height="<?php echo $header_video_meta['height']; ?> " data-video-loop="<?php echo $object->header_video_loop ? 'true' : 'false'; ?> "> <video class="section-header-video" muted></video> </div> <?php } ?> </div> <div class="container"> <h2 class="section-title"><?php echo $object->post_title; ?> </h2> <p class="lead"><?php echo $object->lead_text; ?> </p> <div class="row"> <div class="col-md-5 col-sm-6 col-xs-12 no-pad"> <?php if ($object->feature_type == 'feature_image') { ?> <?php $featured_img = wp_get_attachment_image_src($object->feature_image, 'large'); ?> <img class="img-responsive section-image" src="<?php echo $featured_img[0]; ?> "> <?php } else { ?> <?php echo Spotlight::toHTML($object->feature_spotlight); ?> <?php } ?> </div> <div class="col-md-6 col-md-offset-1 col-sm-6 section-content"> <?php echo apply_filters('the_content', $object->content); ?> <?php if ($object->menu) { ?> <div class="menu-wrapper"> <h2>Explore Further</h2> <?php wp_nav_menu(array('menu' => $object->menu, 'container' => '')); ?> </div> <?php } ?> </div> </div> </div> </section> <?php return ob_get_clean(); }
echo the_title(); ?> </h2> <div class="content"> <?php $message = get_field('homepage_message'); echo apply_filters('the_content', $message); ?> </div> </div> <div class="col-md-4 col-md-offset-1 col-sm-6 col-xs-12"> <?php $spotlight = get_field('homepage_spotlight'); if ($spotlight) { $spotlight = get_post($spotlight); echo Spotlight::toHTML($spotlight); } ?> </div> </div> </div> <nav id="sections-navbar" class="navbar navbar-gold center"> <div class="container-fluid"> <div class="navbar-header"> <span class="navbar-title">Skip To Section</span> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sections-menu"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>