Ezmary commited on
Commit
af9b7ca
·
verified ·
1 Parent(s): 152abf8

Update src/App.scss

Browse files
Files changed (1) hide show
  1. src/App.scss +145 -196
src/App.scss CHANGED
@@ -1,59 +1,133 @@
1
- /* Import Tailwind base, components, and utilities */
 
 
2
  /* @tailwind base; */
3
  /* @tailwind components; */
4
  /* @tailwind utilities; */
5
- /*
6
- اگر TailwindCSS را به صورت PostCSS plugin نصب کرده‌اید،
7
- نیازی به ایمپورت مستقیم فایل‌های بالا نیست و فقط باید فایل اصلی CSS خود را ایمپورت کنید.
8
- اگر از CDN استفاده می‌کنید، این بخش را نادیده بگیرید و مطمئن شوید CDN در public/index.html شما هست.
9
- برای سادگی، فرض می‌کنیم Tailwind به درستی در پروژه تنظیم شده است.
10
- */
11
-
12
- /* CSS variables and base styles from your HTML */
13
  :root {
14
  --radius: 0.625rem; /* 10px */
15
  --radius-md: 0.5rem; /* 8px */
16
- --background: oklch(1 0 0);
17
- --foreground: oklch(0.145 0 0);
18
  --popover: oklch(1 0 0);
19
  --popover-foreground: oklch(0.145 0 0);
20
- --border: oklch(0.922 0 0);
21
- /* Gemini variables (optional, if you want to theme them) */
22
- --Neutral-5: var(--background);
23
- --Neutral-30: var(--border);
24
- --Blue-500: #3b82f6; /* Example blue */
25
- --Red-500: #ef4444; /* Example red */
26
  }
27
 
28
  .dark {
29
- --background: oklch(0.145 0 0);
30
- --foreground: oklch(0.985 0 0);
31
  --popover: oklch(0.205 0 0);
32
  --popover-foreground: oklch(0.985 0 0);
33
- --border: oklch(1 0 0 / 10%);
34
 
35
- --Neutral-5: var(--background);
36
- --Neutral-30: var(--border);
37
- --Blue-500: #60a5fa; /* Lighter blue for dark mode */
38
- --Red-500: #f87171; /* Lighter red for dark mode */
39
  }
40
 
41
- @layer base {
42
- * {
43
- /* @apply border-border outline-ring/50; */ /* Tailwind directive */
44
- /* For non-Tailwind setup, define border-border if needed */
45
- border-color: var(--border);
46
- }
47
- body {
48
- /* @apply bg-background text-foreground; */ /* Tailwind directive */
49
- background-color: var(--background);
50
- color: var(--foreground);
51
- overflow-x: hidden;
52
- font-family: sans-serif; /* Add a default font */
53
- }
54
  }
55
 
56
- /* Notification Popover Wrapper & Content - Converted from Tailwind classes */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  .notification-popover-wrapper {
58
  position: fixed;
59
  top: 1rem;
@@ -103,7 +177,6 @@
103
  color: oklch(0.95 0.01 230);
104
  }
105
 
106
- /* Header controls - Converted from Tailwind classes */
107
  .header-controls {
108
  display: flex;
109
  padding: 1rem;
@@ -125,7 +198,7 @@
125
  background-color: #e5e7eb; /* bg-gray-200 */
126
  cursor: pointer;
127
  transition: background-color 0.2s;
128
- border: none; /* Reset button border */
129
  }
130
  .header-button:hover {
131
  background-color: #d1d5db; /* bg-gray-300 */
@@ -148,140 +221,13 @@
148
  stroke: oklch(0.85 0 0);
149
  }
150
 
151
- /* Footer controls styles, to be used by ControlTray.tsx */
152
- .footer-controls {
153
- width: 100%;
154
- display: flex;
155
- gap: 1rem;
156
- position: absolute;
157
- bottom: 0;
158
- padding: 2rem 3rem;
159
- align-items: center;
160
- box-sizing: border-box; /* Add box-sizing */
161
- }
162
- .footer-controls.layout-default {
163
- justify-content: space-between;
164
- }
165
- .footer-controls.layout-with-small-logo {
166
- justify-content: space-around;
167
- }
168
-
169
- .control-button {
170
- height: 80px;
171
- width: 80px;
172
- border-radius: 9999px;
173
- padding: 0;
174
- display: flex;
175
- align-items: center;
176
- justify-content: center;
177
- border-width: 1px;
178
- border-color: var(--border);
179
- box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
180
- cursor: pointer;
181
- transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
182
- }
183
- .control-button:hover {
184
- transform: scale(1.05);
185
- box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
186
- }
187
- .cam-button-color { background-color: #E0ECFF; }
188
- .mic-button-color { background-color: #fecdd3; }
189
- .dark .cam-button-color { background-color: #223355; }
190
- .dark .mic-button-color { background-color: #5C2129; }
191
-
192
- /* Styles for the switch camera button (used in ControlTray.tsx) */
193
- .switch-camera-button-container {
194
- position: absolute;
195
- bottom: calc(100% + 0.65rem);
196
- left: 50%;
197
- z-index: 5;
198
- opacity: 0;
199
- transform: translateY(15px) scale(0.7) translateX(-50%);
200
- pointer-events: none;
201
- transition: opacity 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55), transform 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
202
- transform-origin: center bottom;
203
- }
204
- .switch-camera-button-container.visible {
205
- opacity: 1;
206
- transform: translateY(0) scale(1) translateX(-50%);
207
- pointer-events: auto;
208
- }
209
- .switch-camera-button-content {
210
- width: 48px;
211
- height: 48px;
212
- background-color: var(--background);
213
- border: 1px solid var(--border);
214
- border-radius: 9999px;
215
- display: flex;
216
- align-items: center;
217
- justify-content: center;
218
- box-shadow: 0 5px 10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
219
- cursor: pointer;
220
- transform-origin: center;
221
- transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
222
- }
223
- .switch-camera-button-content:hover {
224
- transform: scale(1.12) rotate(-6deg);
225
- }
226
- .switch-camera-button-content:active {
227
- transform: scale(1.03) rotate(0deg);
228
- }
229
- .switch-camera-button-content svg {
230
- width: 22px;
231
- height: 22px;
232
- stroke: var(--foreground);
233
- transition: transform 0.3s ease-in-out;
234
- }
235
- .switch-camera-button-content:hover svg {
236
- transform: rotate(360deg);
237
- }
238
-
239
-
240
- /* Styles for the mic button pulse (from original control-tray.scss) */
241
- @property --volume {
242
- syntax: "<length>";
243
- inherit: false;
244
- initial-value: 0px;
245
- }
246
-
247
- .mic-button-wrapper .control-button { /* Target the control-button specifically for mic */
248
- position: relative;
249
- /* background-color: var(--Red-500); */ /* This is already set by .mic-button-color */
250
- z-index: 1;
251
- color: black; /* Or var(--foreground) if it fits better */
252
- transition: all 0.2s ease-in;
253
- }
254
-
255
- .mic-button-wrapper .control-button:focus {
256
- /* border: 2px solid var(--Neutral-20); Using var(--border) is better */
257
- outline: 2px solid var(--Red-500); /* Keep red outline for mic */
258
- }
259
-
260
- /* .mic-button-wrapper .control-button:hover {
261
- background-color: var(--Red-400); No, keep original hover from .control-button
262
- } */
263
-
264
- .mic-button-wrapper .control-button.active:before { /* only show pulse when active (mic on) */
265
- position: absolute;
266
- z-index: -1;
267
- top: calc(var(--volume) * -1);
268
- left: calc(var(--volume) * -1);
269
- display: block;
270
- content: "";
271
- opacity: 0.35;
272
- background-color: var(--Red-500);
273
- width: calc(100% + var(--volume) * 2);
274
- height: calc(100% + var(--volume) * 2);
275
- border-radius: calc(var(--radius-md) + var(--volume)); /* Adjust radius with volume */
276
- transition: all 0.02s ease-in-out;
277
- }
278
  .app-container {
279
  width: 100%;
280
  display: flex;
281
  flex-direction: column;
282
  align-items: center;
283
  justify-content: center;
284
- min-height: 90vh; /* md:min-h-screen */
285
  }
286
  @media (min-width: 768px) {
287
  .app-container {
@@ -290,7 +236,7 @@
290
  }
291
 
292
  .main-content-wrapper {
293
- max-width: 48rem; /* max-w-3xl */
294
  width: 100%;
295
  display: flex;
296
  flex-direction: column;
@@ -306,11 +252,11 @@
306
  flex-direction: column;
307
  align-items: center;
308
  justify-content: center;
309
- height: 90vh; /* or 100% of its container if nested differently */
310
  background-color: var(--background);
311
  top: 0;
312
  left: 0;
313
- position: relative; /* Or absolute if it's layered */
314
  }
315
 
316
  .video-feed {
@@ -320,7 +266,7 @@
320
  width: 100%;
321
  height: 100%;
322
  object-fit: cover;
323
- transform: scaleX(-1); /* Mirror effect */
324
  }
325
 
326
  .large-logo-container, .small-logo-container {
@@ -336,47 +282,50 @@
336
  left: 0;
337
  }
338
 
339
- /* Add class for body when modal is open to prevent scrolling */
340
- .body-no-scroll {
341
- overflow: hidden;
342
- }
343
-
344
- /* Gemini Original App class, if needed for Altair or SidePanel */
345
  .App {
346
- /* display: flex; // This might conflict with new layout */
347
- /* flex-direction: column; // This might conflict */
348
  height: 100vh;
349
  width: 100vw;
350
- overflow: hidden; /* Prevent main app scroll if not desired */
351
- background-color: var(--background); /* Ensure background consistency */
352
  }
353
 
354
- .streaming-console {
355
  display: flex;
356
  flex-grow: 1;
357
- overflow: hidden; /* If SidePanel or Altair have their own scroll */
358
  }
359
 
360
  main {
361
  flex-grow: 1;
362
  display: flex;
363
  flex-direction: column;
364
- position: relative; /* For positioning Altair and video */
365
- overflow: hidden;
 
366
  }
367
 
368
  .main-app-area {
369
  flex-grow: 1;
370
- position: relative;
 
371
  }
372
 
373
- /* Ensure Altair is visible if used */
374
- /* .altair-chat {
 
 
375
  position: absolute;
376
- top: 0;
377
- left: 0;
378
- width: 100%;
379
- height: 100%;
380
- z-index: 5; // Example, adjust as needed
381
- background: rgba(255,255,255,0.8); // Example for visibility
382
- } */
 
 
 
 
 
 
 
 
1
+ /* App.scss or your main SCSS/CSS file */
2
+
3
+ /* Tailwind base, components, utilities (ensure this is at the top) */
4
  /* @tailwind base; */
5
  /* @tailwind components; */
6
  /* @tailwind utilities; */
7
+
 
 
 
 
 
 
 
8
  :root {
9
  --radius: 0.625rem; /* 10px */
10
  --radius-md: 0.5rem; /* 8px */
11
+ --background: oklch(1 0 0); /* White */
12
+ --foreground: oklch(0.145 0 0); /* Dark Gray/Black */
13
  --popover: oklch(1 0 0);
14
  --popover-foreground: oklch(0.145 0 0);
15
+ --border: oklch(0.922 0 0); /* Light Gray */
16
+
17
+ --color-cam-button-bg: #E0ECFF; // Light Blue
18
+ --color-mic-button-bg: #fecdd3; // Light Red
19
+ --color-red-500: #ef4444; // For mic pulse
 
20
  }
21
 
22
  .dark {
23
+ --background: oklch(0.145 0 0); /* Dark Gray/Black */
24
+ --foreground: oklch(0.985 0 0); /* Off-White */
25
  --popover: oklch(0.205 0 0);
26
  --popover-foreground: oklch(0.985 0 0);
27
+ --border: oklch(1 0 0 / 10%); /* Very Dark Transparent Gray */
28
 
29
+ --color-cam-button-bg: #223355; // Dark Blue
30
+ --color-mic-button-bg: #5C2129; // Dark Red
31
+ --color-red-500: #f87171; // Lighter Red for dark mode pulse
 
32
  }
33
 
34
+ body {
35
+ background-color: var(--background);
36
+ color: var(--foreground);
37
+ /* @apply antialiased; (If using Tailwind's font smoothing) */
38
+ font-family: sans-serif; /* Or your preferred font stack */
39
+ overflow-x: hidden;
 
 
 
 
 
 
 
40
  }
41
 
42
+ /* Base styles for control buttons if not fully handled by Tailwind */
43
+ .control-button {
44
+ /* Tailwind handles size, border-radius, flex, items-center, justify-center, p-0 */
45
+ /* Tailwind handles shadow, hover:scale, hover:shadow, transition */
46
+ border-width: 1px; /* Or manage with Tailwind like 'border' */
47
+ border-color: var(--border);
48
+ cursor: pointer;
49
+ }
50
+
51
+ .cam-button-color {
52
+ background-color: var(--color-cam-button-bg);
53
+ }
54
+ .mic-button-color {
55
+ background-color: var(--color-mic-button-bg);
56
+ }
57
+
58
+ /* Mic Pulse Animation */
59
+ @property --volume {
60
+ syntax: "<length>";
61
+ inherit: false;
62
+ initial-value: 0px;
63
+ }
64
+
65
+ .mic-button-wrapper .control-button.active:before {
66
+ position: absolute;
67
+ z-index: -1;
68
+ top: calc(var(--volume) * -1);
69
+ left: calc(var(--volume) * -1);
70
+ display: block;
71
+ content: "";
72
+ opacity: 0.35;
73
+ background-color: var(--color-red-500); /* Use CSS variable */
74
+ width: calc(100% + var(--volume) * 2);
75
+ height: calc(100% + var(--volume) * 2);
76
+ /* Ensure border-radius matches the button's rounded-full */
77
+ border-radius: 9999px; /* Or inherit if possible */
78
+ transition: all 0.02s ease-in-out;
79
+ }
80
+
81
+
82
+ /* Styles for the switch camera button container and content (from your HTML's CSS) */
83
+ /* These are crucial for the pop-up animation of the switch camera button */
84
+ .switch-camera-button-container {
85
+ /* Tailwind classes in JSX now handle most of this:
86
+ absolute bottom-[calc(100%+0.65rem)] left-1/2 z-[5] transform -translate-x-1/2
87
+ opacity-0 scale-75 pointer-events-none translate-y-[15px]
88
+ transition-opacity duration-300 ease-[cubic-bezier(0.68,-0.55,0.27,1.55)]
89
+ transform-origin-center-bottom
90
+ */
91
+ /* The .visible class logic is now inline in JSX based on state */
92
+ }
93
+ /* .switch-camera-button-container.visible {
94
+ opacity: 1;
95
+ transform: translateY(0) scale(1) translateX(-50%);
96
+ pointer-events: auto;
97
+ } */
98
+
99
+ .switch-camera-button-content {
100
+ /* Tailwind classes in JSX now handle most of this:
101
+ w-12 h-12 bg-background dark:bg-neutral-800 border dark:border-neutral-700 border-neutral-300
102
+ rounded-full flex items-center justify-center shadow-lg hover:scale-110 hover:rotate-[-6deg]
103
+ active:scale-105 active:rotate-0 transition-transform transform-origin-center
104
+ */
105
+ cursor: pointer; /* Ensure cursor is pointer */
106
+ }
107
+ .switch-camera-button-content svg {
108
+ width: 22px; /* Or use Tailwind w-5 h-5 or similar */
109
+ height: 22px;
110
+ stroke: var(--foreground); /* Ensure SVG picks up text color */
111
+ transition: transform 0.3s ease-in-out;
112
+ }
113
+ .switch-camera-button-content:hover svg {
114
+ /* @apply rotate-[360deg]; (If you want to use Tailwind transform) */
115
+ transform: rotate(360deg); /* Or keep as is */
116
+ }
117
+
118
+ /* Footer controls base class (if needed beyond Tailwind) */
119
+ .footer-controls {
120
+ /* Most styling now via Tailwind in JSX */
121
+ /* width: 100%; display: flex; gap: 1rem; position: absolute;
122
+ bottom: 0; padding: 2rem 3rem; align-items: center; */
123
+ }
124
+ /* .footer-controls.layout-default { justify-content: space-between; } */
125
+ /* .footer-controls.layout-with-small-logo { justify-content: space-around; } */
126
+
127
+
128
+ /* Other styles from App.scss (notification, header, video feed, logos) should remain */
129
+ /* ... (rest of your App.scss from previous correct version) ... */
130
+
131
  .notification-popover-wrapper {
132
  position: fixed;
133
  top: 1rem;
 
177
  color: oklch(0.95 0.01 230);
178
  }
179
 
 
180
  .header-controls {
181
  display: flex;
182
  padding: 1rem;
 
198
  background-color: #e5e7eb; /* bg-gray-200 */
199
  cursor: pointer;
200
  transition: background-color 0.2s;
201
+ border: none;
202
  }
203
  .header-button:hover {
204
  background-color: #d1d5db; /* bg-gray-300 */
 
221
  stroke: oklch(0.85 0 0);
222
  }
223
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
224
  .app-container {
225
  width: 100%;
226
  display: flex;
227
  flex-direction: column;
228
  align-items: center;
229
  justify-content: center;
230
+ min-height: 90vh;
231
  }
232
  @media (min-width: 768px) {
233
  .app-container {
 
236
  }
237
 
238
  .main-content-wrapper {
239
+ max-width: 48rem;
240
  width: 100%;
241
  display: flex;
242
  flex-direction: column;
 
252
  flex-direction: column;
253
  align-items: center;
254
  justify-content: center;
255
+ height: 90vh;
256
  background-color: var(--background);
257
  top: 0;
258
  left: 0;
259
+ position: relative;
260
  }
261
 
262
  .video-feed {
 
266
  width: 100%;
267
  height: 100%;
268
  object-fit: cover;
269
+ transform: scaleX(-1);
270
  }
271
 
272
  .large-logo-container, .small-logo-container {
 
282
  left: 0;
283
  }
284
 
 
 
 
 
 
 
285
  .App {
 
 
286
  height: 100vh;
287
  width: 100vw;
288
+ overflow: hidden;
289
+ background-color: var(--background);
290
  }
291
 
292
+ .streaming-console { /* May not be used if SidePanel is removed */
293
  display: flex;
294
  flex-grow: 1;
295
+ overflow: hidden;
296
  }
297
 
298
  main {
299
  flex-grow: 1;
300
  display: flex;
301
  flex-direction: column;
302
+ position: relative;
303
+ overflow: hidden; /* Important for positioning Altair on top */
304
+ height: 100%; /* Ensure main takes full height for absolute positioning inside */
305
  }
306
 
307
  .main-app-area {
308
  flex-grow: 1;
309
+ position: relative; /* For positioning Altair and video feed */
310
+ height: 100%;
311
  }
312
 
313
+ /* Example: Ensure Altair (chat bubbles) are visible and on top */
314
+ /* You'll need to inspect Altair's generated classes or wrap it */
315
+ div[class*="altair-chat-container"], /* Example selector, adjust as needed */
316
+ .altair-chat {
317
  position: absolute;
318
+ top: 60px; /* Adjust to be below your header */
319
+ bottom: 120px; /* Adjust to be above your footer controls */
320
+ left: 10px;
321
+ right: 10px;
322
+ z-index: 20; /* Ensure it's above video feed, but below popovers/modals */
323
+ overflow-y: auto; /* Allow scrolling for chat messages */
324
+ pointer-events: auto; /* Allow interaction with chat */
325
+ /* background: rgba(255,255,255,0.1); // For testing visibility */
326
+ }
327
+
328
+ .dark div[class*="altair-chat-container"],
329
+ .dark .altair-chat {
330
+ /* background: rgba(0,0,0,0.1); // For testing visibility in dark mode */
331
+ }