Thread Locked This thread is locked - replies are not allowed.


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 5 - Pages: 1 - Last Post: 6 Sep 23, 22:10 Last Post By: mkrans
mkrans

Posts: 4
Registered: 22-Jul-2009
Top navigation menu centered on pages, left-aligned on galleries
Posted: 31 Aug 23, 12:46
 
Hi,

I use a combination of both pages and image galleries with the Tiger Skin. However, when I render the entire album, the alignment in the top menu isn't consistent. When I open the album in my browser and open a page (for instance, "About"), then the menu is centered. When I navigate to one of my gallery pages, the top menu is aligned left.

I've tried to check if I can fix this through one of the settings, but it seems like there isn't a setting for this. I'd like the menu to be consistent throughout my entire website. Any suggestions? :)

From what I can see with Inspect Elements, on non-gallery pages, the following CSS is used:

.top-bar .left-column:last-child .topnavigation {
justify-content: center;
}

If I replace this with justify-content: left; then it seems to work the same way as with gallery-pages. But I don't want to edit this manually in common.css every time I generate my website :)

Edited by: mkrans on 31 Aug 2023, 12:47
RobM

Posts: 3,983
Registered: 4-Aug-2006
Re: Top navigation menu centered on pages, left-aligned on galleries
Posted: 31 Aug 23, 13:05   in response to: mkrans in response to: mkrans
 
If that code works just add it to the custom css panel.
mkrans

Posts: 4
Registered: 22-Jul-2009
Re: Top navigation menu centered on pages, left-aligned on galleries
Posted: 5 Sep 23, 21:58   in response to: RobM in response to: RobM
 
Yeah, that's what I have done, but I just think it's a bit odd that the skin doesn't have "one setting to rule them all" out of the box. I'd expect it to be the same on all pages, regardless if it's a text page or a gallery page :)
RobM

Posts: 3,983
Registered: 4-Aug-2006
Re: Top navigation menu centered on pages, left-aligned on galleries
Posted: 5 Sep 23, 23:36   in response to: mkrans in response to: mkrans
 
It might be possible but without a link to the album no one will be able to offer further advice.
Laza

Posts: 1,511
Registered: 6-Sep-2005
Re: Top navigation menu centered on pages, left-aligned on galleries
Posted: 6 Sep 23, 10:03   in response to: mkrans in response to: mkrans
Helpful
This behavior is intentional. For albums that have no function buttons on the right, the menu is centered, for those that have buttons, the menu is on the left. I didn't think over the effect on albums in which the buttons appear only on the index pages, and you are right, this looks odd. I will try to figure out how this looks the best.
mkrans

Posts: 4
Registered: 22-Jul-2009
Re: Top navigation menu centered on pages, left-aligned on galleries
Posted: 6 Sep 23, 22:10   in response to: Laza in response to: Laza
 
Ah, check, I get what you're saying. But for non-index pages, the search box (basically the only function button that can be on the right, I believe) will never be shown anyway, so for the non-index pages, the menu is now always going to be centered, whereas for regular index-pages, it depends on whether the user has checked the "Use search" setting or not.

I think that the best solution would be to add a specific setting, "Navigation menu alignment" or something like that, where the user could choose between "left" and "centered" (maybe even "right"), and then both index-pages and non-index-pages would use that setting for a consistent look & feel.

For me personally, right now I simply added the custom CSS, and since I also wanted the search box to appear on non-index pages, I edited top-bar.inc and changed

hasTopBarRight = (_useSearch && !moveSearchToHero) && pageType !== 'page' || backgroundAudio;

into

hasTopBarRight = (_useSearch && !moveSearchToHero) || backgroundAudio;

I know, it's a dirty hack, but it does the job for me ;-) I noticed that if you then use the search box on a non-index-page, the search results are shown above the actual content of the page, and the content is pushed down. So I totally get why the search box isn't shown on non-index-pages. But for me, I really like a consistent navigation menu across all pages; shifting menus and dis-/reappearing icons / search boxes while a user is navigating across the site is usually a UX "no-no" according to my UX colleagues ;-)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums