50 lines
1.8 KiB
Plaintext
50 lines
1.8 KiB
Plaintext
<% head = "head_top" %>
|
|
<% if current_user != nil && current_user.header_scroll == true %>
|
|
<% head = "head_scroll" %>
|
|
<% end %>
|
|
|
|
<div id="<%= head %>">
|
|
<div id="menu">
|
|
<%= link_to "", root_path, id: "logo" %>
|
|
<ul>
|
|
<% con = params[:controller] %>
|
|
<li>
|
|
<%= link_to "Home", home_statics_path, class: ("active" if con == "statics" && params[:action] == "home") %>
|
|
</li>
|
|
<li>
|
|
<%= link_to blogposts_path, class: ("active" if con == "blogposts" || con == "comments") do %>
|
|
News
|
|
<% if last_post = Blogpost.last %>
|
|
<div class="subtitle"><%= ago last_post.created_at %></div>
|
|
<% end %>
|
|
<% end %>
|
|
</li>
|
|
<li>
|
|
<%= link_to "Info", info_index_path, class: ("active" if con == "info") %>
|
|
</li>
|
|
<li>
|
|
<%= link_to "Forums", forums_path, class: ("active" if con == "forums" || con == "forumgroups" || con == "forumthreads" || con == "threadreplies") %>
|
|
</li>
|
|
<li>
|
|
<%= link_to "Users", users_path, class: ("active" if con == "users") %>
|
|
</li>
|
|
<li>
|
|
<%= link_to "Donate", donate_statics_path, class: ("active" if con == "statics" && params[:action] == "donate") %>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="userbar">
|
|
<div id="userinfo" class="<%= "logged-out" unless current_user %>">
|
|
<% if current_user %>
|
|
<span id="userinfo-box">
|
|
<%= link_to current_user.name, current_user %><br/>
|
|
<%= link_to "Logout", logout_path, method: :delete %>
|
|
</span>
|
|
<%= link_to current_user.avatar(32), current_user %>
|
|
<% else %>
|
|
<%= link_to "Log in", login_path(return_path: request.env['PATH_INFO']), action: "new" %> | <%= link_to "Sign up", signup_path %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|