Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,38 @@ SHEET_NAME = "Condition1"
|
|
| 18 |
|
| 19 |
# ========== استایلهای سفارشی یکپارچه ==========
|
| 20 |
st.markdown("""
|
| 21 |
-
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
/* تنظیمات برای موبایل و نمایش موبایل در تمام دستگاهها */
|
| 23 |
html, body, .stApp {
|
| 24 |
max-width: 768px !important; /* حداکثر عرض صفحه */
|
|
@@ -27,8 +58,16 @@ html, body, .stApp {
|
|
| 27 |
}
|
| 28 |
|
| 29 |
|
| 30 |
-
/* ======== کادر
|
| 31 |
@media (min-width: 768px) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
[data-testid="stAppViewContainer"] {
|
| 33 |
max-width: 768px !important; /* عرض موبایل */
|
| 34 |
margin: 0 auto !important;
|
|
@@ -54,45 +93,18 @@ html, body, .stApp {
|
|
| 54 |
border-radius: 2px;
|
| 55 |
}
|
| 56 |
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
overflow:
|
| 61 |
-
}
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
/* ======== تنظیمات محتوا در کادر موبایل ======== */
|
| 65 |
-
@media (min-width: 768px) {
|
| 66 |
-
.stApp > div {
|
| 67 |
-
max-height: calc(90vh - 40px) !important;
|
| 68 |
-
overflow-y: auto !important;
|
| 69 |
-
scrollbar-width: none !important; /* برای فایرفاکس */
|
| 70 |
-
}
|
| 71 |
-
|
| 72 |
-
.stApp > div::-webkit-scrollbar {
|
| 73 |
-
display: none !important; /* برای کروم و سافاری */
|
| 74 |
}
|
| 75 |
-
/* تنظیمات کلی استایلها */
|
| 76 |
-
@font-face {
|
| 77 |
-
font-family: 'B Nazanin';
|
| 78 |
-
src: url('https://cdn.jsdelivr.net/gh/rastikerdar/fonts@master/fonts/B%20Nazanin/B%20Nazanin.woff') format('woff');
|
| 79 |
}
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
-
|
| 84 |
-
--
|
| 85 |
-
|
| 86 |
-
--input-bg: #ffffff;
|
| 87 |
-
--secondary-bg: #f8f9fa;
|
| 88 |
-
--green: #f0ff0;
|
| 89 |
-
--dgreen: #006400;
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
* {
|
| 93 |
-
font-family: 'B Nazanin', 'B Nazanin Bold', sans-serif !important;
|
| 94 |
-
text-align: right !important;
|
| 95 |
-
direction: rtl !important;
|
| 96 |
}
|
| 97 |
|
| 98 |
/* تنظیمات اصلی */
|
|
|
|
| 18 |
|
| 19 |
# ========== استایلهای سفارشی یکپارچه ==========
|
| 20 |
st.markdown("""
|
| 21 |
+
<style>
|
| 22 |
+
/* تنظیمات کلی استایلها */
|
| 23 |
+
@font-face {
|
| 24 |
+
font-family: 'B Nazanin';
|
| 25 |
+
src: url('https://cdn.jsdelivr.net/gh/rastikerdar/fonts@master/fonts/B%20Nazanin/B%20Nazanin.woff') format('woff');
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
:root {
|
| 29 |
+
--primary: #6a0dad;
|
| 30 |
+
--text: #333333;
|
| 31 |
+
--background: #ffffff;
|
| 32 |
+
--border: #dddddd;
|
| 33 |
+
--input-bg: #ffffff;
|
| 34 |
+
--secondary-bg: #f8f9fa;
|
| 35 |
+
--green: #f0ff0;
|
| 36 |
+
--dgreen: #006400;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
* {
|
| 40 |
+
font-family: 'B Nazanin', 'B Nazanin Bold', sans-serif !important;
|
| 41 |
+
text-align: right !important;
|
| 42 |
+
direction: rtl !important;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
/* ======== تنظیمات پایه ======== */
|
| 46 |
+
* {
|
| 47 |
+
font-family: 'B Nazanin', 'B Nazanin Bold', sans-serif !important;
|
| 48 |
+
text-align: right !important;
|
| 49 |
+
direction: rtl !important;
|
| 50 |
+
box-sizing: border-box !important;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
/* تنظیمات برای موبایل و نمایش موبایل در تمام دستگاهها */
|
| 54 |
html, body, .stApp {
|
| 55 |
max-width: 768px !important; /* حداکثر عرض صفحه */
|
|
|
|
| 58 |
}
|
| 59 |
|
| 60 |
|
| 61 |
+
/* ======== کادر موبایل برای دسکتاپ ======== */
|
| 62 |
@media (min-width: 768px) {
|
| 63 |
+
body {
|
| 64 |
+
background: #f0f0f0 !important;
|
| 65 |
+
display: flex !important;
|
| 66 |
+
justify-content: center !important;
|
| 67 |
+
align-items: center !important;
|
| 68 |
+
padding: 20px !important;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
[data-testid="stAppViewContainer"] {
|
| 72 |
max-width: 768px !important; /* عرض موبایل */
|
| 73 |
margin: 0 auto !important;
|
|
|
|
| 93 |
border-radius: 2px;
|
| 94 |
}
|
| 95 |
|
| 96 |
+
.stApp {
|
| 97 |
+
width: 100% !important;
|
| 98 |
+
height: 100% !important;
|
| 99 |
+
overflow: auto !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
+
/* ======== تنظیمات عمومی محتوا ======== */
|
| 104 |
+
[data-testid="stAppViewContainer"] {
|
| 105 |
+
background-color: var(--background) !important;
|
| 106 |
+
color: var(--text) !important;
|
| 107 |
+
padding: 10px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
|
| 110 |
/* تنظیمات اصلی */
|