-
Notifications
You must be signed in to change notification settings - Fork 2
/
application.html.erb
51 lines (49 loc) · 1.68 KB
/
application.html.erb
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
<!DOCTYPE html>
<html>
<head>
<title>Omniauth Popup</title>
<%= stylesheet_link_tag 'application' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>
</head>
<body>
<header class='main'>
<h1><%= link_to 'Omniauth Popup', root_path %></h1>
<nav class='lang-nav'>
<span><%= t('.language') %>:</span>
<ul class='lang-items'>
<li class='lang-item'><%= link_to_unless_current 'English', locale: 'en' %></li>
<li class='lang-item'><%= link_to_unless_current 'Português', locale: 'pt' %></li>
</ul>
</nav>
<nav class='user-nav'>
<ul>
<% if current_user %>
<li>
<%= link_to current_user do %>
<%= image_tag current_user.image, class: 'user-pic' if current_user.image %>
<%= content_tag :span, current_user.name %>
<% end %>
</li>
<li><%= link_to t('.logout_link'), sign_out_path %></li>
<% else %>
<li><%= link_to_login_with 'Facebook', '/auth/facebook', { width: '460', height: '460' } %></li>
<li><%= link_to_login_with 'GitHub', '/auth/github', { width: '1050', height: '700' } %></li>
<li><%= link_to_login_with 'Google', '/auth/google', { width: '800', height: '470' } %></li>
<li><%= link_to_login_with 'Twitter', "/auth/twitter?lang=#{I18n.locale}", { width: '660', height: '710' } %></li>
<% end %>
</ul>
</nav>
</header>
<div id='js-messages' class='messages'>
<% flash.each do |type, message| %>
<span class='message <%= type %>'>
<%= message %>
</span>
<% end %>
</div>
<div class='content'>
<%= yield %>
</div>
</body>
</html>