Minor improvements for CardList.vue

This commit is contained in:
scmmishra 2018-11-30 12:46:53 +05:30 committed by Aditya Hase
parent 2955851867
commit edc54cd5f6
5 changed files with 13 additions and 8 deletions

View File

@ -1,5 +1,5 @@
<template>
<section class='section-padding section-bg'>
<section :class='sectionType'>
<div class='container'>
<h3 class='text-center' v-html="title"></h3>
<p class='lead text-center' v-html="description"></p>
@ -12,7 +12,7 @@
</template>
<script>
export default {
props:['title', 'description'],
props:['title', 'description', 'sectionType'],
name: "CardList",
};
</script>

View File

@ -3,7 +3,7 @@
<TopSection :title="portal.title" :description="portal.description">
<TopSectionButton/>
</TopSection>
<CardList :title="'Featured Programs'" :description="'Master ERPNext'">
<CardList :title="'Featured Programs'" :description="'Master ERPNext'" :sectionType="'section-padding section-bg'">
<ProgramCard slot="card-list-slot" v-for="item in featuredPrograms" :key="item.program.name" :program="item.program" :enrolled="item.is_enrolled"/>
<AButton slot="list-bottom" :type="'primary'" :size="'lg'" :route="'List/Program'">View All</AButton>
</CardList>

View File

@ -3,7 +3,7 @@
<TopSection :title="portal.title" :description="portal.description">
<AButton v-if="isLogin" :type="'primary'" :size="'lg'" :route="{ name: 'signup'}">Sign Up</AButton>
</TopSection>
<CardList :title="'All Programs'" :description="''">
<CardList :title="'All Programs'" :description="''" :sectionType="'section-padding section-bg'">
<ProgramCard slot="card-list-slot" v-for="item in masterData" :key="item.program.name" :program="item.program" :enrolled="item.is_enrolled"/>
</CardList>
</div>

View File

@ -1,9 +1,13 @@
<template>
<div>
<ProfileInfo :enrolledPrograms="enrolledPrograms"></ProfileInfo>
<CardList :title="'Your Progress'" :description="''">
<CardList :title="'Your Progress'" :description="''" :sectionType="'section-padding section-bg'">
<ProgressCard slot="card-list-slot" v-for="program in enrolledPrograms" :program="program" :key="program"/>
</CardList>
<CardList :title="'Quiz Attempts'" :description="''" :sectionType="'section-padding section'">
<ScoreCard slot="card-list-slot"/>
</CardList>
</div>
</template>
<script>
@ -12,7 +16,7 @@ import TopSection from "../components/TopSection.vue"
import CardList from "../components/CardList.vue"
import ProgressCard from "../components/ProgressCard.vue"
import ProfileInfo from "../components/ProfileInfo.vue"
import ScoreCard from "../components/ScoreCard.vue"
export default {
name: "ProfilePage",
@ -21,7 +25,8 @@ export default {
TopSection,
CardList,
ProfileInfo,
ProgressCard
ProgressCard,
ScoreCard
},
data() {
return {

View File

@ -2,7 +2,7 @@
<div>
<TopSection v-bind:title="program.program_name" v-bind:description="program.description">
</TopSection>
<CardList :title="'Courses'" :description="''">
<CardList :title="'Courses'" :description="''" :sectionType="'section-padding section-bg'">
<CourseCard slot="card-list-slot" v-for="course in courseData" :course="course" :program_name="program_name" :key="course.name"/>
</CardList>
</div>