Add styles for hover and visited for table of contents
* Add styles for hover and visited for table of contents * Add cookie based handling of visited table of content links
This commit is contained in:
committed by
Benedikt Rötsch
parent
c7d0860eda
commit
58d7e87325
@@ -11,11 +11,11 @@ block content
|
||||
.table-of-contents
|
||||
.table-of-contents__list
|
||||
.table-of-contents__item
|
||||
a.table-of-contents__link.active(href=`/courses/${course.fields.slug}`) Course overview
|
||||
a.table-of-contents__link(href=`/courses/${course.fields.slug}` class=(currentPath.endsWith(course.fields.slug) ? 'active' : '') class=(visitedLessons.includes(course.sys.id) ? 'visited' : '')) Course overview
|
||||
each l in course.fields.lessons
|
||||
if l.fields
|
||||
.table-of-contents__item
|
||||
a.table-of-contents__link(href=`/courses/${course.fields.slug}/lessons/${l.fields.slug}${queryString}`) #{l.fields.title}
|
||||
a.table-of-contents__link(href=`/courses/${course.fields.slug}/lessons/${l.fields.slug}${queryString}` class=(currentPath.endsWith(l.fields.slug) ? 'active' : '') class=(visitedLessons.includes(l.sys.id) ? 'visited' : '')) #{l.fields.title}
|
||||
section.layout-sidebar__content
|
||||
if lesson
|
||||
+lesson(lesson, course, nextLesson)
|
||||
|
||||
Reference in New Issue
Block a user