From b89b683f90cc46e3f9e29dda021d50f435a75df3 Mon Sep 17 00:00:00 2001
From: Patrick Marsceill <patrick.marsceill@gmail.com>
Date: Tue, 6 Aug 2019 15:56:29 -0400
Subject: [PATCH] Add content footer

---
 _config.yml           |  4 +-
 _includes/nav.html    | 86 +++++++++++++++++++++----------------------
 _layouts/default.html | 21 ++++++++---
 _sass/layout.scss     |  1 +
 _sass/navigation.scss |  6 +++
 docs/customization.md |  2 -
 6 files changed, 67 insertions(+), 53 deletions(-)

diff --git a/_config.yml b/_config.yml
index 4b938275..d5e27849 100644
--- a/_config.yml
+++ b/_config.yml
@@ -29,6 +29,8 @@ aux_links:
   "Just the Docs on GitHub":
     - "//github.com/pmarsceill/just-the-docs"
 
+footer_content: "Copyright &copy; 2017-2019 Patrick Marsceill. Distributed by an <a href=\"https://github.com/pmarsceill/just-the-docs/tree/master/LICENSE.txt\">MIT license.</a>"
+
 # Color scheme currently only supports "dark" or nil (default)
 color_scheme: nil
 
@@ -37,4 +39,4 @@ color_scheme: nil
 ga_tracking: UA-2709176-10
 
 plugins:
-  - jekyll-seo-tag
\ No newline at end of file
+  - jekyll-seo-tag
diff --git a/_includes/nav.html b/_includes/nav.html
index 2c4bf1ea..35984d50 100644
--- a/_includes/nav.html
+++ b/_includes/nav.html
@@ -1,44 +1,42 @@
-<nav role="navigation" aria-label="Main navigation">
-  <ul class="navigation-list">
-    {% assign pages_list = site.html_pages | sort:"nav_order" %}
-    {% for node in pages_list %}
-      {% unless node.nav_exclude %}
-        {% 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 %}">
-            {% if page.parent == node.title or page.grand_parent == node.title %}
-              {% assign first_level_url = node.url | absolute_url %}
-            {% 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 | sort:"nav_order" %}
-              <ul class="navigation-list-child-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 %}">
-                      {% 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 | sort:"nav_order" %}
-                        <ul class="navigation-list-child-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 %}">
-                                <a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
-                              </li>
-                            {% endif %}
-                          {% endfor %}
-                        </ul>
-                      {% endif %}
-                    </li>
-                  {% endif %}
-                {% endfor %}
-              </ul>
-            {% endif %}
-          </li>
-        {% endif %}
-      {% endunless %}
-    {% endfor %}
-  </ul>
-</nav>
+<ul class="navigation-list">
+  {% assign pages_list = site.html_pages | sort:"nav_order" %}
+  {% for node in pages_list %}
+    {% unless node.nav_exclude %}
+      {% 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 %}">
+          {% if page.parent == node.title or page.grand_parent == node.title %}
+            {% assign first_level_url = node.url | absolute_url %}
+          {% 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 | sort:"nav_order" %}
+            <ul class="navigation-list-child-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 %}">
+                    {% 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 | sort:"nav_order" %}
+                      <ul class="navigation-list-child-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 %}">
+                              <a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
+                            </li>
+                          {% endif %}
+                        {% endfor %}
+                      </ul>
+                    {% endif %}
+                  </li>
+                {% endif %}
+              {% endfor %}
+            </ul>
+          {% endif %}
+        </li>
+      {% endif %}
+    {% endunless %}
+  {% endfor %}
+</ul>
diff --git a/_layouts/default.html b/_layouts/default.html
index 2d5fe6ba..3eb3a284 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -8,12 +8,14 @@
     <div class="side-bar">
       <a href="{{ site.url }}{{ site.baseurl }}" class="site-title fs-6 lh-tight">{{ site.title }}</a>
       <span class="fs-3"><button class="js-main-nav-trigger navigation-list-toggle btn btn-outline" type="button" data-text-toggle="Hide">Menu</button></span>
-      <div class="navigation main-nav js-main-nav">
-        {% include nav.html %}
-      </div>
-      <footer role="contentinfo" class="site-footer">
-        <p class="text-small text-grey-dk-000 mb-0">This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.</p>
-      </footer>
+      <nav role="navigation" aria-label="Main navigation" class="navigation-wrapper">
+        <div class="navigation main-nav js-main-nav">
+          {% include nav.html %}
+        </div>
+        <footer class="site-footer">
+          <p class="text-small text-grey-dk-000 mb-4">This site uses <a href="https://github.com/pmarsceill/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll.</p>
+        </footer>
+       </nav>
     </div>
     <div class="main-content-wrap js-main-content" tabindex="0">
       <div class="page-header">
@@ -69,6 +71,13 @@
             {% endfor %}
           </ul>
           {% endif %}
+
+          {% if site.footer_content != nil %}
+          <hr>
+          <footer role="contentinfo">
+            <p class="text-small text-grey-dk-000 mb-0">{{ site.footer_content }}</p>
+          </footer>
+          {% endif %}
         </div>
       </div>
     </div>
diff --git a/_sass/layout.scss b/_sass/layout.scss
index ddd56fa9..79268795 100644
--- a/_sass/layout.scss
+++ b/_sass/layout.scss
@@ -137,6 +137,7 @@ body {
 .site-footer {
   position: absolute;
   bottom: 0;
+  left: 0;
   padding-top: $sp-4;
   padding-bottom: $sp-4;
 
diff --git a/_sass/navigation.scss b/_sass/navigation.scss
index 364c569a..6d276b21 100644
--- a/_sass/navigation.scss
+++ b/_sass/navigation.scss
@@ -19,6 +19,12 @@
   }
 }
 
+.navigation-wrapper {
+  display: flex;
+  flex-direction: column;
+  flex: 1 1 auto;
+}
+
 .navigation-list {
   padding: 0;
   margin-top: $sp-4;
diff --git a/docs/customization.md b/docs/customization.md
index f3fe1c03..d33a69b1 100644
--- a/docs/customization.md
+++ b/docs/customization.md
@@ -69,5 +69,3 @@ $link-color: $blue-000;
 ```
 
 _Note:_ Editing the variables directly in `_sass/support/variables.scss` is not recommended and can cause other dependencies to fail.
-
----
-- 
GitLab