fixes and tweak a couple of changes.

- fixed responsive issues
- fixed anchor hashtag link offset
This commit is contained in:
Refansa 2023-10-17 10:47:37 +07:00
parent 932b6f6a8f
commit 416c382368
7 changed files with 233 additions and 214 deletions

View File

@ -1,12 +1,3 @@
html { html {
scroll-behavior: smooth; scroll-behavior: smooth;
} }
/* Offset the anchor hashtag link
*/
:target::before {
content: '';
display: block;
height: 144px;
margin-top: -144px;
}

View File

@ -5,7 +5,6 @@ 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 Experiences from '../partials/Experiences' import Experiences from '../partials/Experiences'
export default function HomePage() { export default function HomePage() {
@ -19,7 +18,6 @@ export default function HomePage() {
<Navbar /> <Navbar />
</AppShell.Header> </AppShell.Header>
<AppShell.Main> <AppShell.Main>
<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' }}>
@ -30,7 +28,6 @@ export default function HomePage() {
<Footer /> <Footer />
</Stack> </Stack>
</Container> </Container>
</SlideUpWhenVisible>
</AppShell.Main> </AppShell.Main>
</AppShell> </AppShell>
) )

View File

@ -1,3 +1,12 @@
.grayscale { .grayscale {
filter: grayscale(1); filter: grayscale(1);
} }
/* Offset the anchor hashtag link
*/
.anchor:target::before {
content: '';
display: block;
height: 160px;
margin-top: -160px;
}

View File

@ -9,11 +9,14 @@ import {
Title, Title,
} from '@mantine/core' } from '@mantine/core'
import classes from './About.module.css' import classes from './About.module.css'
import SlideUpWhenVisible from '../hooks/slideUpWhenVisible'
function About() { function About() {
return ( return (
<SlideUpWhenVisible>
<Box <Box
id='about' id='about'
className={classes.anchor}
my='xl'> my='xl'>
<SimpleGrid <SimpleGrid
cols={{ base: 1, sm: 2 }} cols={{ base: 1, sm: 2 }}
@ -22,16 +25,18 @@ function About() {
<Title>A bit About Me</Title> <Title>A bit About Me</Title>
<Stack gap='md'> <Stack gap='md'>
<Text> <Text>
Hello 👋 Refansa here. Muhammad Refansa Ali Muzky is my full name. Hello 👋 Refansa here. Muhammad Refansa Ali Muzky is my full
I'm an 18 years old software developer, just came fresh out of the name. I'm an 18 years old software developer, just came fresh
oven. Constantly seeking new open source projects to contribute to out of the oven. Constantly seeking new open source projects to
and enjoy working with others to make a meaningful contribution. contribute to and enjoy working with others to make a meaningful
contribution.
</Text> </Text>
<Text> <Text>
I thrive on challenging coding projects and love nothing more than I thrive on challenging coding projects and love nothing more
diving into complex software development tasks. As a lover of open than diving into complex software development tasks. As a lover
source, I believe that sharing knowledge and collaborating on of open source, I believe that sharing knowledge and
projects is essential for the advancement of the tech industry. collaborating on projects is essential for the advancement of
the tech industry.
</Text> </Text>
<Text <Text
mt='lg' mt='lg'
@ -68,6 +73,7 @@ function About() {
</Container> </Container>
</SimpleGrid> </SimpleGrid>
</Box> </Box>
</SlideUpWhenVisible>
) )
} }

View File

@ -17,6 +17,7 @@ import {
IconBrandTailwind, IconBrandTailwind,
IconBrandVue, IconBrandVue,
} from '@tabler/icons-react' } from '@tabler/icons-react'
import SlideUpWhenVisible from '../hooks/slideUpWhenVisible'
interface ItemGridProps { interface ItemGridProps {
icon: React.ReactNode icon: React.ReactNode
@ -35,7 +36,12 @@ const ItemGrid = ({ icon, text }: ItemGridProps) => {
align='center' align='center'
justify='center'> justify='center'>
{icon} {icon}
<Text>{text}</Text> <Text
style={{ userSelect: 'none' }}
fw='bold'
fz='sm'>
{text}
</Text>
</Stack> </Stack>
</Paper> </Paper>
) )
@ -43,10 +49,15 @@ const ItemGrid = ({ icon, text }: ItemGridProps) => {
export default function Experiences() { export default function Experiences() {
return ( return (
<SlideUpWhenVisible>
<Box my='xl'> <Box my='xl'>
<Stack align='center'> <Stack
align='center'
ta='center'>
<Title>Experiences</Title> <Title>Experiences</Title>
<Text fz='lg'> <Text
fz='lg'
ta='center'>
I have worked and used these awesome technologies in my projects I have worked and used these awesome technologies in my projects
</Text> </Text>
<SimpleGrid <SimpleGrid
@ -120,10 +131,12 @@ export default function Experiences() {
</SimpleGrid> </SimpleGrid>
<Text <Text
mt='xl' mt='xl'
fs='italic'> fs='italic'
ta='center'>
And probably many more... And probably many more...
</Text> </Text>
</Stack> </Stack>
</Box> </Box>
</SlideUpWhenVisible>
) )
} }

View File

@ -1,9 +1,11 @@
import { Box, Button, Flex, Group, Text, Title } from '@mantine/core' import { Box, Button, Flex, Group, Text, Title } from '@mantine/core'
import { IconBrandGithub, IconMail } from '@tabler/icons-react' import { IconBrandGithub, IconMail } from '@tabler/icons-react'
import classes from './Introduction.module.css' import classes from './Introduction.module.css'
import SlideUpWhenVisible from '../hooks/slideUpWhenVisible'
function Introduction() { function Introduction() {
return ( return (
<SlideUpWhenVisible>
<Box <Box
mt='xl' mt='xl'
mah='100vh' mah='100vh'
@ -60,6 +62,7 @@ function Introduction() {
</Button> </Button>
</Group> </Group>
</Box> </Box>
</SlideUpWhenVisible>
) )
} }