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

22 lines
646 B
Plaintext

extends layout
block content
.wrapper.wrapper-with-sidebar
section.wrapper__sidebar
h2 Table of contents
.table-of-contents
ul
li
a.active(href=`/courses/${course.fields.slug}`) Course overview
each lesson in course.fields.lessons
li
a(href=`/courses/${course.fields.slug}/lessons/${lesson.fields.slug}`) #{lesson.fields.title}
section.wrapper__content
h1= course.fields.title
if lesson
h2= lesson.fields.title
p !{helpers.markdown(lesson.fields.description)}
else
p !{helpers.markdown(course.fields.description)}