From 009b7eb70b1a19dc032e803a78eb5c05410bbd49 Mon Sep 17 00:00:00 2001 From: Alvaro Date: Wed, 9 Oct 2024 13:26:42 +0200 Subject: [PATCH] Add empty pages and scroll --- src/app/about/page.tsx | 9 +++++++++ src/app/case-study-energy/page.tsx | 9 +++++++++ src/app/layout.tsx | 2 +- src/components/footer/index.tsx | 6 +++--- src/components/header/index.tsx | 4 ++-- src/components/intro/index.tsx | 8 +++++++- src/components/menu/index.tsx | 4 ++-- src/components/section-1/index.tsx | 2 +- 8 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 src/app/about/page.tsx create mode 100644 src/app/case-study-energy/page.tsx diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx new file mode 100644 index 0000000..0c13ef5 --- /dev/null +++ b/src/app/about/page.tsx @@ -0,0 +1,9 @@ +export default function About() { + return ( +
+
+ About +
+
+ ); +} \ No newline at end of file diff --git a/src/app/case-study-energy/page.tsx b/src/app/case-study-energy/page.tsx new file mode 100644 index 0000000..985feab --- /dev/null +++ b/src/app/case-study-energy/page.tsx @@ -0,0 +1,9 @@ +export default function Energy() { + return ( +
+
+ Case study: Energy +
+
+ ); +} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e3700db..7f3e530 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -26,7 +26,7 @@ export default function RootLayout({ return ( diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index cd72ef7..5005310 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -22,13 +22,13 @@ const Footer = ({ backgroundClass = "bg-green-700" }) => {
  • - Impact mode: Energy + Impact mode: Energy
  • - About Us + About Us
  • - Contact + Contact
  • diff --git a/src/components/header/index.tsx b/src/components/header/index.tsx index 0e97d64..65568f5 100644 --- a/src/components/header/index.tsx +++ b/src/components/header/index.tsx @@ -45,7 +45,7 @@ export default function Header() { ); return ( -
    - + ); }; \ No newline at end of file diff --git a/src/components/intro/index.tsx b/src/components/intro/index.tsx index a72304d..cf7ec65 100644 --- a/src/components/intro/index.tsx +++ b/src/components/intro/index.tsx @@ -10,6 +10,12 @@ import HeroVideo from './hero-video'; import Lines from '@/components/lines'; export default function Intro() { + const handleAnchor = (anchor: string) => { + const element = document.getElementById(anchor); + if (element) { + element.scrollIntoView({ behavior: "smooth", block: "start" }); + } + } return (
    @@ -42,7 +48,7 @@ export default function Intro() { className='z-10' > - Keep exploring + handleAnchor('section-1')} scroll={false}>Keep exploring diff --git a/src/components/menu/index.tsx b/src/components/menu/index.tsx index 8f7d302..227b0a5 100644 --- a/src/components/menu/index.tsx +++ b/src/components/menu/index.tsx @@ -45,10 +45,10 @@ export default function Menu() { Home
  • - Case Studies: Energy + Case Studies: Energy
  • - About Us + About Us
  • Contact diff --git a/src/components/section-1/index.tsx b/src/components/section-1/index.tsx index e97b46e..c36cac1 100644 --- a/src/components/section-1/index.tsx +++ b/src/components/section-1/index.tsx @@ -17,7 +17,7 @@ export default function Section1() { 'grid-cols-[1fr_1fr_1fr]': hoveredIndex === null, }; return ( -
    +