This commit is contained in:
cjw
2026-02-17 00:42:55 +08:00
parent 34afd80298
commit 06225e0d65
7 changed files with 423 additions and 1005 deletions
+222 -69
View File
@@ -1,102 +1,255 @@
/* static/style.css */
/**
* STP模具几何分析中心 - 统一设计系统
* 优化版本:现代化UI设计,响应式布局
*/
/* 设计系统变量 */
:root {
/* 颜色系统 */
--primary-color: #2563eb;
--primary-hover: #1d4ed8;
--secondary-color: #64748b;
--success-color: #10b981;
--warning-color: #f59e0b;
--error-color: #ef4444;
--info-color: #3b82f6;
/* 中性色 */
--gray-50: #f8fafc;
--gray-100: #f1f5f9;
--gray-200: #e2e8f0;
--gray-300: #cbd5e1;
--gray-400: #94a3b8;
--gray-500: #64748b;
--gray-600: #475569;
--gray-700: #334155;
--gray-800: #1e293b;
--gray-900: #0f172a;
/* 间距系统 */
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2rem;
--space-2xl: 3rem;
/* 字体系统 */
--font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
--font-size-xs: 0.75rem;
--font-size-sm: 0.875rem;
--font-size-base: 1rem;
--font-size-lg: 1.125rem;
--font-size-xl: 1.25rem;
--font-size-2xl: 1.5rem;
--font-size-3xl: 1.875rem;
/* 阴影系统 */
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
/* 圆角系统 */
--radius-sm: 0.375rem;
--radius-md: 0.5rem;
--radius-lg: 0.75rem;
--radius-xl: 1rem;
--radius-full: 9999px;
}
/* 基础重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #1f2933 0%, #111827 100%);
min-height: 100vh;
padding: 16px;
color: #111827;
font-family: var(--font-family);
background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
min-height: 100vh;
padding: var(--space-md);
color: var(--gray-800);
line-height: 1.6;
}
/* 旧版容器保留,兼容可能的使用 */
.container {
max-width: 1200px;
margin: 0 auto;
background: white;
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
overflow: hidden;
/* 应用外壳 */
.app-shell {
max-width: 1400px;
margin: 0 auto;
min-height: calc(100vh - 2 * var(--space-md));
display: flex;
flex-direction: column;
}
.header {
background: linear-gradient(135deg, #2c3e50, #34495e);
color: white;
padding: 30px;
text-align: center;
/* 通知系统 */
.notification-container {
position: fixed;
top: var(--space-md);
right: var(--space-md);
z-index: 1000;
max-width: 400px;
}
.header h1 {
font-size: 2.5em;
margin-bottom: 10px;
.notification {
background: white;
border-radius: var(--radius-md);
padding: var(--space-md);
margin-bottom: var(--space-sm);
box-shadow: var(--shadow-lg);
border-left: 4px solid var(--info-color);
animation: slideIn 0.3s ease-out;
display: flex;
align-items: center;
justify-content: space-between;
}
.header p {
opacity: 0.9;
font-size: 1.1em;
.notification-success {
border-left-color: var(--success-color);
}
.upload-section {
padding: 40px;
text-align: center;
.notification-error {
border-left-color: var(--error-color);
}
.upload-area {
border: 3px dashed #3498db;
border-radius: 10px;
padding: 60px 40px;
margin: 20px 0;
background: #f8f9fa;
transition: all 0.3s ease;
cursor: pointer;
.notification-warning {
border-left-color: var(--warning-color);
}
.upload-area:hover {
border-color: #2980b9;
background: #e8f4fc;
.notification-message {
flex: 1;
color: var(--gray-700);
}
.upload-area.dragover {
border-color: #27ae60;
background: #d5f4e6;
.notification-close {
background: none;
border: none;
font-size: var(--font-size-lg);
color: var(--gray-400);
cursor: pointer;
padding: var(--space-xs);
margin-left: var(--space-sm);
border-radius: var(--radius-sm);
transition: all 0.2s;
}
.upload-icon {
font-size: 4em;
color: #3498db;
margin-bottom: 20px;
.notification-close:hover {
background: var(--gray-100);
color: var(--gray-600);
}
.file-input {
display: none;
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
.upload-btn {
background: linear-gradient(135deg, #3498db, #2980b9);
color: white;
border: none;
padding: 15px 40px;
font-size: 1.1em;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease;
margin: 10px;
/* 应用头部 */
.app-header {
background: white;
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
padding: var(--space-2xl);
box-shadow: var(--shadow-md);
margin-bottom: var(--space-lg);
}
.upload-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
.app-title {
display: flex;
align-items: center;
gap: var(--space-lg);
margin-bottom: var(--space-lg);
}
.upload-btn:disabled {
background: #bdc3c7;
cursor: not-allowed;
transform: none;
box-shadow: none;
.logo {
font-size: var(--font-size-3xl);
background: linear-gradient(135deg, var(--primary-color), var(--info-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.app-title h1 {
font-size: var(--font-size-3xl);
color: var(--gray-900);
margin-bottom: var(--space-xs);
}
.app-subtitle {
color: var(--gray-600);
font-size: var(--font-size-base);
}
.app-nav {
display: flex;
gap: var(--space-md);
border-top: 1px solid var(--gray-200);
padding-top: var(--space-lg);
}
.nav-link {
padding: var(--space-sm) var(--space-md);
text-decoration: none;
color: var(--gray-600);
border-radius: var(--radius-md);
transition: all 0.2s;
font-weight: 500;
}
.nav-link:hover {
color: var(--primary-color);
background: var(--gray-50);
}
.nav-link.active {
color: var(--primary-color);
background: var(--gray-50);
box-shadow: var(--shadow-sm);
}
/* 主要内容区域 */
.app-main {
flex: 1;
background: white;
border-radius: 0 0 var(--radius-xl) var(--radius-xl);
padding: var(--space-2xl);
box-shadow: var(--shadow-md);
}
/* 应用底部 */
.app-footer {
background: var(--gray-800);
color: white;
padding: var(--space-lg);
border-radius: var(--radius-md);
margin-top: var(--space-lg);
display: flex;
justify-content: space-between;
align-items: center;
font-size: var(--font-size-sm);
}
.footer-left, .footer-right {
display: flex;
align-items: center;
gap: var(--space-md);
}
.status-success {
color: var(--success-color);
}
.status-error {
color: var(--error-color);
}
.results-section {