Ezmary commited on
Commit
18ad7dc
·
verified ·
1 Parent(s): 81b0ac6

Update src/App.scss

Browse files
Files changed (1) hide show
  1. src/App.scss +68 -104
src/App.scss CHANGED
@@ -3,17 +3,16 @@
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);
@@ -25,12 +24,13 @@
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;
@@ -45,94 +45,72 @@
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;
62
- width: 100%;
63
- height: 100%;
64
- position: absolute;
65
- top: 0;
66
- left: 0;
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,13 +118,13 @@
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,12 +134,13 @@
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,31 +153,19 @@
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;
@@ -208,25 +175,22 @@
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; }
 
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
  .dark {
17
  --background: oklch(0.145 0 0);
18
  --foreground: oklch(0.985 0 0);
 
24
  // 3. Apply base styles
25
  @layer base {
26
  * {
27
+ border-color: var(--border); // یا استفاده از text-custom-border اگر تعریف کردید
28
+ outline-color: theme('colors.custom-foreground'); // استفاده از رنگ تعریف شده در Tailwind
29
  box-sizing: border-box;
30
  }
31
  body {
32
+ // *** MODIFIED: استفاده از کلاس‌های جدید تعریف شده در tailwind.config.js ***
33
+ @apply bg-custom-background text-custom-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;
 
45
  }
46
  }
47
 
48
+ // ... (بقیه فایل App.scss بدون تغییر نسبت به آخرین نسخه موفق قبلی) ...
49
+ // (شامل .main-wrapper, .media-area, #large-logo-container, popover, header, .logo-animation-wrapper, footer, control-button, switch-camera, keyframes)
50
+ // فقط مطمئن شوید که در بخش .popover-content و .notification-popover-text-content هم از رنگ‌های مبتنی بر متغیر CSS یا کلاس‌های Tailwind استفاده شده باشد.
 
 
 
 
 
 
51
 
52
+ // مثال برای .popover-content اگر از متغیرهای CSS استفاده می‌کنید:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  .popover-content {
54
+ // ... سایر استایل‌ها ...
55
+ background-color: var(--popover); // استفاده از متغیر CSS
56
+ color: var(--popover-foreground); // استفاده از متغیر CSS
57
+ border-color: var(--border); // استفاده از متغیر CSS
58
+ // ...
 
59
  }
60
+
61
+ // مثال برای .notification-popover-text-content
62
  .notification-popover-text-content {
63
+ // در نسخه قبلی از رنگ‌های ثابت استفاده شده بود که مشکلی ندارد
64
+ // background-color: #eff6ff;
65
+ // color: oklch(0.145 0 0);
66
+ // یا می‌توانید آنها را هم به متغیر CSS یا کلاس Tailwind تبدیل کنید اگر بخواهید کاملا یکپارچه باشد
67
+ // مثال با کلاس Tailwind اگر تعریف شده باشند:
68
+ // @apply bg-blue-50 text-gray-800;
69
+ // .dark & { @apply bg-custom-dark-blue text-custom-light-text; }
70
+
71
+ // برای سادگی، فعلا همان رنگ‌های ثابت قبلی را نگه می‌داریم:
72
+ background-color: #eff6ff;
73
+ font-size: 0.875rem;
74
+ line-height: 1.5rem;
75
+ direction: rtl;
76
+ padding: 1rem;
77
+ border-radius: var(--radius-md, 0.5rem);
78
+ color: oklch(0.145 0 0);
79
  }
80
+ .dark .notification-popover-text-content {
81
+ background-color: oklch(0.25 0.05 230);
82
+ color: oklch(0.95 0.01 230);
 
 
83
  }
84
 
85
+
86
+ .main-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
87
+ .media-area { flex-grow: 1; position: relative; }
88
+ #large-logo-container { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; pointer-events: none; }
89
+
90
  .logo-animation-wrapper {
91
  position: relative;
92
  display: flex;
93
  align-items: center;
94
  justify-content: center;
95
+ & > .z-10 > svg {
96
+ width: 100%;
97
+ height: 100%;
98
+ }
99
  }
100
 
 
101
  .footer-controls-html-like {
102
  width: 100%;
103
  display: flex;
104
  align-items: center;
105
  position: absolute;
106
+ bottom: 2rem;
107
+ padding-left: 2.5rem;
 
 
108
  padding-right: 2.5rem;
 
109
  padding-top: 0.5rem;
110
  padding-bottom: 0.5rem;
 
111
  box-sizing: border-box;
112
  z-index: 20;
113
+ justify-content: space-between;
114
  }
115
 
116
  .small-logo-footer-html-like {
 
118
  left: 50%;
119
  top: 50%;
120
  transform: translate(-50%, -50%);
121
+ z-index: 1;
122
  display: flex;
123
  align-items: center;
124
  justify-content: center;
125
  }
126
 
127
+ .control-button-wrapper {
128
  position: relative;
129
  display: flex;
130
  justify-content: center;
 
134
  height: 80px;
135
  width: 80px;
136
  border-radius: 9999px;
137
+ padding: 0;
138
  display: flex;
139
  align-items: center;
140
  justify-content: center;
141
  border-width: 1px;
142
+ // border-color: var(--border); // یا text-custom-border
143
+ border-color: theme('colors.custom-border'); // استفاده از رنگ تعریف شده در Tailwind
144
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
145
  cursor: pointer;
146
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
 
153
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
154
  }
155
 
 
156
  svg {
 
157
  &.reference-mic-svg {
158
+ width: 75%;
159
  height: 75%;
160
  }
 
 
 
 
 
 
161
  }
162
  }
163
 
164
+ .mic-button-color { background-color: #fecdd3; } // اینها رنگ‌های ثابت هستند و باید کار کنند
165
+ .cam-button-color { background-color: #E0ECFF; }
 
 
166
  .dark .mic-button-color { background-color: #5C2129; }
167
  .dark .cam-button-color { background-color: #223355; }
168
 
 
 
169
  .switch-camera-button-container {
170
  position: absolute; bottom: calc(100% + 0.65rem); left: 50%;
171
  transform: translateX(-50%) translateY(15px) scale(0.7); z-index: 5;
 
175
  &.visible { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
176
  }
177
  .switch-camera-button-content {
178
+ width: 48px; height: 48px;
179
+ // background-color: var(--background); // یا bg-custom-background
180
+ background-color: theme('colors.custom-background');
181
+ // border: 1px solid var(--border); // یا border-custom-border
182
+ border: 1px solid theme('colors.custom-border');
183
  border-radius: 9999px; display: flex; align-items: center; justify-content: center;
184
  box-shadow: 0 5px 10px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08); cursor: pointer;
185
  transform-origin: center; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
186
  &: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); }
187
  &:active { transform: scale(1.03) rotate(0deg); }
188
+ svg { width: 22px; height: 22px; stroke: theme('colors.custom-foreground'); transition: transform 0.3s ease-in-out; }
189
  &:hover svg { transform: rotate(360deg); }
190
  }
191
 
192
+ // Keyframes بدون تغییر
193
+ @keyframes popover-drop-in { /* ... */ }
194
+ @keyframes popover-lift-out { /* ... */ }
195
+ .animate-popover-open-top-center { animation-name: popover-drop-in; animation-duration: 0.4s; animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55); animation-fill-mode: forwards; }
196
+ .animate-popover-close-top-center { animation-name: popover-lift-out; animation-duration: 0.3s; animation-timing-function: ease-in; animation-fill-mode: forwards; }