-
Notifications
You must be signed in to change notification settings - Fork 0
/
_sidebar.html.erb
43 lines (43 loc) · 1.46 KB
/
_sidebar.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
<div class="sidenav">
<ul>
<div class="btn">
<%= button_to "All Articles", articles_path, :style => 'width: 127px', method: :get %>
</div>
<div class="btn">
<%= button_to "Top 3", articles_path, :style => 'width: 127px', method: :get, params: { top_3: true } %>
</div>
<div class="btn">
<%= button_to "All Tags", tags_path, :style => 'width: 127px', method: :get %>
</div>
<div class="btn">
<%= button_to "All Authors", authors_path, :style => 'width: 127px', method: :get %>
</div>
<div class="sidebar_container">
<div class="sidebar_content">
<% if logged_in? %>
<%= "Logged in as " %>
<h3 class="wrap"><%= "#{current_user.username}" %></h3>
<br />
<% end %>
</div>
</div>
<% if logged_in? %>
<div class="btn">
<%= button_to "Logout", logout_path,
:style => 'width: 127px; background-image: linear-gradient(#8c0101, #590000, #8c0101)',
method: :get %>
</div>
<% else %>
<div class="btn">
<%= button_to "Login", login_path, :style => 'width: 127px; background-image: linear-gradient(#017501, #005900, #017501)',
method: :get %>
</div>
<br />
<br />
<div class="btn">
<%= button_to "Sign Up", new_author_path, :style => 'width: 127px; background-image: linear-gradient(#630293, #3a0056, #630293)',
method: :get %>
</div>
<% end %>
</ul>
</div>