1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-20 07:55:54 -05:00

Merge branch 'v0.2.6-release' into improve-search

This commit is contained in:
Patrick Marsceill 2019-08-14 10:43:59 -04:00 committed by GitHub
commit 1a2636350f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 43 deletions

View File

@ -15,12 +15,15 @@
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs.css' | absolute_url }}"> <link rel="stylesheet" href="{{ '/assets/css/just-the-docs.css' | absolute_url }}">
{% if site.ga_tracking != nil %} {% if site.ga_tracking != nil %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
<script> <script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; window.dataLayer = window.dataLayer || [];
ga('create', '{{ site.ga_tracking }}', '{{ site.url }}'); function gtag(){dataLayer.push(arguments);}
ga('send', 'pageview'); gtag('js', new Date());
gtag('config', "{{ site.ga_tracking }}");
</script> </script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
{% endif %} {% endif %}
{% if site.search_enabled != nil %} {% if site.search_enabled != nil %}
@ -30,7 +33,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
{% seo %} {% seo %}
{% include head_custom.html %}
{% include head_custom.html %}
</head> </head>

View File

@ -1,44 +1,40 @@
<nav role="navigation" aria-label="Main navigation"> <nav role="navigation" aria-label="Main navigation">
<ul class="navigation-list"> <ul class="navigation-list">
{% assign pages_list = site.html_pages | sort:"nav_order" %} {%- assign pages_list = site.html_pages | sort:"nav_order" -%}
{% for node in pages_list %} {%- for node in pages_list -%}
{% unless node.nav_exclude %} {%- unless node.nav_exclude -%}
{% if node.parent == nil %} {%- if node.parent == nil -%}
<li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}"> <li class="navigation-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 %} {%- if page.parent == node.title or page.grand_parent == node.title -%}
{% assign first_level_url = node.url | absolute_url %} {%- assign first_level_url = node.url | absolute_url -%}
{% endif %} {%- endif -%}
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a> <a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
{% if node.has_children %} {%- if node.has_children -%}
{% assign children_list = site.html_pages | sort:"nav_order" %} {%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list "> <ul class="navigation-list-child-list ">
{% for child in children_list %} {%- for child in children_list -%}
{% if child.parent == node.title %}
<li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}"> <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 %} {%- if page.url == child.url or page.parent == child.title -%}
{% assign second_level_url = child.url | absolute_url %} {%- assign second_level_url = child.url | absolute_url -%}
{% endif %} {%- endif -%}
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a> <a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
{% if child.has_children %} {%- if child.has_children -%}
{% assign grand_children_list = site.html_pages | sort:"nav_order" %} {%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
<ul class="navigation-list-child-list"> <ul class="navigation-list-child-list">
{% for grand_child in grand_children_list %} {%- for grand_child in grand_children_list -%}
{% if grand_child.parent == child.title %}
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}"> <li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
<a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a> <a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
</li> </li>
{% endif %} {%- endfor -%}
{% endfor %}
</ul> </ul>
{% endif %} {%- endif -%}
</li> </li>
{% endif %} {%- endfor -%}
{% endfor %}
</ul> </ul>
{% endif %} {%- endif -%}
</li> </li>
{% endif %} {%- endif -%}
{% endunless %} {%- endunless -%}
{% endfor %} {%- endfor -%}
</ul> </ul>
</nav> </nav>

View File

@ -14,6 +14,7 @@ layout: table_wrappers
<a href="{{ site.url }}{{ site.baseurl }}" class="site-title">{% include title.html %}</a> <a href="{{ site.url }}{{ site.baseurl }}" class="site-title">{% include title.html %}</a>
<button class="menu-button fs-3 js-main-nav-trigger" data-text-toggle="Hide" type="button">Menu</button> <button class="menu-button fs-3 js-main-nav-trigger" data-text-toggle="Hide" type="button">Menu</button>
</div> </div>
<div class="navigation main-nav js-main-nav"> <div class="navigation main-nav js-main-nav">
{% include nav.html %} {% include nav.html %}
</div> </div>

View File

@ -11,7 +11,8 @@ code {
border-radius: $border-radius; border-radius: $border-radius;
} }
pre.highlight { pre.highlight,
figure.highlight {
padding: $sp-3; padding: $sp-3;
margin-bottom: 0; margin-bottom: 0;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
@ -61,7 +62,7 @@ pre.highlight {
.highlight .ld { color: #93a1a1; } // literal.date // .highlight .ld { color: #93a1a1; } // literal.date //
.highlight .m { color: #2aa198; } // literal.number // .highlight .m { color: #2aa198; } // literal.number //
.highlight .s { color: #2aa198; } // literal.string // .highlight .s { color: #2aa198; } // literal.string //
.highlight .na { color: #93a1a1; } // name.attribute // .highlight .na { color: #555; } // name.attribute //
.highlight .nb { color: #b58900; } // name.builtin // .highlight .nb { color: #b58900; } // name.builtin //
.highlight .nc { color: #268bd2; } // name.class // .highlight .nc { color: #268bd2; } // name.class //
.highlight .no { color: #cb4b16; } // name.constant // .highlight .no { color: #cb4b16; } // name.constant //
@ -69,7 +70,7 @@ pre.highlight {
.highlight .ni { color: #cb4b16; } // name.entity // .highlight .ni { color: #cb4b16; } // name.entity //
.highlight .ne { color: #cb4b16; } // name.exception // .highlight .ne { color: #cb4b16; } // name.exception //
.highlight .nf { color: #268bd2; } // name.function // .highlight .nf { color: #268bd2; } // name.function //
.highlight .nl { color: #93a1a1; } // name.label // .highlight .nl { color: #555; } // name.label //
.highlight .nn { color: #93a1a1; } // name.namespace // .highlight .nn { color: #93a1a1; } // name.namespace //
.highlight .nx { color: #555; } // name.other // .highlight .nx { color: #555; } // name.other //
.highlight .py { color: #93a1a1; } // name.property // .highlight .py { color: #93a1a1; } // name.property //