Spaces:
Running
Running
Update src/App.scss
Browse files- src/App.scss +152 -52
src/App.scss
CHANGED
@@ -1,15 +1,61 @@
|
|
1 |
-
//
|
2 |
@import 'tailwindcss/base';
|
3 |
@import 'tailwindcss/components';
|
4 |
@import 'tailwindcss/utilities';
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
display: flex;
|
14 |
align-items: center;
|
15 |
justify-content: center;
|
@@ -21,48 +67,72 @@
|
|
21 |
pointer-events: none;
|
22 |
}
|
23 |
|
24 |
-
|
25 |
-
.
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
.dark .notification-popover-text-content { background-color: oklch(0.25 0.05 230); color: oklch(0.95 0.01 230); }
|
28 |
-
.header-controls {
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
/* Logo Animation Styling
|
33 |
.logo-animation-wrapper {
|
34 |
-
position: relative;
|
35 |
display: flex;
|
36 |
align-items: center;
|
37 |
justify-content: center;
|
38 |
-
//
|
39 |
-
|
40 |
-
|
41 |
-
align-items: center;
|
42 |
-
justify-content: center;
|
43 |
-
// width و height این div توسط style inline در createLogoFunction تنظیم میشود
|
44 |
-
& > svg { // خود SVG
|
45 |
-
width: 100%;
|
46 |
-
height: 100%;
|
47 |
-
}
|
48 |
-
}
|
49 |
}
|
50 |
|
51 |
-
/* Footer styles -
|
52 |
.footer-controls-html-like {
|
53 |
width: 100%;
|
54 |
display: flex;
|
55 |
align-items: center;
|
56 |
position: absolute;
|
57 |
-
// ***
|
58 |
-
bottom: 2rem; //
|
59 |
-
padding
|
60 |
-
padding-
|
61 |
-
padding-
|
|
|
|
|
62 |
padding-bottom: 0.5rem;
|
|
|
63 |
box-sizing: border-box;
|
64 |
z-index: 20;
|
65 |
-
justify-content: space-between;
|
66 |
}
|
67 |
|
68 |
.small-logo-footer-html-like {
|
@@ -70,13 +140,13 @@
|
|
70 |
left: 50%;
|
71 |
top: 50%;
|
72 |
transform: translate(-50%, -50%);
|
73 |
-
z-index: 1;
|
74 |
display: flex;
|
75 |
align-items: center;
|
76 |
justify-content: center;
|
77 |
}
|
78 |
|
79 |
-
.control-button-wrapper {
|
80 |
position: relative;
|
81 |
display: flex;
|
82 |
justify-content: center;
|
@@ -86,7 +156,7 @@
|
|
86 |
height: 80px;
|
87 |
width: 80px;
|
88 |
border-radius: 9999px;
|
89 |
-
padding: 0;
|
90 |
display: flex;
|
91 |
align-items: center;
|
92 |
justify-content: center;
|
@@ -104,29 +174,59 @@
|
|
104 |
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
|
105 |
}
|
106 |
|
|
|
107 |
svg {
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
111 |
}
|
112 |
-
// SVG
|
113 |
-
//
|
114 |
-
//
|
|
|
|
|
|
|
115 |
}
|
116 |
}
|
117 |
|
118 |
-
|
119 |
-
.
|
|
|
120 |
|
121 |
.dark .mic-button-color { background-color: #5C2129; }
|
122 |
.dark .cam-button-color { background-color: #223355; }
|
123 |
|
124 |
-
/* Switch Camera Button (بدون تغییر) */
|
125 |
-
.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; } }
|
126 |
-
.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); } }
|
127 |
|
128 |
-
/*
|
129 |
-
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
.animate-popover-open-top-center { animation: popover-drop-in 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; }
|
132 |
.animate-popover-close-top-center { animation: popover-lift-out 0.3s ease-in forwards; }
|
|
|
1 |
+
// 1. Import Tailwind's base, components, and utilities
|
2 |
@import 'tailwindcss/base';
|
3 |
@import 'tailwindcss/components';
|
4 |
@import 'tailwindcss/utilities';
|
5 |
+
|
6 |
+
// 2. Define CSS Variables
|
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;
|
37 |
+
-moz-osx-font-smoothing: grayscale;
|
38 |
+
margin: 0;
|
39 |
+
padding: 0;
|
40 |
+
}
|
41 |
+
html {
|
42 |
+
margin: 0;
|
43 |
+
padding: 0;
|
44 |
+
overflow-x: hidden;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
.main-wrapper {
|
49 |
+
min-height: 100vh;
|
50 |
+
display: flex;
|
51 |
+
flex-direction: column;
|
52 |
+
}
|
53 |
+
.media-area {
|
54 |
+
flex-grow: 1;
|
55 |
+
position: relative;
|
56 |
+
}
|
57 |
+
|
58 |
+
#large-logo-container {
|
59 |
display: flex;
|
60 |
align-items: center;
|
61 |
justify-content: center;
|
|
|
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;
|
|
|
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%;
|
204 |
+
transform: translateX(-50%) translateY(15px) scale(0.7); z-index: 5;
|
205 |
+
opacity: 0; pointer-events: none;
|
206 |
+
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);
|
207 |
+
transform-origin: center bottom;
|
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; }
|