formatting

This commit is contained in:
StevanFreeborn
2022-06-26 11:49:03 -05:00
parent 7ff302a41d
commit da36cfa782
10 changed files with 61 additions and 12 deletions
+8
View File
@@ -10,13 +10,21 @@ import Footer from './components/footer';
export default function App() { export default function App() {
return ( return (
<div className='d-flex flex-column min-vh-100'> <div className='d-flex flex-column min-vh-100'>
<NavBar/> <NavBar/>
<Routes> <Routes>
<Route path='/' element={<Home/>}/> <Route path='/' element={<Home/>}/>
<Route path='/About' element={<About/>}/> <Route path='/About' element={<About/>}/>
</Routes> </Routes>
<Footer/> <Footer/>
</div> </div>
); );
} }
+4 -2
View File
@@ -3,13 +3,15 @@ import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row'; import Row from 'react-bootstrap/Row';
export default function CardHolder(props) { export default function CardHolder(props) {
return( return(
<Container fluid className="bg-dark"> <Container fluid className="bg-dark">
<Row className="d-flex flex-row justify-content-center align-items-center py-3"> <Row className="d-flex flex-row justify-content-center align-items-center py-3">
{props.children} {props.children}
</Row> </Row>
</Container> </Container>
); );
} }
+19 -2
View File
@@ -10,27 +10,44 @@ export default function CharacterCard(props) {
const lastEpisode = props.character.lastEpisode; const lastEpisode = props.character.lastEpisode;
return( return(
<Card style={{ width: '22rem' }} className='p-1 m-3'> <Card style={{ width: '22rem' }} className='p-1 m-3'>
<Card.Img variant='top' src={image} width='100%' /> <Card.Img variant='top' src={image} width='100%' />
<Card.Body> <Card.Body>
<Card.Title>{characterName}</Card.Title> <Card.Title>{characterName}</Card.Title>
<Card.Text> <Card.Text>
<Table> <Table>
<tbody> <tbody>
<tr> <tr>
<td className='fw-bold'>First Episode:</td> <td className='fw-bold'>First Episode:</td>
<td>{firstEpisode}</td> <td>{firstEpisode}</td>
</tr> </tr>
<tr> <tr>
<td className='fw-bold'>Last Episode:</td> <td className='fw-bold'>Last Episode:</td>
<td>{lastEpisode}</td> <td>{lastEpisode}</td>
</tr> </tr>
</tbody> </tbody>
</Table> </Table>
</Card.Text> </Card.Text>
</Card.Body> </Card.Body>
</Card> </Card>
); );
} }
+6
View File
@@ -1,7 +1,9 @@
import React from 'react'; import React from 'react';
import { Github } from 'react-bootstrap-icons'; import { Github } from 'react-bootstrap-icons';
import { Globe } from 'react-bootstrap-icons'; import { Globe } from 'react-bootstrap-icons';
import { Envelope } from 'react-bootstrap-icons'; import { Envelope } from 'react-bootstrap-icons';
import Container from 'react-bootstrap/Container'; import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row'; import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col'; import Col from 'react-bootstrap/Col';
@@ -17,9 +19,13 @@ export default function Footer() {
<Row> <Row>
<Col className='text-start'> <Col className='text-start'>
<span> <span>
<span className='highlight'>criminal</span>mindsapi &#169; 2022 <span className='highlight'>criminal</span>mindsapi &#169; 2022
</span> </span>
</Col> </Col>
<Col className='text-end'> <Col className='text-end'>
-2
View File
@@ -4,7 +4,6 @@ import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col'; import Col from 'react-bootstrap/Col';
export default function Greeting() { export default function Greeting() {
return ( return (
<Container> <Container>
@@ -34,5 +33,4 @@ export default function Greeting() {
</Container> </Container>
); );
} }
+7 -2
View File
@@ -5,11 +5,13 @@ import Col from 'react-bootstrap/Col';
import { TailSpin } from 'react-loading-icons'; import { TailSpin } from 'react-loading-icons';
export default function Loading() { export default function Loading() {
return ( return (
<Container className='m-auto'> <Container className='m-auto'>
<Row> <Row>
<Col className='text-center'> <Col className='text-center'>
<TailSpin <TailSpin
height='3em' height='3em'
fill='#912718' fill='#912718'
@@ -19,10 +21,13 @@ export default function Loading() {
strokeOpacity={1} strokeOpacity={1}
strokeWidth={2} strokeWidth={2}
/> />
<div className='mt-2'>Loading...</div> <div className='mt-2'>Loading...</div>
</Col> </Col>
</Row> </Row>
</Container> </Container>
); );
} }
-2
View File
@@ -5,7 +5,6 @@ import { NavLink } from 'react-router-dom';
import Container from 'react-bootstrap/Container'; import Container from 'react-bootstrap/Container';
export default function NavBar() { export default function NavBar() {
return ( return (
<Navbar <Navbar
expand='sm' expand='sm'
@@ -62,5 +61,4 @@ export default function NavBar() {
</Navbar> </Navbar>
) )
} }
+4
View File
@@ -8,9 +8,13 @@ const root = ReactDOM.createRoot(document.getElementById('root'));
root.render( root.render(
<React.StrictMode> <React.StrictMode>
<BrowserRouter> <BrowserRouter>
<App /> <App />
</BrowserRouter> </BrowserRouter>
</React.StrictMode> </React.StrictMode>
); );
+8 -2
View File
@@ -13,7 +13,13 @@ export default function About() {
return sections.map(section => { return sections.map(section => {
return <AboutSection section={section}/> return (
<AboutSection
section={section}
/>
);
}); });
@@ -27,7 +33,7 @@ export default function About() {
<Col> <Col>
<h1 className='text-center py-4'>Wanna know more?</h1> <h1 className='text-center py-4'>Wheels up...</h1>
</Col> </Col>
+5
View File
@@ -48,10 +48,15 @@ export default function Home() {
return ( return (
<> <>
<Greeting /> <Greeting />
{characters.length > 0 ? {characters.length > 0 ?
<CardHolder> <CardHolder>
{getCharacterCards()} {getCharacterCards()}
</CardHolder> </CardHolder>
: <Loading />} : <Loading />}
</> </>
); );