Skip to content

Commit

Permalink
Merge pull request #48 from 2308-Bread/feat/breadbox
Browse files Browse the repository at this point in the history
Implemented Tailwind / Added Forms
  • Loading branch information
dsstevens committed Feb 29, 2024
2 parents 1e197f9 + a0750a8 commit ed25da0
Show file tree
Hide file tree
Showing 20 changed files with 832 additions and 78 deletions.
163 changes: 149 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
},
"devDependencies": {
"@types/leaflet": "^1.9.8",
"cypress": "^13.6.4"
"autoprefixer": "^10.4.17",
"cypress": "^13.6.4",
"postcss-loader": "^8.1.0",
"tailwindcss": "^3.4.1"
}
}
7 changes: 7 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
}

11 changes: 10 additions & 1 deletion src/apiTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface CountryData {
id: string;
type: string;
attributes: CountryAttributes;
}
}

export interface ApiResponse {
country: {
Expand All @@ -35,4 +35,13 @@ export interface ApiResponse {
breads: {
data: BreadData[];
};
}

export interface UserCredentials {
email: string;
password: string;
}

export interface NewUser extends UserCredentials {
name: string;
}
4 changes: 2 additions & 2 deletions src/components/App/App.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.App {
background-color: #d0c5b9;
max-height: 100vh;
min-height: 100vh;
display: flex;
flex-direction: column;
font-family: 'Satisfy', cursive;
font-family: "Satisfy", cursive;
justify-content: space-between;
}
5 changes: 5 additions & 0 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import Main from '../Main/Main';
import BreadList from '../BreadList/BreadList';
import BreadDetail from '../BreadDetail/BreadDetail';
import Error from "../Error/Error";
import CreateAcctForm from '../CreateAcctForm/CreateAcctForm';
import LoginForm from '../LoginForm/LoginForm';

import './App.css';
import 'leaflet/dist/leaflet.css';

Expand All @@ -17,6 +20,8 @@ function App() {
<Route path="/" element={<Main />} />
<Route path="/breads/:id" element={<BreadList />} />
<Route path="/breads/:id/:breadId" element={<BreadDetail />} />
<Route path="/create-account" element={<CreateAcctForm />} />
<Route path="/login" element={<LoginForm />} />
<Route path="*" element={<Error />} />
</Routes>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/components/BreadList/BreadList.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@
@media screen and (min-width: 1025px){
.BreadListWrapper h2 {
margin-top: 2rem;
font-size: xx-large;
font-size: 2rem;
margin-bottom: 1rem;
margin-top: 3rem;
}

.BreadListWrapper p {
Expand Down
69 changes: 69 additions & 0 deletions src/components/CreateAcctForm/CreateAcctForm.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.acct-form-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: rgba(255, 255, 255, 0.8);
border-radius: 0.9375rem;
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
padding: 2rem;
margin: 3rem auto;
width: calc(100% - 4rem);
max-width: 31.25rem;
font-family: "Abel", sans-serif;
gap: 1.25rem;
}

form {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}


.acct-form-container h2 {
text-align: center;
color: #333;
font-family: "Satisfy", cursive;
font-size: 2rem;

}

.acct-form-container input {
border: .125rem solid #82aa9f;
border-radius: 0.3125rem;
padding: 0.625rem;
font-size: 1rem;
color: #333;
width: 100%;
margin-bottom: 1rem;
}

.acct-form-container input::placeholder {
color: #666;
}

.acct-form-container button {
background: #82aa9f;
color: white;
padding: 0.625rem 1.25rem;
border: none;
border-radius: 3125rem;
cursor: pointer;
transition: background-color 0.5s ease;
width: 100%;
margin-bottom: 1rem;
}

.acct-form-container button:hover {
background-color: #f0a200;
}

/* Adjustments for larger screens */
@media screen and (min-width: 750px) {
.acct-form-container {
width: 80%;
max-width: 31.25rem;
}
}
Loading

0 comments on commit ed25da0

Please sign in to comment.