From cdf1377019f323589ca4b68e71239c3c40704377 Mon Sep 17 00:00:00 2001 From: vitrinekast Date: Fri, 27 Jun 2025 20:17:48 +0200 Subject: [PATCH] some full page stuff --- publication/assets/styles/layout.css | 10 +- publication/assets/styles/paged.css | 52 +++++--- publication/assets/styles/table.css | 2 +- publication/assets/styles/typography.css | 14 +- publication/chapters/-1-intro.html | 4 +- publication/chapters/0-gather.html | 4 +- publication/chapters/1-dismantling.html | 4 +- .../chapters/2-component-salvaging.html | 4 +- publication/chapters/3-recipes.html | 4 +- publication/chapters/4-reflection.html | 4 +- publication/chapters/5-bib.html | 4 +- publication/chapters/index.html | 120 +++++------------- publication/components/0_resistor.html | 4 +- publication/components/1_capacitor.html | 4 +- publication/components/chips.html | 4 +- publication/components/inputs.html | 4 +- publication/components/pcb.html | 4 +- publication/components/transistor.html | 4 +- publication/devices/cassette-recorder.html | 4 +- publication/devices/hard-drive.html | 4 +- publication/devices/mp3-fm-radio.html | 4 +- .../devices/reel-to-reel-recorder.html | 4 +- publication/devices/telephone.html | 4 +- .../devices/v2s-metal-detector-thing.html | 4 +- publication/index.html | 120 +++++------------- publication/newsletters/december.html | 4 +- publication/recipes/PCB-keyboard/index.html | 118 +++++------------ .../recipes/SingleTransistorOsc/index.html | 118 +++++------------ publication/recipes/power-supply/index.html | 118 +++++------------ publication/repair-logs/20241031.html | 4 +- publication/repair-logs/28112024.html | 4 +- src/templates/snippets/page-detail.jinja | 10 +- 32 files changed, 235 insertions(+), 535 deletions(-) diff --git a/publication/assets/styles/layout.css b/publication/assets/styles/layout.css index 3413d23..4b6f9da 100644 --- a/publication/assets/styles/layout.css +++ b/publication/assets/styles/layout.css @@ -121,7 +121,7 @@ figure { counter-increment: figure-counter; } -article figure:has(.img--fullpage) { +article figure:has(.img--fullpage), figure:has(.img--fullpage) { margin-right: calc(var(--footnote-w) * -1); clear: both; margin-top: 2rem; @@ -140,12 +140,14 @@ article figure:has(.img--fullpage) { break-inside: avoid; } -article figure:has(.img--fullpage) img { + +article figure:has(.img--fullpage) img, figure:has(.img--fullpage) img { position: absolute; - height: 200%; + height: 200% !important; + transform: scale(1.01); } -article figure:has(.img--fullpage) figcaption { +article figure:has(.img--fullpage) figcaption, figure:has(.img--fullpage) figcaption { position: absolute; z-index: 2; bottom: calc(var(--pagedjs-pagebox-height)*-0.5 + var(--pagedjs-margin-bottom)); diff --git a/publication/assets/styles/paged.css b/publication/assets/styles/paged.css index 4242997..26931a2 100644 --- a/publication/assets/styles/paged.css +++ b/publication/assets/styles/paged.css @@ -1,7 +1,12 @@ -:root { - --print-margin-x: 8mm; + +@page { + size: A5; + margin: 13mm 10mm; } +.pagedjs_area:has(.img--fullpage) { + height: 200%; +} body { font-size: var(--font-size-base); } @@ -37,20 +42,25 @@ body { counter-reset: page; } +[template-type="back"] { + page: front; + counter-reset: page; +} + [template-type="circuit"] { page: circuit; break-before: page; } - -@page { - size: A5; - margin: 13mm var(--print-margin-x); - /* marks: crop cross; */ +@page:right { + margin-left: 16mm; } + @page:left { + margin-right: 16mm; + @bottom-left { content: counter(page); } @@ -123,7 +133,7 @@ body { @page image { margin-top: auto; position: relative; - margin: var(--print-margin-x) var(--print-margin-x); + margin: 13mm 13mm; header { position: absolute; @@ -202,10 +212,6 @@ body { font-size: 8px; max-width: calc(100% - 4mm); } - - @top-right { - content: "imaaagggee"; - } } @page imagespread { @@ -244,12 +250,26 @@ body { } } -article:has([data-chapter-title]), article:has([data-subchapter-title]) { - break-before: page; +@page back { + background: pink; + position: relative; + + @top-right { + content: none; + } + + @top-left { + content: none; + } + + @bottom-right { + content: none; + } + } -.table-wide { - /* break-before: page; */ +article:has([data-chapter-title]), article:has([data-subchapter-title]) { + break-before: page; } article>*:first-of-type:is(table) { diff --git a/publication/assets/styles/table.css b/publication/assets/styles/table.css index 3bc3f9a..30c5b1e 100644 --- a/publication/assets/styles/table.css +++ b/publication/assets/styles/table.css @@ -1,4 +1,4 @@ -table { + table { border-spacing: 0px; } thead { diff --git a/publication/assets/styles/typography.css b/publication/assets/styles/typography.css index 4841360..900a074 100644 --- a/publication/assets/styles/typography.css +++ b/publication/assets/styles/typography.css @@ -1,4 +1,4 @@ -:root { + :root { --font-family: "Fira Sans", sans-serif; --font-family-mono: "Fira Mono", serif; } @@ -55,6 +55,10 @@ h6 { font-weight: bold; } +article>*:first-child { + margin-top: 0; +} + h2 { font-size: 1.3em; } @@ -239,19 +243,19 @@ h7 + ul { margin-top: 0; } -/*** Works on common browsers ***/ + ::selection { background-color: var(--accent); color: black; } -/*** Mozilla based browsers ***/ + ::-moz-selection { background-color: var(--accent); color: black; } -/***For Other Browsers ***/ + ::-o-selection { background-color: var(--accent); color: black; @@ -262,7 +266,7 @@ h7 + ul { color: black; } -/*** For Webkit ***/ + ::-webkit-selection { background-color: var(--accent); color: black; diff --git a/publication/chapters/-1-intro.html b/publication/chapters/-1-intro.html index e1be96a..4303743 100644 --- a/publication/chapters/-1-intro.html +++ b/publication/chapters/-1-intro.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/chapters/0-gather.html b/publication/chapters/0-gather.html index e1be96a..4303743 100644 --- a/publication/chapters/0-gather.html +++ b/publication/chapters/0-gather.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/chapters/1-dismantling.html b/publication/chapters/1-dismantling.html index e1be96a..4303743 100644 --- a/publication/chapters/1-dismantling.html +++ b/publication/chapters/1-dismantling.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/chapters/2-component-salvaging.html b/publication/chapters/2-component-salvaging.html index e1be96a..4303743 100644 --- a/publication/chapters/2-component-salvaging.html +++ b/publication/chapters/2-component-salvaging.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/chapters/3-recipes.html b/publication/chapters/3-recipes.html index e1be96a..4303743 100644 --- a/publication/chapters/3-recipes.html +++ b/publication/chapters/3-recipes.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/chapters/4-reflection.html b/publication/chapters/4-reflection.html index e1be96a..4303743 100644 --- a/publication/chapters/4-reflection.html +++ b/publication/chapters/4-reflection.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/chapters/5-bib.html b/publication/chapters/5-bib.html index e1be96a..4303743 100644 --- a/publication/chapters/5-bib.html +++ b/publication/chapters/5-bib.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/chapters/index.html b/publication/chapters/index.html index 1ec1afc..ab16c2f 100644 --- a/publication/chapters/index.html +++ b/publication/chapters/index.html @@ -130,7 +130,7 @@ }); - Index29 - 09 June 2025 + Index30 - 27 June 2025 @@ -139,7 +139,7 @@
- 09 June 2025 + 27 June 2025 Index
@@ -1169,23 +1169,13 @@ role="doc-backlink">↩︎

-
- - -
- These resistors were salvaged from a Reel to Reel recorder - -
These resistors were salvaged from a Reel to Reel recorder
+
+ These resistors were salvaged from a Reel to Reel recorder +
These resistors were salvaged from a Reel to Reel recorder
+ -
- - -
- -
- -
+
@@ -1294,23 +1284,13 @@ class="footnote-back" role="doc-backlink">↩︎

-
- - -
- The various sizes of Capacitors - -
The various sizes of Capacitors
+
+ The various sizes of Capacitors +
The various sizes of Capacitors
+ -
- - -
- -
- -
+
@@ -1414,23 +1394,13 @@ role="doc-backlink">↩︎

-
- - -
- A chip sooooo small the picture has to be blurry - -
A chip sooooo small the picture has to be blurry
+
+ A chip sooooo small the picture has to be blurry +
A chip sooooo small the picture has to be blurry
+ -
- - -
- -
- -
+
@@ -1540,23 +1510,13 @@ role="doc-backlink">↩︎

-
- - -
- A variety of input and output components - -
A variety of input and output components
+
+ A variety of input and output components +
A variety of input and output components
+ -
- - -
- -
- -
+
@@ -1685,9 +1645,7 @@ href="https://doi.org/10.21428/bf6fb269.3881c46e">https://doi.org/10.21428/bf6fb -
- -
+
@@ -1778,23 +1736,13 @@ role="doc-backlink">↩︎

-
- - -
- ‘note to self, not sure all of these are transistors’ - -
‘note to self, not sure all of these are transistors’
+
+ ‘note to self, not sure all of these are transistors’ +
‘note to self, not sure all of these are transistors’
+ -
- - -
- -
- -
+
@@ -2029,9 +1977,7 @@ href="#fnref7" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2186,9 +2132,7 @@ href="#fnref5" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2438,9 +2382,7 @@ role="doc-backlink">↩︎

-
- -
+
diff --git a/publication/components/0_resistor.html b/publication/components/0_resistor.html index e1be96a..4303743 100644 --- a/publication/components/0_resistor.html +++ b/publication/components/0_resistor.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/components/1_capacitor.html b/publication/components/1_capacitor.html index e1be96a..4303743 100644 --- a/publication/components/1_capacitor.html +++ b/publication/components/1_capacitor.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/components/chips.html b/publication/components/chips.html index e1be96a..4303743 100644 --- a/publication/components/chips.html +++ b/publication/components/chips.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/components/inputs.html b/publication/components/inputs.html index e1be96a..4303743 100644 --- a/publication/components/inputs.html +++ b/publication/components/inputs.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/components/pcb.html b/publication/components/pcb.html index e1be96a..4303743 100644 --- a/publication/components/pcb.html +++ b/publication/components/pcb.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/components/transistor.html b/publication/components/transistor.html index e1be96a..4303743 100644 --- a/publication/components/transistor.html +++ b/publication/components/transistor.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/devices/cassette-recorder.html b/publication/devices/cassette-recorder.html index e1be96a..4303743 100644 --- a/publication/devices/cassette-recorder.html +++ b/publication/devices/cassette-recorder.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/devices/hard-drive.html b/publication/devices/hard-drive.html index e1be96a..4303743 100644 --- a/publication/devices/hard-drive.html +++ b/publication/devices/hard-drive.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/devices/mp3-fm-radio.html b/publication/devices/mp3-fm-radio.html index e1be96a..4303743 100644 --- a/publication/devices/mp3-fm-radio.html +++ b/publication/devices/mp3-fm-radio.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/devices/reel-to-reel-recorder.html b/publication/devices/reel-to-reel-recorder.html index e1be96a..4303743 100644 --- a/publication/devices/reel-to-reel-recorder.html +++ b/publication/devices/reel-to-reel-recorder.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/devices/telephone.html b/publication/devices/telephone.html index e1be96a..4303743 100644 --- a/publication/devices/telephone.html +++ b/publication/devices/telephone.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/devices/v2s-metal-detector-thing.html b/publication/devices/v2s-metal-detector-thing.html index e1be96a..4303743 100644 --- a/publication/devices/v2s-metal-detector-thing.html +++ b/publication/devices/v2s-metal-detector-thing.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/index.html b/publication/index.html index 93c85a7..6da998f 100644 --- a/publication/index.html +++ b/publication/index.html @@ -130,7 +130,7 @@ }); - A field guide to salvaging sound devices29 - 09 June 2025 + A field guide to salvaging sound devices30 - 27 June 2025 @@ -139,7 +139,7 @@
- 09 June 2025 + 27 June 2025 A field guide to salvaging sound devices
@@ -1153,23 +1153,13 @@ role="doc-backlink">↩︎

-
- - -
- These resistors were salvaged from a Reel to Reel recorder - -
These resistors were salvaged from a Reel to Reel recorder
+
+ These resistors were salvaged from a Reel to Reel recorder +
These resistors were salvaged from a Reel to Reel recorder
+ -
- - -
- -
- -
+
@@ -1278,23 +1268,13 @@ class="footnote-back" role="doc-backlink">↩︎

-
- - -
- The various sizes of Capacitors - -
The various sizes of Capacitors
+
+ The various sizes of Capacitors +
The various sizes of Capacitors
+ -
- - -
- -
- -
+
@@ -1398,23 +1378,13 @@ role="doc-backlink">↩︎

-
- - -
- A chip sooooo small the picture has to be blurry - -
A chip sooooo small the picture has to be blurry
+
+ A chip sooooo small the picture has to be blurry +
A chip sooooo small the picture has to be blurry
+ -
- - -
- -
- -
+
@@ -1524,23 +1494,13 @@ role="doc-backlink">↩︎

-
- - -
- A variety of input and output components - -
A variety of input and output components
+
+ A variety of input and output components +
A variety of input and output components
+ -
- - -
- -
- -
+
@@ -1669,9 +1629,7 @@ href="https://doi.org/10.21428/bf6fb269.3881c46e">https://doi.org/10.21428/bf6fb -
- -
+
@@ -1762,23 +1720,13 @@ role="doc-backlink">↩︎

-
- - -
- ‘note to self, not sure all of these are transistors’ - -
‘note to self, not sure all of these are transistors’
+
+ ‘note to self, not sure all of these are transistors’ +
‘note to self, not sure all of these are transistors’
+ -
- - -
- -
- -
+
@@ -2013,9 +1961,7 @@ href="#fnref7" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2170,9 +2116,7 @@ href="#fnref5" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2422,9 +2366,7 @@ role="doc-backlink">↩︎

-
- -
+
diff --git a/publication/newsletters/december.html b/publication/newsletters/december.html index e1be96a..4303743 100644 --- a/publication/newsletters/december.html +++ b/publication/newsletters/december.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/recipes/PCB-keyboard/index.html b/publication/recipes/PCB-keyboard/index.html index cda2cce..35cf2e0 100644 --- a/publication/recipes/PCB-keyboard/index.html +++ b/publication/recipes/PCB-keyboard/index.html @@ -139,7 +139,7 @@
- 09 June 2025 + 27 June 2025
@@ -1153,23 +1153,13 @@ role="doc-backlink">↩︎

-
- - -
- These resistors were salvaged from a Reel to Reel recorder - -
These resistors were salvaged from a Reel to Reel recorder
+
+ These resistors were salvaged from a Reel to Reel recorder +
These resistors were salvaged from a Reel to Reel recorder
+ -
- - -
- -
- -
+
@@ -1278,23 +1268,13 @@ class="footnote-back" role="doc-backlink">↩︎

-
- - -
- The various sizes of Capacitors - -
The various sizes of Capacitors
+
+ The various sizes of Capacitors +
The various sizes of Capacitors
+ -
- - -
- -
- -
+
@@ -1398,23 +1378,13 @@ role="doc-backlink">↩︎

-
- - -
- A chip sooooo small the picture has to be blurry - -
A chip sooooo small the picture has to be blurry
+
+ A chip sooooo small the picture has to be blurry +
A chip sooooo small the picture has to be blurry
+ -
- - -
- -
- -
+
@@ -1524,23 +1494,13 @@ role="doc-backlink">↩︎

-
- - -
- A variety of input and output components - -
A variety of input and output components
+
+ A variety of input and output components +
A variety of input and output components
+ -
- - -
- -
- -
+
@@ -1669,9 +1629,7 @@ href="https://doi.org/10.21428/bf6fb269.3881c46e">https://doi.org/10.21428/bf6fb -
- -
+
@@ -1762,23 +1720,13 @@ role="doc-backlink">↩︎

-
- - -
- ‘note to self, not sure all of these are transistors’ - -
‘note to self, not sure all of these are transistors’
+
+ ‘note to self, not sure all of these are transistors’ +
‘note to self, not sure all of these are transistors’
+ -
- - -
- -
- -
+
@@ -2013,9 +1961,7 @@ href="#fnref7" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2170,9 +2116,7 @@ href="#fnref5" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2422,9 +2366,7 @@ role="doc-backlink">↩︎

-
- -
+
diff --git a/publication/recipes/SingleTransistorOsc/index.html b/publication/recipes/SingleTransistorOsc/index.html index cda2cce..35cf2e0 100644 --- a/publication/recipes/SingleTransistorOsc/index.html +++ b/publication/recipes/SingleTransistorOsc/index.html @@ -139,7 +139,7 @@
- 09 June 2025 + 27 June 2025
@@ -1153,23 +1153,13 @@ role="doc-backlink">↩︎

-
- - -
- These resistors were salvaged from a Reel to Reel recorder - -
These resistors were salvaged from a Reel to Reel recorder
+
+ These resistors were salvaged from a Reel to Reel recorder +
These resistors were salvaged from a Reel to Reel recorder
+ -
- - -
- -
- -
+
@@ -1278,23 +1268,13 @@ class="footnote-back" role="doc-backlink">↩︎

-
- - -
- The various sizes of Capacitors - -
The various sizes of Capacitors
+
+ The various sizes of Capacitors +
The various sizes of Capacitors
+ -
- - -
- -
- -
+
@@ -1398,23 +1378,13 @@ role="doc-backlink">↩︎

-
- - -
- A chip sooooo small the picture has to be blurry - -
A chip sooooo small the picture has to be blurry
+
+ A chip sooooo small the picture has to be blurry +
A chip sooooo small the picture has to be blurry
+ -
- - -
- -
- -
+
@@ -1524,23 +1494,13 @@ role="doc-backlink">↩︎

-
- - -
- A variety of input and output components - -
A variety of input and output components
+
+ A variety of input and output components +
A variety of input and output components
+ -
- - -
- -
- -
+
@@ -1669,9 +1629,7 @@ href="https://doi.org/10.21428/bf6fb269.3881c46e">https://doi.org/10.21428/bf6fb -
- -
+
@@ -1762,23 +1720,13 @@ role="doc-backlink">↩︎

-
- - -
- ‘note to self, not sure all of these are transistors’ - -
‘note to self, not sure all of these are transistors’
+
+ ‘note to self, not sure all of these are transistors’ +
‘note to self, not sure all of these are transistors’
+ -
- - -
- -
- -
+
@@ -2013,9 +1961,7 @@ href="#fnref7" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2170,9 +2116,7 @@ href="#fnref5" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2422,9 +2366,7 @@ role="doc-backlink">↩︎

-
- -
+
diff --git a/publication/recipes/power-supply/index.html b/publication/recipes/power-supply/index.html index cda2cce..35cf2e0 100644 --- a/publication/recipes/power-supply/index.html +++ b/publication/recipes/power-supply/index.html @@ -139,7 +139,7 @@
- 09 June 2025 + 27 June 2025
@@ -1153,23 +1153,13 @@ role="doc-backlink">↩︎

-
- - -
- These resistors were salvaged from a Reel to Reel recorder - -
These resistors were salvaged from a Reel to Reel recorder
+
+ These resistors were salvaged from a Reel to Reel recorder +
These resistors were salvaged from a Reel to Reel recorder
+ -
- - -
- -
- -
+
@@ -1278,23 +1268,13 @@ class="footnote-back" role="doc-backlink">↩︎

-
- - -
- The various sizes of Capacitors - -
The various sizes of Capacitors
+
+ The various sizes of Capacitors +
The various sizes of Capacitors
+ -
- - -
- -
- -
+
@@ -1398,23 +1378,13 @@ role="doc-backlink">↩︎

-
- - -
- A chip sooooo small the picture has to be blurry - -
A chip sooooo small the picture has to be blurry
+
+ A chip sooooo small the picture has to be blurry +
A chip sooooo small the picture has to be blurry
+ -
- - -
- -
- -
+
@@ -1524,23 +1494,13 @@ role="doc-backlink">↩︎

-
- - -
- A variety of input and output components - -
A variety of input and output components
+
+ A variety of input and output components +
A variety of input and output components
+ -
- - -
- -
- -
+
@@ -1669,9 +1629,7 @@ href="https://doi.org/10.21428/bf6fb269.3881c46e">https://doi.org/10.21428/bf6fb -
- -
+
@@ -1762,23 +1720,13 @@ role="doc-backlink">↩︎

-
- - -
- ‘note to self, not sure all of these are transistors’ - -
‘note to self, not sure all of these are transistors’
+
+ ‘note to self, not sure all of these are transistors’ +
‘note to self, not sure all of these are transistors’
+ -
- - -
- -
- -
+
@@ -2013,9 +1961,7 @@ href="#fnref7" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2170,9 +2116,7 @@ href="#fnref5" class="footnote-back" role="doc-backlink">↩︎

-
- -
+
@@ -2422,9 +2366,7 @@ role="doc-backlink">↩︎

-
- -
+
diff --git a/publication/repair-logs/20241031.html b/publication/repair-logs/20241031.html index e1be96a..4303743 100644 --- a/publication/repair-logs/20241031.html +++ b/publication/repair-logs/20241031.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/publication/repair-logs/28112024.html b/publication/repair-logs/28112024.html index e1be96a..4303743 100644 --- a/publication/repair-logs/28112024.html +++ b/publication/repair-logs/28112024.html @@ -134,9 +134,7 @@ -
- -
+
diff --git a/src/templates/snippets/page-detail.jinja b/src/templates/snippets/page-detail.jinja index 501faf4..8d02aa4 100644 --- a/src/templates/snippets/page-detail.jinja +++ b/src/templates/snippets/page-detail.jinja @@ -3,7 +3,7 @@ {%- macro showDetail(content, parentChapter, isNested = false) -%} -{% if content['folder'] == 'components' %} +{% if content['folder'] == 'components' and content['images']|length > 1 %}
{% for image in content['images'] %} @@ -19,7 +19,15 @@
{%endif%}
+ {%- if content['folder'] == 'components' and content['images']|length == 1 -%} +
+ {{content['images'][0]['alt']}} + {% if content['images'][0]['alt'] %} +
{{content['images'][0]['alt']}}
+ {% endif %} +
+ {%- endif -%}
{% if isNested %} {% else %}