mirror of
https://github.com/wassname/template.git
synced 2026-07-10 20:37:35 +08:00
Fix to banner, print styles
This commit is contained in:
@@ -5,6 +5,7 @@ dt-article {
|
||||
padding-bottom: 72px;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
min-height: calc(100vh - 70px - 182px);
|
||||
}
|
||||
|
||||
@media(min-width: 1024px) {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
size: 8in 11in;
|
||||
}
|
||||
html {
|
||||
}
|
||||
p, code {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
h2, h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
dt-header {
|
||||
visibility: hidden;
|
||||
}
|
||||
dt-footer {
|
||||
display: none!important;
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,10 @@ import base from './styles-base.css';
|
||||
import layout from './styles-layout.css';
|
||||
import article from './styles-article.css';
|
||||
import code from './styles-code.css';
|
||||
import print from './styles-print.css';
|
||||
|
||||
export default function(dom) {
|
||||
let s = dom.createElement("style");
|
||||
s.textContent = base + layout + article + code;
|
||||
s.textContent = base + layout + article + code + print;
|
||||
dom.querySelector("head").appendChild(s);
|
||||
}
|
||||
|
||||
Vendored
+5
-3
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -44,7 +44,7 @@ if(window && window.document) {
|
||||
window.document.addEventListener("DOMContentLoaded", (event) => {
|
||||
renderOnLoad(window.document, data);
|
||||
// Add a banner if we're not on localhost.
|
||||
if (window.location.hostname !== "localhost") {
|
||||
if (window.location.hostname !== "localhost" && window.location.origin !== "file://") {
|
||||
banner(window.document, data);
|
||||
}
|
||||
generateCrossref(data);
|
||||
|
||||
Reference in New Issue
Block a user