diff --git a/commit-push.bat b/commit-push.bat new file mode 100644 index 0000000..14a416a --- /dev/null +++ b/commit-push.bat @@ -0,0 +1,15 @@ +@echo-off +cd /d D:\maga\magricambi +git status +echo. +set /p MSG=Messaggio commit: +if "%MSG%"=="" ( + echo Messaggio obbligatorio. + exit /b 1 +) +git add . +git status +set /p OK="Proceder con commit e push?" (s/N): +if /i not "%OK%" == "s" exit /b 0 +git commit -m "%MSG%" +git push -u origin main \ No newline at end of file diff --git a/src/app/(content)/blog/[slug]/page.tsx b/src/app/(content)/blog/[slug]/page.tsx deleted file mode 100644 index 3e9d38a..0000000 --- a/src/app/(content)/blog/[slug]/page.tsx +++ /dev/null @@ -1,41 +0,0 @@ -// [slug]/page.tsx -interface Post { - slug: string; - title: string; - content: string; -} - -const blogPosts: Post[] = [ - { - slug: "primo-post", - title: "Il mio primo post", - content: "Questo è il contenuto del primo post...", - }, - { - slug: "secondo-post", - title: "Il mio secondo post", - content: "Questo è il contenuto del secondo post...", - }, - { - slug: "terzo-post", - title: "Il mio terzo post", - content: "Questo è il contenuto del terzo post...", - }, -]; - -/** Next 14: `params` è un oggetto sincrono. */ -export default async function BlogPost({ params }: { params: Promise<{ slug: string }> }) { - const {slug} = await params; - const post = blogPosts.find((p) => p.slug === slug); - - if (!post) { - return
Post non trovato
; - } - - return ( -
-

{post.title}

-

{post.content}

-
- ); -} diff --git a/src/app/(content)/blog/categorie/page.tsx b/src/app/(content)/blog/categorie/page.tsx deleted file mode 100644 index 97c3237..0000000 --- a/src/app/(content)/blog/categorie/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function Categorie(){ - return

Blog Categorie

-} \ No newline at end of file diff --git a/src/app/(content)/blog/page.tsx b/src/app/(content)/blog/page.tsx deleted file mode 100644 index c906eef..0000000 --- a/src/app/(content)/blog/page.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import Link from "next/link"; - -interface Post { - slug: string; - title: string; - excerpt: string; -} - -const blogPosts: Post[]= [ - { - slug: "primo-post", - title: "Il mio primo post", - excerpt: "Una breve introduzione al mio primo post...", - }, - { - slug: "secondo-post", - title: "Il mio secondo post", - excerpt: "Qualcosa di interessante sul seondo post", - - }, - { - slug: "terzo post", - title: "Il mio terzo post", - excerpt: "Un altro post interessante da leggere", - } -] - -export default function BlogPage() { - return ( -
-

Blog

-
- { blogPosts.map((post) => ( -
-

- - {post.title} - -

-

{post.excerpt}

- -
- ))} -
- -
- ); -} \ No newline at end of file diff --git a/src/app/(content)/docs/[...slug]/page.tsx b/src/app/(content)/docs/[...slug]/page.tsx deleted file mode 100644 index b227713..0000000 --- a/src/app/(content)/docs/[...slug]/page.tsx +++ /dev/null @@ -1,48 +0,0 @@ -interface DocPage { - path: string[], - title: string, - content: string, -} - -interface DocPageProps { - params: Promise<{ - slug: string[]; - }> -} - -const docs: DocPage[] = [ - { - path: ["intro"], - title: "Introduzione", - content: "Benvenuti alla documentazione...", - }, - { - path: ["intro", "getting-started"], - title: "Getting Started", - content: "Ecco come iniziare...", - }, - { - path: ["advanced", "configuration"], - title: "Configurazione Avanzata", - content: "Configurazioni dettagliate..." - }, -]; - -export default async function DocPage({ params }: DocPageProps) { - const { slug } = await params; - - - const doc = docs.find(doc => doc.path.join("/") === slug.join("/")); - - if (!doc) { - return
Pagina non trovata
; - } - - return ( -
-

{doc.title}

-

{doc.content}

-
Path: /{slug.join("/")}
-
- ) -} \ No newline at end of file diff --git a/src/app/(content)/docs/page.tsx b/src/app/(content)/docs/page.tsx deleted file mode 100644 index 85e4384..0000000 --- a/src/app/(content)/docs/page.tsx +++ /dev/null @@ -1,67 +0,0 @@ -//app/docs/page.tsx -import Link from "next/link"; - -interface DocSection { - - path: string; - title: string; - subsections?: { path: string; title: string}[]; -} - -// dati hardcodati -const docSections: DocSection[] = [ - { - path: "intro", - title: "introduzione", - subsections: [ - { path: "getting-started", title: "Getting Started"}, - { path: "installation", title: "Installazione"}, - ], - }, - { - path: "advanced", - title: "Guide Avanzate", - subsections: [ - {path: "configuration", title: "Configurazione"}, - {path: "deployment", title: "Deployment"}, - ], - }, -]; - -export default function DocPage() { - return ( -
-

Documentazione

-
- {docSections.map((section)=> ( -
-

- - {section.title} - -

- {section.subsections && ( -
    {section.subsections.map((sub)=> { - return ( -
  • - - {sub.title} - -
  • ) - })} - -
- )} -
- ))} - -
-
- ) -} \ No newline at end of file diff --git a/src/app/(content)/layout.tsx b/src/app/(content)/layout.tsx deleted file mode 100644 index a17934f..0000000 --- a/src/app/(content)/layout.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { redirect } from "next/navigation"; - - -export default function ContentLayout({ - children, - -}: { - children: React.ReactNode; -}) { - - const user = false; - if (!user) { - redirect("/"); - } - return ( -
-

- Sono del layout (content) -

-
{children}
-
- ); -} \ No newline at end of file diff --git a/src/app/(main)/articoli/pages.ts b/src/app/(main)/articoli/pages.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/app/(main)/macchine/pages.ts b/src/app/(main)/macchine/pages.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/app/(marketing)/layout.tsx b/src/app/(management)/layout.tsx similarity index 100% rename from src/app/(marketing)/layout.tsx rename to src/app/(management)/layout.tsx diff --git a/src/app/(management)/movimenti/page.tsx b/src/app/(management)/movimenti/page.tsx new file mode 100644 index 0000000..ea14196 --- /dev/null +++ b/src/app/(management)/movimenti/page.tsx @@ -0,0 +1,3 @@ +export default function Movimenti(){ + return

Movimenti

+} \ No newline at end of file diff --git a/src/app/(management)/utenti/page.tsx b/src/app/(management)/utenti/page.tsx new file mode 100644 index 0000000..1cf70ad --- /dev/null +++ b/src/app/(management)/utenti/page.tsx @@ -0,0 +1,8 @@ +import Link from "next/link"; + +export default function Utenti() { + return <> +

Utenti

+ Utenti + +} \ No newline at end of file diff --git a/src/app/(marketing)/about/page.tsx b/src/app/(marketing)/about/page.tsx deleted file mode 100644 index 4134e01..0000000 --- a/src/app/(marketing)/about/page.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export default function About(){ - return

About page

-} \ No newline at end of file diff --git a/src/app/(marketing)/contact/page.tsx b/src/app/(marketing)/contact/page.tsx deleted file mode 100644 index afd7786..0000000 --- a/src/app/(marketing)/contact/page.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Link from "next/link"; - -export default function Contact() { - return <> -

Contatti

- about1 - about2 - -} \ No newline at end of file diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index dc95cbf..b649d24 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -5,18 +5,120 @@ // @version: "1.0.0 2026-05-07" //==================================== "use client" +import { useState , MouseEvent} from "react"; +import Link from "next/link"; +interface NavLink { + href: string; + label: string; +} + +interface ServiceLink { + href: string; + label: string; +} + +const navLinks: NavLink[] = [ + { href: "/", label: "Home"}, + { href: "/movimenti", label: "Movimenti"}, + { href: "/articoli", label: "Articoli"}, + { href: "/macchine", label: "Macchine"}, + { href: "/utenti", label: "Utenti"}, + +]; + +const serviceLinks: ServiceLink[] = [ + { href: "/services/web", label: "Web Development"}, + { href: "/services/mobile", label: "Mobile Development"}, + { href: "/services/consulting", label: "Consulting"}, + +] export default function Navbar() { - return ( - <> -
-
Home
-
About
-
Document
-
Contact
-
Sources
+ + const [ isServicesOpen, setIsServicesOpen] = useState(false); + + const toggleServices = ( e: MouseEvent) => { + e.preventDefault(); + setIsServicesOpen(!isServicesOpen); + } + return ( + + ); } \ No newline at end of file