Commit 5adfed6e authored by Sarath's avatar Sarath

Added link to git repo in legend

parent e44c7b7d
Pipeline #3214754 passed with stage
in 6 seconds
......@@ -39,6 +39,20 @@ html, body {
opacity: 0.7;
}
.legend .labels {
display: inline;
float: left;
}
.legend .instructions {
float: right;
display: inline;
margin-left: 10px;
width: 50px;
font-size: smaller;
font-style: italic;
}
.shutdown-state {
font-weight: bold;
}
......
......@@ -163,16 +163,22 @@ var legend = L.control({position: 'bottomright'});
legend.onAdd = function (map) {
var div = L.DomUtil.create('div', 'legend info'),
labels = [];
var container = L.DomUtil.create('div', 'legend info');
var instructions = L.DomUtil.create('div', 'instructions', container);
instructions.innerHTML = "Code available on <a href='https://gitlab.com/sflc.in/internetshutdowns'>GitLab</a>";
var labels = L.DomUtil.create('div', 'labels', container);
var labelItems = [];
for (var i = 0; i <= shutdowns.maxCount; i++) {
labels.push(
'<i style="background:' + shutdowns.colors[i] + '"> </i> ' + i);
labelItems.push(
'<i style="background:' + shutdowns.colors[i] + '"></i> ' + i);
}
div.innerHTML = labels.join('<br>');
return div;
labels.innerHTML = labelItems.join('<br>');
return container;
};
function addLegend() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment