Skip to content

Commit

Permalink
feat: updates landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshnirmalya committed Jun 23, 2023
1 parent ac3ff0c commit 5dac3bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 61 deletions.
53 changes: 13 additions & 40 deletions src/components/pages/index/base/index.tsx
Original file line number Diff line number Diff line change
@@ -1,51 +1,24 @@
"use client";

import { Box, VStack } from "@chakra-ui/react";
import sortBy from "lodash/sortBy";
import Tilt from "react-parallax-tilt";
import { Box } from "@chakra-ui/react";

import Articles from "components/layouts/articles";
import Projects from "components/layouts/projects";
import Jumbotron from "components/pages/index/base/jumbotron";

import { getAllArticles } from "lib/get-articles-data";

import projects from "public/data/projects.json";

const Page = () => {
const articles = sortBy(getAllArticles(), ["date"]).reverse().slice(0, 5);

const sortedArticles = articles.sort((a, b) => {
return Number(new Date(b.date)) - Number(new Date(a.date));
});

return (
<VStack spacing={32} as="main">
<Box
as="section"
w="100%"
bgColor="gray.900"
bgGradient={["linear(to-br, gray.800, #181924)"]}
>
<Tilt
tiltEnable={false}
glareEnable
glareMaxOpacity={0.8}
glareColor="#000"
glarePosition="all"
>
<Box maxW="2xl" mx="auto" px={8} pb={16}>
<Jumbotron />
</Box>
</Tilt>
</Box>
<Box as="section" maxW="2xl" mx="auto" w="100%" px={8}>
<Articles articles={sortedArticles.slice(0, 10)} headingLevel="h2" />
</Box>
<Box as="section" maxW="2xl" mx="auto" w="100%" px={8} pb={8}>
<Projects projects={projects.slice(0, 10)} headingLevel="h2" />
<Box
as="section"
w="100%"
bgColor="gray.900"
bgGradient={["linear(to-br, gray.800, #181924)"]}
h="calc(100vh - 76px)"
display="flex"
alignItems="center"
>
<Box maxW="2xl" mx="auto" px={8}>
<Jumbotron />
</Box>
</VStack>
</Box>
);
};

Expand Down
24 changes: 3 additions & 21 deletions src/components/pages/index/base/jumbotron.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ import AvatarImage from "public/images/common/avatar.png";

const Jumbotron: FC = () => {
return (
<VStack
spacing={4}
alignItems="center"
justifyContent="center"
textAlign="center"
pt={24}
pb={12}
>
<VStack alignItems="center" justifyContent="center" textAlign="center">
<Box
bgGradient="linear(to-l, #79c2ff, #4a5888)"
rounded="full"
Expand All @@ -37,25 +30,14 @@ const Jumbotron: FC = () => {
fontFamily="body"
bgColor="blue.400"
bgClip="text"
size="2xl"
size="xl"
bgGradient="linear(to-l, #79c2ff, #4a5888)"
className="jumbotron-name-heading"
>
Nirmalya Ghosh
</Heading>
</Box>
<Text fontSize="xl">
Staff Developer Advocate @
<Link
href="https://rapidapi.com/"
isExternal
_hover={{
textDecoration: "none",
}}
>
Rapid
</Link>
</Text>
<Text fontSize="xl">Staff Developer Advocate</Text>
<Box>
<Heading
as="h2"
Expand Down

0 comments on commit 5dac3bc

Please sign in to comment.