diff --git a/client/src/App.js b/client/src/App.js index 1215eaa..cb9bcc7 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -10,13 +10,21 @@ import Footer from './components/footer'; export default function App() { return ( +
+ + + }/> + }/> + +
); } diff --git a/client/src/components/aboutSection.js b/client/src/components/aboutSection.js new file mode 100644 index 0000000..f1d3bc7 --- /dev/null +++ b/client/src/components/aboutSection.js @@ -0,0 +1,22 @@ +import React from 'react'; + +import Row from 'react-bootstrap/Row'; +import Col from 'react-bootstrap/Col'; + +export default function AboutSection(props) { + return( + + + + +

{props.section.header}

+ +
+ +

{props.section.description}

+ + + +
+ ); +} \ No newline at end of file diff --git a/client/src/components/cardHolder.js b/client/src/components/cardHolder.js index 4eba3c4..4b9800a 100644 --- a/client/src/components/cardHolder.js +++ b/client/src/components/cardHolder.js @@ -3,13 +3,15 @@ import Container from 'react-bootstrap/Container'; import Row from 'react-bootstrap/Row'; export default function CardHolder(props) { - return( + + {props.children} + + ); - } \ No newline at end of file diff --git a/client/src/components/characterCard.js b/client/src/components/characterCard.js index 37fe4de..f78d866 100644 --- a/client/src/components/characterCard.js +++ b/client/src/components/characterCard.js @@ -10,27 +10,44 @@ export default function CharacterCard(props) { const lastEpisode = props.character.lastEpisode; return( - + + + {characterName} + + + + + + + + + + + + +
First Episode:{firstEpisode}
Last Episode:{lastEpisode}
+
+
+
- ); } \ No newline at end of file diff --git a/client/src/components/footer.js b/client/src/components/footer.js index 8818f18..d44b73f 100644 --- a/client/src/components/footer.js +++ b/client/src/components/footer.js @@ -1,5 +1,9 @@ import React from 'react'; + import { Github } from 'react-bootstrap-icons'; +import { Globe } from 'react-bootstrap-icons'; +import { Envelope } from 'react-bootstrap-icons'; + import Container from 'react-bootstrap/Container'; import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; @@ -7,6 +11,7 @@ import Col from 'react-bootstrap/Col'; export default function Footer() { return ( ) } \ No newline at end of file diff --git a/client/src/components/greeting.js b/client/src/components/greeting.js index 0519ae0..ece1347 100644 --- a/client/src/components/greeting.js +++ b/client/src/components/greeting.js @@ -4,19 +4,26 @@ import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; export default function Greeting() { - return ( - + - + -

+

The Criminal Minds API

+ Welcome to the Criminal Minds API! The documentation should supply you with all the information you need to start making requests. It is programmatically generated using swagger and provides the ability to make exploratory calls easily. Give it a review before you get started on your project. +

+ +

+ Note the api is free, but to prevent malicious activity there is a rate limit of 10,000 requests a day. If that limit is reached you will receive a response with a 429 status code. Details about your rate limit standing are returned in response headers, specifically the x-rate-limit-limit, x-rate-limit-remaining, and x-rate-limit-reset headers. +

+ +

Checkout the documentation.

@@ -26,5 +33,4 @@ export default function Greeting() {
); - } \ No newline at end of file diff --git a/client/src/components/loading.js b/client/src/components/loading.js index 1565269..71b2474 100644 --- a/client/src/components/loading.js +++ b/client/src/components/loading.js @@ -5,11 +5,13 @@ import Col from 'react-bootstrap/Col'; import { TailSpin } from 'react-loading-icons'; export default function Loading() { - return ( + + + +
Loading...
+ +
+
); - } \ No newline at end of file diff --git a/client/src/components/navbar.js b/client/src/components/navbar.js index d11d9a3..0eef82c 100644 --- a/client/src/components/navbar.js +++ b/client/src/components/navbar.js @@ -5,7 +5,6 @@ import { NavLink } from 'react-router-dom'; import Container from 'react-bootstrap/Container'; export default function NavBar() { - return ( ) - } \ No newline at end of file diff --git a/client/src/constants.js b/client/src/constants.js index 2c17bc5..7d97c00 100644 --- a/client/src/constants.js +++ b/client/src/constants.js @@ -5,8 +5,36 @@ const baseUrl = process.env.NODE_ENV === 'development' ? const versionHeader = 'x-api-version'; const versionHeaderValue = 1; +const aboutSections = [ + { + header: "Who", + description: "Hi, I'm Stevan Freeborn. I am well...someone who likes to make things and put them on the interwebz. One of my favorite tv shows is Criminal Minds." + }, + { + header: "What", + description: "The Criminal Minds API is a collection of information about the Criminal Minds series. This information is organized into Characters, Episodes, Quotes, and Seasons. The API has documentation that is programmatically generated using swagger and can be used to make exploratory requests." + }, + { + header: "Why", + description: "I've been learning how to code and wanted to build a web api using MongoDB, ASP.NET Core 6, and React and I figured what better subject matter than one of my favorite tv shows." + }, + { + header: "Issues", + description: "If you come across any errors, missing information, or would like to suggest changes, please contribute by creating an issue or a pull request on GitHub." + }, + { + header: "Contact", + description: "If you would like to talk about the project or discuss the finer points of brewing a great cup of coffee, send me an email at stevan.freeborn@gmail.com. I would love to chat with you." + }, + { + header: "License", + description: "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + } +]; + export { baseUrl, versionHeader, - versionHeaderValue + versionHeaderValue, + aboutSections }; diff --git a/client/src/index.js b/client/src/index.js index 0aba3ad..28f15bb 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -8,9 +8,13 @@ const root = ReactDOM.createRoot(document.getElementById('root')); root.render( + + + + ); diff --git a/client/src/pages/about.js b/client/src/pages/about.js index 64959c5..0830d5d 100644 --- a/client/src/pages/about.js +++ b/client/src/pages/about.js @@ -1,8 +1,47 @@ import React from 'react'; -import Loading from '../components/loading'; + +import Container from 'react-bootstrap/Container'; +import Row from 'react-bootstrap/Row'; +import Col from 'react-bootstrap/Col'; + +import AboutSection from '../components/aboutSection'; +import { aboutSections as sections } from '../constants'; export default function About() { + + const getSections = () => { + + return sections.map(section => { + + return ( + + + + ); + + }); + + } + return ( -

Coming soon...

+ + + + + + + +

Wheels up...

+ + + +
+ + {getSections()} + +
+ ); } \ No newline at end of file diff --git a/client/src/pages/home.js b/client/src/pages/home.js index f3c8e9a..1c46759 100644 --- a/client/src/pages/home.js +++ b/client/src/pages/home.js @@ -16,6 +16,7 @@ export default function Home() { const res = await characterService.getCharacters(); + // TODO: Handle a failed request. if (!res.ok) return; const characters = await res.json(); @@ -47,10 +48,15 @@ export default function Home() { return ( <> + {characters.length > 0 ? + + {getCharacterCards()} + + : } );