diff --git a/_data/index.json b/_data/index.json index d177a83fe937cc5dad759ee245aba35f74b2319f..58c9405bece530e2436ef0139f80a77421a21ead 100644 --- a/_data/index.json +++ b/_data/index.json @@ -9,13 +9,13 @@ }, { "name": "Monday PM", - "topic": "Proc Gen", + "topic": "Flappy Bird & Practical", "links": { } }, { "name": "Tuesday AM", - "topic": "Flappy Bird & Practical", + "topic": "Proc Gen", "links": { } }, diff --git a/_data/timetable.json b/_data/timetable.json new file mode 100644 index 0000000000000000000000000000000000000000..783a776590b20dc2dcc9b36d53128012d32d6789 --- /dev/null +++ b/_data/timetable.json @@ -0,0 +1,50 @@ +{ + "days": [ "monday", "tuesday", "wednesday", "thursday", "friday"], + "breaks": ["coffee", "lunch"], + "sessions": { + "9:30-11:00": "am", + "11:00-11:30": "coffee", + "11:30-13:00": "am", + "13:00-14:30": "lunch", + "14:00-15:30": "pm", + "15:30-16:00": "coffee", + "16:00-17:00": "pm" + }, + + "data": { + "week1": { + "monday_am": ["Recap", "recap"], + "monday_pm": ["Flappy Bird", "recap"], + + "tuesday_am": ["Proc Gen", "recap"], + "tuesday_pm": ["Game Design Hack", "recap"], + + "wednesday_am": ["Game Design Hack", "recap"], + "wednesday_pm": ["Game Design Hack", "recap"], + + "thursday_am": ["Game Design Hack", "recap"], + "thursday_pm": ["Play Testing", "recap"], + + "friday_am": ["Game Balance", "recap"], + "friday_pm": ["Assignment", "recap"] + }, + + + "week2": { + "monday_am": ["Recap", "recap"], + "monday_pm": ["Flappy Bird", "recap"], + + "tuesday_am": ["Proc Gen", "recap"], + "tuesday_pm": ["Game Design Hack", "recap"], + + "wednesday_am": ["Game Design Hack", "recap"], + "wednesday_pm": ["Game Design Hack", "recap"], + + "thursday_am": ["Game Design Hack", "recap"], + "thursday_pm": ["Play Testing", "recap"], + + "friday_am": ["Game Balance", "recap"], + "friday_pm": ["Assignment", "recap"] + } + } +} diff --git a/_templates/timetable.html b/_templates/timetable.html new file mode 100644 index 0000000000000000000000000000000000000000..9a5c78ac61bf5127337a304fcec5222556393bc4 --- /dev/null +++ b/_templates/timetable.html @@ -0,0 +1,48 @@ +{% extends "_base.html" %} + +{# probably a little overkill ;p #} + +{% block content %} + +{% for (name, wk_key) in (('Week 1', 'week1'), ('Week 2', 'week2')) %} +<h2 id="{{wk_key}}">{{name}}</h2> + +<table class="table text-center"> + + <thead> + <tr class="thead-dark"> + <th></th> + {% for day in days %} + <th>{{day|title}}</th> + {% endfor %} + </tr> + </thead> + + <tbody> + + {% for (session, key) in sessions.items() %} + <tr> + <th class="table-dark">{{session}}</th> + {% if key in breaks %} + <td class="table-secondary" colspan="5">{{key|title}}</td> + {% else %} + {% for day in days %} + {% set sess_slug = '{}_{}'.format(day, key) -%} + + {% if sess_slug in data[wk_key] %} + <td>{{data[wk_key][sess_slug][0]}}</td> + {% else %} + <td class="table-warning">Not defined</td> + {% endif %} + + {% endfor %} + {% endif %} + + </tr> + {% endfor %} + + </tbody> +</table> +{% endfor %} + +{% endblock %}