-
Notifications
You must be signed in to change notification settings - Fork 0
/
document.html
39 lines (37 loc) · 1.13 KB
/
document.html
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
<!DOCTYPE html>
<html>
<head>
<% if @converter.root.options[:encoding] %>
<meta http-equiv="Content-type" content="text/html;<%= @converter.root.options[:encoding] %>">
<% end %>
<%
extend ::Kramdown::Utils::Html
title = ''
h = @converter.root.children.find {|c| c.type == :header}
if h
collector = lambda {|c| c.children.collect {|cc| cc.type == :text ? escape_html(cc.value, :text) : collector.call(cc)}.join('')}
title = collector.call(h)
end
%>
<title><%= title %></title>
<link rel="icon" type="image/png" href="favicon.png"/>
<meta name="generator" content="kramdown <%= ::Kramdown::VERSION %>" />
<meta charset=<%= @converter.root.options[:encoding] %>>
<style type="text/css">
body {font:12px Verdana; color: #222; margin:0 auto}
h1, h2, h3, h4, h5, h6 {font-size:100%; margin:0; font-weight:normal}
h1 {font-size:200%; color:#A30000}
h2 {font-size:150%; color:#A30000}
img {
padding: 0;
display: block;
margin: 0 auto;
max-height: 100%;
max-width: 100%;
}
</style>
</head>
<body>
<%= @body %>
</body>
</html>