Front Page Menu same as Sub-Pages

GK User
Sat Jul 12, 2014 4:00 am
Hi there,

Is there a way to change how the front page menu displays?

We would like to accomplish one of two options:

1) show the menu as soon as the user starts scrolling sown the page (not after clearing the header section).

and / or

2) displaying the same menu that is on the subpages on the front page.

Basically we do not like how the user has to scroll all the way down past the "header" module for the menu to show.
User avatar
Senior Boarder

GK User
Sat Jul 12, 2014 9:25 am
1. You need to edit file:
templates/gk_events/js/gk.scripts.js
and find this section:
Code: Select all
   if(jQuery('#gkHeaderNav').length > 0 && !jQuery('#gkHeaderNav').hasClass('active')) {      
      jQuery(window).scroll(function() {
         var currentPosition = jQuery(window).scrollTop();

         if(
            currentPosition >= jQuery('#gkHeader').outerHeight() &&
            !jQuery('#gkHeaderNav').hasClass('active')
         ) {
            jQuery('#gkHeaderNav').addClass('active');
         } else if(
            currentPosition < jQuery('#gkHeader').outerHeight() &&
            jQuery('#gkHeaderNav').hasClass('active')
         ) {
            jQuery('#gkHeaderNav').removeClass('active');
         }
      });
   }

what it does - it adds aditional class to menu element when user scrolls below header section. By changing this 2 lines:
Code: Select all
currentPosition >= jQuery('#gkHeader').outerHeight() &&

and
Code: Select all
currentPosition < jQuery('#gkHeader').outerHeight() &&

to detect number of pixel scrolled:
Code: Select all
currentPosition >= 100 &&

and
Code: Select all
currentPosition < 100 &&

you can achieve desired result.
User avatar
Moderator

GK User
Sat Jul 12, 2014 9:27 am
2. If you would like to make menu behave like on other pages, please edit file:
templates/gk_events/layouts/default.php
find line:
Code: Select all
<div id="gkHeaderNav"<?php if(in_array('frontpage', $page_suffix_table) === FALSE) : ?> class="static"<?php endif; ?>>

and modify it to:
Code: Select all
<div id="gkHeaderNav" class="static">
User avatar
Moderator

GK User
Tue Jul 15, 2014 9:45 am
I like the 1. solution but is possible to see the menu without scroll down?or if is possible to insert a "scroll down menu" and if is possible to see the logo from begining
User avatar
Senior Boarder

GK User
Tue Jul 15, 2014 7:46 pm
I found it:

<div id="gkHeaderNav" class="static active"> its beautifull
User avatar
Senior Boarder

GK User
Wed Jul 16, 2014 12:06 pm
Is there anything else I can help you with regarding this topic?
User avatar
Moderator

GK User
Sat Jul 19, 2014 3:00 am
Is there a way to accomplish the following on all sub-pages:

- Stop the logo from starting above the menu and then moving to the standard logo position once you start scrolling down the page?

Ideally we would like the menu be static with the logo to the left of the menu and not have the logo move around once you start scrolling.
User avatar
Senior Boarder

GK User
Mon Jul 21, 2014 10:47 am
So when your browser is on tom the menu should be visible?
User avatar
Moderator

GK User
Mon Jul 21, 2014 9:38 pm
Hi there,

We would like the menu to display like this at all times:
Image

and not like this when the page loads:
Image
User avatar
Senior Boarder

GK User
Tue Jul 22, 2014 1:06 pm
Could you please post an url to your site?
User avatar
Moderator

GK User
Tue Jul 22, 2014 2:44 pm
Cyberek wrote:Could you please post an url to your site?


http://dev.shed-solutions.ca
User avatar
Senior Boarder

GK User
Wed Jul 23, 2014 8:23 am
From what I see your page looks exactly like on the screen.
User avatar
Moderator

GK User
Wed Jul 23, 2014 2:16 pm
Cyberek wrote:From what I see your page looks exactly like on the screen.


EXACTLY!!! We DON'T want it to function like this. We Would like it to be like the first screenshot at all times!!
User avatar
Senior Boarder

GK User
Wed Jul 23, 2014 4:14 pm
The problem is not on homepage but on sub pages?
User avatar
Moderator

GK User
Wed Jul 23, 2014 4:15 pm
Cyberek wrote:The problem is not on homepage but on sub pages?


Correct
User avatar
Senior Boarder

GK User
Wed Jul 23, 2014 4:19 pm
Please edit: /templates/gk_events/css/override.css and add at its end:
Code: Select all
#gkHeaderNav.static {
top: 0px;
height: 73px;
}
#gkHeaderNav.static #gkLogoSmall {
left: -15px;
margin-left: 0;
position: relative;
top: 0;
}
#gkHeaderNav.static #gkMainMenu {
right: 0;
float: right;
top: 0px;
-webkit-transform: translateX(0%);
-moz-transform: translateX(0%);
-ms-transform: translateX(0%);
-o-transform: translateX(0%);
transform: translateX(0%);
}

Remember to enable "CSS override" in template settings - advanced section.
User avatar
Moderator

GK User
Thu Jul 24, 2014 4:41 am
Okay, thank you for your help up to this point... most things are working correctly.

The only problem we are having now is that the menu is cut off on the right part of our screen and is not visible (please note we are using a macbook pro... a little smaller screen).

Image

Is there anything we can do to make the entire menu visible?



Cyberek wrote:Please edit: /templates/gk_events/css/override.css and add at its end:
Code: Select all
#gkHeaderNav.static {
top: 0px;
height: 73px;
}
#gkHeaderNav.static #gkLogoSmall {
left: -15px;
margin-left: 0;
position: relative;
top: 0;
}
#gkHeaderNav.static #gkMainMenu {
right: 0;
float: right;
top: 0px;
-webkit-transform: translateX(0%);
-moz-transform: translateX(0%);
-ms-transform: translateX(0%);
-o-transform: translateX(0%);
transform: translateX(0%);
}

Remember to enable "CSS override" in template settings - advanced section.
User avatar
Senior Boarder

GK User
Thu Jul 24, 2014 3:39 pm
Code: Select all
#gkHeaderNav.static {
top: 0px;
height: 73px;
}
#gkHeaderNav.static #gkLogoSmall {
left: -15px;
margin-left: 0;
position: relative;
top: 0;
}
#gkHeaderNav.static #gkMainMenu {
right: 0;
left: auto;
float: right;
top: 0px;
-webkit-transform: translateX(0%);
-moz-transform: translateX(0%);
-ms-transform: translateX(0%);
-o-transform: translateX(0%);
transform: translateX(0%);
}
User avatar
Moderator

GK User
Thu Jul 24, 2014 4:31 pm
This has not resolved the issue. The menu is still being cut off on the right side of the page on smaller screens.

Cyberek wrote:
Code: Select all
#gkHeaderNav.static {
top: 0px;
height: 73px;
}
#gkHeaderNav.static #gkLogoSmall {
left: -15px;
margin-left: 0;
position: relative;
top: 0;
}
#gkHeaderNav.static #gkMainMenu {
right: 0;
left: auto;
float: right;
top: 0px;
-webkit-transform: translateX(0%);
-moz-transform: translateX(0%);
-ms-transform: translateX(0%);
-o-transform: translateX(0%);
transform: translateX(0%);
}
User avatar
Senior Boarder

GK User
Thu Jul 24, 2014 5:41 pm
Please clear your browser cache.
User avatar
Moderator

GK User
Thu Jul 24, 2014 5:46 pm
We have tried that...

It seems as though when you resize the browser window to anything smaller than the maximum the menu does not adjust within the browser and starts cutting off the info on right side of the menu.

Image

Cyberek wrote:Please clear your browser cache.
User avatar
Senior Boarder

GK User
Fri Jul 25, 2014 4:10 pm
What Browser (type and version) do you use? What OS?
User avatar
Moderator

GK User
Fri Jul 25, 2014 4:17 pm
Mac OS X 10.9
Chrome Version 36.0.1985.125

Cyberek wrote:What Browser (type and version) do you use? What OS?
User avatar
Senior Boarder

GK User
Fri Jul 25, 2014 4:25 pm
Please try Chrome in incognito mode - it works like a charm - same os, same browser, bigger screen, but I have tested reducing screen size down even to mobile version.
User avatar
Moderator


cron