[openstreetmap/openstreetmap-website] Control menu visibility with javascript instead of css class (PR #4365)
Anton Khorev
notifications at github.com
Thu Nov 23 16:43:14 UTC 2023
This is temporary if [Bootstrap navbar](https://getbootstrap.com/docs/5.3/components/navbar/) is going to be used. Before that I plan to get rid of `compact-nav` mode.
Also restores menu hiding when history button is clicked on narrow screens. It existed since at least https://github.com/openstreetmap/openstreetmap-website/commit/3f26761a26f1ebd8746db166be2d30fd9b7ff7d6 when primary navigation had a [list](https://github.com/openstreetmap/openstreetmap-website/blob/3f26761a26f1ebd8746db166be2d30fd9b7ff7d6/app/views/layouts/_header.html.erb#L10). That list was later changed to a div and the selector for the click handler stopped working.
And menu button is now a `<button>` instead of `<a href="#">`.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4365
-- Commit Summary --
* Hide menu in small mode when history button is clicked
* Remove css class controlling menu visibility on narrow screens
* Change menu button element to <button>
-- File Changes --
M app/assets/javascripts/application.js (32)
M app/assets/stylesheets/common.scss (4)
M app/views/layouts/_header.html.erb (4)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4365.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4365.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4365
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4365 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231123/473004c1/attachment.htm>
More information about the rails-dev
mailing list