qubeshub / hubzero-cms

HubZero CMS code base for QUBESHub.
https://qubeshub.org
GNU General Public License v2.0
0 stars 1 forks source link

Hide Terms of Use item in the secondary menu #195

Closed mdlama closed 5 years ago

mdlama commented 5 years ago

The Terms of Use menu item in the secondary menu has a specified "hidden" class added to it. This adds the hidden class to the <a> element but NOT the parent <li> element. If I use "display: none" for the <a> hidden element, then there is too much space between "News & Activities" and "Help". I would like to either: (1) style the <li> parent element to have negative margin to remove this extra space, or (probably better) (2) style the previous <li> element to have NO right margin.

My thinking is to add a little JS to the hub.js file in the template. Another option would be to override the menu module to better handle the allowance of hidden menu items. I would prefer to go with the JS workaround for now.

mdlama commented 5 years ago

Another option would be to add a tertiary menu for the footer.

trisketz commented 5 years ago

@mdlama How are you adding the 'hidden' class to the a element? Is this a setting in the admin that isn't set yet?

mdlama commented 5 years ago

Yes, that is an admin setting for the top-level Terms of Use menu item in the Secondary Menu (see pic below). If you put the word "hidden" in the highlighted area in the picture it will add that class to the <a> element, but NOT the parent <li> element. Screen Shot 2019-04-26 at 4 28 08 PM

trisketz commented 5 years ago

Pull request: https://github.com/qubeshub/hubzero-cms/pull/197

This will find the last visible menu item parent and remove the margin of the previous sibling.

I've tested this using 3 additional menu items (for a total of 5 menu items) while randomizing which ones had a class of 'hidden.'