Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57,503 changes: 28,810 additions & 28,693 deletions package-lock.json

Large diffs are not rendered by default.

78 changes: 40 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
{
"name": "rootbeers",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
{
"name": "rootbeers",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.7.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.27.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
269 changes: 231 additions & 38 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,231 @@
.App {
text-align: center;
}

.App-logo {
height: 40vmin;
pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}

.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

.App-link {
color: #61dafb;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* App.css */

body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f8f8f8;
}

.header {
background-color: #00b0ff;
padding: 10px;
display: flex;
justify-content: center;
}

.header img {
width: 50px;
cursor: pointer;
}

.beer-list {
display: flex;
flex-direction: column;
align-items: center;
margin: 20px;
}

.beer-item {
display: flex;
align-items: center;
width: 90%;
background-color: #ffffff;
padding: 15px;
margin: 10px 0;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.beer-item img {
width: 50px;
height: auto;
margin-right: 15px;
}

.beer-item h2 {
margin: 0;
font-size: 1.2rem;
color: #333;
}

.beer-item p {
margin: 5px 0;
color: #666;
}

.beer-item .contributed-by {
font-size: 0.9rem;
color: #999;
}

.beer-item a {
color: #00b0ff;
text-decoration: none;
}
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f8f8f8;
}

/* Header styling */
.header {
background-color: #00b0ff;
padding: 10px;
display: flex;
justify-content: center;
}

.header img {
width: 50px;
cursor: pointer;
}

/* Form container styling */
.form-container {
display: flex;
flex-direction: column;
align-items: center;
margin: 20px;
}

.form-item {
width: 90%;
background-color: #ffffff;
padding: 15px;
margin: 10px 0;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Input field styling */
input[type="text"],
textarea {
width: 100%;
padding: 10px;
margin: 5px 0;
border: 1px solid #ddd;
border-radius: 20px;
outline: none;
}

textarea {
resize: none;
height: 100px;
}

label {
font-weight: bold;
margin-top: 10px;
}

/* Button styling */
button {
background-color: #00b0ff;
color: white;
border: none;
padding: 10px 20px;
border-radius: 20px;
cursor: pointer;
font-size: 1rem;
width: 50%;
margin-top: 20px;
}

button:hover {
background-color: #008ecc;
}
/* App.css */

/* Global page styling */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f2f5;
}

/* Home page container */
.home-container {
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
}

/* Header styling */
.home-header {
background-color: #00b0ff;
width: 100%;
padding: 15px;
display: flex;
justify-content: center;
align-items: center;
color: white;
font-size: 1.5rem;
font-weight: bold;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.home-header img {
width: 40px;
height: 40px;
margin-right: 10px;
}

/* Section styling */
.section-title {
font-size: 1.8rem;
margin: 20px 0;
color: #333;
text-align: center;
}

.card-container {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 20px;
margin-top: 20px;
}

.card {
background-color: #ffffff;
width: 250px;
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
}

.card:hover {
transform: scale(1.05);
}

.card-title {
font-size: 1.2rem;
color: #00b0ff;
margin-bottom: 10px;
}

.card-description {
font-size: 0.9rem;
color: #666;
margin-bottom: 15px;
}

.card-button {
background-color: #00b0ff;
color: white;
border: none;
padding: 8px 16px;
border-radius: 20px;
cursor: pointer;
text-align: center;
}

.card-button:hover {
background-color: #008ecc;
}
46 changes: 21 additions & 25 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
import logo from './logo.svg';
import './App.css';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}

export default App;
import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import Home from './pages/Home';
import ListBeers from './pages/ListBeers';
import RandomBeer from './pages/RandomBeer';
import NewBeer from './pages/NewBeer';
import SingleBeer from './pages/SingleBeer';

const App = () => (
<Router>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/beers" element={<ListBeers />} />
<Route path="/beers/:beerId" element={<SingleBeer />} />
<Route path="/random-beer" element={<RandomBeer />} />
<Route path="/new-beer" element={<NewBeer />} />
</Routes>
</Router>
);

export default App;
Loading