-
Notifications
You must be signed in to change notification settings - Fork 0
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 #5 from brolag/feature/add-game-steps
feat: add game steps examples
- Loading branch information
Showing
6 changed files
with
77 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import "@rainbow-me/rainbowkit/styles.css"; | ||
import "~~/styles/globals.css"; | ||
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; | ||
|
||
export const metadata = getMetadata({ | ||
title: "Zk Multiverse", | ||
description: "Learn ZK with ZK Multiverse", | ||
}); | ||
|
||
const ScaffoldEthApp = ({ children }: { children: React.ReactNode }) => { | ||
return ( | ||
<section className="bg-local h-screen bg-repeat " style={{ backgroundImage: "url(/images/inner-bg.png)" }}> | ||
{children} | ||
</section> | ||
); | ||
}; | ||
|
||
export default ScaffoldEthApp; |
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,57 @@ | ||
"use client"; | ||
|
||
import React from "react"; | ||
import type { NextPage } from "next"; | ||
|
||
const steps = [ | ||
{ id: 1, title: "Step 1" }, | ||
{ id: 2, title: "Step 2" }, | ||
{ id: 3, title: "Step 3" }, | ||
{ id: 4, title: "Step 4" }, | ||
{ id: 5, title: "Step 5" }, | ||
{ id: 6, title: "Step 6" }, | ||
// Añade más steps si es necesario | ||
]; | ||
|
||
const chunkArray = (array: any[], size: number) => { | ||
const result = []; | ||
for (let i = 0; i < array.length; i += size) { | ||
result.push(array.slice(i, i + size)); | ||
} | ||
return result; | ||
}; | ||
|
||
const Home: NextPage = () => { | ||
const rows = chunkArray(steps, 3); | ||
|
||
return ( | ||
<> | ||
<div className="flex items-center justify-center flex-col flex-grow mt-40"> | ||
{rows.map((row, rowIndex) => ( | ||
<div key={rowIndex} className="flex flex-row items-center mb-8"> | ||
{row.map((step, index) => ( | ||
<React.Fragment key={step.id}> | ||
<div className="flex flex-col items-center mx-4"> | ||
<div className="flex flex-row text-center items-center font-play text-3xl">{step.title}</div> | ||
<div | ||
style={{ backgroundImage: "url(/images/step.png)" }} | ||
className="bg-local flex flex-row justify-around items-start w-40 h-40 bg-cover" | ||
/> | ||
</div> | ||
{index < row.length - 1 && <div className="line-glow w-16 h-px mx-4"></div>} | ||
</React.Fragment> | ||
))} | ||
</div> | ||
))} | ||
</div> | ||
<style jsx>{` | ||
.line-glow { | ||
background-color: white; | ||
box-shadow: 0 0 10px 2px white; | ||
} | ||
`}</style> | ||
</> | ||
); | ||
}; | ||
|
||
export default Home; |
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
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.