Merge branch 'main' of https://github.com/zen-browser/www
This commit is contained in:
@@ -3,17 +3,19 @@ const nextConfig = {
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: 'https',
|
||||
hostname: 'raw.githubusercontent.com',
|
||||
protocol: "https",
|
||||
hostname: "raw.githubusercontent.com",
|
||||
},
|
||||
],
|
||||
},
|
||||
experimental: {
|
||||
serverActions: {
|
||||
// edit: updated to new key. Was previously `allowedForwardedHosts`
|
||||
allowedOrigins: ['localhost:3000', 'get-zen.vercel.app'],
|
||||
allowedOrigins: ["localhost:3000", "get-zen.vercel.app"],
|
||||
},
|
||||
|
||||
},
|
||||
compiler: {
|
||||
styledComponents: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { ThemeProvider } from "@/components/theme-provider"
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import StyledComponentsRegistry from "@/lib/styled-components-registry";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
@@ -28,7 +29,7 @@ export default function RootLayout({
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
{children}
|
||||
<StyledComponentsRegistry>{children}</StyledComponentsRegistry>
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -52,7 +52,7 @@ Zen Browser offers a "Sync" feature, this is implemented using Mozilla Firefox's
|
||||
# 4. Data Security
|
||||
Although Zen Browser does not collect your data, we are committed to protecting the information that is stored locally on your device and, if you use the Sync feature, the encrypted data stored on Mozilla's servers. We recommend that you use secure passwords, enable device encryption, and regularly update your software to ensure your data remains safe.
|
||||
|
||||
* Note that most of the security measures are taken care by mozilla firefox.
|
||||
* Note that most of the security measures are taken care by Mozilla Firefox.
|
||||
|
||||
# 5. Your Control
|
||||
## 5.1. Data Deletion
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
import { LOGO_COLORS } from "@/lib/logos";
|
||||
|
||||
export function BrandingAssets() {
|
||||
@@ -19,6 +20,7 @@ export function BrandingAssets() {
|
||||
<div className="flex items-center my-2">
|
||||
<a
|
||||
href={`/logos/zen-${color}.svg`}
|
||||
download={`zen-${color}.svg`}
|
||||
className="text-blue-500 text-md ml-2"
|
||||
>
|
||||
{color}
|
||||
@@ -40,7 +42,7 @@ export function BrandingAssets() {
|
||||
<div className="flex items-center my-2">
|
||||
<a
|
||||
href={`/logos/zen-alpha-${color}.svg`}
|
||||
download={`zen-alpha-${color}.png`}
|
||||
download={`zen-alpha-${color}.svg`}
|
||||
className="text-blue-500 text-md ml-2"
|
||||
>
|
||||
{color}
|
||||
|
||||
@@ -74,7 +74,7 @@ export default function Features() {
|
||||
Goodbye bad performance
|
||||
</h2>
|
||||
<p className="text-center text-sm mt-2 text-muted-foreground">
|
||||
We are constantly tweak firefox's engine and settings to make it
|
||||
We constantly tweak Firefox's engine and settings to make it
|
||||
faster than ever. <a className="text-blue-500" href="https://github.com/zen-browser/desktop/blob/main/docs/performance.md" target='_blank'>Learn more</a>
|
||||
</p>
|
||||
</div>
|
||||
@@ -102,7 +102,7 @@ export default function Features() {
|
||||
Secure by default
|
||||
</h2>
|
||||
<p className="text-center text-sm mt-2 text-muted-foreground">
|
||||
We are always using the latest security features from firefox to
|
||||
We are always using the latest security features from Firefox to
|
||||
keep you safe. <a className="text-blue-500" href="https://docs.zen-browser.app/faq#how-do-i-know-zen-is-safe">Learn more</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Button } from "./ui/button";
|
||||
import { useEffect, useState } from "react";
|
||||
import Markdown from "react-markdown";
|
||||
import '../app/privacy-policy/markdown.css';
|
||||
import { ChevronLeft, LoaderCircleIcon, LoaderIcon, LoaderPinwheelIcon, MoveLeftIcon } from "lucide-react";
|
||||
import { ChevronLeft, LoaderCircleIcon } from "lucide-react";
|
||||
|
||||
export default function ThemePage({ theme }: { theme: ZenTheme }) {
|
||||
const [readme, setReadme] = useState<string | null>(null);
|
||||
@@ -14,7 +14,11 @@ export default function ThemePage({ theme }: { theme: ZenTheme }) {
|
||||
|
||||
return (
|
||||
<div className="mt-24 lg:mt-56 flex-col lg:flex-row flex mx-auto items-start relative">
|
||||
<div className="flex flex-col relative lg:fixed w-md h-full p-5 lg:p-0 lg:pr-5 mr-5 w-full md:max-w-sm">
|
||||
<div className="flex flex-col relative lg:sticky lg:top-0 w-md h-full p-5 lg:p-0 lg:pr-5 mr-5 w-full md:max-w-sm">
|
||||
<div className="flex mt-2 mb-9 items-center cursor-pointer opacity-70" onClick={() => window.history.back()}>
|
||||
<ChevronLeft className="w-4 h-4 mr-1" />
|
||||
<h3 className="text-md">Go back</h3>
|
||||
</div>
|
||||
<Image src={theme.image} alt={theme.name} width={500} height={500} className="w-full object-cover rounded-lg border-2 shadow" />
|
||||
<h1 className="text-2xl mt-5 font-bold">{theme.name}</h1>
|
||||
<p className="text-sm text-muted-foreground mt-2">{theme.description}</p>
|
||||
@@ -42,11 +46,7 @@ export default function ThemePage({ theme }: { theme: ZenTheme }) {
|
||||
<p id="install-theme-error" className="text-muted-foreground text-sm mt-2">You need to have Zen Browser installed to install this theme. <a href="/download" className="text-blue-500">Download now!</a></p>
|
||||
</div>
|
||||
<hr className="block my-4 lg:hidden" />
|
||||
<div className="flex flex-col lg:border-l lg:min-h-96 pl-10 lg:ml-[25rem] max-w-xl lg:min-w-96 w-full">
|
||||
<div className="flex my-2 items-center cursor-pointer opacity-70" onClick={() => window.history.back()}>
|
||||
<ChevronLeft className="w-4 h-4 mr-1" />
|
||||
<h3 className="text-md">Go back</h3>
|
||||
</div>
|
||||
<div className="flex flex-col lg:border-l lg:min-h-96 px-5 lg:pl-10 max-w-xl lg:min-w-96 w-full">
|
||||
<div id="policy" className="w-full">
|
||||
{readme === null ? (
|
||||
<LoaderCircleIcon className="animate-spin w-12 h-12 mx-auto" />
|
||||
|
||||
29
src/lib/styled-components-registry.tsx
Normal file
29
src/lib/styled-components-registry.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
"use client";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { useServerInsertedHTML } from "next/navigation";
|
||||
import { ServerStyleSheet, StyleSheetManager } from "styled-components";
|
||||
|
||||
export default function StyledComponentsRegistry({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
// Only create stylesheet once with lazy initial state
|
||||
// x-ref: https://reactjs.org/docs/hooks-reference.html#lazy-initial-state
|
||||
const [styledComponentsStyleSheet] = useState(() => new ServerStyleSheet());
|
||||
|
||||
useServerInsertedHTML(() => {
|
||||
const styles = styledComponentsStyleSheet.getStyleElement();
|
||||
styledComponentsStyleSheet.instance.clearTag();
|
||||
return <>{styles}</>;
|
||||
});
|
||||
|
||||
if (typeof window !== "undefined") return <>{children}</>;
|
||||
|
||||
return (
|
||||
<StyleSheetManager sheet={styledComponentsStyleSheet.instance}>
|
||||
{children}
|
||||
</StyleSheetManager>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user