Import project files
This commit is contained in:
88
docling/app/configs/styles/default.css
Normal file
88
docling/app/configs/styles/default.css
Normal file
@@ -0,0 +1,88 @@
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 20mm 15mm 20mm 15mm;
|
||||
@top-left { content: none; }
|
||||
@top-center { content: element(header); }
|
||||
@bottom-left { content: element(copyright); }
|
||||
@bottom-center { content: element(footer); }
|
||||
@bottom-right { content: counter(page); font-size: 10pt; color: #444; }
|
||||
}
|
||||
|
||||
html { font-family: "Noto Sans CJK SC", "Noto Sans", "Source Han Sans SC", "DejaVu Sans", sans-serif; font-size: 12pt; line-height: 1.6; }
|
||||
|
||||
body { color: #111; }
|
||||
|
||||
h1 { font-size: 20pt; margin: 0 0 8pt; page-break-before: always; }
|
||||
h2 { font-size: 16pt; margin: 16pt 0 8pt; }
|
||||
h3 { font-size: 14pt; margin: 12pt 0 6pt; }
|
||||
|
||||
h1, h2, h3 { page-break-after: avoid; break-after: avoid-page; }
|
||||
|
||||
p { margin: 0 0 8pt; }
|
||||
|
||||
pre, code { font-family: "DejaVu Sans Mono", "Noto Sans Mono", monospace; font-size: 10pt; }
|
||||
|
||||
table { width: 100%; border-collapse: collapse; margin: 8pt 0; table-layout: fixed; }
|
||||
th, td { border: 1px solid #ddd; padding: 6pt 8pt; }
|
||||
thead { display: table-header-group; }
|
||||
tfoot { display: table-footer-group; }
|
||||
table, thead, tbody, tr, th, td { page-break-inside: avoid; break-inside: avoid-page; }
|
||||
|
||||
th, td { white-space: normal; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
|
||||
.table-block { page-break-inside: avoid; break-inside: avoid-page; }
|
||||
|
||||
pre { background: #f6f8fa; border: 1px solid #e5e7eb; border-radius: 6pt; padding: 8pt 10pt; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
|
||||
code { background: #f6f8fa; border-radius: 4pt; padding: 0 3pt; }
|
||||
|
||||
a { color: #0366d6; text-decoration: underline; }
|
||||
a:hover { text-decoration: underline; }
|
||||
|
||||
.break-before { page-break-before: always; }
|
||||
.break-after { page-break-after: always; }
|
||||
.doc-meta { height: 0; overflow: hidden; }
|
||||
.doc-header-text { position: running(header); }
|
||||
.doc-footer-text { position: running(footer); }
|
||||
.doc-copyright { position: running(copyright); }
|
||||
img#brand-logo { display: none; }
|
||||
|
||||
.toc { page-break-after: always; }
|
||||
.toc h1 { font-size: 18pt; margin: 0 0 8pt; }
|
||||
.toc ul { list-style: none; padding: 0; }
|
||||
.toc li { margin: 4pt 0; display: grid; grid-template-columns: auto 1fr 30pt; column-gap: 8pt; align-items: baseline; }
|
||||
.toc li.toc-h1 .toc-text { font-weight: 600; }
|
||||
.toc li.toc-h2 .toc-text { margin-left: 8pt; }
|
||||
.toc li.toc-h3 .toc-text { margin-left: 16pt; }
|
||||
.toc .toc-dots { border-bottom: 1px dotted currentColor; height: 0.9em; transform: translateY(-0.1em); }
|
||||
.toc .toc-page { text-align: right; }
|
||||
.toc .toc-page::before { content: target-counter(attr(data-target), page); }
|
||||
@page { @bottom-right { content: counter(page); font-size: 10pt; color: #444; } }
|
||||
.doc-header-text { position: running(header); display: flex; justify-content: space-between; align-items: center; font-size: 11pt; color: #444; border-bottom: 1px solid #e5e7eb; padding-bottom: 6pt; min-height: 26pt; }
|
||||
.doc-header-left { font-weight: 500; }
|
||||
.doc-header-right { font-size: 10pt; color: #666; }
|
||||
.doc-header-text img.logo-inline { height: 26pt; margin-right: 8pt; }
|
||||
.doc-header-text img.logo-inline { height: 26pt; margin-right: 8pt; }
|
||||
.doc-footer-text { position: running(footer); display: block; text-align: center; font-size: 10pt; color: #444; border-top: 1px solid #e5e7eb; padding-top: 6pt; }
|
||||
.toc a { color: #0366d6; text-decoration: underline; }
|
||||
.toc li { grid-template-columns: auto 1fr 48pt; }
|
||||
.toc li.toc-h2 .toc-text { margin-left: 12pt; }
|
||||
.toc li.toc-h3 .toc-text { margin-left: 24pt; }
|
||||
table { max-width: 100%; box-sizing: border-box; }
|
||||
tr, th, td { page-break-inside: avoid; break-inside: avoid-page; }
|
||||
img, svg, canvas {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
box-sizing: border-box;
|
||||
page-break-inside: avoid;
|
||||
break-inside: avoid-page;
|
||||
}
|
||||
p > img { margin: 6pt auto; }
|
||||
td img, th img { max-width: 100%; height: auto; }
|
||||
@page cover { size: A4; margin: 0; }
|
||||
.cover { page: cover; position: relative; width: 210mm; height: 297mm; overflow: hidden; page-break-after: always; }
|
||||
.cover .cover-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }
|
||||
.cover .cover-brand { position: absolute; top: 20mm; left: 20mm; font-size: 18pt; font-weight: 700; color: #1d4ed8; }
|
||||
.cover .cover-footer { position: absolute; left: 0; right: 0; bottom: 0; background: #1d4ed8; color: #fff; padding: 12mm 20mm; }
|
||||
.cover .cover-title { font-size: 24pt; font-weight: 700; margin: 0; }
|
||||
.cover .cover-subtitle { font-size: 13pt; margin-top: 4pt; }
|
||||
.cover .cover-meta { margin-top: 8pt; font-size: 11pt; display: flex; gap: 20mm; }
|
||||
Reference in New Issue
Block a user