Skip to content

Commit c41efc8

Browse files
committed
make some changes to the hamburger fixing it and moving it to the left. Also I made the map card a section on mobile. Lastly i made certain text and cards smaller
1 parent 2d3784b commit c41efc8

8 files changed

Lines changed: 39 additions & 38 deletions

File tree

app/campus-life/page.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,24 +123,24 @@ export default function CampusLifePage() {
123123
whileInView={{ opacity: 1, y: 0 }}
124124
viewport={{ once: true, margin: "-100px" }}
125125
transition={{ duration: 0.6 }}
126-
className="bg-slate-900 text-white rounded-3xl p-8 md:p-16 relative overflow-hidden mb-12"
126+
className="bg-slate-900 text-white -mx-6 px-6 py-8 md:mx-0 md:rounded-3xl md:p-16 relative overflow-hidden mb-12"
127127
>
128128
<div className="absolute top-0 right-0 w-full h-full opacity-20">
129129
<GradientBlob variant="cool" className="translate-x-1/2" />
130130
</div>
131131

132-
<div className="relative z-10 grid md:grid-cols-2 gap-12 items-center">
132+
<div className="relative z-10 grid md:grid-cols-2 gap-8 md:gap-12 items-center">
133133
<div>
134-
<h2 className="text-3xl md:text-4xl font-display font-bold mb-6">Liangxiang Campus</h2>
135-
<p className="text-slate-300 leading-relaxed mb-6">
134+
<h2 className="text-2xl md:text-4xl font-display font-bold mb-4 md:mb-6">Liangxiang Campus</h2>
135+
<p className="text-sm md:text-base text-slate-300 leading-relaxed mb-4 md:mb-6">
136136
Liangxiang is a small university district located outside of beijing. It is located 30-40km from central Beijing. It would take 1-2 hours(depending on how busy the subway is) to travel from campus to the city center. Liangxiang campus occupies an area of 2,001,000 m².
137137
</p>
138-
<div className="flex items-center gap-4 text-slate-300">
139-
<Shield className="w-5 h-5 text-emerald-400" />
138+
<div className="flex items-center gap-3 md:gap-4 text-slate-300 text-sm md:text-base">
139+
<Shield className="w-4 h-4 md:w-5 md:h-5 text-emerald-400" />
140140
<span>Library seats 2,500 students</span>
141141
</div>
142142
</div>
143-
<div className="h-64 rounded-2xl bg-white/10 backdrop-blur-md border border-white/10 overflow-hidden relative group">
143+
<div className="h-48 md:h-64 rounded-2xl bg-white/10 backdrop-blur-md border border-white/10 overflow-hidden relative group">
144144
<BlurImage src={beijingMap} alt="Map of Liangxiang vs Beijing" fill className="object-cover opacity-80 group-hover:opacity-100 transition-opacity" placeholder="blur" />
145145
</div>
146146
</div>

app/community/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Image from "next/image";
66
import { BlurImage } from "@/components/ui/blur-image";
77
import { Users, BookOpen, Briefcase, Heart, Plane, Home } from "lucide-react";
88
import { Button } from "@/components/ui/button";
9-
import { WhatsAppButton } from "@/components/ui/WhatsAppButton";
9+
1010
import { GradientBlob } from "@/components/ui/GradientBlob";
1111
import { PageSegue } from "@/components/ui/PageSegue";
1212

app/faq/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import { useEffect, useState } from "react";
3+
import { useState } from "react";
44
import { motion, AnimatePresence } from "framer-motion";
55
import { Search, ChevronDown, ChevronUp } from "lucide-react";
66
import { WhatsAppButton } from "@/components/ui/WhatsAppButton";
@@ -242,12 +242,14 @@ function FAQCard({
242242
highlightQuery?: string;
243243
}) {
244244
const [isOpen, setIsOpen] = useState(autoOpen);
245+
const [prevAutoOpen, setPrevAutoOpen] = useState(autoOpen);
245246

246-
useEffect(() => {
247+
if (autoOpen !== prevAutoOpen) {
248+
setPrevAutoOpen(autoOpen);
247249
if (autoOpen && !isOpen) {
248250
setIsOpen(true);
249251
}
250-
}, [autoOpen, isOpen]);
252+
}
251253

252254
return (
253255
<motion.div

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function RootLayout({
3030
}>) {
3131
return (
3232
<html lang="en" className={`${jakarta.variable} ${syne.variable}`}>
33-
<body className="font-sans antialiased bg-background text-foreground flex flex-col min-h-screen">
33+
<body suppressHydrationWarning className="font-sans antialiased bg-background text-foreground flex flex-col min-h-screen">
3434
<Navbar />
3535
<main className="flex-1">
3636
{children}

app/page.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -214,30 +214,30 @@ export default function Home() {
214214
whileInView={{ opacity: 1, x: 0 }}
215215
viewport={{ once: true, margin: "-50px" }}
216216
transition={{ duration: 0.5, delay: 0.2 }}
217-
className="space-y-8"
217+
className="space-y-4 md:space-y-8"
218218
>
219-
<div className="bg-white/60 backdrop-blur-md rounded-3xl p-8 border border-white/40 shadow-sm">
220-
<div className="flex items-start gap-4">
221-
<div className="bg-amber-100 text-amber-600 p-3 rounded-xl">
222-
<Zap className="w-6 h-6" />
219+
<div className="bg-white/60 backdrop-blur-md rounded-3xl p-5 md:p-8 border border-white/40 shadow-sm">
220+
<div className="flex items-start gap-3 md:gap-4">
221+
<div className="bg-amber-100 text-amber-600 p-2 md:p-3 rounded-xl">
222+
<Zap className="w-5 h-5 md:w-6 md:h-6" />
223223
</div>
224224
<div>
225-
<h3 className="text-xl font-bold font-display mb-2">Funding Priority</h3>
226-
<p className="text-muted-foreground">
225+
<h3 className="text-base md:text-xl font-bold font-display mb-1 md:mb-2">Funding Priority</h3>
226+
<p className="text-sm md:text-base text-muted-foreground">
227227
While other universities struggle for grants, BIT&apos;s labs are capitalized by the state&apos;s most critical projects. This ensures priority in aerospace, high-end manufacturing, and national security research.
228228
</p>
229229
</div>
230230
</div>
231231
</div>
232232

233-
<div className="bg-white/60 backdrop-blur-md rounded-3xl p-8 border border-white/40 shadow-sm">
234-
<div className="flex items-start gap-4">
235-
<div className="bg-blue-100 text-blue-600 p-3 rounded-xl">
236-
<Award className="w-6 h-6" />
233+
<div className="bg-white/60 backdrop-blur-md rounded-3xl p-5 md:p-8 border border-white/40 shadow-sm">
234+
<div className="flex items-start gap-3 md:gap-4">
235+
<div className="bg-blue-100 text-blue-600 p-2 md:p-3 rounded-xl">
236+
<Award className="w-5 h-5 md:w-6 md:h-6" />
237237
</div>
238238
<div>
239-
<h3 className="text-xl font-bold font-display mb-2">&quot;Double First-Class&quot; Status</h3>
240-
<p className="text-muted-foreground">
239+
<h3 className="text-base md:text-xl font-bold font-display mb-1 md:mb-2">&quot;Double First-Class&quot; Status</h3>
240+
<p className="text-sm md:text-base text-muted-foreground">
241241
BIT is designated as a Class A &quot;Double First-Class&quot; university. This is the gold standard, placing you at the forefront of China&apos;s push to become a science and technology superpower.
242242
</p>
243243
</div>

components/layout/Navbar.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Link from "next/link";
44
import { useState } from "react";
55
import { usePathname } from "next/navigation";
66
import { motion, AnimatePresence } from "framer-motion";
7-
import { Menu, X, GraduationCap, MessageCircle } from "lucide-react";
7+
import { Menu, X, GraduationCap } from "lucide-react";
88
import { WhatsAppButton } from "@/components/ui/WhatsAppButton";
99
import { cn } from "@/lib/utils";
1010

@@ -28,13 +28,13 @@ export function Navbar() {
2828
transition={{ duration: 0.6, ease: [0.22, 1, 0.36, 1] }}
2929
className="fixed top-6 left-0 right-0 z-50 flex justify-center px-4 pointer-events-none"
3030
>
31-
<div className="navbar-sheen pointer-events-auto flex items-center p-1.5 pl-5 pr-1.5 gap-2 sm:gap-4">
31+
<div className="navbar-sheen pointer-events-auto flex items-center p-2 pl-4 pr-3 sm:p-1.5 sm:pl-5 sm:pr-1.5 gap-2 sm:gap-4">
3232
{/* Logo */}
33-
<Link href="/" className="flex items-center gap-2.5 group shrink-0">
34-
<div className="bg-primary/10 p-2 rounded-full group-hover:bg-primary/20 transition-colors">
35-
<GraduationCap className="w-5 h-5 text-primary" />
33+
<Link href="/" className="flex items-center gap-2 sm:gap-2.5 group shrink-0">
34+
<div className="bg-primary/10 p-1.5 sm:p-2 rounded-full group-hover:bg-primary/20 transition-colors">
35+
<GraduationCap className="w-4 h-4 sm:w-5 sm:h-5 text-primary" />
3636
</div>
37-
<span className="font-display font-bold text-lg tracking-tight">
37+
<span className="font-display font-bold text-base sm:text-lg tracking-tight">
3838
Studyin<span className="text-primary">BIT</span>
3939
</span>
4040
</Link>
@@ -61,16 +61,16 @@ export function Navbar() {
6161
<div className="flex items-center gap-2">
6262
<Link
6363
href="/admissions"
64-
className="cta-button !px-5 !py-2 !text-sm whitespace-nowrap hidden sm:inline-flex items-center gap-2"
64+
className="cta-button !px-3 !py-1.5 !text-xs sm:!px-5 sm:!py-2 sm:!text-sm whitespace-nowrap hidden sm:inline-flex items-center gap-1.5 sm:gap-2"
6565
>
6666
<span className="cta-glow"></span>
6767
Admissions
68-
<GraduationCap className="w-4 h-4" />
68+
<GraduationCap className="w-3.5 h-3.5 sm:w-4 sm:h-4" />
6969
</Link>
7070

7171
<button
7272
onClick={() => setIsOpen(!isOpen)}
73-
className="md:hidden p-2 mr-2 rounded-full hover:bg-black/5 text-foreground transition-colors"
73+
className="md:hidden p-2 rounded-full hover:bg-black/5 text-foreground transition-colors"
7474
>
7575
{isOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />}
7676
</button>

components/ui/Carousel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import { useEffect, useMemo, useRef, useState, Children, type ReactNode } from "react";
4-
import { motion, type PanInfo, useMotionValue, useTransform } from "framer-motion";
4+
import { type MotionValue, motion, type PanInfo, useMotionValue, useTransform } from "framer-motion";
55

66
const DRAG_BUFFER = 0;
77
const VELOCITY_THRESHOLD = 500;
@@ -13,7 +13,7 @@ interface CarouselSlideProps {
1313
index: number;
1414
itemWidth: number;
1515
trackItemOffset: number;
16-
x: ReturnType<typeof useMotionValue>;
16+
x: MotionValue<number>;
1717
transition: typeof SPRING_OPTIONS | { duration: number };
1818
}
1919

@@ -188,7 +188,7 @@ export default function Carousel({
188188
<div
189189
ref={containerRef}
190190
className="relative overflow-hidden rounded-2xl"
191-
style={{ width: `${baseWidth}px` }}
191+
style={{ width: `${baseWidth}px`, padding: `0 ${containerPadding}px` }}
192192
>
193193
<motion.div
194194
className="flex"

components/ui/SquareArrowTopRight.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use client";
22

3-
import { motion } from "framer-motion";
43

54
interface SquareArrowTopRightProps {
65
className?: string;

0 commit comments

Comments
 (0)