-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathindex.html
177 lines (135 loc) · 6.64 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html lang="en"><script id="tinyhippos-injected">if (window.top.ripple) { window.top.ripple("bootstrap").inject(window, document); }</script><head>
<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">
<title>Digital Atlas of Egyptian Archaeology</title>
<!-- 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" />
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!--<script src="js/ie-emulation-modes-warning.js"></script> -->
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<!--<script src="js/ie10-viewport-bug-workaround.js"></script>-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</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 the Digital Atlas of Egyptian Archaeology - Fall 2018</h4>
</div>
<div class="modal-body">
The Digital Atlas of Ancient Egypt is a digital cultural map of archaeological sites in Egypt (ranging from the Predynastic to the Roman period). Collaboratively produced at Michigan State University during the Fall 2018 semester by the students registered in the Archaeology of Ancient Egypt class (ANP 455), the Digital Atlas of Ancient Egypt represents an experiment in applied digital archaeology undergraduate learning. This version of the atlas may be in part included in our <a title="Digital Atlas of Egyptian Archaeology" href="https://msu-anthropology.github.io/daea" target="_blank">master version</a>.
</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
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="leaflet-omnivore-master/leaflet-omnivore.js"></script>
<script src="js/leaflet.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();
//check cookies
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').setView([27.295574, 31.026373], 6);
L.tileLayer('https://a.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18,
id: 'matrix-msu.n75kekea',
accessToken: 'pk.eyJ1IjoibWF0cml4LW1zdSIsImEiOiJmU1NPbUFjIn0.MWCWCMSJ8Ar-6KZtNPzy4w'
}).addTo(map);
//enter path for .csv here
omnivore.csv('sites-popup.csv')
.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.timePeriod +
marker.toGeoJSON().properties.siteName + '<br> ' +
marker.toGeoJSON().properties.info + '<br><br> ' +
marker.toGeoJSON().properties.link, {autoPanPadding: [5,55]});
});
})
.addTo(map);
</script>
</body></html>