thexerteproject / xerteonlinetoolkits

Xerte Online Toolkits
www.xerte.org.uk
Apache License 2.0
62 stars 61 forks source link

Hide page menu bar in Bootstrap project when only one page #1209

Closed FayCross closed 7 months ago

FayCross commented 1 year ago

The XOT template hides the navigation buttons when there is only one page in the project. We should also do this in the Bootstrap project (hide page menu bar at top). Possibly also hide the section menu when there is only one section

ronm123 commented 1 year ago

@FayCross I know you've made commits but I'm not sure about doing this automatically without author control. There are already optional properties to hide the section menu and page navigation and doing this automatically kind of removes that author control. I know it's slightly different and that as soon as there is more than one section or page the menu and navigation will appear but what about authoring workflow where the plan is to add more pages or sections (but not yet added) so it's desirable to see the navbar and menu? Or have you included override options?

FayCross commented 1 year ago

@ronm123 I don't mind undoing the section one and leaving it for people to hide via the optional property - I was unsure about this one as I couldn't decide whether the content should auto fill width too and I wondered whether changing between pages where the section menu is shown on some but not others looked odd.

I do think the page menu should be hidden if just one page though. I'm not sure what benefit not hiding it automatically would have - it'll just appear automatically when another page is added and I can't think of any circumstances where people would want it to be shown when it's only got one link on. If you disagree then I'll add to list to discuss at dev meeting (Tom gets deciding vote?!)

ronm123 commented 1 year ago

@FayCross I think part of the problem is that both are an enforced change with no author control and so automatically change the look of existing projects. I think it also depends on the theme in use too where in some cases it's desirable to have the navbar showing because it's part of the brand and styling. Especially where by default the nav bar is set to below the header. Try that on a new empty bootstrap project even just using the default theme. The page looks very different with and without the black navbar. I'm certainly aware of themes/designs where it would be desirable to keep the navbar even when there is only a single page to retain consistency of the design etc. As I say it's the enforced change without author control that I don't think is correct especially as it's a change from what has been. I wonder if @torinfo has themes in use where this would also be undesirable?

FayCross commented 7 months ago

@ronm123 @torinfo I've undone most of these changes I made sometime ago to remove page menu/section menu when they only contain a single link (we discussed these a while ago and I agreed to undo but hadn't got around to it until today)