Skip to content

Commit

Permalink
Modified Timeline ETag UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Shanks0465 committed Sep 1, 2024
1 parent e61c099 commit 080e768
Showing 1 changed file with 37 additions and 7 deletions.
44 changes: 37 additions & 7 deletions frontend/components/AreaTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,26 @@ import {
AccordionIcon,
AccordionItem,
} from "@chakra-ui/react";
// Here we have used react-icons package for the icons
import { FaPaperclip, FaGithub, FaArrowDown } from "react-icons/fa";
import { useState } from "react";
import { imagePrefix } from "@/app/config";
import Link from "next/link";

const monthNames = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
];

interface Publication {
title: string;
description: string;
Expand Down Expand Up @@ -143,6 +157,7 @@ const Card = ({
type,
index,
}: CardProps) => {
const dateObject = new Date(published_on);
const isEvenId = index % 2 == 0;
let borderWidthValue = isEvenId ? "15px 15px 15px 0" : "15px 0 15px 15px";
let leftValue = isEvenId ? "-15px" : "unset";
Expand All @@ -164,13 +179,28 @@ const Card = ({
borderRadius={type === "Model" ? undefined : 30}
>
<Box>
<HStack>
<HStack mb={3}>
<HStack spacing={2} mb={1}>
<Text fontSize="lg" textColor={"a4borange"}>
{published_on}
</Text>
<Text fontSize="sm">{type}</Text>
<Text fontSize="sm">{conference}</Text>
<Box p={2} bg="a4borange" borderRadius={15}>
<HStack>
<Text fontSize="sm" textColor={"white"}>
{monthNames[dateObject.getMonth()]}
</Text>
<Text fontSize="sm" textColor={"white"}>
{dateObject.getFullYear()}
</Text>
</HStack>
</Box>
<Box p={2} bg="a4borange" borderRadius={15}>
<Text textColor={"white"} fontSize="sm">
{type}
</Text>
</Box>
<Box p={2} bg="a4borange" borderRadius={15}>
<Text textColor={"white"} fontSize="sm">
{conference}
</Text>
</Box>
</HStack>
</HStack>

Expand Down

0 comments on commit 080e768

Please sign in to comment.