667 lines
13 KiB
CSS
667 lines
13 KiB
CSS
/* ===== Assets Page ===== */
|
|
.assets-page {
|
|
height: 100%;
|
|
overflow-y: auto;
|
|
padding: var(--space-3xl);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xl);
|
|
}
|
|
|
|
.assets-header {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.assets-title {
|
|
font-size: var(--text-xl);
|
|
font-weight: 700;
|
|
color: var(--color-text-primary);
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.assets-count {
|
|
font-size: var(--text-sm);
|
|
color: var(--color-text-tertiary);
|
|
}
|
|
|
|
.assets-create-btn {
|
|
margin-left: auto;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: var(--space-sm) var(--space-lg);
|
|
background: var(--color-accent);
|
|
color: #FFFFFF;
|
|
border: none;
|
|
border-radius: var(--radius-md);
|
|
font-size: var(--text-sm);
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.assets-create-btn:hover {
|
|
background: var(--color-accent-hover);
|
|
}
|
|
|
|
/* Tabs */
|
|
.assets-tabs {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.assets-tab {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-sm) var(--space-lg);
|
|
border-radius: var(--radius-lg);
|
|
font-size: var(--text-sm);
|
|
font-weight: 500;
|
|
color: var(--color-text-secondary);
|
|
background: var(--color-bg-tertiary);
|
|
transition: all var(--transition-fast);
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.assets-tab:hover {
|
|
background: var(--color-bg-hover);
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.assets-tab.active {
|
|
background: var(--tab-bg, var(--color-accent-light));
|
|
color: var(--tab-color, var(--color-accent));
|
|
border-color: var(--tab-color, var(--color-accent));
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Sub-tabs */
|
|
.assets-subtabs {
|
|
display: flex;
|
|
gap: var(--space-xs);
|
|
padding: var(--space-sm) var(--space-lg);
|
|
background: var(--color-bg-secondary);
|
|
border-radius: var(--radius-lg);
|
|
border: 1px solid var(--color-border-light);
|
|
}
|
|
|
|
.assets-subtab {
|
|
padding: 4px 12px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: var(--text-xs);
|
|
font-weight: 500;
|
|
color: var(--color-text-tertiary);
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.assets-subtab:hover { color: var(--color-text-primary); }
|
|
.assets-subtab.active {
|
|
background: var(--color-accent);
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
/* Assets List */
|
|
.assets-list {
|
|
flex: 1;
|
|
}
|
|
|
|
.assets-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: var(--space-lg);
|
|
}
|
|
|
|
.novel-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
/* File Card */
|
|
.asset-card {
|
|
display: flex;
|
|
gap: var(--space-lg);
|
|
padding: var(--space-xl);
|
|
background: var(--color-bg-secondary);
|
|
border: 1px solid var(--color-border-light);
|
|
border-radius: var(--radius-xl);
|
|
transition: all var(--transition-fast);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.asset-card:hover {
|
|
box-shadow: var(--shadow-md);
|
|
border-color: var(--color-border-hover);
|
|
}
|
|
|
|
.asset-card-icon {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.asset-file-type {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 56px;
|
|
height: 28px;
|
|
padding: 0 10px;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.03em;
|
|
}
|
|
|
|
.asset-card-body {
|
|
flex: 1;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.asset-card-name {
|
|
font-size: var(--text-sm);
|
|
font-weight: 600;
|
|
color: var(--color-text-primary);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.asset-card-desc {
|
|
font-size: var(--text-xs);
|
|
color: var(--color-text-tertiary);
|
|
line-height: 1.4;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
|
|
.asset-card-footer {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-top: auto;
|
|
padding-top: var(--space-sm);
|
|
}
|
|
|
|
.asset-card-size, .asset-card-date {
|
|
font-size: 11px;
|
|
color: var(--color-text-disabled);
|
|
}
|
|
|
|
/* Novel Card */
|
|
.asset-novel-card {
|
|
display: flex;
|
|
gap: var(--space-xl);
|
|
padding: var(--space-2xl);
|
|
background: linear-gradient(135deg, #FFFBEB 0%, #FFF7ED 50%, #FFFBF0 100%);
|
|
border: 1px solid #FDE68A;
|
|
border-radius: var(--radius-xl);
|
|
cursor: pointer;
|
|
transition: all var(--transition-normal);
|
|
}
|
|
|
|
.asset-novel-card:hover {
|
|
border-color: #E8922C;
|
|
box-shadow: var(--shadow-md);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.novel-card-cover {
|
|
width: 80px;
|
|
height: 110px;
|
|
background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
|
|
border: 1px solid #FED7AA;
|
|
border-radius: var(--radius-md);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-sm);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.novel-card-badge {
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
color: #D97706;
|
|
background: #FEF3C7;
|
|
padding: 1px 8px;
|
|
border-radius: var(--radius-full);
|
|
}
|
|
|
|
.novel-card-info {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.novel-card-title {
|
|
font-size: var(--text-lg);
|
|
font-weight: 700;
|
|
color: #92400E;
|
|
}
|
|
|
|
.novel-card-desc {
|
|
font-size: var(--text-sm);
|
|
color: #A16207;
|
|
line-height: 1.5;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
|
|
.novel-card-meta {
|
|
font-size: var(--text-xs);
|
|
color: #B45309;
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
margin-top: auto;
|
|
}
|
|
|
|
/* Empty */
|
|
.assets-empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--space-5xl);
|
|
color: var(--color-text-disabled);
|
|
font-size: var(--text-sm);
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
/* Loading */
|
|
.assets-loading {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--space-5xl);
|
|
color: var(--color-text-tertiary);
|
|
font-size: var(--text-sm);
|
|
gap: var(--space-lg);
|
|
}
|
|
|
|
.audit-spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid var(--color-border-light);
|
|
border-top-color: var(--color-accent);
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* ===== Assets Modal ===== */
|
|
.assets-modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: var(--z-modal);
|
|
animation: fadeIn var(--transition-fast);
|
|
padding: var(--space-2xl);
|
|
}
|
|
|
|
.assets-modal {
|
|
background: var(--color-bg-secondary);
|
|
border-radius: var(--radius-2xl);
|
|
width: 100%;
|
|
max-width: 680px;
|
|
max-height: 85vh;
|
|
overflow-y: auto;
|
|
position: relative;
|
|
animation: slideUp var(--transition-normal);
|
|
box-shadow: var(--shadow-xl);
|
|
}
|
|
|
|
.assets-modal-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-xl) var(--space-2xl);
|
|
border-bottom: 1px solid var(--color-border-light);
|
|
}
|
|
|
|
.assets-modal-title {
|
|
font-size: var(--text-lg);
|
|
font-weight: 600;
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.assets-modal-close {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: var(--radius-md);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--color-text-tertiary);
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.assets-modal-close:hover {
|
|
background: var(--color-bg-hover);
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.assets-modal-body {
|
|
padding: var(--space-2xl);
|
|
}
|
|
|
|
.assets-modal-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-md);
|
|
margin-bottom: var(--space-xl);
|
|
padding: var(--space-md);
|
|
background: var(--color-bg-tertiary);
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
.assets-modal-type {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.assets-modal-cat {
|
|
font-size: var(--text-xs);
|
|
color: var(--color-text-tertiary);
|
|
}
|
|
|
|
.assets-modal-size, .assets-modal-date {
|
|
font-size: var(--text-xs);
|
|
color: var(--color-text-tertiary);
|
|
}
|
|
|
|
/* Text Preview */
|
|
.assets-preview-text {
|
|
margin-bottom: var(--space-xl);
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.assets-preview-code {
|
|
padding: var(--space-lg);
|
|
background: #1e1e2e;
|
|
color: #cdd6f4;
|
|
border-radius: var(--radius-md);
|
|
font-family: var(--font-mono);
|
|
font-size: 13px;
|
|
line-height: 1.7;
|
|
white-space: pre-wrap;
|
|
word-break: break-all;
|
|
}
|
|
|
|
/* Image Preview */
|
|
.assets-preview-image {
|
|
margin-bottom: var(--space-xl);
|
|
text-align: center;
|
|
}
|
|
|
|
.assets-preview-image img {
|
|
max-width: 100%;
|
|
max-height: 400px;
|
|
border-radius: var(--radius-md);
|
|
object-fit: contain;
|
|
}
|
|
|
|
/* Video Preview */
|
|
.assets-preview-video {
|
|
margin-bottom: var(--space-xl);
|
|
}
|
|
|
|
.assets-preview-video video {
|
|
width: 100%;
|
|
max-height: 400px;
|
|
border-radius: var(--radius-md);
|
|
background: #000;
|
|
}
|
|
|
|
/* Audio Preview */
|
|
.assets-preview-audio {
|
|
margin-bottom: var(--space-xl);
|
|
padding: var(--space-xl);
|
|
background: var(--color-bg-tertiary);
|
|
border-radius: var(--radius-md);
|
|
text-align: center;
|
|
}
|
|
|
|
.assets-preview-audio audio {
|
|
width: 100%;
|
|
max-width: 500px;
|
|
}
|
|
|
|
/* Edit Section */
|
|
.assets-edit-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-md);
|
|
margin-bottom: var(--space-xl);
|
|
}
|
|
|
|
.assets-edit-textarea {
|
|
padding: var(--space-md);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
font-family: var(--font-mono);
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
color: var(--color-text-primary);
|
|
background: var(--color-bg-primary);
|
|
resize: vertical;
|
|
min-height: 200px;
|
|
outline: none;
|
|
transition: border-color var(--transition-fast);
|
|
}
|
|
|
|
.assets-edit-textarea:focus {
|
|
border-color: var(--color-accent);
|
|
box-shadow: 0 0 0 3px var(--color-accent-light);
|
|
}
|
|
|
|
.assets-edit-actions {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* Modal Actions */
|
|
.assets-modal-actions {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
flex-wrap: wrap;
|
|
padding-top: var(--space-lg);
|
|
border-top: 1px solid var(--color-border-light);
|
|
}
|
|
|
|
/* Assets Buttons */
|
|
.assets-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: var(--space-sm) var(--space-lg);
|
|
border-radius: var(--radius-md);
|
|
font-size: var(--text-sm);
|
|
font-weight: 500;
|
|
transition: all var(--transition-fast);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.assets-btn-primary {
|
|
background: var(--color-accent);
|
|
color: #FFFFFF;
|
|
border: none;
|
|
}
|
|
|
|
.assets-btn-primary:hover {
|
|
background: var(--color-accent-hover);
|
|
}
|
|
|
|
.assets-btn-secondary {
|
|
background: var(--color-bg-primary);
|
|
color: var(--color-text-secondary);
|
|
border: 1px solid var(--color-border);
|
|
}
|
|
|
|
.assets-btn-secondary:hover {
|
|
border-color: var(--color-accent);
|
|
color: var(--color-accent);
|
|
}
|
|
|
|
.assets-btn-cancel {
|
|
background: transparent;
|
|
color: var(--color-text-tertiary);
|
|
border: 1px solid var(--color-border);
|
|
}
|
|
|
|
.assets-btn-cancel:hover {
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.assets-btn-danger {
|
|
background: transparent;
|
|
color: var(--color-error);
|
|
border: 1px solid var(--color-error);
|
|
}
|
|
|
|
.assets-btn-danger:hover {
|
|
background: var(--color-error-light);
|
|
}
|
|
|
|
/* Create Asset Modal */
|
|
.assets-create-modal {
|
|
max-width: 500px;
|
|
}
|
|
|
|
.assets-create-modal .form-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
margin-bottom: var(--space-lg);
|
|
}
|
|
|
|
.form-label {
|
|
font-size: var(--text-sm);
|
|
font-weight: 500;
|
|
color: var(--color-text-primary);
|
|
}
|
|
|
|
.form-label .required {
|
|
color: var(--color-error);
|
|
}
|
|
|
|
.form-input,
|
|
.form-textarea {
|
|
padding: var(--space-sm) var(--space-md);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
font-size: var(--text-sm);
|
|
color: var(--color-text-primary);
|
|
background: var(--color-bg-primary);
|
|
outline: none;
|
|
transition: border-color var(--transition-fast);
|
|
}
|
|
|
|
.form-input:focus,
|
|
.form-textarea:focus {
|
|
border-color: var(--color-accent);
|
|
box-shadow: 0 0 0 3px var(--color-accent-light);
|
|
}
|
|
|
|
.form-textarea {
|
|
resize: vertical;
|
|
font-family: var(--font-mono);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.form-submit-btn {
|
|
width: 100%;
|
|
padding: var(--space-md) var(--space-xl);
|
|
background: var(--color-accent);
|
|
color: white;
|
|
border: none;
|
|
border-radius: var(--radius-md);
|
|
font-size: var(--text-sm);
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.form-submit-btn:hover:not(:disabled) {
|
|
background: var(--color-accent-hover);
|
|
}
|
|
|
|
.form-submit-btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* Online Preview */
|
|
.assets-preview-online {
|
|
margin: var(--space-md) 0;
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-md);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.assets-preview-online-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-sm) var(--space-md);
|
|
background: var(--color-bg-tertiary);
|
|
border-bottom: 1px solid var(--color-border);
|
|
font-size: var(--text-xs);
|
|
color: var(--color-text-secondary);
|
|
}
|
|
|
|
.assets-preview-reader {
|
|
background: var(--color-bg-secondary);
|
|
max-height: 500px;
|
|
overflow: auto;
|
|
border-radius: 0 0 var(--radius-md) var(--radius-md);
|
|
}
|
|
|
|
.assets-kb-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 2px 6px;
|
|
background: #EEEDFF;
|
|
color: #5B5FED;
|
|
border-radius: var(--radius-xs);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
margin-left: var(--space-sm);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.assets-page { padding: var(--space-lg); }
|
|
.novel-grid { grid-template-columns: 1fr; }
|
|
.assets-grid { grid-template-columns: 1fr; }
|
|
.asset-novel-card { flex-direction: column; }
|
|
.novel-card-cover { width: 100%; height: 60px; flex-direction: row; }
|
|
.assets-modal { max-width: 100%; max-height: 90vh; border-radius: var(--radius-xl); }
|
|
.assets-modal-body { padding: var(--space-xl); }
|
|
}
|