Skip to content

Instantly share code, notes, and snippets.

@cassioeskelsen
Forked from tristen/snippet.html
Created April 16, 2012 19:38
Show Gist options
  • Save cassioeskelsen/2400998 to your computer and use it in GitHub Desktop.
Save cassioeskelsen/2400998 to your computer and use it in GitHub Desktop.
<div id="wax-legend-census">
<a href="http://www.npr.org"><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAABICAYAAABMb8iNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABEWSURBVHic7Z15mFTVlcB/txtosGnRccEgKCCbsqhpRtAoYiaKTtoYdcBMoubDITioE3WCM9Fx1Ig6CaMBiUTFBUREJkxI7OAygwuYBAYRkSjKIgqIEBoXGrqhF7ru/HFuUbdevep+1RZ5BZz7fe+r3zt13nmnblWd767nAfSx1mKtRVlZWbmgOXYHlJWVlSNy7A4oKysrR+XYHVBWVlaOzLE7oKysrByRY3dAWVlZOSrH7oCysrJyZI7dAWVlZeWIHLsDysrKylE5dgeUlZWVI3PsDigrKytH5NgdUFZWVo7KsTugrKysHJljd0BZWVk5IueifA0w2R2PAsXAaOAlYC7w92HXAhXATGAB8DDwY6DYvffXns2ngJ5OPhR4xB0Pezav9PQnefIRwHigEpgD/BA4ulAqWVlZOT8cWRm4E7Du2AX81jtPHrd5+u2BZ0N0LPAaMMTpbvLkN7lrrwnod3fyZzzZk4ABns9yjz3ANwqhkpWVlfPEUZVJD1jZjhrgZKd/X+C9LYHzmU7PD0KvOtlvArr3OPmfPdklSIsreZ4AXgdq3flGJGjGX8nKysp54VyUp5AeRF4AfgB8FJCfhHTH9nqyW52NYZ6sCfgbpDuXlFUDHYHdAZsvAwO9893AqcC1nmwj0pUcBHwLOK9QKllZWTk/HFmZ9BZWE3Cck48mPbicBlztnTcAtyFjV/cDn3rvXQq0I9UqssDUgL2kjV945684v4aG6K4BbgBOK5RKVlZWzhNHVSY9YO3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R8yb6xJ+uHUP817fLi7W7M3Jn6j11touYcKTZyxhdfINIX71QmYTD3fnFcaYu5DHvfuBr9bZGY7MEE5EEv41IRlHuzu9vsDngXsku4TvkApYo5ElFouQQNfHGPMdZFlF/D9a5UOXs3UJ31shR1ip+gTuuyn8PVda6hImEgmmTJnClClTmrUTLM11CVesq2HFuppsb7dYotRba2cJs8qRp0CHybs4+VuerCMyEH5xmH1kScMYZFHo80iere6e2k6yzxJeT6pZXIpkMV0I/C0SOBcDJupnV1beH1xIs4Rxlqj11tpZwiJP/pXAvT90r90D8mTX7XFSyxOS5W3kIRfJUooM5n+K5IwvQoKMn0n0eWvtMyGfvbO1dq3z70Zge4hOAnkazppC+NEqH7pcKLOEUcuBNEv4a6T7dRTyOK2kfAHSejkK6TbWOPmbAflqZ/MZY8wq4GbkAROvI5lK+wMnOf0l1tp6Y8xEZOD9UmT8qtTd+0/W2mnus55IKgf8Ucgj4JP+P2aMeQ5pqZ2AtKjWAv9lrV1dKD9a5UOY/8KzhLt376a6upq6utZN9sU9Sxj5IRTKysr55//o2v78W49r9zTAXktxG0NTPviWzfVLJ1c1DEYWbieXsH9pHvjd361qW3rsIGOKmwCsbSrOBy+fNnhYlHormLxAysrKyi1x7A4oKysrR+bYHVBWVlaOyLE7oKysrByVY3dAWVlZOTLH7oCysrJyRI7dAWVlZeWoHLsDysrKypE5dgeUlZWVI3LsDigrKytH5f8HxNaKb/VukisAAAAASUVORK5CYII=' /></a>
<a class='show-embed' href="javascript:void(0)" onclick="showLegend();"> &#x2630; show legend</a>
<a href='http://npr.org/censusmap' class='gotosite'>visit npr.org/censusmap</a>
</div>
<div id="wax-legend-content" style="display:none;">
<a href="javascript:void(0)" onclick="removeLegend();" id='closebutton'>&#x2716;</a>
<script type="text/javascript">
window.onload = function() {
if (location.host === 'www.npr.org') {
document.getElementById('wax-legend-census').style.display='none';
document.getElementById('closebutton').style.display='none';
document.getElementById('wax-legend-content').style.display='block';
}
}
function showLegend(){
if (location.host != 'www.npr.org') {
document.getElementById('wax-legend-content').style.display='block';
document.getElementById('wax-legend-census').style.display='none';
}
}
function removeLegend(){
if (location.host != 'www.npr.org') {
document.getElementById('wax-legend-content').style.display='none';
document.getElementById('wax-legend-census').style.display='block';
}
}
</script>
<div class="census-legend">
<div class="census-title">Percent Population Change (2000-2010)</div>
<div class="census-scale">
<ul class="census-labels">
<li><span style="background:#935E9C;"></span><-20%</li>
<li><span style="background:#B9A1C7;"></span>-20%</li>
<li><span style="background:#E2D4E2;"></span>-10%</li>
<li><span style="background:#ECECEC;"></span>+10%</li>
<li><span style="background:#D7E7D3;"></span>+20%</li>
<li><span style="background:#98C595;"></span>+30%</li>
<li><span style="background:#519265;"></span>>+30%</li>
</ul>
</div>
<div class='census-source'>
Source
<a href='http://www.census.gov'>U.S. Census Bureau</a>,
<a href='http://www.ire.org/census/'>IRE</a>
</div>
<a href='http://npr.org/censusmap' class='gotosite'>visit npr.org/censusmap</a>
</div>
<style type="text/css">
.wax-legend {
font: normal 13px/20px Arial,sans-serif;
border: 1px solid #b3b3b3;
background: #fff;
overflow:hidden!important;
max-width: 280px!important;
height: 90px!important;
padding: 4px 9px;
position: relative;
}
#wax-legend-content a,
#wax-legend-census a {
text-decoration: none;
}
#wax-legend-census img {
margin: -4px -9px;
}
#wax-legend-census .show-embed {
display: block;
margin-top: 5px;
color: #7F8A8C;
height: 18px;
line-height: 18px;
}
.wax-legend .census-title {
text-align: left;
margin-bottom: 4px;
font-weight: bold;
font-size: 11px;
}
.wax-legend .census-scale ul {
margin: 0;
padding: 0;
float: left;
list-style: none;
}
.wax-legend .census-scale ul li {
display: block;
float: left;
width: 40px;
margin-bottom: 5px;
text-align: center;
font-size: 10px;
list-style: none;
}
.wax-legend ul.census-labels li span {
height: 12px;
width: 40px;
}
.wax-legend ul li span {
display: block;
float: left;
}
.wax-legend .census-source {
font-size: 8px;
clear: both;
text-transform: uppercase;
color: #b3b3b3;
}
a.gotosite{
position: absolute;
bottom: 7px;
right: 9px;
color: #282828;
font-size: 11px;
}
.wax-legend .census-source a{
color: #282828;
}
#closebutton {
float: right;
color: #000;
}
</style>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment