fix categories in courses, small style fixes, landing page module adjustments

This commit is contained in:
Benedikt Rötsch
2017-09-27 18:41:16 +02:00
committed by Benedikt Rötsch
parent 23a0ac4a81
commit 1fb784e0d1
8 changed files with 20 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ mixin courseCard(course = {fields: {title: '', description: '', categories: [],
.course-card__categories
if(course.fields.categories)
each category in course.fields.categories
a(href=`categories/${category.fields.slug}`) #{category.title}
a(href=`/courses/categories/${category.sys.id}`) #{category.fields.title}
.course-card__title
h2= course.fields.title
.course-card__description

View File

@@ -1,6 +1,6 @@
mixin heroImageModule(module)
.module
.module__heroImage
h1.module__heroImage__title #{module.fields.title}
h2.module__heroImage__headline #{module.fields.headline}
h2.module__heroImage__title #{module.fields.title}
h3.module__heroImage__headline #{module.fields.headline}
img.module__heroImage__image(src=`${module.fields.backgroundImage.fields.file.url}` alt=`${module.fields.backgroundImage.fields.title}`)

View File

@@ -3,5 +3,5 @@ include ./_courseCard
mixin highlightedCourseModule(module)
.module
.module__higlightedCourse
h1.module__higlightedCourse__title #{module.fields.title}
h2.module__higlightedCourse__title #{module.fields.title}
+courseCard(module.fields.course)

View File

@@ -3,7 +3,7 @@ include _lesson
mixin _highlightLessonsModule(module)
.module
.module__higlightedLessons
h1.module__higlightedLessons__title #{module.fields.title}
h2.module__higlightedLessons__title #{module.fields.title}
each lesson in module.fields.lessons
+lesson(lesson)

View File

@@ -6,7 +6,8 @@ mixin lesson(lesson)
.lesson
h2.lesson__tilte #{lesson.fields.title}
div.lesson__shortDescription !{helpers.markdown(lesson.fields.description)}
img.lesson__image(src=`${lesson.fields.image.fields.file.url}` alt=`${lesson.fields.image.fields.title}`)
if lesson.fields.image
img.lesson__image(src=`${lesson.fields.image.fields.file.url}` alt=`${lesson.fields.image.fields.title}`)
each module in lesson.fields.modules
case module.sys.contentType.sys.id
when 'lessonModuleCodeSnippets'