Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Affordances: meal dates on the homepage, read more link for the meals…
… on the homepage, only linking to new recipes from the homepage, alternating the meal thumbnails on the homepage, older meals listed at the bottom of the homepage, categories at the top of all pages.
- Loading branch information
Showing
9 changed files
with
100 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
.meals | ||
|
||
%h1 Meals | ||
- @meals.each do |meal| | ||
- date = Date.parse(meal['date']) | ||
%a{:href => date.strftime("/meals/%Y/%m/%d")} | ||
= image_link meal, :width => 200, :height => 150 | ||
%h2 | ||
%div{:class => "meal meal#{date.day % 2}"} | ||
%a{:href => date.strftime("/meals/%Y/%m/%d")} | ||
= image_link meal, :width => 200, :height => 150 | ||
%h2 | ||
%a{:href => date.strftime("/meals/%Y/%m/%d")}= meal["title"] | ||
%div= date.strftime("%B %e") | ||
= wiki(meal["summary"]) | ||
|
||
- new_recipe_regexp = Regexp.new(date.strftime("%Y/%m/%d")) | ||
- new_recipes = meal["menu"].select{ |r| r =~ new_recipe_regexp } | ||
( | ||
%a{:href => date.strftime("/meals/%Y/%m/%d")} | ||
Read more… | ||
- if new_recipes.length > 0 | ||
| | ||
%span.menu-items= wiki(new_recipes.join(", ")) | ||
) | ||
.other-meals | ||
%i Older meals: | ||
- @older_meals.each do |meal| | ||
- date = Date.parse(meal['date']) | ||
%a{:href => date.strftime("/meals/%Y/%m/%d")}= meal["title"] | ||
= wiki(meal["summary"]) | ||
.menu-items= wiki(meal["menu"].join(", ")) | ||
, | ||
- date = Date.parse(@meals[0]['date']) | ||
%a{:href => date.strftime("/meals/%Y/%m")} More… |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
= categories({}) | ||
|
||
- date = Date.parse("#{@month}-01") | ||
.breadcrumbs | ||
= breadcrumbs(date, :month) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
= categories({}) | ||
|
||
- date = Date.parse("#{@year}-01-01") | ||
.breadcrumbs | ||
= breadcrumbs(date, :year) | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
= categories({}) | ||
|
||
%table | ||
%tr | ||
%th | ||
|