commit 6765f3c18aee407eab3e7e20a32c0bf24e414a81
parent f2f74c4fbc9b5794ff9daf27d0e279274ae59441
Author: Hugo Soucy <hugo@soucy.cc>
Date: Tue, 26 Oct 2021 22:15:04 -0400
Add new styles in the HEAD element
Diffstat:
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/src/css/print.css b/src/css/print.css
@@ -0,0 +1,31 @@
+/* body * { display: none !important; } */
+/* body:after { content: "Don't waste paper!"; } */
+
+body {
+ font-size: 12pt;
+}
+
+body > footer,
+body > header,
+body > nav {
+ display: none;
+}
+
+.main__aside,
+.hentry__categories,
+.hentry__footer [rel] {
+ display: none;
+}
+
+/* target all pages */
+@page {
+ margin: 2cm;
+}
+
+/* .print-mode__checkbox { */
+/* display: none; */
+/* } */
+
+/* .print-mode__checkbox:checked + section { */
+/* border: 3px solid red; */
+/* } */
diff --git a/templates/head.html b/templates/head.html
@@ -79,8 +79,7 @@
header,
main,
nav,
- section,
- summary {
+ section {
display: block
}
@@ -108,6 +107,11 @@
rel="stylesheet"/>
<link
+ href="/css/print.css"
+ media="print"
+ rel="stylesheet"/>
+
+ <link
href="<%= permalink -%>"
hreflang="<%= language -%>"
rel="canonical" />