From 5f455e6cc3649acae1df90f56c07c701ee08bd02 Mon Sep 17 00:00:00 2001 From: Qwikode Date: Thu, 21 Nov 2024 23:32:53 +0200 Subject: [PATCH 1/2] fix(ui): header gradient and textarea border effect --- app/components/chat/BaseChat.module.scss | 104 ++++++++++++++++++ app/components/chat/BaseChat.tsx | 55 +++++++-- .../header/HeaderActionButtons.client.tsx | 2 +- 3 files changed, 153 insertions(+), 8 deletions(-) diff --git a/app/components/chat/BaseChat.module.scss b/app/components/chat/BaseChat.module.scss index 3d6ed4c8..204a24aa 100644 --- a/app/components/chat/BaseChat.module.scss +++ b/app/components/chat/BaseChat.module.scss @@ -17,3 +17,107 @@ .Chat { opacity: 1; } + +.RayContainer { + --gradient-opacity: 0.85; + --ray-gradient: radial-gradient(rgba(83, 196, 255, var(--gradient-opacity)) 0%, rgba(43, 166, 255, 0) 100%); + transition: opacity 0.25s linear; + position: fixed; + inset: 0; + pointer-events: none; + user-select: none; +} + +.LightRayOne { + width: 480px; + height: 680px; + transform: rotate(80deg); + top: -540px; + left: 250px; + filter: blur(110px); + position: absolute; + border-radius: 100%; + background: var(--ray-gradient); +} + +.LightRayTwo { + width: 110px; + height: 400px; + transform: rotate(-20deg); + top: -280px; + left: 350px; + mix-blend-mode: overlay; + opacity: 0.6; + filter: blur(60px); + position: absolute; + border-radius: 100%; + background: var(--ray-gradient); +} + +.LightRayThree { + width: 400px; + height: 370px; + top: -350px; + left: 200px; + mix-blend-mode: overlay; + opacity: 0.6; + filter: blur(21px); + position: absolute; + border-radius: 100%; + background: var(--ray-gradient); +} + +.LightRayFour { + position: absolute; + width: 330px; + height: 370px; + top: -330px; + left: 50px; + mix-blend-mode: overlay; + opacity: 0.5; + filter: blur(21px); + border-radius: 100%; + background: var(--ray-gradient); +} + +.LightRayFive { + position: absolute; + width: 110px; + height: 400px; + transform: rotate(-40deg); + top: -280px; + left: -10px; + mix-blend-mode: overlay; + opacity: 0.8; + filter: blur(60px); + border-radius: 100%; + background: var(--ray-gradient); +} + +.PromptEffectContainer { + --prompt-container-offset: 50px; + --prompt-line-stroke-width: 1px; + position: absolute; + pointer-events: none; + inset: calc(var(--prompt-container-offset) / -2); + width: calc(100% + var(--prompt-container-offset)); + height: calc(100% + var(--prompt-container-offset)); +} + +.PromptEffectLine { + width: calc(100% - var(--prompt-container-offset) + var(--prompt-line-stroke-width)); + height: calc(100% - var(--prompt-container-offset) + var(--prompt-line-stroke-width)); + x: calc(var(--prompt-container-offset) / 2 - var(--prompt-line-stroke-width) / 2); + y: calc(var(--prompt-container-offset) / 2 - var(--prompt-line-stroke-width) / 2); + rx: calc(8px - var(--prompt-line-stroke-width)); + fill: transparent; + stroke-width: var(--prompt-line-stroke-width); + stroke: url(#line-gradient); + stroke-dasharray: 35px 65px; + stroke-dashoffset: 10; +} + +.PromptShine { + fill: url(#shine-gradient); + mix-blend-mode: overlay; +} \ No newline at end of file diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index 396fb012..e0ccb682 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -160,6 +160,13 @@ export const BaseChat = React.forwardRef( )} data-chat-visible={showChat} > +
+
+
+
+
+
+
{() => }
@@ -192,12 +199,38 @@ export const BaseChat = React.forwardRef(
+ + + + + + + + + + + + + + + + + + (