-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_header.html.erb
More file actions
60 lines (52 loc) · 2.2 KB
/
_header.html.erb
File metadata and controls
60 lines (52 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h1><%= link_to root_path do %>LetsGitIt!<% end %></h1>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right" style="margin-top: 12px;">
<% if current_user %>
<li>Signed in as: <%= current_user.name %> - <%= image_tag(@auth['info']['image'], width: '50', heigth: '50', class: 'img-circle') %></li>
<li><%= link_to "Sign Out", 'sign_out', method: :delete %></li>
<% else %>
<li><%= link_to "auth/facebook" do %><%= image_tag('facebook.png', width: '40', heigth: '40', class: 'img-circle') %><% end %></li>
<li><%= link_to "auth/github" do %><%= image_tag('github.png', width: '40', heigth: '40', class: 'img-circle') %><% end %></li>
<% end %>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<% flash.each do |key, value| %>
<div class="alert alert-info"><%= value %></div>
<% end %>
<% if current_user %>
<div class="text-center">
<h1>Welcome, <%= current_user.name %></h1>
<h4>Logged In with -> <strong><em><%= @auth['provider'].capitalize %></em></strong></h4>
<%= image_tag('logo.png') %>
</div>
<% end %>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '295017477501220',
xfbml : true,
version : 'v2.6'
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>