Skip to content

Commit

Permalink
Initial Bootstrap styling
Browse files Browse the repository at this point in the history
  • Loading branch information
danabrit committed Jun 11, 2017
1 parent 4982b4c commit fe42481
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 18 deletions.
94 changes: 81 additions & 13 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,83 @@
<!DOCTYPE html>
<html>
<head>
<title>Samaritan</title>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>
</head>
<body>

<%= render 'layouts/flash_messages' %>
<%= yield %>

</body>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= content_for?(:title) ? yield(:title) : "Samaritan" %></title>
<%= csrf_meta_tags %>

<%= stylesheet_link_tag "application", :media => "all" %>

<!-- For third-generation iPad with high-resolution Retina display: -->
<!-- Size should be 144 x 144 pixels -->
<%= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>

<!-- For iPhone with high-resolution Retina display: -->
<!-- Size should be 114 x 114 pixels -->
<%= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>

<!-- For first- and second-generation iPad: -->
<!-- Size should be 72 x 72 pixels -->
<%= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>

<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<!-- Size should be 57 x 57 pixels -->
<%= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>

<!-- For all other devices -->
<!-- Size should be 32 x 32 pixels -->
<%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %>

<%= javascript_include_tag "application" %>

<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js" type="text/javascript"></script>
<![endif]-->
</head>
<body>

<%= nav_bar static: :top, responsive: true, brand: "FindMySquad" do %>
<%= menu_group do %>
<%= menu_item "Link1", "" %>
<%= menu_item "Link2", "" %>
<%= menu_item "Link3", "" %>
<% end %>
<%= menu_group pull: :right do %>
<% if current_user %>
<%= menu_item "Log Out", sign_out_path(current_user) %>
<% else %>
<%= menu_item "Log In", sign_in_path %>
<%= menu_item "Sign Up", sign_up_path %>
<% end %>
<% end %>
<% end %>

<div class="container">
<div class="row">
<div class="col-lg-9">
<%= bootstrap_flash %>
<%= yield %>
</div>
<div class="col-lg-3">
<div class="well sidebar-nav">
<h3>Sidebar</h3>
<ul class="nav nav-list">
<li class="nav-header">Sidebar</li>
<li><%= link_to "Link1", "/path1" %></li>
<li><%= link_to "Link2", "/path2" %></li>
<li><%= link_to "Link3", "/path3" %></li>
</ul>
</div><!--/.well -->
</div><!--/span-->
</div><!--/row-->

<footer>
<p>&copy; <%= link_to "Dana Jones", "http://danabrit.blogspot.com" %> <%= [2017, Time.zone.now.year].uniq.join(" - ") %></p>
</footer>

</div> <!-- /container -->

</body>
</html>
12 changes: 7 additions & 5 deletions app/views/projects/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<h1>Projects</h1>

<div>
<div class="buttons">
<%= link_to "New Project", new_project_path, class: "button" %>
<% if current_user %>
<div>
<div class="buttons">
<%= link_to "New Project", new_project_path, class: "button" %>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<% end %>

<% if @projects.any? %>
<table class="long_table" id="projects">
Expand Down
5 changes: 5 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
devise_for :users
resources :projects

devise_scope :user do
get 'sign_in', to: 'devise/sessions#new'
get 'sign_up', to: 'devise/registrations#new'
end

root "projects#index"
end

0 comments on commit fe42481

Please sign in to comment.