Skip to content

Commit

Permalink
Modified landing page, created steps component to use the app
Browse files Browse the repository at this point in the history
  • Loading branch information
akadeepesh committed Jul 27, 2024
1 parent 46b8d68 commit 76df770
Show file tree
Hide file tree
Showing 20 changed files with 285 additions and 201 deletions.
Binary file removed public/android-chrome-192x192.png
Binary file not shown.
Binary file added public/assets/dark/HeroSignalsClean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/dark/favicon.ico
Binary file not shown.
Binary file added public/assets/light/HeroSignalsClean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/light/favicon.ico
Binary file not shown.
81 changes: 0 additions & 81 deletions public/logo_black_hr_nbg.svg

This file was deleted.

82 changes: 0 additions & 82 deletions public/logo_white_hr_nbg.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/next.svg

This file was deleted.

Binary file added public/steps/UploadCode.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/steps/connections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/steps/plotIt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/vercel.svg

This file was deleted.

Binary file modified src/app/favicon.ico
Binary file not shown.
16 changes: 14 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React from "react";
import type { Metadata } from "next";
import { ThemeProvider } from "../components/Theming/theme-provider";
import { Inter, Lobster_Two, Yanone_Kaffeesatz } from "next/font/google";
import {
Inter,
Lobster_Two,
Yanone_Kaffeesatz,
Poppins,
} from "next/font/google";
import { cn } from "../lib/utils";
import { Toaster } from "../components/ui/sonner";
import "./globals.css";
Expand All @@ -19,6 +24,12 @@ const lobsterTwo = Lobster_Two({
weight: "400",
});

const poppins = Poppins({
subsets: ["latin"],
variable: "--font-poppins",
weight: "400",
});

const yanoneKaffeesatz = Yanone_Kaffeesatz({
subsets: ["latin"],
variable: "--font-yanone_kaffeesatz",
Expand All @@ -36,7 +47,8 @@ export default function RootLayout({
className={cn(
lobsterTwo.variable,
inter.className,
yanoneKaffeesatz.variable
yanoneKaffeesatz.variable,
poppins.variable
)}
>
<ThemeProvider
Expand Down
42 changes: 36 additions & 6 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,44 @@
import React from "react";
import Navbar from "../components/Navbar";
import SerialCheck from "../components/SerialCheck";
import { Skeleton } from "../components/ui/skeleton";
import dynamic from "next/dynamic";
import Steps from "../components//LandingComp/Steps";
import { Separator } from "@/components/ui/separator";

const Page = () => {
const HeadSection = dynamic(
() => import("../components/LandingComp/HeadSection"),
{
loading: () => <SkeletonUI />,
ssr: false,
}
);

const SkeletonUI = () => (
<div className="container max-w-6xl mx-auto p-4 space-y-16">
<div className="flex flex-col gap-4">
<Skeleton className="h-24 w-3/4 mx-auto" />
<Skeleton className="h-12 w-2/3 mx-auto" />
</div>
<div className="flex space-x-4 justify-center">
<Skeleton className="h-10 w-32" />
<Skeleton className="h-10 w-32" />
</div>

<Skeleton className="h-[1000px] w-full" />
</div>
);

const page = () => {
return (
<div className="h-screen">
<>
<Navbar />
<SerialCheck />
</div>
<div className="flex flex-col">
<HeadSection />
<Separator className="mt-20" />
<Steps />
</div>
</>
);
};

export default Page;
export default page;
14 changes: 14 additions & 0 deletions src/app/stream/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react";
import Navbar from "../../components/Navbar";
import SerialCheck from "../../components/SerialCheck";

const Page = () => {
return (
<div className="h-screen">
<Navbar />
<SerialCheck />
</div>
);
};

export default Page;
33 changes: 11 additions & 22 deletions src/components/InCompatibleBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,46 +25,35 @@ const InCompatibleBrowser = () => {
image:
"https://img.icons8.com/?size=100&id=63646&format=png&color=000000",
},
{
name: "Brave",
image:
"https://img.icons8.com/?size=100&id=63785&format=png&color=000000",
},
];
return (
<div className="container mx-auto px-4 py-8 max-w-3xl w-full mt-14">
<div className="container mx-auto px-4 py-8 max-w-3xl w-full">
<div className="flex flex-col gap-10 justify-center items-center">
<Image
src="/android-chrome-192x192.png"
width={200}
height={200}
alt="Browser"
/>
<h1 className="text-6xl font-bold text-center mb-8 flex items-center justify-center gap-2 font-yanone">
<span className="text-destructive">!</span> Browser Not Supported
<h1 className="text-6xl text-destructive font-bold text-center mb-8 flex items-center justify-center gap-0 lg:gap-2 font-yanone">
! Browser Not Supported
</h1>
</div>

<Separator className="my-8" />
<div className="text-xl text-center mb-8">
Only the browser listed below are supported by this application.
<Separator className="my-7" />
<div className="text-4xl font-semibold text-center mb-8">
Supported Browsers
</div>

<div className="grid grid-cols-2 md:grid-cols-4 gap-2 mb-12">
<div className="grid grid-cols-1 md:grid-cols-3 gap-2 mb-12">
{browsers.map((browser) => (
<Card key={browser.name} className="p-6 flex flex-col items-center">
<Image
width={70}
height={70}
src={browser.image}
alt="Google Chrome"
alt="Supported Browser"
/>
<p className="text-center font-medium">{browser.name}</p>
</Card>
))}
</div>

<Separator className="my-8" />
<Separator className=" my-7" />
<h2 className="text-4xl font-semibold text-center mb-8">
Frequently Asked Questions
</h2>
Expand All @@ -83,8 +72,8 @@ const InCompatibleBrowser = () => {
<AccordionTrigger>How can I access the application?</AccordionTrigger>
<AccordionContent>
To access the application, please use a Chromium-based browser such
as Google Chrome, Microsoft Edge, Opera, or Brave. These browsers
support the Web Serial API required for this application to function
as Google Chrome, Microsoft Edge or Opera. These browsers support
the Web Serial API required for this application to function
properly. You can download one of these browsers from their official
websites.
</AccordionContent>
Expand Down
92 changes: 92 additions & 0 deletions src/components/LandingComp/HeadSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
"use client";
import React from "react";
import Link from "next/link";
import { Button } from "../../components/ui/button";
import { GitHubLogoIcon } from "@radix-ui/react-icons";
import Image from "next/image";
import { useTheme } from "next-themes";

const HeadSection = () => {
const { theme } = useTheme();
return (
<>
<section className="w-full pt-12">
<div className="px-4 md:px-6 space-y-10 xl:space-y-16">
<div className="flex flex-col justify-center items-center">
<div>
<h1 className="lg:leading-tighter text-[1.90rem] font-bold tracking-tighter sm:text-5xl md:text-6xl xl:text-[3.5rem] 2xl:text-[4rem] text-center">
BioAmp Signals Plotter for the web.
<br />
Smooth & Reliable
</h1>
</div>
<div className="flex flex-col items-center space-y-4 text-center mt-4">
<p className="mx-auto max-w-[700px] text-muted-foreground md:text-xl">
<span className="text-plot font-lobster cursor-default tracking-wide hover:tracking-widest duration-300 transition-all">
plot it
</span>{" "}
is a free and open-source plotter for BioAmp signals. It is
designed to be simple, fast, and reliable.
</p>
<div className="space-x-4 flex">
<Link href="/stream">
<Button>
{theme === "dark" ? (
<Image
src="/assets/dark/favicon.ico"
width={16}
height={16}
alt="logo"
className="mr-2"
/>
) : (
<Image
src="/assets/light/favicon.ico"
width={16}
height={16}
alt="logo"
className="mr-2"
/>
)}
Visualize Now
</Button>
</Link>
<Link
href="https://github.com/upsidedownlabs/BioSignal-Recorder-Web"
target="_blank"
>
<Button
variant={"outline"}
className="flex justify-center items-center"
>
<GitHubLogoIcon className="mr-2 h-4 w-4" />
<span>Source Code</span>
</Button>
</Link>
</div>
</div>
</div>
</div>
{theme === "dark" ? (
<Image
src="/assets/dark/HeroSignalsClean.png"
alt="Plotter"
width={1000}
height={1000}
className="mx-auto mt-20 rounded"
/>
) : (
<Image
src="/assets/light/HeroSignalsClean.png"
alt="Plotter"
width={1000}
height={1000}
className="mx-auto mt-20 rounded"
/>
)}
</section>
</>
);
};

export default HeadSection;
113 changes: 113 additions & 0 deletions src/components/LandingComp/Steps.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
"use client";
import React from "react";
import { Card, CardContent, CardFooter } from "../ui/card";
import Image from "next/image";
import Link from "next/link";
import { Button } from "../ui/button";
import { CircleAlert } from "lucide-react";
import {
HoverCard,
HoverCardContent,
HoverCardTrigger,
} from "../ui/hover-card";

const Steps = () => {
return (
<section className="w-full py-6 md:py-12 lg:py-16">
<div className="container grid items-center justify-center px-4 text-center md:px-6 lg:gap-6">
<div className="space-y-4">
<h2 className="text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl pb-8">
Get Started in 3 Simple Steps
</h2>
</div>
<div>
<div className="relative after:absolute after:inset-x-0 after:top-1/2 after:block after:h-0.5 after:-translate-y-1/2 after:rounded-lg after:bg-primary">
<ol className="relative z-10 flex justify-between text-sm font-medium text-primary">
<li className="flex items-center gap-2 bg-background p-2">
<span className="size-6 rounded-full bg-primary text-center text-[10px]/6 font-bold text-background">
1
</span>
<span className="hidden sm:block">Step 1</span>
</li>
<li className="flex items-center gap-2 bg-background p-2">
<span className="size-6 rounded-full bg-primary text-center text-[10px]/6 font-bold text-background">
2
</span>
<span className="hidden sm:block">Step 2</span>
</li>
<li className="flex items-center gap-2 bg-background p-2">
<span className="size-6 rounded-full bg-primary text-center text-[10px]/6 font-bold text-background">
3
</span>
<span className="hidden sm:block">Step 3</span>
</li>
</ol>
</div>
</div>
<div className="grid w-full max-w-6xl gap-6 sm:grid-cols-3 lg:grid-cols-3">
{[
{
title: "Gather Hardware",
description:
"Take a compatible board, BioAmp cable, jumper and electrodes. Make connections.",
image: "/steps/connections.png",
},
{
title: "Flash Code to Board",
description:
"Upload the provided code to your board using Arduino IDE.",
image: "/steps/UploadCode.jpg",
},
{
title: "Start Visualizing",
description:
"Open plot it, click connect, choose port and start visualizing the signals.",
image: "/steps/plotIt.jpg",
},
].map((step, index) => (
<div key={index} className="flex flex-col items-center gap-4">
<HoverCard>
<HoverCardTrigger>
<Card className="min-h-44">
<CardContent className="space-y-2 flex flex-col h-full justify-center">
<Image
src={step.image}
alt={`Step ${index + 1}`}
width={64}
height={64}
className="w-full rounded-md my-5"
/>
<h3 className="text-lg font-semibold">{step.title}</h3>
<p className="text-sm text-muted-foreground">
{step.description}
</p>
</CardContent>
<CardFooter className="text-xs text-muted-foreground gap-1 md:flex-row items-center text-plot hidden md:flex">
<CircleAlert size={18} /> Hover to preview image
</CardFooter>
</Card>
</HoverCardTrigger>
<HoverCardContent className="max-w-3xl w-full">
<Image
src={step.image}
alt={`Step ${index + 1}`}
width={320}
height={320}
className="w-full h-auto rounded-md"
/>
</HoverCardContent>
</HoverCard>
</div>
))}
</div>
<div className="flex justify-center pt-8">
<Link href="/stream">
<Button>Start Visualizing &rarr;</Button>
</Link>
</div>
</div>
</section>
);
};

export default Steps;
Loading

0 comments on commit 76df770

Please sign in to comment.