From 9f9397ec920a9ba980d7fc1910540e1f6eabc5df Mon Sep 17 00:00:00 2001
From: Josh Borrow <joshua.borrow@durham.ac.uk>
Date: Mon, 9 Apr 2018 13:22:59 +0100
Subject: [PATCH] Added links to docs from navbar

---
 data/global.yaml       |  5 ++++-
 templates/helpers.html | 13 ++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/data/global.yaml b/data/global.yaml
index dfa0f86..eba6169 100644
--- a/data/global.yaml
+++ b/data/global.yaml
@@ -1,4 +1,7 @@
-link: "https://gitlab.cosma.dur.ac.uk/swift/swiftsim"
+link: [
+  "./docs/index.html",
+  "https://gitlab.cosma.dur.ac.uk/swift/swiftsim"
+]
 
 navbar: [
   # Give in [Display_Name, Template_Name format].
diff --git a/templates/helpers.html b/templates/helpers.html
index 80f79c4..4ac04b6 100644
--- a/templates/helpers.html
+++ b/templates/helpers.html
@@ -14,7 +14,7 @@
         ...
     ]
 
-   link is simply the link to the codebase (this is stored in a data file rather than the template).
+   link is simply the link to the codebase and docs (this is stored in a data file rather than the template).
 #}
 <div class='nav mono'>
     <div class="navbutton" id="showhide">
@@ -32,10 +32,13 @@
         </ul>
     </div>
 
-    <div class="right-nav btn-orange code" id="right-nav">
+    <div class="right-nav" id="right-nav">
         <ul>
-            <li>
-                <a href="{{ link }}"><i class="fa fa-gitlab" aria-hidden="true"></i> Code</a>
+            <li class="btn-blue">
+                <a href="{{ link[0] }}"><i class="fa fa-book" aria-hidden="true"></i> Docs</a>
+            </li>
+            <li class="btn-orange code">
+                <a href="{{ link[1] }}"><i class="fa fa-gitlab" aria-hidden="true"></i> Code</a>
             </li>
         </ul>
     </div>
@@ -54,4 +57,4 @@
     {% endfor %}
     </ul>
 </div>
-{%- endmacro %}
\ No newline at end of file
+{%- endmacro %}
-- 
GitLab