-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
103 lines (96 loc) · 4.95 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Asian Hate Map Tracker</title>
<link rel="icon" href="images/favicon.png">
<link href="style.css" rel="stylesheet" type="text/css" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<link href="https://api.mapbox.com/mapbox-gl-js/v2.4.1/mapbox-gl.css" rel="stylesheet">
<!-- outside scripts imported here -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://kit.fontawesome.com/875b8c7180.js" crossorigin="anonymous"></script>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v2.5.0/mapbox-gl.js"></script>
<script src="https://unpkg.com/[email protected]/papaparse.min.js"></script>
<style>
body { margin: 0; padding: 0; }
#map { position: absolute; top: 0; bottom: 0; width: 100%; }
</style>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300&display=swap" rel="stylesheet">
</head>
<body>
<!-- creates the map pulled from mapbox -->
<div id="map">
<script>
//this var sets the zoom multiplier on the map to make it fit different sized monitors
var zoomMultiplier = 2 + ($(document).width()/850);
if ($(document).width()<=600){
zoomMultiplier = 1 + ($(document).width()/400);
} else if ($(document).width()>=2000) {
zoomMultiplier = 2.6 + ($(document).width()/1200);
}
mapboxgl.accessToken = 'pk.eyJ1IjoibGFyc2NjaHJpc3RlbnNlbiIsImEiOiJja3VoeGNlYmkxMGMzMnVwaG5qZjczMW52In0.4AhLTcj7CxGP4CVYiklLbw'; //access token for map
const map = new mapboxgl.Map({
container: 'map', // container ID
style: 'mapbox://styles/larscchristensen/ckud120ny3p7117pvruvsnuk5', // style URL
center: [-95.75, 38.5119], // starting position [lng, lat]
zoom: zoomMultiplier // starting zoom
});
</script>
</div>
<!-- all the menu buttons -->
<div id="menu">
<div id="settings-area">
<button type="button" class="button setting-button"><i class="fas fa-cog"></i></button>
</div>
<div id="menu-about">
<button type = "button" class="button">About</button>
</div>
<div id="menu-more-info">
<button type = "button" class="button">More
Information</button>
</div>
</div>
<!-- all the about page objects-->
<div id="about">
<div id="about-page-body">
<div id="about-page-header">
<h1>About</h1>
<button type="button" class="x">X</button>
</div>
<p>In the wake of the COVID-19 pandemic, there has been an increase in the number of Asian hate crime incidents. In light of these events, there has been a large movement to put a stop to Asian hate, and to contribute to this cause, we wanted to make a website to raise awareness about the scale of the issue.</p>
<p>Furthermore, project contributor Bruce Chen is a Chinese American himself, so this is an issue that is close to home for us. Because of this, we have created this website to show incidents as they occur, using a heat map that displays the locations of “Anti-Asian incidents” that are mentioned in articles. We hope that this information is helpful and showcases where Asian hate crimes are most common so that we may put a stop to this pressing issue.
</p>
</div>
</div>
<!-- all the info page objects-->
<div id="info">
<div id="info-page-body">
<div id="info-page-header">
<h1>More Information</h1>
<button type="button" class="x">X</button>
</div>
<p>If you would like more information about the topic and what you can do to help, please visit some of the following links:</p>
<p><a href="https://stopaapihate.org/">StopAAPIhate.org</a></p>
<p><a href="https://www.npr.org/2021/08/12/1027236499/anti-asian-hate-crimes-assaults-pandemic-incidents-aapi">General Information from NPR</a></p>
<p><a href="https://www.pbs.org/newshour/nation/what-you-can-do-to-fight-violence-and-racism-against-asian-americans">What can be done to help from PBS</a></p>
<p><a href="https://www.standagainsthatred.org/">Report anti-asian incidents here and read many other personal accounts of hate crimes</a></p>
</div>
</div>
<div id="settings">
<div id="settings-body" class="settingsArea settings-close">
<div id="setting1">
<p class="setting1-text show">Heatmap Mode</p>
<label class="switch">
<input type="checkbox" class="setting1-checkbox">
<span class="slider round"></span>
</label>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>