Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fonts and images for the main page and world page #4

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions packages/nextjs/app/engineering/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"use client";

import Image from "next/image";
import Link from "next/link";
import type { NextPage } from "next";
import ZKMultiverseLogo from "~~/components/assets/ZKMultiverseLogo";

const languages = [
{
title: "Circom",
image: "/images/languages/circom.png",
link: "/circom",
},
{
title: "Noir",
image: "/images/languages/noir.png",
link: "/noir",
},
];

const Home: NextPage = () => {
return (
<>
<div className="flex items-center flex-col flex-grow pt-10">
<div>
<ZKMultiverseLogo />

<div className="flex flex-row justify-around items-start space-x-10">
{languages.map((language, index) => (
<div key={index}>
<Link href={language.link}>
<div className="w-24 mb-6 cursor-pointer">
<Image
src={language.image}
alt={language.title}
width={600}
height={400}
className="rounded-lg transition-transform duration-300 hover:scale-105"
/>
</div>
</Link>
<h2 className="text-lg text-center font-play">{language.title}</h2>
</div>
))}
</div>
</div>
</div>
</>
);
};

export default Home;
16 changes: 13 additions & 3 deletions packages/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
import { Play } from "next/font/google";
import "@rainbow-me/rainbowkit/styles.css";
import { ScaffoldEthAppWithProviders } from "~~/components/ScaffoldEthAppWithProviders";
import { ThemeProvider } from "~~/components/ThemeProvider";
import "~~/styles/globals.css";
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata";

export const metadata = getMetadata({
title: "Scaffold-ETH 2 App",
description: "Built with 🏗 Scaffold-ETH 2",
title: "Zk Multiverse",
description: "Learn ZK with ZK Multiverse",
});

// Configure it for using with tailwindcss

const play = Play({
weight: "400",
subsets: ["latin"],
display: "swap",
variable: "--font-play",
} as any);

const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => {
return (
<html suppressHydrationWarning>
<html className={`${(play as any).variable}`} suppressHydrationWarning>
<body className="bg-local" style={{ backgroundImage: "url(/images/bg.jpg)" }}>
<ThemeProvider enableSystem>
<ScaffoldEthAppWithProviders>{children}</ScaffoldEthAppWithProviders>
Expand Down
57 changes: 57 additions & 0 deletions packages/nextjs/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,71 @@
"use client";

import Image from "next/image";
import Link from "next/link";
import type { NextPage } from "next";
import ZKMultiverseLogo from "~~/components/assets/ZKMultiverseLogo";

const worlds = [
{
title: "Basics",
image: "/images/planets/World_Map_01.png",
link: "/basics",
disabled: true,
},
{
title: "Math",
image: "/images/planets/World_Map_03.png",
link: "/math",
disabled: true,
},
{
title: "Engineering",
image: "/images/planets/World_Map_04.png",
link: "/engineering",
disabled: false,
},
];

const Home: NextPage = () => {
return (
<>
<div className="flex items-center flex-col flex-grow pt-10">
<div>
<ZKMultiverseLogo />

<div className="flex flex-row justify-between items-start space-x-10">
{worlds.map((world, index) => (
<div key={index} className="relative">
{world.disabled ? (
<div className="w-24 mb-10 cursor-not-allowed relative">
<Image
src={world.image}
alt={world.title}
width={600}
height={400}
className="rounded-lg filter grayscale"
/>
<div className="absolute inset-0 flex items-center justify-center">
<Image src="/images/locked.png" alt="Locked" width={50} height={50} className="opacity-75" />
</div>
</div>
) : (
<Link href={world.link}>
<div className="w-24 mb-10 cursor-pointer">
<Image
src={world.image}
alt={world.title}
width={600}
height={400}
className="rounded-lg transition-transform duration-300 hover:scale-105"
/>
</div>
</Link>
)}
<h2 className="text-lg text-center font-play">{world.title}</h2>
</div>
))}
</div>
</div>
</div>
</>
Expand Down
6 changes: 2 additions & 4 deletions packages/nextjs/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from "react";
import Link from "next/link";
import { hardhat } from "viem/chains";
import { CurrencyDollarIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline";
import { HeartIcon } from "@heroicons/react/24/outline";
import { SwitchTheme } from "~~/components/SwitchTheme";
import { BuidlGuidlLogo } from "~~/components/assets/BuidlGuidlLogo";
import { Faucet } from "~~/components/scaffold-eth";
import { useTargetNetwork } from "~~/hooks/scaffold-eth/useTargetNetwork";
import { useGlobalState } from "~~/services/store/store";
Expand Down Expand Up @@ -43,7 +41,7 @@ export const Footer = () => {
<SwitchTheme className={`pointer-events-auto ${isLocalNetwork ? "self-end md:self-auto" : ""}`} />
</div>
</div>
<div className="w-full">
{/* <div className="w-full">
<ul className="menu menu-horizontal w-full">
<div className="flex justify-center items-center gap-2 text-sm w-full">
<div className="text-center">
Expand Down Expand Up @@ -74,7 +72,7 @@ export const Footer = () => {
</div>
</div>
</ul>
</div>
</div> */}
</div>
);
};
3 changes: 1 addition & 2 deletions packages/nextjs/components/ScaffoldEthAppWithProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { useTheme } from "next-themes";
import { Toaster } from "react-hot-toast";
import { WagmiProvider } from "wagmi";
import { Footer } from "~~/components/Footer";
import { Header } from "~~/components/Header";
import { BlockieAvatar } from "~~/components/scaffold-eth";
import { ProgressBar } from "~~/components/scaffold-eth/ProgressBar";
Expand All @@ -21,7 +20,7 @@ const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => {
<div className="flex flex-col min-h-screen">
<Header />
<main className="relative flex flex-col flex-1">{children}</main>
<Footer />
{/* <Footer /> */}
</div>
<Toaster />
</>
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/assets/ZKMultiverseLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Letter } from "./Letter";
const ZKMultiverseLogo = () => {
const title = "ZK MULTIVERSE";
return (
<div className="flex flex-row space-x-3">
<div className="flex flex-row space-x-3 mb-20">
{title
.split("")
.map((letter, index) =>
Expand Down
Binary file added packages/nextjs/public/images/inner-bg.png
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 added packages/nextjs/public/images/languages/noir.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 packages/nextjs/public/images/locked.png
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.
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.
3 changes: 3 additions & 0 deletions packages/nextjs/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ module.exports = {
animation: {
"pulse-fast": "pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite",
},
fontFamily: {
play: ["var(--font-play)"],
},
},
},
};
Loading