More work on instructions
authorNick Downing <nick.downing@lifx.co>
Wed, 18 Mar 2020 13:37:45 +0000 (00:37 +1100)
committerNick Downing <nick.downing@lifx.co>
Wed, 18 Mar 2020 13:37:45 +0000 (00:37 +1100)
_config/globals.json
assembly_instructions/overview.html.jst [moved from page2.html.jst with 51% similarity]
assembly_instructions/parts_list.html.jst [new file with mode: 0644]
construction_zero.html.jst
index.html.jst
navbar.jst
page.jst

index d641f50..1ae082a 100644 (file)
@@ -2,14 +2,20 @@
   "site_title": "MiRobot",
   "navigation": [
     "/index.html",
-    "/page2.html",
+    "/assembly_instructions/parts_list.html",
+    "/assembly_instructions/overview.html",
     "/construction_zero.html",
     "/blockly.html"
   ],
   "page_to_title": {
     "/index.html": "Home",
-    "/page2.html": "Page 2",
+    "/assembly_instructions/parts_list.html": "Parts List",
+    "/assembly_instructions/overview.html": "Overview",
     "/construction_zero.html": "Construction Zero",
     "/blockly.html": "Blockly"
+  },
+  "page_to_breadcrumbs": {
+    "/assembly_instructions/parts_list.html": "Assembly Instructions > Parts List",
+    "/assembly_instructions/overview.html": "Assembly Instructions > Overview"
   }
 }
similarity index 51%
rename from page2.html.jst
rename to assembly_instructions/overview.html.jst
index efe0947..e2e57ef 100644 (file)
@@ -1,6 +1,6 @@
 return async env => {
-  let navbar = await _require('navbar.jst')
-  let page2 = await env.site.get_min_svg('/_svg/page2.svg')
+  let navbar = await _require('/navbar.jst')
+  let page4 = await env.site.get_min_svg('/_svg/page4.svg')
 
   await navbar(
     env,
@@ -8,8 +8,8 @@ return async env => {
     async _out => {},
     // body
     async _out => {
-      h1 {'Parts List'}
-      _out.push(page2)
+      h1 {'Overview'}
+      _out.push(page4)
     },
     // scripts
     async _out => {}
diff --git a/assembly_instructions/parts_list.html.jst b/assembly_instructions/parts_list.html.jst
new file mode 100644 (file)
index 0000000..078366e
--- /dev/null
@@ -0,0 +1,28 @@
+return async env => {
+  let navbar = await _require('/navbar.jst')
+  let page2 = await env.site.get_min_svg('/_svg/page2.svg')
+  let page3 = await env.site.get_min_svg('/_svg/page3.svg')
+
+  await navbar(
+    env,
+    // head
+    async _out => {},
+    // body
+    async _out => {
+      h1 {'Parts List'}
+
+      h3 {'Lasercut Parts'}
+      _out.push(page2)
+
+      h3 {'3D Printed'}
+      p {
+        'Before you begin, you will need to 3D print these parts, please download STL files from '
+        a(href="http://www.techedu.com.au/software") {'http://www.techedu.com.au/software'}
+        '.'
+      }
+      _out.push(page3)
+    },
+    // scripts
+    async _out => {}
+  )
+}
index 6801e0b..b0e7d7a 100644 (file)
@@ -1,5 +1,5 @@
 return async env => {
-  let navbar = await _require('navbar.jst')
+  let navbar = await _require('/navbar.jst')
 
   await navbar(
     env,
index 6791bff..b61e13c 100644 (file)
@@ -1,5 +1,5 @@
 return async env => {
-  let navbar = await _require('navbar.jst')
+  let navbar = await _require('/navbar.jst')
 
   await navbar(
     env,
index 7b54f52..4751150 100644 (file)
@@ -8,31 +8,16 @@ return async (env, head, body, scripts) => {
   await page(
     env,
     // head
-    async _out => {
-      title {
-        _out.push(
-          globals.site_title +
-          ": " +
-          (globals.page_to_title[env.parsed_url.pathname] || env.parsed_url.pathname)
-        )
-      }
-
-      await head(_out)
-    },
+    head,
     // body
     async _out => {
       div(style="padding-left: calc(100vw - 100%);") {
         div.container {
           div.row {
             div.'col-sm-4'.left-pane {
-              _out.push(techedu_horizontal)
-            }
-            div.'col-sm-8'.pad-16 {
-              'Assembly Instructions > Parts List'
-            }
-          }
-          div.row {
-            div.'col-sm-4'.left-pane {
+              div {
+                _out.push(techedu_horizontal)
+              }
               div.mirobot-control {
                 div.container-fluid {
                   div.row {
@@ -160,6 +145,9 @@ return async (env, head, body, scripts) => {
               }
             }
             div.col-sm-8 {
+              h5 {
+                _out.push(globals.page_to_breadcrumbs[env.parsed_url.pathname] || globals.page_to_title[env.parsed_url.pathname] || env.parsed_url.pathname)
+              } 
               await body(_out)
             }
           }
index 528bf26..7db6415 100644 (file)
--- a/page.jst
+++ b/page.jst
@@ -84,7 +84,7 @@ return async (env, head, body, scripts) => {
         )
       }
   
-      link(rel="stylesheet" href="css/bootstrap.css") {}
+      link(rel="stylesheet" href="/css/bootstrap.css") {}
       link(rel="stylesheet" href="//fonts.googleapis.com/css?family=Frank+Ruhl+Libre:regular,regularitalic,semibold,semibolditalic,bold,bolditalic,black,blackitalic") {}
       link(rel="stylesheet" href="//fonts.googleapis.com/css?family=Nunito+Sans:regular,regularitalic,semibold,semibolditalic,bold,bolditalic,black,blackitalic") {}
   
@@ -107,7 +107,7 @@ return async (env, head, body, scripts) => {
       script(src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js") {}
       // Include all compiled plugins (below), or include individual files as needed
       //script(src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous") {}
-      script(src="js/bootstrap.js") {}
+      script(src="/js/bootstrap.js") {}
 
       await scripts(_out)
     }