Skip to content

Commit 225042b

Browse files
authored
Merge pull request #282 from thecodacus/ui-background-rays
feat(styling): added ray effects for the UI as decorative elements
2 parents aae38ea + 7f8f502 commit 225042b

File tree

8 files changed

+299
-112
lines changed

8 files changed

+299
-112
lines changed

app/components/chat/BaseChat.module.scss

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -18,82 +18,6 @@
1818
opacity: 1;
1919
}
2020

21-
.RayContainer {
22-
--gradient-opacity: 0.85;
23-
--ray-gradient: radial-gradient(rgba(83, 196, 255, var(--gradient-opacity)) 0%, rgba(43, 166, 255, 0) 100%);
24-
transition: opacity 0.25s linear;
25-
position: fixed;
26-
inset: 0;
27-
pointer-events: none;
28-
user-select: none;
29-
}
30-
31-
.LightRayOne {
32-
width: 480px;
33-
height: 680px;
34-
transform: rotate(80deg);
35-
top: -540px;
36-
left: 250px;
37-
filter: blur(110px);
38-
position: absolute;
39-
border-radius: 100%;
40-
background: var(--ray-gradient);
41-
}
42-
43-
.LightRayTwo {
44-
width: 110px;
45-
height: 400px;
46-
transform: rotate(-20deg);
47-
top: -280px;
48-
left: 350px;
49-
mix-blend-mode: overlay;
50-
opacity: 0.6;
51-
filter: blur(60px);
52-
position: absolute;
53-
border-radius: 100%;
54-
background: var(--ray-gradient);
55-
}
56-
57-
.LightRayThree {
58-
width: 400px;
59-
height: 370px;
60-
top: -350px;
61-
left: 200px;
62-
mix-blend-mode: overlay;
63-
opacity: 0.6;
64-
filter: blur(21px);
65-
position: absolute;
66-
border-radius: 100%;
67-
background: var(--ray-gradient);
68-
}
69-
70-
.LightRayFour {
71-
position: absolute;
72-
width: 330px;
73-
height: 370px;
74-
top: -330px;
75-
left: 50px;
76-
mix-blend-mode: overlay;
77-
opacity: 0.5;
78-
filter: blur(21px);
79-
border-radius: 100%;
80-
background: var(--ray-gradient);
81-
}
82-
83-
.LightRayFive {
84-
position: absolute;
85-
width: 110px;
86-
height: 400px;
87-
transform: rotate(-40deg);
88-
top: -280px;
89-
left: -10px;
90-
mix-blend-mode: overlay;
91-
opacity: 0.8;
92-
filter: blur(60px);
93-
border-radius: 100%;
94-
background: var(--ray-gradient);
95-
}
96-
9721
.PromptEffectContainer {
9822
--prompt-container-offset: 50px;
9923
--prompt-line-stroke-width: 1px;

app/components/chat/BaseChat.tsx

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -291,19 +291,9 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
291291
const baseChat = (
292292
<div
293293
ref={ref}
294-
className={classNames(
295-
styles.BaseChat,
296-
'relative flex flex-col lg:flex-row h-full w-full overflow-hidden bg-bolt-elements-background-depth-1',
297-
)}
294+
className={classNames(styles.BaseChat, 'relative flex h-full w-full overflow-hidden')}
298295
data-chat-visible={showChat}
299296
>
300-
<div className={classNames(styles.RayContainer)}>
301-
<div className={classNames(styles.LightRayOne)}></div>
302-
<div className={classNames(styles.LightRayTwo)}></div>
303-
<div className={classNames(styles.LightRayThree)}></div>
304-
<div className={classNames(styles.LightRayFour)}></div>
305-
<div className={classNames(styles.LightRayFive)}></div>
306-
</div>
307297
<ClientOnly>{() => <Menu />}</ClientOnly>
308298
<div ref={scrollRef} className="flex flex-col lg:flex-row overflow-y-auto w-full h-full">
309299
<div className={classNames(styles.Chat, 'flex flex-col flex-grow lg:min-w-[var(--chat-min-width)] h-full')}>
@@ -353,15 +343,15 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
353343
gradientUnits="userSpaceOnUse"
354344
gradientTransform="rotate(-45)"
355345
>
356-
<stop offset="0%" stopColor="#1488fc" stopOpacity="0%"></stop>
357-
<stop offset="40%" stopColor="#1488fc" stopOpacity="80%"></stop>
358-
<stop offset="50%" stopColor="#1488fc" stopOpacity="80%"></stop>
359-
<stop offset="100%" stopColor="#1488fc" stopOpacity="0%"></stop>
346+
<stop offset="0%" stopColor="#b44aff" stopOpacity="0%"></stop>
347+
<stop offset="40%" stopColor="#b44aff" stopOpacity="80%"></stop>
348+
<stop offset="50%" stopColor="#b44aff" stopOpacity="80%"></stop>
349+
<stop offset="100%" stopColor="#b44aff" stopOpacity="0%"></stop>
360350
</linearGradient>
361351
<linearGradient id="shine-gradient">
362352
<stop offset="0%" stopColor="white" stopOpacity="0%"></stop>
363-
<stop offset="40%" stopColor="#8adaff" stopOpacity="80%"></stop>
364-
<stop offset="50%" stopColor="#8adaff" stopOpacity="80%"></stop>
353+
<stop offset="40%" stopColor="#ffffff" stopOpacity="80%"></stop>
354+
<stop offset="50%" stopColor="#ffffff" stopOpacity="80%"></stop>
365355
<stop offset="100%" stopColor="white" stopOpacity="0%"></stop>
366356
</linearGradient>
367357
</defs>

app/components/header/Header.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ export function Header() {
1010

1111
return (
1212
<header
13-
className={classNames(
14-
'flex items-center bg-bolt-elements-background-depth-1 p-5 border-b h-[var(--header-height)]',
15-
{
16-
'border-transparent': !chat.started,
17-
'border-bolt-elements-borderColor': chat.started,
18-
},
19-
)}
13+
className={classNames('flex items-center p-5 border-b h-[var(--header-height)]', {
14+
'border-transparent': !chat.started,
15+
'border-bolt-elements-borderColor': chat.started,
16+
})}
2017
>
2118
<div className="flex items-center gap-2 z-logo text-bolt-elements-textPrimary cursor-pointer">
2219
<div className="i-ph:sidebar-simple-duotone text-xl" />
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import styles from './styles.module.scss';
2+
3+
const BackgroundRays = () => {
4+
return (
5+
<div className={`${styles.rayContainer} `}>
6+
<div className={`${styles.lightRay} ${styles.ray1}`}></div>
7+
<div className={`${styles.lightRay} ${styles.ray2}`}></div>
8+
<div className={`${styles.lightRay} ${styles.ray3}`}></div>
9+
<div className={`${styles.lightRay} ${styles.ray4}`}></div>
10+
<div className={`${styles.lightRay} ${styles.ray5}`}></div>
11+
<div className={`${styles.lightRay} ${styles.ray6}`}></div>
12+
<div className={`${styles.lightRay} ${styles.ray7}`}></div>
13+
<div className={`${styles.lightRay} ${styles.ray8}`}></div>
14+
</div>
15+
);
16+
};
17+
18+
export default BackgroundRays;

0 commit comments

Comments
 (0)