Skip to content

Commit ff7a560

Browse files
authored
Merge pull request #31 from Local-Connectivity-Lab/SearchBar
Restricting the search to US area. Merged with Esther present.
2 parents 902c1dc + d6b340c commit ff7a560

File tree

13 files changed

+1047
-791
lines changed

13 files changed

+1047
-791
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
21
name: Check
32

43
on:
54
push:
65
branches:
7-
- '**'
8-
- '!main'
6+
- "**"
7+
- "!main"
98

109
jobs:
1110
check:
@@ -17,7 +16,7 @@ jobs:
1716

1817
- uses: actions/setup-node@v3
1918
with:
20-
node-version-file: '.node-version'
19+
node-version-file: ".node-version"
2120

2221
- name: Install Node dependencies
2322
run: npm ci

.github/workflows/publish.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ name: Publish Site
55

66
on:
77
push:
8-
branches: [ main ]
8+
branches: [main]
99

1010
jobs:
1111
build:
1212
name: Publish Site
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v3
17-
18-
- uses: actions/setup-node@v3
19-
with:
20-
node-version-file: '.node-version'
21-
22-
- name: Install Node dependencies
23-
run: npm ci
24-
25-
- name: Build
26-
run: npm run build
27-
28-
- name: Publish website
29-
uses: alex-page/[email protected]
30-
with:
31-
repo-token: ${{ secrets.GH_PAT }}
32-
site-directory: 'build'
16+
- uses: actions/checkout@v3
17+
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version-file: ".node-version"
21+
22+
- name: Install Node dependencies
23+
run: npm ci
24+
25+
- name: Build
26+
run: npm run build
27+
28+
- name: Publish website
29+
uses: alex-page/[email protected]
30+
with:
31+
repo-token: ${{ secrets.GH_PAT }}
32+
site-directory: "build"

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ npm install
2121

2222

2323
# Issues
24-
- Chart doesn't show tooltips.
24+
25+
- Chart doesn't show tooltips.
2526

2627
# TODOs
28+
2729
- Make the chart more informative
2830
- Hover on a line should show the exact data and which sites are they from
2931
- Admin Panel
@@ -32,4 +34,5 @@ npm install
3234
- Better compatibility with local development
3335

3436
# Maybe
37+
3538
- More map information

package-lock.json

Lines changed: 930 additions & 685 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@
2626
"fontsource-roboto": "^4.0.0",
2727
"jsonwebtoken": "^8.5.1",
2828
"leaflet": "^1.7.1",
29-
"node-canvas": "^2.7.0",
29+
"leaflet-geosearch": "^3.7.0",
3030
"prettier": "^2.5.1",
3131
"qrcode.react": "^1.0.1",
3232
"react": "^17.0.2",
3333
"react-dom": "^17.0.2",
34-
"leaflet-geosearch": "^3.7.0",
3534
"react-multi-select-component": "^4.1.14",
3635
"react-router": "^6.2.1",
3736
"react-router-dom": "^6.2.1",
@@ -67,6 +66,7 @@
6766
},
6867
"devDependencies": {
6968
"@types/cors": "^2.8.12",
70-
"@types/qrcode.react": "^1.0.2"
69+
"@types/qrcode.react": "^1.0.2",
70+
"canvas": "^2.11.2"
7171
}
72-
}
72+
}

prettierrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"bracketSpacing": true,
77
"arrowParens": "avoid",
88
"trailingComma": "all"
9-
}
9+
}

public/index.html

Lines changed: 61 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
4-
<head>
5-
<meta charset="utf-8" />
6-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
7-
<meta name="viewport" content="width=device-width, initial-scale=1" />
8-
<meta name="theme-color" content="#000000" />
9-
<meta name="description" content="Web site created using create-react-app" />
10-
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
11-
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
12-
crossorigin="" />
13-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
14-
<!--
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link
13+
rel="stylesheet"
14+
href="https://unpkg.com/[email protected]/dist/leaflet.css"
15+
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
16+
crossorigin=""
17+
/>
18+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
19+
<!--
1520
manifest.json provides metadata used when your web app is installed on a
1621
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
1722
-->
18-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
19-
<!--
23+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
24+
<!--
2025
Notice the use of %PUBLIC_URL% in the tags above.
2126
It will be replaced with the URL of the `public` folder during the build.
2227
Only files inside the `public` folder can be referenced from the HTML.
@@ -25,42 +30,48 @@
2530
work correctly both with client-side routing and a non-root public URL.
2631
Learn how to configure a non-root public URL by running `npm run build`.
2732
-->
28-
<title>Performance Evaluation</title>
29-
<script type="text/javascript">
30-
// Single Page Apps for GitHub Pages
31-
// https://github.com/rafrex/spa-github-pages
32-
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License
33-
// ----------------------------------------------------------------------
34-
// This script checks to see if a redirect is present in the query string
35-
// and converts it back into the correct url and adds it to the
36-
// browser's history using window.history.replaceState(...),
37-
// which won't cause the browser to attempt to load the new url.
38-
// When the single page app is loaded further down in this file,
39-
// the correct url will be waiting in the browser's history for
40-
// the single page app to route accordingly.
41-
(function (l) {
42-
if (l.search) {
43-
var q = {};
44-
l.search.slice(1).split('&').forEach(function (v) {
45-
var a = v.split('=');
46-
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&');
47-
});
48-
if (q.p !== undefined) {
49-
window.history.replaceState(null, null,
50-
l.pathname.slice(0, -1) + (q.p || '') +
51-
(q.q ? ('?' + q.q) : '') +
52-
l.hash
53-
);
33+
<title>Performance Evaluation</title>
34+
<script type="text/javascript">
35+
// Single Page Apps for GitHub Pages
36+
// https://github.com/rafrex/spa-github-pages
37+
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License
38+
// ----------------------------------------------------------------------
39+
// This script checks to see if a redirect is present in the query string
40+
// and converts it back into the correct url and adds it to the
41+
// browser's history using window.history.replaceState(...),
42+
// which won't cause the browser to attempt to load the new url.
43+
// When the single page app is loaded further down in this file,
44+
// the correct url will be waiting in the browser's history for
45+
// the single page app to route accordingly.
46+
(function (l) {
47+
if (l.search) {
48+
var q = {};
49+
l.search
50+
.slice(1)
51+
.split("&")
52+
.forEach(function (v) {
53+
var a = v.split("=");
54+
q[a[0]] = a.slice(1).join("=").replace(/~and~/g, "&");
55+
});
56+
if (q.p !== undefined) {
57+
window.history.replaceState(
58+
null,
59+
null,
60+
l.pathname.slice(0, -1) +
61+
(q.p || "") +
62+
(q.q ? "?" + q.q : "") +
63+
l.hash
64+
);
65+
}
5466
}
55-
}
56-
}(window.location))
57-
</script>
58-
</head>
67+
})(window.location);
68+
</script>
69+
</head>
5970

60-
<body>
61-
<noscript>You need to enable JavaScript to run this app.</noscript>
62-
<div id="root"></div>
63-
<!--
71+
<body>
72+
<noscript>You need to enable JavaScript to run this app.</noscript>
73+
<div id="root"></div>
74+
<!--
6475
This HTML file is a template.
6576
If you open it directly in the browser, you will see an empty page.
6677
@@ -70,6 +81,5 @@
7081
To begin the development, run `npm start` or `yarn start`.
7182
To create a production bundle, use `npm run build` or `yarn build`.
7283
-->
73-
</body>
74-
75-
</html>
84+
</body>
85+
</html>

src/admin/login.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.form {
2-
max-width: 330px;
3-
margin: 0 auto;
4-
display: flex;
5-
flex-direction: column;
6-
padding: 20px;
7-
margin-top: 30px;
8-
}
1+
.form {
2+
max-width: 330px;
3+
margin: 0 auto;
4+
display: flex;
5+
flex-direction: column;
6+
padding: 20px;
7+
margin-top: 30px;
8+
}

src/index.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
body {
22
margin: 0;
3-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
3+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4+
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
55
sans-serif;
66
-webkit-font-smoothing: antialiased;
77
-moz-osx-font-smoothing: grayscale;
88
}
99

1010
code {
11-
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
11+
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
1212
monospace;
1313
}

src/utils/fonts.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400&display=swap');
1+
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400&display=swap");

0 commit comments

Comments
 (0)