%ul.nav.navbar-nav.animated
  %li{class: ("active" if current_page.url == "/downloads/")}
    %a{href: "/downloads", onclick: "ga('send', 'event', 'link', 'click', 'Download');"}
      Download
  %li{class: ("active" if current_page.url == "/features/")}
    %a{href: "/features", onclick: "ga('send', 'event', 'link', 'click', 'Features');"}
      Features
  %li{class: ("active" if current_page.url == "/pricing/")}
    %a{href: "/pricing", onclick: "ga('send', 'event', 'link', 'click', 'Pricing');"}
      Pricing
  %li{class: ("active" if current_page.url == "/community/")}
    %a{href: "/community", onclick: "ga('send', 'event', 'link', 'click', 'Community');"}
      Community
  %li{class: ("active" if current_page.url == "/blog/")}
    %a{href: "/blog", onclick: "ga('send', 'event', 'link', 'click', 'Blog');"}
      Blog
  %li
    = partial "includes/layout/search"
  %li
    %a.sign-in-up-btn{href: "https://gitlab.com/users/sign_in", onclick: "ga('send', 'event', 'link', 'click', 'Sign in');"}
      Sign In

%ul.nav.navbar-nav.animated
  %li{class: ("active" if current_page.url == "/downloads/")}
    %a{href: "/downloads", onclick: "ga('send', 'event', 'link', 'click', 'Download');"}
      Download
  %li{class: ("active" if current_page.url == "/features/")}
    %a{href: "/features", onclick: "ga('send', 'event', 'link', 'click', 'Features');"}
      Features
  %li{class: ("active" if current_page.url == "/pricing/")}
    %a{href: "/pricing", onclick: "ga('send', 'event', 'link', 'click', 'Pricing');"}
      Pricing
  %li{class: ("active" if current_page.url == "/community/")}
    %a{href: "/community", onclick: "ga('send', 'event', 'link', 'click', 'Community');"}
      Community
  %li{class: ("active" if current_page.url == "/blog/" || current_page.respond_to?(:blog_data))}
    %a{href: "/blog", onclick: "ga('send', 'event', 'link', 'click', 'Blog');"}
      Blog
  %li
    = partial "includes/layout/search"
  %li
    %a.sign-in-up-btn{href: "https://gitlab.com/users/sign_in", onclick: "ga('send', 'event', 'link', 'click', 'Sign in');"}
      Sign In

Set 'Blog' nav link as active when viewing a blog post
Set 'Blog' nav link as active when viewing a blog post
