Spaces:
Running
Running
Update src/App.scss
Browse files- src/App.scss +64 -75
src/App.scss
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
// src/App.scss
|
2 |
-
|
3 |
// 1. Import Tailwind's base, components, and utilities
|
4 |
@import 'tailwindcss/base';
|
5 |
@import 'tailwindcss/components';
|
@@ -9,31 +7,30 @@
|
|
9 |
:root {
|
10 |
--radius: 0.625rem; /* 10px */
|
11 |
--radius-md: 0.5rem; /* 8px */
|
12 |
-
--background: oklch(1 0 0);
|
13 |
-
--foreground: oklch(0.145 0 0);
|
14 |
--popover: oklch(1 0 0);
|
15 |
--popover-foreground: oklch(0.145 0 0);
|
16 |
-
--border: oklch(0.922 0 0);
|
17 |
}
|
18 |
|
19 |
.dark {
|
20 |
-
--background: oklch(0.145 0 0);
|
21 |
-
--foreground: oklch(0.985 0 0);
|
22 |
--popover: oklch(0.205 0 0);
|
23 |
--popover-foreground: oklch(0.985 0 0);
|
24 |
-
--border: oklch(1 0 0 / 10%);
|
25 |
}
|
26 |
|
27 |
// 3. Apply base styles
|
28 |
@layer base {
|
29 |
* {
|
30 |
-
|
31 |
-
|
32 |
-
outline-color: theme('colors.custom-foreground');
|
33 |
box-sizing: border-box;
|
34 |
}
|
35 |
body {
|
36 |
-
@apply bg-
|
37 |
overflow-x: hidden;
|
38 |
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
39 |
-webkit-font-smoothing: antialiased;
|
@@ -70,92 +67,72 @@
|
|
70 |
pointer-events: none;
|
71 |
}
|
72 |
|
73 |
-
/* Notification Popover */
|
74 |
.notification-popover-wrapper {
|
75 |
position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 100;
|
76 |
width: calc(100% - 1rem); max-width: 28rem; display: flex; justify-content: center; pointer-events: none;
|
77 |
}
|
78 |
.popover-content {
|
79 |
-
width: 100%; border-radius: var(--radius-md, 0.5rem); border-width: 1px;
|
80 |
-
background-color:
|
81 |
-
color: theme('colors.custom-popover-foreground'); /* استفاده از رنگ تعریف شده در Tailwind */
|
82 |
-
border-color: theme('colors.custom-border'); /* استفاده از رنگ تعریف شده در Tailwind */
|
83 |
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
84 |
outline: none; transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
85 |
opacity: 0; transform: translateY(-100%) scale(0.9); pointer-events: none;
|
86 |
&.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
|
87 |
}
|
88 |
-
.notification-popover-text-content {
|
89 |
-
background-color: #eff6ff;
|
90 |
-
|
91 |
-
padding: 1rem; border-radius: var(--radius-md, 0.5rem);
|
92 |
-
color: oklch(0.145 0 0); /* متن تیره روی پسزمینه آبی روشن */
|
93 |
-
}
|
94 |
-
.dark .notification-popover-text-content {
|
95 |
-
background-color: oklch(0.25 0.05 230); /* آبی تیرهتر برای حالت تاریک */
|
96 |
-
color: oklch(0.95 0.01 230); /* متن روشنتر برای حالت تاریک */
|
97 |
}
|
98 |
-
|
99 |
-
/* Header controls - حفظ استایلهای قبلی */
|
100 |
.header-controls {
|
101 |
display: flex; padding: 0.75rem 0.5rem; justify-content: space-between; align-items: center;
|
102 |
width: 100%; position: absolute; top: 0; left: 0; z-index: 10;
|
103 |
}
|
104 |
.header-button {
|
105 |
display: flex; align-items: center; justify-content: center; padding: 0.5rem;
|
106 |
-
width: 40px; height: 40px; border-radius: var(--radius-lg, 0.625rem);
|
107 |
-
background-color: #e5e7eb; /* Tailwind gray-200 */
|
108 |
cursor: pointer; transition: background-color 0.2s, transform 0.1s ease-out;
|
109 |
-
svg {
|
110 |
-
|
111 |
-
|
112 |
-
width: 24px; height: 24px;
|
113 |
-
}
|
114 |
-
&:hover { background-color: #d1d5db; /* Tailwind gray-300 */ }
|
115 |
-
&:active { background-color: #9ca3af; /* Tailwind gray-400 */ transform: scale(0.95); }
|
116 |
}
|
117 |
.dark .header-button {
|
118 |
background-color: oklch(0.28 0 0);
|
119 |
&:hover { background-color: oklch(0.35 0 0); }
|
120 |
&:active { background-color: oklch(0.40 0 0); transform: scale(0.95); }
|
121 |
-
svg {
|
122 |
-
opacity: 0.8;
|
123 |
-
stroke: oklch(0.85 0 0); /* رنگ آیکون هدر در حالت تاریک */
|
124 |
-
}
|
125 |
}
|
126 |
|
127 |
-
/* Logo Animation Styling */
|
128 |
.logo-animation-wrapper {
|
129 |
position: relative;
|
130 |
display: flex;
|
131 |
align-items: center;
|
132 |
justify-content: center;
|
133 |
-
//
|
134 |
-
//
|
135 |
-
//
|
136 |
-
// در غیر این صورت، باید مستقیما stroke="#FFFFFF" را در SvgHumanIcon تنظیم کنید.
|
137 |
-
color: white; // یا var(--foreground) اگر می خواهید با تم تغییر کند و تم شما این را مدیریت می کند.
|
138 |
-
|
139 |
-
& > .z-10 > svg { // برای SvgHumanIcon
|
140 |
-
width: 100%;
|
141 |
-
height: 100%;
|
142 |
-
}
|
143 |
}
|
144 |
|
145 |
-
/* Footer styles */
|
146 |
.footer-controls-html-like {
|
147 |
width: 100%;
|
148 |
display: flex;
|
149 |
align-items: center;
|
150 |
position: absolute;
|
151 |
-
|
152 |
-
|
|
|
|
|
153 |
padding-right: 2.5rem;
|
|
|
154 |
padding-top: 0.5rem;
|
155 |
padding-bottom: 0.5rem;
|
|
|
156 |
box-sizing: border-box;
|
157 |
z-index: 20;
|
158 |
-
justify-content: space-between;
|
159 |
}
|
160 |
|
161 |
.small-logo-footer-html-like {
|
@@ -163,13 +140,13 @@
|
|
163 |
left: 50%;
|
164 |
top: 50%;
|
165 |
transform: translate(-50%, -50%);
|
166 |
-
z-index: 1;
|
167 |
display: flex;
|
168 |
align-items: center;
|
169 |
justify-content: center;
|
170 |
}
|
171 |
|
172 |
-
.control-button-wrapper {
|
173 |
position: relative;
|
174 |
display: flex;
|
175 |
justify-content: center;
|
@@ -179,12 +156,12 @@
|
|
179 |
height: 80px;
|
180 |
width: 80px;
|
181 |
border-radius: 9999px;
|
182 |
-
padding: 0;
|
183 |
display: flex;
|
184 |
align-items: center;
|
185 |
justify-content: center;
|
186 |
border-width: 1px;
|
187 |
-
border-color:
|
188 |
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
|
189 |
cursor: pointer;
|
190 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
@@ -197,21 +174,30 @@
|
|
197 |
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
|
198 |
}
|
199 |
|
|
|
200 |
svg {
|
|
|
201 |
&.reference-mic-svg {
|
202 |
-
width: 75%;
|
203 |
height: 75%;
|
204 |
}
|
205 |
-
// SVGهای دیگر
|
206 |
-
//
|
|
|
|
|
|
|
|
|
207 |
}
|
208 |
}
|
209 |
|
210 |
-
|
211 |
-
.
|
|
|
|
|
212 |
.dark .mic-button-color { background-color: #5C2129; }
|
213 |
.dark .cam-button-color { background-color: #223355; }
|
214 |
|
|
|
215 |
/* Switch Camera Button */
|
216 |
.switch-camera-button-container {
|
217 |
position: absolute; bottom: calc(100% + 0.65rem); left: 50%;
|
@@ -222,22 +208,25 @@
|
|
222 |
&.visible { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
|
223 |
}
|
224 |
.switch-camera-button-content {
|
225 |
-
width: 48px; height: 48px;
|
226 |
-
background-color: theme('colors.custom-background');
|
227 |
-
border: 1px solid theme('colors.custom-border');
|
228 |
border-radius: 9999px; display: flex; align-items: center; justify-content: center;
|
229 |
box-shadow: 0 5px 10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08); cursor: pointer;
|
230 |
transform-origin: center; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
231 |
&: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); }
|
232 |
&:active { transform: scale(1.03) rotate(0deg); }
|
233 |
-
svg { width: 22px; height: 22px; stroke:
|
234 |
&:hover svg { transform: rotate(360deg); }
|
235 |
}
|
236 |
|
237 |
-
/* Keyframes for popover
|
238 |
-
|
239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
}
|
241 |
-
.animate-popover-
|
242 |
-
|
243 |
-
}
|
|
|
|
|
|
|
1 |
// 1. Import Tailwind's base, components, and utilities
|
2 |
@import 'tailwindcss/base';
|
3 |
@import 'tailwindcss/components';
|
|
|
7 |
:root {
|
8 |
--radius: 0.625rem; /* 10px */
|
9 |
--radius-md: 0.5rem; /* 8px */
|
10 |
+
--background: oklch(1 0 0);
|
11 |
+
--foreground: oklch(0.145 0 0);
|
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 {
|
18 |
+
--background: oklch(0.145 0 0);
|
19 |
+
--foreground: oklch(0.985 0 0);
|
20 |
--popover: oklch(0.205 0 0);
|
21 |
--popover-foreground: oklch(0.985 0 0);
|
22 |
+
--border: oklch(1 0 0 / 10%);
|
23 |
}
|
24 |
|
25 |
// 3. Apply base styles
|
26 |
@layer base {
|
27 |
* {
|
28 |
+
border-color: var(--border);
|
29 |
+
outline-color: var(--foreground);
|
|
|
30 |
box-sizing: border-box;
|
31 |
}
|
32 |
body {
|
33 |
+
@apply bg-background text-foreground;
|
34 |
overflow-x: hidden;
|
35 |
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
36 |
-webkit-font-smoothing: antialiased;
|
|
|
67 |
pointer-events: none;
|
68 |
}
|
69 |
|
70 |
+
/* Notification Popover & Header controls */
|
71 |
.notification-popover-wrapper {
|
72 |
position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 100;
|
73 |
width: calc(100% - 1rem); max-width: 28rem; display: flex; justify-content: center; pointer-events: none;
|
74 |
}
|
75 |
.popover-content {
|
76 |
+
width: 100%; border-radius: var(--radius-md, 0.5rem); border-width: 1px; border-color: var(--border);
|
77 |
+
background-color: var(--popover); color: var(--popover-foreground);
|
|
|
|
|
78 |
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
79 |
outline: none; transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
80 |
opacity: 0; transform: translateY(-100%) scale(0.9); pointer-events: none;
|
81 |
&.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
|
82 |
}
|
83 |
+
.notification-popover-text-content {
|
84 |
+
background-color: #eff6ff; font-size: 0.875rem; line-height: 1.5rem; direction: rtl;
|
85 |
+
padding: 1rem; border-radius: var(--radius-md, 0.5rem); color: oklch(0.145 0 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
+
.dark .notification-popover-text-content { background-color: oklch(0.25 0.05 230); color: oklch(0.95 0.01 230); }
|
|
|
88 |
.header-controls {
|
89 |
display: flex; padding: 0.75rem 0.5rem; justify-content: space-between; align-items: center;
|
90 |
width: 100%; position: absolute; top: 0; left: 0; z-index: 10;
|
91 |
}
|
92 |
.header-button {
|
93 |
display: flex; align-items: center; justify-content: center; padding: 0.5rem;
|
94 |
+
width: 40px; height: 40px; border-radius: var(--radius-lg, 0.625rem); background-color: #e5e7eb;
|
|
|
95 |
cursor: pointer; transition: background-color 0.2s, transform 0.1s ease-out;
|
96 |
+
svg { opacity: 0.7; stroke: #374151; width: 24px; height: 24px; }
|
97 |
+
&:hover { background-color: #d1d5db; }
|
98 |
+
&:active { background-color: #9ca3af; transform: scale(0.95); }
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
.dark .header-button {
|
101 |
background-color: oklch(0.28 0 0);
|
102 |
&:hover { background-color: oklch(0.35 0 0); }
|
103 |
&:active { background-color: oklch(0.40 0 0); transform: scale(0.95); }
|
104 |
+
svg { opacity: 0.8; stroke: oklch(0.85 0 0); }
|
|
|
|
|
|
|
105 |
}
|
106 |
|
107 |
+
/* Logo Animation Styling in App.scss - mostly for the wrapper if needed */
|
108 |
.logo-animation-wrapper {
|
109 |
position: relative;
|
110 |
display: flex;
|
111 |
align-items: center;
|
112 |
justify-content: center;
|
113 |
+
// حلقهها و آیکون داخلی توسط کامپوننت LogoAnimation مدیریت میشوند
|
114 |
+
// و از کلاسهای Tailwind برای رنگ و انیمیشن پینگ استفاده میکنند.
|
115 |
+
// کلاس .for-footer میتواند برای استایلدهی خاص به لوگوی فوتر استفاده شود اگر لازم باشد.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
}
|
117 |
|
118 |
+
/* Footer styles - تلاش برای بالاتر آوردن و تطابق با HTML */
|
119 |
.footer-controls-html-like {
|
120 |
width: 100%;
|
121 |
display: flex;
|
122 |
align-items: center;
|
123 |
position: absolute;
|
124 |
+
// *** تنظیم دقیق bottom برای بالاتر آمدن فوتر ***
|
125 |
+
bottom: 2rem; // فاصله 2rem از پایین صفحه. این مقدار را میتوانید تنظیم کنید.
|
126 |
+
// padding چپ و راست برای فاصله از کنارههای صفحه
|
127 |
+
padding-left: 2.5rem; // کمی کمتر از HTML مرجع برای فضای بیشتر برای دکمهها
|
128 |
padding-right: 2.5rem;
|
129 |
+
// padding بالا و پایین داخلی فوتر (اگر نیاز باشد)
|
130 |
padding-top: 0.5rem;
|
131 |
padding-bottom: 0.5rem;
|
132 |
+
|
133 |
box-sizing: border-box;
|
134 |
z-index: 20;
|
135 |
+
justify-content: space-between; // میکروفون چپ، دوربین راست
|
136 |
}
|
137 |
|
138 |
.small-logo-footer-html-like {
|
|
|
140 |
left: 50%;
|
141 |
top: 50%;
|
142 |
transform: translate(-50%, -50%);
|
143 |
+
z-index: 1; // پشت دکمهها
|
144 |
display: flex;
|
145 |
align-items: center;
|
146 |
justify-content: center;
|
147 |
}
|
148 |
|
149 |
+
.control-button-wrapper { // برای دکمه دوربین و دکمه تعویض آن
|
150 |
position: relative;
|
151 |
display: flex;
|
152 |
justify-content: center;
|
|
|
156 |
height: 80px;
|
157 |
width: 80px;
|
158 |
border-radius: 9999px;
|
159 |
+
padding: 0; // پدینگ صفر، اندازه آیکون با CSS داخلی SVG کنترل میشود
|
160 |
display: flex;
|
161 |
align-items: center;
|
162 |
justify-content: center;
|
163 |
border-width: 1px;
|
164 |
+
border-color: var(--border);
|
165 |
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
|
166 |
cursor: pointer;
|
167 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
|
|
174 |
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
|
175 |
}
|
176 |
|
177 |
+
// استایل برای SVG داخل دکمههای کنترل
|
178 |
svg {
|
179 |
+
// برای آیکون میکروفون مرجع که کلاس .reference-mic-svg دارد
|
180 |
&.reference-mic-svg {
|
181 |
+
width: 75%; // افزایش بیشتر اندازه
|
182 |
height: 75%;
|
183 |
}
|
184 |
+
// برای SVGهای دیگر (مثل دوربین، توقف، ...) اگر نیاز به تنظیم اندازه باشد
|
185 |
+
// مثال:
|
186 |
+
// &:not(.reference-mic-svg) {
|
187 |
+
// width: 50%;
|
188 |
+
// height: 50%;
|
189 |
+
// }
|
190 |
}
|
191 |
}
|
192 |
|
193 |
+
// رنگها بر اساس HTML مرجع (میکروفون چپ، دوربین راست)
|
194 |
+
.mic-button-color { background-color: #fecdd3; } // قرمز برای میکروفون (چپ)
|
195 |
+
.cam-button-color { background-color: #E0ECFF; } // آبی برای دوربین (راست)
|
196 |
+
|
197 |
.dark .mic-button-color { background-color: #5C2129; }
|
198 |
.dark .cam-button-color { background-color: #223355; }
|
199 |
|
200 |
+
|
201 |
/* Switch Camera Button */
|
202 |
.switch-camera-button-container {
|
203 |
position: absolute; bottom: calc(100% + 0.65rem); left: 50%;
|
|
|
208 |
&.visible { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
|
209 |
}
|
210 |
.switch-camera-button-content {
|
211 |
+
width: 48px; height: 48px; background-color: var(--background); border: 1px solid var(--border);
|
|
|
|
|
212 |
border-radius: 9999px; display: flex; align-items: center; justify-content: center;
|
213 |
box-shadow: 0 5px 10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08); cursor: pointer;
|
214 |
transform-origin: center; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
215 |
&: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); }
|
216 |
&:active { transform: scale(1.03) rotate(0deg); }
|
217 |
+
svg { width: 22px; height: 22px; stroke: var(--foreground); transition: transform 0.3s ease-in-out; }
|
218 |
&:hover svg { transform: rotate(360deg); }
|
219 |
}
|
220 |
|
221 |
+
/* Keyframes for popover */
|
222 |
+
@keyframes popover-drop-in {
|
223 |
+
0% { opacity: 0; transform: translateY(-100%) scale(0.9); }
|
224 |
+
70% { opacity: 1; transform: translateY(5px) scale(1.02); }
|
225 |
+
100% { opacity: 1; transform: translateY(0) scale(1); }
|
226 |
+
}
|
227 |
+
@keyframes popover-lift-out {
|
228 |
+
0% { opacity: 1; transform: translateY(0) scale(1); }
|
229 |
+
100% { opacity: 0; transform: translateY(-100%) scale(0.9); }
|
230 |
}
|
231 |
+
.animate-popover-open-top-center { animation: popover-drop-in 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; }
|
232 |
+
.animate-popover-close-top-center { animation: popover-lift-out 0.3s ease-in forwards; }
|
|