-
-
Save paul/204234 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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?}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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