projects: enhacne card styles and fix reset filters

This commit is contained in:
2026-02-07 00:31:55 +03:00
parent 05cd5b5139
commit cfd178cea6
2 changed files with 104 additions and 49 deletions

View File

@@ -186,30 +186,33 @@
/* Projects Grid */ /* Projects Grid */
.projectsGrid { .projectsGrid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 24px; gap: 32px;
margin-bottom: 60px; margin-bottom: 60px;
} }
.projectCard { .projectCard {
background: white; background: white;
border-radius: 16px; border-radius: 20px !important;
overflow: hidden; overflow: hidden;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
transition: all 0.3s ease; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
cursor: pointer; cursor: pointer;
border: none; border: 1px solid rgba(0, 0, 0, 0.05) !important;
height: fit-content; height: 100%;
display: flex !important;
flex-direction: column;
} }
.projectCard:hover { .projectCard:hover {
transform: translateY(-10px); transform: translateY(-8px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); box-shadow: 0 20px 40px rgba(116, 0, 184, 0.15);
border-color: rgba(116, 0, 184, 0.2) !important;
} }
.projectImageContainer { .projectImageContainer {
position: relative; position: relative;
height: 200px; height: 240px;
overflow: hidden; overflow: hidden;
} }
@@ -217,22 +220,23 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
transition: transform 0.3s ease; transition: transform 0.6s ease;
} }
.projectCard:hover .projectImage { .projectCard:hover .projectImage {
transform: scale(1.05); transform: scale(1.1);
} }
.projectOverlay { .projectOverlay {
position: absolute; position: absolute;
inset: 0; inset: 0;
background: rgba(0, 0, 0, 0.5); background: rgba(15, 5, 37, 0.6);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
opacity: 0; opacity: 0;
transition: opacity 0.3s ease; transition: all 0.3s ease;
backdrop-filter: blur(2px);
} }
.projectCard:hover .projectOverlay { .projectCard:hover .projectOverlay {
@@ -240,11 +244,23 @@
} }
.viewButton { .viewButton {
background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%); background: white !important;
border: none; color: #7400b8 !important;
width: 50px; border: none !important;
height: 50px; width: 56px !important;
font-size: 18px; height: 56px !important;
font-size: 20px !important;
border-radius: 50% !important;
display: flex !important;
align-items: center;
justify-content: center;
box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
transform: scale(0.8);
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.projectCard:hover .viewButton {
transform: scale(1);
} }
.featuredBadge { .featuredBadge {
@@ -255,65 +271,98 @@
} }
.projectContent { .projectContent {
padding: 20px; flex-grow: 1;
display: flex;
flex-direction: column;
} }
.categoryTag { .categoryTag {
margin-bottom: 12px; margin-bottom: 12px;
} }
.projectTitle { .categoryTag :global(.ant-tag) {
font-size: 1.1rem; background: #f0fdf4 !important; /* Minty fresh background example */
color: #166534 !important;
border-color: #dcfce7 !important;
border-radius: 12px;
padding: 2px 10px;
font-weight: 600; font-weight: 600;
color: #1e293b; border: none;
margin-bottom: 8px; }
line-height: 1.3;
/* Dynamic colors for tags could be handled in JS, but static CSS here for now */
.projectContent .categoryTag :global(.ant-tag-blue) {
background: rgba(116, 0, 184, 0.08) !important;
color: #7400b8 !important;
border: none !important;
}
.projectTitle {
font-size: 1.25rem !important;
font-weight: 700 !important;
color: #1e293b !important;
margin-bottom: 12px !important;
line-height: 1.4 !important;
transition: color 0.3s ease;
}
.projectCard:hover .projectTitle {
color: #7400b8 !important;
} }
.projectDescription { .projectDescription {
color: #64748b; color: #64748b !important;
line-height: 1.5; line-height: 1.6 !important;
margin-bottom: 12px; margin-bottom: 20px !important;
font-size: 0.85rem; font-size: 0.95rem !important;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
flex-grow: 1;
} }
.technologiesList { .technologiesList {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 4px; gap: 8px;
margin-bottom: 12px; margin-bottom: 20px;
} }
.techTag { .techTag {
background: #f8fafc; background: #f8fafc !important;
color: #475569; color: #64748b !important;
border: 1px solid #e2e8f0; border: 1px solid #e2e8f0 !important;
font-size: 0.75rem; font-size: 0.75rem !important;
padding: 2px 6px; padding: 4px 10px !important;
border-radius: 8px; border-radius: 20px !important;
font-weight: 500;
transition: all 0.3s ease;
}
.projectCard:hover .techTag {
border-color: #a855f7 !important;
color: #7400b8 !important;
background: #faf5ff !important;
} }
.projectMeta { .projectMeta {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-top: 12px; padding-top: 16px;
border-top: 1px solid #f1f5f9; border-top: 1px solid #f1f5f9;
font-size: 0.8rem; font-size: 0.85rem;
color: #94a3b8;
margin-top: auto;
} }
.projectDuration { .projectDuration, .projectTeam {
font-size: 0.75rem; display: flex;
color: #64748b; align-items: center;
} gap: 6px;
font-weight: 500;
.projectTeam {
font-size: 0.75rem;
color: #64748b;
} }
/* Load More Section */ /* Load More Section */

View File

@@ -314,6 +314,12 @@ export default function ProjectsPage() {
}; };
const handleCategoryClick = (category: string) => { const handleCategoryClick = (category: string) => {
if (category === "All") {
setSelectedCategory("All");
setVisibleProjects(9);
return;
}
if (selectedCategory === category) { if (selectedCategory === category) {
// If clicking on the same category, remove the filter // If clicking on the same category, remove the filter
setSelectedCategory("All"); setSelectedCategory("All");
@@ -427,10 +433,10 @@ export default function ProjectsPage() {
{/* Projects Grid */} {/* Projects Grid */}
<motion.div <motion.div
key={selectedCategory}
variants={containerVariants} variants={containerVariants}
initial="hidden" initial="hidden"
whileInView="visible" animate="visible"
viewport={{ once: true }}
className={styles.projectsGrid} className={styles.projectsGrid}
> >
{displayedProjects.map((project) => ( {displayedProjects.map((project) => (