diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb index 5fd5f4d..eb9d35b 100644 --- a/app/views/categories/index.html.erb +++ b/app/views/categories/index.html.erb @@ -1,36 +1,31 @@ - - - +<% content_for :navigation do %> + + +<% end %> <% @num_blank = 4 - @categories.length -%> -
+<% @photos.each do |photo| %> +
+ <%= link_to_photo photo %> +
+<% end %> - <% @photos.each do |photo| %> +<% @categories.each do |category| %> +
+ <%= link_to raw('

'+h(category.name.downcase)+'

'), category_photos_path(category) %> +
+<% end %> -
- <%= link_to_photo photo %> -
- - <% end %> - - <% @categories.each do |category| %> -
- <%= link_to raw('

'+h(category.name.downcase)+'

'), category_photos_path(category) %> -
- <% end %> - - <% @num_blank.times do %> -
-
- <% end %> - -
+<% @num_blank.times do %> +
+
+<% end %> diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 71957bb..5904050 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,10 +1,11 @@ -
- <%= link_to raw('about'), page_path(:about) %> -
-
- <%= link_to raw('portfolio'), :controller => 'categories' %> -
- +<% content_for :navigation do %> +
+ <%= link_to raw('about'), page_path(:about) %> +
+
+ <%= link_to raw('portfolio'), :controller => 'categories' %> +
+<% end %> <% if @photo %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 0a48b72..06dbc2f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -21,17 +21,18 @@
-
<%= link_to image_tag('/assets/title.png', :alt => 'Dan Barber Photography', :width => 236), '/' %>
+ <%= yield :navigation %> +
+
<%= yield %>
©2013 Dan Barber
-
diff --git a/app/views/pages/show.html.erb b/app/views/pages/show.html.erb index a424308..c76e06f 100644 --- a/app/views/pages/show.html.erb +++ b/app/views/pages/show.html.erb @@ -1,29 +1,26 @@ -
-
-
- <%= link_to raw('portfolio'), :controller => 'categories' %> -
+<% content_for :navigation do %> +
+
+
+ <%= link_to raw('portfolio'), :controller => 'categories' %> +
+<% end %> + +
+
+ <%= raw(@page.content.to_html) %> +
-
- -
-
- <%= raw(@page.content.to_html) %> -
-
- -
-
- -
-
-
-
-
-
-
- <%= link_to raw('contact'), new_contact_path %> -
- +
+
+ +
+
+
+
+
+
+
+ <%= link_to raw('contact'), new_contact_path %>
diff --git a/app/views/photos/index.html.erb b/app/views/photos/index.html.erb index 439ba39..4687b50 100644 --- a/app/views/photos/index.html.erb +++ b/app/views/photos/index.html.erb @@ -1,40 +1,35 @@ - - -
+<% content_for :navigation do %> + + +<% end %> -
+<% if @category %> +
+ <%= link_to raw('

'+h(@category.name.downcase)+'

'), categories_path %> +
+<% else %> +
+

all photos

+
+<% end %> - <% if @category %> -
- <%= link_to raw('

'+h(@category.name.downcase)+'

'), categories_path %> -
- <% else %> -
-

all photos

-
- <% end %> +<% @num_blank = 11 - @photos.length -%> - <% @num_blank = 11 - @photos.length -%> +<% @photos.each do |photo| %> +
+ <%= link_to_photo photo %> +
+<% end %> - <% @photos.each do |photo| %> - -
- <%= link_to_photo photo %> -
- - <% end %> - - <% @num_blank.times do %> -
-
- <% end %> - -
+<% @num_blank.times do %> +
+
+<% end %>