feat: complete web app features and fix encoding

This commit is contained in:
赵杰 Jie Zhao (雄狮汽车科技)
2025-11-02 22:23:10 +08:00
parent 8b5063a092
commit f65abdef0f
15 changed files with 1542 additions and 5 deletions

95
static/css/analysis.css Normal file
View File

@@ -0,0 +1,95 @@
.analysis-container {
max-width: 900px;
margin: 0 auto;
}
.section {
margin-bottom: 40px;
padding: 30px;
background: #f8f9fa;
border-radius: 15px;
}
.section h2 {
font-size: 1.8em;
margin-bottom: 25px;
color: #333;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #555;
}
.form-input, .form-textarea {
width: 100%;
padding: 12px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 1em;
font-family: inherit;
transition: border-color 0.3s;
}
.form-input:focus, .form-textarea:focus {
outline: none;
border-color: #667eea;
}
.form-textarea {
resize: vertical;
min-height: 120px;
}
.analysis-result {
background: white;
padding: 25px;
border-radius: 10px;
border-left: 4px solid #667eea;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.analysis-result h3 {
margin-top: 0;
color: #667eea;
}
.analysis-result .analysis-section {
margin: 20px 0;
padding: 15px;
background: #f8f9fa;
border-radius: 8px;
}
.analysis-result .analysis-section h4 {
color: #555;
margin-top: 0;
}
.message-area {
margin-top: 20px;
padding: 15px;
border-radius: 8px;
display: none;
}
.message-area.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
display: block;
}
.message-area.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
display: block;
}

View File

@@ -0,0 +1,77 @@
.data-collection-container {
max-width: 800px;
margin: 0 auto;
}
.section {
margin-bottom: 40px;
padding: 30px;
background: #f8f9fa;
border-radius: 15px;
}
.section h2 {
font-size: 1.8em;
margin-bottom: 25px;
color: #333;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #555;
}
.form-input, .form-textarea {
width: 100%;
padding: 12px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 1em;
font-family: inherit;
transition: border-color 0.3s;
}
.form-input:focus, .form-textarea:focus {
outline: none;
border-color: #667eea;
}
.form-textarea {
resize: vertical;
min-height: 100px;
}
.message-area {
margin-top: 20px;
padding: 15px;
border-radius: 8px;
display: none;
}
.message-area.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
display: block;
}
.message-area.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
display: block;
}
.message-area.info {
background: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
display: block;
}

View File

@@ -191,6 +191,34 @@
color: #333;
}
/* 导出按钮样式 */
.export-buttons {
display: flex;
gap: 10px;
margin-bottom: 20px;
flex-wrap: wrap;
}
.btn-export {
padding: 10px 20px;
background: #28a745;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 0.9em;
transition: all 0.3s;
}
.btn-export:hover {
background: #218838;
transform: translateY(-2px);
}
.btn-export:active {
transform: translateY(0);
}
/* 响应式设计 */
@media (max-width: 768px) {
.wheel-container {

View File

@@ -0,0 +1,99 @@
.recommendation-container {
max-width: 900px;
margin: 0 auto;
}
.section {
margin-bottom: 40px;
padding: 30px;
background: #f8f9fa;
border-radius: 15px;
}
.section h2 {
font-size: 1.8em;
margin-bottom: 25px;
color: #333;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: bold;
color: #555;
}
.form-input {
width: 100%;
padding: 12px;
border: 2px solid #e9ecef;
border-radius: 8px;
font-size: 1em;
font-family: inherit;
transition: border-color 0.3s;
}
.form-input:focus {
outline: none;
border-color: #667eea;
}
.recommendations-list {
display: grid;
gap: 20px;
}
.recommendation-card {
background: white;
padding: 20px;
border-radius: 10px;
border-left: 4px solid #667eea;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.recommendation-card h3 {
margin-top: 0;
color: #667eea;
}
.recommendation-card .food-list {
margin: 15px 0;
}
.recommendation-card .food-item {
padding: 8px;
margin: 5px 0;
background: #f8f9fa;
border-radius: 5px;
}
.recommendation-card .confidence {
color: #28a745;
font-weight: bold;
}
.message-area {
margin-top: 20px;
padding: 15px;
border-radius: 8px;
display: none;
}
.message-area.success {
background: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
display: block;
}
.message-area.error {
background: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
display: block;
}

View File

@@ -89,8 +89,8 @@ body {
.feature-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 25px;
margin-top: 40px;
}