Skip to content

Commit 7740636

Browse files
committed
make navbar and hero section responsive
1 parent 37825fa commit 7740636

File tree

9 files changed

+29
-29
lines changed

9 files changed

+29
-29
lines changed

apps/web/src/app/(home)/_components/BackgroundGradients.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ const BackgroundGradients = () => {
1616
</div>
1717

1818
<div className="absolute inset-0 bg-[linear-gradient(to_right,#e5e7eb_1px,transparent_1px),linear-gradient(to_bottom,#e5e7eb_1px,transparent_1px)] dark:bg-[linear-gradient(to_right,#1f2937_1px,transparent_1px),linear-gradient(to_bottom,#1f2937_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_0%,#000_70%,transparent_100%)] opacity-[0.15]" />
19-
20-
{/* <div className="absolute inset-0 bg-noise opacity-[0.035] dark:opacity-[0.07] mix-blend-overlay" /> */}
2119
</div>
2220
);
2321
};

apps/web/src/app/(home)/_components/CodeContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const CodeContainer = () => {
4343
<div className="relative group">
4444
<div className="absolute -inset-1 bg-gradient-to-r from-purple-600 to-pink-600 rounded-lg backdrop-blur-lg opacity-25 transition duration-1000 group-hover:duration-200" />
4545
<div className="relative rounded-lg p-1 bg-slate-900/30 backdrop-blur-xl">
46-
<div className="p-4 font-mono text-gray-300 text-sm bg-black/20 rounded-lg flex items-center justify-between">
46+
<div className="sm:p-4 p-2 font-mono text-gray-300 text-sm bg-black/20 rounded-lg flex items-center justify-between">
4747
<div className="flex items-center gap-2">
4848
<ChevronRight />
4949
<span className="text-base bg-clip-text text-transparent bg-gradient-to-br from-purple-400 via-pink-400 to-yellow-400">

apps/web/src/app/(home)/_components/CustomizableSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import CustomizableStack from "./CustomizableStack";
33

44
export default function CustomizableSection() {
55
return (
6-
<section className="w-full max-w-6xl mx-auto space-y-12 mt-24 relative">
6+
<section className="w-full max-w-6xl mx-auto space-y-12 mt-24 relative z-50">
77
<div className="text-center space-y-6 relative z-10">
88
<motion.h2
99
initial={{ opacity: 0, y: 20 }}

apps/web/src/app/(home)/_components/CustomizableStack.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,14 @@ const CustomizableStack = () => {
265265
<div className="absolute -top-16 left-1/2 -translate-x-1/2 z-50 w-96">
266266
<CommandDisplay command={generateCommand()} />
267267
</div>
268-
<div className="bg-gray-950/10 p-4 absolute top-4 right-4 z-50 w-80 rounded-xl border border-gray-800 backdrop-blur-3xl">
269-
<div className="text-sm text-gray-300 text-center">
268+
<div className="bg-gray-950/10 lg:p-4 p-1 absolute lg:top-4 top-2 lg:right-4 right-2 z-50 w-80 rounded-xl border border-gray-800 backdrop-blur-3xl">
269+
<div className="lg:text-sm text-xs text-gray-300 text-center">
270270
Select technologies from the left panel to customize your stack. The
271271
graph will automatically update connections.
272272
</div>
273273
</div>
274274
<div className="absolute inset-0 backdrop-blur-3xl bg-gradient-to-r from-blue-500/10 via-purple-500/10 to-pink-500/10 rounded-xl" />
275-
<div className="h-[600px] pl-28 relative backdrop-blur-sm bg-gray-950/50 rounded-xl overflow-hidden border border-gray-800">
275+
<div className="h-[600px] lg:pl-28 relative backdrop-blur-sm bg-gray-950/50 rounded-xl overflow-hidden border border-gray-800">
276276
<ReactFlow
277277
nodes={nodes}
278278
edges={edges}

apps/web/src/app/(home)/_components/Navbar.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ const Navbar = () => {
4141

4242
return (
4343
<nav
44-
className={`fixed top-0 left-0 z-[100] w-screen px-8 py-5 flex items-center justify-between transition-all duration-300 ${
44+
className={`fixed top-0 left-0 z-[100] w-screen px-8 py-5 flex items-center sm:justify-between justify-center transition-all duration-300 ${
4545
scrolled
4646
? "bg-transparent border-transparent"
47-
: "bg-black/10 backdrop-blur-xl border-b border-white/10"
47+
: "sm:bg-black/10 sm:backdrop-blur-xl sm:border-b border-white/10"
4848
}`}
4949
>
5050
<div
51-
className={`flex items-center space-x-2 transition-opacity duration-300 ${scrolled ? "opacity-0" : "opacity-100"}`}
51+
className={`max-md:hidden flex items-center space-x-2 transition-opacity duration-300 ${scrolled ? "opacity-0" : "opacity-100"}`}
5252
>
5353
<div className="bg-gradient-to-br from-purple-500 via-pink-400 to-yellow-200 w-8 h-8 rounded-lg flex items-center justify-center">
5454
<div className="bg-white w-4 h-4 rounded-sm" />
@@ -58,7 +58,7 @@ const Navbar = () => {
5858

5959
<div
6060
className={`flex items-center backdrop-blur-md bg-white/5 rounded-full border border-white/10 py-1 px-1.5 text-sm relative transition-all duration-500 ease-out ${
61-
scrolled ? "w-[420px]" : "w-[280px]"
61+
scrolled ? "w-[420px]" : "sm:w-[280px] w-[350px]"
6262
}`}
6363
>
6464
<div
@@ -85,7 +85,8 @@ const Navbar = () => {
8585
onMouseLeave={() => setActiveLink("home")}
8686
className="text-gray-300 hover:text-white transition-colors py-2 px-4 rounded-full relative flex gap-2 items-center"
8787
>
88-
<PackageIcon pm="github" className="w-4 h-4" /> Github
88+
<PackageIcon pm="github" className="w-4 h-4" />{" "}
89+
<span className="max-sm:hidden">Github</span>
8990
</Link>
9091
<Link
9192
href="https://www.npmjs.com/package/create-better-t-stack"
@@ -97,7 +98,8 @@ const Navbar = () => {
9798
onMouseLeave={() => setActiveLink("home")}
9899
className="text-gray-300 hover:text-white transition-colors py-2 px-4 rounded-full relative flex gap-2 items-center"
99100
>
100-
<PackageIcon pm="npm" className="w-4 h-4 rounded-full" /> Npm
101+
<PackageIcon pm="npm" className="w-4 h-4 rounded-full" />{" "}
102+
<span className="max-sm:hidden">Npm</span>
101103
</Link>
102104
<span
103105
className="text-gray-500 transition-all duration-300"
@@ -116,12 +118,12 @@ const Navbar = () => {
116118
onMouseOver={() => setActiveLink("documentation")}
117119
onMouseLeave={() => setActiveLink("home")}
118120
style={{
119-
transform: scrolled ? "translateY(0)" : "translateY(-8px)",
121+
transform: scrolled ? "translateY(0)" : "sm:translateY(-8px)",
120122
}}
121123
className={` hover:text-white transition-all duration-300 py-2 px-4 rounded-full ${
122124
scrolled
123-
? "opacity-100 translate-y-0"
124-
: "opacity-0 pointer-events-none"
125+
? "sm:opacity-100 sm:translate-y-0"
126+
: "sm:opacity-0 sm:pointer-events-none"
125127
}`}
126128
>
127129
Documentation
@@ -135,7 +137,7 @@ const Navbar = () => {
135137
>
136138
<button
137139
type="button"
138-
className="relative inline-flex h-12 overflow-hidden rounded-full p-[1px] focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 focus:ring-offset-slate-50"
140+
className="relative max-sm:hidden inline-flex h-12 overflow-hidden rounded-full p-[1px] focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 focus:ring-offset-slate-50"
139141
>
140142
<span className="absolute inset-[-1000%] animate-[spin_2s_linear_infinite] bg-[conic-gradient(from_90deg_at_50%_50%,#E2CBFF_0%,#393BB2_50%,#E2CBFF_100%)]" />
141143
<span className="inline-flex h-full w-full cursor-pointer items-center justify-center rounded-full bg-slate-950 px-6 py-px text-sm font-medium text-white backdrop-blur-3xl">

apps/web/src/app/(home)/_components/TechConstellation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const TechConstellation = () => {
153153
return (
154154
<div
155155
ref={containerRef}
156-
className="relative w-full h-[90vh] bg-gradient-to-b from-transparent mt-8 via-gray-950 to-transparent overflow-hidden flex items-center justify-center"
156+
className="relative z-50 w-full h-[90vh] bg-gradient-to-b from-transparent mt-8 via-gray-950 to-transparent overflow-hidden flex items-center justify-center"
157157
>
158158
<div
159159
ref={centerRef}

apps/web/src/app/(home)/_components/TechNodeComponent.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface TechNodeData {
2020

2121
export function TechNodeComponent({ data }: { data: TechNodeData }) {
2222
const baseStyles = `
23-
relative px-5 py-4 rounded-lg
23+
relative lg:px-5 lg:py-4 px-3 py-1 rounded-lg
2424
transition-all duration-300
2525
border border-white/20
2626
before:content-[''] before:absolute before:left-0 before:top-0 before:w-1.5 before:h-full
@@ -37,19 +37,19 @@ export function TechNodeComponent({ data }: { data: TechNodeData }) {
3737
<Handle
3838
type="target"
3939
position={Position.Top}
40-
className="!w-1.5 !h-1.5 !bg-indigo-400/70"
40+
className="!w-2 !h-2 !bg-indigo-400/70"
4141
/>
4242
)}
4343

4444
<div className={`${baseStyles} ${activeStyles} backdrop-blur-3xl`}>
45-
<div className="text-white font-medium text-sm tracking-wide mb-1.5">
45+
<div className="text-white font-medium lg:text-sm text-xs tracking-wide lg:mb-1.5 mb-1">
4646
{data.label}
4747
</div>
48-
<div className="text-[11px] leading-relaxed text-white/80">
48+
<div className="lg:text-[11px] text-[9px] leading-relaxed text-white/80">
4949
{data.description}
5050
</div>
5151
{!data.isDefault && !data.isStatic && (
52-
<div className="text-[10px] text-indigo-200/70 mt-2 italic">
52+
<div className="lg:text-[10px] text-[8px] text-indigo-200/70 mt-2 italic">
5353
Alternative Option
5454
</div>
5555
)}
@@ -58,7 +58,7 @@ export function TechNodeComponent({ data }: { data: TechNodeData }) {
5858
<Handle
5959
type="source"
6060
position={Position.Bottom}
61-
className="!w-1.5 !h-1.5 !bg-indigo-400/70"
61+
className="!w-2 !h-2 !bg-indigo-400/70"
6262
/>
6363
</div>
6464
);

apps/web/src/app/(home)/_components/Terminal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const TerminalDisplay = () => {
2222
`;
2323

2424
return (
25-
<div className="max-w-6xl mx-auto p-6 mt-12">
25+
<div className="max-w-6xl mx-auto p-6 mt-12 relative z-50">
2626
<div className="bg-gray-900/30 backdrop-blur-3xl rounded-lg shadow-xl overflow-hidden">
2727
<div className="bg-gray-800/30 backdrop-blur-3xl px-4 py-2 flex items-center">
2828
<div className="flex space-x-2">

apps/web/src/app/(home)/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ export default function HomePage() {
3131
<div className="flex flex-col items-center justify-center space-y-4 text-center">
3232
<NpmPackage />
3333
<h1 className="text-6xl font-extrabold text-white">
34-
<span className="block text-7xl bg-clip-text text-transparent bg-gradient-to-r from-purple-500 via-pink-400 to-yellow-200">
34+
<span className="block sm:text-7xl text-6xl bg-clip-text text-transparent bg-gradient-to-r from-purple-500 via-pink-400 to-yellow-200">
3535
Better-T Stack
3636
</span>
3737
<span className="relative">
3838
<span className="absolute -bottom-1 left-0 right-0 h-1 bg-gradient-to-r from-purple-400 via-pink-500 to-rose-500 transform origin-left transition-transform duration-300 ease-out scale-x-0 group-hover:scale-x-100" />
3939
</span>
4040
</h1>
4141

42-
<p className="text-2xl font-medium text-gray-300 max-w-2xl">
42+
<p className="sm:text-2xl text-xl font-medium text-gray-300 max-w-2xl">
4343
<span className="inline-block transform hover:scale-105 transition-transform duration-200">
4444
Scaffold
4545
</span>{" "}
@@ -54,7 +54,7 @@ export default function HomePage() {
5454
<ShinyText
5555
text="Be the safest developer with typesafe Typescript"
5656
speed={3}
57-
className="text-lg"
57+
className="sm:text-lg text-md"
5858
/>
5959
</div>
6060
</div>
@@ -64,7 +64,7 @@ export default function HomePage() {
6464
</div>
6565
<TerminalDisplay />
6666

67-
<div className="w-full max-w-6xl mx-auto space-y-12 mt-12">
67+
<div className="w-full max-w-6xl mx-auto space-y-12 mt-12 relative z-50">
6868
<div className="text-center space-y-6 relative z-10">
6969
<h2 className="text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-slate-700 via-gray-100 to-stone-600 pb-2">
7070
A Symphony of Modern Tech

0 commit comments

Comments
 (0)