Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 21 additions & 42 deletions components/UI/PortfolioItem.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

import Image from 'next/image';
import React from 'react';
import classes from '../../styles/portfolio-item.module.css';
import Image from 'next/image';
import Link from 'next/link';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dummy pr review



const PortfolioItem = (props) => {
const {
Expand All @@ -14,52 +12,33 @@ const PortfolioItem = (props) => {
subtitle,
ribbonText = null,
} = props.item;

return (
<div className={`${classes.portfolio__item}`}>
<a
target='_blank'
style={{ textDecoration: 'none' }}
href={liveUrl}
rel='noreferrer'
>
<>
{ribbonText && (
<div style={{ zIndex: 99 }} className='ribbon ribbon-top-left'>
<span>{ribbonText}</span>
</div>
)}
<a target="_blank" style={{ textDecoration: 'none' }} href={liveUrl} rel="noreferrer">
{ribbonText && (
<div style={{ zIndex: 99 }} className="ribbon ribbon-top-left">
<span>{ribbonText}</span>
</div>
)}

<div className='bg-transparent'>
<div className={`${classes.portfolio__img}`}>
<Image alt={title} src={img} width={380} height={1} style={{maxHeight: "380px", overflow:"auto"}}/>
<div className="bg-transparent">
<div className={`${classes.portfolio__img}`}>
<Image alt={title} src={img} fill style={{ objectFit: 'cover', borderRadius: '10px' }} sizes="(max-width: 768px) 100vw, 380px" />
</div>

</div>
<h3 style={{ background: 'transparent' }}>{title}</h3>

<h3 style={{ background: "transparent" }}>{title}</h3>
<p style={{ background: "transparent", }}>{subtitle}</p>

<div className=" w-[100%] mt-5 lg:mt-0"> </div>
<div
style={{
position: "absolute",
background: "transparent",
bottom: "20px",
display: "flex",
flexDirection: "row",
flexWrap: "wrap",
}}>
<p className={classes.portfolio__subtitle}>{subtitle}</p>

{keyword.map((item, index) => (
<span
className={`${classes.portfolio__keyword} my-1`}
key={index}
>
{item}
</span>
))}
</div>
<div className={classes.portfolio__meta}>
{keyword.map((item, index) => (
<span className={`${classes.portfolio__keyword} my-1`} key={index}>
{item}
</span>
))}
</div>
</>
</div>
</a>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion components/UI/SectionSubtitle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classes from "../../styles/subtitle.module.css";

const SectionSubtitle = (props) => {
return (
<h5 className={`${classes.section__subtitle}`}>
<h5 className={`${classes.section__subtitle} ${props.className}`}>
<a href={props.link} target="_blank" rel="noopener noreferrer">
{props.subtitle}
</a>
Expand Down
28 changes: 26 additions & 2 deletions styles/portfolio-item.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
padding-top: 20px;
border-radius: 10px;
margin-bottom: 8px;
min-height: 100%;
min-height: 420px;
position: relative;
display: flex;
flex-direction: column;
}

.portfolio__item div {
Expand All @@ -26,12 +28,34 @@
.portfolio__img {
background: transparent;
text-align: center;
position: relative;
height: 240px;
overflow: hidden;
border-radius: 10px;
}

.portfolio__img img {
.portfolio__img :global(img) {
border-radius: 10px;
}

.portfolio__subtitle {
margin-top: 8px;
color: #cbd5e1;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}

.portfolio__meta {
margin-top: auto;
display: flex;
flex-wrap: wrap;
gap: 8px;
padding-top: 12px;
}

.portfolio__keyword {
padding: 5px 10px;
color: #fff;
Expand Down
Loading
Loading