New Landing How can we help? Cardinal Contact Slide close button

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Cardinal
  • #159328
    Franky Bogaerts
    Member
    Post count: 10

    Hi Guys,

    Is it possible to add a close button in the Contact Slide out function?

    I’ve already added an extra icon using a child theme functin custom code below.
    Best would be to change the two icons to a ‘X’ when the page is open.

    Can you please help.. After this I can launch the site.

    function sf_header_aux($aux) {

    global $sf_options;

    $show_cart = $sf_options[‘show_cart’];
    $show_wishlist = $sf_options[‘show_wishlist’];
    $header_left_config = $sf_options[‘header_left_config’];
    $header_right_config = $sf_options[‘header_right_config’];
    $header_left_text = __($sf_options[‘header_left_text’], ‘swiftframework’);
    $header_right_text = __($sf_options[‘header_right_text’], ‘swiftframework’);
    $fullwidth_header = $sf_options[‘fullwidth_header’];
    $contact_icon = apply_filters( ‘sf_header_contact_icon’, ‘<i class=”ss-mail”></i> <i class=”ss-phone”></i>’ );

    if ($aux == “left”) {
    $header_left_output = “”;
    if ($header_left_config == “social”) {
    $header_left_output .= do_shortcode(‘[social]’). “\n”;
    } else if ($header_left_config == “aux-links”) {
    $header_left_output .= sf_aux_links(‘header-menu’, TRUE, “header-1”). “\n”;
    } else if ($header_left_config == “overlay-menu”) {
    $header_left_output .= ‘<span>’.__(“Menu”, “swiftframework”).'</span>‘. “\n”;
    } else if ($header_left_config == “contact”) {
    $header_left_output .= ‘‘.$contact_icon.’‘. “\n”;
    } else if ($header_left_config == “search”) {
    $header_left_output .= ‘<nav class=”std-menu”>’. “\n”;
    $header_left_output .= ‘<ul class=”menu”>’. “\n”;
    $header_left_output .= sf_get_search(‘aux’);
    $header_left_output .= ‘‘. “\n”;
    $header_left_output .= ‘</nav>’. “\n”;
    } else {
    $header_left_output .= ‘<div class=”text”>’.do_shortcode($header_left_text).'</div>’. “\n”;
    }
    return $header_left_output;
    } else if ($aux == “right”) {
    $header_right_output = “”;
    if ($header_right_config == “social”) {
    $header_right_output .= do_shortcode(‘[social]’). “\n”;
    } else if ($header_right_config == “aux-links”) {
    $header_right_output .= sf_aux_links(‘header-menu’, TRUE, “header-1”). “\n”;
    } else if ($header_right_config == “overlay-menu”) {
    $header_right_output .= ‘<span>’.__(“Menu”, “swiftframework”).'</span>‘. “\n”;
    } else if ($header_right_config == “contact”) {
    $header_right_output .= ‘‘.$contact_icon.’‘. “\n”;
    } else if ($header_right_config == “search”) {
    $header_right_output .= ‘<nav class=”std-menu”>’. “\n”;
    $header_right_output .= ‘<ul class=”menu”>’. “\n”;
    $header_right_output .= sf_get_search(‘aux’);
    $header_right_output .= ‘‘. “\n”;
    $header_right_output .= ‘‘. “\n”;
    $header_right_output .= ‘</nav>’. “\n”;
    } else {
    $header_right_output .= ‘<div class=”text”>’.do_shortcode($header_right_text).'</div>’. “\n”;
    }
    return $header_right_output;
    }
    }

    Attachments:
    You must be logged in to view attached files.
    #159449
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    The same button that opens the contact slideout it’s the same one that closes.

    -Rui

    #160559
    Franky Bogaerts
    Member
    Post count: 10

    I know, but is it possible to change this? This isn’t clear for some users.

    #160617
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Let’s pretend you closing icon it’s the ss-cloud icon

    change this line

    
    $contact_icon = apply_filters( 'sf_header_contact_icon', '<i class="ss-mail"></i> <i class="ss-phone"></i>' );

    to this one

    
    $contact_icon = apply_filters( 'sf_header_contact_icon', '<i class="ss-mail"></i> <i class="ss-phone"></i><i class="ss-cloud my-custom-close-bt"></i>' );

    In the css custom option add this

    
    .my-custom-close-bt{
    display:none;
    }
    .slide-open .my-custom-close-bt{
    display:block;
    }

    -Rui

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register