Procházet zdrojové kódy

improved print styles

Heydon Pickering před 8 roky
rodič
revize
a855c1bd67

+ 13 - 5
docs/css/styles.css

@@ -887,10 +887,9 @@ h1 svg {
   font-size: 1.25rem;
 }
 
-.pattern-section + .pattern-section {
-  padding-top: 5rem;
-  margin-top: 5rem;
-  border-top: 2px solid;
+.pattern-section:not(:last-child) {
+  padding-bottom: 2.25rem;
+  border-bottom: 2px solid;
 }
 
 .pattern-section h1 {
@@ -995,6 +994,10 @@ h1 svg {
     word-break: break-word;
   }
 
+  main nav a::after {
+    content: '';
+  }
+
   .cmd {
     background: #fff;
     color: #111;
@@ -1029,8 +1032,13 @@ h1 svg {
     display: none;
   }
 
-  main * {
+  main *:not(.with-desc) {
     page-break-inside: avoid;
   }
 
+  .note.warning {
+    border-left: 0.5rem solid;
+    background: none;
+  }
+
 }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
docs/service-worker.js


+ 1 - 0
node/toPDF.js

@@ -0,0 +1 @@
+console.log('toPDF')

+ 2 - 1
package.json

@@ -7,7 +7,8 @@
     "test": "echo \"Error: no test specified\" && exit 1",
     "serve": "hugo server --baseURL http://localhost:1313",
     "clean": "rm -rf content && mkdir content && mkdir content/patterns && hugo new patterns/pattern.md && hugo new _index.md && hugo new print-version.md --kind print-version",
-    "build": "rm -rfv docs/* && hugo && sw-precache --root=docs && git add -A"
+    "build": "rm -rfv docs/* && hugo && sw-precache --root=docs && git add -A",
+    "pdf": "node ./node/toPDF.js"
   },
   "pre-commit": [
     "build"

+ 13 - 5
themes/infusion/static/css/styles.css

@@ -887,10 +887,9 @@ h1 svg {
   font-size: 1.25rem;
 }
 
-.pattern-section + .pattern-section {
-  padding-top: 5rem;
-  margin-top: 5rem;
-  border-top: 2px solid;
+.pattern-section:not(:last-child) {
+  padding-bottom: 2.25rem;
+  border-bottom: 2px solid;
 }
 
 .pattern-section h1 {
@@ -995,6 +994,10 @@ h1 svg {
     word-break: break-word;
   }
 
+  main nav a::after {
+    content: '';
+  }
+
   .cmd {
     background: #fff;
     color: #111;
@@ -1029,8 +1032,13 @@ h1 svg {
     display: none;
   }
 
-  main * {
+  main *:not(.with-desc) {
     page-break-inside: avoid;
   }
 
+  .note.warning {
+    border-left: 0.5rem solid;
+    background: none;
+  }
+
 }

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů