Skip to content

Commit 8f19e6a

Browse files
author
Palash Patel
committed
Second project
1 parent f79add4 commit 8f19e6a

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

public/moviestore.png

4.27 MB
Loading

src/components/ProjectsShowcase.tsx

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,16 @@ function ProjectsShowcase() {
8888
<button
8989
onClick={handlePrev}
9090
aria-label="Previous"
91-
style={{ ...buttonStyle, left: '-15px', zIndex:-100 }}
91+
style={{ ...buttonStyle, left: '-30px', zIndex:100 }}
9292
>
9393
&lt;
9494
</button>
9595
<Carousel
96-
controls
97-
indicators
96+
activeIndex={index}
97+
onSelect={handleSelect}
98+
controls={false}
99+
indicators={false}
98100
interval={null}
99-
prevIcon={
100-
<span
101-
className="carousel-control-prev-icon"
102-
aria-hidden="true"
103-
/>
104-
}
105-
nextIcon={
106-
<span
107-
className="carousel-control-next-icon"
108-
aria-hidden="true"
109-
/>
110-
}
111101
>
112102
<Carousel.Item>
113103
<Container className="py-4">
@@ -121,7 +111,7 @@ function ProjectsShowcase() {
121111
>
122112

123113
<ProjectsShowcaseCard
124-
imageSrc={"/cs-2340-team-website/moviesstore.png"}
114+
imageSrc={"/cs-2340-team-website/moviestore.png"}
125115
imageAlt={"Screenshot of moviesstore project."}
126116
title={"Movies Store"}
127117
description={
@@ -312,7 +302,7 @@ function ProjectsShowcase() {
312302

313303
<ProjectsShowcaseCard
314304
imageSrc={"/cs-2340-team-website/meal_planner.png"}
315-
imageAlt={"Screenshot of moviesstore project."}
305+
imageAlt={"Screenshot of meal planner project."}
316306
title={"GT Meal Planner"}
317307
description={
318308
"A showcase of a full-stack meal planner application for GT students"
@@ -479,7 +469,7 @@ function ProjectsShowcase() {
479469
<button
480470
onClick={handleNext}
481471
aria-label="Next"
482-
style={{ ...buttonStyle, right: '-15px', zIndex:-1 }}
472+
style={{ ...buttonStyle, right: '-30px', zIndex:10 }}
483473
>
484474
&gt;
485475
</button>
@@ -489,4 +479,4 @@ function ProjectsShowcase() {
489479
);
490480
}
491481

492-
export default ProjectsShowcase;
482+
export default ProjectsShowcase;

src/components/ProjectsShowcaseCard.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Card } from "react-bootstrap";
22
import Carousel from "react-bootstrap/Carousel";
3+
import React from "react";
34

45
interface Slide {
56
src?: string;
@@ -9,6 +10,8 @@ interface Slide {
910

1011
interface ProjectsShowcaseCardProps {
1112
slides?: Slide[];
13+
imageSrc?: string;
14+
imageAlt?: string;
1215
title?: string;
1316
description?: string;
1417
projectLink?: string;
@@ -19,14 +22,16 @@ interface ProjectsShowcaseCardProps {
1922
const ProjectsShowcaseCard: React.FC<ProjectsShowcaseCardProps> = ({
2023
title,
2124
slides,
25+
imageSrc,
26+
imageAlt,
2227
description,
2328
projectLink,
2429
processLink,
2530
videoLink,
2631
}) => {
2732
return (
2833
<Card className="mx-auto project-card" style={cardStyle}>
29-
<Carousel variant='dark'>
34+
<Carousel variant="dark" controls={false} indicators={false} interval={null}>
3035
{slides &&
3136
slides.map((slide, index) => (
3237
<Carousel.Item key={ index }>
@@ -47,6 +52,9 @@ const ProjectsShowcaseCard: React.FC<ProjectsShowcaseCardProps> = ({
4752
</Carousel>
4853

4954
<Card.Body className="text-center">
55+
{imageSrc && (
56+
<Card.Img variant="top" src={imageSrc} alt={imageAlt} style={{ objectFit: "cover", width: "100%", height: "auto" }} />
57+
)}
5058
{title && (
5159
<u style={{ fontSize: "30px" }} className=" fw-bold">
5260
<Card.Title className="black-text fw-bold fs-3">{title}</Card.Title>

0 commit comments

Comments
 (0)