GSMEthesis commited on
Commit
d8a3dec
·
verified ·
1 Parent(s): 5cf4ae5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +39 -24
app.py CHANGED
@@ -58,57 +58,83 @@ html, body, .stApp {
58
  }
59
 
60
  @media (min-width: 768px) {
 
 
 
 
 
 
 
 
 
 
61
  body {
62
- background: #f0f0f0 !important;
63
  display: flex !important;
64
  justify-content: center !important;
65
  align-items: center !important;
66
- height: 100vh !important;
67
- overflow: hidden !important;
68
  }
69
 
 
70
  [data-testid="stAppViewContainer"] {
71
  width: 475px !important;
72
  height: 667px !important;
73
  margin: 0 auto !important;
74
  border: 12px solid #000 !important;
75
  border-radius: 40px !important;
76
- box-shadow: 0 0 0 6px #666, 0 0 30px rgba(0,0,0,0.5) !important;
 
 
77
  background-color: var(--background) !important;
78
  color: var(--text) !important;
79
  overflow-y: auto !important;
80
  overflow-x: hidden !important;
81
  scrollbar-width: thin !important;
82
  scrollbar-color: #6a0dad #f0f0f0 !important;
83
- direction: rtl !important; /* این خط اضافه شده */
 
84
  }
85
-
86
- /* استایل اسکرولبار برای مرورگرهای وبکیت */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  [data-testid="stAppViewContainer"]::-webkit-scrollbar {
88
  width: 6px !important;
89
- right: 0 !important; /* این خط اضافه شده */
90
- left: auto !important; /* این خط اضافه شده */
91
  }
92
 
93
  [data-testid="stAppViewContainer"]::-webkit-scrollbar-track {
94
  background: #f0f0f0 !important;
95
  border-radius: 3px !important;
96
- margin: 10px 0 !important; /* این خط اضافه شده */
97
  }
98
 
99
  [data-testid="stAppViewContainer"]::-webkit-scrollbar-thumb {
100
  background-color: #6a0dad !important;
101
  border-radius: 3px !important;
102
- margin-left: 10px !important; /* این خط اضافه شده */
103
  }
104
 
105
- /* تنظیم مجدد جهت برای محتوای داخلی */
106
  [data-testid="stAppViewContainer"] > * {
107
  direction: ltr !important;
108
  text-align: right !important;
109
  }
110
 
111
- /* دکمه هوم مجازی */
112
  [data-testid="stAppViewContainer"]::after {
113
  content: "";
114
  position: absolute;
@@ -120,17 +146,6 @@ html, body, .stApp {
120
  background: #333;
121
  border-radius: 2px;
122
  }
123
-
124
- .stApp {
125
- width: 100% !important;
126
- height: 100% !important;
127
- overflow: auto !important;
128
- }
129
-
130
- [class^="st-"], [class*=" st-"] {
131
- padding-left: 5 !important;
132
- padding-right: 5 !important;
133
- }
134
  }
135
 
136
  /* هدر راهیار */
 
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:
86
+ 0 0 0 6px #666,
87
+ 0 0 30px rgba(0,0,0,0.5) !important;
88
  background-color: var(--background) !important;
89
  color: var(--text) !important;
90
  overflow-y: auto !important;
91
  overflow-x: hidden !important;
92
  scrollbar-width: thin !important;
93
  scrollbar-color: #6a0dad #f0f0f0 !important;
94
+ direction: rtl !important;
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;
116
+ left: auto !important;
117
  }
118
 
119
  [data-testid="stAppViewContainer"]::-webkit-scrollbar-track {
120
  background: #f0f0f0 !important;
121
  border-radius: 3px !important;
122
+ margin: 10px 0 !important;
123
  }
124
 
125
  [data-testid="stAppViewContainer"]::-webkit-scrollbar-thumb {
126
  background-color: #6a0dad !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
  /* هدر راهیار */