If I have only 2 post in slider doesn't expand the photos

Viewing 4 posts - 1 through 4 (of 4 total)
  • #18666
    Mygor
    Participant

    Hi,
    I have a problem with the slider.
    If I show less than 3 post in the slider doesn’t expand the photos correctly.
    I think that the problem is the kwicks…
    I need some help, please.
    Thanks you very much!

    • This topic was modified 9 years, 7 months ago by Mygor.
    • This topic was modified 9 years, 7 months ago by Mygor.
    #22745
    PhiLho
    Participant

    I have the same problem and I am a bit surprised there is no answer to this.
    It can be seen, for example, at http://demo.onedesigns.com/minimatica/?cat=4 (Landscapes) if we click on the right arrow: we have only one image and it remains narrow, even when hovered (showing only part of the text), while I think it should have automatically (and statically, no animation) the width of the images of the previous “page” when they are hovered.
    Likewise, at page http://demo.onedesigns.com/minimatica/?cat=6 (portraits), we have 2 images, they are a bit wider when hovered, but not at the widest (text on first image is also truncated), and if you hover the second one, the left part of the text is lost, so it is not readable.
    This demo doesn’t have a 3-image page, so I can’t comment on it, but I guess the problem remains.
    It is hard to have always a multiple of 4 pages on each category… πŸ™‚

    I know the theme is free and you probably have more urgent to do, but if you can take a look at an opportunity, I would be grateful. Thank you.

    #22746
    PhiLho
    Participant

    Ah, I now understand the last sentence of Mygor.
    Kwicks is a jQuery library: http://devsmash.com/projects/kwicks
    It is now at v. 2.2.1 (it is 1.5.1 in Minimatica) and the problem seems to have been solved there.
    I will experiment a bit, the CSS needs to be adjusted (wider expanded panels). I will follow up here later.

    #22749
    PhiLho
    Participant

    OK, I have solved my problem cleanly in my child theme.
    I had to deactivate the kwicks and minimatica scripts from the parent, to put my own scripts in the child theme:

    
    function minimatica_child_customize()
    {
    	// Load the main theme's stylesheet.
    	wp_enqueue_style('minimatica-parent-style', get_template_directory_uri() . '/style.css');
    	// Not necessary, automatic, apparently. Otherwise, loads it twice...
    //	wp_enqueue_style( 'minimatica-child-style', get_stylesheet_directory_uri() . '/style.css', array( 'minimatica-parent-style' ) );
    	// The script activating Kwicks
    	wp_dequeue_script('kwicks');
    	wp_deregister_script('kwicks');
    	// The script activating Kwicks
    	wp_dequeue_script('minimatica');
    	wp_deregister_script('minimatica');
    	// The replacements
    	wp_enqueue_script('kwicks', get_stylesheet_directory_uri() . '/scripts/jquery.kwicks.min.js', array('jquery'));
    	wp_enqueue_script('minimatica', get_stylesheet_directory_uri() . '/scripts/minimatica.js', array('kwicks'));
    }
    // http://wordpress.stackexchange.com/questions/26822/how-to-override-javascript-files-in-child-theme
    // Delay the hook by lowering its priority to ensure the parent theme's registration has fired so we can undo it.
    add_action('wp_enqueue_scripts', 'minimatica_child_customize', 1000);
    

    As you can see, I have put the latest version (currently 2.2.1) version of Kwicks in the script directory of my child theme (minimatica-child beside the minimatica folder), and a copy of parent’s minimatica.js with a change to take in account the latest changes:

    
    	jQuery('.kwicks').kwicks({
    		maxSize: 600,
    		behavior: 'menu' // No longer default
    	});
    

    (previously had only max:605 inside)
    I also had to adjust the CSS:

    
    /* kwicks */
    #slides
    {
    	overflow: inherit;
    	height: 410px;
    	border-right: none;
    }
    
    ul#slides li:last-child
    {
    	border-right: #FFF 5px solid;
    }
    ul#slides li:only-child
    {
    	border-right: none;
    }
    
    .kwicks.kwicks-processed > *
    {
    	margin: 0;
    	position: absolute;
    }
    
    #nav-slider .nav-previous
    {
    	right: -40px;
    }
    #nav-slider .nav-next
    {
    	left: -40px;
    }
    

    To the author: feel free to use information there if you want to update the theme with the latest version of Kwicks. Small contribution to this nice theme.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.