Loading...
 
(Cached)

Tiki project sites navbar improvement

Notes and suggestions can go here.

luci wrote:
It doesn’t look quite well to me:

luci

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? chibaguy
  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. chibaguy
  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. - chibaguy

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 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 mode=popup
remember=y
nobox=y
style=margin-right:-15px;margin-left:-15px
topclass=col-md-3 hidden-xs hidden-sm
quickadmin 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 col-xs-6
col-sm-5
Tiki_sites_dropdown col-xs-6
col-sm-5
login 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:

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

Another modification

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

.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.

Switch Theme

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

Shoutbox

luci, 14:22 GMT, : @Bsfez: :-D
Bsfez, 09:52 GMT, : This is really a nice Tiki !
chibaguy, 10:32 GMT, : Site admins: Be careful about editing the topbar menu, which is in a small space. I had to fix an option that should be a menuSection, to prevent overflow.
Torsten, 19:44 GMT, : hidden functionality "; recommitted in trunk, tested and working. Documentation under way on [Link]
chibaguy, 16:45 GMT, : The layout template can now be changed using the "Layout" module above. :-)