From 2cf19b1c18b1baa49b0c68b056df0c321371e910 Mon Sep 17 00:00:00 2001 From: Piers Williams <solar_1992@hotmail.co.uk> Date: Thu, 3 May 2018 05:16:10 +0100 Subject: [PATCH] Updated the index to have the new formats --- _data/index.json | 8 +++++--- _templates/index.html | 8 +++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/_data/index.json b/_data/index.json index 6dc968b..6125aa4 100644 --- a/_data/index.json +++ b/_data/index.json @@ -1,19 +1,21 @@ { + "slides_prefix": "slides_pdf/ce810-", + "slide_types":{"Notes": "notes", "Presentation": "pres", "Handout": "handout"}, "assignments": { "Week 1": [ { "name": "Monday AM", "topic": "Recap", "links": { - "intro": "slides_pdf/ce810-intro.pres.pdf", - "slides": "slides_pdf/ce810-recap.pres.pdf" + "intro": "GEN", + "recap": "GEN" } }, { "name": "Monday PM", "topic": "Flappy Bird & Practical", "links": { - "slides": "slides_pdf/ce810-lab-paramter.pdf" + "lab-parameter": "GEN" } }, { diff --git a/_templates/index.html b/_templates/index.html index 87e4559..61ef242 100644 --- a/_templates/index.html +++ b/_templates/index.html @@ -20,7 +20,13 @@ <td> <ul class="list-inline"> {% for (title, link) in session.links.items() %} - <a href="{{link}}">{{title}}</a> + {% if link == "GEN" %} + {% for (pretty_name, name) in slide_types.items() %} + <a href="{{slides_prefix}}{{link}}{{name}}.pdf">{{pretty_name}}</a> + {% endfor %} + {% else %} + <a href="{{link}}">{{title}}</a> + {% endif %} {% endfor %} </ul> </td> -- GitLab