File size: 6,387 Bytes
dfb1341 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
:root {
/* 主色调 */
--primary-color: #dceaf6;
--primary-light: #f8f9fa;
--primary-dark: #9ec9e3;
/* 辅助色调 */
--accent-color: #bfe2f8;
--accent-light: #dceaf6;
/* 背景色 */
--bg-color: #e8eff5;
--card-bg: #ffffff;
/* 文本色 */
--dark-text: #2b2d42;
--light-text: #f8f9fa;
--muted-text: rgba(43, 45, 66, 0.7);
/* 边框和阴影 */
--border-color: rgba(168, 168, 168, 0.432);
--card-shadow: 0 4px 20px rgba(104, 104, 104, 0.1);
/* 交互状态 */
--hover-bg: rgba(255, 255, 255, 0.5);
--active-color: #bfe2f8;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--bg-color);
}
/* 卡片样式 */
.gradio-container {
max-width: 95% !important;
width: 95% !important;
margin-left: auto !important;
margin-right: auto !important;
}
/* 面板样式 */
.panel {
border-radius: 12px !important;
border: 1px solid var(--border-color) !important;
box-shadow: var(--card-shadow) !important;
background-color: var(--card-bg) !important;
padding: 1.5rem !important;
}
/* 按钮样式 */
button.primary {
border-radius: 8px !important;
}
button {
border-radius: 8px !important;
border: 1px solid var(--border-color) !important;
background-color: var(--hover-bg) !important;
color: var(--dark-text) !important;
transition: all 0.3s ease !important;
}
button:hover {
transform: translateY(-2px) !important;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
background-color: var(--hover-bg) !important;
}
/* 文件上传区域 */
.file-preview {
border-radius: 8px !important;
border: 1px dashed var(--border-color) !important;
}
.file-preview:hover {
border-color: var(--primary-dark) !important;
}
/* 确保所有链接按钮样式正确 */
.header-buttons a,
.header-buttons a:hover,
.header-buttons a:visited,
.header-buttons a:active {
text-decoration: none !important;
color: var(--dark-text) !important;
}
/* 覆盖任何可能的内联样式 */
.header-buttons a[style] {
text-decoration: none !important;
color: var(--dark-text) !important;
}
/* 确保链接内的所有元素都没有下划线 */
.header-buttons a *,
.header-buttons a:hover * {
text-decoration: none !important;
}
/* 隐藏页面底部信息 */
footer, .footer, .footer-links, .gradio-footer {
display: none !important;
}
/* 隐藏底部工具栏 */
.gradio-container > div:last-child {
display: none !important;
}
/* 隐藏底部API按钮和设置按钮 */
.fixed-bottom {
display: none !important;
}
/* 隐藏Gradio品牌信息 */
.gr-prose p:last-child {
display: none !important;
}
/* 隐藏底部的所有可能元素 */
[class*="footer"], [id*="footer"], [class*="bottom-bar"], [id*="bottom-bar"] {
display: none !important;
}
/* 侧边栏样式 */
.sidebar {
background-color: var(--card-bg);
border-radius: 12px;
border: 1px solid var(--border-color);
box-shadow: var(--card-shadow);
padding: 1rem;
margin-right: 1rem;
}
/* 上传按钮样式 */
.upload-button {
display: flex;
align-items: center;
justify-content: center;
border: 2px dashed var(--border-color);
padding: 1rem;
margin-bottom: 1rem;
cursor: pointer;
transition: all 0.3s ease;
}
.upload-button:hover {
border-color: var(--primary-dark);
background-color: rgba(158, 201, 227, 0.1);
}
.upload-button i {
font-size: 1.5rem;
color: var(--primary-dark);
margin-right: 0.5rem;
}
/* 示例文件列表样式 */
.example-list {
list-style-type: none;
padding: 0;
margin: 0;
}
.example-item {
display: flex;
align-items: center;
padding: 0.5rem;
border-radius: 8px;
margin-bottom: 0.5rem;
cursor: pointer;
transition: all 0.3s ease;
}
.example-item:hover {
background-color: rgba(158, 201, 227, 0.1);
}
.example-item i {
font-size: 1.2rem;
color: var(--primary-dark);
margin-right: 0.5rem;
}
.example-item-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 取消和确认按钮样式 */
.action-buttons {
display: flex;
justify-content: flex-end;
}
/* 取消按钮样式 */
button[value="清空/Clear"] {
color: #e74c3c !important;
}
/* 隐藏原始文件上传组件 */
.file-upload {
display: none !important;
}
/* 主体内容样式 */
.main-content {
display: flex;
flex: 1;
}
/* 预览框样式 */
.preview-panel {
flex: 1;
background-color: var(--card-bg);
border-radius: 12px;
border: 1px solid var(--border-color);
box-shadow: var(--card-shadow);
padding: 1rem;
margin-right: 1rem;
}
/* 输出框样式 */
.output-panel {
flex: 1;
background-color: var(--card-bg);
border-radius: 12px;
border: 1px solid var(--border-color);
box-shadow: var(--card-shadow);
padding: 1rem;
}
/* 响应式布局 */
@media (max-width: 768px) {
.main-content {
flex-direction: column;
}
.sidebar, .preview-panel, .output-panel {
margin-right: 0;
margin-bottom: 1rem;
width: 100%;
}
}
/* 美化文件上传组件 */
#file-upload {
margin-bottom: 1.5rem;
}
#file-upload .file-preview {
border: 2px dashed var(--border-color);
padding: 1.5rem;
transition: all 0.3s ease;
text-align: center;
}
#file-upload .file-preview:hover {
border-color: var(--primary-dark);
background-color: rgba(158, 201, 227, 0.1);
}
/* 隐藏原始标签 */
#file-upload .label-wrap {
display: none;
}
/* 美化示例文件列表 */
#example-files .gr-samples-table {
border: none;
background: transparent;
}
#example-files .gr-samples-table td {
border: none;
padding: 0.5rem;
transition: all 0.3s ease;
border-radius: 8px;
}
#example-files .gr-samples-table tr:hover td {
background-color: rgba(158, 201, 227, 0.1);
}
#example-files .gr-samples-table td a {
display: flex;
align-items: center;
color: var(--dark-text);
text-decoration: none;
}
#example-files .gr-samples-table td a::before {
content: "\f1c1";
font-family: "Font Awesome 6 Free";
font-weight: 900;
margin-right: 0.5rem;
color: var(--primary-dark);
font-size: 1.2rem;
}
/* 隐藏分页控件 */
#example-files .gr-samples-pagination {
display: none;
} |