[#56] Landing Pagehttps://project.mdnd-it.cc/work_packages/56
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// src/pages/Home/Home.jsx
|
||||
// Régi PlayMenu-s oldal, "Home" néven
|
||||
|
||||
import { useState } from "react"
|
||||
import Navbar from "../../components/Navbar/Navbar"
|
||||
import Footer from "../../components/Footer/Footer.jsx"
|
||||
import Background from "../../assets/backgrounds/Background.jsx"
|
||||
import PlayMenu from "../../components/Landingpage/PlayMenu.jsx"
|
||||
|
||||
export default function Home() {
|
||||
// Dummy callbackok és user példa
|
||||
const handleJoinGame = (code) => {
|
||||
alert(`Csatlakozás játékhoz: ${code}`)
|
||||
}
|
||||
const handleCreateGame = () => {
|
||||
alert("Új játék létrehozása")
|
||||
}
|
||||
const user = { name: "Teszt Elek" }
|
||||
|
||||
return (
|
||||
<div className="w-full min-h-screen flex flex-col relative overflow-x-hidden">
|
||||
<div className="fixed inset-0 -z-10 pointer-events-none">
|
||||
<Background />
|
||||
</div>
|
||||
<div className="fixed top-0 left-0 right-0 z-30">
|
||||
<Navbar />
|
||||
</div>
|
||||
<main className="flex-1 flex flex-col items-center justify-start py-15 min-h-0 mt-[64px]">
|
||||
<PlayMenu onJoinGame={handleJoinGame} onCreateGame={handleCreateGame} user={user} />
|
||||
{/* Ide jöhetnek további szekciók, ha szeretnél még tartalmat */}
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// src/pages/Home/Home.jsx
|
||||
// Régi PlayMenu-s oldal, "Home" néven
|
||||
|
||||
import { useState } from "react"
|
||||
import Navbar from "../../components/Navbar/Navbar.jsx"
|
||||
import Footer from "../../components/Footer/Footer.jsx"
|
||||
import Background from "../../assets/backgrounds/Background.jsx"
|
||||
import PlayMenu from "../../components/Landingpage/PlayMenu.jsx"
|
||||
|
||||
export default function Home() {
|
||||
// Dummy callbackok és user példa
|
||||
const handleJoinGame = (code) => {
|
||||
alert(`Csatlakozás játékhoz: ${code}`)
|
||||
}
|
||||
const handleCreateGame = () => {
|
||||
alert("Új játék létrehozása")
|
||||
}
|
||||
const user = { name: "Teszt Elek" }
|
||||
|
||||
return (
|
||||
<div className="w-full min-h-screen flex flex-col relative overflow-x-hidden">
|
||||
<div className="fixed inset-0 -z-10 pointer-events-none">
|
||||
<Background />
|
||||
</div>
|
||||
<div className="fixed top-0 left-0 right-0 z-30">
|
||||
<Navbar />
|
||||
</div>
|
||||
<main className="flex-1 flex flex-col items-center justify-start py-15 min-h-0 mt-[64px]">
|
||||
<PlayMenu onJoinGame={handleJoinGame} onCreateGame={handleCreateGame} user={user} />
|
||||
{/* Ide jöhetnek további szekciók, ha szeretnél még tartalmat */}
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// src/pages/Landing/Landingpage.jsx
|
||||
// Főoldal - Landing Page
|
||||
|
||||
import { useState } from "react"
|
||||
import Navbar from "../../components/Navbar/Navbar"
|
||||
import Footer from "../../components/Footer/Footer.jsx"
|
||||
import Background from "../../assets/backgrounds/Background.jsx"
|
||||
import LandingPage from "../../components/Landingpage/LandingPage.jsx"
|
||||
|
||||
export default function LandingPageMain() {
|
||||
// Navigációs callbackok
|
||||
const handleNavigateToPlay = () => {
|
||||
// Itt lehet navigálni a játék oldalra
|
||||
alert("Navigáció a játék oldalra")
|
||||
}
|
||||
|
||||
const handleNavigateToAuth = () => {
|
||||
// Itt lehet navigálni a bejelentkezés oldalra
|
||||
alert("Navigáció a bejelentkezés oldalra")
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="w-full min-h-screen flex flex-col relative overflow-x-hidden">
|
||||
<div className="fixed inset-0 -z-10 pointer-events-none">
|
||||
<Background />
|
||||
</div>
|
||||
<div className="fixed top-0 left-0 right-0 z-30">
|
||||
<Navbar />
|
||||
</div>
|
||||
<main className="flex-1 flex flex-col items-center justify-start py-15 min-h-0 mt-[64px]">
|
||||
<LandingPage onNavigateToPlay={handleNavigateToPlay} onNavigateToAuth={handleNavigateToAuth} />
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,55 +1,50 @@
|
||||
// src/pages/Testing/Test.jsx
|
||||
// itt tesztelhetjük a komponenseket illetve bármit
|
||||
|
||||
import { useState } from "react";
|
||||
import Button from "../../components/Buttons/Button";
|
||||
import InputBox from "../../components/Inputs/InputBox";
|
||||
import PopUp from "../../components/PopUp/PopUp";
|
||||
import Logo from "../../assets/pictures/Logo.jsx";
|
||||
import { useState } from "react"
|
||||
import Button from "../../components/Buttons/Button"
|
||||
import InputBox from "../../components/Inputs/InputBox"
|
||||
import PopUp from "../../components/PopUp/PopUp"
|
||||
import Logo from "../../assets/pictures/Logo.jsx"
|
||||
import Navbar from "../../components/Navbar/Navbar"
|
||||
import Footer from "../../components/Footer/Footer.jsx"
|
||||
|
||||
export default function Test() {
|
||||
const [showPopup, setShowPopup] = useState(false);
|
||||
const [inputValue, setInputValue] = useState(""); // input értékének tárolása
|
||||
const [showPopup, setShowPopup] = useState(false)
|
||||
const [inputValue, setInputValue] = useState("") // input értékének tárolása
|
||||
|
||||
return (
|
||||
<div className="w-full h-screen flex flex-col items-center justify-center space-y-6">
|
||||
<InputBox
|
||||
placeholder="E-mail cím"
|
||||
type="text"
|
||||
width="w-1/2"
|
||||
value={inputValue}
|
||||
onChange={(e) => setInputValue(e.target.value)}
|
||||
/>
|
||||
<Button
|
||||
text="Regisztráció"
|
||||
type="button"
|
||||
width="w-1/2"
|
||||
onClick={() => setShowPopup(true)}
|
||||
/>
|
||||
{showPopup && (
|
||||
<PopUp onClose={() => setShowPopup(false)}>
|
||||
<div className="flex flex-col items-center space-y-4">
|
||||
{/* <Logo size={120} /> */}
|
||||
<h1 className="text-2xl font-bold text-center">
|
||||
Sikeres regisztráció!
|
||||
</h1>
|
||||
<p className="text-center text-gray-600">
|
||||
Kérjük, erősítsd meg az e-mail címedet!<br />
|
||||
Egy megerősítő linket küldtünk az általad megadott e-mail címre
|
||||
<span className="font-semibold text-black"> {inputValue}</span>.
|
||||
</p>
|
||||
<p className="text-center text-sm text-gray-500">
|
||||
Ha nem kaptad meg a levelet, ellenőrizd a spam mappádat is!
|
||||
</p>
|
||||
<Button
|
||||
text="Bezár"
|
||||
type="button"
|
||||
width="w-24"
|
||||
onClick={() => setShowPopup(false)}
|
||||
/>
|
||||
</div>
|
||||
</PopUp>
|
||||
)}
|
||||
<div className="w-full h-screen flex flex-col">
|
||||
<Navbar />
|
||||
<div className="flex-1 flex flex-col items-center justify-center space-y-6">
|
||||
<InputBox
|
||||
placeholder="E-mail cím"
|
||||
type="text"
|
||||
width="w-1/2"
|
||||
value={inputValue}
|
||||
onChange={(e) => setInputValue(e.target.value)}
|
||||
/>
|
||||
<Button text="Regisztráció" type="button" width="w-1/2" onClick={() => setShowPopup(true)} />
|
||||
{showPopup && (
|
||||
<PopUp onClose={() => setShowPopup(false)}>
|
||||
<div className="flex flex-col items-center space-y-4">
|
||||
{/* <Logo size={120} /> */}
|
||||
<h1 className="text-2xl font-bold text-center">Sikeres regisztráció!</h1>
|
||||
<p className="text-center text-gray-600">
|
||||
Kérjük, erősítsd meg az e-mail címedet!
|
||||
<br />
|
||||
Egy megerősítő linket küldtünk az általad megadott e-mail címre
|
||||
<span className="font-semibold text-black"> {inputValue}</span>.
|
||||
</p>
|
||||
<p className="text-center text-sm text-gray-500">
|
||||
Ha nem kaptad meg a levelet, ellenőrizd a spam mappádat is!
|
||||
</p>
|
||||
<Button text="Bezár" type="button" width="w-24" onClick={() => setShowPopup(false)} />
|
||||
</div>
|
||||
</PopUp>
|
||||
)}
|
||||
</div>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user