} elseif ($image_size == '100%') {
    $image_width = '100%';
    $image_class = '';
} elseif ($image_size == 'fill') {
    $image_width = '100%';
    $image_class = 'fill';
} else {
    $image_width = '';
    $image_class = '';
}
/*
|----------------------------------------------------------------
|   Image Block.
|----------------------------------------------------------------
*/
echo '<div class="image ' . set_col_size($block_width) . ' col ' . $image_class . ' no-padding" style="margin: ' . $margin . '; padding: ' . $padding . ';">';
/*
|----------------------------------------------------------------
|   If vertical center is true set img in middle wrap.
|----------------------------------------------------------------
*/
if ($vertical_center) {
    echo '<div class="image-content on-top-overlay">';
    echo '<div class="middle-wrap">';
    echo '<img style="' . align_left_right_center($image_align) . '; max-width: ' . $max_image_width . 'px;" src="' . $image . '" width="' . $image_width . '" />';
    echo '</div>';
    echo '</div>';
} else {
    echo '<img class="on-top-overlay" style="' . align_left_right_center($image_align) . '; max-width: ' . $max_image_width . 'px;" src="' . $image . '" width="' . $image_width . '" />';
}
/*
$file = get_sub_field('file');
$button_new_tab = get_sub_field('button_new_tab');
$download = get_sub_field('download');
$button_choice = get_sub_field('button_choice');
$button_text = get_sub_field('button_text');
$button_align = get_sub_field('button_align');
$button_align_vert_mid = get_sub_field('button_align_vert_mid');
$margin_button = get_sub_field('margin_button');
$padding_button = get_sub_field('padding_button');
$button_width = get_sub_field('button_width');
/*
|----------------------------------------------------------------
|   Download block.
|----------------------------------------------------------------
*/
echo '<div class="' . set_col_size($button_width) . ' col-sm-12 col-xs-12 buttons-row ' . ($button_align_vert_mid ? 'col' : '') . '" style="margin: ' . $margin_button . '; padding: ' . $padding_button . '; ' . ($button_align_vert_mid ? 'display: table;' : '') . '">';
/*
|----------------------------------------------------------------
|   if '$buttons_align_vert_mid' is set echo the middle-wrap div.
|----------------------------------------------------------------
*/
if ($button_align_vert_mid) {
    echo '<div class="middle-wrap">';
}
/*
|----------------------------------------------------------------
|   Download link.
|----------------------------------------------------------------
*/
echo '<div class="buttons" style="text-align: ' . $button_align . '">';
echo '<a href="' . $file . '" class="' . $button_choice . '" ' . ($button_new_tab ? 'target="_blank"' : 'target="_self"') . ' ' . ($download ? 'download' : '') . '>' . $button_text . '</a>';
|   Get all the fields an put them in variables for easy usage.
|----------------------------------------------------------------
*/
$content = get_sub_field('content');
$content_color = get_sub_field('content_color');
$content_align = get_sub_field('content_align');
$block_width = get_sub_field('block_width');
$block_offset_width = get_sub_field('block_offset_width');
$margin = get_sub_field('margin');
$padding = get_sub_field('padding');
/*
|----------------------------------------------------------------
|   Text Block.
|----------------------------------------------------------------
*/
echo '<div class="text ' . set_col_size($block_width) . ' ' . set_offset_size($block_offset_width) . ' col container-capped" style="margin: ' . $margin . '; padding: ' . $padding . ';">';
echo '<div class="text-content on-top-overlay">';
echo '<div class="middle-wrap">';
/*
|----------------------------------------------------------------
|   Title/Divider/Subtitle.
|----------------------------------------------------------------
*/
get_template_part('includes/acf/parts/assets/title-divider-subtitle');
/*
|----------------------------------------------------------------
|   If the '$content' isn't empty display it.
|----------------------------------------------------------------
*/
if (!empty($content)) {
    echo '<div class="content-wrapper" style="color: ' . $content_color . '; text-align: ' . $content_align . ';">' . $content . '</div>';
$background_repeat = get_sub_field('image_repeat');
$margin_container = get_sub_field('margin_container');
$padding_container = get_sub_field('padding_container');
/*
|-------------------------------------------------------------------------------------------------------------------------------------------------
|   The call to action block.
|-------------------------------------------------------------------------------------------------------------------------------------------------
*/
echo '<div id="call-to-action" class="container-fluid container-capped same-col-height" style="' . set_background_style($background, $background_color, $background_image, $background_align, $background_size, $background_repeat) . ' margin: ' . $margin_container . '; padding: ' . $padding_container . '; ">';
echo '<div class="row on-top-overlay">';
/*
|----------------------------------------------------------------
|   Title/Divider/Subtitle.
|----------------------------------------------------------------
*/
echo '<div class="' . set_col_size($title_subtitle_width) . ' col-sm-12 col-xs-12 col" style="margin: ' . $margin_title . '; padding: ' . $padding_title . '">';
get_template_part('includes/acf/parts/assets/title-divider-subtitle');
echo '</div>';
/*
|----------------------------------------------------------------
|   If the field is filled, get the row layout.
|----------------------------------------------------------------
*/
if (get_sub_field('action_type')) {
    while (has_sub_field('action_type')) {
        switch (get_row_layout()) {
            /*
            |----------------------------------------------------------------
            |   If row layout is link.
            |----------------------------------------------------------------
            */
    $image_width = '100%';
} else {
    $image_width = '';
}
/*
|----------------------------------------------------------------
|   Image Align.
|----------------------------------------------------------------
*/
echo $image_align;
if ($image_align == 'right') {
    $image_alignment = 'right: 0;';
} elseif ($image_align == 'left') {
    $image_alignment = 'left: 0;';
} else {
    $image_alignment = '';
}
/*
|----------------------------------------------------------------
|   Slider Image Content.
|----------------------------------------------------------------
*/
echo '<div class="' . set_col_size($block_width) . ' ' . set_col_size_offset($block_width) . ' block-image ' . ($hide_content_on_mobile ? 'hide-mobile' : '') . '" style="margin: ' . $margin . '; padding: ' . $padding . '; ' . $image_alignment . '">';
echo '<div class="slide-content-inner">';
echo '<div class="content-image">';
echo '<img style="bottom: ' . $bottom_value . 'px; max-width: ' . $max_image_width . 'px;" src="' . $image_content . '" width="' . $image_width . '" />';
echo '</div>';
echo '</div>';
// Slide Content Inner closing tag
echo '</div>';
// Col Size closing tag
|-------------------------------------------------------------------------------------------------------------------------------------------------
|   The Contact Form Block
|-------------------------------------------------------------------------------------------------------------------------------------------------
*/
echo '<div id="contact-form" class="container-fluid container-capped" style="' . set_background_style($background, $background_color, $background_image, $background_align, $background_size, $background_repeat) . ' margin: ' . $margin . '; padding: ' . $padding . ';">';
echo '<div class="row contact-form ' . $contact_form_style . ' on-top-overlay">';
/*
|----------------------------------------------------------------
|   Title/Divider/Subtitle.
|----------------------------------------------------------------
*/
get_template_part('includes/acf/parts/assets/title-divider-subtitle');
/*
|----------------------------------------------------------------
|   Contact Form.
|----------------------------------------------------------------
*/
echo '<div class="' . set_col_size($contact_form_width) . '" style="' . align_left_right_center($contact_form_align) . '">';
echo do_shortcode($contact_form_shortcode);
echo '</div>';
// Col Size closing tag
echo '</div>';
// Contact Form closing tag
/*
|----------------------------------------------------------------
|   If image overlay set active show the overlay.
|----------------------------------------------------------------
*/
get_template_part('includes/acf/parts/assets/image-overlay');
echo '</div>';
// Container closing tag
Ejemplo n.º 7
0
 * Project:     Gstalt Framework
 */
/*
|----------------------------------------------------------------
|   Get the slide fields and put them in variables for easy usage.
|----------------------------------------------------------------
*/
$margin = get_sub_field('margin');
$padding = get_sub_field('padding');
$block_width = get_sub_field('block_width');
/*
|----------------------------------------------------------------
|   Slider Text Content.
|----------------------------------------------------------------
*/
echo '<div class="' . set_col_size($block_width) . ' block-text" style="margin: ' . $margin . '; padding: ' . $padding . ';">';
echo '<div class="slide-content-inner">';
/*
|----------------------------------------------------------------
|   Title/Divider/Subtitle.
|----------------------------------------------------------------
*/
get_template_part('includes/acf/parts/assets/title-divider-subtitle');
/*
|----------------------------------------------------------------
|   Buttons.
|----------------------------------------------------------------
*/
get_template_part('includes/acf/parts/assets/buttons');
echo '</div>';
// Slide Content Inner closing tag