ichieh commited on
Commit
495de8c
·
1 Parent(s): 7672900

feat: 添加響應式設計支援

Browse files

1. 優化手機版佈局:
- 註冊表單移到最上方
- 桌位資訊改為垂直排列

2. 觸控優化:
- 增加點擊區域的大小
- 優化按鈕和表單元素的間距

3. 螢幕適配:
- 支援不同尺寸的手機螢幕
- 針對小螢幕做了特別優化

Files changed (1) hide show
  1. static/css/style.css +78 -1
static/css/style.css CHANGED
@@ -10,6 +10,7 @@
10
  display: flex;
11
  flex-wrap: wrap;
12
  gap: 20px;
 
13
  }
14
 
15
  .registration-section {
@@ -25,7 +26,7 @@
25
  }
26
 
27
  .table-circle {
28
- min-width: 200px;
29
  height: auto;
30
  border-radius: 8px;
31
  border: 2px solid #ddd;
@@ -59,6 +60,8 @@
59
  margin-bottom: 10px;
60
  padding-bottom: 10px;
61
  border-bottom: 1px solid #eee;
 
 
62
  }
63
 
64
  .table-name {
@@ -110,3 +113,77 @@
110
  margin: 15px;
111
  text-align: center;
112
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  display: flex;
11
  flex-wrap: wrap;
12
  gap: 20px;
13
+ justify-content: center;
14
  }
15
 
16
  .registration-section {
 
26
  }
27
 
28
  .table-circle {
29
+ width: 280px;
30
  height: auto;
31
  border-radius: 8px;
32
  border: 2px solid #ddd;
 
60
  margin-bottom: 10px;
61
  padding-bottom: 10px;
62
  border-bottom: 1px solid #eee;
63
+ flex-wrap: wrap;
64
+ gap: 10px;
65
  }
66
 
67
  .table-name {
 
113
  margin: 15px;
114
  text-align: center;
115
  }
116
+
117
+ /* 響應式設計 */
118
+ @media (max-width: 768px) {
119
+ .main-container {
120
+ flex-direction: column;
121
+ padding: 10px;
122
+ }
123
+
124
+ .registration-section {
125
+ position: static;
126
+ max-width: none;
127
+ min-width: auto;
128
+ order: -1; /* 在手機版中將註冊表單放在最上方 */
129
+ margin-bottom: 20px;
130
+ }
131
+
132
+ .tables-section {
133
+ flex: none;
134
+ width: 100%;
135
+ }
136
+
137
+ .table-circle {
138
+ width: 100%;
139
+ max-width: none;
140
+ margin: 10px 0;
141
+ }
142
+
143
+ .table-header {
144
+ flex-direction: column;
145
+ align-items: flex-start;
146
+ }
147
+
148
+ .select-seat-btn {
149
+ width: 100%;
150
+ margin-top: 10px;
151
+ }
152
+
153
+ h1 {
154
+ font-size: 1.5rem !important;
155
+ margin: 15px 0 !important;
156
+ }
157
+
158
+ .participant-item {
159
+ padding: 12px 8px; /* 增加點擊區域 */
160
+ }
161
+ }
162
+
163
+ /* 針對更小的手機螢幕 */
164
+ @media (max-width: 480px) {
165
+ .main-container {
166
+ padding: 5px;
167
+ }
168
+
169
+ .table-circle {
170
+ padding: 10px;
171
+ margin: 5px 0;
172
+ }
173
+
174
+ .registration-section {
175
+ padding: 15px;
176
+ }
177
+ }
178
+
179
+ /* 確保表單輸入在手機上更容易 */
180
+ @media (max-width: 768px) {
181
+ input, textarea, select, button {
182
+ font-size: 16px !important; /* 防止 iOS 自動縮放 */
183
+ padding: 8px !important;
184
+ }
185
+
186
+ .form-control {
187
+ margin-bottom: 15px;
188
+ }
189
+ }