diff --git a/next/components/projects/DateBlob.tsx b/next/components/projects/DateBlob.tsx index 92fc1f4..665f275 100644 --- a/next/components/projects/DateBlob.tsx +++ b/next/components/projects/DateBlob.tsx @@ -5,9 +5,11 @@ type DateBlobProps = { const DateBlob = ({ timelineElement, isEven, + type, }: { timelineElement: DateBlobProps; isEven: boolean; + type: "current" | "old"; }) => { const dateOptions = { year: "numeric", @@ -15,6 +17,16 @@ const DateBlob = ({ day: "numeric", } as const; // As const ensures it's a literal type not strings as toLocaleDateString expects a literal type +//
+//
+//
+//
+//
+// {timelineElement.Date.toLocaleDateString()} +//
+ return (
diff --git a/next/components/projects/ProjectsComponent.tsx b/next/components/projects/ProjectsComponent.tsx index fc3777e..133c0fe 100644 --- a/next/components/projects/ProjectsComponent.tsx +++ b/next/components/projects/ProjectsComponent.tsx @@ -36,7 +36,16 @@ export default function ProjectsComponent({
{/* Vertical line, -my-4 to 'undo' the p-4 */}
-
+ + + + + {/*
-
+
*/}
); } diff --git a/next/components/projects/ProjectsImage.tsx b/next/components/projects/ProjectsImage.tsx index 29f5f57..ed4e5a8 100644 --- a/next/components/projects/ProjectsImage.tsx +++ b/next/components/projects/ProjectsImage.tsx @@ -5,6 +5,23 @@ type ImageComponentProps = { alt?: string; title: string; type: "current" | "old"; + + // }) { + // const height = type === "current" ? 350 : 100; + + // return ( + //
+ //
+ // {alt void; }; @@ -15,20 +32,54 @@ export default function ImageComponent({ type, openModal, }: ImageComponentProps) { - const width = type === "current" ? 150 : 100; + const heightstyle = type === "current" ? "h-[300px]" : "h-[100px]"; + const height = type === "current" ? 300 : 100; return ( -
+
{alt}
-
{title}
+ + {type === "current" ? ( + = 28 ? title.substring(0, 25).concat("...") : title + } + className="top-[35%] bottom-[35%] left-[12%] w-[75%] flex items-center justify-center" + /> + ) : ( + + )} +
+ ); +} + +function TextOverlay({ + title, + className = "", +}: { + title: string; + className?: string; +}) { + return ( +
+ {title}
); } diff --git a/next/components/projects/Timeline.tsx b/next/components/projects/Timeline.tsx index 951925c..c6b44d6 100644 --- a/next/components/projects/Timeline.tsx +++ b/next/components/projects/Timeline.tsx @@ -6,11 +6,33 @@ type TimelineProps = { type: "current" | "old"; }; +// const firstDay = new Date(new Date().getFullYear(), 0, 1); + const Timeline = ({ timelineElements, type }: TimelineProps) => { return (
+ + {/* {timelineElements.map((timelineElement, index) => { + const date = new Date(timelineElement.Date); + const type = date >= firstDay ? "current" : "old"; + + return ( +
+ + +
+ ); + })} */} {timelineElements.map((timelineElement, index) => (