[openstreetmap/openstreetmap-website] Add support for rotating banners, add banners for SOTM, SOTMUS (#1240)
Bryan Housel
notifications at github.com
Mon Jun 20 22:20:33 UTC 2016
This PR adds support for rotating OSM event banners in the sidebar
* Dismissing the banner will set a cookie so it won't be shown again.
* Cookie tracks how recently the banner was shown, so they will rotate if multiple are active
* Banners are enabled in `_banner.html.erb`
* Images go in `app/assets/images/banners/`
* This PR also adds banners for SOTM-US 2016 in Seattle and SOTM 2016 in Brussels
```erb
<% active_banners = {
:sotmus2016 => {
:alt => 'State of the Map US 2016',
:link => 'http://stateofthemap.us/',
:img => 'banners/sotmus-2016.jpg'
},
:sotm2016 => {
:alt => 'State of the Map 2016',
:link => 'http://2016.stateofthemap.org/',
:img => 'banners/sotm-2016.jpg'
}
}
```
cc @lxbarth @tatsvc @cliffordsnow @iandees
pretty picture:
<img width="1099" alt="screenshot 2016-06-20 18 18 45" src="https://cloud.githubusercontent.com/assets/38784/16212087/7bb2f446-3713-11e6-9e98-460de10a6a69.png">
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/1240
-- Commit Summary --
* Add support for rotating banners, add banners for SOTM, SOTMUS
-- File Changes --
A app/assets/images/banners/.keep (0)
A app/assets/images/banners/sotm-2016.jpg (0)
A app/assets/images/banners/sotmus-2016.jpg (0)
M app/assets/javascripts/index.js (18)
M app/assets/stylesheets/common.scss (44)
A app/views/layouts/_banner.html.erb (41)
M app/views/layouts/map.html.erb (7)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/1240.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1240.diff
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1240
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160620/bc2123f9/attachment.html>
More information about the rails-dev
mailing list