Skip to content

Commit b849039

Browse files
different strategy for the copyright year
1 parent 04c7741 commit b849039

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

css/print.css

-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Spec.ts

+22-1
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,28 @@ ${await utils.readFile(path.join(__dirname, '../js/multipage.js'))}
11181118
this.doc.head.appendChild(printStyle);
11191119
}
11201120
const currentYearStyle = this.doc.createElement('style');
1121-
currentYearStyle.textContent = `:root { --current-year: ${this.opts.date!.getFullYear()}; }`;
1121+
currentYearStyle.textContent = `
1122+
@media print {
1123+
@page :left {
1124+
@bottom-right {
1125+
content: '© Ecma International ${this.opts.date!.getFullYear()}';
1126+
}
1127+
}
1128+
@page :right {
1129+
@bottom-left {
1130+
content: '© Ecma International ${this.opts.date!.getFullYear()}';
1131+
}
1132+
}
1133+
@page :first {
1134+
@bottom-left {
1135+
content: '';
1136+
}
1137+
@bottom-right {
1138+
content: '';
1139+
}
1140+
}
1141+
}
1142+
`;
11221143
this.doc.head.appendChild(currentYearStyle);
11231144
this.addStyle(
11241145
this.doc.head,

0 commit comments

Comments
 (0)