Main Navigation even on the first Screen...

If you are planning to organize any conference or festival, there are many ways to get help via our forum.
GK User
Wed Jan 14, 2015 11:46 am
Hi!

We would like (better: we need) to place the main navigation even on the first screen of the frontpage. Is this possible with some lines of code? Can you say how - e.g. in which file(s) i have to make the change. Of course we have to fade out the logo on the first screen of the frontpage, which ist displayed now.

Best greetings from Berlin an thanks for your work!

Papeteries
User avatar
Fresh Boarder

GK User
Wed Jan 14, 2015 3:01 pm
Hi,

It's possible - the top bar with the menu and the logo on the left will be visible after the website will bo loaded. If you want to change it, please edit Events/js/functions.js file and change this fragment:
Code: Select all
if($('#gk-header-nav') && !$('#gk-header-nav').hasClass('active')) {      
      $(window).scroll(function() {
         var currentPosition = $(window).scrollTop();

         if(
            currentPosition >= $('#gk-header').outerHeight() &&
            !$('#gk-header-nav').hasClass('active')
         ) {
            $('#gk-header-nav').addClass('active');
         } else if(
            currentPosition < $('#gk-header').outerHeight() &&
            $('#gk-header-nav').hasClass('active')
         ) {
            $('#gk-header-nav').removeClass('active');
         }
      });
   }


into:
Code: Select all
if($('#gk-header-nav') && !$('body').hasClass('frontpage') && !$('#gk-header-nav').hasClass('active')) {      
      $(window).scroll(function() {
         var currentPosition = $(window).scrollTop();

         if(
            currentPosition >= $('#gk-header').outerHeight() &&
            !$('#gk-header-nav').hasClass('active')
         ) {
            $('#gk-header-nav').addClass('active');
         } else if(
            currentPosition < $('#gk-header').outerHeight() &&
            $('#gk-header-nav').hasClass('active')
         ) {
            $('#gk-header-nav').removeClass('active');
         }
      });
   }

    if($('#gk-header-nav') && $('body').hasClass('frontpage') && !$('#gk-header-nav').hasClass('active')) {
            $('#gk-header-nav').addClass('active');
    }
User avatar
Moderator

GK User
Thu Feb 05, 2015 11:33 pm
Hi!
I had the same doubt and I tried your solution, but the menu dissapears of the frontpage, it only remains fixed on each one of the other pages. Does anybody know another way of keeping the menu in the same possition, with the logo on the left on every page, including the frontpage, and without having to initiate the scroll?
Thank you very much.
User avatar
Fresh Boarder

GK User
Fri Feb 06, 2015 8:36 am
Hi,

THe solution from my previous post should work, could you send me a PM with backend and FTP access to your website? Then I'll be able to check it exactly.
User avatar
Moderator

GK User
Fri Feb 06, 2015 4:57 pm
Hi, I've added mentioned code and it works, please check your website.
User avatar
Moderator

GK User
Fri Feb 06, 2015 9:28 pm
Thank you! The logo appears duplicated in the frontpage, but I will try to arrange it by myself.
User avatar
Fresh Boarder

GK User
Wed Jun 24, 2015 8:34 am
Hi, I tried this solution and it works fine when on the laptop - it appears right away on the front page but when you view it on mobile/tablet size, the navigation bar+logo is not there and only appears when you scroll down a bit. Instead there's a white gap where the navigation bar with menu hamburger icon + logo should be. How to fix?
User avatar
Fresh Boarder

GK User
Wed Jun 24, 2015 8:43 am
Hi debsmix,

Could you please provide me with a URL to your website, either here or via PM (click the “Private Message” text underneath my avatar) so that I may analyze it?
User avatar
Moderator


cron