<% if category_navigation.present? %>
  <ul class="primary-nav" id="primary-nav">

    <% category_navigation.each do |category| %>
      <li class="primary-nav__item">
        <% if category.id == 'news' %>
          <a href="/<%= I18n.locale %>/news"><%= category.title %></a>
        <% else %>
          <%= link_to category.title, category_path(category.id) %>
        <% end %>

        <% if category.contents.present? %>
          <div class="primary-nav__dropdown l-primary-nav-dropdown">
            <ul class="menu">
              <% category.contents.each do |sub_category| %>
                <li><%= link_to sub_category.title, category_path(sub_category.id) %></li>
              <% end %>
            </ul>
          </div>
        <% end %>

      </li>
    <% end %>

  </ul>
<% end %>

<% if category_navigation.present? %>
  <ul class="primary-nav" id="primary-nav">

    <% category_navigation.each do |category| %>
      <li class="primary-nav__item">
        <% if category.id == 'news' %>
          <a class="primary-nav__link" href="/<%= I18n.locale %>/news"><%= category.title %></a>
        <% else %>
          <%= link_to category.title, category_path(category.id), class: 'primary-nav__link' %>
        <% end %>

        <% if category.contents.present? %>
          <div class="primary-nav__dropdown l-primary-nav-dropdown">
            <ul class="menu">
              <% category.contents.each do |sub_category| %>
                <li><%= link_to sub_category.title, category_path(sub_category.id) %></li>
              <% end %>
            </ul>
          </div>
        <% end %>

      </li>
    <% end %>

  </ul>
<% end %>

Add class to primary nav links
Add class to primary nav links
