From da5e93841b353af63bdbde374aa142ffaf37d4f2 Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Fri, 18 Mar 2016 03:04:50 -0700 Subject: [PATCH] refactor navbar menus code --- _includes/nav.html | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/_includes/nav.html b/_includes/nav.html index eaf91c8..08d7609 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -19,44 +19,14 @@ {% else %}
  • - {% capture before %}{{ link[1] | split: "://" | first }}{% endcapture %} - {% capture after %}{{ link[1] | split: "://" | last }}{% endcapture %} - {% assign internal = true %} - {% if before != after %} - {% if before == "http" or before == "https" %} - {% assign internal = false %} - {% endif %} - {% endif %} - - {% if internal %} - {% capture linkurl %}{{ site.baseurl }}/{{ link[1] }}{% endcapture %} - {% else %} - {% capture linkurl %}{{ link[1] }}{% endcapture %} - {% endif %} - - {{ link[0] }} + {% include navbarlink.html link=link %}
  • {% endif %} {% endfor %}