Use CSS to make items bold in the admin menu

From a semantic point of view, there's no reason to add a strong
emphasis to the menu items.

Besides, using CSS simplifies the code and is less error-prone. For
instance, the "stats" section didn't have a <strong> tag, and so it was
the only one which wasn't bold.
This commit is contained in:
Javi Martín
2020-11-26 13:12:26 +01:00
parent 615bb050e8
commit d99ca9bd34
3 changed files with 19 additions and 15 deletions

View File

@@ -20,6 +20,10 @@
} }
} }
> ul > li a {
font-weight: bold;
}
li { li {
margin: 0; margin: 0;
outline: 0; outline: 0;

View File

@@ -3,7 +3,7 @@
<li> <li>
<%= link_to admin_proposals_path do %> <%= link_to admin_proposals_path do %>
<span class="icon-proposals"></span> <span class="icon-proposals"></span>
<strong><%= t("admin.menu.proposals") %></strong> <%= t("admin.menu.proposals") %>
<% end %> <% end %>
</li> </li>
<% end %> <% end %>
@@ -12,7 +12,7 @@
<li class="<%= "is-active" if controller_name == "debates" %>"> <li class="<%= "is-active" if controller_name == "debates" %>">
<%= link_to admin_debates_path do %> <%= link_to admin_debates_path do %>
<span class="icon-debates"></span> <span class="icon-debates"></span>
<strong><%= t("admin.menu.debates") %></strong> <%= t("admin.menu.debates") %>
<% end %> <% end %>
</li> </li>
<% end %> <% end %>
@@ -20,7 +20,7 @@
<li class="<%= "is-active" if controller_name == "comments" %>"> <li class="<%= "is-active" if controller_name == "comments" %>">
<%= link_to admin_comments_path do %> <%= link_to admin_comments_path do %>
<span class="icon-comments"></span> <span class="icon-comments"></span>
<strong><%= t("admin.menu.comments") %></strong> <%= t("admin.menu.comments") %>
<% end %> <% end %>
</li> </li>
@@ -28,7 +28,7 @@
<li class="<%= "is-active" if polls? %>"> <li class="<%= "is-active" if polls? %>">
<%= link_to admin_polls_path do %> <%= link_to admin_polls_path do %>
<span class="icon-checkmark-circle"></span> <span class="icon-checkmark-circle"></span>
<strong><%= t("admin.menu.polls") %></strong> <%= t("admin.menu.polls") %>
<% end %> <% end %>
</li> </li>
<% end %> <% end %>
@@ -37,7 +37,7 @@
<li class="<%= "is-active" if controller.class.parent == Admin::Legislation %>"> <li class="<%= "is-active" if controller.class.parent == Admin::Legislation %>">
<%= link_to admin_legislation_processes_path do %> <%= link_to admin_legislation_processes_path do %>
<span class="icon-file-text"></span> <span class="icon-file-text"></span>
<strong><%= t("admin.menu.legislation") %></strong> <%= t("admin.menu.legislation") %>
<% end %> <% end %>
</li> </li>
<% end %> <% end %>
@@ -46,7 +46,7 @@
<li class="<%= "is-active" if budgets? %>"> <li class="<%= "is-active" if budgets? %>">
<%= link_to admin_budgets_path do %> <%= link_to admin_budgets_path do %>
<span class="icon-budget"></span> <span class="icon-budget"></span>
<strong><%= t("admin.menu.budgets") %></strong> <%= t("admin.menu.budgets") %>
<% end %> <% end %>
</li> </li>
<% end %> <% end %>
@@ -54,7 +54,7 @@
<li> <li>
<a href="#"> <a href="#">
<span class="icon-box"></span> <span class="icon-box"></span>
<strong><%= t("admin.menu.title_booths") %></strong> <%= t("admin.menu.title_booths") %>
</a> </a>
<ul id="booths_menu" <%= "class=is-active" if booths? %>> <ul id="booths_menu" <%= "class=is-active" if booths? %>>
<li <%= "class=is-active" if %w[officers officer_assignments].include?(controller_name) %>> <li <%= "class=is-active" if %w[officers officer_assignments].include?(controller_name) %>>
@@ -84,7 +84,7 @@
<li class="<%= "is-active" if controller_name == "signature_sheets" %>"> <li class="<%= "is-active" if controller_name == "signature_sheets" %>">
<%= link_to admin_signature_sheets_path do %> <%= link_to admin_signature_sheets_path do %>
<span class="icon-file-text-o"></span> <span class="icon-file-text-o"></span>
<strong><%= t("admin.menu.signature_sheets") %></strong> <%= t("admin.menu.signature_sheets") %>
<% end %> <% end %>
</li> </li>
<% end %> <% end %>
@@ -92,7 +92,7 @@
<li> <li>
<a href="#"> <a href="#">
<span class="icon-zip"></span> <span class="icon-zip"></span>
<strong><%= t("admin.menu.messaging_users") %></strong> <%= t("admin.menu.messaging_users") %>
</a> </a>
<ul id="messaging_users_menu" <%= "class=is-active" if messages_menu_active? %>> <ul id="messaging_users_menu" <%= "class=is-active" if messages_menu_active? %>>
<li <%= "class=is-active" if controller_name == "newsletters" %>> <li <%= "class=is-active" if controller_name == "newsletters" %>>
@@ -113,7 +113,7 @@
<li> <li>
<a href="#"> <a href="#">
<span class="icon-edit"></span> <span class="icon-edit"></span>
<strong><%= t("admin.menu.title_site_customization") %></strong> <%= t("admin.menu.title_site_customization") %>
</a> </a>
<ul <%= "class=is-active" if customization? && <ul <%= "class=is-active" if customization? &&
controller.class.parent != Admin::Poll::Questions::Answers %>> controller.class.parent != Admin::Poll::Questions::Answers %>>
@@ -144,7 +144,7 @@
<li> <li>
<a href="#"> <a href="#">
<span class="icon-eye"></span> <span class="icon-eye"></span>
<strong><%= t("admin.menu.title_moderated_content") %></strong> <%= t("admin.menu.title_moderated_content") %>
</a> </a>
<ul <%= "class=is-active" if moderated_content? %>> <ul <%= "class=is-active" if moderated_content? %>>
<% if feature?(:proposals) %> <% if feature?(:proposals) %>
@@ -186,7 +186,7 @@
<li> <li>
<a href="#"> <a href="#">
<span class="icon-organizations"></span> <span class="icon-organizations"></span>
<strong><%= t("admin.menu.title_profiles") %></strong> <%= t("admin.menu.title_profiles") %>
</a> </a>
<ul <%= "class=is-active" if profiles? %>> <ul <%= "class=is-active" if profiles? %>>
<li <%= "class=is-active" if controller_name == "administrators" %>> <li <%= "class=is-active" if controller_name == "administrators" %>>
@@ -228,7 +228,7 @@
<li> <li>
<a href="#"> <a href="#">
<span class="icon-settings"></span> <span class="icon-settings"></span>
<strong><%= t("admin.menu.title_settings") %></strong> <%= t("admin.menu.title_settings") %>
</a> </a>
<ul <%= "class=is-active" if settings? %>> <ul <%= "class=is-active" if settings? %>>
<li <%= "class=is-active" if controller_name == "settings" %>> <li <%= "class=is-active" if controller_name == "settings" %>>
@@ -260,7 +260,7 @@
<li> <li>
<a href="#"> <a href="#">
<span class="icon-check"></span> <span class="icon-check"></span>
<strong><%= t("admin.menu.dashboard") %></strong> <%= t("admin.menu.dashboard") %>
</a> </a>
<ul <%= "class=is-active" if dashboard? %>> <ul <%= "class=is-active" if dashboard? %>>
<li <%= "class=is-active" if controller_name == "actions" %>> <li <%= "class=is-active" if controller_name == "actions" %>>

View File

@@ -2,7 +2,7 @@
<li class="section-title"> <li class="section-title">
<a href="#"> <a href="#">
<span class="icon-user"></span> <span class="icon-user"></span>
<strong><%= t("management.menu.users") %></strong> <%= t("management.menu.users") %>
</a> </a>
<ul class="is-active"> <ul class="is-active">