feat(pdf): add configurable PDF export and improve print rendering
This commit is contained in:
+89
-4
@@ -1092,6 +1092,7 @@ textarea::selection {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.markdown-body blockquote {
|
||||
@@ -1110,6 +1111,10 @@ textarea::selection {
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.markdown-body hr.page-break-marker {
|
||||
border-top-style: dashed;
|
||||
}
|
||||
|
||||
.editor-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -3326,7 +3331,7 @@ dialog::backdrop {
|
||||
.preview-source-line::before {
|
||||
content: attr(data-source-line);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: var(--preview-line-top, 0px);
|
||||
left: var(--preview-line-left, -50px);
|
||||
width: 32px;
|
||||
color: var(--gutter-text);
|
||||
@@ -5358,14 +5363,16 @@ dialog::backdrop {
|
||||
}
|
||||
|
||||
.markdown-body pre.code-with-lines code {
|
||||
display: block;
|
||||
counter-reset: none;
|
||||
}
|
||||
|
||||
.markdown-body pre.code-with-lines .code-line {
|
||||
display: block;
|
||||
min-height: 1.35em;
|
||||
min-height: 1em;
|
||||
padding-left: 4.6em;
|
||||
position: relative;
|
||||
line-height: inherit;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
@@ -7993,7 +8000,7 @@ dialog::backdrop {
|
||||
|
||||
.public-content .public-permalink {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: var(--preview-line-top, 0px);
|
||||
left: var(--preview-line-left, -50px);
|
||||
z-index: 3;
|
||||
display: none;
|
||||
@@ -8471,4 +8478,82 @@ dialog::backdrop {
|
||||
.public-header__actions .header-preferences {
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* PDF export */
|
||||
#pdf-export-dialog {
|
||||
width: min(520px, calc(100% - 28px));
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
.pdf-export-panel {
|
||||
position: relative;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.pdf-export-panel h2,
|
||||
.pdf-export-panel .dialog-copy,
|
||||
.pdf-export-panel .pdf-export-help {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.pdf-export-fields {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(150px, .62fr);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.pdf-export-fields label {
|
||||
display: grid;
|
||||
gap: 7px;
|
||||
min-width: 0;
|
||||
color: var(--text-secondary);
|
||||
font-size: .82rem;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.pdf-export-fields .app-select-input,
|
||||
.pdf-export-fields .app-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pdf-export-options {
|
||||
display: grid;
|
||||
gap: 9px;
|
||||
}
|
||||
|
||||
.pdf-export-title-toggle,
|
||||
.pdf-export-color-toggle {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.pdf-export-color-help,
|
||||
.pdf-export-help {
|
||||
color: var(--muted);
|
||||
font-size: .78rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.pdf-export-color-help {
|
||||
margin: -6px 0 0 24px;
|
||||
}
|
||||
|
||||
#pdf-export-dialog .dialog-actions .primary-button {
|
||||
width: auto;
|
||||
min-width: 132px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.pdf-export-fields {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
#pdf-export-dialog .dialog-actions {
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
#pdf-export-dialog .dialog-actions > button {
|
||||
flex: 1 1 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user