feat(courses): Add course list

This commit is contained in:
Khaled Garbaya
2017-09-25 17:30:47 +02:00
committed by Benedikt Rötsch
parent 354df3c4b4
commit 6c7ab31305
7 changed files with 57 additions and 11 deletions

View File

@@ -1,5 +1,8 @@
extends layout
include mixins/_courseCard
block content
h1= title
p Welcome to #{title}
each course in courses
+courseCard(course)

View File

@@ -0,0 +1,10 @@
mixin courseCard(course = {fields: {title: '', description: '', categories: [], slug: ''}})
.course
.course__categories
if(course.fields.categories)
each category in course.fields.categories
a.course__categories--category(href=`categories/${category.fields.slug}`) #{category.title}
h1.course__title #{course.fields.title}
.course__description #{course.fields.shortDescription}
a.course__link(href=`/courses/${course.fields}`) view more