Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,57 +58,62 @@ html, body, .stApp {
|
|
| 58 |
}
|
| 59 |
|
| 60 |
@media (min-width: 768px) {
|
| 61 |
-
/* Reset
|
| 62 |
html, body {
|
| 63 |
margin: 0 !important;
|
| 64 |
padding: 0 !important;
|
| 65 |
-
background: #f0f0f0 !important;
|
| 66 |
-
height:
|
| 67 |
-
width: 100% !important;
|
| 68 |
overflow: hidden !important;
|
| 69 |
}
|
| 70 |
-
|
| 71 |
-
/*
|
| 72 |
body {
|
| 73 |
display: flex !important;
|
| 74 |
justify-content: center !important;
|
| 75 |
align-items: center !important;
|
| 76 |
-
|
| 77 |
}
|
| 78 |
-
|
| 79 |
-
/*
|
| 80 |
[data-testid="stAppViewContainer"] {
|
| 81 |
width: 475px !important;
|
| 82 |
height: 667px !important;
|
| 83 |
-
margin: 0 !important;
|
| 84 |
border: 12px solid #000 !important;
|
| 85 |
border-radius: 40px !important;
|
| 86 |
-
box-shadow:
|
|
|
|
|
|
|
| 87 |
background-color: var(--background) !important;
|
|
|
|
| 88 |
overflow-y: auto !important;
|
| 89 |
overflow-x: hidden !important;
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
/* جهتدهی محتوا */
|
| 93 |
direction: rtl !important;
|
|
|
|
| 94 |
}
|
| 95 |
|
| 96 |
-
/*
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
padding: 0 5px !important;
|
| 101 |
margin: 0 !important;
|
| 102 |
}
|
| 103 |
|
| 104 |
-
/*
|
| 105 |
-
[data-testid="stAppViewContainer"] {
|
| 106 |
-
|
| 107 |
-
|
|
|
|
| 108 |
}
|
| 109 |
-
|
|
|
|
| 110 |
[data-testid="stAppViewContainer"]::-webkit-scrollbar {
|
| 111 |
width: 6px !important;
|
|
|
|
|
|
|
| 112 |
}
|
| 113 |
|
| 114 |
[data-testid="stAppViewContainer"]::-webkit-scrollbar-track {
|
|
@@ -120,9 +125,16 @@ html, body, .stApp {
|
|
| 120 |
[data-testid="stAppViewContainer"]::-webkit-scrollbar-thumb {
|
| 121 |
background-color: #6a0dad !important;
|
| 122 |
border-radius: 3px !important;
|
|
|
|
| 123 |
}
|
| 124 |
-
|
| 125 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
[data-testid="stAppViewContainer"]::after {
|
| 127 |
content: "";
|
| 128 |
position: absolute;
|
|
@@ -134,12 +146,6 @@ html, body, .stApp {
|
|
| 134 |
background: #333;
|
| 135 |
border-radius: 2px;
|
| 136 |
}
|
| 137 |
-
|
| 138 |
-
/* بازنشانی جهت برای محتوای انگلیسی/اعداد */
|
| 139 |
-
[data-testid="stAppViewContainer"] > div > div {
|
| 140 |
-
direction: ltr !important;
|
| 141 |
-
text-align: right !important;
|
| 142 |
-
}
|
| 143 |
}
|
| 144 |
|
| 145 |
/* هدر راهیار */
|
|
|
|
| 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 {
|
|
|
|
| 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 |
/* هدر راهیار */
|