Files
the-example-app-nodejs/views/course.pug
2017-11-07 17:33:32 +01:00

28 lines
1010 B
Plaintext

extends layout
include mixins/_lesson
block content
.wrapper.wrapper-with-sidebar
section.wrapper-with-sidebar__sidebar
h2 Table of contents
.table-of-contents
ul
li
a.active(href=`/courses/${course.fields.slug}`) Course overview
each l in course.fields.lessons
if l.fields
li
a(href=`/courses/${course.fields.slug}/lessons/${l.fields.slug}${queryString}`) #{l.fields.title}
section.wrapper-with-sidebar__content
h1= course.fields.title
if lesson
+lesson(lesson)
if lessonIndex + 1< lessons.length
if lessons[lessonIndex + 1].fields
a.cta(href=`/courses/${course.fields.slug}/lessons/${lessons[lessonIndex + 1].fields.slug}${queryString}`) View next lesson
else
p !{helpers.markdown(course.fields.description)}
a.cta(href=`/courses/${course.fields.slug}/lessons/${course.fields.lessons[0].fields.slug}${queryString}`) Start course