<p>This PR adds support for rotating OSM event banners in the sidebar</p>
<ul>
<li>Dismissing the banner will set a cookie so it won't be shown again.</li>
<li>Cookie tracks how recently the banner was shown, so they will rotate if multiple are active</li>
<li>Banners are enabled in <code>_banner.html.erb</code> </li>
<li>Images go in <code>app/assets/images/banners/</code>
</li>
<li>This PR also adds banners for SOTM-US 2016 in Seattle and SOTM 2016 in Brussels</li>
</ul>
<div class="highlight highlight-text-html-erb"><pre><span class="pl-pse"><%</span><span class="pl-s1"> active_banners <span class="pl-k">=</span> {</span>
<span class="pl-s1"> <span class="pl-c1">:sotmus2016</span> => {</span>
<span class="pl-s1"> <span class="pl-c1">:alt</span> => <span class="pl-s"><span class="pl-pds">'</span>State of the Map US 2016<span class="pl-pds">'</span></span>,</span>
<span class="pl-s1"> <span class="pl-c1">:link</span> => <span class="pl-s"><span class="pl-pds">'</span>http://stateofthemap.us/<span class="pl-pds">'</span></span>,</span>
<span class="pl-s1"> <span class="pl-c1">:img</span> => <span class="pl-s"><span class="pl-pds">'</span>banners/sotmus-2016.jpg<span class="pl-pds">'</span></span></span>
<span class="pl-s1"> },</span>
<span class="pl-s1"> <span class="pl-c1">:sotm2016</span> => {</span>
<span class="pl-s1"> <span class="pl-c1">:alt</span> => <span class="pl-s"><span class="pl-pds">'</span>State of the Map 2016<span class="pl-pds">'</span></span>,</span>
<span class="pl-s1"> <span class="pl-c1">:link</span> => <span class="pl-s"><span class="pl-pds">'</span>http://2016.stateofthemap.org/<span class="pl-pds">'</span></span>,</span>
<span class="pl-s1"> <span class="pl-c1">:img</span> => <span class="pl-s"><span class="pl-pds">'</span>banners/sotm-2016.jpg<span class="pl-pds">'</span></span></span>
<span class="pl-s1"> }</span>
<span class="pl-s1">}</span></pre></div>
<p>cc <a href="https://github.com/lxbarth" class="user-mention">@lxbarth</a> <a href="https://github.com/tatsvc" class="user-mention">@tatsvc</a> <a href="https://github.com/cliffordsnow" class="user-mention">@cliffordsnow</a> <a href="https://github.com/iandees" class="user-mention">@iandees</a> </p>
<p>pretty picture:</p>
<p><a href="https://cloud.githubusercontent.com/assets/38784/16212087/7bb2f446-3713-11e6-9e98-460de10a6a69.png" target="_blank"><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" style="max-width:100%;"></a></p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/1240'>https://github.com/openstreetmap/openstreetmap-website/pull/1240</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Add support for rotating banners, add banners for SOTM, SOTMUS</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1240/files#diff-0">app/assets/images/banners/.keep</a>
(0)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1240/files#diff-1">app/assets/images/banners/sotm-2016.jpg</a>
(0)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1240/files#diff-2">app/assets/images/banners/sotmus-2016.jpg</a>
(0)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1240/files#diff-3">app/assets/javascripts/index.js</a>
(18)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1240/files#diff-4">app/assets/stylesheets/common.scss</a>
(44)
</li>
<li>
<strong>A</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1240/files#diff-5">app/views/layouts/_banner.html.erb</a>
(41)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/1240/files#diff-6">app/views/layouts/map.html.erb</a>
(7)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1240.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/1240.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1240.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/1240.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1240">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/ABWnLfiWrXCVtxT2YGEpRkUhRSAUST45ks5qNxIxgaJpZM4I6MD6">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLeuvvsouqwKuATsArpVdGS7F16Ioks5qNxIxgaJpZM4I6MD6.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/pull/1240"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>