Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1289973

    HI,

    I´d like to have such a preloader I´ve seen here: http://www.spvgg-bayreuth.de/
    This is a line from left to right. How do I manage this?

    Thanks in advance!

    #1290278

    Hey donillo,

    Please try to do the following:
    1. (skip this step if you have a child theme) Download and use a child theme. You can download and find instructions on how to use it here: https://kriesi.at/documentation/enfold/child-theme/
    2. Add this at the bottom of your child theme’s functions.php:

    function avia_preload_screen()
    {
    	$class = avia_get_option('preloader_transitions') != "disabled" ? 'av-transition-enabled' : "";
    	$label = __('Loading','avia_framework');
    	$logo  = avia_get_option('preloader_logo');
    	if( is_numeric( $logo ) )
    	{ 
    		$logo = wp_get_attachment_image_src( $logo, 'full' ); 
    		$logo = is_array( $logo ) ? $logo[0] : ''; 
    	}
    	
    	if( $logo ) 
    	{
    		$class .= " av-transition-with-logo";
    		$logo = "<img class='av-preloading-logo' src='{$logo}' alt='{$label}' title='{$label}' />";
    	}
    	
    	$output  = "";
    	$output .= 	"<div class='av-siteloader-wrap {$class}'>";
    	$output .= 		"<div class='av-siteloader-inner'>";
    	$output .= 			"<div class='av-siteloader-cell'>";
    	$output .= 			"<div class='yellow-line'></div>";
    	$output .= 			$logo;
    	$output .= 			"<div class='av-siteloader'><div class='av-siteloader-extra'></div>";
    	$output .= 			"</div>";
    	$output .= 		"</div>";
    	$output .= 	"</div>";
    	$output .= "</div>";
    	
    	return $output;
    }

    3. Add this CSS code in Enfold > General Styling > Quick CSS:

    .yellow-line {  
        border-top: 3px solid #fcea1a !important;
        width: 100%;
        left: 0;
        position: absolute;
        animation: 1.5s ease-out 0s 1 yellowLine;
    }
    
    @keyframes yellowLine {
    	0% {
    		width: 0%;
    		opacity: 0;
    	}
    	100% {
    		width: 100%;
    		opacity: 1;
    	}
    }
    

    Hope this helps.

    Best regards,
    Nikko

    #1290418

    Many thanks, it works.
    But now the line is in the middle of the window. Is it possible to move the line to the top of the page?

    #1290427

    Ah got it!

    function avia_preload_screen()
    {
    	$class = avia_get_option('preloader_transitions') != "disabled" ? 'av-transition-enabled' : "";
    	$label = __('Loading','avia_framework');
    	$logo  = avia_get_option('preloader_logo');
    	if( is_numeric( $logo ) )
    	{ 
    		$logo = wp_get_attachment_image_src( $logo, 'full' ); 
    		$logo = is_array( $logo ) ? $logo[0] : ''; 
    	}
    	
    	if( $logo ) 
    	{
    		$class .= " av-transition-with-logo";
    		$logo = "<img class='av-preloading-logo' src='{$logo}' alt='{$label}' title='{$label}' />";
    	}
    	
    	$output  = "";
    	$output .= 	"<div class='av-siteloader-wrap {$class}'>";
    	$output .= 			"<div class='magenta-line'></div>";    
    	$output .= 		"<div class='av-siteloader-inner'>";
    	$output .= 			"<div class='av-siteloader-cell'>";
    
    	$output .= 			$logo;
    	$output .= 			"<div class='av-siteloader'><div class='av-siteloader-extra'></div>";
    	$output .= 			"</div>";
    	$output .= 		"</div>";
    	$output .= 	"</div>";
    	$output .= "</div>";
    	
    	return $output;
    }
    #1290431

    Hi donillo,

    We’re glad to hear that :)
    Let us know if you still need further assistance.

    Best regards,
    Nikko

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.