From 168fe34fdf53499c98e40db027281ea5fafbbe48 Mon Sep 17 00:00:00 2001 From: Matteo Date: Mon, 3 Feb 2025 23:39:57 +0100 Subject: [PATCH] feat: hompage and routing --- .github/workflows/build.yml | 35 + .github/workflows/ci.yml | 41 - apps/documentation-app/src/app/app.module.css | 1 - apps/documentation-app/src/app/app.tsx | 39 +- apps/documentation-app/src/app/nx-welcome.tsx | 848 ------------------ apps/documentation-app/src/assets/Coding.jpg | Bin 0 -> 2421275 bytes .../src/assets/Coding.jpg:Zone.Identifier | 4 + .../src/assets/Logo Marino-UI.png | Bin 0 -> 33566 bytes .../assets/Logo Marino-UI.png:Zone.Identifier | 3 + .../src/components/Footer.tsx | 19 + .../src/components/Layout.tsx | 6 + .../src/components/Navbar.tsx | 28 + .../src/pages/ComponentsPage.tsx | 52 ++ apps/documentation-app/src/pages/DocsPage.tsx | 89 ++ apps/documentation-app/src/pages/Homepage.tsx | 59 ++ package-lock.json | 64 +- package.json | 3 +- packages/button/src/lib/button.tsx | 7 + packages/footer/src/lib/footer.tsx | 64 ++ packages/form/src/lib/form.tsx | 248 ++++- packages/grid/src/lib/grid.tsx | 24 +- packages/header/src/lib/header.tsx | 144 ++- packages/searchbar/src/lib/searchbar.tsx | 86 +- 23 files changed, 942 insertions(+), 922 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 apps/documentation-app/src/app/app.module.css delete mode 100644 apps/documentation-app/src/app/nx-welcome.tsx create mode 100644 apps/documentation-app/src/assets/Coding.jpg create mode 100644 apps/documentation-app/src/assets/Coding.jpg:Zone.Identifier create mode 100644 apps/documentation-app/src/assets/Logo Marino-UI.png create mode 100644 apps/documentation-app/src/assets/Logo Marino-UI.png:Zone.Identifier create mode 100644 apps/documentation-app/src/components/Footer.tsx create mode 100644 apps/documentation-app/src/components/Layout.tsx create mode 100644 apps/documentation-app/src/components/Navbar.tsx create mode 100644 apps/documentation-app/src/pages/ComponentsPage.tsx create mode 100644 apps/documentation-app/src/pages/DocsPage.tsx create mode 100644 apps/documentation-app/src/pages/Homepage.tsx diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2282ed9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build after Push + + +on: + push: + branches: + - master # Trigger automatico dopo una push su master + workflow_dispatch: # Trigger manuale + inputs: + build_type: + description: "Tipo di build (esempio: fast-build, full-build)" + required: true + default: "fast-build" + + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install Dependencies + run: npm install + + - name: Run Build + run: npm run build + + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index a30f06e..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: CI - -on: - push: - branches: - - main - pull_request: - -permissions: - actions: read - contents: read - -jobs: - main: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - - # This enables task distribution via Nx Cloud - # Run this command as early as possible, before dependencies are installed - # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - - # Cache node_modules - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - - run: npm ci --legacy-peer-deps - - uses: nrwl/nx-set-shas@v4 - - # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud - # - run: npx nx-cloud record -- echo Hello World - # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected - - run: npx nx affected -t lint test build diff --git a/apps/documentation-app/src/app/app.module.css b/apps/documentation-app/src/app/app.module.css deleted file mode 100644 index 7b88fba..0000000 --- a/apps/documentation-app/src/app/app.module.css +++ /dev/null @@ -1 +0,0 @@ -/* Your styles goes here. */ diff --git a/apps/documentation-app/src/app/app.tsx b/apps/documentation-app/src/app/app.tsx index ec8487c..ba3bad5 100644 --- a/apps/documentation-app/src/app/app.tsx +++ b/apps/documentation-app/src/app/app.tsx @@ -1,16 +1,37 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars -import { Button } from '@marino-ui/button'; -import styles from './app.module.css'; - -import NxWelcome from './nx-welcome'; +import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; // Importa Router e Route da React Router +import Homepage from '../pages/Homepage'; +import { Navbar } from '../components/Navbar'; +import ComponentsPage from '../pages/ComponentsPage'; +import Layout from '../components/Layout'; +import DocsPage from '../pages/DocsPage'; import { Footer } from '@marino-ui/footer'; -export function App() { +function App() { return ( -
-
+ + + + } /> + + + + } + /> + + + + } + /> + +