diff --git a/app/static/css/book-form.css b/app/static/css/book-form.css index 6315be4..177dbd2 100644 --- a/app/static/css/book-form.css +++ b/app/static/css/book-form.css @@ -1,72 +1,376 @@ -/* 图书表单页面样式 */ +/* ========== 基础样式 ========== */ .book-form-container { + padding: 30px; + max-width: 1400px; + margin: 0 auto; + background-color: #f8f9fa; + border-radius: 10px; + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); +} + +/* ========== 页头样式 ========== */ +.page-header-wrapper { + margin-bottom: 30px; + background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); + border-radius: 8px; padding: 20px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); } .page-header { display: flex; justify-content: space-between; align-items: center; - margin-bottom: 20px; - padding-bottom: 15px; - border-bottom: 1px solid #eee; } -.actions { +.header-title-section { + display: flex; + flex-direction: column; +} + +.page-title { + font-size: 28px; + font-weight: 700; + color: #2c3e50; + margin: 0; + display: flex; + align-items: center; +} + +.page-title i { + margin-right: 12px; + color: #3498db; + font-size: 24px; +} + +.subtitle { + margin: 5px 0 0 0; + color: #7f8c8d; + font-size: 16px; +} + +.header-actions { + display: flex; + align-items: center; + gap: 20px; +} + +.btn-icon-text { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 16px; + border-radius: 6px; + font-weight: 500; + transition: all 0.3s ease; +} + +.btn-icon-text i { + font-size: 14px; +} + +/* 进度条样式 */ +.form-progress { + min-width: 180px; +} + +.progress { + height: 8px; + border-radius: 4px; + background-color: #e9ecef; + margin-bottom: 5px; + overflow: hidden; +} + +.progress-bar { + background: linear-gradient(45deg, #3498db, #2ecc71); + transition: width 0.5s ease; +} + +.progress-text { + font-size: 12px; + color: #6c757d; + text-align: right; + display: block; +} + +/* ========== 表单卡片样式 ========== */ +.form-card { + margin-bottom: 25px; + border: none; + border-radius: 10px; + box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05); + background-color: #ffffff; + transition: all 0.3s ease; + overflow: hidden; +} + +.form-card:hover { + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); + transform: translateY(-2px); +} + +.card-header { + padding: 16px 20px; + background: linear-gradient(90deg, rgba(248,249,250,1) 0%, rgba(255,255,255,1) 100%); + border-bottom: 1px solid #edf2f7; + display: flex; + align-items: center; +} + +.card-header-icon { + width: 32px; + height: 32px; + border-radius: 8px; + background-color: rgba(52, 152, 219, 0.1); + display: flex; + align-items: center; + justify-content: center; + margin-right: 12px; +} + +.card-header-icon i { + color: #3498db; + font-size: 16px; +} + +.card-header-title { + font-weight: 600; + color: #2c3e50; + font-size: 16px; +} + +.card-body { + padding: 25px; +} + +.form-section { + padding: 0; +} + +/* ========== 表单元素样式 ========== */ +.form-label { + font-weight: 500; + color: #34495e; + margin-bottom: 8px; + display: flex; + align-items: center; +} + +.label-icon { + color: #3498db; + margin-right: 8px; + font-size: 14px; +} + +.form-group { + margin-bottom: 20px; + position: relative; +} + +.custom-input, .custom-select, .custom-textarea { + height: calc(2.8rem + 2px); + padding: 0.75rem 1rem; + border: 1px solid #e0e6ed; + border-radius: 8px; + font-size: 15px; + transition: all 0.3s ease; + box-shadow: 0 1px 3px rgba(0,0,0,0.02); +} + +.custom-input:focus, .custom-select:focus, .custom-textarea:focus { + border-color: #3498db; + box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25); + outline: none; +} + +.custom-textarea { + height: auto; + min-height: 200px; + resize: vertical; + line-height: 1.6; +} + +.input-group-text { + background-color: #f8f9fa; + border: 1px solid #e0e6ed; + border-radius: 8px; + color: #6c757d; +} + +.form-text { + margin-top: 6px; + font-size: 13px; + color: #6c757d; +} + +/* 浮动标签效果 */ +.form-group.focused .floating-label { + transform: translateY(-22px) scale(0.85); + color: #3498db; + opacity: 1; +} + +.floating-label { + position: absolute; + pointer-events: none; + left: 1rem; + top: 0.75rem; + transition: 0.2s ease all; + color: #95a5a6; + opacity: 0.8; +} + +.floating-input:focus + .floating-label, +.floating-input:not(:placeholder-shown) + .floating-label { + transform: translateY(-22px) scale(0.85); + color: #3498db; + opacity: 1; +} + +.floating-input { + padding-top: 1.1rem; + padding-bottom: 0.4rem; +} + +/* 数字输入组 */ +.input-number-group { + display: flex; + width: 100%; +} + +.input-number-group input { + text-align: center; + border-radius: 0; + border-left: none; + border-right: none; +} + +.input-number-group button { + border-radius: 8px 0 0 8px; +} + +.input-number-group button:last-child { + border-radius: 0 8px 8px 0; +} + +/* 价格滑块 */ +.custom-range { + -webkit-appearance: none; + width: 100%; + height: 6px; + border-radius: 3px; + background: #e0e6ed; + outline: none; + margin: 10px 0; +} + +.custom-range::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 20px; + height: 20px; + border-radius: 50%; + background: #3498db; + cursor: pointer; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + transition: background 0.3s ease; +} + +.custom-range::-webkit-slider-thumb:hover { + background: #2980b9; +} + +/* 标签输入 */ +.tag-input-container { display: flex; gap: 10px; } -.book-form { - margin-bottom: 30px; +.tag-input { + flex-grow: 1; } -.card { - margin-bottom: 20px; - border: 1px solid rgba(0,0,0,0.125); - border-radius: 0.25rem; +.add-tag-btn { + padding: 0.5rem 0.75rem; + border-radius: 8px; } -.card-header { - padding: 0.75rem 1.25rem; - background-color: rgba(0,0,0,0.03); - border-bottom: 1px solid rgba(0,0,0,0.125); - font-weight: 600; +.tags-container { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-top: 12px; } -.card-body { - padding: 1.25rem; +.tag-item { + display: inline-flex; + align-items: center; + background-color: rgba(52, 152, 219, 0.1); + color: #3498db; + padding: 6px 12px; + border-radius: 20px; + font-size: 14px; + transition: all 0.3s ease; } -/* 必填项标记 */ -.required { - color: #dc3545; - margin-left: 2px; +.tag-item:hover { + background-color: rgba(52, 152, 219, 0.2); } -/* 封面预览区域 */ +.tag-item .remove-tag { + margin-left: 8px; + cursor: pointer; + font-size: 12px; + color: #3498db; +} + +.tag-item .remove-tag:hover { + color: #e74c3c; +} + +/* 文本计数 */ +.text-count { + font-size: 12px; + color: #7f8c8d; +} + +.text-count.text-danger { + color: #e74c3c; +} + +/* ========== 封面上传区域 ========== */ .cover-preview-container { display: flex; flex-direction: column; align-items: center; - gap: 15px; + gap: 20px; } .cover-preview { width: 100%; - max-width: 200px; - height: 280px; - border: 1px dashed #ccc; - border-radius: 4px; + height: 320px; + border: 2px dashed #e0e6ed; + border-radius: 10px; overflow: hidden; background-color: #f8f9fa; margin-bottom: 10px; + transition: all 0.3s ease; + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; +} + +.cover-preview.dragover { + border-color: #3498db; + background-color: rgba(52, 152, 219, 0.05); } .cover-image { width: 100%; height: 100%; - object-fit: cover; + object-fit: contain; } .no-cover-placeholder { @@ -76,33 +380,442 @@ flex-direction: column; justify-content: center; align-items: center; - color: #aaa; + color: #95a5a6; + padding: 20px; + text-align: center; } .no-cover-placeholder i { - font-size: 48px; - margin-bottom: 10px; + font-size: 64px; + margin-bottom: 20px; + color: #d0d0d0; } -.upload-container { +.placeholder-tip { + font-size: 13px; + margin-top: 10px; + color: #7f8c8d; +} + +.upload-options { width: 100%; - max-width: 200px; + padding: 0 20px; } -/* 提交按钮容器 */ +.upload-btn-group { + display: flex; + gap: 10px; +} + +.custom-upload-btn { + flex-grow: 1; + padding: 10px 20px; + border-radius: 8px; + font-weight: 500; + transition: all 0.3s ease; + background-color: #3498db; + border-color: #3498db; + color: white; +} + +.custom-upload-btn:hover { + background-color: #2980b9; + border-color: #2980b9; + transform: translateY(-2px); + box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3); +} + +.btn-icon { + width: 42px; + padding: 0; + display: flex; + align-items: center; + justify-content: center; +} + +/* ========== 表单提交区域 ========== */ .form-submit-container { margin-top: 30px; } -/* 响应式调整 */ -@media (max-width: 768px) { +.action-buttons { + display: flex; + flex-direction: column; + gap: 15px; +} + +.secondary-buttons { + display: flex; + gap: 10px; +} + +.submit-btn { + padding: 15px; + border-radius: 8px; + font-weight: 600; + background: linear-gradient(45deg, #3498db, #2980b9); + border: none; + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +.submit-btn:hover { + transform: translateY(-3px); + box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4); +} + +.submit-btn:active { + transform: translateY(-1px); +} + +.reset-btn { + padding: 12px; + border-radius: 8px; + font-weight: 500; +} + +.form-tip { + margin-top: 15px; + font-size: 13px; + color: #7f8c8d; + text-align: center; +} + +.form-tip i { + color: #3498db; + margin-right: 5px; +} + +/* 必填项标记 */ +.required { + color: #e74c3c; + margin-left: 4px; + font-weight: bold; +} + +/* 无效输入状态 */ +.is-invalid { + border-color: #e74c3c !important; +} + +.invalid-feedback { + display: block; + color: #e74c3c; + font-size: 13px; + margin-top: 5px; +} + +/* ========== 模态框样式 ========== */ +.modal-content { + border: none; + border-radius: 12px; + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); + overflow: hidden; +} + +.modal-header { + background-color: #f8f9fa; + border-bottom: 1px solid #edf2f7; + padding: 15px 20px; +} + +.modal-title { + font-weight: 600; + color: #2c3e50; +} + +.modal-body { + padding: 25px; +} + +.modal-footer { + border-top: 1px solid #edf2f7; + padding: 15px 20px; + justify-content: space-between; +} + +/* 裁剪模态框 */ +.img-container { + max-height: 500px; + overflow: hidden; +} + +#cropperImage { + display: block; + max-width: 100%; +} + +.cropper-controls { + display: flex; + gap: 10px; +} + +/* 图书预览模态框 */ +.book-preview-container { + padding: 10px; +} + +.book-preview-cover { + width: 100%; + height: 300px; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); + background-color: #f8f9fa; + margin-bottom: 20px; +} + +.book-preview-cover img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.book-preview-details { + padding: 10px 0; +} + +.book-preview-details h3 { + margin: 0 0 5px 0; + font-weight: 600; + color: #2c3e50; +} + +.book-author { + color: #7f8c8d; + font-size: 16px; + margin-bottom: 20px; +} + +.book-info-section { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 12px; + margin-bottom: 20px; +} + +.book-info-item { + display: flex; + flex-direction: column; +} + +.info-label { + font-size: 13px; + color: #7f8c8d; + margin-bottom: 3px; +} + +.info-value { + font-weight: 500; + color: #34495e; +} + +.book-tags { + display: flex; + flex-wrap: wrap; + gap: 8px; + margin-bottom: 20px; +} + +.preview-tag { + display: inline-block; + background-color: rgba(52, 152, 219, 0.1); + color: #3498db; + padding: 5px 10px; + border-radius: 20px; + font-size: 13px; +} + +.book-description { + background-color: #f8f9fa; + border-radius: 8px; + padding: 20px; + margin-top: 20px; +} + +.book-description h4 { + margin-top: 0; + font-weight: 600; + color: #2c3e50; + margin-bottom: 15px; +} + +.book-description p { + color: #34495e; + line-height: 1.6; + margin: 0; +} + +/* ========== 自定义通知样式 ========== */ +.notification-container { + position: fixed; + top: 20px; + right: 20px; + z-index: 9999; + display: flex; + flex-direction: column; + gap: 10px; + max-width: 350px; +} + +.custom-notification { + background: white; + border-radius: 10px; + padding: 15px; + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); + display: flex; + align-items: center; + animation-duration: 0.5s; + border-left: 4px solid #3498db; +} + +.notification-success { + border-color: #2ecc71; +} + +.notification-error { + border-color: #e74c3c; +} + +.notification-warning { + border-color: #f39c12; +} + +.notification-info { + border-color: #3498db; +} + +.notification-icon { + width: 30px; + height: 30px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin-right: 15px; +} + +.notification-success .notification-icon i { + color: #2ecc71; +} + +.notification-error .notification-icon i { + color: #e74c3c; +} + +.notification-warning .notification-icon i { + color: #f39c12; +} + +.notification-info .notification-icon i { + color: #3498db; +} + +.notification-content { + flex-grow: 1; +} + +.notification-content p { + margin: 0; + font-size: 14px; + color: #2c3e50; +} + +.notification-close { + background: none; + border: none; + color: #bdc3c7; + cursor: pointer; + padding: 5px; + transition: color 0.3s ease; +} + +.notification-close:hover { + color: #7f8c8d; +} + +/* ========== 动画效果 ========== */ +@keyframes pulse { + 0% { + box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); + } + 70% { + box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); + } + 100% { + box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); + } +} + +.pulse { + animation: pulse 2s infinite; +} + +.pulse-icon { + animation: pulse 2s infinite; +} + +/* ========== 响应式样式 ========== */ +@media (max-width: 1200px) { + .book-form-container { + padding: 20px; + } + + .cover-preview { + height: 280px; + } +} + +@media (max-width: 992px) { .page-header { flex-direction: column; align-items: flex-start; gap: 15px; } - .actions { + .header-actions { width: 100%; + justify-content: space-between; + } + + .book-info-section { + grid-template-columns: 1fr; + } +} + +@media (max-width: 768px) { + .book-form-container { + padding: 15px 10px; + } + + .page-title { + font-size: 24px; + } + + .subtitle { + font-size: 14px; + } + + .card-body { + padding: 20px 15px; + } + + .cover-preview { + height: 240px; + } + + .secondary-buttons { + flex-direction: column; + } + + .form-row { + margin-right: -5px; + margin-left: -5px; + } + + .form-group { + padding-right: 5px; + padding-left: 5px; } } diff --git a/app/static/css/login.css b/app/static/css/login.css new file mode 100644 index 0000000..396f79a --- /dev/null +++ b/app/static/css/login.css @@ -0,0 +1,394 @@ +/* login.css - 登录页面专用样式 */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; +} + +:root { + --primary-color: #4a89dc; + --primary-hover: #3b78c4; + --secondary-color: #5cb85c; + --text-color: #333; + --light-text: #666; + --bg-color: #f5f7fa; + --card-bg: #ffffff; + --border-color: #ddd; + --error-color: #e74c3c; + --success-color: #2ecc71; +} + +body.dark-mode { + --primary-color: #5a9aed; + --primary-hover: #4a89dc; + --secondary-color: #6bc76b; + --text-color: #f1f1f1; + --light-text: #aaa; + --bg-color: #1a1a1a; + --card-bg: #2c2c2c; + --border-color: #444; +} + +body { + background-color: var(--bg-color); + background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); + background-size: cover; + background-position: center; + display: flex; + flex-direction: column; + min-height: 100vh; + color: var(--text-color); + transition: all 0.3s ease; +} + +.theme-toggle { + position: absolute; + top: 20px; + right: 20px; + z-index: 10; + cursor: pointer; + padding: 8px; + border-radius: 50%; + background-color: rgba(255, 255, 255, 0.2); + backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.1); +} + +.overlay { + background-color: rgba(0, 0, 0, 0.4); + backdrop-filter: blur(5px); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: -1; +} + +.main-container { + display: flex; + justify-content: center; + align-items: center; + flex: 1; + padding: 20px; +} + +.login-container { + background-color: var(--card-bg); + border-radius: 12px; + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15); + width: 450px; + padding: 35px; + position: relative; + overflow: hidden; + animation: fadeIn 0.5s ease; +} + +@keyframes fadeIn { + from { opacity: 0; transform: translateY(20px); } + to { opacity: 1; transform: translateY(0); } +} + +.logo { + text-align: center; + margin-bottom: 25px; + position: relative; +} + +.logo img { + width: 90px; + height: 90px; + border-radius: 12px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + padding: 5px; + background-color: #fff; + transition: transform 0.3s ease; +} + +h1 { + text-align: center; + color: var(--text-color); + margin-bottom: 10px; + font-weight: 600; + font-size: 28px; +} + +.subtitle { + text-align: center; + color: var(--light-text); + margin-bottom: 30px; + font-size: 14px; +} + +.form-group { + margin-bottom: 22px; + position: relative; +} + +.form-group label { + display: block; + margin-bottom: 8px; + color: var(--text-color); + font-weight: 500; + font-size: 14px; +} + +.input-with-icon { + position: relative; +} + +.input-icon { + position: absolute; + left: 15px; + top: 50%; + transform: translateY(-50%); + color: var(--light-text); +} + +.form-control { + width: 100%; + height: 48px; + border: 1px solid var(--border-color); + border-radius: 6px; + padding: 0 15px 0 45px; + font-size: 15px; + transition: all 0.3s ease; + background-color: var(--card-bg); + color: var(--text-color); +} + +.form-control:focus { + border-color: var(--primary-color); + box-shadow: 0 0 0 3px rgba(74, 137, 220, 0.2); + outline: none; +} + +.password-toggle { + position: absolute; + right: 15px; + top: 50%; + transform: translateY(-50%); + cursor: pointer; + color: var(--light-text); +} + +.validation-message { + margin-top: 6px; + font-size: 12px; + color: var(--error-color); + display: none; +} + +.validation-message.show { + display: block; + animation: shake 0.5s ease; +} + +@keyframes shake { + 0%, 100% { transform: translateX(0); } + 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } + 20%, 40%, 60%, 80% { transform: translateX(5px); } +} + +.remember-forgot { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 25px; +} + +.custom-checkbox { + position: relative; + padding-left: 30px; + cursor: pointer; + font-size: 14px; + user-select: none; + color: var(--light-text); +} + +.custom-checkbox input { + position: absolute; + opacity: 0; + cursor: pointer; + height: 0; + width: 0; +} + +.checkmark { + position: absolute; + top: 0; + left: 0; + height: 18px; + width: 18px; + background-color: var(--card-bg); + border: 1px solid var(--border-color); + border-radius: 3px; + transition: all 0.2s ease; +} + +.custom-checkbox:hover input ~ .checkmark { + border-color: var(--primary-color); +} + +.custom-checkbox input:checked ~ .checkmark { + background-color: var(--primary-color); + border-color: var(--primary-color); +} + +.checkmark:after { + content: ""; + position: absolute; + display: none; +} + +.custom-checkbox input:checked ~ .checkmark:after { + display: block; +} + +.custom-checkbox .checkmark:after { + left: 6px; + top: 2px; + width: 4px; + height: 9px; + border: solid white; + border-width: 0 2px 2px 0; + transform: rotate(45deg); +} + +.forgot-password a { + color: var(--primary-color); + text-decoration: none; + font-size: 14px; + transition: color 0.3s ease; +} + +.forgot-password a:hover { + color: var(--primary-hover); + text-decoration: underline; +} + +.btn-login { + width: 100%; + height: 48px; + background-color: var(--primary-color); + color: white; + border: none; + border-radius: 6px; + font-size: 16px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +.btn-login:hover { + background-color: var(--primary-hover); +} + +.btn-login:active { + transform: scale(0.98); +} + +.btn-login .loading { + display: none; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.btn-login.loading-state { + color: transparent; +} + +.btn-login.loading-state .loading { + display: block; +} + +.signup { + text-align: center; + margin-top: 25px; + font-size: 14px; + color: var(--light-text); +} + +.signup a { + color: var(--primary-color); + text-decoration: none; + font-weight: 600; + transition: color 0.3s ease; +} + +.signup a:hover { + color: var(--primary-hover); + text-decoration: underline; +} + +.features { + display: flex; + justify-content: center; + margin-top: 25px; + gap: 30px; +} + +.feature-item { + text-align: center; + font-size: 12px; + color: var(--light-text); + display: flex; + flex-direction: column; + align-items: center; +} + +.feature-icon { + margin-bottom: 5px; + font-size: 18px; +} + +footer { + text-align: center; + padding: 20px; + color: rgba(255, 255, 255, 0.7); + font-size: 12px; +} + +footer a { + color: rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.alert { + padding: 10px; + margin-bottom: 15px; + border-radius: 4px; + color: #721c24; + background-color: #f8d7da; + border: 1px solid #f5c6cb; +} + +@media (max-width: 576px) { + .login-container { + width: 100%; + padding: 25px; + border-radius: 0; + } + + .theme-toggle { + top: 10px; + } + + .logo img { + width: 70px; + height: 70px; + } + + h1 { + font-size: 22px; + } + + .main-container { + padding: 0; + } +} diff --git a/app/static/css/register.css b/app/static/css/register.css new file mode 100644 index 0000000..033361c --- /dev/null +++ b/app/static/css/register.css @@ -0,0 +1,342 @@ +/* register.css - 注册页面专用样式 */ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; +} + +:root { + --primary-color: #4a89dc; + --primary-hover: #3b78c4; + --secondary-color: #5cb85c; + --text-color: #333; + --light-text: #666; + --bg-color: #f5f7fa; + --card-bg: #ffffff; + --border-color: #ddd; + --error-color: #e74c3c; + --success-color: #2ecc71; +} + +body.dark-mode { + --primary-color: #5a9aed; + --primary-hover: #4a89dc; + --secondary-color: #6bc76b; + --text-color: #f1f1f1; + --light-text: #aaa; + --bg-color: #1a1a1a; + --card-bg: #2c2c2c; + --border-color: #444; +} + +body { + background-color: var(--bg-color); + background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); + background-size: cover; + background-position: center; + display: flex; + flex-direction: column; + min-height: 100vh; + color: var(--text-color); + transition: all 0.3s ease; +} + +.theme-toggle { + position: absolute; + top: 20px; + right: 20px; + z-index: 10; + cursor: pointer; + padding: 8px; + border-radius: 50%; + background-color: rgba(255, 255, 255, 0.2); + backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.1); +} + +.overlay { + background-color: rgba(0, 0, 0, 0.4); + backdrop-filter: blur(5px); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: -1; +} + +.main-container { + display: flex; + justify-content: center; + align-items: center; + flex: 1; + padding: 20px; +} + +.login-container { + background-color: var(--card-bg); + border-radius: 12px; + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15); + width: 450px; + padding: 35px; + position: relative; + overflow: hidden; + animation: fadeIn 0.5s ease; +} + +.register-container { + width: 500px; +} + +@keyframes fadeIn { + from { opacity: 0; transform: translateY(20px); } + to { opacity: 1; transform: translateY(0); } +} + +.logo { + text-align: center; + margin-bottom: 25px; + position: relative; +} + +.logo img { + width: 90px; + height: 90px; + border-radius: 12px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + padding: 5px; + background-color: #fff; + transition: transform 0.3s ease; +} + +h1 { + text-align: center; + color: var(--text-color); + margin-bottom: 10px; + font-weight: 600; + font-size: 28px; +} + +.subtitle { + text-align: center; + color: var(--light-text); + margin-bottom: 30px; + font-size: 14px; +} + +.form-group { + margin-bottom: 22px; + position: relative; +} + +.form-group label { + display: block; + margin-bottom: 8px; + color: var(--text-color); + font-weight: 500; + font-size: 14px; +} + +.input-with-icon { + position: relative; +} + +.input-icon { + position: absolute; + left: 15px; + top: 50%; + transform: translateY(-50%); + color: var(--light-text); +} + +.form-control { + width: 100%; + height: 48px; + border: 1px solid var(--border-color); + border-radius: 6px; + padding: 0 15px 0 45px; + font-size: 15px; + transition: all 0.3s ease; + background-color: var(--card-bg); + color: var(--text-color); +} + +.form-control:focus { + border-color: var(--primary-color); + box-shadow: 0 0 0 3px rgba(74, 137, 220, 0.2); + outline: none; +} + +.password-toggle { + position: absolute; + right: 15px; + top: 50%; + transform: translateY(-50%); + cursor: pointer; + color: var(--light-text); +} + +.validation-message { + margin-top: 6px; + font-size: 12px; + color: var(--error-color); + display: none; +} + +.validation-message.show { + display: block; + animation: shake 0.5s ease; +} + +@keyframes shake { + 0%, 100% { transform: translateX(0); } + 10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); } + 20%, 40%, 60%, 80% { transform: translateX(5px); } +} + +.btn-login { + width: 100%; + height: 48px; + background-color: var(--primary-color); + color: white; + border: none; + border-radius: 6px; + font-size: 16px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s ease; + position: relative; + overflow: hidden; +} + +.btn-login:hover { + background-color: var(--primary-hover); +} + +.btn-login:active { + transform: scale(0.98); +} + +.btn-login .loading { + display: none; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +.btn-login.loading-state { + color: transparent; +} + +.btn-login.loading-state .loading { + display: block; +} + +.signup { + text-align: center; + margin-top: 25px; + font-size: 14px; + color: var(--light-text); +} + +.signup a { + color: var(--primary-color); + text-decoration: none; + font-weight: 600; + transition: color 0.3s ease; +} + +.signup a:hover { + color: var(--primary-hover); + text-decoration: underline; +} + +.alert { + padding: 10px; + margin-bottom: 15px; + border-radius: 4px; + color: #721c24; + background-color: #f8d7da; + border: 1px solid #f5c6cb; +} + +.verification-code-container { + display: flex; + gap: 10px; +} + +.verification-input { + flex: 1; + height: 48px; + border: 1px solid var(--border-color); + border-radius: 6px; + padding: 0 15px; + font-size: 15px; + transition: all 0.3s ease; + background-color: var(--card-bg); + color: var(--text-color); +} + +.send-code-btn { + padding: 0 15px; + background-color: var(--primary-color); + color: white; + border: none; + border-radius: 6px; + cursor: pointer; + font-size: 14px; + white-space: nowrap; + transition: all 0.3s ease; +} + +.send-code-btn:hover { + background-color: var(--primary-hover); +} + +.send-code-btn:disabled { + background-color: #ccc; + cursor: not-allowed; +} + +footer { + text-align: center; + padding: 20px; + color: rgba(255, 255, 255, 0.7); + font-size: 12px; +} + +footer a { + color: rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +@media (max-width: 576px) { + .login-container, .register-container { + width: 100%; + padding: 25px; + border-radius: 0; + } + + .theme-toggle { + top: 10px; + } + + .logo img { + width: 70px; + height: 70px; + } + + h1 { + font-size: 22px; + } + + .main-container { + padding: 0; + } + + .verification-code-container { + flex-direction: column; + } +} diff --git a/app/templates/book/add.html b/app/templates/book/add.html index 4d37983..cf0e6b4 100644 --- a/app/templates/book/add.html +++ b/app/templates/book/add.html @@ -4,152 +4,839 @@ {% block head %} + + + {% endblock %} {% block content %} -