Skip to content

Commit cac3071

Browse files
Zeff01claude
andcommitted
feat: enhance services page layout and styling
- Add consistent aspect ratio (3:4) to all service cards - Move View Website button to bottom right with improved styling - Decrease avatar gaps for tighter team member layout - Reduce horizontal margins by 4px for wider content area - Style website button with gradient background and hover effects - Improve card image dimensions and layout structure 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 94abe59 commit cac3071

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

‎apps/codebility/app/(marketing)/services/_components/ServicesServiceCard.tsx‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function ServiceCard({ service }: Props) {
7676

7777
return (
7878
<div
79-
className="group relative flex h-full flex-col overflow-hidden rounded-2xl bg-white/5 border border-white/10 backdrop-blur-sm transition-all duration-500 hover:shadow-2xl hover:shadow-blue-500/20 hover:border-blue-400/30 hover:bg-white/10 transform-gpu hover:-translate-y-2 hover:scale-105"
79+
className="group relative flex h-full flex-col overflow-hidden rounded-2xl bg-white/5 border border-white/10 backdrop-blur-sm transition-all duration-500 hover:shadow-2xl hover:shadow-blue-500/20 hover:border-blue-400/30 hover:bg-white/10 transform-gpu hover:-translate-y-2 hover:scale-105 aspect-[3/4]"
8080
style={{
8181
transformStyle: 'preserve-3d',
8282
perspective: '1000px',
@@ -98,7 +98,7 @@ function ServiceCard({ service }: Props) {
9898
card.style.transform = 'perspective(1000px) rotateX(0deg) rotateY(0deg) translateY(0px) scale(1)';
9999
}}
100100
>
101-
<div className="relative aspect-[4/3] w-full overflow-hidden">
101+
<div className="relative aspect-[4/3] w-full overflow-hidden flex-shrink-0">
102102
<Image
103103
src={imageUrl}
104104
alt={name}
@@ -176,20 +176,8 @@ function ServiceCard({ service }: Props) {
176176
)}
177177
</div>
178178

179-
{/* Bottom Section */}
180-
<div className="space-y-4 mt-auto">
181-
{/* Website Link */}
182-
{hasValidWebsite && (
183-
<Link
184-
href={website_url!}
185-
target="_blank"
186-
className="inline-flex items-center gap-2 rounded-xl bg-white/10 hover:bg-gradient-to-r hover:from-blue-500/15 hover:to-indigo-500/15 border border-white/20 hover:border-blue-400/30 px-4 py-2 text-sm font-medium transition-all duration-300 hover:scale-105 hover:shadow-md hover:shadow-blue-500/15 hover:translate-y-[-1px]"
187-
>
188-
<IconLink className="size-4" />
189-
<span>View Website</span>
190-
</Link>
191-
)}
192-
179+
{/* Bottom Section with Website Button Absolute Positioned */}
180+
<div className="relative space-y-4 mt-auto">
193181
{/* Team Section */}
194182
{members.length > 0 ? (
195183
<div>
@@ -198,7 +186,7 @@ function ServiceCard({ service }: Props) {
198186
{teamLeader && (
199187
<Tooltip>
200188
<TooltipTrigger>
201-
<div className="relative mb-2 mr-4">
189+
<div className="relative mb-2 mr-2">
202190
<div className="relative h-14 w-14 overflow-hidden rounded-full border-2 border-customBlue-500">
203191
{teamLeader.image_url ? (
204192
<Image
@@ -229,7 +217,7 @@ function ServiceCard({ service }: Props) {
229217
{teamMembers.map((member, index) => (
230218
<Tooltip key={`${member.id}${index}`}>
231219
<TooltipTrigger>
232-
<div className="mb-2 mr-2">
220+
<div className="mb-2 mr-1">
233221
<div className="relative h-10 w-10 overflow-hidden rounded-full border-2 border-gray-700">
234222
{member.image_url ? (
235223
<Image
@@ -264,6 +252,18 @@ function ServiceCard({ service }: Props) {
264252
</div>
265253
)}
266254
</div>
255+
256+
{/* Website Button - Absolute positioned at bottom right */}
257+
{hasValidWebsite && (
258+
<Link
259+
href={website_url!}
260+
target="_blank"
261+
className="absolute bottom-3 right-3 inline-flex items-center gap-2 rounded-lg bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 border border-blue-400/30 hover:border-blue-300/50 px-3 py-2 text-sm font-semibold text-white shadow-lg hover:shadow-xl hover:shadow-blue-500/25 transition-all duration-300 hover:scale-105 hover:translate-y-[-1px] backdrop-blur-sm"
262+
>
263+
<IconLink className="size-4" />
264+
<span>View</span>
265+
</Link>
266+
)}
267267
</div>
268268
</div>
269269
);

‎apps/codebility/app/(marketing)/services/_components/ServicesTab.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ function ServicesTab({ servicesData }: Props) {
122122
</div>
123123

124124
{/* Projects Grid */}
125-
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
125+
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mx-[-4px]">
126126
{paginatedProjects && paginatedProjects.length > 0 ? (
127127
paginatedProjects.map((project, index) => (
128128
<div
129129
key={project.id}
130-
className="animate-fade-in-up"
130+
className="animate-fade-in-up px-1"
131131
style={{
132132
animationDelay: `${index * 150}ms`,
133133
animationFillMode: 'both'

0 commit comments

Comments
 (0)