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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +62 -17
app.py CHANGED
@@ -33,25 +33,10 @@ st.markdown("""
33
  --secondary-bg: #f8f9fa;
34
  --green: #f0ff0;
35
  --dgreen: #006400;
36
- --mobile-width: 414px;
37
  }
38
 
39
- /* ======== تنظیمات اجباری موبایل ======== */
40
- html, body {
41
- width: 100% !important;
42
- max-width: 100% !important;
43
- overflow-x: hidden !important;
44
- -webkit-text-size-adjust: 100%;
45
- }
46
-
47
- [data-testid="stAppViewContainer"] {
48
- max-width: var(--mobile-width) !important;
49
- margin: 0 auto !important;
50
- padding: 10px !important;
51
- box-shadow: 0 0 10px rgba(0,0,0,0.1);
52
- }
53
-
54
- /* ======== استایل‌های اصلی شما (بدون تغییر) ======== */
55
  * {
56
  font-family: 'B Nazanin', 'B Nazanin Bold', sans-serif !important;
57
  text-align: right !important;
@@ -61,8 +46,23 @@ st.markdown("""
61
  body, .stApp, [data-testid="stAppViewContainer"] {
62
  background-color: var(--background) !important;
63
  color: var(--text) !important;
 
 
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  .rahyar-title {
67
  color: var(--primary) !important;
68
  margin: 0 !important;
@@ -89,6 +89,51 @@ st.markdown("""
89
  border-right: 3px solid var(--primary) !important;
90
  }
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  /* ========== استایل‌های ورودی ========== */
93
  .stTextInput input,
94
  .stNumberInput input,
 
33
  --secondary-bg: #f8f9fa;
34
  --green: #f0ff0;
35
  --dgreen: #006400;
36
+ --mobile-width: 100%;
37
  }
38
 
39
+ /* ======== تنظیمات پایه ======== */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  * {
41
  font-family: 'B Nazanin', 'B Nazanin Bold', sans-serif !important;
42
  text-align: right !important;
 
46
  body, .stApp, [data-testid="stAppViewContainer"] {
47
  background-color: var(--background) !important;
48
  color: var(--text) !important;
49
+ max-width: var(--mobile-width) !important;
50
+ margin: 0 auto !important;
51
  }
52
 
53
+ /* ======== تنظیمات عرض برای دسکتاپ ======== */
54
+ @media (min-width: 768px) {
55
+ :root {
56
+ --mobile-width: 414px;
57
+ }
58
+
59
+ [data-testid="stAppViewContainer"] {
60
+ box-shadow: 0 0 20px rgba(0,0,0,0.1);
61
+ min-height: 100vh;
62
+ }
63
+ }
64
+
65
+ /* ======== استایل‌های اصلی شما ======== */
66
  .rahyar-title {
67
  color: var(--primary) !important;
68
  margin: 0 !important;
 
89
  border-right: 3px solid var(--primary) !important;
90
  }
91
 
92
+ /* ======== دکمه‌ها (تنظیم عرض مناسب) ======== */
93
+ .stButton>button,
94
+ [data-testid="baseButton-primary"],
95
+ .accept-btn,
96
+ div[data-testid="stVerticalBlock"] > div[data-testid="stHorizontalBlock"] > div > div > button {
97
+ background-color: var(--primary) !important;
98
+ color: white !important;
99
+ border: none !important;
100
+ border-radius: 8px !important;
101
+ padding: 10px 20px !important;
102
+ font-weight: bold !important;
103
+ transition: all 0.3s ease !important;
104
+ width: auto !important;
105
+ min-width: 120px !important;
106
+ margin: 5px !important;
107
+ }
108
+
109
+ /* ======== عناصر فرم ======== */
110
+ .stTextInput input,
111
+ .stNumberInput input,
112
+ .stSelectbox select {
113
+ width: 100% !important;
114
+ max-width: 100% !important;
115
+ }
116
+
117
+ /* ======== نقشه ======== */
118
+ .folium-map {
119
+ width: 100% !important;
120
+ height: 300px !important;
121
+ }
122
+
123
+ /* ======== جلوگیری از اسکرول افقی ======== */
124
+ html, body {
125
+ overflow-x: hidden !important;
126
+ width: 100% !important;
127
+ }
128
+
129
+ /* ======== تنظیمات موبایل ======== */
130
+ @media (max-width: 767px) {
131
+ .stButton>button {
132
+ width: 100% !important;
133
+ margin: 5px 0 !important;
134
+ }
135
+ }
136
+
137
  /* ========== استایل‌های ورودی ========== */
138
  .stTextInput input,
139
  .stNumberInput input,