-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
125 lines (112 loc) · 5.5 KB
/
index.html
File metadata and controls
125 lines (112 loc) · 5.5 KB
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
<!DOCTYPE html5>
<html lang="en">
<head>
<title>Land Acknowledgement</title>
<meta charset="UTF-8">
<meta name="format-detection" content="telephone=no">
<meta property="og:title" content="Land Acknowledgement"/>
<meta property="og:type" content="article"/>
<meta property="og:image" content="https://land.codeforanchorage.org/img/land_card_small.png"/>
<meta property="og:url" content="https://land.codeforanchorage.org"/>
<meta property="og:description"
content="Learn more about the land you're living, working, or recreating on. Data from native-land.ca/"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Land Acknowledgement"/>
<meta name="twitter:description"
content="Learn more about the land you're living, working, or recreating on. Data from native-land.ca/"/>
<meta name="twitter:image" content="https://land.codeforanchorage.org/img/land_card_small.png"/>
<meta name="description" content="Learn more about the land you're living, working, or recreating on.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Arvo:400,700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-56999250-1', 'auto');
ga('send', 'pageview');
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.20.0/axios.min.js"
integrity="sha512-quHCp3WbBNkwLfYUMd+KwBAgpVukJu5MncuQaWXgCrfgcxCJAq/fo+oqrRKOj+UKEmyMCG3tb8RB63W+EmrOBg=="
crossorigin="anonymous"></script>
</head>
<body>
<main id="content">
<header>
<h1>Land Acknowledgement</h1>
</header>
<section>
<form id='landForm' onsubmit="submitFunction">
<h2>Whose land am I on?</h2>
<form id='landForm'>
<input type="text" id="textInput" placeholder="City, State or Zip Code">
<input type="submit" id="textSubmit">
<div id="loading-icon-wrapper">
<div id="loading-icon"></div>
</div>
</form>
<h3>
<div id="output"></div>
</h3>
</section>
<section class="info">
<p class="info">Enter your Canadian or US zip code or [city, state], or city, state & country for Australia, NZ
or South America to the
<a target="_blank" href="https://www.messenger.com/t/LandAcknowledgement">Facebook Messenger bot</a>
and we'll send you the Native land you're living, working, or recreating on.</p>
</section>
<hr/>
<section class="info">
<p class="info">Our data is from <a target="_blank" href="https://native-land.ca/">Native Land</a>, a Canadian
not-for profit, who ask that people use the data carefully because confirmation by nations is pending and
they are updating data weekly. Please consider joining
their <a target="_blank" href="https://www.patreon.com/nativeland">Patreon community</A> to help fund their
research and projects.</p>
</section>
<section class="info">
<p>This <a target="_blank" href="https://github.com/codeforanchorage/land_acknowledgement_lambda">open source
project</a> is a collaboration between <a target="_blank" href="https://codeforanchorage.org">Code for
Anchorage</a> and the <a target="_blank" href="https://medium.com/anchorage-i-team">Anchorage i-team</a>.
</p>
</section>
</main>
</body>
<script>
document.getElementById('landForm').addEventListener('submit', submitFunction)
function submitFunction(e) {
// console.log(textInput)
// const base_url = "https://ak-land.herokuapp.com/"
// const base_url = "https://ak-land.herokuapp.com/?Body=austin,mn"
//const base_url = `https://anchorage-land-cors.herokuapp.com/https://ak-land.herokuapp.com/?Body=${e.target[0].value}`
//const base_url = `https://anchorage-land-cors.herokuapp.com/https://42fehusrq0.execute-api.us-west-2.amazonaws.com/api/${e.target[0].value}`
const base_url = `https://42fehusrq0.execute-api.us-west-2.amazonaws.com/api/${e.target[0].value}`
e.preventDefault();
var inp = document.getElementById('textInput');
var sub = document.getElementById('textSubmit');
let loadIcon = document.getElementById('loading-icon-wrapper');
loadIcon.style.display = 'flex';
inp.style.display = 'none';
sub.style.display = 'none';
axios.get(base_url)
.then(function (response) {
document.getElementById('output').innerHTML = response.data
inp.style.display = '';
sub.style.display = '';
loadIcon.style.display = 'none';
}, (error) => {
console.log(error);
inp.style.display = '';
sub.style.display = '';
loadIcon.style.display = 'none';
});
}
</script>
</html>