diff --git a/assets/css/scss/index.scss b/assets/css/scss/index.scss index d3dc03348e..4482f0834a 100755 --- a/assets/css/scss/index.scss +++ b/assets/css/scss/index.scss @@ -25,7 +25,10 @@ @import "molecules/course_tool"; @import "molecules/datepicker"; @import "molecules/empty_state"; +@import "molecules/teacher_bar"; +@import "organisms/cards"; +@import "organisms/course_card"; @import "organisms/modals"; @import "organisms/sidebar"; diff --git a/assets/css/scss/molecules/_teacher_bar.scss b/assets/css/scss/molecules/_teacher_bar.scss new file mode 100644 index 0000000000..45d239c39c --- /dev/null +++ b/assets/css/scss/molecules/_teacher_bar.scss @@ -0,0 +1,29 @@ +@layer components { + .teacher-bar { + @apply flex flex-wrap gap-4; + + &__item { + @apply flex gap-0.5 items-center; + + > div.p-avatar { + @apply flex-none; + } + } + + &__item-caption { + @apply flex flex-col flex-grow text-caption; + + span:first-child { + @apply line-clamp-1 font-semibold; + } + } + + &--simple { + @apply flex-nowrap; + + .teacher-bar__item { + @apply w-1/2; + } + } + } +} \ No newline at end of file diff --git a/assets/css/scss/organisms/_cards.scss b/assets/css/scss/organisms/_cards.scss new file mode 100644 index 0000000000..78fd632b87 --- /dev/null +++ b/assets/css/scss/organisms/_cards.scss @@ -0,0 +1,30 @@ +.p-card { + @apply rounded-lg shadow-lg; + + .p-card-body { + @apply flex flex-col gap-4 p-4; + } + + .p-card-header { + img { + @apply rounded-t-lg; + } + } + + .p-card-title { + @apply text-body-2-bold line-clamp-2 min-h-[2rem]; + } + + .p-card-subtitle { + @apply text-body-1 text-gray-50; + } + + .p-card-content { + &:empty { + @apply hidden; + } + } + + .p-card-footer { + } +} diff --git a/assets/css/scss/organisms/_course_card.scss b/assets/css/scss/organisms/_course_card.scss new file mode 100644 index 0000000000..e088b53f87 --- /dev/null +++ b/assets/css/scss/organisms/_course_card.scss @@ -0,0 +1,5 @@ +@layer components { + .course-card { + @apply bg-gray-15; + } +} \ No newline at end of file diff --git a/assets/vue/components/TeacherBar.vue b/assets/vue/components/TeacherBar.vue new file mode 100644 index 0000000000..59494a57d6 --- /dev/null +++ b/assets/vue/components/TeacherBar.vue @@ -0,0 +1,38 @@ + + + + + + + + + + + + + diff --git a/assets/vue/components/course/CourseCard.vue b/assets/vue/components/course/CourseCard.vue index 9360992b57..298c4eab97 100644 --- a/assets/vue/components/course/CourseCard.vue +++ b/assets/vue/components/course/CourseCard.vue @@ -1,68 +1,35 @@ - - - - - - - - - - {{ session.name }} - - - {{ course.title }} - - - - - - - - - - - - - - - - {{ courseRelUser.node.user.firstname }} {{ courseRelUser.node.user.lastname }} - - - - - - - - - - - - - - - - - + + + + + + + + {{ session.name }} - + + {{ course.title }} + + + + + + - - diff --git a/assets/vue/components/course/CourseCardList.vue b/assets/vue/components/course/CourseCardList.vue index 49264bf2cb..a70a245341 100644 --- a/assets/vue/components/course/CourseCardList.vue +++ b/assets/vue/components/course/CourseCardList.vue @@ -1,46 +1,19 @@ - - - + - diff --git a/assets/vue/graphql/queries/CourseRelUser.js b/assets/vue/graphql/queries/CourseRelUser.js index dcc764daf5..87df143edd 100644 --- a/assets/vue/graphql/queries/CourseRelUser.js +++ b/assets/vue/graphql/queries/CourseRelUser.js @@ -17,8 +17,7 @@ export const GET_COURSE_REL_USER = gql` user { illustrationUrl, username, - firstname, - lastname + fullName } } }