-
This commit is contained in:
BIN
my-app/app/favicon.ico
Normal file
BIN
my-app/app/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
26
my-app/app/globals.css
Normal file
26
my-app/app/globals.css
Normal file
@@ -0,0 +1,26 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
:root {
|
||||
--background: #ffffff;
|
||||
--foreground: #171717;
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--font-sans: var(--font-geist-sans);
|
||||
--font-mono: var(--font-geist-mono);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: #0a0a0a;
|
||||
--foreground: #ededed;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--background);
|
||||
color: var(--foreground);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
33
my-app/app/layout.tsx
Normal file
33
my-app/app/layout.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html
|
||||
lang="en"
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||
>
|
||||
<body className="min-h-full flex flex-col">{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
14
my-app/app/page.tsx
Normal file
14
my-app/app/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
"use client";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<main className="min-h-screen w-full bg-black">
|
||||
{/*
|
||||
Pagina Home vuota.
|
||||
I componenti sono ora raggiungibili separatamente su:
|
||||
/terminal
|
||||
/text
|
||||
*/}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
37
my-app/app/plasma/page.tsx
Normal file
37
my-app/app/plasma/page.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
"use client";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
// 1. Definiamo l'interfaccia delle props
|
||||
interface PlasmaProps {
|
||||
color?: string;
|
||||
speed?: number;
|
||||
direction?: "forward" | "backward";
|
||||
scale?: number;
|
||||
opacity?: number;
|
||||
mouseInteractive?: boolean;
|
||||
}
|
||||
|
||||
// 2. Passiamo l'interfaccia al generic di dynamic
|
||||
const PlasmaCanvas = dynamic<PlasmaProps>(
|
||||
() => import("../../src/components/Plasma"),
|
||||
{
|
||||
ssr: false,
|
||||
loading: () => <div style={{ background: "black", width: "100vw", height: "100vh" }} />,
|
||||
}
|
||||
);
|
||||
|
||||
export default function PlasmaPage() {
|
||||
return (
|
||||
<div style={{ width: "100%", height: "600px", position: "relative" }}>
|
||||
<PlasmaCanvas
|
||||
color="#5f0000"
|
||||
speed={0.6}
|
||||
direction="forward"
|
||||
scale={1.1}
|
||||
opacity={0.8}
|
||||
mouseInteractive={true}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user