This lean and updated variant of #4777 follows the rules laid out in #5328 that 
were implemented in #5362.
Since the editing of the user preference happens on a different view/site, 
there is no need to listen to color scheme changes on the fly and the whole 
logic can happen in the initialization of `L.OSM.TileLayer`.
|Before|After|
|-|-|
|![image](https://github.com/user-attachments/assets/1cf69912-61df-43e0-98f4-8b618b4b2e0e)|![image](https://github.com/user-attachments/assets/39c96953-2135-49a0-96f3-563da18ae011)|

Additionally, a "dark" CSS class is introduced to allow better style 
targeting if the user wants to.
for example like this:
![image](https://github.com/user-attachments/assets/d90080f6-5265-41fa-8845-f4aeaa5e4a14)
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5396

-- Commit Summary --

  * Add an OSM.isDarkMap() function
  * Use schemed map properties in L.OSM.TileLayer initialization
  * Add dark Transport map url
  * Use the schemed map urls
  * Set normal tile display as standard
  * Let the main map pass its filters to the keys

-- File Changes --

    M app/assets/javascripts/osm.js.erb (8)
    M app/assets/stylesheets/common.scss (2)
    M vendor/assets/leaflet/leaflet.osm.js (14)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5396.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5396.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5396
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to