fixes and added a couple of changes.
- fixed responsive issues - added navbar drawer for mobile device - added experiences and footer section
This commit is contained in:
parent
10b179f6e3
commit
932b6f6a8f
@ -1,11 +1,12 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { AppShell, Container, rem } from '@mantine/core'
|
import { AppShell, Container, Stack, rem } from '@mantine/core'
|
||||||
import Introduction from '../partials/Introduction'
|
import Introduction from '../partials/Introduction'
|
||||||
import About from '../partials/About'
|
import About from '../partials/About'
|
||||||
import Navbar from '../components/Navbar'
|
import Navbar from '../components/Navbar'
|
||||||
import Footer from '../components/Footer'
|
import Footer from '../components/Footer'
|
||||||
import SlideUpWhenVisible from '../hooks/slideUpWhenVisible'
|
import SlideUpWhenVisible from '../hooks/slideUpWhenVisible'
|
||||||
|
import Experiences from '../partials/Experiences'
|
||||||
|
|
||||||
export default function HomePage() {
|
export default function HomePage() {
|
||||||
return (
|
return (
|
||||||
@ -18,13 +19,16 @@ export default function HomePage() {
|
|||||||
<Navbar />
|
<Navbar />
|
||||||
</AppShell.Header>
|
</AppShell.Header>
|
||||||
<AppShell.Main>
|
<AppShell.Main>
|
||||||
<SlideUpWhenVisible>
|
<SlideUpWhenVisible threshold={0.2}>
|
||||||
<Container
|
<Container
|
||||||
size={rem(1920)}
|
size={rem(1920)}
|
||||||
px={{ base: '0rem', lg: '4rem', xl: '8rem' }}>
|
px={{ base: '0rem', lg: '4rem', xl: '8rem' }}>
|
||||||
<Introduction />
|
<Stack>
|
||||||
<About />
|
<Introduction />
|
||||||
<Footer />
|
<About />
|
||||||
|
<Experiences />
|
||||||
|
<Footer />
|
||||||
|
</Stack>
|
||||||
</Container>
|
</Container>
|
||||||
</SlideUpWhenVisible>
|
</SlideUpWhenVisible>
|
||||||
</AppShell.Main>
|
</AppShell.Main>
|
||||||
|
@ -1,18 +1,40 @@
|
|||||||
import { Anchor, Container, Text } from '@mantine/core'
|
import { Anchor, Badge, Box, SimpleGrid, Stack, Text } from '@mantine/core'
|
||||||
|
import pkg from '../../package.json'
|
||||||
|
|
||||||
|
const { version } = pkg
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Box mt='xl'>
|
||||||
<Text
|
<SimpleGrid
|
||||||
fw='bold'
|
cols={{ base: 1, sm: 2 }}
|
||||||
ta='center'>
|
h={120}
|
||||||
Created with ❤️ by{' '}
|
spacing={{ base: 'sm', md: 'md', lg: 'lg' }}>
|
||||||
<Anchor
|
<Stack>
|
||||||
fw='bold'
|
<Text fw='bold'>
|
||||||
href='https://github.com/Refansa'>
|
Email:{' '}
|
||||||
Refansa
|
<Anchor href='mailto:m.refansa.am@gmail.com'>
|
||||||
</Anchor>
|
m.refansa.am@gmail.com
|
||||||
</Text>
|
</Anchor>
|
||||||
</Container>
|
</Text>
|
||||||
|
<Text fw='bold'>
|
||||||
|
Tel:{' '}
|
||||||
|
<Anchor href='tel:+62-812-8543-3284'>(+62) 812-8543-3284</Anchor>
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
<Stack>{/* empty space */}</Stack>
|
||||||
|
</SimpleGrid>
|
||||||
|
<Stack align='center'>
|
||||||
|
<Badge variant='outline'>V. {version}</Badge>
|
||||||
|
<Text fw='bold'>
|
||||||
|
Created with ❤️ by{' '}
|
||||||
|
<Anchor
|
||||||
|
fw='bold'
|
||||||
|
href='https://github.com/Refansa'>
|
||||||
|
Refansa
|
||||||
|
</Anchor>
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
</Box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
import { Button } from '@mantine/core'
|
import { Button } from '@mantine/core'
|
||||||
|
import { MouseEventHandler } from 'react'
|
||||||
|
|
||||||
interface NavLinkProps {
|
interface NavLinkProps {
|
||||||
content: string
|
content: string
|
||||||
href: string
|
href: string
|
||||||
|
onClick?: MouseEventHandler<HTMLElement>
|
||||||
}
|
}
|
||||||
|
|
||||||
function NavLink({ content, href }: NavLinkProps) {
|
function NavLink({ content, href, onClick }: NavLinkProps) {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
component={'a'}
|
component={'a'}
|
||||||
variant='subtle'
|
variant='subtle'
|
||||||
size='md'
|
size='md'
|
||||||
|
onClick={onClick}
|
||||||
href={href}>
|
href={href}>
|
||||||
{content}
|
{content}
|
||||||
</Button>
|
</Button>
|
||||||
|
35
src/components/NavMobile.tsx
Normal file
35
src/components/NavMobile.tsx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import { useDisclosure } from '@mantine/hooks'
|
||||||
|
import { Box, Burger, Drawer, Stack } from '@mantine/core'
|
||||||
|
import NavLink from './NavLink'
|
||||||
|
|
||||||
|
export default function NavMobile() {
|
||||||
|
const [opened, { open, close }] = useDisclosure(false)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box hiddenFrom='sm'>
|
||||||
|
<Drawer
|
||||||
|
opened={opened}
|
||||||
|
onClose={close}
|
||||||
|
overlayProps={{ backgroundOpacity: 0.5, blur: 1 }}
|
||||||
|
position='right'
|
||||||
|
size='xs'>
|
||||||
|
<Stack>
|
||||||
|
<NavLink
|
||||||
|
content='About'
|
||||||
|
href='/#about'
|
||||||
|
onClick={close}
|
||||||
|
/>
|
||||||
|
<NavLink
|
||||||
|
content='Projects'
|
||||||
|
href='https://github.com/Refansa?tab=repositories'
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
</Drawer>
|
||||||
|
<Burger
|
||||||
|
opened={opened}
|
||||||
|
onClick={open}
|
||||||
|
aria-label='Toggle navigation'
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
)
|
||||||
|
}
|
@ -3,6 +3,7 @@ import { Box, Group } from '@mantine/core'
|
|||||||
import classes from './Navbar.module.css'
|
import classes from './Navbar.module.css'
|
||||||
import NavIcon from './NavIcon'
|
import NavIcon from './NavIcon'
|
||||||
import NavLink from './NavLink'
|
import NavLink from './NavLink'
|
||||||
|
import NavMobile from './NavMobile'
|
||||||
|
|
||||||
function Navbar() {
|
function Navbar() {
|
||||||
return (
|
return (
|
||||||
@ -20,6 +21,7 @@ function Navbar() {
|
|||||||
href='https://github.com/Refansa?tab=repositories'
|
href='https://github.com/Refansa?tab=repositories'
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
|
<NavMobile />
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,7 @@ function About() {
|
|||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
id='about'
|
id='about'
|
||||||
mt='xl'
|
my='xl'>
|
||||||
mah='100vh'
|
|
||||||
h='100vh'>
|
|
||||||
<SimpleGrid
|
<SimpleGrid
|
||||||
cols={{ base: 1, sm: 2 }}
|
cols={{ base: 1, sm: 2 }}
|
||||||
spacing={{ base: 'sm', md: 'md', lg: 'lg' }}>
|
spacing={{ base: 'sm', md: 'md', lg: 'lg' }}>
|
||||||
|
129
src/partials/Experiences.tsx
Normal file
129
src/partials/Experiences.tsx
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
import { Box, Paper, SimpleGrid, Stack, Text, Title } from '@mantine/core'
|
||||||
|
import {
|
||||||
|
IconBrandCss3,
|
||||||
|
IconBrandHtml5,
|
||||||
|
IconBrandJavascript,
|
||||||
|
IconBrandLaravel,
|
||||||
|
IconBrandMantine,
|
||||||
|
IconBrandMysql,
|
||||||
|
IconBrandNextjs,
|
||||||
|
IconBrandNodejs,
|
||||||
|
IconBrandPhp,
|
||||||
|
IconBrandPrisma,
|
||||||
|
IconBrandPython,
|
||||||
|
IconBrandReact,
|
||||||
|
IconBrandSass,
|
||||||
|
IconBrandSupabase,
|
||||||
|
IconBrandTailwind,
|
||||||
|
IconBrandVue,
|
||||||
|
} from '@tabler/icons-react'
|
||||||
|
|
||||||
|
interface ItemGridProps {
|
||||||
|
icon: React.ReactNode
|
||||||
|
text: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const ItemGrid = ({ icon, text }: ItemGridProps) => {
|
||||||
|
return (
|
||||||
|
<Paper
|
||||||
|
w={100}
|
||||||
|
h={100}>
|
||||||
|
<Stack
|
||||||
|
p='sm'
|
||||||
|
w='inherit'
|
||||||
|
h='inherit'
|
||||||
|
align='center'
|
||||||
|
justify='center'>
|
||||||
|
{icon}
|
||||||
|
<Text>{text}</Text>
|
||||||
|
</Stack>
|
||||||
|
</Paper>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Experiences() {
|
||||||
|
return (
|
||||||
|
<Box my='xl'>
|
||||||
|
<Stack align='center'>
|
||||||
|
<Title>Experiences</Title>
|
||||||
|
<Text fz='lg'>
|
||||||
|
I have worked and used these awesome technologies in my projects
|
||||||
|
</Text>
|
||||||
|
<SimpleGrid
|
||||||
|
mt='xl'
|
||||||
|
w={{ base: 240, sm: 480, md: 720, lg: 960 }}
|
||||||
|
cols={{ base: 2, sm: 4, md: 6, lg: 8 }}>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandHtml5 />}
|
||||||
|
text='HTML'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandCss3 />}
|
||||||
|
text='CSS'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandJavascript />}
|
||||||
|
text='Javascript'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandPhp />}
|
||||||
|
text='PHP'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandPython />}
|
||||||
|
text='Python'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandMysql />}
|
||||||
|
text='MySQL'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandLaravel />}
|
||||||
|
text='Laravel'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandNodejs />}
|
||||||
|
text='NodeJS'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandReact />}
|
||||||
|
text='React'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandVue />}
|
||||||
|
text='Vue'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandTailwind />}
|
||||||
|
text='Tailwind'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandSass />}
|
||||||
|
text='Sass'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandMantine />}
|
||||||
|
text='Mantine'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandNextjs />}
|
||||||
|
text='NextJS'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandPrisma />}
|
||||||
|
text='Prisma'
|
||||||
|
/>
|
||||||
|
<ItemGrid
|
||||||
|
icon={<IconBrandSupabase />}
|
||||||
|
text='Supabase'
|
||||||
|
/>
|
||||||
|
</SimpleGrid>
|
||||||
|
<Text
|
||||||
|
mt='xl'
|
||||||
|
fs='italic'>
|
||||||
|
And probably many more...
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
</Box>
|
||||||
|
)
|
||||||
|
}
|
@ -7,7 +7,7 @@ function Introduction() {
|
|||||||
<Box
|
<Box
|
||||||
mt='xl'
|
mt='xl'
|
||||||
mah='100vh'
|
mah='100vh'
|
||||||
h='80vh'
|
h='100vh'
|
||||||
className={classes.background}>
|
className={classes.background}>
|
||||||
<Flex
|
<Flex
|
||||||
align='center'
|
align='center'
|
||||||
|
15
src/styles/extends/Drawer.module.css
Normal file
15
src/styles/extends/Drawer.module.css
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
@mixin dark {
|
||||||
|
background-color: var(--mantine-color-dark-8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
@mixin dark {
|
||||||
|
background-color: var(--mantine-color-dark-8);
|
||||||
|
}
|
||||||
|
}
|
10
src/styles/extends/Drawer.ts
Normal file
10
src/styles/extends/Drawer.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { Drawer as Component } from '@mantine/core'
|
||||||
|
import classes from './Drawer.module.css'
|
||||||
|
|
||||||
|
export const Drawer = Component.extend({
|
||||||
|
classNames: {
|
||||||
|
title: classes.title,
|
||||||
|
header: classes.header,
|
||||||
|
content: classes.content,
|
||||||
|
},
|
||||||
|
})
|
5
src/styles/extends/Paper.module.css
Normal file
5
src/styles/extends/Paper.module.css
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.root {
|
||||||
|
@mixin dark {
|
||||||
|
background-color: var(--mantine-color-dark-8);
|
||||||
|
}
|
||||||
|
}
|
8
src/styles/extends/Paper.ts
Normal file
8
src/styles/extends/Paper.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { Paper as Component } from '@mantine/core'
|
||||||
|
import classes from './Paper.module.css'
|
||||||
|
|
||||||
|
export const Paper = Component.extend({
|
||||||
|
classNames: {
|
||||||
|
root: classes.root,
|
||||||
|
},
|
||||||
|
})
|
@ -1,4 +1,6 @@
|
|||||||
export { Button } from './Button'
|
export { Button } from './Button'
|
||||||
|
export { Drawer } from './Drawer'
|
||||||
|
export { Paper } from './Paper'
|
||||||
export { Text } from './Text'
|
export { Text } from './Text'
|
||||||
export { Textarea } from './Textarea'
|
export { Textarea } from './Textarea'
|
||||||
export { TextInput } from './TextInput'
|
export { TextInput } from './TextInput'
|
||||||
|
@ -6,7 +6,15 @@ import {
|
|||||||
createTheme,
|
createTheme,
|
||||||
} from '@mantine/core'
|
} from '@mantine/core'
|
||||||
import { fluidDisplay, fluidTypography } from '../utils/typography'
|
import { fluidDisplay, fluidTypography } from '../utils/typography'
|
||||||
import { Button, Text, TextInput, Textarea, Title } from './extends'
|
import {
|
||||||
|
Button,
|
||||||
|
Drawer,
|
||||||
|
Paper,
|
||||||
|
Text,
|
||||||
|
TextInput,
|
||||||
|
Textarea,
|
||||||
|
Title,
|
||||||
|
} from './extends'
|
||||||
|
|
||||||
const coffee: MantineColorsTuple = [
|
const coffee: MantineColorsTuple = [
|
||||||
'#fff4e5',
|
'#fff4e5',
|
||||||
@ -140,6 +148,8 @@ export const theme = createTheme({
|
|||||||
// Allows adding `classNames`, `styles` and `defaultProps` to any component
|
// Allows adding `classNames`, `styles` and `defaultProps` to any component
|
||||||
components: {
|
components: {
|
||||||
Button,
|
Button,
|
||||||
|
Drawer,
|
||||||
|
Paper,
|
||||||
Text,
|
Text,
|
||||||
Textarea,
|
Textarea,
|
||||||
TextInput,
|
TextInput,
|
||||||
|
Loading…
Reference in New Issue
Block a user