spaceconcordia / spaceconcordia.github.io

Contains the static website for the Space Concordia society
6 stars 5 forks source link

Revive team pages 10 #11

Closed PeterGhimself closed 7 years ago

PeterGhimself commented 7 years ago

This PR resolves #10, which didn't mention that Contact Us page navbar-dropdown/link was also kaput. Now navbar dropdown menu labels (actually li elements) behave as links as well, swell!

The problem (general)

It seems that if you have nested lists and if the parent li is behaving as a drop down menu, they cannot behave both as a drop down menu and as a link (at least to the extend of my knowledge atm).

The solution (approach)

To avoid having to manually add new classes in 21 html files, expandableLinks.js adds specific classes to those parent lis, get's the ones we want (4/5 of them) all 5 of them and then binds click event listeners to them. The handler functions for these click events simply navigate the current page over to the appropriate page by the power of window.location.href.

I left the href attributes with their values in the a tags there because I hope that if there is a cleaner solution maybe someone else can implement it (and still see what was broken). Also there's 21*4 instances I'd have to manually delete them... thanks but no thanks :)

alienorlgrst commented 7 years ago

The 'about us' should also redirect to index.html

PeterGhimself commented 7 years ago

@alienorlgrst fixed, thanks