diff --git a/public/images/srkw2-36.jpg b/public/images/srkw2-36.jpg new file mode 100644 index 0000000..b247910 Binary files /dev/null and b/public/images/srkw2-36.jpg differ diff --git a/src/components/BlogItem.tsx b/src/components/BlogItem.tsx new file mode 100644 index 0000000..e4e17f8 --- /dev/null +++ b/src/components/BlogItem.tsx @@ -0,0 +1,70 @@ +import { styled, Typography } from '@mui/material' +import Image from 'next/image' + +import Link from './Link' + +interface BlogItemProps { + image: string + title?: string + summary?: string + datePublished?: string + author?: string +} + +const BlogItemContainer = styled('div')({ + width: '48%', + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + margin: '20px 0', + '@media(max-width: 785px)': { + width: '68%', + flexWrap: 'wrap', + }, +}) + +const BlogItemBody = styled('div')({ + display: 'flex', + flexDirection: 'column', + margin: '0 20px', + '@media(max-width: 785px)': { + margin: 0, + marginTop: 20, + }, +}) + +const BlogItem = ({ + image, + title, + summary, + datePublished, + author, +}: BlogItemProps) => { + return ( + + {title} + + + {title} + + + Posted on {datePublished} By {author} + + + {summary} + + Read More... + + + ) +} + +export default BlogItem diff --git a/src/pages/blog.jsx b/src/pages/blog.jsx new file mode 100644 index 0000000..5c31779 --- /dev/null +++ b/src/pages/blog.jsx @@ -0,0 +1,90 @@ +import KeyboardDoubleArrowDownRoundedIcon from '@mui/icons-material/KeyboardDoubleArrowDownRounded' +import { Typography } from '@mui/material' +import { styled } from '@mui/system' + +import frequency1 from '../../public/images/frequency.png' +import BlogItem from '../components/BlogItem' +import blogStyles from '../styles/blog.module.css' + +// TODO: replace CSS module with MUI styled() +// should use next/image instead of backgroundImage +// eslint-disable-next-line no-unused-vars +const Banner = styled('div')({ + // backgroundImage: "url('../../public/images/frequency.png')", + backgroundSize: 'cover', + backgroundRepeat: 'no-repeat', + backgroundPosition: '50% 55%', +}) + +const Overlay = styled('div')({ + height: '88vh', + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + alignItems: 'center', + backgroundColor: 'rgba(5, 28, 90, 0.3)', +}) + +const BlogItemList = styled('section')({ + display: 'flex', + flexDirection: 'column', + alignItems: 'center', +}) + +const Blog = () => { + const data = [ + { + image: frequency1, + title: 'Lone first to hear j+K pods entering Puget Sound at Bush Point', + summary: + 'This morning at around 8:30, Lon Brocklehurst texted that he was hearing orcas on the Bush Point. Though it ...', + date: '2020-11-11', + author: 'Scott Veirs', + }, + { + image: frequency1, + title: 'Election Night humpback calls at Orcasound', + summary: + 'For about a half hour 20:00 this evening (Tues, 3 Nov 2020), Humpback calls were recorded at Orcasound', + date: '2020-11-04', + author: 'Scott Veirs', + }, + ] + + return ( + <> +
+ + + Blog + + + +
+ + {data.map((item, id) => ( + + ))} + + + ) +} + +export default Blog diff --git a/src/styles/blog.module.css b/src/styles/blog.module.css new file mode 100644 index 0000000..0c38acb --- /dev/null +++ b/src/styles/blog.module.css @@ -0,0 +1,6 @@ +.banner { + background: url('../../public/images/srkw2-36.jpg'); + background-size: cover; + background-repeat: no-repeat; + background-position: 50% 55%; +} diff --git a/src/styles/theme.ts b/src/styles/theme.ts index 5654cb8..9a3dacd 100644 --- a/src/styles/theme.ts +++ b/src/styles/theme.ts @@ -13,10 +13,6 @@ const theme = createTheme({ error: { main: red.A400, }, - text: { - primary: '#ffffff', - secondary: '#007bff', - }, }, })