From 80562a657b9a4014148e3c1298e7f658ea0cc1d8 Mon Sep 17 00:00:00 2001 From: Arne Pedersen Date: Tue, 27 Dec 2022 20:53:55 +0100 Subject: [PATCH] apply dark/light mode color scheme. --- src/components/button/index.tsx | 6 +---- src/components/header/index.tsx | 6 ++--- src/pages/index.tsx | 48 ++++++++++++++++----------------- src/styles/global.css | 35 +++++++++++++++++++++--- tailwind.config.js | 6 ++--- 5 files changed, 63 insertions(+), 38 deletions(-) diff --git a/src/components/button/index.tsx b/src/components/button/index.tsx index 5f0f503..d6a0ecb 100644 --- a/src/components/button/index.tsx +++ b/src/components/button/index.tsx @@ -8,11 +8,7 @@ type ButtonProps = { export const Button = ({ children, disabled, onClick, className }: ButtonProps) => { return (
-
diff --git a/src/components/header/index.tsx b/src/components/header/index.tsx index 5655b69..155345c 100644 --- a/src/components/header/index.tsx +++ b/src/components/header/index.tsx @@ -53,10 +53,10 @@ export function Header() { } return ( -
-
+
+
-

Sendstr

+

Sendstr

{/* (
- -
-

Open source e2e encrypted shared clipboard

-

- Sendstr is an open source end-to-end encrypted shared clipboard app built on top of{" "} - - Nostr - - . No login needed, new throwaway encryption keys are generated on page load, and the - default relay deletes messages after 1 hour. To get started open this page on another - device and choose one of the options below. -

-
- - -
+
+

+ e2e encrypted shared clipboard +

+

+ Sendstr is an open source end-to-end encrypted shared clipboard app built on top of{" "} + + Nostr + + . No login needed, new throwaway encryption keys are generated on page load, and the + default relay deletes messages after 1 hour. To get started open this page on another + device and choose one of the options below. +

+
+ +
- +
) @@ -57,7 +57,7 @@ export default function Home({ keys }: HomeProps) { <> Sendstr - + -
+
-
+
diff --git a/src/styles/global.css b/src/styles/global.css index dc1c5a1..419062a 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -2,6 +2,35 @@ @tailwind components; @tailwind utilities; -body { - color: #FFFFFF -} \ No newline at end of file +:root { + --orange: #fb8500; + --orange-light: #ffb703; + --green: #004f2d; + --green-light: #7dc95e; + --red: #ff4e33; + --red-light:#ff8370; +} + +.light { + --primary: var(--orange); + --secondary: var(--green); + --warning: var(--red); +} + +.dark { + --primary: var(--orange-light); + --secondary: var(--green-light); + --warning: var(--red-light); +} + +@layer base { + body { + @apply dark:bg-black dark:text-gray-100 bg-white text-gray-900 + } +} + +@layer components { + .btn-main { + @apply bg-primary rounded-md px-6 py-3 w-full h-full shadow text-gray-100 dark:text-gray-900 font-semibold + } + } diff --git a/tailwind.config.js b/tailwind.config.js index d31caa7..255e7e7 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -9,9 +9,9 @@ module.exports = { theme: { extend: { colors: { - "custom-green-light": "#6b9370", - "custom-green-dark": "#4D6A51", - "custom-black": "#3C3744", + primary: "var(--primary)", + secondary: "var(--secondary)", + warning: "var(--warning)", }, }, },