template.rhtml

squi.rb

This application is distributed under the GPL.

Send all comments or suggestions to jonathantan86@hotmail.com.

This is version 0.11 (Mar 14, 2006).
Older versions: 0.1

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html>
 <head>
 <link rel="stylesheet" type="text/css" href="default2.css">
 <title>yondalf: <%= current_node.name %></title>
 </head>
 <body>
 <div id="title">
 <%= current_node.name %>
 </div>
 
 <table width="100%"><col width="25%"><col width="75%">
 <tr><td id="toc">
 <h2><a href="index.html"><%= root_node.name %></a></h2>
 <ul>
 <% def html_tree(node, current_node)
     if node==current_node
         ret = "<li><span class='current'>#{node.name}</span>"
     else
         ret = "<li class='#{node.type.to_s}'><a href='#{node.filename}.html'>#{node.name}</a>"
     end
     unless node.children.empty?
         ret += "<ul>" + node.children.collect{|n| html_tree(n, current_node)}.join
     end
     return ret + "</li>"
 end %>
 <%= root_node.children.collect{|n| html_tree n, current_node}.join %>
 </ul>
 <p>
 This application is distributed under the <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a>.
 </p><p>
 Send all comments or suggestions to <a href="mailto:jonathantan86@hotmail.com">jonathantan86@hotmail.com</a>.
 </p><p>
 This is version 0.11 (Mar 14, 2006).<br>Older versions: <a href="01/">0.1</a>
 </p>
 </td>
 
 <td id="content">
 <% current_node.sections.each do |s|
 if s.type == :code %>
 <pre><%= CGI.escapeHTML(s.content.to_a.collect{|s| ' '+s}.join.gsub("\t",'    ')) %></pre>
 <% elsif s.type == :comment %>
 <%= RedCloth.new("\n" + s.content + "\n").to_html %>
 <% elsif s.type == :folder %>
 <div class="folder">
     <a href="<%= s.linkto %>"><%= s.content %></a>
 </div>
 <% elsif s.type == :link %>
 <div class="link">
     <a href="<%= s.linkto %>"><%= s.content %> (Link)</a>
 </div>
 <% end
 end %>
 </td>
 </body>
 
 </html>