forked from AdaGold/media-ranker-revisited
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathapplication.html.erb
57 lines (52 loc) · 1.83 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
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<title>Media Ranker 2.0</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', 'https://fonts.googleapis.com/css?family=Gudea:400,700|Hammersmith+One' %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= favicon_link_tag 'favicon.ico' %>
</head>
<body>
<header class="page-header">
<h2>
<%= link_to "Media Ranker", root_path %>
<small>Ranking the Best of Everything</small>
</h2>
<nav>
<div class="site-nav">
<%= link_to "View top media", root_path, class: "button" %>
<%= link_to "View all media", works_path, class: "button" %>
<%= link_to "Add a new work", new_work_path, class: "button" %>
<%= link_to "View all users", users_path, class: "button" %>
</div>
<div class="user-nav">
<% if @login_user %>
<%= link_to "Logged in as #{@login_user.username}", user_path(@login_user), class: "button" %>
<%= link_to "Log Out", logout_path, method: :delete, class: "button" %>
<% else %>
<%= link_to "Login with Github", github_login_path, class: "button" %>
<% end %>
</div>
</nav>
</header>
<% if flash[:result_text] or flash[:messages] %>
<section class="status <%= flash[:status] %>">
<h3><%= flash[:status] == :failure ? "A problem occurred: " : "" %><%= flash[:result_text] %></h3>
<% if flash[:messages] %>
<ul>
<% flash[:messages].each do |name, problems| %>
<% problems.each do |problem| %>
<li><%= name %>: <%= problem %></li>
<% end %>
<% end %>
</ul>
<% end %>
</section>
<% end %>
<main>
<%= yield %>
</main>
</body>
</html>