-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from indexnetwork/integration2
Integration2
- Loading branch information
Showing
16 changed files
with
519 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"use client"; | ||
|
||
import HeroSection from "@/components/sections/landing/Hero"; | ||
import { AuthStatus, useAuth } from "@/context/AuthContext"; | ||
import { useRouter } from "next/navigation"; | ||
import { useEffect } from "react"; | ||
|
||
const Landing = () => { | ||
const router = useRouter(); | ||
|
||
const { status, session } = useAuth(); | ||
|
||
useEffect(() => { | ||
if (status === AuthStatus.CONNECTED) { | ||
router.push(`/${session?.did.parent}`); | ||
} | ||
}, [status, session, router]); | ||
|
||
return ( | ||
<div className="bg-mainDark text-primary font-primary"> | ||
<div className="bg-primary text-secondary h-12">header nav</div> | ||
<HeroSection /> | ||
</div> | ||
); | ||
}; | ||
export default Landing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@font-face { | ||
font-family: Freizeit; | ||
src: url("/fonts/Freizeit-Regular.woff2") format("woff2"); | ||
} | ||
|
||
@font-face { | ||
font-family: Freizeit; | ||
font-weight: 700; | ||
src: url("/fonts/Freizeit-Bold.woff2") format("woff2"); | ||
} | ||
|
||
@font-face { | ||
font-family: Roquefort; | ||
font-weight: 400; | ||
src: url("/fonts/Roquefort-Standard.woff2") format("woff2"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
interface ButtonProps { | ||
children: React.ReactNode; | ||
onClick: () => void; | ||
variant?: "primary" | "outline"; | ||
className?: string; | ||
} | ||
|
||
const Button: React.FC<ButtonProps> = ({ | ||
children, | ||
onClick, | ||
variant = "primary", | ||
className = "", | ||
}) => { | ||
// Base styles | ||
const baseStyles = | ||
"px-4 py-2 font-medium text-base rounded focus:outline-none focus:ring-2 focus:ring-offset-2"; | ||
|
||
// Variant-specific styles | ||
const variantStyles = { | ||
primary: "bg-primary text-passiveDark", | ||
outline: "border border-passiveLight text-primary", | ||
}; | ||
|
||
// Combine styles based on the variant | ||
const buttonClasses = `${baseStyles} ${variantStyles[variant]} ${className}`; | ||
|
||
return ( | ||
<button onClick={onClick} className={buttonClasses}> | ||
{children} | ||
</button> | ||
); | ||
}; | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import Button from "@/components/new/Button"; | ||
import { useRouter } from "next/navigation"; | ||
|
||
const HeroSection = () => { | ||
const router = useRouter(); | ||
|
||
return ( | ||
<section className="relative"> | ||
<div className="m-auto flex h-screen max-w-screen-lg flex-col gap-12 md:flex-row md:justify-end"> | ||
{/* <div> | ||
<video src="/video/hero.webm" /> | ||
</div> */} | ||
<div className="bottom-0 left-0 top-0 flex items-center md:absolute"> | ||
<video | ||
autoPlay | ||
preload="auto" | ||
loop | ||
className="h-auto w-full md:w-auto" | ||
> | ||
<source src="/video/hero.webm" type="video/webm" /> | ||
Your browser does not support the video tag. | ||
</video> | ||
</div> | ||
|
||
<div className="font-secondary z-10 flex flex-col items-center justify-center gap-4 text-center md:w-[50%] md:items-end md:text-end"> | ||
<h1 className="text-3xl md:text-6xl"> | ||
The Composable Discovery Protocol | ||
</h1> | ||
<p className="text-base"> | ||
Index allows to create truly personalised and autonomous discovery | ||
experiences across the web | ||
</p> | ||
<div className="flex gap-4"> | ||
<Button | ||
onClick={() => { | ||
router.push("/auth"); | ||
}} | ||
> | ||
Connect | ||
</Button> | ||
<Button | ||
variant="outline" | ||
onClick={() => { | ||
router.push("/auth"); | ||
}} | ||
> | ||
Read Docs | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default HeroSection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const PartnersSection = () => { | ||
return <section></section>; | ||
}; | ||
|
||
export default PartnersSection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [ | ||
"./app/**/*.{js,ts,jsx,tsx,mdx}", | ||
"./pages/**/*.{js,ts,jsx,tsx,mdx}", | ||
"./components/**/*.{js,ts,jsx,tsx,mdx}", | ||
|
||
// Or if using `src` directory: | ||
"./src/**/*.{js,ts,jsx,tsx,mdx}", | ||
], | ||
theme: { | ||
extend: { | ||
colors: { | ||
mainDark: "#131620", | ||
primary: "#ffffff", | ||
secondary: "#4192F1", | ||
passiveLight: "#D5DDF0", | ||
passiveDark: "#0D0D0D", | ||
}, | ||
fontFamily: { | ||
primary: ["Inter", "sans-serif"], | ||
secondary: ["Freizeit", "sans-serif"], | ||
}, | ||
screens: { | ||
lg: "1200px", | ||
}, | ||
}, | ||
}, | ||
plugins: [], | ||
}; |
Oops, something went wrong.