Options

Navbar Tweak... Hopefully

LemansLemans Registered Users Posts: 53 Big grins
edited August 24, 2013 in SmugMug Customization
Link - www.lemansstudios.com

Hi again!

One last tweak for me pretty please... I would like for the active page to remain as the hover color when someone is there. If they are on, say, the profile page , I would like for "profile" in the navbar to stay green, and so forth. I had this going in legacy and love it. It's the one tweak I am really missing. There is an awesome thread on navbar tweaks, but I was unable to get any of it to play nice for me.
Operator error more than likely... :/

In any case, I'm hoping for a fix for this, and any replies are greatly appreciated in advance!

Thanks so much! Lee
Leman's Studios

Comments

  • Options
    snakeey11snakeey11 Registered Users Posts: 88 SmugMug Employee
    edited August 9, 2013
    There is a class applied to the item in the menu that corresponds to the current page, so you should be able to add some CSS like the following:
    .sm-page-widget-nav-activepage > a {
      color: #14ee52;
    }
    

    -Mike
    SmugMug Sorcerer
    (and an avid landscape photographer - view my website)
  • Options
    aschendelaschendel Registered Users Posts: 283 Major grins
    edited August 10, 2013
    Great tip, was able to clean up some of my tweaks thanks to this.

    I did notice one of my custom pages isn't working the same as the others (it's not having the activepage class added to it), my "Browse Photos" page. I wonder if I've somehow misconfigured it or if it's somehow conflicting with the built-in /browse page...

    http://aschendel.smugmug.com/Browse-Photos

    Andy
  • Options
    LemansLemans Registered Users Posts: 53 Big grins
    edited August 10, 2013
    Awesome! Thanks so much! The help and support here is always above and beyond! I appreciate it more than I can say. :)
    Leman's Studios
  • Options
    snakeey11snakeey11 Registered Users Posts: 88 SmugMug Employee
    edited August 10, 2013
    aschendel wrote: »
    Great tip, was able to clean up some of my tweaks thanks to this.

    I did notice one of my custom pages isn't working the same as the others (it's not having the activepage class added to it), my "Browse Photos" page. I wonder if I've somehow misconfigured it or if it's somehow conflicting with the built-in /browse page...

    http://aschendel.smugmug.com/Browse-Photos

    Andy

    This could be a bug. I'll take a look as soon as I get the chance.

    -Mike
    SmugMug Sorcerer
    (and an avid landscape photographer - view my website)
  • Options
    southeasternphotographysoutheasternphotography Registered Users Posts: 647 Major grins
    edited August 18, 2013
    Didn't the Custom page button say something like if you turn a page into Custom, it will no longer grab attributes from changes to your "normal" pages? Oh here it is:
  • Options
    LemansLemans Registered Users Posts: 53 Big grins
    edited August 19, 2013
    Mike, I am seeing the same issue as Andy. When I am inside an image gallery viewing images, the active page no longer shows active... :/ To my knowledge, I have this as a site wide setting and am not using that as a custom page. I might have something set wrong, usually the case.... :/
    Leman's Studios
  • Options
    snakeey11snakeey11 Registered Users Posts: 88 SmugMug Employee
    edited August 19, 2013
    Lemans wrote: »
    Mike, I am seeing the same issue as Andy. When I am inside an image gallery viewing images, the active page no longer shows active... :/ To my knowledge, I have this as a site wide setting and am not using that as a custom page. I might have something set wrong, usually the case.... :/

    Thanks, I'm going to take a look at this today.
    SmugMug Sorcerer
    (and an avid landscape photographer - view my website)
  • Options
    snakeey11snakeey11 Registered Users Posts: 88 SmugMug Employee
    edited August 19, 2013
    aschendel wrote: »
    Great tip, was able to clean up some of my tweaks thanks to this.

    I did notice one of my custom pages isn't working the same as the others (it's not having the activepage class added to it), my "Browse Photos" page. I wonder if I've somehow misconfigured it or if it's somehow conflicting with the built-in /browse page...

    http://aschendel.smugmug.com/Browse-Photos

    Andy

    Andy, looks like your issue is being caused by the fact that the item in your menu that points to the "Browse Photos" page was a manual link you created (meaning you manually entered the URL). In order for the active page class to be added to the menu item, it needs to be created using the "Page I Choose" option so I can associate the SmugMug page with the link.
    SmugMug Sorcerer
    (and an avid landscape photographer - view my website)
  • Options
    aschendelaschendel Registered Users Posts: 283 Major grins
    edited August 19, 2013
    snakeey11 wrote: »
    Andy, looks like your issue is being caused by the fact that the item in your menu that points to the "Browse Photos" page was a manual link you created (meaning you manually entered the URL). In order for the active page class to be added to the menu item, it needs to be created using the "Page I Choose" option so I can associate the SmugMug page with the link.

    Fantastic! Not sure why I did it that way, the last couple of weeks have been a blur as far as smugmug goes, but thank you for tracking that down! I switched it with no obvious ill-effects and the "active" class started being applied.

    Andy
  • Options
    pmbpropmbpro Registered Users Posts: 236 Major grins
    edited August 20, 2013
    Neat tip! Thanks! I used to have this on my Legacy site also.

    However, it doesn't seem to work for me on my page now though. Anyone have any idea why? I used "Page I choose" to create my links. headscratch.gif
    pmb images
    Film/TV Stills Photography
    "When your work speaks for itself, don't interrupt." ~ Henry J. Kaiser
  • Options
    DanCarl97DanCarl97 Registered Users Posts: 139 Major grins
    edited August 20, 2013
    Thanks for sharing. I've used your code and changed it a little to suit on my site - I don't know if it suits it or not really.

    I've had no problems with it not showing up though.
  • Options
    snakeey11snakeey11 Registered Users Posts: 88 SmugMug Employee
    edited August 20, 2013
    pmbpro wrote: »
    Neat tip! Thanks! I used to have this on my Legacy site also.

    However, it doesn't seem to work for me on my page now though. Anyone have any idea why? I used "Page I choose" to create my links. headscratch.gif

    Hi Paula, could you be more specific as to what issue you are having? I took a look at your site and it seems that the class is being applied properly.

    Thanks
    -Mike
    SmugMug Sorcerer
    (and an avid landscape photographer - view my website)
  • Options
    leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited August 24, 2013
    I'm also having issues getting it to work. I haven't unveiled my site so I can't really show an example but here's some details:

    I added the code to my theme and set the color of the active page to be white. The active page in the menu bar stays the default color.

    I then added "font-size: 20px;" to the CSS and wallah, the link in my menu bar that's active grows to 20px! If I set the a:hover attributes for the active page I can also control the size of the a:hover text.

    Nothing I do, though, will change the "color". I tried to see if I have some CSS that is setting the color of the menubar but I can't figure out where that is.

    In my menu-bar settings I have the text color set to "Default".

    My menu-bar has a grey default color and goes white on hover. I can't figure out what even set it to hover white.

    Any tips?
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • Options
    leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited August 24, 2013
    Fixed my own issue. I just needed to add !important after the color:
    /* Make the menu nav bar text for the active page a different color */
    .sm-page-widget-nav-activepage > a {
      color: #FFFFFF!important;
    }
    
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
Sign In or Register to comment.