diff --git a/.gitignore b/.gitignore index f4d7a11..6f2e965 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +!src/app/.env/ \ No newline at end of file diff --git a/README.md b/README.md index 77b7339..0886d38 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,13 @@

-Zen Browser Website +Zen Browser Website

[![](https://data.jsdelivr.com/v1/package/gh/zen-browser/www/badge)](https://www.jsdelivr.com/package/gh/zen-browser/www) +[Analytics](https://plausible.io/zen-browser.app/) | [Uptime-Phare](https://uptime.zen-browser.app) + This repository contains the source code for the Zen Browser Website. We are thrilled to welcome you to our community. Before you start, please read this document to understand how you can contribute to this project. Zen Browser's website is built with [Next.js](https://nextjs.org/), [TypeScript](https://www.typescriptlang.org/), and [Tailwind CSS](https://tailwindcss.com/). diff --git a/messages/README-LANGUAGES.md b/messages/README-LANGUAGES.md deleted file mode 100644 index ec15c0b..0000000 --- a/messages/README-LANGUAGES.md +++ /dev/null @@ -1,18 +0,0 @@ -# Contributing Translations - -To contribute to the translation of your language you must modify the json in `/messages` that is named corresponding to the ISO Language Code of your given language. - -If you do not see a JSON for your language then add the language. - -## Adding a language - -1. To add a language you must add the language to the `const SUPPORTED_LANGUAGES = ['en', 'de'];` variable in the `./src/i18n.ts` file. -2. You must create a new `.json` file in the `./messages` directory -3. Copy the contents of the `en.json` file, make your way down the key-value pairs and change **only the values** to the translated equivalent. - - - - - - - diff --git a/messages/de.json b/messages/de.json deleted file mode 100644 index a862be3..0000000 --- a/messages/de.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "navigation": { - "getting-started": "Erste Schritte", - "donate": "Spenden", - "useful-links": "Nützliche Links" - } -} \ No newline at end of file diff --git a/messages/en.json b/messages/en.json deleted file mode 100644 index e0a7a18..0000000 --- a/messages/en.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "navigation": { - "getting-started": "Getting Started", - "donate": "Donate", - "useful-links": "Useful Links" - } -} \ No newline at end of file diff --git a/next.config.js b/next.config.js index 10c5c49..0e91b6d 100644 --- a/next.config.js +++ b/next.config.js @@ -1,10 +1,6 @@ -const createNextIntlPlugin = require('next-intl/plugin'); const { PHASE_DEVELOPMENT_SERVER } = require('next/constants') -const {setupDevPlatform} = require('@cloudflare/next-on-pages/next-dev') -const withNextIntl = createNextIntlPlugin(); - /** @type {import('next').NextConfig} */ const nextConfig = (phase, { defaultConfig }) => { const defaultConfigWWW = { @@ -17,9 +13,11 @@ const nextConfig = (phase, { defaultConfig }) => { { protocol: "https", hostname: "cdn.jsdelivr.net", + port: '', + pathname: '/gh/zen-browser/**', } ], - domains: ['cdn.jsdelivr.net', "raw.githubusercontent.com"], // Allow images from jsDelivr + domains: ['localhost', 'cdn.jsdelivr.net', "raw.githubusercontent.com"], // Allow images from jsDelivr }, experimental: { serverActions: { @@ -44,4 +42,4 @@ const nextConfig = (phase, { defaultConfig }) => { }; }; -module.exports = withNextIntl(nextConfig); +module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index a77dbd6..1a2a149 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,6 @@ "framer-motion": "^11.3.24", "lucide-react": "^0.400.0", "next": "14.2.4", - "next-intl": "^3.18.1", "next-themes": "^0.3.0", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -3123,55 +3122,6 @@ "integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==", "license": "MIT" }, - "node_modules/@formatjs/ecma402-abstract": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-2.0.0.tgz", - "integrity": "sha512-rRqXOqdFmk7RYvj4khklyqzcfQl9vEL/usogncBHRZfZBDOwMGuSRNFl02fu5KGHXdbinju+YXyuR+Nk8xlr/g==", - "license": "MIT", - "dependencies": { - "@formatjs/intl-localematcher": "0.5.4", - "tslib": "^2.4.0" - } - }, - "node_modules/@formatjs/fast-memoize": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-2.2.0.tgz", - "integrity": "sha512-hnk/nY8FyrL5YxwP9e4r9dqeM6cAbo8PeU9UjyXojZMNvVad2Z06FAVHyR3Ecw6fza+0GH7vdJgiKIVXTMbSBA==", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@formatjs/icu-messageformat-parser": { - "version": "2.7.8", - "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.7.8.tgz", - "integrity": "sha512-nBZJYmhpcSX0WeJ5SDYUkZ42AgR3xiyhNCsQweFx3cz/ULJjym8bHAzWKvG5e2+1XO98dBYC0fWeeAECAVSwLA==", - "license": "MIT", - "dependencies": { - "@formatjs/ecma402-abstract": "2.0.0", - "@formatjs/icu-skeleton-parser": "1.8.2", - "tslib": "^2.4.0" - } - }, - "node_modules/@formatjs/icu-skeleton-parser": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.2.tgz", - "integrity": "sha512-k4ERKgw7aKGWJZgTarIcNEmvyTVD9FYh0mTrrBMHZ1b8hUu6iOJ4SzsZlo3UNAvHYa+PnvntIwRPt1/vy4nA9Q==", - "license": "MIT", - "dependencies": { - "@formatjs/ecma402-abstract": "2.0.0", - "tslib": "^2.4.0" - } - }, - "node_modules/@formatjs/intl-localematcher": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.4.tgz", - "integrity": "sha512-zTwEpWOzZ2CiKcB93BLngUX59hQkuZjT2+SAQEscSm52peDW/getsawMcWF1rGRpMCX6D7nSJA3CzJ8gn13N/g==", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.0" - } - }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", @@ -11792,18 +11742,6 @@ "node": ">= 0.4" } }, - "node_modules/intl-messageformat": { - "version": "10.5.14", - "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.5.14.tgz", - "integrity": "sha512-IjC6sI0X7YRjjyVH9aUgdftcmZK7WXdHeil4KwbjDnRWjnVitKpAx3rr6t6di1joFp5188VqKcobOPA6mCLG/w==", - "license": "BSD-3-Clause", - "dependencies": { - "@formatjs/ecma402-abstract": "2.0.0", - "@formatjs/fast-memoize": "2.2.0", - "@formatjs/icu-messageformat-parser": "2.7.8", - "tslib": "^2.4.0" - } - }, "node_modules/invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -14647,6 +14585,7 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "license": "MIT", + "peer": true, "engines": { "node": ">= 0.6" } @@ -14708,27 +14647,6 @@ } } }, - "node_modules/next-intl": { - "version": "3.18.1", - "resolved": "https://registry.npmjs.org/next-intl/-/next-intl-3.18.1.tgz", - "integrity": "sha512-ht8HyroJeiJIte9yhg1f0Nc2rlZmkvSYQ3nhqFVJLzhq7T1Xb8nfjilffrOJc3sA8kEjBOS4bdIrg4YX8REO0Q==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/amannn" - } - ], - "license": "MIT", - "dependencies": { - "@formatjs/intl-localematcher": "^0.5.4", - "negotiator": "^0.6.3", - "use-intl": "^3.18.1" - }, - "peerDependencies": { - "next": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/next-themes": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.3.0.tgz", @@ -19102,19 +19020,6 @@ } } }, - "node_modules/use-intl": { - "version": "3.18.1", - "resolved": "https://registry.npmjs.org/use-intl/-/use-intl-3.18.1.tgz", - "integrity": "sha512-BFNhVnszG1AB04DbNvJ+TLLd1oBDGergAKI8t9xaE4vDJYZaVKQH4zmpdArbegzTu5U9XMen6w14d1P1hBwKOQ==", - "license": "MIT", - "dependencies": { - "@formatjs/fast-memoize": "^2.2.0", - "intl-messageformat": "^10.5.14" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, "node_modules/use-sidecar": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", @@ -20086,4 +19991,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 061d166..3a4977f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "framer-motion": "^11.3.24", "lucide-react": "^0.400.0", "next": "14.2.4", - "next-intl": "^3.18.1", "next-themes": "^0.3.0", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/public/compact-mode.png b/public/compact-mode.png deleted file mode 100644 index 10f8da7..0000000 Binary files a/public/compact-mode.png and /dev/null differ diff --git a/public/feature-item-1.png b/public/feature-item-1.png index 96dae41..3fdb449 100644 Binary files a/public/feature-item-1.png and b/public/feature-item-1.png differ diff --git a/src/app/.env/page.tsx b/src/app/.env/page.tsx new file mode 100644 index 0000000..5412356 --- /dev/null +++ b/src/app/.env/page.tsx @@ -0,0 +1,7 @@ + +import { redirect } from "next/navigation"; + +export default function WhyAreYouEvenHere() { + redirect("https://www.youtube.com/watch?v=dQw4w9WgXcQ"); + return null; +} diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx new file mode 100644 index 0000000..65d37e4 --- /dev/null +++ b/src/app/about/page.tsx @@ -0,0 +1,39 @@ +"use client"; +import Footer from "@/components/footer"; +import { Navigation } from "@/components/navigation"; +import { releaseNoteIsAlpha, releaseNotes } from "@/lib/release-notes"; +import Link from "next/link"; +import Markdown from 'react-markdown' +import '../privacy-policy/markdown.css'; + +export default function PrivacyPolicy() { + return ( +
+
+ + {` +# Main Developer Team + +* [**Mauro Baladés**](https://github.com/mauro-balades): Creator, Main Developer, and a funny guy. +* **Oscar Gonzalez**: Site Reliability Engineer (SRE) and code signing. +* [**Onno**](https://www.onnno.nl/index.html): logo designer. +* [**Jafeth Garro**](https://iamjafeth.com/): Documentation writer. +* **Peter Jung**: general contributor and AUR maintainer. +* [**Gunir**](https://github.com/gunir): Active contributor. +* [**n7itro**](https://github.com/n7itro): Active contributor. +* [**Canoa**](https://thatcanoa.org/) Active contributor, and very active in issue handling +* [**Jan Heres**](https://janheres.eu/): Active contributor and helps with MacOS builds. + +# Many more contributors + +![Contributors](https://contributors-img.web.app/image?repo=zen-browser/desktop) + +--- + +![Contributors](https://contributors-img.web.app/image?repo=zen-browser/www) +`} + +
+
+ ) +} diff --git a/src/app/branding-assets/page.tsx b/src/app/branding-assets/page.tsx index 2399c78..da7063b 100644 --- a/src/app/branding-assets/page.tsx +++ b/src/app/branding-assets/page.tsx @@ -6,8 +6,6 @@ export default function BrandingAssetsPage() { return (
-
); } diff --git a/src/app/create-theme/page.tsx b/src/app/create-theme/page.tsx index 867610e..ee3cf84 100644 --- a/src/app/create-theme/page.tsx +++ b/src/app/create-theme/page.tsx @@ -6,8 +6,6 @@ export default function BrandingAssetsPage() { return (
-
); } diff --git a/src/app/download/page.tsx b/src/app/download/page.tsx index ce92777..fc586ec 100644 --- a/src/app/download/page.tsx +++ b/src/app/download/page.tsx @@ -7,8 +7,6 @@ export default function Download() { return (
-
); } diff --git a/src/app/feed.xml/route.ts b/src/app/feed.xml/route.ts deleted file mode 100644 index 4d761f1..0000000 --- a/src/app/feed.xml/route.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Feed } from "feed"; -import { releaseNotes } from "@/lib/release-notes"; -import type { ReleaseNote } from "@/lib/release-notes"; - -// Force feed.xml to be cached as static and remain constant for the lifetime of the current site build. -// The supplied releaseNotes array is constant per build, so this will always be the latest release notes. -export const dynamic = "force-static"; - -/** The default number of entries to include in the RSS feed. */ -const RSS_ENTRY_LIMIT = 20; - -/** - * Handles the GET request for the `feed.xml` endpoint. - * @returns The RSS feed for the Zen Browser release notes. - */ -export async function GET() { - // Just in case the release notes array is empty for whatever reason. - const latestDate = releaseNotes.length > 0 - ? formatRssDate(releaseNotes[0].date) - : new Date(); - - const feed = new Feed({ - id: "https://www.zen-browser.app/release-notes", - link: "https://www.zen-browser.app/release-notes", - title: "Zen Browser Release Notes", - description: "Release Notes for the Zen Browser", - language: "en", - favicon: "https://www.zen-browser.app/favicon.ico", - copyright: `Zen Browser © ${new Date().getFullYear()} - Made with ❤️ by the Zen team.`, - updated: latestDate, - }); - - for (const releaseNote of releaseNotes.slice(0, RSS_ENTRY_LIMIT)) { - feed.addItem({ - title: `Release notes for version ${releaseNote.version}`, - id: `https://www.zen-browser.app/release-notes/${releaseNote.version}`, - link: `https://www.zen-browser.app/release-notes/${releaseNote.version}`, - date: formatRssDate(releaseNote.date), - description: releaseNote.extra, - content: formatReleaseNote(releaseNote), - }); - } - - return new Response(feed.rss2(), { - headers: { - 'Content-Type': 'application/xml; charset=utf-8', - }, - }); -} - -/** - * Formats a date string in the format day/month/year. - * - * Note: If release notes change to ISO format, this will need to be updated. - * @param dateStr The date string to format. - * @returns The passed in date string as a Date object. - */ -function formatRssDate(dateStr: string) { - const splitDate = dateStr.split("/"); - if (splitDate.length !== 3) { - throw new Error("Invalid date format"); - } - - const day = Number(splitDate[0]); - const month = Number(splitDate[1]) - 1; - const year = Number(splitDate[2]); - return new Date(year, month, day); -} - -/** - * Formats the release note entry for use as the content of the RSS feed. - * @param releaseNote The release note to format. - * @returns The formatted release note as a HTML string. - */ -function formatReleaseNote(releaseNote: ReleaseNote) { - let content = "

If you encounter any issues, please report them on the issues page. Thanks everyone for your feedback! ❤️

"; - - if (releaseNote.extra) { - content += `

${releaseNote.extra.replace(/(\n)/g, "
")}

` - } - - if (releaseNote.breakingChanges) { - content += `

⚠️ Breaking changes

` - content += `` - } - - if (releaseNote.features) { - content += `

⭐ Features

` - content += `` - } - - if (releaseNote.fixes) { - content += `

✓ Fixes

` - content += `` - } - - return content; -} diff --git a/src/app/globals.css b/src/app/globals.css index 28eb341..1197e25 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -50,11 +50,11 @@ */ } - .dark { + [data-theme='dark'], .dark { --background: 0 0% 0%; --foreground: 0 0% 98%; - --surface: rgb(23, 23, 23); + --surface: rgb(23, 23, 23); --card: 0 0% 3.9%; --card-foreground: 0 0% 98%; @@ -85,12 +85,13 @@ } @layer base { + html { + @apply scroll-smooth; + } * { @apply border-border; } body { @apply bg-background text-foreground; - - scroll-behavior: smooth; } -} +} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e48f367..9e47b35 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,13 +3,11 @@ import { Inter } from "next/font/google"; import "./globals.css"; import { ThemeProvider } from "@/components/theme-provider"; import StyledComponentsRegistry from "@/lib/styled-components-registry"; -import {NextIntlClientProvider} from 'next-intl'; -import {getLocale, getMessages} from 'next-intl/server'; +import Footer from "@/components/footer"; +import { Navigation } from "@/components/navigation"; const inter = Inter({ subsets: ["latin"] }); -export const runtime = 'edge'; - export const metadata: Metadata = { title: "Zen Browser", description: "Download now and experience the Zen Browser", @@ -21,27 +19,28 @@ export default async function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { - const locale = await getLocale(); - - const messages = await getMessages(); return ( - + + - - - {children} - - + + +
+ {children} +
+
+
); diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index f9e9338..5855f54 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -1,15 +1,8 @@ -import { BrandingAssets } from "@/components/branding-assets"; -import Footer from "@/components/footer"; -import { Navigation } from "@/components/navigation"; - -export const runtime = 'edge' export default function NotFoundPage() { return (

404

-
); } diff --git a/src/app/page.tsx b/src/app/page.tsx index d3867cd..c70c0f1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -10,8 +10,6 @@ export default function Home() {
-
); } diff --git a/src/app/privacy-policy/page.tsx b/src/app/privacy-policy/page.tsx index 32236a3..a178837 100644 --- a/src/app/privacy-policy/page.tsx +++ b/src/app/privacy-policy/page.tsx @@ -83,7 +83,7 @@ You can also optionally enable telemetry data collection and other Mozilla Resea # 9. Contact Us If you have any questions or concerns about this Privacy Policy or Zen Browser, please contact us at: -* Discord: [Zen Browser's Discord](https://discord.gg/nnShMQzR4b) +* Discord: [Zen Browser's Discord](https://discord.com/servers/mauro-s-little-sweatshop-1088172780480114748) * GitHub: [Organization](https://github.com/zen-browser) --- @@ -91,8 +91,6 @@ If you have any questions or concerns about this Privacy Policy or Zen Browser, By using Zen Browser, you agree to this Privacy Policy. Remember, with Zen, your privacy is in your hands.`} -