Skip to content

Commit

Permalink
Adding rel_prefix to the templates
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed Aug 5, 2009
1 parent 5bd4e2a commit 8f3a469
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
2 changes: 2 additions & 0 deletions extras/rdoc/generator/singledarkfish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def generate_book
chapters.each do |file|
templatefile = @template_dir + template(:page)
outfile = @basedir + @options.op_dir + file.path
rel_prefix = @outputdir.relative_path_from(outfile.dirname)
render_template(templatefile, binding, outfile)
end
end
Expand All @@ -157,6 +158,7 @@ def generate_thing(name, to)

templatefile = @template_dir + template(name)
outfile = @basedir + @options.op_dir + to
rel_prefix = @outputdir.relative_path_from(outfile.dirname)
FileUtils.mkdir_p(File.dirname(outfile))

render_template(templatefile, binding, outfile)
Expand Down
12 changes: 6 additions & 6 deletions extras/rdoc/generator/template/flipbook/page.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<html>
<head>
<title><%= h @options.title %></title>
<link rel="stylesheet" href="rdoc.css" type="text/css" media="screen" />
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/camping.js" type="text/javascript"></script>
<link rel="stylesheet" href="<%= rel_prefix %>/rdoc.css" type="text/css" media="screen" />
<script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"></script>
<script src="<%= rel_prefix %>/js/camping.js" type="text/javascript"></script>
</head>
<body>
<div id="menu">
<ul id="links">
<li><a href="index.html">front</a> | </li>
<li><a href="book.html">ToC</a> | </li>
<li><a href="api.html">reference</a> | </li>
<li><a href="<%= rel_prefix %>/index.html">front</a> | </li>
<li><a href="<%= rel_prefix %>/book.html">ToC</a> | </li>
<li><a href="<%= rel_prefix %>/api.html">reference</a> | </li>
<li><a href="http://wiki.github.com/why/camping">wiki</a> | </li>
<li><a href="http://github.com/why/camping">code</a></li>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions extras/rdoc/generator/template/flipbook/readme.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<html>
<head>
<title><%= h @options.title %></title>
<link rel="stylesheet" href="rdoc.css" type="text/css" media="screen" />
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/camping.js" type="text/javascript"></script>
<link rel="stylesheet" href="<%= rel_prefix %>/rdoc.css" type="text/css" media="screen" />
<script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"></script>
<script src="<%= rel_prefix %>/js/camping.js" type="text/javascript"></script>
</head>
<body>
<div id="menu">
<ul id="links">
<li><a href="book.html">book</a> | </li>
<li><a href="api.html">reference</a> | </li>
<li><a href="<%= rel_prefix %>/book.html">book</a> | </li>
<li><a href="<%= rel_prefix %>/api.html">reference</a> | </li>
<li><a href="http://wiki.github.com/why/camping">wiki</a> | </li>
<li><a href="http://github.com/why/camping">code</a></li>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions extras/rdoc/generator/template/flipbook/reference.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<html>
<head>
<title>Camping, the Reference</title>
<link rel="stylesheet" href="rdoc.css" type="text/css" media="screen" />
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/camping.js" type="text/javascript"></script>
<link rel="stylesheet" href="<%= rel_prefix %>/rdoc.css" type="text/css" media="screen" />
<script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"></script>
<script src="<%= rel_prefix %>/js/camping.js" type="text/javascript"></script>
</head>
<body>
<div id="menu">
<ul id="links">
<li><a href="index.html">front</a> | </li>
<li><a href="book.html">book</a> | </li>
<li><a href="<%= rel_prefix %>/index.html">front</a> | </li>
<li><a href="<%= rel_prefix %>/book.html">book</a> | </li>
<li><a href="http://wiki.github.com/why/camping">wiki</a> | </li>
<li><a href="http://github.com/why/camping">code</a></li>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions extras/rdoc/generator/template/flipbook/toc.rhtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<html>
<head>
<title><%= @options.title %></title>
<link rel="stylesheet" href="rdoc.css" type="text/css" media="screen" />
<script src="js/jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="<%= rel_prefix %>/rdoc.css" type="text/css" media="screen" />
<script src="<%= rel_prefix %>/js/jquery.js" type="text/javascript"></script>
<script src="js/camping.js" type="text/javascript"></script>
</head>
<body>
<div id="menu">
<ul id="links">
<li><a href="index.html">front</a> | </li>
<li><a href="api.html">reference</a> | </li>
<li><a href="<%= rel_prefix %>/index.html">front</a> | </li>
<li><a href="<%= rel_prefix %>/api.html">reference</a> | </li>
<li><a href="http://wiki.github.com/why/camping">wiki</a> | </li>
<li><a href="http://github.com/why/camping">code</a></li>
</ul>
Expand Down

0 comments on commit 8f3a469

Please sign in to comment.