Commit c4aa38b0 authored by julientaq's avatar julientaq

first usable 0.1

parent 5eb11d8b
Pipeline #415 failed with stages
in 5 seconds
/* paged.js interface */
@media screen {
#print {
width: 60px;
position: fixed;
z-index: 20000;
background: var(--color-body);
background: black;
fill: white;
color: white;
padding: 1em;
right: 0;
top: 0;
right: 30px;
top: 30px;
}
}
@media print {
#print {
display: none;
}
}
\ No newline at end of file
......@@ -9,42 +9,21 @@
@page {
size: A4;
@bottom-center {
content: element(footer);
}
}
@page :right {
margin-top: 15mm;
margin-left: 20mm;
margin-right: 15mm;
margin-bottom: 25mm;
@top-right {
content: counter(page);
font-size: 0.7em;
}
@top-left {
content: string(title);
font-size: 0.7em;
@bottom-center {
content: element(footer);
}
}
@page :left {
margin-top: 15mm;
margin-left: 15mm;
margin-right: 20mm;
margin-bottom: 25mm;
@top-left {
@top-right {
content: counter(page);
font-size: 0.7em;
width: 5ch;
}
@top-right {
@top-left {
content: string(title);
font-size: 0.7em;
}
......
This diff is collapsed.
{{ $pagedjsStyle := resources.Get "css/pagedjs.css" | minify | resources.Fingerprint "md5" }}
<link rel="stylesheet" href="{{ $pagedjsStyle.Permalink }}" integrity="{{ $pagedjsStyle.Data.Integrity }}">
{{ $print := resources.Get "css/print.css" | minify | resources.Fingerprint "md5" }}
<link rel="stylesheet" href="{{ $print.Permalink }}" integrity="{{ $print.Data.Integrity }}">
{{ $interface := resources.Get "css/interface.css" | minify | resources.Fingerprint "md5" }}
<link rel="stylesheet" href="{{ $interface.Permalink }}" integrity="{{ $interface.Data.Integrity }}">
<!-- {{/* set up paged.js polyfill to preview the print version */}} -->
{{ $pagedjs := resources.Get "js/paged.polyfill.js" | resources.Fingerprint "md5" }}
<script src="{{ $pagedjs.Permalink }}" type="module" type="application/javascript"></script>
<script>
window.PagedConfig = {
auto: false
};
window.addEventListener("load", function () {
if (document.querySelector('#print')) {
document.querySelector('#print').addEventListener("click", print);
}
});
function print() {
window.PagedPolyfill.preview();
}
</script>
\ No newline at end of file
<button id="print">
<svg id="icon-preview" data-name="icon-preview" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><title>preview</title><rect x="36" y="85" width="5" height="71" fill="black"/><polygon points="129 159 129 179 41 179 41 159 36 159 36 184 134 184 134 159 129 159"/><path d="M193,101A88.76,88.76,0,0,0,69.59,85H21.06A8.07,8.07,0,0,0,13,93.06v54.88A8.07,8.07,0,0,0,21.06,156H147.94a8.07,8.07,0,0,0,8.06-8.06V128.72A89.14,89.14,0,0,0,193,101Zm-69.87,29a83.33,83.33,0,0,1-63.38-29,83.77,83.77,0,0,1,126.77,0A83.34,83.34,0,0,1,123.16,130Z"/><path d="M125.66,75.89a25.58,25.58,0,0,0-9.94,1A12.61,12.61,0,1,1,99.06,93.56a25.22,25.22,0,1,0,26.6-17.67Z"/><path d="M129,69.63c1.68.1,3.34.24,5,.42V17H36V82h5V22h88Z"/></svg>
</button>
<button id="print">PRINT THAT PAGE</button>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment