GSMEthesis commited on
Commit
cee2227
·
verified ·
1 Parent(s): 8c3c340

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -10
app.py CHANGED
@@ -26,19 +26,53 @@ html, body, .stApp {
26
  width: 100% !important;
27
  }
28
 
29
- @media (min-width: 769px) {
30
- .stApp {
31
- /* کادر با عرض ثابت و گوشه‌های گرد */
32
- max-width: 768px !important;
33
- margin: 0 auto; /* وسط‌چین کردن محتوا */
34
- padding: 20px; /* فاصله داخلی */
35
- border-radius: 16px; /* گوشه‌های گرد */
36
- border: 2px solid var(--primary); /* رنگ کادر */
37
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* سایه */
38
- background-color: var(--background); /* پس‌زمینه سفید */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
  }
41
 
 
 
 
 
 
 
 
 
 
 
 
42
  /* تنظیمات کلی استایل‌ها */
43
  @font-face {
44
  font-family: 'B Nazanin';
 
26
  width: 100% !important;
27
  }
28
 
29
+
30
+ /* ======== کادر شبیه موبایل برای دسکتاپ ======== */
31
+ @media (min-width: 768px) {
32
+ [data-testid="stAppViewContainer"] {
33
+ max-width: 768px !important; /* عرض موبایل */
34
+ margin: 0 auto !important;
35
+ padding: 20px !important;
36
+ border: 12px solid #333 !important;
37
+ border-radius: 40px !important;
38
+ box-shadow: 0 0 0 6px #666,
39
+ 0 0 30px rgba(0,0,0,0.5) !important;
40
+ position: relative !important;
41
+ min-height: 90vh !important;
42
+ overflow: hidden !important;
43
+ }
44
+
45
+ /* دکمه هوم مجازی */
46
+ [data-testid="stAppViewContainer"]::after {
47
+ content: "";
48
+ position: absolute;
49
+ bottom: 15px;
50
+ left: 50%;
51
+ transform: translateX(-50%);
52
+ width: 100px;
53
+ height: 4px;
54
+ background: #333;
55
+ border-radius: 2px;
56
+ }
57
+
58
+ /* جلوگیری از اسکرول بیرون از کادر */
59
+ html, body {
60
+ background: #f0f0f0 !important;
61
+ overflow: hidden !important;
62
  }
63
  }
64
 
65
+ /* ======== تنظیمات محتوا در کادر موبایل ======== */
66
+ @media (min-width: 768px) {
67
+ .stApp > div {
68
+ max-height: calc(90vh - 40px) !important;
69
+ overflow-y: auto !important;
70
+ scrollbar-width: none !important; /* برای فایرفاکس */
71
+ }
72
+
73
+ .stApp > div::-webkit-scrollbar {
74
+ display: none !important; /* برای کروم و سافاری */
75
+ }
76
  /* تنظیمات کلی استایل‌ها */
77
  @font-face {
78
  font-family: 'B Nazanin';