GSMEthesis commited on
Commit
413bc8b
·
verified ·
1 Parent(s): d22c3e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -23
app.py CHANGED
@@ -58,29 +58,28 @@ html, body, .stApp {
58
  }
59
 
60
  @media (min-width: 768px) {
61
- /* Reset and base styles */
62
  html, body {
63
  margin: 0 !important;
64
  padding: 0 !important;
65
- background: #f0f0f0 !important;
66
  height: 100vh !important;
67
- width: 100vw !important;
68
  overflow: hidden !important;
69
  }
70
-
71
- /* Main container to center the mobile frame */
72
  body {
73
  display: flex !important;
74
  justify-content: center !important;
75
  align-items: center !important;
76
- padding: 20px !important; /* فضای اطراف کادر موبایل */
77
  }
78
-
79
- /* Mobile frame styling - now perfectly centered */
80
  [data-testid="stAppViewContainer"] {
81
  width: 475px !important;
82
  height: 667px !important;
83
- margin: 0 !important; /* حذف margin اتوماتیک */
84
  border: 12px solid #000 !important;
85
  border-radius: 40px !important;
86
  box-shadow:
@@ -96,12 +95,21 @@ html, body, .stApp {
96
  position: relative !important;
97
  }
98
 
99
- /* پدینگ برای محتوای داخل کادر موبایل */
 
 
 
 
 
 
 
100
  [data-testid="stAppViewContainer"] > div {
101
- padding: 0 5px !important; /* 5px padding راست و چپ */
 
 
102
  }
103
 
104
- /* تنظیمات اسکرولبار */
105
  [data-testid="stAppViewContainer"]::-webkit-scrollbar {
106
  width: 6px !important;
107
  right: 0 !important;
@@ -119,8 +127,14 @@ html, body, .stApp {
119
  border-radius: 3px !important;
120
  margin-left: 10px !important;
121
  }
122
-
123
- /* دکمه هوم مجازی */
 
 
 
 
 
 
124
  [data-testid="stAppViewContainer"]::after {
125
  content: "";
126
  position: absolute;
@@ -132,15 +146,6 @@ html, body, .stApp {
132
  background: #333;
133
  border-radius: 2px;
134
  }
135
-
136
- /* اطمینان از نمایش صحیح محتوا */
137
- [data-testid="block-container"] {
138
- padding: 0 5px !important;
139
- }
140
-
141
- .stApp > div {
142
- padding: 0 5px !important;
143
- }
144
  }
145
 
146
  /* هدر راهیار */
 
58
  }
59
 
60
  @media (min-width: 768px) {
61
+ /* Reset default margins and padding */
62
  html, body {
63
  margin: 0 !important;
64
  padding: 0 !important;
65
+ background: #f0f0f0 !important; /* رنگ پس‌زمینه خاکستری روشن */
66
  height: 100vh !important;
 
67
  overflow: hidden !important;
68
  }
69
+
70
+ /* Container for the mobile frame */
71
  body {
72
  display: flex !important;
73
  justify-content: center !important;
74
  align-items: center !important;
75
+ background: #f0f0f0 !important; /* مطمئن شوید این رنگ با رنگ پس‌زمینه کادر موبایل متفاوت نیست */
76
  }
77
+
78
+ /* Mobile frame styling */
79
  [data-testid="stAppViewContainer"] {
80
  width: 475px !important;
81
  height: 667px !important;
82
+ margin: 0 auto !important;
83
  border: 12px solid #000 !important;
84
  border-radius: 40px !important;
85
  box-shadow:
 
95
  position: relative !important;
96
  }
97
 
98
+ /* Remove any potential dark background from parent elements */
99
+ #root, .stApp {
100
+ background: transparent !important;
101
+ padding: 0 !important;
102
+ margin: 0 !important;
103
+ }
104
+
105
+ /* Ensure Streamlit's main container doesn't add extra space */
106
  [data-testid="stAppViewContainer"] > div {
107
+ max-width: 100% !important;
108
+ padding: 0 !important;
109
+ margin: 0 !important;
110
  }
111
 
112
+ /* Webkit scrollbar styles */
113
  [data-testid="stAppViewContainer"]::-webkit-scrollbar {
114
  width: 6px !important;
115
  right: 0 !important;
 
127
  border-radius: 3px !important;
128
  margin-left: 10px !important;
129
  }
130
+
131
+ /* Reset direction for content */
132
+ [data-testid="stAppViewContainer"] > * {
133
+ direction: ltr !important;
134
+ text-align: right !important;
135
+ }
136
+
137
+ /* Virtual home button */
138
  [data-testid="stAppViewContainer"]::after {
139
  content: "";
140
  position: absolute;
 
146
  background: #333;
147
  border-radius: 2px;
148
  }
 
 
 
 
 
 
 
 
 
149
  }
150
 
151
  /* هدر راهیار */