|
45 | 45 | .search-container {
|
46 | 46 | grid-template-columns: 1fr;
|
47 | 47 | }
|
| 48 | + |
| 49 | + /* 移动端主容器布局 */ |
| 50 | + .mobile-buttons-container { |
| 51 | + display: flex !important; |
| 52 | + flex-direction: column !important; |
| 53 | + gap: 1rem !important; |
| 54 | + align-items: stretch !important; |
| 55 | + width: 100% !important; |
| 56 | + padding: 0 !important; |
| 57 | + margin: 0 !important; |
| 58 | + } |
| 59 | + |
| 60 | + /* 移动端搜索控件布局优化 */ |
| 61 | + .mobile-search-controls { |
| 62 | + grid-template-columns: 1fr !important; |
| 63 | + gap: 0.75rem !important; |
| 64 | + width: 100% !important; |
| 65 | + margin-bottom: 0.5rem !important; |
| 66 | + } |
| 67 | + |
| 68 | + /* 按钮容器在移动端的布局 */ |
| 69 | + .buttons-container-responsive { |
| 70 | + display: flex !important; |
| 71 | + flex-direction: column !important; |
| 72 | + gap: 0.5rem !important; |
| 73 | + width: 100% !important; |
| 74 | + align-items: stretch !important; |
| 75 | + justify-content: stretch !important; |
| 76 | + } |
| 77 | + |
| 78 | + /* 移动端所有按钮样式 */ |
| 79 | + .buttons-container-responsive button { |
| 80 | + width: 100% !important; |
| 81 | + max-width: 100% !important; |
| 82 | + justify-content: center !important; |
| 83 | + text-align: center !important; |
| 84 | + min-width: 0 !important; |
| 85 | + flex-shrink: 0 !important; |
| 86 | + box-sizing: border-box !important; |
| 87 | + padding: 0.5rem 1rem !important; |
| 88 | + font-size: 0.875rem !important; |
| 89 | + white-space: nowrap !important; |
| 90 | + overflow: hidden !important; |
| 91 | + text-overflow: ellipsis !important; |
| 92 | + } |
| 93 | + } |
| 94 | + |
| 95 | + /* 中等屏幕优化 */ |
| 96 | + @media (max-width: 1024px) and (min-width: 769px) { |
| 97 | + .buttons-container-responsive { |
| 98 | + flex-wrap: wrap !important; |
| 99 | + justify-content: center !important; |
| 100 | + } |
| 101 | + |
| 102 | + .buttons-container-responsive button { |
| 103 | + flex-shrink: 1 !important; |
| 104 | + min-width: 0 !important; |
| 105 | + padding-left: 0.75rem !important; |
| 106 | + padding-right: 0.75rem !important; |
| 107 | + } |
| 108 | + } |
| 109 | + |
| 110 | + /* 小屏幕(手机)特殊优化 - 确保按钮在边框内 */ |
| 111 | + @media (max-width: 640px) { |
| 112 | + /* 强制重写主容器布局 */ |
| 113 | + .mobile-buttons-container { |
| 114 | + display: flex !important; |
| 115 | + flex-direction: column !important; |
| 116 | + width: 100% !important; |
| 117 | + padding: 0 !important; |
| 118 | + margin: 0 !important; |
| 119 | + gap: 1rem !important; |
| 120 | + overflow: visible !important; |
| 121 | + } |
| 122 | + |
| 123 | + /* 搜索区域在移动端占满宽度 */ |
| 124 | + .mobile-search-controls { |
| 125 | + width: 100% !important; |
| 126 | + box-sizing: border-box !important; |
| 127 | + } |
| 128 | + |
| 129 | + /* 按钮区域完全重新布局 */ |
| 130 | + .buttons-container-responsive { |
| 131 | + display: flex !important; |
| 132 | + flex-direction: column !important; |
| 133 | + width: 100% !important; |
| 134 | + max-width: 100% !important; |
| 135 | + gap: 0.5rem !important; |
| 136 | + padding: 0 !important; |
| 137 | + margin: 0 !important; |
| 138 | + box-sizing: border-box !important; |
| 139 | + overflow: visible !important; |
| 140 | + } |
| 141 | + |
| 142 | + /* 所有按钮统一样式 */ |
| 143 | + .buttons-container-responsive button { |
| 144 | + display: flex !important; |
| 145 | + align-items: center !important; |
| 146 | + justify-content: center !important; |
| 147 | + width: 100% !important; |
| 148 | + max-width: 100% !important; |
| 149 | + box-sizing: border-box !important; |
| 150 | + padding: 0.5rem 1rem !important; |
| 151 | + margin: 0 !important; |
| 152 | + font-size: 0.875rem !important; |
| 153 | + line-height: 1.25rem !important; |
| 154 | + border-radius: 0.5rem !important; |
| 155 | + white-space: nowrap !important; |
| 156 | + overflow: hidden !important; |
| 157 | + text-overflow: ellipsis !important; |
| 158 | + flex-shrink: 0 !important; |
| 159 | + } |
| 160 | + |
| 161 | + /* 特别针对清空全部按钮 */ |
| 162 | + #deleteAllLogsBtn { |
| 163 | + background-color: #f87171 !important; |
| 164 | + border: 1px solid #f87171 !important; |
| 165 | + } |
| 166 | + |
| 167 | + #deleteAllLogsBtn:hover { |
| 168 | + background-color: #ef4444 !important; |
| 169 | + border: 1px solid #ef4444 !important; |
| 170 | + } |
| 171 | + |
| 172 | + /* 确保容器不会溢出父级 */ |
| 173 | + .mobile-buttons-container, |
| 174 | + .mobile-buttons-container > *, |
| 175 | + .buttons-container-responsive, |
| 176 | + .buttons-container-responsive > * { |
| 177 | + max-width: 100% !important; |
| 178 | + box-sizing: border-box !important; |
| 179 | + } |
| 180 | + |
| 181 | + /* 额外的安全边距控制 */ |
| 182 | + .mobile-buttons-container .grid { |
| 183 | + padding-left: 0 !important; |
| 184 | + padding-right: 0 !important; |
| 185 | + margin-left: 0 !important; |
| 186 | + margin-right: 0 !important; |
| 187 | + } |
| 188 | + |
| 189 | + /* 确保主内容区域有适当的内边距 */ |
| 190 | + .rounded-xl.p-6 { |
| 191 | + padding-left: 1rem !important; |
| 192 | + padding-right: 1rem !important; |
| 193 | + } |
| 194 | + } |
| 195 | + |
| 196 | + /* 超小屏幕额外优化 */ |
| 197 | + @media (max-width: 480px) { |
| 198 | + .mobile-buttons-container { |
| 199 | + gap: 0.75rem !important; |
| 200 | + } |
| 201 | + |
| 202 | + .buttons-container-responsive { |
| 203 | + gap: 0.4rem !important; |
| 204 | + } |
| 205 | + |
| 206 | + .buttons-container-responsive button { |
| 207 | + padding: 0.4rem 0.8rem !important; |
| 208 | + font-size: 0.8rem !important; |
| 209 | + } |
| 210 | + |
| 211 | + /* 主容器内边距进一步缩小 */ |
| 212 | + .rounded-xl.p-6 { |
| 213 | + padding-left: 0.75rem !important; |
| 214 | + padding-right: 0.75rem !important; |
| 215 | + } |
| 216 | + |
| 217 | + /* 确保清空全部按钮文字不会太挤 */ |
| 218 | + #deleteAllLogsBtn i { |
| 219 | + margin-right: 0.25rem !important; |
| 220 | + } |
48 | 221 | }
|
49 | 222 |
|
50 | 223 | input[type="text"],
|
|
586 | 759 | class="text-3xl font-extrabold text-center text-gray-800 mb-4"
|
587 | 760 | >
|
588 | 761 | <img
|
589 |
| - src="/static/icons/logo.png" |
| 762 | + src="{{ static_url('icons/logo.png') }}" |
590 | 763 | alt="Gemini Balance Logo"
|
591 | 764 | class="h-9 inline-block align-middle mr-2"
|
592 | 765 | />
|
|
636 | 809 |
|
637 | 810 | <!-- 搜索与操作控件 -->
|
638 | 811 | <div
|
639 |
| - class="grid grid-cols-1 lg:grid-cols-[1fr_auto] items-center gap-4 mb-6" |
| 812 | + class="grid grid-cols-1 lg:grid-cols-[1fr_auto] items-center gap-4 mb-6 mobile-buttons-container" |
640 | 813 | >
|
641 | 814 | <div
|
642 |
| - class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 w-full" |
| 815 | + class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 w-full mobile-search-controls" |
643 | 816 | >
|
644 | 817 | <input
|
645 | 818 | type="text"
|
|
684 | 857 | </div>
|
685 | 858 | </div>
|
686 | 859 | </div>
|
687 |
| - <div class="flex items-center gap-3 flex-shrink-0"> |
| 860 | + <div class="flex items-center gap-3 flex-shrink-0 buttons-container-responsive"> |
688 | 861 | <button
|
689 | 862 | id="searchBtn"
|
690 | 863 | class="flex items-center justify-center px-4 py-1.5 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-all duration-200 shadow-sm hover:shadow-md whitespace-nowrap"
|
@@ -1041,7 +1214,7 @@ <h2 class="text-lg font-semibold text-gray-800">确认删除</h2>
|
1041 | 1214 | </div>
|
1042 | 1215 | </div>
|
1043 | 1216 | {% endblock %} {% block body_scripts %}
|
1044 |
| -<script src="/static/js/error_logs.js"></script> |
| 1217 | +<script src="{{ static_url('js/error_logs.js') }}"></script> |
1045 | 1218 | <script>
|
1046 | 1219 | // error_logs.html specific JS initialization (if any)
|
1047 | 1220 | // e.g., initialize date pickers or other elements if needed
|
|
0 commit comments