Explorar o código

improved print styles

Heydon Pickering %!s(int64=8) %!d(string=hai) anos
pai
achega
a855c1bd67
Modificáronse 5 ficheiros con 29 adicións e 11 borrados
  1. 13 5
      docs/css/styles.css
  2. 0 0
      docs/service-worker.js
  3. 1 0
      node/toPDF.js
  4. 2 1
      package.json
  5. 13 5
      themes/infusion/static/css/styles.css

+ 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;
+  }
+
 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 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;
+  }
+
 }

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio