mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-12 05:16:47 +00:00
footer links
This commit is contained in:
parent
24b6c29d7f
commit
df6c0e01bb
6 changed files with 48 additions and 7 deletions
14
README.md
14
README.md
|
|
@ -61,7 +61,7 @@ Free meal planner for cooks short on ideas! (like me …)
|
||||||
## Supports
|
## Supports
|
||||||
|
|
||||||
- Web ✓
|
- Web ✓
|
||||||
- Progressive Web App
|
- Progressive Web App ✓
|
||||||
- Mobile
|
- Mobile
|
||||||
|
|
||||||
## Technical Stack
|
## Technical Stack
|
||||||
|
|
@ -80,10 +80,18 @@ Free meal planner for cooks short on ideas! (like me …)
|
||||||
- List of meals by categories
|
- List of meals by categories
|
||||||
- Search by name: you're looking for a recipe? Ours are easy to make and yummy!
|
- Search by name: you're looking for a recipe? Ours are easy to make and yummy!
|
||||||
|
|
||||||
|
### Features in v.0.2
|
||||||
|
|
||||||
|
- Progressive Web App
|
||||||
|
- User Interface Enhancement
|
||||||
|
|
||||||
## TO DO
|
## TO DO
|
||||||
|
|
||||||
- put a preloader
|
- put a preloader
|
||||||
- route bad request to notFOund (exple: /categories/string, when search results is null)
|
- redirect after failed fetch request: (history.push('/path'), or write handleFetchResponse function)
|
||||||
|
- https://stackoverflow.com/questions/45089386/what-is-the-best-way-to-redirect-a-page-using-react-router
|
||||||
|
- https://www.henriksommerfeld.se/error-handling-with-fetch/
|
||||||
- Use ErrorBoundaries component ?
|
- Use ErrorBoundaries component ?
|
||||||
- add sidenav on mobile
|
- add sidenav on mobile
|
||||||
- contact form
|
- accounts v2
|
||||||
|
- contact form (with validation)
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,15 @@ const CategoryEntry = props => {
|
||||||
<div className="card horizontal hoverable">
|
<div className="card horizontal hoverable">
|
||||||
<div className="card-image valign-wrapper">
|
<div className="card-image valign-wrapper">
|
||||||
<img
|
<img
|
||||||
className="responsive-img"
|
// className="responsive-img"
|
||||||
src={strCategoryThumb}
|
src={strCategoryThumb}
|
||||||
alt={strCategory}
|
alt={strCategory}
|
||||||
/>
|
/>
|
||||||
{/* <span className="card-title red-text">{strCategory}</span> */}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="card-stacked">
|
<div className="card-stacked">
|
||||||
<div className="card-content black-text">
|
<div className="card-content black-text">
|
||||||
<h4 className="logo">{strCategory}</h4>
|
<h4 className="logo">{strCategory}</h4>
|
||||||
<p>{strCategoryDescription}</p>
|
{/* <p>{strCategoryDescription}</p> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,26 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { CopyrightText } from "./CopyrightText";
|
import { CopyrightText } from "./CopyrightText";
|
||||||
import { GitHubLink } from "./GitHubLink";
|
import { GitHubLink } from "./GitHubLink";
|
||||||
|
import { FooterLink } from "./FooterLink";
|
||||||
|
|
||||||
export const Footer = () => {
|
export const Footer = () => {
|
||||||
|
const links = ["categories", "random"];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="page-footer">
|
<footer className="page-footer">
|
||||||
|
<div className="row">
|
||||||
|
<div className="container">
|
||||||
|
<div className=" s12">
|
||||||
|
<h5 className="white-text">Links</h5>
|
||||||
|
<ul>
|
||||||
|
{links.map((link, i) => (
|
||||||
|
<FooterLink i={i} link={link} />
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="footer-copyright">
|
<div className="footer-copyright">
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<CopyrightText />
|
<CopyrightText />
|
||||||
|
|
|
||||||
13
src/components/FooterLink.js
Normal file
13
src/components/FooterLink.js
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
import React from "react";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import { upFirstChar } from "../utils/methods";
|
||||||
|
|
||||||
|
export const FooterLink = ({ link, i }) => {
|
||||||
|
return (
|
||||||
|
<li key={i}>
|
||||||
|
<Link className="grey-text text-lighten-3" to={`/${link}`}>
|
||||||
|
{upFirstChar(link)}
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
@ -27,7 +27,7 @@ export const Navbar = props => {
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{/* <ul id="slide-out" class="sidenav">
|
{/* <ul id="slide-out" class="sidenav show-on-small">
|
||||||
<li>
|
<li>
|
||||||
<div class="user-view">
|
<div class="user-view">
|
||||||
<div class="background">
|
<div class="background">
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,10 @@ export const getData = (keyword, set, option = null) => {
|
||||||
const URI = createURI(keyword, option);
|
const URI = createURI(keyword, option);
|
||||||
fetch(URI)
|
fetch(URI)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
|
.catch(error => console.info(error + "url:" + URI))
|
||||||
.then(data => set(data));
|
.then(data => set(data));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const upFirstChar = lower => {
|
||||||
|
return lower.replace(/^\w/, c => c.toUpperCase());
|
||||||
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue