generated from msu-anthropology/indian-country
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
144 lines (132 loc) · 5.79 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en-us">
<script id="tinyhippos-injected">if (window.top.ripple) { window.top.ripple("bootstrap").inject(window, document); }</script>
<head>
<title>This is Indian Country</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<link rel="stylesheet" href="css/leaflet.css" />
<link rel="stylesheet" href="css/BootSideMenu.css">
</head>
<body>
<!-- MODAL -->
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-dialog modal-vertical-centered">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">Welcome to <em>This is Indian Country</em></h4>
</div>
<div class="modal-body">
<em>This is Indian Country</em> is a digital cultural map of indigenous community issues worldwide. Collaboratively produced at Michigan State University during multiple semesters by the students registered in the Contemporary American Indian Communities class (ANP 433), <em>This is Indian Country</em> represents an experiment in applied digital anthropology undergraduate learning.
</div>
<div class="modal-footer">
<label ><input class="dont" type="checkbox" name="dismiss"> Don't show again</label><br />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<!--cenralized navbar-->
<div id="central-nav"></div>
<!--MAP-->
<div id="map"></div>
<!--centralized footer-->
<div id="central-foot"></div>
<!--Bootstrap core JavaScript-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="leaflet-omnivore-master/leaflet-omnivore.js"></script>
<script src="js/leaflet.js"></script>
<script src="js/BootSideMenu.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("a[rel=citation]").popover({
placement : 'top'
}).click(function (p) {
p.preventDefault();
var $self = $(this);
setTimeout(function () {
$self.popover('hide');
}, 4000);
});
});
</script>
<!-- Calls centralized navbar and footer -->
<script src="centralize-nav-foot/nav-foot.js"></script>
<!-- Initiates Modal and Uses cookies for Dont Show Again Checkbox -->
<script type="text/javascript">
$(document).ready(function () {
$('#myModal').modal();
function setCookie(){
var dis = document.cookie;
while(dis.charAt(0)==" ") dis = dis.substring(1);
if(dis.substring(8,13)== "false"){
$('#myModal').modal('hide');
}
console.log(dis.substring(8,13));
}
setCookie();
var $check = $("input.dont").click(function(){
if($("input.dont").is(":checked")){
document.cookie = "display=false";
}else{
document.cookie = "display=true";
}
});
});
</script>
<!-- Centers Modal Vertically -->
<script type="text/javascript">
function centerModal() {
$(this).css('display', 'block');
var $dialog = $(this).find(".modal-dialog");
var offset = ($(window).height() - $dialog.height()) / 2;
// Center modal vertically in window
$dialog.css("margin-top", offset);
}
$('.modal').on('show.bs.modal', centerModal);
$(window).on("resize", function () {
$('.modal:visible').each(centerModal);
});
</script>
<!-- Initiates Map and pulls data from .CSV -->
<script>
var map = L.map('map', {
attributionControl: false
}).setView([46.2058487,-100.961857], 3);
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
maxZoom: 18,
minZoom: 2,
id:'0redfeather/ckhxs4rm914d919pj2zgf0fcp',
accessToken: 'pk.eyJ1IjoiMHJlZGZlYXRoZXIiLCJhIjoiY2puZzVlYTFmNDZ6bjN3cW8xMHAwNG53NSJ9.hQc74nd7nsRsbm_2ZWB8sw'
}).addTo(map);
L.control.attribution().setPrefix(
'<a alt="A JS library for interactive maps" href="http://leafletjs.com" target="_blank">Leaflet</a>'
).addAttribution(
'Map data © <a target="_blank" href="http://openstreetmap.org">OpenStreetMap</a> contributors | <a target="_blank" href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a> | Imagery © <a target="_blank" href="http://mapbox.com">Mapbox</a>'
).addTo(map);
omnivore.csv('sites-popup.csv') //Add site-map csv here
.on('ready', function(layer) {
this.eachLayer(function(marker) {
// Bind a popup to each icon based on the same properties
// Adds coloumns of extra info to marker popup
marker.bindPopup(marker.toGeoJSON().properties.issue +
marker.toGeoJSON().properties.culture + '<br><br> ' +
marker.toGeoJSON().properties.info + '<br><br> ' +
marker.toGeoJSON().properties.link, {autoPanPadding: [5,55]});
});
}).addTo(map);
</script>
</body>
</html>