user guide: put borders on body content
This commit is contained in:
parent
0d2fe02b9c
commit
812b1cbe9c
@ -3,7 +3,27 @@
|
|||||||
<title>RScons User Guide - Version <%= Rscons::VERSION %></title>
|
<title>RScons User Guide - Version <%= Rscons::VERSION %></title>
|
||||||
<style>
|
<style>
|
||||||
body {
|
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 {
|
.code {
|
||||||
padding-left: 2ex;
|
padding-left: 2ex;
|
||||||
@ -28,6 +48,12 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -42,7 +42,7 @@ class Generator
|
|||||||
|
|
||||||
renderer = Redcarpet::Render::HTML.new
|
renderer = Redcarpet::Render::HTML.new
|
||||||
markdown = Redcarpet::Markdown.new(renderer)
|
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")
|
template = File.read("rb/assets/user_guide.html.erb")
|
||||||
erb = ERB.new(template, nil, "<>")
|
erb = ERB.new(template, nil, "<>")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user