diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml new file mode 100644 index 0000000..ed74736 --- /dev/null +++ b/.github/workflows/nextjs.yml @@ -0,0 +1,93 @@ +# Sample workflow for building and deploying a Next.js site to GitHub Pages +# +# To get started with Next.js see: https://nextjs.org/docs/getting-started +# +name: Deploy Next.js site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Detect package manager + id: detect-package-manager + run: | + if [ -f "${{ github.workspace }}/yarn.lock" ]; then + echo "manager=yarn" >> $GITHUB_OUTPUT + echo "command=install" >> $GITHUB_OUTPUT + echo "runner=yarn" >> $GITHUB_OUTPUT + exit 0 + elif [ -f "${{ github.workspace }}/package.json" ]; then + echo "manager=npm" >> $GITHUB_OUTPUT + echo "command=ci" >> $GITHUB_OUTPUT + echo "runner=npx --no-install" >> $GITHUB_OUTPUT + exit 0 + else + echo "Unable to determine package manager" + exit 1 + fi + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: ${{ steps.detect-package-manager.outputs.manager }} + - name: Setup Pages + uses: actions/configure-pages@v5 + with: + # Automatically inject basePath in your Next.js configuration file and disable + # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). + # + # You may remove this line if you want to manage the configuration yourself. + static_site_generator: next + - name: Restore cache + uses: actions/cache@v4 + with: + path: | + .next/cache + # Generate a new cache whenever packages or source files change. + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- + - name: Install dependencies + run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + - name: Build with Next.js + run: ${{ steps.detect-package-manager.outputs.runner }} next build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./out + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/website/.gitignore b/.gitignore similarity index 100% rename from website/.gitignore rename to .gitignore diff --git a/README.md b/README.md index d3dc51f..e215bc4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,36 @@ -# website -New website using Next.JS +This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). + +## Getting Started + +First, run the development server: + +```bash +npm run dev +# or +yarn dev +# or +pnpm dev +# or +bun dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. + +## Learn More + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! + +## Deploy on Vercel + +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. + +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. diff --git a/website/app/components/AboutUs.tsx b/app/components/AboutUs.tsx similarity index 95% rename from website/app/components/AboutUs.tsx rename to app/components/AboutUs.tsx index d9eb34e..0b19ea3 100644 --- a/website/app/components/AboutUs.tsx +++ b/app/components/AboutUs.tsx @@ -1,14 +1,13 @@ import Image from 'next/image'; import hardware from '../../public/images/aboutusimg.jpeg' -import ContactUs from './ContactUs'; export default function AboutUs() { return ( -
+

About Paragon

-
+

At Paragon Autonomous, we empower communities with cutting-edge drone technology designed to detect and suppress wildfires before they escalate. Our mission is to aid first responders by protecting lives, homes, and wildlife.

@@ -29,7 +28,7 @@ export default function AboutUs() { />
-
+

OUR FLIGHT PATH

@@ -60,7 +59,7 @@ export default function AboutUs() {
-

What's Next?

+

What&aposs Next?


We are expanding partnerships with fire departments, environmental agencies, and emergency teams to scale autonomous wildfire prevention. With continued innovation, we aim to make AI-driven fire detection and suppression the industry standard, protecting more communities and ecosystems.

diff --git a/app/components/ContactUs.tsx b/app/components/ContactUs.tsx new file mode 100644 index 0000000..146b27c --- /dev/null +++ b/app/components/ContactUs.tsx @@ -0,0 +1,126 @@ +'use client'; +import { useState, useEffect, ChangeEvent, FormEvent } from 'react'; +// import emailjs from 'emailjs-com'; + +type FormData = { + name: string; + email: string; + message: string; + category: string; +}; + +type ContactUsProps = { + onClose: () => void; + widthClass?: string; +}; + +export default function ContactUs({ onClose, widthClass = 'max-w-2xl' }: ContactUsProps) { + const [formData, setFormData] = useState({ + name: '', + email: '', + message: '', + category: 'Website Error', + }); + const [isVisible, setIsVisible] = useState(false); + + useEffect(() => { + // Trigger fade-in transition on mount + setIsVisible(true); + }, []); + + const handleChange = ( + e: ChangeEvent + ) => { + setFormData({ ...formData, [e.target.name]: e.target.value }); + }; + + const handleSubmit = async (e: FormEvent) => { + e.preventDefault(); + // try { + // await emailjs.send( + // 'your_service_id', + // 'your_template_id', + // { + // name: formData.name, + // to_email: 'example@paragonautonomous.com', + // from_email: formData.email, + // message: formData.message, + // category: formData.category, + // }, + // 'your_public_key' + // ); + // alert('Message sent successfully!'); + // setFormData({ name: '', email: '', message: '', category: 'Website Error' }); + // } catch (error) { + // console.error('Error sending email:', error); + // alert('Failed to send message.'); + // } + }; + + return ( +
+ {/* Close button in top right corner */} + +

Contact Us

+
+
+ + +
+