Skip to content

Commit fd82cc7

Browse files
committed
better print
1 parent 57f94bd commit fd82cc7

7 files changed

Lines changed: 70 additions & 62 deletions

File tree

Rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class Nanoc::Filter
106106

107107
@output << match.pre_match
108108

109-
@output << %(\n<a class="slide_break" id="slide-#{i}" href="slide.html#slide-#{i}" title="Wechsle zur Präsentations-Ansicht, Folie Nr. #{i}">▻</a>\n\n)
109+
@output << %(\n<a class="slide_break do-not-print" id="slide-#{i}" href="slide.html#slide-#{i}" title="Wechsle zur Präsentations-Ansicht, Folie Nr. #{i}">▻</a>\n\n)
110110
i += 1
111111
if match[0] =~ /§/
112112
# discard match

content/assets/css/all.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,13 @@ body {
232232
background-color: #ffffff;
233233
}
234234

235+
@media print {
236+
.do-not-print {
237+
display: none !important;
238+
}
239+
}
240+
241+
235242
@media (prefers-color-scheme: dark) {
236243
body {
237244
color: #ddd;

content/images/css-absolute/style.css

Lines changed: 57 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ a { color: rgb(60, 60, 60); text-decoration: none; }
1717
.italic { font-style: italic; }
1818

1919

20+
2021
@media screen and (min-width: 992px) {
2122

2223
body {
@@ -55,49 +56,49 @@ a { color: rgb(60, 60, 60); text-decoration: none; }
5556
}
5657
.header .logo {
5758
width: 160px;
58-
}
59+
}
5960
.header .messages {
60-
width: 715px;
61-
height: 62px;
61+
width: 715px;
62+
height: 62px;
6263
margin-bottom: 0px;
63-
padding: 0 20px 23px 20px;
64-
}
64+
padding: 0 20px 23px 20px;
65+
}
6566

6667
.footer .wrapper {
6768
width: 896px;
6869
margin:auto;
69-
}
70+
}
7071

7172
#project .left {
7273
float: left;
7374
margin-right: 24px;
7475
width: 284px;
7576
clear: both;
76-
}
77+
}
7778
#project .right {
7879
float: left;
7980
width: 588px;
8081
margin-top: 12px;
81-
}
82+
}
8283
#project .long_description {
8384
display: none;
84-
}
85+
}
8586

8687
#project .long_description {
8788
-moz-column-gap: 24px;
88-
-moz-column-count: 3;
89+
-moz-column-count: 3;
8990
column-gap: 24px;
9091
column-count: 3;
9192
text-align: justify;
9293
margin-top: 24px;
93-
}
94+
}
9495
}
9596

9697

9798
/* Tablet Layout: 768px. */
9899

99100
@media screen and (min-width: 768px) and (max-width: 991px) {
100-
101+
101102
body {
102103
position: relative;
103104
}
@@ -106,16 +107,16 @@ a { color: rgb(60, 60, 60); text-decoration: none; }
106107
min-width: 712px;
107108
padding-top: 42px;
108109
margin: 0 auto;
109-
}
110+
}
110111
.header {
111112
width: 100%;
112113
box-sizing: border-box;
113-
}
114+
}
114115
.header .button {
115116
box-sizing: border-box;
116117
width: 20%;
117118
height: 32px;
118-
}
119+
}
119120
.header .fhlogo {
120121
width: 197px;
121122
height: 72px;
@@ -127,21 +128,21 @@ a { color: rgb(60, 60, 60); text-decoration: none; }
127128
}
128129
.header .logo {
129130
width: 160px;
130-
}
131+
}
131132
.header .messages {
132-
width: 715px;
133-
height: 62px;
133+
width: 715px;
134+
height: 62px;
134135
margin-bottom: 0px;
135-
padding: 0 20px 23px 20px;
136-
}
136+
padding: 0 20px 23px 20px;
137+
}
137138
.header .messages a {
138139
font-size: 18px;
139140
line-height: 20px;
140-
}
141+
}
141142
.footer .wrapper {
142143
width: 896px;
143144
margin:auto;
144-
}
145+
}
145146

146147
#project {
147148
display: flex;
@@ -158,57 +159,57 @@ a { color: rgb(60, 60, 60); text-decoration: none; }
158159
flex: 2;
159160
width: 284px;
160161
margin-right: 24px;;
161-
}
162+
}
162163
#project .right {
163164
flex: 4;
164-
}
165+
}
165166
#project .long_description {
166167
display: none;
167-
}
168+
}
168169
#project .long_description {
169170
-moz-column-gap: 24px;
170-
-moz-column-count: 3;
171+
-moz-column-count: 3;
171172
column-gap: 24px;
172173
column-count: 3;
173174
text-align: justify;
174175
margin-top: 24px;
175-
}
176+
}
176177
}
177178

178179

179180

180181
/* Mobile Layout: 320px. */
181182

182183
@media screen and (min-width: 451px) and (max-width: 767px) {
183-
184+
184185
body {
185186
position: relative;
186187
}
187188
.page_container {
188189
position: relative;
189190
box-model: border-box;
190191
padding: 20px;
191-
}
192+
}
192193
.header {
193194
width: 100%;
194195
box-sizing: border-box;
195-
}
196+
}
196197
.header .button {
197198
box-sizing: border-box;
198199
width: 20%;
199200
height: 32px;
200-
}
201+
}
201202
.header .logo svg, .header .fhlogo svg {
202203
width: 100px;
203204
height: auto;
204-
}
205+
}
205206
.header .messages a {
206207
font-size: 18px;
207208
line-height: 20px;
208-
}
209+
}
209210
.footer .wrapper {
210211
width: 100%;
211-
}
212+
}
212213

213214
#project {
214215
display: flex;
@@ -225,58 +226,58 @@ a { color: rgb(60, 60, 60); text-decoration: none; }
225226
#project .left {
226227
width: 100%;
227228
order: 99;
228-
}
229+
}
229230
#project .right {
230231
width: 100%;
231232
order: 2;
232-
}
233+
}
233234
#project .short_description {
234235
display: none;
235-
}
236+
}
236237
#project .long_description {
237238
-moz-column-gap: 24px;
238-
-moz-column-count: 2;
239+
-moz-column-count: 2;
239240
column-gap: 24px;
240241
column-count: 2;
241242
text-align: justify;
242243
margin-top: 24px;
243-
}
244+
}
244245
}
245246

246247

247248
@media screen and (max-width: 450px) {
248-
249+
249250
body {
250251
position: relative;
251252
}
252253
.page_container {
253254
position: relative;
254255
box-model: border-box;
255256
padding: 10px;
256-
}
257+
}
257258
.header {
258259
width: 100%;
259260
box-sizing: border-box;
260-
}
261+
}
261262
.header .button {
262263
box-sizing: border-box;
263264
width: 50%;
264265
height: 32px;
265-
}
266+
}
266267
.header .button:empty {
267268
display:none;
268269
}
269270
.header .logo svg, .header .fhlogo svg {
270271
width: 100px;
271272
height: auto;
272-
}
273+
}
273274
.header .messages a {
274275
font-size: 18px;
275276
line-height: 20px;
276-
}
277+
}
277278
.footer .wrapper {
278279
width: 100%;
279-
}
280+
}
280281

281282
#project {
282283
display: flex;
@@ -286,33 +287,33 @@ a { color: rgb(60, 60, 60); text-decoration: none; }
286287
justify-content: space-between;
287288
}
288289
#project .heading {
289-
width: 100%;
290+
width: 100%;
290291
order: 1;
291292
}
292293

293294
#project .left {
294295
width: 100%;
295296
order: 99;
296-
}
297+
}
297298
#project .right {
298299
width: 100%;
299300
order: 2;
300-
}
301+
}
301302
#project .short_description {
302303
display: none;
303-
}
304+
}
304305
#project .long_description {
305306
-moz-column-gap: 24px;
306-
-moz-column-count: 2;
307+
-moz-column-count: 2;
307308
column-gap: 24px;
308309
column-count: 2;
309310
text-align: justify;
310311
margin-top: 24px;
311-
}
312+
}
312313
#project embed {
313314
width: 100%;
314315
height: auto;
315-
}
316+
}
316317

317318
#filter td {
318319
padding: 2px !important;
@@ -322,9 +323,9 @@ a { color: rgb(60, 60, 60); text-decoration: none; }
322323
width: 100% !important;
323324
}
324325
#search .form .search_input {
325-
width: 100% !important;
326+
width: 100% !important;
326327
}
327328
#profile .middle_column, #profile .right_column {
328-
width: 100% !important;
329+
width: 100% !important;
329330
}
330-
}
331+
}

layouts/article_footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="pagination">
1+
<div class="pagination do-not-print">
22
<ul>
33
<% if @item %>
44
<% if @item[:previous_item] %>

layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h2 class="title" id="slide-0">
99
<%= @item[:title] %>
1010
</h2>
11-
<a href="<%= @item.reps[:slide].path %>">als Präsentation ▻</a>
11+
<a href="<%= @item.reps[:slide].path %>" class="do-not-print">als Präsentation ▻</a>
1212
</div>
1313
<% end %> <%= yield %> <%= render 'article_footer' %>
1414
</div>

layouts/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
<div class="row">
33
<div class="span12" id="legal">
4-
<p class="copyright">veröffentlicht unter <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/at/deed.de">creative commons by-nc-sa</a> in den Jahren 2012-2024 von <a href="#">Brigitte Jellinek</a>.</p>
5-
<p>Zum Weiterentwickeln dieser Seite: <a href="https://github.com/web-development/web-development-textbook">Projekt forken</a> oder <a href="https://github.com/web-development/web-development-textbook/blob/master/<%= @item[:filename] %>">Kommentar zu dieser Seite</a></p>
4+
<p class="copyright">veröffentlicht unter <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/at/deed.de">creative commons by-nc-sa</a> in den Jahren 2012-2025 von <a href="#">Brigitte Jellinek</a>.</p>
5+
<p class="do-not-print">Zum Weiterentwickeln dieser Seite: <a href="https://github.com/web-development/web-development-textbook">Projekt forken</a> oder <a href="https://github.com/web-development/web-development-textbook/blob/master/<%= @item[:filename] %>">Kommentar zu dieser Seite</a></p>
66
</div>
77
</div>
88

layouts/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- sidebar -->
2-
<div id="sidebar" class="span3 offset1">
2+
<div id="sidebar" class="span3 offset1 do-not-print">
33
<div class="page-header">
44
<h2>Kapitel</h2>
55
</div>

0 commit comments

Comments
 (0)