Print style fixes

This commit is contained in:
Joshua Goins 2024-02-19 18:06:37 -05:00
parent 369d3b899f
commit ad3cfc5397
3 changed files with 77 additions and 2 deletions

View file

@ -163,6 +163,81 @@ body {
} }
} }
/* printers */
@media print {
:root {
--link: blue;
--secondary-accent: #c99192;
--border-color: black;
--background-primary: #fff !important;
--background-secondary: #fdfdfd;
--background-tertiary: #f0f0f0;
--text-color: #222;
--link-visited: #460b0b;
--extra-color: #efe4e4;
--border: 0px single transparent;
--shadow: 0px 0px 0px transparent;
}
aside {
visibility: hidden;
height: 0 !important;
padding: 0 !important;
}
@page {
margin: 0.5in;
}
h1, h2, h3, h4, h5, h6 {
page-break-after: avoid !important;
}
p, li, blockquote, figure, img {
page-break-inside: avoid !important;
}
#content {
display: block !important;
}
.breadcrumbs {
visibility: hidden;
height: 0;
}
header {
visibility: hidden;
height: 0;
}
.external-link {
visibility: hidden;
width: 0;
}
footer {
visibility: hidden;
height: 0;
padding: 0 !important;
}
.header-link {
visibility: hidden;
height: 0;
}
details {
visibility: hidden;
height: 0;
}
.voting-container {
visibility: hidden;
height: 0;
}
}
a:link { a:link {
color: var(--link); color: var(--link);
} }

View file

@ -1 +1 @@
<h{{ add .Level 2 }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}">#</a></h{{ add .Level 2 }}> <h{{ add .Level 2 }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a class="header-link" href="#{{ .Anchor | safeURL }}">#</a></h{{ add .Level 2 }}>

View file

@ -4,6 +4,6 @@
{{ $id := urlize $header_name }} {{ $id := urlize $header_name }}
{{ printf "<%s id=\"%s\">" $header_type $id | safeHTML }} {{ printf "<%s id=\"%s\">" $header_type $id | safeHTML }}
{{ $header_name }} {{ $header_name }}
<a href="#{{ $id }}">#</a> <a class="header-link" href="#{{ $id }}">#</a>
{{ printf "</%s>" $header_type | safeHTML }} {{ printf "</%s>" $header_type | safeHTML }}