feat: 完善导出设置与打印预览

This commit is contained in:
SkyJourney
2026-07-26 01:36:51 +08:00
parent ec14f7970a
commit 52cf816683
20 changed files with 1552 additions and 146 deletions
+279 -14
View File
@@ -80,6 +80,7 @@ h1 {
.topbar-actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
@@ -247,19 +248,11 @@ textarea:focus {
}
.paper {
width: 210mm;
min-width: 210mm;
min-height: 297mm;
margin: 0 auto;
padding: 20mm 18mm;
background: #fff;
box-shadow: 0 18px 48px rgb(37 49 43 / 16%);
}
.paper.is-local-theme {
padding: 8mm;
}
.preview-frame {
display: block;
width: 100%;
@@ -276,6 +269,277 @@ textarea:focus {
font-size: 0.9rem;
}
.settings-layer {
position: fixed;
z-index: 20;
inset: 0;
}
.settings-backdrop {
position: absolute;
width: 100%;
min-height: 100%;
padding: 0;
border: 0;
border-radius: 0;
inset: 0;
background: rgb(24 35 30 / 38%);
}
.settings-drawer {
position: absolute;
display: flex;
flex-direction: column;
width: min(390px, 100vw);
height: 100%;
inset: 0 0 0 auto;
background: #f8faf8;
box-shadow: -20px 0 60px rgb(26 40 34 / 20%);
}
.settings-heading,
.settings-actions {
display: flex;
flex: none;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 16px 20px;
border-bottom: 1px solid #d9dedb;
background: #fff;
}
.settings-heading h2 {
margin: 1px 0 0;
color: #25332d;
font-family: Georgia, "Songti SC", serif;
font-size: 1.35rem;
font-weight: 500;
}
.icon-button {
width: 36px;
min-height: 36px;
padding: 0;
border: 0;
background: transparent;
color: #5f6c66;
font-size: 1.7rem;
line-height: 1;
}
.settings-content {
flex: 1;
overflow: auto;
padding: 4px 20px 28px;
}
.settings-section {
padding: 20px 0;
border-bottom: 1px solid #dfe4e1;
}
.settings-section:last-child {
border-bottom: 0;
}
.settings-section h3 {
margin: 0 0 14px;
color: #30443a;
font-size: 0.88rem;
}
.setting-section-title {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 14px;
}
.setting-section-title h3 {
margin: 0;
}
.setting-field {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 42px;
color: #526159;
font-size: 0.78rem;
}
.setting-field.stacked {
align-items: stretch;
flex-direction: column;
gap: 7px;
padding: 5px 0;
}
.setting-field > select,
.setting-field > input,
.header-slot > input {
width: 190px;
min-width: 0;
height: 36px;
padding: 0 10px;
border: 1px solid #c9d4ce;
border-radius: 7px;
outline: 0;
background: #fff;
color: #263a32;
font-size: 0.78rem;
}
.setting-field.stacked > input {
width: 100%;
}
.setting-field input:focus,
.setting-field select:focus,
.header-slot > input:focus {
border-color: #74a88f;
box-shadow: 0 0 0 3px rgb(116 168 143 / 16%);
}
.setting-field input:disabled,
.setting-field select:disabled,
.header-slot > input:disabled {
background: #edf0ee;
color: #929b97;
}
.segmented-control {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
margin: 8px 0 0;
padding: 0;
border: 0;
}
.segmented-control legend {
margin-bottom: 8px;
color: #526159;
font-size: 0.78rem;
}
.segmented-control label {
display: flex;
align-items: center;
justify-content: center;
gap: 7px;
min-height: 36px;
border: 1px solid #c9d4ce;
border-radius: 7px;
background: #fff;
color: #3f554a;
font-size: 0.78rem;
cursor: pointer;
}
.segmented-control label:has(input:checked) {
border-color: #74a88f;
background: #e9f3ed;
color: #2d654d;
font-weight: 700;
}
.margin-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px 18px;
}
.margin-grid .setting-field {
align-items: flex-start;
flex-direction: column;
gap: 5px;
}
.length-input {
display: flex;
align-items: center;
width: 100%;
height: 36px;
border: 1px solid #c9d4ce;
border-radius: 7px;
background: #fff;
}
.length-input:focus-within {
border-color: #74a88f;
box-shadow: 0 0 0 3px rgb(116 168 143 / 16%);
}
.length-input input {
min-width: 0;
width: 100%;
height: 34px;
padding: 0 4px 0 10px;
border: 0;
outline: 0;
background: transparent;
color: #263a32;
font-size: 0.78rem;
}
.length-input span {
padding-right: 9px;
color: #7a8580;
font-size: 0.7rem;
}
.switch-control {
display: inline-flex;
align-items: center;
gap: 7px;
color: #526159;
font-size: 0.74rem;
cursor: pointer;
}
.switch-control.compact {
width: 66px;
flex: none;
}
.divider-control {
margin-top: 10px;
}
.header-slot {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 9px;
}
.header-slot > input {
flex: 1;
width: auto;
}
.setting-hint {
margin: 7px 0 10px;
color: #7a8580;
font-size: 0.69rem;
line-height: 1.55;
}
.settings-actions {
justify-content: flex-end;
border-top: 1px solid #d9dedb;
border-bottom: 0;
}
.secondary-button {
background: #f3f5f4;
color: #58665f;
}
@media (max-width: 900px) {
.topbar {
align-items: flex-start;
@@ -305,12 +569,7 @@ textarea:focus {
}
.paper {
min-height: auto;
padding: 14mm 10mm;
}
.paper.is-local-theme {
padding: 8mm;
margin: 0 auto;
}
.theme-control {
@@ -321,3 +580,9 @@ textarea:focus {
max-width: 150px;
}
}
@media (max-width: 520px) {
.settings-drawer {
width: 100vw;
}
}