Skip to content

Instantly share code, notes, and snippets.

@paul
Forked from defunkt/gist:204222
Created October 7, 2009 17:29
Show Gist options
  • Save paul/204234 to your computer and use it in GitHub Desktop.
Save paul/204234 to your computer and use it in GitHub Desktop.
<h1><%= header %></h1>
<% if not item.empty? %>
<ul>
<% for i in item %>
<% if i[:current] %>
<li><strong><%= i[:name] %></strong></li>
<% else %>
<li><a href="<%= i[:url] %>"><%= i[:name] %></a></li>
<% end %>
<% end %>
</ul>
<% end %>
<% if item.empty? %>
<p>The list is empty.</p>
<% end %>
<h1>{{header}}</h1>
{{#list}}
<ul>
{{#item}}
{{#current}}
<li><strong>{{name}}</strong></li>
{{/current}}
{{#link}}
<li><a href="{{url}}">{{name}}</a></li>
{{/link}}
{{/item}}
</ul>
{{/list}}
{{#empty?}}
<p>The list is empty.</p>
{{/empty?}}
%h1= header
- if !list.empty?
%ul
- list.each do |item|
%li
- if item.current?
%strong= item.name
- else
%a{:href => item.url}= item.name
- else
%p The list is empty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment