GSMEthesis commited on
Commit
038539e
·
verified ·
1 Parent(s): b454646

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +48 -0
app.py CHANGED
@@ -62,6 +62,54 @@ st.markdown("""
62
  }
63
  }
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  /* ======== استایل‌های اصلی شما ======== */
66
  .rahyar-title {
67
  color: var(--primary) !important;
 
62
  }
63
  }
64
 
65
+ /* ======== کادر شبیه موبایل برای دسکتاپ ======== */
66
+ @media (min-width: 768px) {
67
+ [data-testid="stAppViewContainer"] {
68
+ max-width: 375px !important; /* عرض موبایل */
69
+ margin: 30px auto !important;
70
+ padding: 20px !important;
71
+ border: 12px solid #333 !important;
72
+ border-radius: 40px !important;
73
+ box-shadow: 0 0 0 6px #666,
74
+ 0 0 30px rgba(0,0,0,0.5) !important;
75
+ position: relative !important;
76
+ min-height: 90vh !important;
77
+ overflow: hidden !important;
78
+ }
79
+
80
+ /* دکمه هوم مجازی */
81
+ [data-testid="stAppViewContainer"]::after {
82
+ content: "";
83
+ position: absolute;
84
+ bottom: 15px;
85
+ left: 50%;
86
+ transform: translateX(-50%);
87
+ width: 100px;
88
+ height: 4px;
89
+ background: #333;
90
+ border-radius: 2px;
91
+ }
92
+
93
+ /* جلوگیری از اسکرول بیرون از کادر */
94
+ html, body {
95
+ background: #f0f0f0 !important;
96
+ overflow: hidden !important;
97
+ }
98
+ }
99
+
100
+ /* ======== تنظیمات محتوا در کادر موبایل ======== */
101
+ @media (min-width: 768px) {
102
+ .stApp > div {
103
+ max-height: calc(90vh - 40px) !important;
104
+ overflow-y: auto !important;
105
+ scrollbar-width: none !important; /* برای فایرفاکس */
106
+ }
107
+
108
+ .stApp > div::-webkit-scrollbar {
109
+ display: none !important; /* برای کروم و سافاری */
110
+ }
111
+ }
112
+
113
  /* ======== استایل‌های اصلی شما ======== */
114
  .rahyar-title {
115
  color: var(--primary) !important;