-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpopup.html
135 lines (113 loc) · 3.55 KB
/
popup.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Walk Score® for REALTOR.ca</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<style>
:root {
--md-sys-color-primary: #006495;
--md-sys-color-on-primary: #ffffff;
--md-sys-color-primary-container: #cde5ff;
--md-sys-color-on-primary-container: #001e30;
--md-sys-color-secondary: #50606e;
--md-sys-color-on-secondary: #ffffff;
--md-sys-color-secondary-container: #d3e5f5;
--md-sys-color-on-secondary-container: #0c1d29;
--md-sys-color-surface: #fdfcff;
--md-sys-color-on-surface: #1a1c1e;
}
body {
width: 320px;
padding: 16px;
font-family: 'Roboto', sans-serif;
background-color: var(--md-sys-color-surface);
color: var(--md-sys-color-on-surface);
margin: 0;
}
h2 {
font-size: 1.5rem;
font-weight: 500;
margin-top: 0;
margin-bottom: 16px;
color: var(--md-sys-color-on-surface);
}
#apiKeyInput {
margin-bottom: 16px;
}
input[type="text"] {
width: 100%;
padding: 8px;
border: 1px solid var(--md-sys-color-outline);
border-radius: 4px;
font-size: 1rem;
margin-bottom: 8px;
}
button {
background-color: var(--md-sys-color-primary);
color: var(--md-sys-color-on-primary);
border: none;
padding: 8px 16px;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 500;
text-transform: uppercase;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: var(--md-sys-color-primary);
opacity: 0.8;
}
#scrapedAddress,
#parsedAddress {
margin-bottom: 16px;
font-size: 0.875rem;
}
#scrapedAddress a {
color: var(--md-sys-color-primary);
text-decoration: none;
}
#scrapedAddress a:hover {
text-decoration: underline;
}
#mapContainer {
margin-top: 16px;
margin-bottom: 16px;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}
#mapContainer img {
width: 100%;
height: auto;
display: block;
}
#scores p {
margin: 8px 0;
font-size: 0.875rem;
}
#scores a {
color: var(--md-sys-color-primary);
text-decoration: none;
}
#scores a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h2>Walk Score® for REALTOR.ca
</h2>
<div id="apiKeyInput" style="display:none;">
<input type="text" id="walkScoreApiKey" placeholder="Enter Walk Score API Key">
<input type="text" id="mapboxApiKey" placeholder="Enter Mapbox API Key">
<button id="saveKeys">Save Keys</button>
</div>
<div id="scrapedAddress"></div>
<div id="mapContainer"></div>
<div id="scores"></div>
<script src="popup.js"></script>
</body>
</html>