Skip to content

Commit

Permalink
Add dogs#index with new container style
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinthinks committed Aug 24, 2022
1 parent 6301975 commit 044d9ad
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/controllers/dogs_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class DogsController < ApplicationController

def index
end

end
13 changes: 13 additions & 0 deletions app/views/components/_container.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="fixed h-full w-full -z-10">
<div class="inset-0 bg-blue-200 h-full"></div>
</div>

<div class="relative w-full h-full">
<div class='max-w-[1200px] mx-auto bg-white min-h-full p-12'>
<div class='flex justify-end space-x-6 mb-12'>
<%= partial.yield :header %>
</div>

<%= partial.yield :content %>
</div>
</div>
Empty file added app/views/dogs/index.html.erb
Empty file.
2 changes: 2 additions & 0 deletions app/views/layouts/_navigation_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
<%= render 'layouts/admin_menu' %>
<% end %>
<% end %>

<% if !person_signed_in? %>
<%= render 'layouts/visitor_menu' %>
<% end %>

<% if !person_signed_in? %>
<%= render 'layouts/admin_login_menu' %>
<%= link_to "Apply to Foster", new_signup_path %>
Expand Down
12 changes: 10 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@
<p class="flash flash_<%= key %>"><%= flash[key] %></p>
<% end %>
<% end %>
<%= render 'layouts/navigation_links' %>
<%= yield %>

<%= render 'components/container' do |partial| %>
<%= partial.content_for :header do %>
<%= render 'layouts/navigation_links' %>
<% end %>

<%= partial.content_for :content do %>
<%= yield %>
<% end %>
<% end %>
</body>
</html>
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
resources :animal_applications
resources :homes
resources :animals

resources :dogs, only: [:index]

devise_scope :person do
resources :people
end
Expand Down

0 comments on commit 044d9ad

Please sign in to comment.