Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
Le0Developer committed Dec 18, 2023
1 parent 3397f1c commit 267fcc5
Show file tree
Hide file tree
Showing 18 changed files with 7,163 additions and 7,156 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": ["next/core-web-vitals", "prettier"]
"extends": ["next/core-web-vitals", "prettier"]
}
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"tabWidth": 4
"tabWidth": 4
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# turnstile-demo

Small turnstile demo using NextJS and [react-turnstile](https://www.npmjs.com/package/react-turnstile).
Small turnstile demo using NextJS and
[react-turnstile](https://www.npmjs.com/package/react-turnstile).

Hosted on: https://turnstile-demo.pages.dev
104 changes: 52 additions & 52 deletions components/bsod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,57 @@ import Link from "next/link";
import { useState } from "react";

export default function BSOD({ error }: { error: Error }) {
const [showTechnical, setShowTechnical] = useState(false);
return (
<div className="absolute flex flex-col items-center justify-center w-screen h-screen px-4 py-8 bg-blue-400 inset gap-y-32">
<div>
<p className="text-9xl">{":("}</p>
<p className="mt-6 mb-12 text-2xl font-medium">
This website ran into a problem and needs to be reloaded.
</p>
<div className="grid gap-x-4 gap-y-2 sm:grid-cols-2">
<Link href="/discord">
<a className="--btn --btn-3 --btn-neutral">Support</a>
</Link>
{error && (
<button
className="--btn --btn-3 --btn-neutral"
onClick={() => setShowTechnical(!showTechnical)}
>
{showTechnical
? "Hide technical information"
: "Show technical information"}
</button>
)}
</div>
</div>
const [showTechnical, setShowTechnical] = useState(false);
return (
<div className="absolute flex flex-col items-center justify-center w-screen h-screen px-4 py-8 bg-blue-400 inset gap-y-32">
<div>
<p className="text-9xl">{":("}</p>
<p className="mt-6 mb-12 text-2xl font-medium">
This website ran into a problem and needs to be reloaded.
</p>
<div className="grid gap-x-4 gap-y-2 sm:grid-cols-2">
<Link href="/discord">
<a className="--btn --btn-3 --btn-neutral">Support</a>
</Link>
{error && (
<button
className="--btn --btn-3 --btn-neutral"
onClick={() => setShowTechnical(!showTechnical)}
>
{showTechnical
? "Hide technical information"
: "Show technical information"}
</button>
)}
</div>
</div>

{showTechnical && (
<>
<div>
<p className="text-4xl font-bold">
{error.message || error.toString()}
</p>
<pre>
<code className="break-all">{error.stack}</code>
</pre>
</div>
{navigator.clipboard && (
<button
className="--btn --btn-3 --btn-neutral"
onClick={() => {
const header =
error.message || error.toString();
navigator.clipboard.writeText(
`${header}\n${error.stack}`
);
}}
>
Copy information
</button>
)}
</>
)}
</div>
);
{showTechnical && (
<>
<div>
<p className="text-4xl font-bold">
{error.message || error.toString()}
</p>
<pre>
<code className="break-all">{error.stack}</code>
</pre>
</div>
{navigator.clipboard && (
<button
className="--btn --btn-3 --btn-neutral"
onClick={() => {
const header =
error.message || error.toString();
navigator.clipboard.writeText(
`${header}\n${error.stack}`,
);
}}
>
Copy information
</button>
)}
</>
)}
</div>
);
}
32 changes: 16 additions & 16 deletions components/metatags.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import Head from "next/head";

export default function MetaTags({
title,
description,
title,
description,
}: {
title: string;
description?: string;
title: string;
description?: string;
}) {
return (
<Head>
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
<meta property="og:type" content="article" />
<meta property="og:description" content={description} />
<meta property="og:image" content="/img/avatar.png" />
<meta property="og:color" content="#6366F1" />
<meta name="twitter:card" content="summary" />
</Head>
);
return (
<Head>
<title>{title}</title>
<meta name="description" content={description} />
<meta property="og:title" content={title} />
<meta property="og:type" content="article" />
<meta property="og:description" content={description} />
<meta property="og:image" content="/img/avatar.png" />
<meta property="og:color" content="#6366F1" />
<meta name="twitter:card" content="summary" />
</Head>
);
}
18 changes: 9 additions & 9 deletions components/skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import clsx from "clsx";
import React from "react";

export default function Skeleton({ className }: { className?: string }) {
return (
<div
className={clsx(
"skeleton",
"bg-coolGray-400 bg-gradient-to-r from-coolGray-400 via-coolGray-300 to-coolGray-400 bg-no-repeat",
className
)}
/>
);
return (
<div
className={clsx(
"skeleton",
"bg-coolGray-400 bg-gradient-to-r from-coolGray-400 via-coolGray-300 to-coolGray-400 bg-no-repeat",
className,
)}
/>
);
}
16 changes: 8 additions & 8 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"jsx": "react",
"baseUrl": ".",
"paths": {
"@/components/*": ["components/*"],
"@/lib/*": ["lib/*"]
}
}
"compilerOptions": {
"jsx": "react",
"baseUrl": ".",
"paths": {
"@/components/*": ["components/*"],
"@/lib/*": ["lib/*"]
}
}
}
Loading

0 comments on commit 267fcc5

Please sign in to comment.