Skip to content

Commit

Permalink
Merge pull request #48 from chingu-voyages/development
Browse files Browse the repository at this point in the history
merge dev into main
  • Loading branch information
NishaVijai authored Nov 10, 2023
2 parents 48ddd02 + ce2ec23 commit 325829b
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 39 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/appLogo.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Zest App</title>
</head>
Expand Down
Binary file added public/appLogo.ico
Binary file not shown.
1 change: 0 additions & 1 deletion public/vite.svg

This file was deleted.

5 changes: 3 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Outlet, RouterProvider, createBrowserRouter } from 'react-router-dom';
import { HomeLayout } from './layout';
import './index.css';

import { RecipeDetails } from './pages/recipeDetails';
import { NotFound } from './pages/notFound';
Expand All @@ -26,9 +27,9 @@ const router = createBrowserRouter([
const App = () => {
return (
<RouterProvider router={router}>
<Outlet classname='outlet' />
<Outlet classname="outlet" />
</RouterProvider>
);
};

export default App;
export default App;
4 changes: 2 additions & 2 deletions src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Footer = () => {
const { isDarkTheme } = useGlobalContext();

return (
<footer className={`${styles.footer} ${isDarkTheme ? styles['dark-theme'] : ''}`}>
<footer className={`${styles.footer} ${isDarkTheme ? styles['dark-theme'] : styles['light-theme']}`}>
<section className={styles['logo-section']}>
<AppLogoComponent />
</section>
Expand All @@ -19,7 +19,7 @@ const Footer = () => {
target="_blank"
rel="noreferrer"
href="https://github.com/chingu-voyages/v46-tier2-team-16/tree/main"
title="External github repo link will open on a new tab"
data-title="External github repo link will open on a new tab"
>
v46-tier2-team-16
</a>
Expand Down
8 changes: 6 additions & 2 deletions src/components/Footer/Footer.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ a {
color: #393838;
}

a[title]:hover::after {
a[data-title]:hover::after {
background-color: rgb(216, 172, 172);
border-radius: 25px;
color: #000;
content: attr(title);
content: attr(data-title);
position: absolute;
top: 1%;
left: 12%;
Expand Down Expand Up @@ -182,4 +182,8 @@ a {
.dark-theme {
background-color: var(--dark-theme-background-color);
color: var( --dark-theme-primary-text-color);
}

.light-theme {
background-color: var(--light-theme-background-color);
}
2 changes: 1 addition & 1 deletion src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Header = () => {
const { isDarkTheme } = useGlobalContext();

return (
<header className={`${styles.header} ${isDarkTheme ? styles['dark-theme'] : ''}`}>
<header className={`${styles.header} ${isDarkTheme ? styles['dark-theme'] : styles['light-theme']}`}>
<AppLogoComponent />
<section>
<ToggleTheme />
Expand Down
4 changes: 4 additions & 0 deletions src/components/Header/Header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ header {
color: var( --dark-theme-primary-text-color);
}

.light-theme {
background-color: var(--light-theme-background-color);
}

/* media query for desktop */
@media only screen and (min-device-width: 768px) and (max-device-width: 6024px) {
header {
Expand Down
14 changes: 7 additions & 7 deletions src/components/Loader/Loader.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ h1 {
overflow: hidden;
white-space: nowrap;
animation: typing 1s steps(20, end), blink-caret .75s step-end infinite;

}

.loader {
Expand All @@ -27,20 +28,19 @@ h1 {
align-items: center;
}

@keyframes typing {
@keyframes typing {
from { width: 0; }
to { width: 100%; }
}
to { width: 250px; }
}

@keyframes blink-caret {
@keyframes blink-caret {
from, to { border-color: transparent; }
50% { border-color: black; }
}
}

.typing-text::after {
content: "|";
animation: blink-caret .75s step-end infinite;
}
animation: blink-caret .75s step-end infinite; }

.dark-theme {
background-color: var(--dark-theme-background-color);
Expand Down
14 changes: 10 additions & 4 deletions src/components/Recipe/Recipe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,27 @@ import styles from './Recipe.module.css';
const Recipe = (props) => {
const { recipe, recipesToDisplay } = props;
const { isDarkTheme } = useGlobalContext();
console.log('recipesToDisplay', recipesToDisplay)
console.log('recipesToDisplay', recipesToDisplay);

return (
<section className={`${styles.section} ${isDarkTheme ? styles['dark-theme'] : styles['light-theme']}`}>
{recipe.loading && <Loader />}
{!recipe.loading && recipesToDisplay.length === 0 ? (<p className={`${styles.noRecipe} ${isDarkTheme ? styles['dark-noRecipe'] : ''}`}>Sorry, no recipe to satisfy your papilles!</p>) : <></>}
{!recipe.loading && recipesToDisplay.length === 0 ? (
<p className={`${styles.noRecipe} ${isDarkTheme ? styles['dark-noRecipe'] : ''}`}>Sorry, no recipe to satisfy your papilles!</p>
) : (
<></>
)}
{!recipe.loading && recipesToDisplay ? (
<div className={styles.container}>
{recipesToDisplay.map((oneRecipe) => (
<RecipeCard key={oneRecipe.id} oneRecipe={oneRecipe} />
))}
</div>
) : <></>}
) : (
<></>
)}
</section>
);
};

export default Recipe;
export default Recipe;
43 changes: 26 additions & 17 deletions src/components/Search/Search.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ p {
display: flex;
flex-direction: row;
align-self: center;
height:fit-contentl
height: 40px;
width: 280px;
}

.containerInput{
Expand All @@ -37,12 +38,17 @@ p {

input {
border-radius: 100px;
border: solid 1px black;
border: solid 1px #303041;
padding: 5px 10px 5px 10px;
box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
margin-right: 3px;
width: 100%;
height:30px;
height:100%;
}

input:focus {
outline: none !important;
border-color:#FFD900;
}

.visuallyHidden {
Expand All @@ -57,43 +63,46 @@ input {
}

.imgLoupe {
width:30px;
height:28px;
padding:2px;
width:40px;
height:38px;
padding:8px;
border:none;
background-color:rgba(255, 235, 105, 1);
background-color:#FFD900;
border-top-right-radius: 100px;
border-bottom-right-radius: 100px;
}

.imgReset {
width:30px;
height:30px;
padding:2px;
background-color:rgba(255, 235, 105, 1);
width:40px;
height:40px;
padding:8px;
background-color : #FFD900;
border-radius: 100px;
position: absolute;
top: 1px;
right: -3px;
box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
border: solid 1px #303041;

}

.buttonLoupe {
border: none;
border-radius: 100px;
width: 30px;
height: 30px;
width: 35px;
height: 100%;
/* margin-left: 3px; */
position:absolute;
right: 4px;
right: 9px;
top:1px;
background-color: transparent;
}

.buttonReset {
border-radius: 100px;
width: 30px;
height: 30px;
margin-left: 3px;
width: 35px;
height: 100%;
margin-left:20px;
background-color: transparent;
position: relative;
border: none;
Expand Down
1 change: 1 addition & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ body {
overflow: auto;
margin: 0;
padding: 0;
height: 100vh;
}

/* media query for desktop */
Expand Down
3 changes: 2 additions & 1 deletion src/layout/HomeLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ const HomeLayout = () => {
return (
<>
<Header />
<main className={`${styles.main} ${isDarkTheme ? styles['dark-theme'] : ''}`}>
<main className={`${styles.main} ${isDarkTheme ? styles['dark-theme'] : styles['light-theme']}`}>
<Outlet className={styles.outlet} />
</main>
<Footer />
</>
);
};

export default HomeLayout;
4 changes: 4 additions & 0 deletions src/layout/HomeLayout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ main {
.dark-theme {
background-color: var(--dark-theme-background-color);
color: var( --dark-theme-primary-text-color);
}

.light-theme {
background-color: var(--light-theme-background-color);
}
1 change: 0 additions & 1 deletion src/pages/recipeDetails/RecipeDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const RecipeDetails = () => {

const recipeById = useSelector((state) => state.recipeById);
const selectedRecipe = recipeById.recipeById;

return (
<>
{recipeById.loading && <Loader />}
Expand Down

0 comments on commit 325829b

Please sign in to comment.