mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 05:13:33 -06:00
Merge branch 'v0.2.9' into fix-duplicates-in-nav
This commit is contained in:
1
_includes/css/custom.scss.liquid
Normal file
1
_includes/css/custom.scss.liquid
Normal file
@@ -0,0 +1 @@
|
||||
@import "./custom/custom";
|
7
_includes/css/just-the-docs.scss.liquid
Normal file
7
_includes/css/just-the-docs.scss.liquid
Normal file
@@ -0,0 +1,7 @@
|
||||
{% if site.logo %}
|
||||
$logo: "{{ site.logo | absolute_url }}";
|
||||
{% endif %}
|
||||
@import "./support/support";
|
||||
@import "./color_schemes/{{ include.color_scheme }}";
|
||||
@import "./modules";
|
||||
{% include css/custom.scss.liquid %}
|
@@ -2,17 +2,17 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
|
||||
{% if site.plugins.jekyll-seo == nil %}
|
||||
{% unless site.plugins contains "jekyll-seo-tag" %}
|
||||
<title>{{ page.title }} - {{ site.title }}</title>
|
||||
|
||||
{% if page.description %}
|
||||
<meta name="Description" content="{{ page.description }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endunless %}
|
||||
|
||||
<link rel="shortcut icon" href="{{ 'favicon.ico' | absolute_url }}" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs.css' | absolute_url }}">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | absolute_url }}">
|
||||
|
||||
{% if site.ga_tracking != nil %}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
|
||||
@@ -21,7 +21,7 @@
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', "{{ site.ga_tracking }}");
|
||||
gtag('config', '{{ site.ga_tracking }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
|
@@ -1,6 +1,15 @@
|
||||
<nav role="navigation" aria-label="Main navigation">
|
||||
<ul class="navigation-list">
|
||||
{%- assign pages_list = site.html_pages | sort:"nav_order" -%}
|
||||
{%- 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_sensitive' -%}
|
||||
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%}
|
||||
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%}
|
||||
{%- else -%}
|
||||
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%}
|
||||
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"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 -%}
|
||||
@@ -10,16 +19,17 @@
|
||||
{%- endif -%}
|
||||
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
|
||||
{%- if node.has_children -%}
|
||||
{%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
|
||||
{%- assign children_list = pages_list | where: "parent", node.title -%}
|
||||
<ul class="navigation-list-child-list ">
|
||||
{%- for child in children_list -%}
|
||||
{%- unless child.nav_exclude -%}
|
||||
<li class="navigation-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 -%}
|
||||
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
||||
{%- if child.has_children -%}
|
||||
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | where: "grand_parent", node.title | sort:"nav_order" -%}
|
||||
{%- assign grand_children_list = site.html_pages | where: "parent", child.title | where: "grand_parent", node.title -%}
|
||||
<ul class="navigation-list-child-list">
|
||||
{%- for grand_child in grand_children_list -%}
|
||||
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
|
||||
@@ -29,6 +39,7 @@
|
||||
</ul>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
{%- endunless -%}
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
{%- endif -%}
|
||||
|
Reference in New Issue
Block a user