Hamed744 commited on
Commit
6aa613b
·
verified ·
1 Parent(s): 03d327c

Update src/App.scss

Browse files
Files changed (1) hide show
  1. src/App.scss +119 -15
src/App.scss CHANGED
@@ -1,4 +1,4 @@
1
- // src/App.scss (نسخه نهایی با اصلاح مرکزچین کردن نام گویندگان)
2
 
3
  // 1. Import Tailwind's base, components, and utilities
4
  @import 'tailwindcss/base';
@@ -165,16 +165,12 @@
165
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
166
  gap: 12px; padding: 4px 8px 8px;
167
  }
168
-
169
- // ✅ تغییر اصلی اینجاست
170
  .voice-card {
171
  cursor: pointer;
172
- // text-align: center; // این دیگر لازم نیست
173
- // استفاده از Flexbox برای کنترل دقیق چینش
174
  display: flex;
175
  flex-direction: column;
176
- align-items: center; // این خط همه چیز را در مرکز افقی قرار می‌دهد
177
-
178
  img {
179
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
180
  border: 3px solid transparent; transition: border-color 0.2s, transform 0.2s;
@@ -198,11 +194,116 @@
198
  100% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0); }
199
  }
200
 
201
- /* ویدیو و کنترل‌ها */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  .media-area {
203
- position: absolute; top: 0; left: 0; width: 100%; height: 100%;
204
- z-index: 1; overflow: hidden;
205
- video#video-feed { width: 100%; height: 100%; object-fit: cover; }
 
206
  }
207
  #large-logo-container {
208
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
@@ -220,6 +321,11 @@
220
  cursor: pointer; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
221
  flex-shrink: 0; z-index: 2; overflow: hidden;
222
  &:hover { transform: scale(1.05); }
 
 
 
 
 
223
  }
224
  .mic-button-color { background-color: #fecdd3; }
225
  .cam-button-color { background-color: #E0ECFF; }
@@ -228,10 +334,8 @@
228
  .control-button-wrapper { position: relative; display: flex; justify-content: center; }
229
  .switch-camera-button-container {
230
  position: absolute; bottom: calc(100% + 0.65rem);
231
- left: 50%;
232
- transform: translateX(-50%) translateY(15px) scale(0.7);
233
- z-index: 5;
234
- opacity: 0; pointer-events: none; transition: opacity 0.35s, transform 0.35s;
235
  transform-origin: center bottom;
236
  &.visible { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
237
  }
 
1
+ // src/App.scss (نسخه نهایی با انیمیشن تایمر فعال)
2
 
3
  // 1. Import Tailwind's base, components, and utilities
4
  @import 'tailwindcss/base';
 
165
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
166
  gap: 12px; padding: 4px 8px 8px;
167
  }
 
 
168
  .voice-card {
169
  cursor: pointer;
 
 
170
  display: flex;
171
  flex-direction: column;
172
+ align-items: center;
173
+
174
  img {
175
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
176
  border: 3px solid transparent; transition: border-color 0.2s, transform 0.2s;
 
194
  100% { box-shadow: 0 0 0 0 rgba(10, 132, 255, 0); }
195
  }
196
 
197
+ /* استایل‌های بخش تایمر */
198
+ .timer-section {
199
+ padding: 12px;
200
+ &.time-up {
201
+ text-align: center;
202
+ p {
203
+ font-size: 0.85rem;
204
+ font-weight: 500;
205
+ margin: 0;
206
+ padding: 8px;
207
+ color: theme('colors.custom-foreground');
208
+ opacity: 0.8;
209
+ }
210
+ }
211
+ .timer-text {
212
+ display: flex; justify-content: space-between; font-size: 0.8rem;
213
+ color: theme('colors.custom-foreground'); opacity: 0.8; margin-bottom: 8px;
214
+ span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
215
+ }
216
+ .timer-bar {
217
+ width: 100%;
218
+ height: 8px;
219
+ background-color: rgba(0, 0, 0, 0.1);
220
+ .dark & { background-color: rgba(255, 255, 255, 0.1); }
221
+ border-radius: 4px;
222
+ overflow: hidden;
223
+ }
224
+ .timer-bar-fill {
225
+ height: 100%;
226
+ border-radius: 4px;
227
+ background-color: #34c759;
228
+ transition: width 0.5s ease-out;
229
+ // ✅ تغییر اصلی اینجاست
230
+ &.active {
231
+ background: repeating-linear-gradient(
232
+ -45deg,
233
+ #34c759,
234
+ #34c759 10px,
235
+ #4ade80 10px,
236
+ #4ade80 20px
237
+ );
238
+ // این انیمیشن باعث حرکت خطوط مورب می‌شود
239
+ animation: slide 60s linear infinite;
240
+ }
241
+ }
242
+ }
243
+
244
+ @keyframes slide {
245
+ from { background-position: 0 0; }
246
+ to { background-position: -800px 0; }
247
+ }
248
+
249
+ /* استایل‌های صفحه اتمام زمان */
250
+ .time-up-overlay {
251
+ flex-grow: 1;
252
+ display: flex;
253
+ align-items: center;
254
+ justify-content: center;
255
+ padding: 1rem;
256
+ z-index: 10;
257
+ animation: fade-in-scale 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
258
+ }
259
+ .time-up-card {
260
+ background-color: theme('colors.custom-popover');
261
+ color: theme('colors.custom-foreground');
262
+ border: 1px solid theme('colors.custom-border');
263
+ border-radius: 24px;
264
+ padding: 2.5rem;
265
+ max-width: 400px;
266
+ text-align: center;
267
+ box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
268
+ direction: rtl;
269
+
270
+ .medal-icon {
271
+ font-size: 56px;
272
+ padding: 16px;
273
+ background-color: #fff5e1;
274
+ color: #ffb822;
275
+ border-radius: 50%;
276
+ margin-bottom: 1.5rem;
277
+ display: inline-block;
278
+ .dark & {
279
+ background-color: #4a3c20;
280
+ color: #ffd670;
281
+ }
282
+ }
283
+ h2 {
284
+ font-size: 1.5rem;
285
+ font-weight: 700;
286
+ margin-top: 0;
287
+ margin-bottom: 0.75rem;
288
+ }
289
+ p {
290
+ font-size: 1rem;
291
+ line-height: 1.6;
292
+ opacity: 0.8;
293
+ margin: 0;
294
+ }
295
+ }
296
+ @keyframes fade-in-scale {
297
+ from { opacity: 0; transform: scale(0.95); }
298
+ to { opacity: 1; transform: scale(1); }
299
+ }
300
+
301
+ /* استایل ویدیو و کنترل‌ها */
302
  .media-area {
303
+ flex-grow: 1;
304
+ position: relative;
305
+ z-index: 1;
306
+ video#video-feed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
307
  }
308
  #large-logo-container {
309
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
 
321
  cursor: pointer; transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
322
  flex-shrink: 0; z-index: 2; overflow: hidden;
323
  &:hover { transform: scale(1.05); }
324
+ &.disabled {
325
+ opacity: 0.5;
326
+ cursor: not-allowed;
327
+ pointer-events: none;
328
+ }
329
  }
330
  .mic-button-color { background-color: #fecdd3; }
331
  .cam-button-color { background-color: #E0ECFF; }
 
334
  .control-button-wrapper { position: relative; display: flex; justify-content: center; }
335
  .switch-camera-button-container {
336
  position: absolute; bottom: calc(100% + 0.65rem);
337
+ left: 50%; transform: translateX(-50%) translateY(15px) scale(0.7);
338
+ z-index: 5; opacity: 0; pointer-events: none; transition: opacity 0.35s, transform 0.35s;
 
 
339
  transform-origin: center bottom;
340
  &.visible { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); pointer-events: auto; }
341
  }