Skip to content

Commit bde9b48

Browse files
committed
create the initial HTML shell of the app
1 parent 79430b2 commit bde9b48

File tree

12 files changed

+68
-242
lines changed

12 files changed

+68
-242
lines changed

public/favicon.ico

-3.08 KB
Binary file not shown.

public/index.html

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,14 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
65
<meta name="viewport" content="width=device-width, initial-scale=1" />
76
<meta name="theme-color" content="#000000" />
87
<meta
98
name="description"
10-
content="Web site created using create-react-app"
9+
content="Our grocery list - an app that demonstrates using react hooks with Firebase firestore"
1110
/>
12-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13-
<!--
14-
manifest.json provides metadata used when your web app is installed on a
15-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16-
-->
17-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18-
<!--
19-
Notice the use of %PUBLIC_URL% in the tags above.
20-
It will be replaced with the URL of the `public` folder during the build.
21-
Only files inside the `public` folder can be referenced from the HTML.
22-
23-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24-
work correctly both with client-side routing and a non-root public URL.
25-
Learn how to configure a non-root public URL by running `npm run build`.
26-
-->
27-
<title>React App</title>
11+
<title>Our grocery list</title>
12+
<link href="https://fonts.googleapis.com/css?family=Sriracha&display=swap" rel="stylesheet">
2813
</head>
2914
<body>
3015
<noscript>You need to enable JavaScript to run this app.</noscript>

public/logo192.png

-5.22 KB
Binary file not shown.

public/logo512.png

-9.44 KB
Binary file not shown.

public/manifest.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/App.css

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
1-
.App {
1+
.app-header {
22
text-align: center;
33
}
44

5-
.App-logo {
6-
height: 40vmin;
7-
pointer-events: none;
5+
.app-footer {
6+
text-align: center;
87
}
98

10-
@media (prefers-reduced-motion: no-preference) {
11-
.App-logo {
12-
animation: App-logo-spin infinite 20s linear;
13-
}
9+
h2 {
10+
margin-top: 5px;
1411
}
1512

16-
.App-header {
17-
background-color: #282c34;
18-
min-height: 100vh;
13+
.container {
1914
display: flex;
20-
flex-direction: column;
21-
align-items: center;
22-
justify-content: center;
23-
font-size: calc(10px + 2vmin);
24-
color: white;
15+
justify-content: space-evenly;
16+
flex-wrap: wrap;
17+
}
18+
19+
.add-item-column {
20+
min-width: 300px;
21+
width: 30%;
22+
background-color: #FBEEC1;
23+
padding: 20px;
24+
border-radius: 2%;
25+
margin: 5px;
2526
}
2627

27-
.App-link {
28-
color: #61dafb;
28+
.list-column {
29+
min-width: 300px;
30+
width: 30%;
31+
background-color: #FBEEC1;
32+
padding: 20px;
33+
border-radius: 2%;
34+
margin: 5px;
2935
}
3036

31-
@keyframes App-logo-spin {
32-
from {
33-
transform: rotate(0deg);
34-
}
35-
to {
36-
transform: rotate(360deg);
37-
}
37+
.button-group button {
38+
margin-right: 10px;
39+
font-size: 1.1rem;
40+
color: #003366;
3841
}

src/App.js

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,40 @@
11
import React from 'react';
2-
import logo from './logo.svg';
32
import './App.css';
43

54
function App() {
65
return (
7-
<div className="App">
8-
<header className="App-header">
9-
<img src={logo} className="App-logo" alt="logo" />
10-
<p>
11-
Edit <code>src/App.js</code> and save to reload.
12-
</p>
13-
<a
14-
className="App-link"
15-
href="https://reactjs.org"
16-
target="_blank"
17-
rel="noopener noreferrer"
18-
>
19-
Learn React
20-
</a>
6+
<div>
7+
<header className="app-header">
8+
<h1>Our Live Grocery List</h1>
9+
<p>Add yourself to the list then start adding items. When someone else adds items, they will instantly appear in the list.</p>
2110
</header>
11+
<div className="container">
12+
13+
<div className="add-item-column">
14+
<h2>Add an item</h2>
15+
<h3>I am...</h3>
16+
<div className="button-group">
17+
<button>Brian</button>
18+
<button>Holly</button>
19+
<button>someone else</button>
20+
</div>
21+
<h3>I want...</h3>
22+
<input type="text" name="grocery-list-item" />
23+
</div>
24+
25+
<div className="list-column">
26+
<h2>Watch the list grow</h2>
27+
<ul>
28+
<li>carrots</li>
29+
<li>pickels</li>
30+
<li>bread</li>
31+
</ul>
32+
</div>
33+
34+
</div>
35+
<footer className="app-footer">
36+
<p>Share your list using <a href="http://localhost:3000/grocery-list?12345">http://localhost:3000/grocery-list?12345</a></p>
37+
</footer>
2238
</div>
2339
);
2440
}

src/App.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import App from './App';
44

55
test('renders learn react link', () => {
66
const { getByText } = render(<App />);
7-
const linkElement = getByText(/learn react/i);
7+
const linkElement = getByText(/Our grocery list/i);
88
expect(linkElement).toBeInTheDocument();
99
});

src/index.css

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
body {
22
margin: 0;
3-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5-
sans-serif;
6-
-webkit-font-smoothing: antialiased;
7-
-moz-osx-font-smoothing: grayscale;
3+
font-family: 'Sriracha', cursive;
4+
background: #659DBD;
5+
color: #003366;
86
}
97

10-
code {
11-
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12-
monospace;
8+
a {
9+
color: #003366;
1310
}

src/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,5 @@ import React from 'react';
22
import ReactDOM from 'react-dom';
33
import './index.css';
44
import App from './App';
5-
import * as serviceWorker from './serviceWorker';
65

76
ReactDOM.render(<App />, document.getElementById('root'));
8-
9-
// If you want your app to work offline and load faster, you can change
10-
// unregister() to register() below. Note this comes with some pitfalls.
11-
// Learn more about service workers: https://bit.ly/CRA-PWA
12-
serviceWorker.unregister();

0 commit comments

Comments
 (0)