Files
pdf-translate-web/static/css/style.css

227 lines
3.8 KiB
CSS

/* PDF翻译助手样式 */
:root {
--primary-color: #4a90d9;
--secondary-color: #f8f9fa;
--success-color: #28a745;
--warning-color: #ffc107;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background-color: var(--secondary-color);
}
.navbar-brand {
font-weight: bold;
}
/* 卡片样式 */
.card {
border-radius: 10px;
border: none;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.card-header {
border-radius: 10px 10px 0 0 !important;
}
/* 上传区域 */
#uploadForm {
padding: 20px;
}
.form-control:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 0.2rem rgba(74, 144, 217, 0.25);
}
/* 进度条 */
.progress {
height: 25px;
border-radius: 5px;
}
.progress-bar {
background-color: var(--primary-color);
transition: width 0.3s ease;
}
/* 翻译内容 */
.translation-content {
max-height: 600px;
overflow-y: auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
border: 1px solid #dee2e6;
line-height: 1.8;
}
.translation-content h2 {
color: var(--primary-color);
margin-top: 20px;
border-bottom: 2px solid var(--primary-color);
padding-bottom: 10px;
}
.translation-content hr {
margin: 30px 0;
}
/* 对比视图 */
.compare-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
height: 70vh;
}
.compare-panel {
padding: 15px;
border-radius: 5px;
background-color: #f8f9fa;
overflow-y: auto;
height: 100%;
}
.compare-panel h5 {
margin-bottom: 10px;
padding-bottom: 5px;
border-bottom: 1px solid #ddd;
}
.compare-panel.original {
border-left: 4px solid #dc3545;
}
.compare-panel.translated {
border-left: 4px solid var(--success-color);
}
.compare-panel iframe {
width: 100%;
height: calc(100% - 40px);
border: none;
}
#pdfContainer {
height: calc(100% - 40px);
overflow-y: auto;
}
#pdfPages {
padding: 10px;
}
.pdf-page-canvas {
border: 1px solid #ddd;
border-radius: 3px;
background: white;
}
.translated-page {
padding-bottom: 30px;
border-bottom: 2px dashed #ddd;
margin-bottom: 20px;
}
.translated-page:last-child {
border-bottom: none;
}
.page-header {
font-size: 0.9em;
padding: 5px 10px;
background: #f0f0f0;
border-radius: 3px;
}
.page-content {
padding: 10px;
}
/* 会员卡片 */
.pricing-card {
transition: transform 0.3s ease;
}
.pricing-card:hover {
transform: translateY(-5px);
}
.pricing-card .price {
font-size: 2.5rem;
font-weight: bold;
color: var(--primary-color);
}
.pricing-card .features {
list-style: none;
padding: 0;
}
.pricing-card .features li {
padding: 10px 0;
border-bottom: 1px solid #eee;
}
/* 按钮 */
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
}
.btn-primary:hover {
background-color: #3a7bc8;
border-color: #3a7bc8;
}
/* 响应式 */
@media (max-width: 768px) {
.compare-container {
grid-template-columns: 1fr;
}
.translation-content {
max-height: 400px;
}
}
/* 加载动画 */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
/* 历史记录 */
.history-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px;
border-bottom: 1px solid #eee;
}
.history-item:hover {
background-color: #f8f9fa;
}
/* 登录注册表单 */
.auth-form {
max-width: 400px;
margin: 50px auto;
padding: 30px;
background: white;
border-radius: 10px;
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}