-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathmd2html.erb
92 lines (90 loc) · 1.4 KB
/
md2html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css" media="all">
body {
font: 20px/150% sans-serif;
margin: 50px;
}
.container {
width: 800px;
}
p {
margin: 0 0 1em 0;
}
h1 {
font: bold 45pt/42pt sans-serif;
letter-spacing: -1pt;
color: #333;
}
h1 + p {
page-break-after:always;
}
h2, h3, h4, h5 {
margin: 1.5em 0 0.5em 0;
line-height: 1em;
}
h2 {
font-size: 2em;
}
h3 {
font-size: 1.5em;
}
h4 {
font-size: 1.2em;
}
a, a:link, a:active, a:hover, a:visited {
color: black;
}
blockquote {
font-size: 20pt;
line-height: 28pt;
color: gray;
}
pre {
padding: 15px;
background: #ddd !important;
width: 970px;
overflow: auto;
}
img {
margin-top: 1.5em;
}
img + br + em {
color: #888;
font-style: normal;
}
table {
width: 80%;
border-spacing: 0;
margin-bottom: 1.5em;
text-align: left;
}
thead th {
font-weight: bold;
border-top: 1px solid #000;
border-bottom: 1px solid #000;
}
td {
border-bottom: 1px solid #000;
padding: 0.1em
}
tbody tr:last-child td {
border: none;
}
strong em {
color: gray;
font-weight: normal;
font-style: normal;
}
</style>
</head>
<body>
<div class="container">
<%= html %>
</div>
</body>
</html>