mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-14 03:18:02 +00:00
Start laying out front page
This commit is contained in:
parent
a58b83f5b5
commit
20e39db778
10 changed files with 49 additions and 14 deletions
4
Rules
4
Rules
|
@ -1,5 +1,9 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
|
compile '/' do
|
||||||
|
layout 'listing'
|
||||||
|
end
|
||||||
|
|
||||||
compile '*' do
|
compile '*' do
|
||||||
filter :rdiscount
|
filter :rdiscount
|
||||||
layout 'default'
|
layout 'default'
|
||||||
|
|
|
@ -4,3 +4,4 @@ data_sources:
|
||||||
- items_root: /
|
- items_root: /
|
||||||
layouts_root: /
|
layouts_root: /
|
||||||
type: filesystem_compact
|
type: filesystem_compact
|
||||||
|
base_url: http://wezm.net
|
|
@ -9,23 +9,11 @@
|
||||||
<script src="/js/script.js" type="text/javascript"></script>
|
<script src="/js/script.js" type="text/javascript"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="header">
|
<%= render 'header' %>
|
||||||
<a href="/">WezM<sup>.net</sup></a>
|
|
||||||
<ul id="menu">
|
|
||||||
<li><a href="/about/">About</a></li>
|
|
||||||
<li><a href="mailto:contact@example.com">Contact Me</a></li>
|
|
||||||
<li>
|
|
||||||
<a href="/feed"><img src="/images/feed-icon-14x14.png" width="14" height="14" /></a>
|
|
||||||
<a href="/feed">RSS</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<h1><%= @item[:title] %></h1>
|
<h1><%= @item[:title] %></h1>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<%= render 'footer' %>
|
||||||
<span class="copyright">Copyright © 2004 - 2009 Wesley Moore</span>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
3
layouts/footer.html
Normal file
3
layouts/footer.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div id="footer">
|
||||||
|
<span class="copyright">Copyright © 2004 - 2009 Wesley Moore</span>
|
||||||
|
</div>
|
2
layouts/footer.yaml
Normal file
2
layouts/footer.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
--- {}
|
||||||
|
|
11
layouts/header.html
Normal file
11
layouts/header.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<div id="header">
|
||||||
|
<a href="/">WezM<sup>.net</sup></a>
|
||||||
|
<ul id="menu">
|
||||||
|
<li><a href="/about/">About</a></li>
|
||||||
|
<li><a href="mailto:contact@example.com">Contact Me</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="<%= feed_url %>"><img src="/images/feed-icon-14x14.png" width="14" height="14" /></a>
|
||||||
|
<a href="<%= feed_url %>">RSS</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
2
layouts/header.yaml
Normal file
2
layouts/header.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
--- {}
|
||||||
|
|
20
layouts/listing.html
Normal file
20
layouts/listing.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<!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" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
<title><%= @item[:title] %></title>
|
||||||
|
<link rel="stylesheet" href="/css/reset.css" type="text/css" media="screen,projector" />
|
||||||
|
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen,projector" />
|
||||||
|
<script src="/js/script.js" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%= render 'header' %>
|
||||||
|
<div id="main">
|
||||||
|
<% sorted_articles.each do |article| %>
|
||||||
|
<h1><%= article.title %></h1>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<%= render 'footer' %>
|
||||||
|
</body>
|
||||||
|
</html>
|
2
layouts/listing.yaml
Normal file
2
layouts/listing.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
--- {}
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
# All files in the 'lib' directory will be loaded
|
# All files in the 'lib' directory will be loaded
|
||||||
# before nanoc starts compiling.
|
# before nanoc starts compiling.
|
||||||
|
include Nanoc3::Helpers::Rendering
|
||||||
|
include Nanoc3::Helpers::Blogging
|
Loading…
Reference in a new issue