Skip to content

Commit

Permalink
Merge pull request #163 from benni347/update_to_next_13
Browse files Browse the repository at this point in the history
Mitigated to next_v_13
  • Loading branch information
benni347 authored Dec 29, 2022
2 parents f8f0531 + a4b4590 commit 7615b7a
Show file tree
Hide file tree
Showing 11 changed files with 321 additions and 276 deletions.
10 changes: 5 additions & 5 deletions components/cert.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import NextLink from 'next/link'
import { Heading, Box, Image, Link, Badge} from '@chakra-ui/react'
import { ChevronRightIcon } from '@chakra-ui/icons'
import {Badge, Box, Heading, Image, Link} from '@chakra-ui/react'
import {ChevronRightIcon} from '@chakra-ui/icons'

export const Title = ({ children }) => (
<Box>
<NextLink href="/certificates">
<Link>Certificates</Link>
<NextLink href="/certificates" legacyBehavior>
<Link>Certificates</Link>
</NextLink>
<span>
{' '}
<ChevronRightIcon />{' '}
<ChevronRightIcon/>{' '}
</span>
<Heading display="inline-block" as="h3" fontSize={20} mb={4}>
{children}
Expand Down
26 changes: 13 additions & 13 deletions components/grid-item.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NextLink from 'next/link'
import Image from 'next/image'
import { Box, Text, LinkBox, LinkOverlay } from '@chakra-ui/react'
import { Global } from '@emotion/react'
import {Box, LinkBox, LinkOverlay, Text} from '@chakra-ui/react'
import {Global} from '@emotion/react'

export const GridItem = ({ children, href, title, thumbnail}) => (
<Box w="100%" align="center">
Expand All @@ -21,17 +21,17 @@ export const GridItem = ({ children, href, title, thumbnail}) => (

export const WorkGridItem = ({ children, id, title, thumbnail }) => (
<Box w="100%" textAlign="center">
<NextLink href={`/works/${id}`}>
<LinkBox cursor="pointer">
<Image
src={thumbnail}
alt={title}
className="grid-item-thumbnail"
placeholder="blur"
/>
<LinkOverlay href={`/works/${id}`}>
<Text mt={2} fontSize={20}>
{title}
<NextLink href={`/works/${id}`} legacyBehavior>
<LinkBox cursor="pointer">
<Image
src={thumbnail}
alt={title}
className="grid-item-thumbnail"
placeholder="blur"
/>
<LinkOverlay href={`/works/${id}`}>
<Text mt={2} fontSize={20}>
{title}
</Text>
</LinkOverlay>
<Text fontSize={14}>{children}</Text>
Expand Down
34 changes: 17 additions & 17 deletions components/logo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from 'next/link'
import Image from 'next/image'
import { Text, useColorModeValue } from '@chakra-ui/react'
import {Text, useColorModeValue} from '@chakra-ui/react'
import styled from '@emotion/styled'

const LogoBox = styled.span`
Expand All @@ -21,22 +21,22 @@ const Logo = () => {
const footPrintImg = `/images/footprint${useColorModeValue('', '-dark')}.png`

return (
<Link href="/">
<a>
<LogoBox>
<Image src={footPrintImg} width={20} height={20} alt="logo" />
<Text
color={useColorModeValue('gray.800', 'whiteAlpha.900')}
fontFamily='M PLUS Rounded 1c", sans-serif'
fontWeight="bold"
ml={3}
>
Cédric Skwar
</Text>
</LogoBox>
</a>
</Link>
)
(<Link href="/">

<LogoBox>
<Image src={footPrintImg} width={20} height={20} alt="logo"/>
<Text
color={useColorModeValue('gray.800', 'whiteAlpha.900')}
fontFamily='M PLUS Rounded 1c", sans-serif'
fontWeight="bold"
ml={3}
>
Cédric Skwar
</Text>
</LogoBox>

</Link>)
);
}

export default Logo
54 changes: 27 additions & 27 deletions components/navbar.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
import Logo from './logo'
import NextLink from 'next/link'
import {
Container,
Box,
Link,
Stack,
Heading,
Container,
Flex,
Heading,
IconButton,
Link,
Menu,
MenuButton,
MenuItem,
MenuList,
MenuButton,
IconButton,
Stack,
useColorModeValue
} from '@chakra-ui/react'
import { HamburgerIcon } from '@chakra-ui/icons'
import {HamburgerIcon} from '@chakra-ui/icons'
import ThemeToggleButton from './theme-toggle-button'


const LinkItem = ({ href, path, children, _target, ...props }) => {
const active = path === href
const inactiveColor = useColorModeValue('gray200', 'whiteAlpha.900')
return (
<NextLink href={href} passHref>
<Link
p={2}
bg={active ? 'grassTeal' : undefined}
color={active ? '#202023' : inactiveColor}
_target={_target}
{...props}
borderRadius="lg"
>
{children}
</Link>
</NextLink>
)
<NextLink href={href} passHref legacyBehavior>
<Link
p={2}
bg={active ? 'grassTeal' : undefined}
color={active ? '#202023' : inactiveColor}
_target={_target}
{...props}
borderRadius="lg"
>
{children}
</Link>
</NextLink>
);
}

const NavBar = props => {
Expand Down Expand Up @@ -85,29 +85,29 @@ const NavBar = props => {
<Menu>
<MenuButton as={IconButton} icon={<HamburgerIcon />} variant="outline" aria-label="Options" />
<MenuList>
<NextLink href="/" passHref>
<NextLink href="/" passHref legacyBehavior>
<MenuItem as={Link}>About</MenuItem>
</NextLink>
<NextLink href="/works" passHref>
<NextLink href="/works" passHref legacyBehavior>
<MenuItem as={Link}>Works</MenuItem>
</NextLink>
<NextLink href="/posts" passHref>
<NextLink href="/posts" passHref legacyBehavior>
<MenuItem as={Link}>Posts</MenuItem>
</NextLink>
<NextLink href="/profiles" passHref>
<NextLink href="/profiles" passHref legacyBehavior>
<MenuItem as={Link}>Profiles</MenuItem>
</NextLink>
<NextLink href="/certificates" passHref>
<NextLink href="/certificates" passHref legacyBehavior>
<MenuItem as={Link}>Certificates</MenuItem>
</NextLink>
<MenuItem as={Link} href="https://github.com/benni347/portfolio">View Source</MenuItem>
<MenuItem as={Link} href="https://github.com/benni347/portfolio">View Source</MenuItem>
</MenuList>
</Menu>
</Box>
</Box>
</Container>
</Box>
)
);
}

export default NavBar
10 changes: 5 additions & 5 deletions components/posts.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import NextLink from 'next/link'
import { Heading, Box, Image, Link, Badge} from '@chakra-ui/react'
import { ChevronRightIcon } from '@chakra-ui/icons'
import {Badge, Box, Heading, Image, Link} from '@chakra-ui/react'
import {ChevronRightIcon} from '@chakra-ui/icons'

export const Title = ({ children }) => (
<Box>
<NextLink href="/posts">
<Link>Posts</Link>
<NextLink href="/posts" legacyBehavior>
<Link>Posts</Link>
</NextLink>
<span>
{' '}
<ChevronRightIcon />{' '}
<ChevronRightIcon/>{' '}
</span>
<Heading display="inline-block" as="h3" fontSize={20} mb={4}>
{children}
Expand Down
10 changes: 5 additions & 5 deletions components/work.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import NextLink from 'next/link'
import { Heading, Box, Image, Link, Badge} from '@chakra-ui/react'
import { ChevronRightIcon } from '@chakra-ui/icons'
import {Badge, Box, Heading, Image, Link} from '@chakra-ui/react'
import {ChevronRightIcon} from '@chakra-ui/icons'

export const Title = ({ children }) => (
<Box>
<NextLink href="/works">
<Link>Works</Link>
<NextLink href="/works" legacyBehavior>
<Link>Works</Link>
</NextLink>
<span>
{' '}
<ChevronRightIcon />{' '}
<ChevronRightIcon/>{' '}
</span>
<Heading display="inline-block" as="h3" fontSize={20} mb={4}>
{children}
Expand Down
5 changes: 0 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
module.exports = {
reactStrictMode: true,
webpack5: true
}

Loading

0 comments on commit 7615b7a

Please sign in to comment.