user guide: put borders on body content

This commit is contained in:
Josh Holtrop 2019-06-09 15:34:41 -04:00
parent 0d2fe02b9c
commit 812b1cbe9c
2 changed files with 29 additions and 3 deletions

View File

@ -3,7 +3,27 @@
<title>RScons User Guide - Version <%= Rscons::VERSION %></title>
<style>
body {
max-width: 140ex;
background-color: #CCC;
margin: 0px;
padding: 0px;
}
#body-table {
margin-left: auto;
margin-right: auto;
border-collapse: collapse;
}
#body-left-border {
width: 10px;
background-image: linear-gradient(to right, #CCC, #000, #FFF);
}
#body-right-border {
width: 10px;
background-image: linear-gradient(to right, #FFF, #000, #CCC);
}
#body-center {
background-color: #FFF;
max-width: 120ex;
padding: 1ex;
}
.code {
padding-left: 2ex;
@ -28,6 +48,12 @@
</style>
</head>
<body>
<%= body %>
<table id="body-table">
<tr>
<td id="body-left-border"></td>
<td id="body-center"><%= content %></td>
<td id="body-right-border"></td>
</tr>
</table>
</body>
</html>

View File

@ -42,7 +42,7 @@ class Generator
renderer = Redcarpet::Render::HTML.new
markdown = Redcarpet::Markdown.new(renderer)
body = markdown.render(@sections.last.contents)
content = markdown.render(@sections.last.contents)
template = File.read("rb/assets/user_guide.html.erb")
erb = ERB.new(template, nil, "<>")