Loading...
 
(Cached)

Tiki project sites navbar improvement

Notes and suggestions can go here.

luciash d' being ?‍♂️ wrote:
It doesn't look quite well to me:

Yeah, the site titles are kind of long, so cause problems, for one thing.

Suggestions by luci

  1. Make the site title and icon link to home page again - Don't they now?
  2. On small screen hide the site titles and show only the icon - I added CSS to clip the text overflow, with ellipsis, figuring getting most of the title is better than none.
  3. On small screen expand the menu items to full width nicely with height a bit larger for easy touch with solid background on hover
  4. On small screen align the collapse arrows to right
  5. On small screen make the menu expand (cover) the whole viewport (100vw, 100vh and position: fixed or absolute with very high z-index) so it looks more like an app menu
  6. On small screen use off-canvas for the main menu?
  7. On small screen show the search icon only and on touch expand and reveal the search input full width


- These are good ideas. The changes I made were just module configuration adjustments and a little custom CSS that probably should be added to the stylesheets. If more elaborate changes/improvements are needed to get a good, responsive navbar, then probably Tiki's code should be improved so the fixing doesn't have to be done as customization after the install. For example, maybe there could be an option for off-canvas slide-in menu, in admin-menus or admin-modules. -

Steps taken by Gary

These are steps taken to try to improve the appearance and usability, The logo module was removed. This module works fine in large screen sizes, but not in the small view, if you want the logo to be seen and be clickable to the home page.

When one of the fixed navbar layout templates is used, there's no need to assign the logo module now if there's a menu in the top module zone - the site icon is displayed if it is specified in the menu's module assignment. This way the small-device view gets the site icon/logo, which didn't happen before when assigning the logo module. Earlier, just the "Fixed top navbar 2" layout template had the link to the site icon/title hard-coded, but in a recent commit it was added to the "Fixed top navbar 1" layout template as well.

When other layout templates (Basic Bootstrap, Classic Tiki, etc.), the logo module can be used in larger screen sizes, but should be hidden in small sizes; the site icon takes its place (assuming the top module zone contains a menu that has the site icon assigned as a parameter).

Unassigning the logo module also fixed the positioning of other items in the module zones that were pushed out of place due to things being too crowded.

Top module zone assignments at this site:

Name Order Parameters
menu 1 id=48%%%navbar_toggle=y
nobox=y
topclass=hidden-lg hidden-md
Tiki_sites_dropdown 2 nobox=y
topclass=col-sm-6 hidden-xs hidden-sm*
login_box 3 mode=popup
remember=y
nobox=y
style=margin-right:-15px;margin-left:-15px
topclass=col-md-3 hidden-xs hidden-sm
quickadmin 4 nobox=y
topclass=col-sm-3 pull-right

*The login form is hidden in small views, and a second login module is assigned to the pagetop module zone and made visible in small views only.

At other Tiki project sites, modules have these assignments:

Name Order Parameters
quickadmin 1 col-xs-6%%%col-sm-5
Tiki_sites_dropdown 2 col-xs-6%%%col-sm-5
login 3 hidden-xs&&&col-sm-2


A custom CSS rule is added to fix quickadmin dropdown not being visible in small screens. Bootstrap normally uses overflow-y: auto, but this doesn't seem to be sufficient here for some reason:

Copy to clipboard
.navbar-collapse.in { overflow-y: visible; }

Another modification

I added these custom rules at themes.t.o on January 29, 2017:

Copy to clipboard
.top_modules { float: left; } #module_78 .nav { background: #f8e286a !important; } /* project site dropdown background - themes.t.o only */


The main problem was that the site icon and title were "covered" by the top_modules div. Assigning "display: flex" to this div prevented the overlap and also kept the modules content fairly nicely arranged. The display:flex rule was added at the doc, dev, and community sites also. But then there was feedback that things were broken forthe Safari browser. So "display:flex" was replaced by "float: left;" and the grid divs inside the module zone were widened to keep the content from getting compressed.


Page last modified on Sunday 29 of January, 2017 09:27:37 GMT-0000

Layout

Subscribe to Tiki Newsletters!

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other big news!
Contribute to Tiki

Site Config