Spaces:
Running
Running
Update src/App.scss
Browse files- src/App.scss +74 -87
src/App.scss
CHANGED
@@ -12,8 +12,6 @@
|
|
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 {
|
@@ -39,6 +37,8 @@
|
|
39 |
-moz-osx-font-smoothing: grayscale;
|
40 |
margin: 0;
|
41 |
padding: 0;
|
|
|
|
|
42 |
}
|
43 |
html {
|
44 |
margin: 0;
|
@@ -54,11 +54,23 @@
|
|
54 |
}
|
55 |
.media-area {
|
56 |
flex-grow: 1;
|
57 |
-
position: relative;
|
58 |
}
|
59 |
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
align-items: center;
|
63 |
justify-content: center;
|
64 |
width: 100%;
|
@@ -66,90 +78,80 @@
|
|
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 |
-
|
82 |
-
|
83 |
-
|
84 |
-
/* Logo Animation Styling */
|
85 |
-
.logo-animation-wrapper {
|
86 |
-
position: relative;
|
87 |
display: flex;
|
88 |
align-items: center;
|
89 |
justify-content: center;
|
90 |
-
|
91 |
-
|
92 |
-
// اگر استایل خاصی برای لوگوی فوتر نیاز است
|
93 |
-
}
|
94 |
-
// اطمینان از اینکه SVG داخل لوگو تمام فضا را پر می کند
|
95 |
-
& > div > svg {
|
96 |
-
width: 100%;
|
97 |
-
height: 100%;
|
98 |
-
}
|
99 |
}
|
100 |
-
.
|
101 |
-
|
102 |
-
|
103 |
}
|
104 |
|
105 |
|
106 |
-
/* Footer styles
|
107 |
.footer-controls-html-like {
|
108 |
width: 100%;
|
109 |
display: flex;
|
110 |
-
align-items: center;
|
111 |
position: absolute;
|
112 |
-
|
113 |
-
|
114 |
-
//
|
115 |
-
padding:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
// برای
|
138 |
-
//
|
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,43 +163,28 @@
|
|
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 |
-
//
|
173 |
-
|
174 |
-
|
175 |
-
//
|
176 |
-
//
|
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}
|
|
|
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 {
|
|
|
37 |
-moz-osx-font-smoothing: grayscale;
|
38 |
margin: 0;
|
39 |
padding: 0;
|
40 |
+
// برای جلوگیری از پرش هنگام ظاهر شدن اسکرول بار احتمالی در برخی موارد
|
41 |
+
// overflow-y: scroll;
|
42 |
}
|
43 |
html {
|
44 |
margin: 0;
|
|
|
54 |
}
|
55 |
.media-area {
|
56 |
flex-grow: 1;
|
57 |
+
position: relative;
|
58 |
}
|
59 |
|
60 |
+
// انیمیشن پینگ برای لوگو (از Tailwind، اگر مستقیماً استفاده نمیشود، میتوان اینجا تعریف کرد)
|
61 |
+
@keyframes ping {
|
62 |
+
75%, 100% {
|
63 |
+
transform: scale(2);
|
64 |
+
opacity: 0;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
.animate-ping {
|
68 |
+
animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
#large-logo-container {
|
73 |
+
display: flex;
|
74 |
align-items: center;
|
75 |
justify-content: center;
|
76 |
width: 100%;
|
|
|
78 |
position: absolute;
|
79 |
top: 0;
|
80 |
left: 0;
|
|
|
81 |
}
|
82 |
|
83 |
+
|
84 |
/* Notification Popover & Header controls (بدون تغییر) */
|
85 |
+
.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; }
|
86 |
+
.popover-content { width: 100%; border-radius: var(--radius-md, 0.5rem); border-width: 1px; border-color: var(--border); background-color: var(--popover); color: var(--popover-foreground); box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); outline: none; transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55); opacity: 0; transform: translateY(-100%) scale(0.9); pointer-events: none; &.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; } }
|
87 |
+
.notification-popover-text-content { background-color: #eff6ff; font-size: 0.875rem; line-height: 1.5rem; direction: rtl; padding: 1rem; border-radius: var(--radius-md, 0.5rem); color: oklch(0.145 0 0); }
|
88 |
+
.dark .notification-popover-text-content { background-color: oklch(0.25 0.05 230); color: oklch(0.95 0.01 230); }
|
89 |
+
.header-controls { display: flex; padding: 0.75rem 0.5rem; justify-content: space-between; align-items: center; width: 100%; position: absolute; top: 0; left: 0; z-index: 10; }
|
90 |
+
.header-button { display: flex; align-items: center; justify-content: center; padding: 0.5rem; width: 40px; height: 40px; border-radius: var(--radius-lg, 0.625rem); background-color: #e5e7eb; cursor: pointer; transition: background-color 0.2s, transform 0.1s ease-out; svg { opacity: 0.7; stroke: #374151; width: 24px; height: 24px; } &:hover { background-color: #d1d5db; } &:active { background-color: #9ca3af; transform: scale(0.95); } }
|
91 |
+
.dark .header-button { background-color: oklch(0.28 0 0); &:hover { background-color: oklch(0.35 0 0); } &:active { background-color: oklch(0.40 0 0); transform: scale(0.95); } svg { opacity: 0.8; stroke: oklch(0.85 0 0); } }
|
92 |
+
|
93 |
+
/* Logo Animation Container - برای اطمینان از نمایش صحیح انیمیشن کامل */
|
94 |
+
.logo-animation-container {
|
95 |
+
position: relative; // برای حلقههای داخلی absolute
|
|
|
|
|
|
|
96 |
display: flex;
|
97 |
align-items: center;
|
98 |
justify-content: center;
|
99 |
+
// کلاس .animate-ping توسط Tailwind اعمال میشود
|
100 |
+
// حلقههای دیگر با کلاسهای رنگی Tailwind و style inline در App.tsx مدیریت میشوند.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
+
.logo-animation-container > div > svg {
|
103 |
+
width: 100%; // اطمینان از پر کردن کانتینر آدمک
|
104 |
+
height: 100%;
|
105 |
}
|
106 |
|
107 |
|
108 |
+
/* Footer styles - تلاش برای تطابق بیشتر با HTML مرجع */
|
109 |
.footer-controls-html-like {
|
110 |
width: 100%;
|
111 |
display: flex;
|
112 |
+
align-items: center;
|
113 |
position: absolute;
|
114 |
+
left: 0; // برای اطمینان از پوشش کامل عرض
|
115 |
+
// *** تنظیم bottom برای بالا بردن دکمهها ***
|
116 |
+
// مقدار دقیق bottom ممکن است نیاز به تنظیم داشته باشد. 2rem یک شروع خوب است.
|
117 |
+
// در HTML شما padding: 2rem 3rem بود، که 2rem فاصله از پایین ایجاد میکرد.
|
118 |
+
bottom: 2rem; // فاصله از پایین صفحه
|
119 |
+
// padding افقی برای فاصله از کنارههای صفحه
|
120 |
+
padding-left: 3rem; // 48px از چپ (مانند HTML)
|
121 |
+
padding-right: 3rem; // 48px از راست (مانند HTML)
|
122 |
+
// padding عمودی کمتر، چون bottom فاصله را کنترل میکند
|
123 |
+
padding-top: 0.5rem;
|
124 |
+
padding-bottom: 0.5rem;
|
125 |
box-sizing: border-box;
|
126 |
z-index: 20;
|
127 |
justify-content: space-between; // میکروفون چپ، دوربین راست
|
128 |
}
|
129 |
|
130 |
.small-logo-footer-html-like {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
display: flex;
|
132 |
align-items: center;
|
133 |
justify-content: center;
|
134 |
+
// برای قرارگیری دقیق بین دو دکمه اصلی با چیدمان space-between در والد
|
135 |
+
// این عنصر به طور خودکار فضای باقی مانده را پر نمی کند،
|
136 |
+
// بلکه باید به صورت absolute در مرکز قرار گیرد یا flex والد تغییر کند.
|
137 |
+
// اگر والد `justify-content: space-between;` دارد:
|
138 |
+
position: absolute;
|
139 |
+
left: 50%;
|
140 |
+
top: 50%; // نسبت به والد (.footer-controls-html-like)
|
141 |
+
transform: translate(-50%, -50%);
|
142 |
+
z-index: 1; // پشت دکمهها اگر همپوشانی دارند
|
143 |
}
|
144 |
|
145 |
|
146 |
+
.control-button-wrapper {
|
147 |
position: relative;
|
148 |
display: flex;
|
149 |
justify-content: center;
|
150 |
}
|
151 |
|
152 |
.control-button {
|
153 |
+
height: 80px;
|
154 |
+
width: 80px;
|
155 |
border-radius: 9999px;
|
156 |
padding: 0;
|
157 |
display: flex;
|
|
|
163 |
cursor: pointer;
|
164 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
165 |
flex-shrink: 0;
|
166 |
+
z-index: 2;
|
167 |
+
// برای اینکه آیکون SVG داخل دکمه به درستی نمایش داده شود
|
|
|
|
|
|
|
|
|
|
|
168 |
svg {
|
169 |
+
// اگر آیکونها به طور پیشفرض خیلی بزرگ هستند، میتوانید scale را اینجا اعمال کنید
|
170 |
+
// یا width/height مستقیم به SVG بدهید.
|
171 |
+
// مثال برای اطمینان از اندازه:
|
172 |
+
// max-width: 60%;
|
173 |
+
// max-height: 60%;
|
|
|
|
|
174 |
}
|
175 |
}
|
176 |
|
177 |
+
.mic-button-color { background-color: #fecdd3; }
|
178 |
+
.cam-button-color { background-color: #E0ECFF; }
|
|
|
179 |
.dark .mic-button-color { background-color: #5C2129; }
|
180 |
.dark .cam-button-color { background-color: #223355; }
|
181 |
|
|
|
182 |
/* Switch Camera Button (بدون تغییر) */
|
183 |
+
.switch-camera-button-container { position: absolute; bottom: calc(100% + 0.65rem); left: 50%; transform: translateX(-50%) translateY(15px) scale(0.7); z-index: 5; opacity: 0; pointer-events: none; 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); transform-origin: center bottom; &.visible { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; } }
|
184 |
+
.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 rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08); cursor: pointer; transform-origin: center; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out; &:hover { transform: scale(1.12) rotate(-6deg); box-shadow: 0 7px 15px rgba(0,0,0,0.18), 0 3px 6px rgba(0,0,0,0.12); } &:active { transform: scale(1.03) rotate(0deg); } svg { width: 22px; height: 22px; stroke: var(--foreground); transition: transform 0.3s ease-in-out; } &:hover svg { transform: rotate(360deg); } }
|
|
|
|
|
|
|
|
|
185 |
|
186 |
/* Keyframes for popover (بدون تغییر) */
|
187 |
+
@keyframes popover-drop-in { 0% { opacity: 0; transform: translateY(-100%) scale(0.9); } 70% { opacity: 1; transform: translateY(5px) scale(1.02); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
|
188 |
+
@keyframes popover-lift-out { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-100%) scale(0.9); } }
|
189 |
+
.animate-popover-open-top-center { animation: popover-drop-in 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; }
|
190 |
+
.animate-popover-close-top-center { animation: popover-lift-out 0.3s ease-in forwards; }
|
|
|
|