Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #1117727

    Hello,
    thanks to your support and a few lines of css I managed to leave the header sticky also on mobile devices.
    Now there is a weird phenomenon:
    when I simulate a small device on my desktop by shrinking the browser window, the logo shrinks when scrolling like it should and like it does on big screens. But in “real life”, i.e. in Android or Apple devices, the logo doesn’t shrink.
    Any suggestions?

    Thanks,
    Daniel

    #1117788

    Hey danielmarsch,

    Please provide a link to the site/page in question so we can look into this issue further.

    Best regards,
    Jordan Shannon

    #1117827

    Sorry, I forgot about that:

    #1118347

    Hi,

    Please provide admin info as well in the private area.

    Best regards,
    Jordan Shannon

    #1119186

    Hi,
    I added a thin line under the header, when it scrolls:

    @media (max-width: 768px) {
      #header.av_header_border_disabled.header-scrolled {
        border-bottom: 1px solid #ccc;
      }

    Same phenomenon:
    When I narrow the browser window on my desktop, it’s fine.
    On real smartphone (Android and iPhone) it doesn’t show.

    I guess it’s the same cause as the non-shrinking Logo?

    Regards,
    Daniel

    #1119697

    Hi,

    Yeap, seems so. Do you need to change it in a different way?

    Best regards,
    Basilis

    #1119835

    Hi Basilis,
    yes of course, I want both, the logo shrink and the thin line appear under the header, on mobile devices.
    Best regards,
    Daniel

    #1120082

    Hi,

    That behavior is disabled on mobile devices by default. Ihe logo doesn’t have to shrink because sticky or fixed header is originally disabled on mobile devices. Unfortunately, you can’t activate it without editing the files directly.

    Best regards,
    Ismael

    #1136466

    Hi,
    so can you tell me where I have to edit what file, to make the logo shrink on mobile?
    Thanks,
    Daniel

    #1136877

    Hi,

    Edit the js > avia.js file, look for this code around line 695:

    			if(isMobile) shrink = false;
    

    Setting the value to true should enable the script, but we’re not really sure if it’s going to work on mobile view like it does on desktop.

    Thank you for the update.

    Best regards,
    Ismael

    #1139131

    Looks good and makes sense, but unfortunately it does not work. The logo still shrinks on mobile view on a desktop, but not on a real mobile, neither android nor i-phone.
    Any other idea?
    Best regards,
    Daniel

    #1139531

    Hi,

    This is why that option is disabled on mobile view in the first place. Unfortunately, this modification might require modification that is beyond the scope of support. Please hire a freelance developer or contact our partner, Codeable.

    Thank you for understanding.

    Best regards,
    Ismael

    #1139722

    Ok, thanks for the answer anyway,
    best regards,
    Daniel

    #1139724

    Hi,

    Did you need additional help on this topic or shall we close?

    Best regards,
    Jordan Shannon

    #1139738

    you like to have a shrinking logo aswell on mobile devices?

    enfold ▸ ⁨js⁩ ▸ ⁨avia-snippet-sticky-header.js

    find:
    if(shrinking && !isMobile)
    replace with:
    if(shrinking)

    now the shrinking should be there on mobile devices.

    To not loose this changing you can have a child-theme : avia-snippet-sticky-header.js
    make a copy of that edited js file and – upload it to your child-theme/js folder – because there is on default no js folder – create one.
    put this to your child-theme functions.php

    add_action( 'wp_enqueue_scripts', 'wp_change_sticky_header_script', 100 );
    function wp_change_sticky_header_script() {
       wp_deregister_script( 'avia-sticky-header' );
       wp_enqueue_script( 'avia-sticky-header-child', get_stylesheet_directory_uri().'/js/avia-snippet-sticky-header.js', array('avia-default'), $vn, true);
    }
    #1139740

    by the way – in your case i find it nice to have a non shrinking logo on mobile!

    #1141139

    Thank you, Guenni, but it doesn’t work this way:
    just changing the ⁨avia-snippet-sticky-header.js in the parent theme doesn’t do anything, and changing the function.php in the child theme does exact the contrary: no shrinking on mobile, but no shrinking on desktop either…

    #1141140

    ich glaube wir können deutsch miteinander kommunizieren?

    ich sehe, dass dein Enfold mit merging eingestellt ist. Also bitte die Files neu mergen lassen!
    Enfold – Leistung – “Alte CSS- und JS-Dateien löschen?” speichern
    Browser Cache löschen

    • This reply was modified 5 years, 1 month ago by Guenni007.
    #1141141

    Ja, gerne!

    #1141145

    und wp-supercache auch die Cachefiles löschen

    #1141311

    Hi,

    Thanks for helping out @guenni007.

    Best regards,
    Rikard

    #1141342

    Well i think i have to look if a header on fixed postion get this working too!

    you can see here – that it is even working this way if you got a fixed header.
    https://webers-testseite.de/cynthia/fixed-header-on-mobile/

    and if it weren’t for the superfluous rule in layout.css:

    @media only screen and (max-width: 767px) {
    .responsive #header_main .container{
      height: auto !important; 
    }
    }

    the header height will shrink too. (See the example page – with deleted rule in layout.css)
    But i found no way ( unset does not work) to overwrite this rule via css – only deleting that rule would help

    • This reply was modified 5 years, 1 month ago by Guenni007.
    #1141363

    Dear Mods : this rule seems to be obsolete. It is hard to overwrite a height rule set to auto !important.
    unset , initial and inherit does not do the trick.

    The rule has no influence on the otherhand – so test it please if it could be deleted.
    see fixed but shrinking header here: https://webers-testseite.de/cynthia/fixed-header-on-mobile/

    #1142177

    Hi,


    @guenni007

    Thanks for sharing this – I talked to Kriesi but he does not want to add these changes to core as the whole header CSS and js are pretty complicated and the risk of breaking other settings is too high – so I’m afraid if you want to use this feature you will have to stay to your customizations.

    Best regards,
    Günter

    #1142255

    Hallo Guenni007,
    ich hatte jetzt ein paar Tage nicht mehr reingeguckt:
    ja, Entmergen und Dekomprimieren der CSS- und JS-Files sowie Cache leeren, das hat es gebracht. Sorry, dass ich da nicht selber drauf gekommen bin. Also im Endeffekt ist es nur die kleine Textänderung in der avia-snippet-sticky-header.js.
    Danke und Gruß,
    Daniel

    #1142344

    ja – bitte – aber wie gesagt ich finde das große Logo schöner, solange die Fläche darunter sich nicht mit verkleinert.
    Siehe Beispielseite: https://webers-testseite.de/cynthia/fixed-header-on-mobile/

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