From 02057f1c15488fa3078c41eee27246e6a12db98e Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sat, 9 Mar 2024 18:26:43 +0900 Subject: [PATCH 1/3] refs #4795 Implement basic theme color --- package.json | 1 + renderer/{app.css => app.scss} | 73 +++++++++++++++++++ renderer/components/compose/Compose.tsx | 7 +- renderer/components/detail/Detail.tsx | 2 +- renderer/components/layouts/account.tsx | 6 +- renderer/components/layouts/timelines.tsx | 8 +- .../components/timelines/Notifications.tsx | 2 +- renderer/components/timelines/Timeline.tsx | 2 +- .../components/timelines/status/Status.tsx | 2 +- renderer/pages/_app.tsx | 2 +- yarn.lock | 42 ++++++++++- 11 files changed, 128 insertions(+), 19 deletions(-) rename renderer/{app.css => app.scss} (60%) diff --git a/package.json b/package.json index 058829c922..77ed95f1fd 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "postcss": "^8.4.31", "react": "^18.2.0", "react-dom": "^18.2.0", + "sass": "^1.71.1", "tailwindcss": "^3.3.3", "typescript": "^5.2.2" }, diff --git a/renderer/app.css b/renderer/app.scss similarity index 60% rename from renderer/app.css rename to renderer/app.scss index 831e25af0a..637c55f6c7 100644 --- a/renderer/app.css +++ b/renderer/app.scss @@ -112,3 +112,76 @@ a { a:hover { text-decoration: underline; } + +.theme-blue { + .theme-account-bg { + @apply bg-gradient-to-b; + @apply from-indigo-800; + @apply to-indigo-700; + } + + .theme-bg { + @apply bg-blue-950; + } + + .theme-bg-secondary { + @apply bg-blue-900; + } + + .theme-text-primary { + @apply text-blue-100; + } + + .theme-text-subtle { + @apply text-blue-600; + } + + .theme-badge { + @apply bg-blue-600; + } + + .theme-enabled { + @apply text-blue-400; + } + + .theme-enabled:hover { + @apply text-blue-600; + } + +} + +.theme-orange { + .theme-account-bg { + @apply bg-gradient-to-b; + @apply from-orange-900; + @apply to-orange-800; + } + + .theme-bg { + @apply bg-deep-orange-900; + } + + .theme-bg-secondary { + @apply bg-orange-900; + } + + .theme-text-primary { + @apply text-deep-orange-100; + } + + .theme-text-subtle { + @apply text-deep-orange-600; + } + + .theme-badge { + @apply bg-deep-orange-600; + } + + .theme-enabled { + @apply text-deep-orange-400; + } + + .theme-enabled:hover { + @apply text-deep-orange-600; + } +} diff --git a/renderer/components/compose/Compose.tsx b/renderer/components/compose/Compose.tsx index 4ae060b06b..70c35f7301 100644 --- a/renderer/components/compose/Compose.tsx +++ b/renderer/components/compose/Compose.tsx @@ -349,12 +349,7 @@ export default function Compose(props: Props) { {cw ? ( - setCW(false)} - > + setCW(false)}> CW ) : ( diff --git a/renderer/components/detail/Detail.tsx b/renderer/components/detail/Detail.tsx index 347cc7013e..0fd9bb21cb 100644 --- a/renderer/components/detail/Detail.tsx +++ b/renderer/components/detail/Detail.tsx @@ -46,7 +46,7 @@ export default function Detail(props: Props) { <> {target && (
-
+