Skip Navigation

[Resolved] Full screen slider

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to create a full-screen slider cell for Layouts

Solution:
- Duplicate the standard slider Layout cell. Modify the PHP code to work as a full-screen slider.
- Add the relevant CSS and JS to your Layouts CSS and JS editors.

Relevant Documentation: https://toolset.com/documentation/user-guides/creating-custom-cells-unique-functionality/

This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 21 replies, has 2 voices.

Last updated by johanL-2 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#513522

I am trying to build a slider with views which is displayed in full screen. I red "I want to create full screen (instead of full width) slider in Toolset Bootstrap" where the subject was discussed but I dont really got it to work. I probably missed some steps. I have created the custom cell file a copy of "wpddl.cell_slider.class.php" into /dd-layouts-cells/ (Im usign your starter theme) and renamed the functions and variable. But I got an error when not comment out the following.

/*
if( ddl_has_feature('FullScreen-slider-cell') === false ){
	return;
}
 */

Could you please help me with a more step by step instruction. And where do i put the code that Beda is writning in the post?

div class="carousel-inner header-carousel-inner">
                <?php while ( has_ddl_repeater('slider') ) : the_ddl_repeater('slider'); ?>
 
                    <div class="header-carousel-slide item <?php if (get_ddl_repeater_index() == 0) { echo ' active'; } ?>"
                        style="background-image:url(<?php the_ddl_sub_field('slide_url'); ?>);
                               background-repeat: no-repeat;
                               background-position: center center;
                               background-size: cover;"
                        >
                     <!--   <div class="header-carousel-text site-subtitles">
                            <h2 class="carousel-title site-subtitle">
                                <?php the_ddl_sub_field('slide_title'); ?>
                            </h2>
                            <h3 class="carousel-title site-sub-subtitle">
                                <?php the_ddl_sub_field('slide_text'); ?>
                            </h3>
                        </div>-->
                    </div>
 
                <?php endwhile; ?>
            </div>

BR
Johan L

#513816

Hi, I'll try to help. Keep this bit of code unchanged for compatibility:

if( ddl_has_feature('slider-cell') === false ){
    return;
}

Then you can make your changes in the slider_cell_content_callback function. There's a while loop that begins:

while ( has_ddl_repeater('slider') ) : the_ddl_repeater('slider'); ?>

This is where the output for each slide is built.

Could you please help me with a more step by step instruction.
This is a pretty complex process, but I will do my best. This is going to take a lot of back and forth to get right, and it's very dependent on your theme and other plugins. It's probably best for you to let me take a look at your wp-admin area, make a clone of your site, and walk you through each step. This way I can make changes without modifying your live site.

If that's okay with you, please provide the login credentials in a private reply.

#513817

Private reply enabled here.

#514608

Hi, I had some trouble cloning your multisite installation, but I was finally able to get that up and running locally so I can make changes without any possibility of breaking your site.

- I see that you're making changes directly in the Toolset Starter theme. It's best to make any changes in a child theme so that no one will inadvertently wipe out your changes by updating Toolset Starter.
- I made some changes and I now have a new cell in my Layout editor for a Fullscreen Slider. For now, it is simply a clone of the regular slider. Tomorrow I will work on adding the modifications Beda mentioned to make the slides show full-screen.
- Here is the updated PHP cell class file I'm working from:

<?php
/*
 * Slider cell type.
 * Displays set of images using Bootstrap's carousel component
 *
 */

if (!class_exists('Layouts_cell_slider_fullscreen')) {
    class Layouts_cell_slider_fullscreen{

        // define cell name
        private $cell_type = 'slider-cell-fullscreen';

        function __construct() {
            add_action( 'init', array(&$this,'register_slider_cell_init' ), 12);
        }

        function register_slider_cell_init() {
            if (function_exists('register_dd_layout_cell_type')) {
                register_dd_layout_cell_type($this->cell_type,
                    array(
                        'name' => __('SliderFullscreen', 'ddl-layouts'),
                        'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'layouts-slider-cell.svg',
                        'description' => __('Display the image slider fullscreen, built using the Bootstrap Carousel component.', 'ddl-layouts'),
                        'category' => __('Fields, text and media', 'ddl-layouts'),
                        'button-text' => __('Assign Fullscreen Slider cell', 'ddl-layouts'),
                        'dialog-title-create' => __('Create new Fullscreen Slider cell', 'ddl-layouts'),
                        'dialog-title-edit' => __('Edit Fullscreen Slider cell', 'ddl-layouts'),
                        'dialog-template-callback' => array(&$this,'slider_cell_dialog_template_callback'),
                        'cell-content-callback' => array(&$this,'slider_cell_content_callback'),
                        'cell-template-callback' => array(__CLASS__,'slider_cell_template_callback'),
                        'cell-class' => '',
                        'has_settings' => true,
                        'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'slider_expand-image.png',
                        'translatable_fields' => array(
                            'slider[slide_url]' => array('title' => 'Slide URL', 'type' => 'LINE'),
                            'slider[slide_title]' => array('title' => 'Slide title', 'type' => 'LINE'),
                            'slider[slide_text]' => array('title' => 'Slide description', 'type' => 'AREA')
                        ),
                        'register-scripts' => array(
                            array('ddl-slider-cell-script', WPDDL_GUI_RELPATH . 'editor/js/ddl-slider-cell-script.js', array('jquery'), WPDDL_VERSION, true),
                        ),
                    )
                );
            }
        }


        function slider_cell_dialog_template_callback() {
            ob_start();
            ?>

            <div class="ddl-form pad-bot-0">
                <p>
                    <label for="<?php the_ddl_name_attr('slider_height'); ?>" class="ddl-manual-width-201"><?php _e( 'Slider height', 'ddl-layouts' ) ?>:</label>
                    <span class="ddl-input-wrap"><input type="number" name="<?php the_ddl_name_attr('slider_height'); ?>" value="300" class="ddl-input-half-width"><span class="ddl-measure-unit"><?php _e( 'px', 'ddl-layouts' ) ?></span></span>
                </p>
                <p>
                    <label for="<?php the_ddl_name_attr('interval'); ?>" class="ddl-manual-width-201"><?php _e( 'Interval', 'ddl-layouts' ) ?>:</label>
                    <span class="ddl-input-wrap"><input type="number" name="<?php the_ddl_name_attr('interval'); ?>" value="5000" class="ddl-input-half-width"><span class="ddl-measure-unit"><?php _e( 'ms', 'ddl-layouts' ) ?></span><i class="fa fa-question-circle question-mark-and-the-mysterians js-ddl-question-mark" data-tooltip-text="<?php _e( 'The amount of time to delay between automatically cycling an item, ms.', 'ddl-layouts' ) ?>"></i></span>
                </p>
                <fieldset>
                    <legend><?php _e( 'Options', 'ddl-layouts' ) ?></legend>
                    <div class="fields-group">
                        <label class="checkbox" for="<?php the_ddl_name_attr('autoplay'); ?>">
                            <input type="checkbox" name="<?php the_ddl_name_attr('autoplay'); ?>" id="<?php the_ddl_name_attr('autoplay'); ?>" value="true">
                            <?php _e( 'Autoplay', 'ddl-layouts' ) ?>
                        </label>
                        <label class="checkbox" for="<?php the_ddl_name_attr('pause'); ?>">
                            <input type="checkbox" name="<?php the_ddl_name_attr('pause'); ?>" id="<?php the_ddl_name_attr('pause'); ?>" value="pause">
                            <?php _e( 'Pause on hover', 'ddl-layouts' ) ?>
                        </label>
                        <?php apply_filters('ddl-slider_cell_additional_options', '');?>
                    </div>
                </fieldset>
                <fieldset class="from-top-6">
                    <legend><?php _e( 'Image size', 'ddl-layouts' ) ?></legend>
                    <div class="fields-group">
                        <label class="checkbox checkbox-smaller float-none" for="<?php the_ddl_name_attr('image_size'); ?>">
                            <input type="radio" name="<?php the_ddl_name_attr('image_size'); ?>" id="<?php the_ddl_name_attr('image_size'); ?>" checheked="checked" value="">
                            <?php _e( 'Contain (crop)', 'ddl-layouts' ) ?>
                        </label>
                        <span><i class="fa fa-question-circle question-mark-and-the-mysterians js-ddl-question-mark" data-tooltip-text="<?php _e( 'The background image will be scaled so that each side is as large as possible while not exceeding the length of the corresponding side of the container.', 'ddl-layouts' ) ?>"></i></span>
                        <div class="clear from-bot-4"></div>
                        <label class="checkbox checkbox-smaller float-none" for="<?php the_ddl_name_attr('image_size'); ?>_cover">
                            <input type="radio" name="<?php the_ddl_name_attr('image_size'); ?>" id="<?php the_ddl_name_attr('image_size'); ?>_cover" value="cover">
                            <?php _e( 'Cover (add padding)', 'ddl-layouts' ) ?>
                        </label>
                        <span><i class="fa fa-question-circle question-mark-and-the-mysterians js-ddl-question-mark" data-tooltip-text="<?php _e( 'The background image will be sized so that it is as small as possible while ensuring that both dimensions are greater than or equal to the corresponding size of the container.', 'ddl-layouts' ) ?>"></i></span>
                    </div>
                </fieldset>

                <h3><?php _e('Slides', 'ddl-layouts'); ?></h3>

                <?php ddl_repeat_start( 'slider', __( 'Add another slide', 'ddl-layouts' ), 10 ); ?>

                <p class="js-ddl-media-field">
                    <label for="<?php the_ddl_name_attr('slide_url'); ?>" class="ddl-manual-width-201"><?php _e( 'Image', 'ddl-layouts' ) ?>:</label>
                    <span class="ddl-input-wrap"><input type="text" class="js-ddl-media-url ddl-input-two-thirds-width" name="<?php the_ddl_name_attr('slide_url'); ?>" />
                        <span class="ddl-form-button-wrap ddl-input-two-thirds-width-span">
                                <button class="button js-ddl-add-media"
                                                data-uploader-title="<?php _e( 'Choose an image', 'ddl-layouts' ) ?>"
                                                data-uploader-button-text="Insert image URL"><?php _e( 'Choose an image', 'ddl-layouts' ) ?>
                                </button>
                        </span>
                    </span>
                </p>
                <p>
                    <label for="<?php the_ddl_name_attr('slide_title'); ?>"><?php _e( 'Caption title', 'ddl-layouts' ) ?>:</label>
                    <input type="text" name="<?php the_ddl_name_attr('slide_title'); ?>">
                </p>
                <p>
                    <label for="<?php the_ddl_name_attr('slide_text'); ?>"><?php _e( 'Caption description', 'ddl-layouts' ) ?>:</label>
                    <textarea name="<?php the_ddl_name_attr('slide_text'); ?>" rows="3"></textarea>
                    <span class="desc"><?php _e('You can add HTML to the slide description.', 'ddl-layouts'); ?></span>
                </p>

                <?php ddl_repeat_end( array( 'additional_wrap_class' => ' from-top-0 pad-top-0') ); ?>

            </div>
            <?php
            return ob_get_clean();
  }


        // Callback function for displaying the cell in the editor.
  public static function slider_cell_template_callback() {
            ob_start();
            ?>
            <div class="cell-content">
                <p class="cell-name"><?php _e('Slider', 'ddl-layouts'); ?></p>
                <div class="cell-preview">
                    <div class="ddl-slider-preview">
                        <img src="<?php echo DDL_ICONS_SVG_REL_PATH . 'slider.svg'; ?>" height="130px">
                    </div>
                </div>
            </div>
            <?php
            return ob_get_clean();
  }

  // Callback function for display the cell in the front end.
  function slider_cell_content_callback() {

            $unique_id = uniqid();
            $pause = '';

            if ( get_ddl_field('pause') ) {
                    $pause = 'data-pause="hover"';
            } else {
                    $pause = 'data-pause="false"';
            }

            ob_start();
            ?>

            <?php if ( get_ddl_field('autoplay') ) :
                $this->get_autoplay_script($unique_id);
            endif; ?>

            <?php $this->get_inline_style($unique_id); ?>

                <?php $count_slides = 1; ?>
                <?php $carousel_container_class = apply_filters( 'ddl-carousel_container_class', 'carousel slide ddl-slider' );?>
                <?php $carousel_tag = apply_filters( 'ddl-carousel_element_tag', 'div' );?>
                <?php $carousels_tags = apply_filters( 'ddl-carousel_elements_tag', 'div' );?>
                <?php $carousel_data_attr = apply_filters( 'ddl-carousel_element_data_attribute', '' );?>
                <?php $carousel_class = apply_filters( 'ddl-carousel_element_class_attribute', 'carousel-inner' );?>
                <?php $carousel_items_classes = apply_filters( 'ddl-carousel_items_classes', '' );?>
                <?php $carousel_active_class = apply_filters( 'ddl-carousel_active_element_class', 'active' );?>
                <?php $container_additional_attributes = apply_filters( 'ddl-carousel_container_additional_attributes', '' );?>


            <div id="slider-<?php echo $unique_id ?>" class="<?php echo $carousel_container_class;?>" <?php echo $pause ?> data-interval="<?php the_ddl_field('interval') ?>" <?php echo $container_additional_attributes;?> >

                    <?php $this->get_carousel_indicators($unique_id);?>

                <<?php echo $carousel_tag;?> class="<?php echo $carousel_class?>" <?php echo $carousel_data_attr;?>>

                    <?php
                    apply_filters('ddl-get_additional_carousel_top_controls_if', '');
                    while ( has_ddl_repeater('slider') ) : the_ddl_repeater('slider'); ?>

                    <<?php echo $carousels_tags;?> class="<?php echo $carousel_items_classes;?>item <?php if (get_ddl_repeater_index() == 0) { echo ' '.$carousel_active_class; } ?>"
                        <?php // Cover image to slide
                        if( get_ddl_field('image_size') == 'cover' ): ?>
                            style="background: url(<?php the_ddl_sub_field('slide_url'); ?>) no-repeat; background-size:cover;"
                        <?php endif;?>
                        >
                        <?php if( get_ddl_field('image_size') == '' ): ?>
                            <img src="<?php the_ddl_sub_field('slide_url'); ?>" alt="slide-<?php echo $count_slides;?>" />
                        <?php endif;
                        if( get_ddl_sub_field('slide_title')  || get_ddl_sub_field('slide_text') ) :
                        ?>
                        <div class="<?php echo apply_filters('ddl-carousel_caption_class_attribute', 'carousel-caption');?>">
                            <h4>
                                <?php the_ddl_sub_field('slide_title'); ?>
                            </h4>
                            <p>
                                <?php the_ddl_sub_field('slide_text'); ?>
                            </p>
                        </div>
                        <?php endif;?>
                    </<?php echo $carousels_tags;?>>
                    <?php
                    $count_slides++;
                    endwhile;
                    ?>
                </<?php echo $carousel_tag;?>>

                <?php $this->get_carousel_indicators_bottom($unique_id, $count_slides);?>

                <?php echo apply_filters('ddl-carousel_control_left', '<a class="'.apply_filters("ddl-carousel_control_left_class_attribute", "left carousel-control").'" href="#slider-'.$unique_id .'" data-slide="prev">'</a>', $unique_id);?>
                <?php echo apply_filters('ddl-carousel_control_right', '<a class="'.apply_filters('ddl-carousel_control_right_class_attribute', 'right carousel-control').'" href="#slider-'.$unique_id .'" data-slide="next">'</a>', $unique_id);?>

            </div>

            <?php
            return ob_get_clean();
  }

        function get_carousel_indicators($unique_id){
                ob_start();?>
                    <ol class="carousel-indicators">
                    <?php while ( has_ddl_repeater('slider') ) : the_ddl_repeater('slider'); ?>
                        <li data-target="#slider-<?php echo $unique_id ?>" data-slide-to="<?php the_ddl_repeater_index(); ?>" <?php if (get_ddl_repeater_index() == 0) { echo ' class="active"'; } ?>></li>
                    <?php endwhile;
                        ddl_rewind_repeater('slider');
                    ?>
                </ol>
                <?php
                echo apply_filters('ddl-get_carousel_indicators', ob_get_clean(), $unique_id);
        }

        function get_carousel_indicators_bottom($unique_id, $count_slides){
                echo apply_filters('ddl-get_carousel_indicators_bottom', '', $unique_id, $count_slides);
        }

        function get_autoplay_script($unique_id){
            ob_start()?>

                <script type="text/javascript">
                //<![CDATA[
                    jQuery(document).ready( function($) {
                        var ddl_slider_id_string = "#slider-<?php echo $unique_id ?>";
                        $(ddl_slider_id_string).carousel({
                            interval : <?php the_ddl_field('interval') ?>
                            <?php if (!get_ddl_field('pause')) {echo ', pause: "false"';} ?>
                        });
                    });
                    //]]>
                </script>
            <?php
            echo apply_filters('ddl-get_autoplay_script', ob_get_clean(), $unique_id);
        }

        function get_inline_style( $unique_id ){
                    ob_start();?>
                        <style>
                            #slider-<?php echo $unique_id ?> .carousel-inner > .item {
                                    height: <?php the_ddl_field('slider_height') ?>px;
                             }
                        </style>
                    <?php
                    echo apply_filters('ddl-get_inline_style', ob_get_clean(), $unique_id );
        }

    }

    new Layouts_cell_slider_fullscreen();
}
#514699

Hi,
Great! I have changed so Im working with Toolset Starter Child now.

#515072
Screen Shot 2017-04-19 at 2.44.05 PM.jpg

Okay update round 2. Please go to Toolset > Layouts CSS and JS and add the following CSS to your CSS editor panel:

.fullscreen.carousel {
  position:fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.fullscreen .carousel-inner {
  height:100%;
}

.fullscreen .carousel-inner .item {
  height: 100% !important;
}

Then please download this archive, extract the updated PHP class file and overwrite yours in wp-content/themes/toolset-starter-child/dd-layouts-cells/:
hidden link

After that, you should see a fullscreen slider cell option in Layouts. I created a new Layout to test this out. I added several large images to my fullscreen slider, then assigned the new Layout to a new test page. Now I can see the slider fullscreen with text overlays, and the disc status indicators at the bottom of the page. I'm attaching a screenshot here.

Please follow these steps and do a quick review. In my site, I'm seeing other page elements from the rest of the Layout bleeding through. I have highlighted that text in the screenshot so you can see what I mean. I'm not sure how yours is set up, so we need to discuss your results and next steps, so I know what you expect here.

#515540

Hi!
It looks and works fantastic. Please let me do some more tests and come back to you. I'll try to add som parallax effect on it to make the start page look very good. The slider so far looks good I can add images and add text. I think the rest is more or less about CSS.
/Johan

#515542

Great - keep me posted here and I can continue to work with you. I'm off Friday and Saturday but I'm back Sunday.

#516291

Hi,
I have now test and the setup is working with full screen. However, I have tried to add some extra functionality but not succeeded all the way.
Question 1
I have added a fade transition to the bootstrap slider. But It is not that smooth and soft as I would like to have it. My is more: first image showing, screen gets white due to the second image is fading in starting with opacity 0. When looking at hidden link it is much more smother. I cannot understand why. I have tested a lot of different transition types and different css.
my CSS for the fade and the slider

.fullscreen.carousel {
position:fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.fullscreen.carousel .item {
-webkit-transition: opacity 5s ease-in-out;
	-moz-transition: opacity 5s ease-in-out;
	-ms-transition: opacity 5s ease-in-out;
	-o-transition: opacity 5s ease-in-out;
	transition: opacity 5s ease-in-out;
	opacity:0;
}

.fullscreen.carousel .active.item {
 
	opacity:1;
}

.fullscreen.carousel-inner .active.left,
.fullscreen.carousel-inner .active.right {
	left: 0;
	z-index: 2;
	opacity: 0;
	filter: alpha(opacity=0);
}

.fullscreen.carousel-inner .next,
.fullscreen.carousel-inner .prev {
	left: 0;
	z-index: 1;
}

.fullscreen.carousele-inner .carousel-control {
	z-index: 3;
}
 
.fullscreen .carousel-inner {
  height:100%;
}
 
.fullscreen .carousel-inner .item {
  height: 100% !important;
}

Question 2
Would it be possible not to use position:fixed for the full slider? When doing this, I have not been able to do the parallax effect from hidden link in full width. How can I make this in full width? The effect of the image is there but it do not look good. No full width and everyting is stuced together

My CSS for the parallax effect

#parallax-menu {
 position:relative;
}
#parallax {
  margin-top:100%;
  position:relative;
    /* The image used */
    background-image: url("<em><u>hidden link</u></em>");

    /* Full height */
    height: 100%;

    /* Create the parallax scrolling effect */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

3
Last I have tried to make some elements of a view slide in like described in: hidden link

 .slideanim {visibility:hidden;}
.slide {
    /* The name of the animation */
    animation-name: slide;
    -webkit-animation-name: slide; 
    /* The duration of the animation */
    animation-duration: 1s; 
    -webkit-animation-duration: 1s;
    /* Make the element visible */
    visibility: visible; 
}

/* Go from 0% to 100% opacity (see-through) and specify the percentage from when to slide in the element along the Y-axis */
@keyframes slide {
    0% {
        opacity: 0;
        transform: translateY(70%);
    } 
    100% {
        opacity: 1;
        transform: translateY(0%);
    } 
}
@-webkit-keyframes slide {
    0% {
        opacity: 0;
        -webkit-transform: translateY(70%);
    } 
    100% {
        opacity: 1;
        -webkit-transform: translateY(0%);
    }
}
$(window).scroll(function() {
  $(".slideanim").each(function(){
    var pos = $(this).offset().top;

    var winTop = $(window).scrollTop();
    if (pos < winTop + 600) {
      $(this).addClass("slide");
    }
  });
});

Question 4
I have added the CSS and the Script into a view (event-typer) to make boxes sliden in when scrolling down. To not interfere with the silde class in the full screen slider I have changed the name .slide to something else but it did not work.
However, the CSS and the script is working out of the box on the full screen slider if I change position to not being fixed.

CSS code for the full screen slider when it is sliding in

.fullscreen.carousel {
position:relative;

One other strange thing that I cannot understand is why the script do not trigger when scrolling down. When I add slideanim to the class in a row in the view it will stay hidden. One thing I have achived is that bothe the full screen slider and the view (event-typer) slide in synchronously
the Lopp out put code

[wpv-layout-start]
	[wpv-items-found]

	<!-- wpv-loop-start -->
	<div class="container-fluid text-center bg-grey wpv-loop js-wpv-loop">
     
	<wpv-loop wrap="3" pad="true">
		[wpv-item index=1]
		<div class="row slideanim text-center">
  <div class="col-sm-4 ">
    <div class="thumbnail">
      [wpv-post-featured-image]
      <p><strong>[wpv-post-title]</strong></p>
      
      <button class="btn">Buy Tickets</button>
    </div>
  </div>
		[wpv-item index=other]
			<div class="col-sm-4">
    <div class="thumbnail">
      [wpv-post-featured-image]
      <p><strong>[wpv-post-title]</strong></p>
      <button class="btn">Buy Tickets</button>
    </div>
  </div>
		[wpv-item index=3]
		<div class="col-sm-4">
    <div class="thumbnail">
      [wpv-post-featured-image]
      <p><strong>[wpv-post-title]</strong></p>
      <button class="btn">Buy Tickets</button>
    </div>
  </div>
</div>
			
		[wpv-item index=pad]
			<div class="col-sm-4"></div>
		[wpv-item index=pad-last]
			<div class="col-sm-4"></div>
		</div>
	</wpv-loop>
	</div>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

The view CSS

.slideanim {visibility:hidden;}
.slide-event {
    /* The name of the animation */
    animation-name: slide;
    -webkit-animation-name: slide;
    /* The duration of the animation */
    animation-duration: 1s;
    -webkit-animation-duration: 1s;
    /* Make the element visible */
    visibility: visible;
}

/* Go from 0% to 100% opacity (see-through) and specify the percentage from when to slide in the element along the Y-axis */
@keyframes slide-event {
    0% {
        opacity: 0;
        transform: translateY(70%);
    }
    100% {
        opacity: 1;
        transform: translateY(0%);
    }
}
@-webkit-keyframes slide-event {
    0% {
        opacity: 0;
        -webkit-transform: translateY(70%);
    }
    100% {
        opacity: 1;
        -webkit-transform: translateY(0%);
    }
}

the script

$(window).scroll(function() {
  $(".slideanim").each(function(){
    var pos = $(this).offset().top;

    var winTop = $(window).scrollTop();
    if (pos < winTop + 600) {
      $(this).addClass("slide-event");
    }
  });
});

Qustion 4
I was also thinking if it somehow would possible to show a featured image of a custom post and/or update the full screen slider with CRED? But when tested around I concluded that I must create a view and a custom post for this. Is that correct?
Thanks alot for your help so far
Best Regards
Johan

#516300
Screen Shot 2017-04-23 at 5.32.21 PM.png

I have added a fade transition to the bootstrap slider. But It is not that smooth and soft as I would like to have it.
Please optimize your images. You're loading over 6 Mb of images on your slider, and there's no way that will be able to compete in terms of performance with the Bootstrap 3 carousel example you've linked to. Once that's done I can take another look.

I was also thinking if it somehow would possible to show the featured image of a custom post and/or update the full screen slider with CRED? But when tested I guess I must create a view and a custom post for this.
Once you have the basic slider working, you can open another ticket to try to integrate CRED. Let's try to keep this ticket focused on getting the basic slider working with the existing images.

Would it be possible not to use position:fixed? When doing this, I have not been able to do the parallax effect from hidden link in full width. How can I make this in full width? The effect is there but it do not look good.
I'm not sure I understand what you want to accomplish, but my advice is not to combine these two effects. The overall result will be very low-quality animations. There's simply too much going on for the browser to keep up with.

One other strange thing that I cannot understand is why the script to not trigger when scrolling.
Take a look in the browser console. jQuery isn't available at $, you should instead use "jQuery" like so:

jQuery(window).scroll(function() {
  jQuery(".slideanim").each(function(){
    var pos = jQuery(this).offset().top;
 
    var winTop = jQuery(window).scrollTop();
    if (pos < winTop + 600) {
      jQuery(this).addClass("slide-event");
    }
  });
});

Also - these calculations are going to slow down browser performance during scrolling. If you combine effects like this with a sliding image, that's likely to result in jank.
hidden link

#516679

Hi,
Thanks for the advice. I have now resized the images for the slider it looks better, but if thers any thing that would make the slider more smoother it woudl be great. I have also removed the slide in css and jquery until I know more about jank.
So the only thing left is to make the slider smoother.
BR
Johan

#517107

Hi, I made some modifications to help smooth out those transitions between slides. Now each slide fades in above the previous slide. Please take a look and let me know what you think. I see you've added some elements to the homepage, so you may need to hide them temporarily to get a good idea of the slider functionality.

#517626

Looks briljant, I notice that it can look diffrent i some browser, IE 11 for example and somethimes in firefox. The image gets full sizes and the transition it do not look good. Could it be that I have diffrent sizes of the images? I will test with new images tomorrow, What resolution, image size do you recommend?

#518035
cover.png

You want the images to cover full screen, correct? If so, you need to adjust the Layout Fullscreen Slider Cell to use the "Cover" setting instead of "Contain" (see the screenshot).

Then, add the following CSS in your Layouts CSS & JS editor:

.fullscreen.carousel .carousel-inner > .item {
  width: 100% !important;
  height: 100% !important;
}

A 1600x1000 pixel image at 72dpi should be large enough to look crisp on most screen sizes. Let me know when you have that updated and I can check Firefox and IE 11.

#519119

Looks good in Firefox, Edge and chorme and safari on mobile, have not test on Mac. But ei 11 an earlier do not work. Is it possible to use the native slider for ie?
BR
Johan

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.