Find file
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (62 sloc) 2.26 KB
<%
prevPage = pak.index > 1 ? "expansion-pak-#{ pak.index - 1 }.html" : "index.html"
nextPage = pak.index < book.expansion_paks.length ? "expansion-pak-#{ pak.index + 1 }.html" : "index.html"
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%= book.title.to_html %> :: Expansion Pak #<%= pak.index %>. <%= pak.title.to_html %></title>
<link rel="stylesheet" type="text/css" href="guide.css" />
</head>
<body>
<div id="pakbanner">
<div class="pager">
&lt; <a class="pagebar" href="<%= prevPage %>">prev</a> | <a class="pagebar" href="<%= nextPage %>">next</a> &gt;
</div>
<div class="title">
<h3>why&#8217;s <span class="hilite">(poignant)</span> guide to ruby</h3>
&nbsp;<a class="pagebar" href="http://whytheluckystiff.net/"><b>whytheluckystiff.net</b></a> &gt; <a class="pagebar" href="index.html">Contents</a>
</div>
</div>
<div id="container">
<div class="page">
<div class="pageTitle">
<h3>Expansion Pak No. <%= pak.index %>.</h3>
<h1><%= pak.title.to_html %></h1>
</div>
<div class="content">
<% pak.sections.each do |sect|
if sect.respond_to? :file_name %>
<img src="<%= sect.file_name %>" /><br />
<% elsif sect.respond_to? :header %>
<a name="section<%= sect.index %>" />
<h2><%= sect.index %>. <%= sect.header %></h2>
<%= sect.content.to_html %>
<% elsif sect.respond_to? :title %>
<div class="sidebar">
<h1>sidebar!</h1>
<h2><%= sect.title.to_html %></h2>
<%= sect.content.to_html %>
<h1>sidebar!</h1>
</div>
<% else %>
<%= RedCloth.new( sect ).to_html %>
<% end %>
<% end %>
<p style="text-align:right;">
<a href="<%= nextPage %>">Turn page.</a>
</p>
</div>
</div>
</div>
<div id="footer">
<div class="pager">
&lt; <a href="<%= prevPage %>">prev</a> | <a href="<%= nextPage %>">next</a> &gt;
</div>
<div class="title">
<h3>why's <span class="hilite">(poignant)</span> guide to ruby</h3>
</div>
</div>
</body>
</html>