Ezmary commited on
Commit
9b8e548
·
verified ·
1 Parent(s): 9be8103

Update src/App.scss

Browse files
Files changed (1) hide show
  1. src/App.scss +76 -197
src/App.scss CHANGED
@@ -12,6 +12,8 @@
12
  --popover: oklch(1 0 0);
13
  --popover-foreground: oklch(0.145 0 0);
14
  --border: oklch(0.922 0 0);
 
 
15
  }
16
 
17
  .dark {
@@ -52,11 +54,11 @@
52
  }
53
  .media-area {
54
  flex-grow: 1;
55
- position: relative; // برای large-logo-container
56
  }
57
 
58
- #large-logo-container { // استایل از HTML مرجع شما
59
- display: flex; // در App.tsx با flex items-center justify-center کنترل می شود
60
  align-items: center;
61
  justify-content: center;
62
  width: 100%;
@@ -64,104 +66,20 @@
64
  position: absolute;
65
  top: 0;
66
  left: 0;
 
67
  }
68
 
 
 
 
 
 
 
 
 
 
 
69
 
70
- /* Notification Popover & Header controls (بدون تغییر از پاسخ قبلی) */
71
- .notification-popover-wrapper {
72
- position: fixed;
73
- top: 1rem;
74
- left: 50%;
75
- transform: translateX(-50%);
76
- z-index: 100;
77
- width: calc(100% - 1rem);
78
- max-width: 28rem;
79
- display: flex;
80
- justify-content: center;
81
- pointer-events: none;
82
- }
83
- .popover-content {
84
- width: 100%;
85
- border-radius: var(--radius-md, 0.5rem);
86
- border-width: 1px;
87
- border-color: var(--border);
88
- background-color: var(--popover);
89
- color: var(--popover-foreground);
90
- box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
91
- outline: none;
92
- transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
93
- opacity: 0;
94
- transform: translateY(-100%) scale(0.9);
95
- pointer-events: none;
96
- &.open {
97
- opacity: 1;
98
- transform: translateY(0) scale(1);
99
- pointer-events: auto;
100
- }
101
- }
102
- .notification-popover-text-content {
103
- background-color: #eff6ff;
104
- font-size: 0.875rem;
105
- line-height: 1.5rem;
106
- direction: rtl;
107
- padding: 1rem;
108
- border-radius: var(--radius-md, 0.5rem);
109
- color: oklch(0.145 0 0);
110
- }
111
- .dark .notification-popover-text-content {
112
- background-color: oklch(0.25 0.05 230);
113
- color: oklch(0.95 0.01 230);
114
- }
115
- .header-controls {
116
- display: flex;
117
- padding: 0.75rem 0.5rem;
118
- justify-content: space-between;
119
- align-items: center;
120
- width: 100%;
121
- position: absolute;
122
- top: 0;
123
- left: 0;
124
- z-index: 10;
125
- }
126
- .header-button {
127
- display: flex;
128
- align-items: center;
129
- justify-content: center;
130
- padding: 0.5rem;
131
- width: 40px;
132
- height: 40px;
133
- border-radius: var(--radius-lg, 0.625rem);
134
- background-color: #e5e7eb;
135
- cursor: pointer;
136
- transition: background-color 0.2s, transform 0.1s ease-out;
137
- svg {
138
- opacity: 0.7;
139
- stroke: #374151;
140
- width: 24px;
141
- height: 24px;
142
- }
143
- &:hover {
144
- background-color: #d1d5db;
145
- }
146
- &:active {
147
- background-color: #9ca3af;
148
- transform: scale(0.95);
149
- }
150
- }
151
- .dark .header-button {
152
- background-color: oklch(0.28 0 0);
153
- &:hover {
154
- background-color: oklch(0.35 0 0);
155
- }
156
- &:active {
157
- background-color: oklch(0.40 0 0);
158
- transform: scale(0.95);
159
- }
160
- svg {
161
- opacity: 0.8;
162
- stroke: oklch(0.85 0 0);
163
- }
164
- }
165
 
166
  /* Logo Animation Styling */
167
  .logo-animation-wrapper {
@@ -169,13 +87,19 @@
169
  display: flex;
170
  align-items: center;
171
  justify-content: center;
172
- & > div > svg { // اطمینان از اینکه SVG داخل لوگو تمام فضا را پر می کند
 
 
 
 
 
173
  width: 100%;
174
  height: 100%;
175
  }
176
  }
177
- .logo-animation-wrapper.for-footer {
178
- // اگر نیاز به استایل خاصی برای لوگوی فوتر باشد
 
179
  }
180
 
181
 
@@ -183,48 +107,49 @@
183
  .footer-controls-html-like {
184
  width: 100%;
185
  display: flex;
186
- align-items: center; // برای هم ترازی عمودی
187
  position: absolute;
188
- bottom: 0;
189
- padding: 2rem 3rem; // 32px top/bottom, 48px left/right (از HTML مرجع)
 
 
190
  box-sizing: border-box;
191
- z-index: 20; // بالاتر از محتوای مدیا
192
-
193
- // چیدمان دکمه ها: میکروفون چپ، لوگو وسط (اگر فعال)، دوربین راست
194
- // با استفاده از flex-grow برای لوگو، دکمه ها به کناره ها می چسبند
195
- // یا با justify-content: space-between و margin auto برای لوگو
196
  justify-content: space-between; // میکروفون چپ، دوربین راست
197
  }
198
 
199
- // کانتینر برای لوگوی کوچک در فوتر، برای قرارگیری دقیق بین دکمه ها
200
  .small-logo-footer-html-like {
201
- // این به صورت خودکار بین دو دکمه قرار می گیرد اگر فضای کافی باشد
202
- // یا می توان آن را به صورت absolute در وسط قرار داد
203
- // position: absolute;
204
- // left: 50%;
205
- // top: 50%;
206
- // transform: translate(-50%, -50%);
207
- // z-index: 1; // پشت دکمه ها اگر همپوشانی داشته باشند
208
- // برای حالا، اجازه می دهیم با flex در جای خود قرار گیرد
 
 
 
 
209
  display: flex;
210
  align-items: center;
211
  justify-content: center;
212
- // اگر می خواهید دقیقاً وسط باشد و دکمه ها در کناره ها:
213
- margin-left: auto;
214
- margin-right: auto;
 
215
  }
216
 
217
 
218
- .control-button-wrapper { // برای دکمه دوربین و دکمه تعویض آن
219
  position: relative;
220
  display: flex;
221
  justify-content: center;
222
  }
223
- // .cam-wrapper-html-like در ControlTray.tsx استفاده شده
224
 
225
  .control-button {
226
- height: 80px; // از HTML مرجع
227
- width: 80px; // از HTML مرجع
228
  border-radius: 9999px;
229
  padding: 0;
230
  display: flex;
@@ -236,89 +161,43 @@
236
  cursor: pointer;
237
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
238
  flex-shrink: 0;
239
- z-index: 2; // اطمینان از اینکه دکمه ها قابل کلیک هستند
240
 
241
  &:hover {
242
  transform: scale(1.05);
243
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
244
  }
245
- // اطمینان از اینکه SVG داخل دکمه ها به درستی نمایش داده می شود
246
  svg {
247
- // اگر SVG ها خیلی بزرگ هستند، می توانید اندازه آنها را اینجا کنترل کنید
248
- // مثال: width: 50%; height: 50%;
249
- // یا با transform: scale(0.55); اگر در HTML اصلی شما اینگونه بوده
 
 
 
 
250
  }
251
  }
252
 
253
- // ترتیب رنگ ها بر اساس HTML مرجع شما (میکروفون چپ، دوربین راست)
254
- .mic-button-color { background-color: #fecdd3; } // قرمز برای میکروفون
255
- .cam-button-color { background-color: #E0ECFF; } // آبی برای دوربین
256
 
257
  .dark .mic-button-color { background-color: #5C2129; }
258
  .dark .cam-button-color { background-color: #223355; }
259
 
260
 
261
- /* Switch Camera Button (بدون تغییر از پاسخ قبلی) */
262
- .switch-camera-button-container {
263
- position: absolute;
264
- bottom: calc(100% + 0.65rem);
265
- left: 50%;
266
- transform: translateX(-50%) translateY(15px) scale(0.7);
267
- z-index: 5;
268
- opacity: 0;
269
- pointer-events: none;
270
- 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);
271
- transform-origin: center bottom;
272
- &.visible {
273
- opacity: 1;
274
- transform: translateX(-50%) translateY(0) scale(1);
275
- pointer-events: auto;
276
- }
277
- }
278
- .switch-camera-button-content {
279
- width: 48px;
280
- height: 48px;
281
- background-color: var(--background);
282
- border: 1px solid var(--border);
283
- border-radius: 9999px;
284
- display: flex;
285
- align-items: center;
286
- justify-content: center;
287
- box-shadow: 0 5px 10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
288
- cursor: pointer;
289
- transform-origin: center;
290
- transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
291
- &:hover {
292
- transform: scale(1.12) rotate(-6deg);
293
- box-shadow: 0 7px 15px rgba(0,0,0,0.18), 0 3px 6px rgba(0,0,0,0.12);
294
- }
295
- &:active {
296
- transform: scale(1.03) rotate(0deg);
297
- }
298
- svg {
299
- width: 22px;
300
- height: 22px;
301
- stroke: var(--foreground);
302
- transition: transform 0.3s ease-in-out;
303
- }
304
- &:hover svg {
305
- transform: rotate(360deg);
306
- }
307
- }
308
-
309
- /* Keyframes for popover (بدون تغییر از پاسخ قبلی) */
310
- @keyframes popover-drop-in {
311
- 0% { opacity: 0; transform: translateY(-100%) scale(0.9); }
312
- 70% { opacity: 1; transform: translateY(5px) scale(1.02); }
313
- 100% { opacity: 1; transform: translateY(0) scale(1); }
314
- }
315
- @keyframes popover-lift-out {
316
- 0% { opacity: 1; transform: translateY(0) scale(1); }
317
- 100% { opacity: 0; transform: translateY(-100%) scale(0.9); }
318
- }
319
- .animate-popover-open-top-center {
320
- animation: popover-drop-in 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
321
- }
322
- .animate-popover-close-top-center {
323
- animation: popover-lift-out 0.3s ease-in forwards;
324
- }
 
12
  --popover: oklch(1 0 0);
13
  --popover-foreground: oklch(0.145 0 0);
14
  --border: oklch(0.922 0 0);
15
+ // ** NEW: Define bottom offset for footer, similar to HTML example's visual **
16
+ --footer-bottom-offset: 2rem; // 32px - این مقدار را می‌توانید تنظیم کنید
17
  }
18
 
19
  .dark {
 
54
  }
55
  .media-area {
56
  flex-grow: 1;
57
+ position: relative;
58
  }
59
 
60
+ #large-logo-container {
61
+ display: flex;
62
  align-items: center;
63
  justify-content: center;
64
  width: 100%;
 
66
  position: absolute;
67
  top: 0;
68
  left: 0;
69
+ z-index: 5; // پشت کنترل‌های فوتر باشد اگر همپوشانی کنند
70
  }
71
 
72
+ /* Notification Popover & Header controls (بدون تغییر) */
73
+ .notification-popover-wrapper { /* ... */ }
74
+ .popover-content { /* ... */ }
75
+ .notification-popover-text-content { /* ... */ }
76
+ .dark .notification-popover-text-content { /* ... */ }
77
+ .header-controls { /* ... */ }
78
+ .header-button { /* ... */ }
79
+ .dark .header-button { /* ... */ }
80
+ // (کپی کامل این بخش‌ها از پاسخ قبلی)
81
+ .notification-popover-wrapper{position:fixed;top:1rem;left:50%;transform:translateX(-50%);z-index:100;width:calc(100% - 1rem);max-width:28rem;display:flex;justify-content:center;pointer-events:none}.popover-content{width:100%;border-radius:var(--radius-md,.5rem);border-width:1px;border-color:var(--border);background-color:var(--popover);color:var(--popover-foreground);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;outline:none;transition:opacity .3s ease-out,transform .4s cubic-bezier(.68,-.55,.27,1.55);opacity:0;transform:translateY(-100%) scale(.9);pointer-events:none}.popover-content.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}.notification-popover-text-content{background-color:#eff6ff;font-size:.875rem;line-height:1.5rem;direction:rtl;padding:1rem;border-radius:var(--radius-md,.5rem);color:oklch(.145 0 0)}.dark .notification-popover-text-content{background-color:oklch(.25 .05 230);color:oklch(.95 .01 230)}.header-controls{display:flex;padding:.75rem .5rem;justify-content:space-between;align-items:center;width:100%;position:absolute;top:0;left:0;z-index:10}.header-button{display:flex;align-items:center;justify-content:center;padding:.5rem;width:40px;height:40px;border-radius:var(--radius-lg,.625rem);background-color:#e5e7eb;cursor:pointer;transition:background-color .2s,transform .1s ease-out}.header-button svg{opacity:.7;stroke:#374151;width:24px;height:24px}.header-button:hover{background-color:#d1d5db}.header-button:active{background-color:#9ca3af;transform:scale(.95)}.dark .header-button{background-color:oklch(.28 0 0)}.dark .header-button:hover{background-color:oklch(.35 0 0)}.dark .header-button:active{background-color:oklch(.40 0 0);transform:scale(.95)}.dark .header-button svg{opacity:.8;stroke:oklch(.85 0 0)}
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
  /* Logo Animation Styling */
85
  .logo-animation-wrapper {
 
87
  display: flex;
88
  align-items: center;
89
  justify-content: center;
90
+ color: #FCFCFC; // رنگ پیش فرض آیکون انسان (سفید)
91
+ &.for-footer {
92
+ // اگر استایل خاصی برای لوگوی فوتر نیاز است
93
+ }
94
+ // اطمینان از اینکه SVG داخل لوگو تمام فضا را پر می کند
95
+ & > div > svg {
96
  width: 100%;
97
  height: 100%;
98
  }
99
  }
100
+ .dark .logo-animation-wrapper {
101
+ // در حالت دارک، اگر رنگ آیکون انسان باید تغییر کند، اینجا تعریف کنید
102
+ // مثال: color: oklch(0.145 0 0); // اگر می خواهید در دارک مود تیره شود
103
  }
104
 
105
 
 
107
  .footer-controls-html-like {
108
  width: 100%;
109
  display: flex;
110
+ align-items: center;
111
  position: absolute;
112
+ // ** MODIFIED: Use var for bottom offset **
113
+ bottom: var(--footer-bottom-offset); // بالاتر از لبه پایین صفحه
114
+ // Padding افقی از HTML مرجع، padding عمودی برای ایجاد فضا در بالا و پایین دکمه ها
115
+ padding: 1rem 3rem; // 16px بالا/پایین, 48px چپ/راست
116
  box-sizing: border-box;
117
+ z-index: 20;
 
 
 
 
118
  justify-content: space-between; // میکروفون چپ، دوربین راست
119
  }
120
 
 
121
  .small-logo-footer-html-like {
122
+ // این به صورت خودکار بین دو دکمه قرار می گیرد چون فوتر space-between است
123
+ // و این div در JSX بین دو دکمه اصلی قرار دارد
124
+ // برای اطمینان از مرکز بودن، می توانیم از flex-grow در دو دکمه کناری استفاده کنیم
125
+ // یا به این شکل:
126
+ // margin-left: auto;
127
+ // margin-right: auto;
128
+ // اما با justify-content: space-between در والد، این باید وسط قرار گیرد اگر تنها عنصر وسطی باشد.
129
+ // اگر سه عنصر دارید (دکمه - لوگو - دکمه) و justify-content: space-between،
130
+ // لوگو به صورت مساوی بین آنها فاصله می گیرد.
131
+ // برای اینکه لوگو دقیقا وسط صفحه باشد و دکمه ها در کناره ها، نیاز به تغییرات بیشتری در JSX یا CSS است.
132
+ // فعلا با چیدمان سه ستونه (میکروفون، لوگو، دوربین) و space-between در فوتر پیش می رویم.
133
+ // اگر می خواهید لوگو همیشه وسط باشد، باید از position: absolute برای لوگو استفاده کرد.
134
  display: flex;
135
  align-items: center;
136
  justify-content: center;
137
+ // برای اینکه فضای مساوی با دکمه ها بگیرد، یا flex-grow بدهیم، یا اندازه ثابت
138
+ // flex-grow: 1; // این باعث می شود فضای خالی بین دکمه ها را پر کند
139
+ // یا اگر می خواهید اندازه اش ثابت باشد و دکمه ها به کناره ها بچسبند:
140
+ // (بدون تغییر، اجازه می دهیم با محتوایش اندازه بگیرد)
141
  }
142
 
143
 
144
+ .control-button-wrapper {
145
  position: relative;
146
  display: flex;
147
  justify-content: center;
148
  }
 
149
 
150
  .control-button {
151
+ height: 80px;
152
+ width: 80px;
153
  border-radius: 9999px;
154
  padding: 0;
155
  display: flex;
 
161
  cursor: pointer;
162
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
163
  flex-shrink: 0;
164
+ z-index: 2;
165
 
166
  &:hover {
167
  transform: scale(1.05);
168
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
169
  }
170
+ // ** NEW: Scale SVG icons within buttons to match HTML reference if needed **
171
  svg {
172
+ // transform: scale(0.55); // این از HTML مرجع شما برای آیکون میکروفون بود.
173
+ // اگر برای همه آیکون ها لازم است، اینجا اعمال کنید.
174
+ // یا اندازه های width/height را مستقیما بدهید.
175
+ // مثال برای اندازه ثابت:
176
+ // width: 38px;
177
+ // height: 38px;
178
+ // فعلا بدون تغییر، اجازه می دهیم SVG اندازه خودش را داشته باشد یا در تعریفش کنترل شود.
179
  }
180
  }
181
 
182
+ .mic-button-color { background-color: #fecdd3; }
183
+ .cam-button-color { background-color: #E0ECFF; }
 
184
 
185
  .dark .mic-button-color { background-color: #5C2129; }
186
  .dark .cam-button-color { background-color: #223355; }
187
 
188
 
189
+ /* Switch Camera Button (بدون تغییر) */
190
+ .switch-camera-button-container { /* ... */ }
191
+ .switch-camera-button-content { /* ... */ }
192
+ .switch-camera-button-content svg { /* ... */ }
193
+ .switch-camera-button-content:hover svg { /* ... */ }
194
+ // (کپی کامل این بخش‌ها از پاسخ قبلی)
195
+ .switch-camera-button-container{position:absolute;bottom:calc(100% + .65rem);left:50%;transform:translateX(-50%) translateY(15px) scale(.7);z-index:5;opacity:0;pointer-events:none;transition:opacity .35s cubic-bezier(.68,-.55,.27,1.55),transform .35s cubic-bezier(.68,-.55,.27,1.55);transform-origin:center bottom}.switch-camera-button-container.visible{opacity:1;transform:translateX(-50%) translateY(0) scale(1);pointer-events:auto}.switch-camera-button-content{width:48px;height:48px;background-color:var(--background);border:1px solid var(--border);border-radius:9999px;display:flex;align-items:center;justify-content:center;box-shadow:0 5px 10px #0000001f,0 2px 4px #00000014;cursor:pointer;transform-origin:center;transition:transform .2s ease-out,box-shadow .2s ease-out}.switch-camera-button-content:hover{transform:scale(1.12) rotate(-6deg);box-shadow:0 7px 15px #0000002e,0 3px 6px #0000001f}.switch-camera-button-content:active{transform:scale(1.03) rotate(0)}.switch-camera-button-content svg{width:22px;height:22px;stroke:var(--foreground);transition:transform .3s ease-in-out}.switch-camera-button-content:hover svg{transform:rotate(360deg)}
196
+
197
+ /* Keyframes for popover (بدون تغییر) */
198
+ @keyframes popover-drop-in { /* ... */ }
199
+ @keyframes popover-lift-out { /* ... */ }
200
+ .animate-popover-open-top-center { /* ... */ }
201
+ .animate-popover-close-top-center { /* ... */ }
202
+ // (کپی کامل این بخش‌ها از پاسخ قبلی)
203
+ @keyframes popover-drop-in{0%{opacity:0;transform:translateY(-100%) scale(.9)}70%{opacity:1;transform:translateY(5px) scale(1.02)}100%{opacity:1;transform:translateY(0) scale(1)}}@keyframes popover-lift-out{0%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-100%) scale(.9)}}.animate-popover-open-top-center{animation:popover-drop-in .4s cubic-bezier(.68,-.55,.27,1.55) forwards}.animate-popover-close-top-center{animation:popover-lift-out .3s ease-in forwards}