Created
January 15, 2013 20:50
-
-
Save deitrick/4541925 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
<!-- will be put into helper and need to DRY--> | |
<% d = Date.today %> | |
<% today = d.wday %> | |
<% if today == 1 %> | |
<% today = "Monday" %> | |
<% elsif today == 2 %> | |
<% today = "Tuesday" %> | |
<% elsif today == 3 %> | |
<% today = "Wednesday" %> | |
<% elsif today == 4 %> | |
<% today = "Thursday" %> | |
<% elsif today == 5 %> | |
<% today = "Friday" %> | |
<% elsif today == 6 %> | |
<% today = "Saturday" %> | |
<% elsif today == 7 %> | |
<% today = "Sunday" %> | |
<% end %> | |
<head> | |
<title> | |
Greenu - Chicago Farmers Markets | |
</title> | |
</head> | |
<div role="main"> | |
<div id="home_header"> | |
<div class="container"> | |
<h1> It's <span><%= today %></span>, <br /> Find the Closest <br /> Farmers Market </h1> | |
</div> | |
<div class="footer_arrow"> | |
<a href="#home_middle"></a> | |
</div> | |
</div> | |
<div id="home_middle"> | |
<div class="container"> | |
<!-- names have changed, doesn't work yet --> | |
<%= form_tag markets_url, :method => 'post' do %> | |
<%= text_field_tag :search, params[:zip], :placeholder => "Enter Zip", :class => "input" %> | |
<%= submit_tag "Search", :name => nil, :class => "submit" %> | |
<% end %> | |
<br /> | |
<!-- will be put into helper and need to DRY--> | |
<% d = Date.today %> | |
<% today = d.wday %> | |
<% if today == 1 %> | |
<% today = "open_monday" %> | |
<% elsif today == 2 %> | |
<% today = "open_tuesday" %> | |
<% elsif today == 3 %> | |
<% today = "open_wednesday" %> | |
<% elsif today == 4 %> | |
<% today = "open_thursday" %> | |
<% elsif today == 5 %> | |
<% today = "open_friday" %> | |
<% elsif today == 6 %> | |
<% today = "open_saturday" %> | |
<% elsif today == 7 %> | |
<% today = "open_sunday" %> | |
<% end %> | |
<% today = today.parameterize.underscore.to_sym %> | |
<ul class="markets"> | |
<% Market.where(today => true).each do |m| %> | |
<li> | |
<h3><%= m["name"] %></h3> | |
<ul> | |
<li><%= m["address"] %> | | |
<% if Market.where(:linkcard => true) %> | |
<span> Linkcard Accepted </span> | |
<% end %> | |
</li> | |
<ul> | |
</li> | |
<br /> | |
<% end %> | |
</ul> | |
</div> | |
</div> | |
<div id="home_bottom" | |
<div class="container"> | |
<h3><%#= link_to 'Market Directory', markets_url %> | |
<%#= link_to 'Seasonal Food Chart', home_url %> | |
</h3> | |
</div> | |
</div> | |
</h3> | |
</div> | |
<!-- div role="main" --> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment