Spaces:
Running
Running
Update src/App.scss
Browse files- src/App.scss +50 -119
src/App.scss
CHANGED
@@ -1,19 +1,17 @@
|
|
1 |
-
//
|
2 |
@import 'tailwindcss/base';
|
3 |
@import 'tailwindcss/components';
|
4 |
@import 'tailwindcss/utilities';
|
5 |
|
6 |
-
// 2. Define CSS Variables
|
7 |
:root {
|
8 |
-
--radius: 0.625rem;
|
9 |
-
--radius-md: 0.5rem;
|
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);
|
@@ -21,98 +19,22 @@
|
|
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 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
-webkit-font-smoothing: antialiased;
|
38 |
-
-moz-osx-font-smoothing: grayscale;
|
39 |
-
margin: 0;
|
40 |
-
padding: 0;
|
41 |
-
height: 100%; // Ensure html and body take full height
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
// Main application container to manage overall height
|
46 |
-
.app-container {
|
47 |
-
height: 100vh; // Use viewport height
|
48 |
-
display: flex;
|
49 |
-
flex-direction: column;
|
50 |
-
}
|
51 |
-
|
52 |
-
.main-wrapper {
|
53 |
-
// min-height: 100vh; // No longer needed if app-container handles height
|
54 |
-
display: flex;
|
55 |
-
flex-direction: column;
|
56 |
-
flex-grow: 1; // Allow main-wrapper to fill app-container
|
57 |
-
width: 100%; // Ensure it takes full width
|
58 |
-
max-width: 450px; // Max width like many mobile apps, adjust as needed
|
59 |
-
margin-left: auto;
|
60 |
-
margin-right: auto;
|
61 |
-
}
|
62 |
-
.media-area {
|
63 |
-
flex-grow: 1; // This area will take up available space above the footer
|
64 |
-
position: relative;
|
65 |
-
width: 100%; // Ensure it takes full width of main-wrapper
|
66 |
-
}
|
67 |
-
|
68 |
-
#large-logo-container {
|
69 |
-
display: flex;
|
70 |
-
align-items: center;
|
71 |
-
justify-content: center;
|
72 |
-
width: 100%;
|
73 |
-
height: 100%;
|
74 |
-
position: absolute;
|
75 |
-
top: 0;
|
76 |
-
left: 0;
|
77 |
-
pointer-events: none;
|
78 |
-
}
|
79 |
-
|
80 |
-
/* Notification Popover & Header controls (No changes from previous correct version) */
|
81 |
-
.notification-popover-wrapper {
|
82 |
-
position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 100;
|
83 |
-
width: calc(100% - 1rem); max-width: 28rem; display: flex; justify-content: center; pointer-events: none;
|
84 |
-
}
|
85 |
-
.popover-content {
|
86 |
-
width: 100%; border-radius: var(--radius-md, 0.5rem); border-width: 1px; border-color: var(--border);
|
87 |
-
background-color: var(--popover); color: var(--popover-foreground);
|
88 |
-
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
89 |
-
outline: none; transition: opacity 0.3s ease-out, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
90 |
-
opacity: 0; transform: translateY(-100%) scale(0.9); pointer-events: none;
|
91 |
-
&.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
|
92 |
-
}
|
93 |
-
.notification-popover-text-content {
|
94 |
-
background-color: #eff6ff; font-size: 0.875rem; line-height: 1.5rem; direction: rtl;
|
95 |
-
padding: 1rem; border-radius: var(--radius-md, 0.5rem); color: oklch(0.145 0 0);
|
96 |
-
}
|
97 |
.dark .notification-popover-text-content { background-color: oklch(0.25 0.05 230); color: oklch(0.95 0.01 230); }
|
98 |
-
.header-controls {
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
.header-button {
|
103 |
-
display: flex; align-items: center; justify-content: center; padding: 0.5rem;
|
104 |
-
width: 40px; height: 40px; border-radius: var(--radius-lg, 0.625rem); background-color: #e5e7eb;
|
105 |
-
cursor: pointer; transition: background-color 0.2s, transform 0.1s ease-out;
|
106 |
-
svg { opacity: 0.7; stroke: #374151; width: 24px; height: 24px; }
|
107 |
-
&:hover { background-color: #d1d5db; }
|
108 |
-
&:active { background-color: #9ca3af; transform: scale(0.95); }
|
109 |
-
}
|
110 |
-
.dark .header-button {
|
111 |
-
background-color: oklch(0.28 0 0);
|
112 |
-
&:hover { background-color: oklch(0.35 0 0); }
|
113 |
-
&:active { background-color: oklch(0.40 0 0); transform: scale(0.95); }
|
114 |
-
svg { opacity: 0.8; stroke: oklch(0.85 0 0); }
|
115 |
-
}
|
116 |
|
117 |
/* Logo Animation Styling */
|
118 |
.logo-animation-wrapper {
|
@@ -120,34 +42,36 @@
|
|
120 |
display: flex;
|
121 |
align-items: center;
|
122 |
justify-content: center;
|
123 |
-
& > .z-10 > svg {
|
124 |
width: 100%;
|
125 |
height: 100%;
|
126 |
}
|
127 |
}
|
128 |
|
129 |
-
/* Footer styles
|
130 |
.footer-controls-html-like {
|
131 |
width: 100%;
|
132 |
display: flex;
|
133 |
align-items: center;
|
134 |
-
position:
|
135 |
-
//
|
136 |
-
//
|
137 |
-
// padding
|
138 |
-
padding:
|
139 |
-
|
140 |
-
|
|
|
|
|
|
|
141 |
box-sizing: border-box;
|
142 |
z-index: 20;
|
143 |
-
justify-content: space-between;
|
144 |
-
flex-shrink: 0; // Prevent footer from shrinking
|
145 |
}
|
146 |
|
147 |
.small-logo-footer-html-like {
|
148 |
position: absolute;
|
149 |
left: 50%;
|
150 |
-
top: 50%;
|
151 |
transform: translate(-50%, -50%);
|
152 |
z-index: 1;
|
153 |
display: flex;
|
@@ -165,7 +89,7 @@
|
|
165 |
height: 80px;
|
166 |
width: 80px;
|
167 |
border-radius: 9999px;
|
168 |
-
padding: 0; //
|
169 |
display: flex;
|
170 |
align-items: center;
|
171 |
justify-content: center;
|
@@ -176,28 +100,35 @@
|
|
176 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
177 |
flex-shrink: 0;
|
178 |
z-index: 2;
|
179 |
-
overflow: hidden; //
|
180 |
-
|
181 |
-
svg {
|
182 |
-
// برای بزرگتر کردن آیکون داخل دکمه، transform در SVG خود آیکون بهتر است
|
183 |
-
// اما اگر SVG transform ندارد، می توانیم اینجا scale کنیم
|
184 |
-
// مثال: transform: scale(1.2); // برای 20% بزرگتر شدن
|
185 |
-
width: 60%; // یا درصدی از دکمه
|
186 |
-
height: 60%;
|
187 |
-
}
|
188 |
|
189 |
&:hover {
|
190 |
transform: scale(1.05);
|
191 |
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
|
192 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
}
|
194 |
|
195 |
.mic-button-color { background-color: #fecdd3; }
|
196 |
.cam-button-color { background-color: #E0ECFF; }
|
|
|
197 |
.dark .mic-button-color { background-color: #5C2129; }
|
198 |
.dark .cam-button-color { background-color: #223355; }
|
199 |
|
200 |
-
|
|
|
201 |
.switch-camera-button-container {
|
202 |
position: absolute; bottom: calc(100% + 0.65rem); left: 50%;
|
203 |
transform: translateX(-50%) translateY(15px) scale(0.7); z-index: 5;
|
@@ -217,7 +148,7 @@
|
|
217 |
&:hover svg { transform: rotate(360deg); }
|
218 |
}
|
219 |
|
220 |
-
/* Keyframes for popover (
|
221 |
@keyframes popover-drop-in {
|
222 |
0% { opacity: 0; transform: translateY(-100%) scale(0.9); }
|
223 |
70% { opacity: 1; transform: translateY(5px) scale(1.02); }
|
|
|
1 |
+
// ... (بخشهای اولیه CSS، متغیرها، base styles، header، popover بدون تغییر) ...
|
2 |
@import 'tailwindcss/base';
|
3 |
@import 'tailwindcss/components';
|
4 |
@import 'tailwindcss/utilities';
|
5 |
|
|
|
6 |
:root {
|
7 |
+
--radius: 0.625rem;
|
8 |
+
--radius-md: 0.5rem;
|
9 |
--background: oklch(1 0 0);
|
10 |
--foreground: oklch(0.145 0 0);
|
11 |
--popover: oklch(1 0 0);
|
12 |
--popover-foreground: oklch(0.145 0 0);
|
13 |
--border: oklch(0.922 0 0);
|
14 |
}
|
|
|
15 |
.dark {
|
16 |
--background: oklch(0.145 0 0);
|
17 |
--foreground: oklch(0.985 0 0);
|
|
|
19 |
--popover-foreground: oklch(0.985 0 0);
|
20 |
--border: oklch(1 0 0 / 10%);
|
21 |
}
|
|
|
|
|
22 |
@layer base {
|
23 |
+
* { border-color: var(--border); outline-color: var(--foreground); box-sizing: border-box; }
|
24 |
+
body { @apply bg-background text-foreground; overflow-x: hidden; 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"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; margin: 0; padding: 0; }
|
25 |
+
html { margin: 0; padding: 0; overflow-x: hidden; }
|
26 |
+
}
|
27 |
+
.main-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
|
28 |
+
.media-area { flex-grow: 1; position: relative; }
|
29 |
+
#large-logo-container { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; pointer-events: none; }
|
30 |
+
.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; }
|
31 |
+
.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; } }
|
32 |
+
.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); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
.dark .notification-popover-text-content { background-color: oklch(0.25 0.05 230); color: oklch(0.95 0.01 230); }
|
34 |
+
.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; }
|
35 |
+
.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); } }
|
36 |
+
.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); } }
|
37 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
/* Logo Animation Styling */
|
40 |
.logo-animation-wrapper {
|
|
|
42 |
display: flex;
|
43 |
align-items: center;
|
44 |
justify-content: center;
|
45 |
+
& > .z-10 > svg { /* Target the SvgHumanIcon inside its container */
|
46 |
width: 100%;
|
47 |
height: 100%;
|
48 |
}
|
49 |
}
|
50 |
|
51 |
+
/* Footer styles - تلاش برای بالاتر آوردن و تطابق با HTML */
|
52 |
.footer-controls-html-like {
|
53 |
width: 100%;
|
54 |
display: flex;
|
55 |
align-items: center;
|
56 |
+
position: absolute;
|
57 |
+
// *** MODIFIED: تنظیم دقیق bottom و padding برای بالاتر آمدن ***
|
58 |
+
bottom: 1.5rem; // فاصله از پایین صفحه (قبلاً 0 بود، امتحان کنید 1rem, 1.5rem, 2rem)
|
59 |
+
// padding-left و padding-right را مشابه HTML مرجع نگه میداریم
|
60 |
+
padding-left: 3rem; // 48px از چپ
|
61 |
+
padding-right: 3rem; // 48px از راست
|
62 |
+
// padding-top و padding-bottom را کمتر میکنیم یا حذف میکنیم چون bottom را تنظیم کردیم
|
63 |
+
padding-top: 0.5rem; // کمی فاصله از بالا برای محتوای داخلی
|
64 |
+
padding-bottom: 0.5rem; // کمی فاصله از پایین برای محتوای داخلی
|
65 |
+
|
66 |
box-sizing: border-box;
|
67 |
z-index: 20;
|
68 |
+
justify-content: space-between; // میکروفون چپ، دوربین راست
|
|
|
69 |
}
|
70 |
|
71 |
.small-logo-footer-html-like {
|
72 |
position: absolute;
|
73 |
left: 50%;
|
74 |
+
top: 50%; // نسبت به کادر padding فوتر
|
75 |
transform: translate(-50%, -50%);
|
76 |
z-index: 1;
|
77 |
display: flex;
|
|
|
89 |
height: 80px;
|
90 |
width: 80px;
|
91 |
border-radius: 9999px;
|
92 |
+
padding: 0; // پدینگ صفر چون آیکون خودش باید فضا را پر کند یا با CSS داخلی SVG تنظیم شود
|
93 |
display: flex;
|
94 |
align-items: center;
|
95 |
justify-content: center;
|
|
|
100 |
transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
|
101 |
flex-shrink: 0;
|
102 |
z-index: 2;
|
103 |
+
overflow: hidden; // برای اطمینان از اینکه SVG بزرگتر از دکمه بیرون نمیزند
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
&:hover {
|
106 |
transform: scale(1.05);
|
107 |
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
|
108 |
}
|
109 |
+
|
110 |
+
// استایل برای SVG داخل دکمههای کنترل
|
111 |
+
svg {
|
112 |
+
// این بخش مهم است برای بزرگتر کردن آیکون میکروفون
|
113 |
+
// اگر SvgReferenceMicrophoneIcon کلاسی مثل .reference-mic-svg دارد:
|
114 |
+
&.reference-mic-svg {
|
115 |
+
width: 60%; // یا درصدی که مناسب به نظر میرسد
|
116 |
+
height: 60%;
|
117 |
+
// transform: scale(1); // اطمینان از اینکه scale پیشفرض SVG اعمال میشود
|
118 |
+
}
|
119 |
+
// برای آیکونهای دیگر میتوانید اندازه پیشفرض یا کمی کوچکتر در نظر بگیرید
|
120 |
+
// &.some-other-icon-class { width: 50%; height: 50%; }
|
121 |
+
}
|
122 |
}
|
123 |
|
124 |
.mic-button-color { background-color: #fecdd3; }
|
125 |
.cam-button-color { background-color: #E0ECFF; }
|
126 |
+
|
127 |
.dark .mic-button-color { background-color: #5C2129; }
|
128 |
.dark .cam-button-color { background-color: #223355; }
|
129 |
|
130 |
+
|
131 |
+
/* Switch Camera Button (بدون تغییر) */
|
132 |
.switch-camera-button-container {
|
133 |
position: absolute; bottom: calc(100% + 0.65rem); left: 50%;
|
134 |
transform: translateX(-50%) translateY(15px) scale(0.7); z-index: 5;
|
|
|
148 |
&:hover svg { transform: rotate(360deg); }
|
149 |
}
|
150 |
|
151 |
+
/* Keyframes for popover (بدون تغییر) */
|
152 |
@keyframes popover-drop-in {
|
153 |
0% { opacity: 0; transform: translateY(-100%) scale(0.9); }
|
154 |
70% { opacity: 1; transform: translateY(5px) scale(1.02); }
|