Skip to content

Commit 2512f32

Browse files
refactor: update styling classes for consistency and improve layout responsiveness across components
1 parent c9d270c commit 2512f32

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

fe-main/src/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Rocket, Twitter, Instagram } from "lucide-react";
1+
import { Rocket, Instagram } from "lucide-react";
22
import { Link } from "wouter";
33
import { useLanguage } from "@/lib/LanguageContext";
44
import { PiTelegramLogo } from "react-icons/pi";

fe-main/src/components/Hero.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ export default function Hero() {
3434
};
3535

3636
return (
37-
<div ref={ref} className="relative h-[80vh] min-h-[600px] w-full overflow-hidden flex items-center justify-center">
37+
<div ref={ref} className="relative h-[80vh] min-h-150 w-full overflow-hidden flex items-center justify-center">
3838
{/* Background Image with Overlay */}
3939
<motion.div style={{ y, opacity }} className="absolute inset-0 z-0">
4040
<img
4141
src={heroBg}
4242
alt="Teknofest Hero"
4343
className="w-full h-full object-cover scale-110"
4444
/>
45-
<div className="absolute inset-0 bg-gradient-to-r from-background/90 via-background/60 to-transparent" />
46-
<div className="absolute inset-0 bg-gradient-to-t from-background via-transparent to-transparent" />
45+
<div className="absolute inset-0 bg-linear-to-r from-background/90 via-background/60 to-transparent" />
46+
<div className="absolute inset-0 bg-linear-to-t from-background via-transparent to-transparent" />
4747
</motion.div>
4848

4949
{/* Content */}
@@ -63,7 +63,7 @@ export default function Hero() {
6363
<motion.h1 variants={textVariants} className="text-5xl md:text-7xl font-bold font-display leading-tight mb-6 text-foreground">
6464
{t('hero.title_start')} <br />
6565
<motion.span
66-
className="text-transparent bg-clip-text bg-gradient-to-r from-primary to-red-600 inline-block"
66+
className="text-transparent bg-clip-text bg-linear-to-r from-primary to-red-600 inline-block"
6767
animate={{ backgroundPosition: ["0%", "100%", "0%"] }}
6868
transition={{ duration: 5, repeat: Infinity, ease: "linear" }}
6969
style={{ backgroundSize: "200%" }}
@@ -84,11 +84,11 @@ export default function Hero() {
8484
competitionsSection.scrollIntoView({ behavior: 'smooth' });
8585
} else { console.warn("Competitions section not found") }
8686
}}
87-
size="lg" className="bg-primary hover:bg-primary/90 text-white text-lg px-8 h-14 rounded-none skew-x-[-10deg] rtl:skew-x-[10deg] transition-transform hover:scale-105 active:scale-95 duration-200">
88-
<span className="skew-x-[10deg] rtl:skew-x-[-10deg]">{t('hero.discover')}</span>
87+
size="lg" className="bg-primary hover:bg-primary/90 text-white text-lg px-8 h-14 rounded-none skew-x-[-10deg] rtl:skew-x-10 transition-transform hover:scale-105 active:scale-95 duration-200">
88+
<span className="skew-x-10 rtl:skew-x-[-10deg]">{t('hero.discover')}</span>
8989
</Button>
90-
<Button size="lg" variant="outline" className="border-primary/50 text-foreground hover:bg-primary/5 text-lg px-8 h-14 rounded-none skew-x-[-10deg] rtl:skew-x-[10deg] transition-transform hover:scale-105 active:scale-95 duration-200">
91-
<span className="skew-x-[10deg] rtl:skew-x-[-10deg] flex items-center gap-2">
90+
<Button size="lg" variant="outline" className="border-primary/50 text-foreground hover:bg-primary/5 text-lg px-8 h-14 rounded-none skew-x-[-10deg] rtl:skew-x-10 transition-transform hover:scale-105 active:scale-95 duration-200">
91+
<span className="skew-x-10 rtl:skew-x-[-10deg] flex items-center gap-2">
9292
{t('hero.watch')}
9393
<ArrowRight className={`w-5 h-5 ${isRtl ? 'rotate-180' : ''}`} />
9494
</span>

fe-main/src/components/Navbar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function Navbar() {
3838
"fixed top-0 w-full z-50 border-b transition-all duration-300",
3939
isScrolled
4040
? "bg-background/95 backdrop-blur-md border-border h-16 shadow-md"
41-
: "bg-background/50 backdrop-blur-sm border-white/10 h-20 supports-[backdrop-filter]:bg-background/30"
41+
: "bg-background/50 backdrop-blur-sm border-white/10 h-20 supports-backdrop-filter:bg-background/30"
4242
)}
4343
initial={{ y: -100 }}
4444
animate={{ y: 0 }}
@@ -49,7 +49,7 @@ export default function Navbar() {
4949
<Link href="/" className="flex items-center gap-2 group">
5050
<div className="relative w-10 h-10 flex items-center justify-center bg-primary rounded-lg overflow-hidden group-hover:scale-105 transition-transform duration-300">
5151
<Rocket className="text-white w-6 h-6 animate-pulse" />
52-
<div className="absolute inset-0 bg-gradient-to-tr from-black/20 to-transparent" />
52+
<div className="absolute inset-0 bg-linear-to-tr from-black/20 to-transparent" />
5353
</div>
5454
<span className="text-2xl font-bold font-display tracking-wider text-foreground">
5555
TK<span className="text-primary">Library</span>
@@ -71,7 +71,7 @@ export default function Navbar() {
7171
{location === link.href && (
7272
<motion.div
7373
layoutId="underline"
74-
className="absolute left-0 right-0 bottom-[-2px] h-[2px] bg-primary"
74+
className="absolute left-0 right-0 -bottom-0.5 h-0.5 bg-primary"
7575
/>
7676
)}
7777
</Link>

fe-main/src/pages/CompetitionDetail.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Footer from "@/components/Footer";
33
import { Button } from "@/components/ui/button";
44
import { Badge } from "@/components/ui/badge";
55
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
6-
import { Trophy, Calendar, Users, Download, ArrowRight, FileText, Link2, Cpu, Database, BookOpen } from "lucide-react";
6+
import { Users, Download, ArrowRight, FileText, Link2, Cpu, Database, BookOpen } from "lucide-react";
77
import { useRoute } from "wouter";
88
import { useQuery } from "@tanstack/react-query";
99
import {
@@ -62,23 +62,21 @@ export default function CompetitionDetail() {
6262
t("card.notSpecified"),
6363
);
6464
const yearsText = data?.years?.length ? data.years.join(", ") : t("detail.noYears");
65-
const tkNumber = data?.tk_number ?? "-";
66-
const t3kysNumber = data?.t3kys_number ?? "-";
6765
const image = data?.image_path ?? heroBg;
6866

6967
return (
7068
<div className="min-h-screen bg-background flex flex-col font-sans">
7169
<Navbar />
7270

7371
{/* Hero Banner */}
74-
<div className="relative h-[50vh] min-h-[400px] w-full overflow-hidden flex items-end">
72+
<div className="relative h-[50vh] min-h-100 w-full overflow-hidden flex items-end">
7573
<div className="absolute inset-0 z-0">
7674
<img
7775
src={image}
7876
alt={title}
7977
className="w-full h-full object-cover"
8078
/>
81-
<div className="absolute inset-0 bg-gradient-to-t from-background via-background/60 to-transparent" />
79+
<div className="absolute inset-0 bg-linear-to-t from-background via-background/60 to-transparent" />
8280
</div>
8381

8482
<div className="container mx-auto px-4 pb-12 relative z-10 flex flex-col md:flex-row justify-between items-end gap-6">
@@ -105,7 +103,7 @@ export default function CompetitionDetail() {
105103
</div>
106104
</div>
107105

108-
<main className="flex-grow container mx-auto px-4 py-12">
106+
<main className="grow container mx-auto px-4 py-12">
109107
<div className="grid grid-cols-1 lg:grid-cols-3 gap-12">
110108
{/* Main Content */}
111109
<div className="lg:col-span-2">
@@ -168,7 +166,7 @@ export default function CompetitionDetail() {
168166
{reportFiles?.map((file) => (
169167
<div
170168
key={file.id}
171-
className="group relative p-6 border border-border rounded-xl bg-gradient-to-br from-card to-card/50 hover:border-primary/30 hover:shadow-lg transition-all duration-300"
169+
className="group relative p-6 border border-border rounded-xl bg-linear-to-br from-card to-card/50 hover:border-primary/30 hover:shadow-lg transition-all duration-300"
172170
>
173171
<div className="flex items-start justify-between gap-4">
174172
<div className="flex-1 min-w-0">
@@ -239,7 +237,7 @@ export default function CompetitionDetail() {
239237
return (
240238
<div
241239
key={resource.id}
242-
className="group relative p-6 border border-border rounded-xl bg-gradient-to-br from-card to-card/50 hover:border-blue-400/30 hover:shadow-lg transition-all duration-300"
240+
className="group relative p-6 border border-border rounded-xl bg-linear-to-br from-card to-card/50 hover:border-blue-400/30 hover:shadow-lg transition-all duration-300"
243241
>
244242
<div className="flex items-start justify-between gap-4">
245243
<div className="flex-1">

fe-main/src/pages/Competitions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default function CompetitionsPage() {
9191
<div className="min-h-screen bg-background flex flex-col font-sans">
9292
<Navbar />
9393

94-
<main className="flex-grow">
94+
<main className="grow">
9595
<Hero />
9696

9797
<section className="container mx-auto px-4 py-16 -mt-20 relative z-20" id="mainpage_competitions_section">
@@ -210,7 +210,7 @@ export default function CompetitionsPage() {
210210
whileInView={{ opacity: 1, scale: 1 }}
211211
viewport={{ once: true }}
212212
transition={{ duration: 0.5 }}
213-
className="max-w-4xl mx-auto bg-gradient-to-r from-primary/10 via-primary/5 to-primary/10 rounded-3xl p-12 border border-primary/20"
213+
className="max-w-4xl mx-auto bg-linear-to-r from-primary/10 via-primary/5 to-primary/10 rounded-3xl p-12 border border-primary/20"
214214
>
215215
<h2 className="text-4xl font-bold font-display mb-6">{t('cta.title')}</h2>
216216
<p className="text-lg text-muted-foreground mb-8 max-w-2xl mx-auto">

0 commit comments

Comments
 (0)