Restructuring navigation and replacing some hardcoded article URLs with new dynamic custom URLs

This commit is contained in:
Absurdon 2017-11-12 18:50:43 +01:00
parent 8c0378579b
commit eb09114776
3 changed files with 17 additions and 13 deletions

View file

@ -124,6 +124,14 @@ ul.navigation {
&.users:after {
content: $fa-var-user;
}
&.league:after {
content: $fa-var-gamepad;
}
&.tutorials:after {
content: $fa-var-graduation-cap;
}
}
i {

View file

@ -187,10 +187,6 @@ module ApplicationHelper
calendar.upcoming_nsltv || []
end
def latest_rules
article_path(Article::RULES)
end
def gathers_url
if Rails.env.production?
"https://gathers.ensl.org"

View file

@ -18,8 +18,8 @@
Contests
<% end %>
<ul>
<li><%= link_to "Rules", latest_rules %></li>
<li><%= link_to "Comp Mod Changes", article_url(Article::COMPMOD) %></li>
<li><%= link_to "Rules", "/rules" %></li>
<li><%= link_to "Comp Mod Changes", "/compmod" %></li>
<li><%= link_to "Historical", "/contests" %></li>
<li><%= link_to "NS1 History", "/contests/historical/NS1" %></li>
<li><%= link_to "NS2 History", "/contests/historical/NS2" %></li>
@ -46,7 +46,7 @@
Articles
<% end %>
<ul>
<li><%= link_to "Hall of Fame", article_url(Article::HOF) %></li>
<li><%= link_to "Hall of Fame", '/halloffame' %></li>
<li><%= link_to "History", article_url(Article::HISTORY) %></li>
<li><%= link_to "Movies", movies_url %></li>
<li><%= link_to "Files", directory_url(Directory::ROOT) %></li>
@ -62,16 +62,16 @@
</ul>
</li>
<li class="icon">
<%= active_link_to({ controller: "teams", action: :index }, class: 'teams') do %>
Teams
<%= active_link_to('/tutorials', class: 'tutorials') do %>
Tutorials
<% end %>
</li>
<li class="dropdown icon">
<%= active_link_to({ controller: "users", action: :index }, class: 'users') do %>
Users
<% end %>
<a href="#" class="league">League</a>
<ul>
<li><%= link_to "Staff", controller: "about", action: "staff" %></li>
<li><%= link_to "Users", users_path %></li>
<li><%= link_to "Teams", teams_path %></li>
<li><%= link_to "Staff", about_staff_path %></li>
<li><%= link_to "Bans", bans_url %></li>
<li><%= link_to "Contact", new_issue_path %></li>
</ul>