Skip to content

Commit

Permalink
[tools/makereport] Tweak vertical whitespace styling, add end tags
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoeppe committed Sep 8, 2022
1 parent 8f153df commit 08c053a
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions tools/makereport
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

readonly paper="${1%.md}"

(cat <<HEAD
(cat <<HEAD
<!DOCTYPE html>
<html><head><meta charset="utf-8">
<html>
<head>
<meta charset="utf-8">
<style>
html {
font-size: 100%;
Expand Down Expand Up @@ -45,8 +47,8 @@ span.backtick {
a::-moz-selection{background:rgba(255,255,0,0.3);color:#0645ad}
a::selection{background:rgba(255,255,0,0.3);color:#0645ad}
p{
margin:1em 0;
p {
margin: 0 0 1.35em 0;
}
img{
Expand All @@ -61,7 +63,7 @@ h1,h2,h3,h4,h5,h6 {
h4,h5,h6{ font-weight: bold; }
h1{ font-size:2.5em; }
h2{ font-size:2em; border-bottom:1px solid silver; padding-bottom: 5px; }
h3{ font-size:1.5em; }
h3{ font-size:1.5em; margin: 1em 0 0.5em 0; }
h4{ font-size:1.2em; }
h5{ font-size:1em; }
h6{ font-size:0.9em; }
Expand All @@ -75,14 +77,14 @@ border-left: 0.5em #EEE solid;
hr { display: block; height: 2px; border: 0; border-top: 1px solid #aaa;border-bottom: 1px solid #eee; margin: 1em 0; padding: 0; }
pre, code, kbd, samp {
pre, code, kbd, samp {
font-family: "DejaVu Sans Mono", Consolas, Courier, serif;
}
kbd, samp {
color: #000;
kbd, samp {
color: #000;
border-radius:3px;
background-color: #F8F8F8;
border: 1px solid #CCC;
border: 1px solid #CCC;
}
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 5px 12px;}
Expand All @@ -98,9 +100,9 @@ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: b
sup { top: -0.5em; }
sub { bottom: -0.25em; }
ul, ol { margin: 1em 0; padding: 0 0 0 2em; }
ul ul, ul ol, ol ul, ol ol { margin: 0; padding: 0 0 0 1em; }
li { padding: 1ex 0; }
ul, ol { margin: 0 0 1em 0; padding: 0 0 0 2em; }
ul ul, ul ol, ol ul, ol ol { margin: 0; padding: 0 0 0 1.35em; }
li { padding: 0 0 1ex 0; }
li p:last-child { margin: 0 }
dd { margin: 0 0 0 2em; }
Expand Down Expand Up @@ -138,4 +140,6 @@ HEAD
echo -e "</style>\n<title>$(echo -n "${paper}" | tr prn PRN)</title>\n</head>\n<body>"

markdown "${1}"

echo -e "</body>\n</html>"
) > "${paper}.html"

0 comments on commit 08c053a

Please sign in to comment.