From 3d0b95e8b2849696239f53893f38409c46003eff Mon Sep 17 00:00:00 2001 From: Kevin Lin <kevinl@cs.uw.edu> Date: Mon, 10 Aug 2020 20:10:08 -0700 Subject: [PATCH] Deprecate and remove nav_links --- _config.yml | 1 - _includes/nav.html | 65 ---------------------------------------------- 2 files changed, 66 deletions(-) delete mode 100644 _includes/nav.html diff --git a/_config.yml b/_config.yml index 87006e1..432729a 100644 --- a/_config.yml +++ b/_config.yml @@ -27,7 +27,6 @@ color_scheme: light search_enabled: true heading_anchors: true permalink: pretty -nav_links: aux_links: Kevin Lin: - 'https://kevinl.info' diff --git a/_includes/nav.html b/_includes/nav.html deleted file mode 100644 index cc1ba02..0000000 --- a/_includes/nav.html +++ /dev/null @@ -1,65 +0,0 @@ -<ul class="nav-list"> - {%- assign ordered_pages_list = site.html_pages | where_exp:"item", "item.nav_order != nil" -%} - {%- assign unordered_pages_list = site.html_pages | where_exp:"item", "item.nav_order == nil" -%} - {%- if site.nav_sort == 'case_insensitive' -%} - {%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%} - {%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%} - {%- else -%} - {%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%} - {%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%} - {%- endif -%} - {%- assign pages_list = sorted_ordered_pages_list | concat: sorted_unordered_pages_list -%} - {%- for node in pages_list -%} - {%- unless node.nav_exclude -%} - {%- if node.parent == nil and node.title -%} - <li class="nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}"> - {%- if page.parent == node.title or page.grand_parent == node.title -%} - {%- assign first_level_url = node.url | absolute_url -%} - {%- endif -%} - {%- if node.has_children -%} - <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a> - {%- endif -%} - <a href="{{ node.url | absolute_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a> - {%- if node.has_children -%} - {%- assign children_list = pages_list | where: "parent", node.title -%} - <ul class="nav-list"> - {%- for child in children_list -%} - {%- unless child.nav_exclude -%} - <li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}"> - {%- if page.url == child.url or page.parent == child.title -%} - {%- assign second_level_url = child.url | absolute_url -%} - {%- endif -%} - {%- if child.has_children -%} - <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a> - {%- endif -%} - <a href="{{ child.url | absolute_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a> - {%- if child.has_children -%} - {%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%} - <ul class="nav-list"> - {%- for grand_child in grand_children_list -%} - <li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}"> - <a href="{{ grand_child.url | absolute_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a> - </li> - {%- endfor -%} - </ul> - {%- endif -%} - </li> - {%- endunless -%} - {%- endfor -%} - </ul> - {%- endif -%} - </li> - {%- endif -%} - {%- endunless -%} - {%- endfor -%} -</ul> -{%- if site.nav_links != nil -%} -<hr> -<ul class="nav-list"> - {%- for link in site.nav_links -%} - <li class="nav-list-item"> - <a href="{{ link.last }}" class="nav-list-link">{{ link.first }}</a> - </li> - {%- endfor -%} -</ul> -{%- endif -%} -- GitLab