diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..bffb357 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.github/workflows/build_deploy_master.yml b/.github/workflows/build_deploy_master.yml index b98ce51..59cc116 100644 --- a/.github/workflows/build_deploy_master.yml +++ b/.github/workflows/build_deploy_master.yml @@ -2,37 +2,40 @@ name: Build & Deploy to Pages on: push: - branches: [ master ] + branches: [master] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout 🛒 - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install and Build - run: | - npm ci - npm run prerender + - name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧 + uses: ./.github/workflows/setup-node - - name: Deploy to gh-pages branch - uses: JamesIves/github-pages-deploy-action@v4.4.3 + - name: Setup Pages ⚙️ + uses: actions/configure-pages@v4 with: - branch: gh-pages - folder: build + static_site_generator: next - - name: Push to Web3.storage - uses: web3-storage/add-to-web3@v2 - id: web3 + - name: Build with Next.js 🏗️ + run: npx next build + + - name: Upload artifact 📡 + uses: actions/upload-pages-artifact@v3 with: - web3_token: ${{ secrets.WEB3_STORAGE_TOKEN }} - path_to_add: 'build' + path: ./landing-page/out - - run: echo ${{ steps.web3.outputs.cid }} - - run: echo ${{ steps.web3.outputs.url }} + - name: Publish to GitHub Pages 🚀 + uses: actions/deploy-pages@v4 + + #- name: Deploy to gh-pages branch + # uses: JamesIves/github-pages-deploy-action@v4.4.3 + # with: + # branch: gh-pages + # folder: out diff --git a/.github/workflows/build_dev.yml b/.github/workflows/build_dev.yml index 48c4e57..4df0d6e 100644 --- a/.github/workflows/build_dev.yml +++ b/.github/workflows/build_dev.yml @@ -2,14 +2,13 @@ name: Build Dev on: push: - branches: [ dev ] + branches: [dev] pull_request: - branches: [ dev ] + branches: [dev] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: - jobs: build-and-deploy-dev: permissions: @@ -20,15 +19,16 @@ jobs: steps: - name: Checkout 🛒 - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install and Build - run: | - npm ci - npm run prerender + - name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧 + uses: ./.github/workflows/setup-node - - name: Deploy to gh-pages-dev branch - uses: JamesIves/github-pages-deploy-action@v4.4.3 + - name: Setup Pages ⚙️ + uses: actions/configure-pages@v4 with: - branch: gh-pages-dev - folder: build + static_site_generator: next + + - name: Build with Next.js 🏗️ + run: npx next build + diff --git a/.github/workflows/setup-node/action.yml b/.github/workflows/setup-node/action.yml new file mode 100644 index 0000000..9042c7d --- /dev/null +++ b/.github/workflows/setup-node/action.yml @@ -0,0 +1,21 @@ +name: setup-node +description: "Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧" +runs: + using: "composite" + steps: + - name: Setup Node.js ⚙️ + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Cache dependencies ⚡ + id: cache_dependencies + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ hashFiles('package-lock.json') }} + + - name: Install dependencies 🔧 + shell: bash + if: steps.cache_dependencies.outputs.cache-hit != 'true' + run: npm ci diff --git a/.gitignore b/.gitignore index 72defa3..f4773fe 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /node_modules /.pnp .pnp.js +.yarn/install-state.gz # testing /coverage @@ -20,6 +21,25 @@ build-* .env.test.local .env.production.local +# debug npm-debug.log* yarn-debug.log* yarn-error.log* + +# next.js +/.next/ +/out/ + +# misc +.DS_Store +*.pem + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts diff --git a/README.md b/README.md index d91e993..b1d60b3 100644 --- a/README.md +++ b/README.md @@ -7,56 +7,12 @@ This is the React re-write of the PSE website, formally just a landing page. `npm install` -`npm run start` serves a development server at [http://localhost:8081](http://localhost:8081) +`npm run dev` serves a development server at [http://localhost:8080](http://localhost:8080) -The components live under `/src/components`. +The app live under `/app`. ## How to contribute -### Add / Change a Project Entry - -All the projects are stored in the `projects.json` file in `/src/data/` - -Here is an example of a project's entry: - -``` json -{ - "name": "TLS Notary", - "short_name": "TLSN", - "description": "Black Magic", - "long_description": "Black Magic", - "image": "tlsn.png", - "links": [ - { - "github": "https://github.com/tlsnotary/tlsn" - }, - { - "discord": "https://discord.gg/EjpvcEaqkh" - } - ] - } -``` - -Which results in this project card: - -![TLSN_Example](TLSN_Example.png) - -#### Name / Short Name - -`name` is the name of the project, and `short_name` is the name that will be used for a placeholder image if an image isn't included or can't be found. - -#### Description / Long Description - -`description` is the description of the project in roughly the size of a tweet (so it fits on the project card), and `long_description` is the description that will be used for the project's page/pop out card (in the works now). - -#### Project Logos / Images - -Project logos/images are stored in `/src/images` and the file name needs to be listed in the project's entry in `projects.json` as `"image": "filename.png"`. - -#### Links - -Links can be `website`, `github`, `discord`, `twitter`, or `telegram`. If you want more options like that added (like Reddit for example), please create an [issue](https://github.com/AtHeartEngineering/pse_landingpage/issues/new). - ### Have an idea? Create an [issue](https://github.com/AtHeartEngineering/pse_landingpage/issues/new) and tell us the idea! diff --git a/TLSN_Example.png b/TLSN_Example.png deleted file mode 100644 index 61bbfdf..0000000 Binary files a/TLSN_Example.png and /dev/null differ diff --git a/app/about/page.tsx b/app/about/page.tsx new file mode 100644 index 0000000..3ae01fc --- /dev/null +++ b/app/about/page.tsx @@ -0,0 +1,55 @@ +import { AppContainer } from "../../components/AppContainer"; +import { Section } from "../../components/Section"; +import { Button } from "../../components/ui/Button"; +import React from "react"; +import { LINKS } from "../settings"; +import { Banner } from "../../components/ui/Banner"; +import { LABELS } from "../../content"; +import { AppLink } from "@/components/AppLink"; + +export default function AboutPage() { + return ( +
+ +
+ {LABELS.ABOUT.WHO_WE_ARE.TITLE} + + } + description={LABELS.ABOUT.WHO_WE_ARE.DESCRIPTION} + > +
+ + + +
+
+ +
+ {LABELS.ABOUT.GET_INVOLVED.TITLE} + + } + description={LABELS.ABOUT.GET_INVOLVED.DESCRIPTION} + > +
+ + + +
+
+
+ + + + } + /> +
+ ); +} diff --git a/app/faq/page.tsx b/app/faq/page.tsx new file mode 100644 index 0000000..ef81dcf --- /dev/null +++ b/app/faq/page.tsx @@ -0,0 +1,48 @@ +import { AppMarkdown } from "@/components/AppMarkdown"; +import { AppContainer } from "../../components/AppContainer"; +import { Section } from "../../components/Section"; +import { Accordion } from "../../components/ui/Accordion"; +import { LABELS } from "../../content"; +import { FAQS } from "../../content/faq"; +import React from "react"; + +export default function FAQPage() { + return ( +
+ +
+ {LABELS.COMMON.FAQ} + + } + > +
+ {FAQS.map(({ answer, question }, index) => { + return ( + + ( +

+ ), + strong: ({ ...props }) => , + a: ({ ...props }) => ( + + ), + }} + > + {answer} + + + ); + })} +

+
+
+
+ ); +} diff --git a/app/favicon.ico b/app/favicon.ico new file mode 100644 index 0000000..0431afc Binary files /dev/null and b/app/favicon.ico differ diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 0000000..861ca1c --- /dev/null +++ b/app/globals.css @@ -0,0 +1,44 @@ +@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap'); +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 0, 0, 0; + --background-start-rgb: 214, 219, 220; + --background-end-rgb: 255, 255, 255; +} + +@media (prefers-color-scheme: dark) { + :root { + --foreground-rgb: 255, 255, 255; + --background-start-rgb: 0, 0, 0; + --background-end-rgb: 0, 0, 0; + } +} + +body { + color: rgb(var(--foreground-rgb)); +} + +@layer utilities { + .text-balance { + text-wrap: balance; + } +} + +@keyframes appear { + from { opacity: 0; scale: 0.8; } + to { opacity: 1; scale: 1; } +} + + +.shadow-card { + box-shadow: 5px 39px 28px 0px rgba(0, 0, 0, 0.06); +} + +.appear { + animation: appear linear both; + animation-timeline: view(); + animation-range: entry 25% cover 45%; +} \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..de4425d --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,38 @@ +import type { Metadata } from "next"; +import { Inter, DM_Sans } from "next/font/google"; +import "./globals.css"; +import { AppFooter } from "../components/AppFooter"; +import { AppHeader } from "../components/AppHeader"; + +const inter = Inter({ subsets: ["latin"], variable: "--font-inter", display: "swap" }); +const sans = DM_Sans({ subsets: ["latin"], variable: "--font-sans", display: "swap" }); + +export const metadata: Metadata = { + title: "TLSNotary", + description: "Proof of data authenticity", + openGraph: { + images: [ + { + url: "/images/og-image.png", + width: 1200, + height: 800, + }, + ], + }, +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + + + {children} + + + + ); +} diff --git a/app/page.tsx b/app/page.tsx new file mode 100644 index 0000000..b942e13 --- /dev/null +++ b/app/page.tsx @@ -0,0 +1,130 @@ +import { AppLink } from "@/components/AppLink"; +import { AppContainer } from "../components/AppContainer"; +import { Banner, BannerTitle, BannerWrapper } from "../components/ui/Banner"; +import { Button } from "../components/ui/Button"; +import { Label } from "../components/ui/Label"; +import { LABELS } from "../content"; +import { LINKS } from "./settings"; +import { Icons } from "@/components/Icons"; +import { Section } from "@/components/Section"; +import Image from "next/image"; +import { classed } from "@tw-classed/react"; + +interface ComparisonTableProps { + title: string; + tls: boolean; + tlsNotary: boolean; +} + +const TableWrapper = classed.div("grid grid-cols-4 "); +const TableTitle = classed.h4("font-semibold text-[15px] text-inter text-brown-50 uppercase"); +const TableContent = classed.div("p-4"); + +const ComparisonTable = ({ title, tls, tlsNotary }: ComparisonTableProps) => { + return ( + + + {title} + + {tls ? : } + {tlsNotary ? : } + + ); +}; + +export default function Home() { + return ( +
+ +
+
+
+ {LABELS.HOMEPAGE.SUBTITLE} + {LABELS.HOMEPAGE.TITLE} +
+ + {LABELS.HOMEPAGE.DESCRIPTION} + +
+ + + + +
+ +
+ + +
+ {LABELS.HOMEPAGE.WHY_USE_TLSNOTARY.TITLE} + + } + description={LABELS.HOMEPAGE.WHY_USE_TLSNOTARY.DESCRIPTION} + > +
+ infographic +
+
+
+ + +
+ +
+ + TLS + + + TLSNotary + +
+
+ + {LABELS.COMMON.SERVER_AUTHENTICATION} + + + + + + {LABELS.COMMON.DATA_PORTABILITY} + + + +
+
+
+ + + + + {LABELS.COMMON.LEARN_THE_BASICS} + + +
+